Fossil

Check-in [ec053168]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Nicer parser integration into pass II, and sort files for easier filesystem traversal during parsing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ec053168a810e148e2eb04ab0d9ec0a8cf588720
User & Date: aku 2007-10-06 20:58:24
Context
2007-10-06
21:00
rcs parser rewritten to snit type, singleton, using callbacks to convey information. Got a grip on regexp -start -indices (^ -> \A, indices are absolute). This means that I now don't have to shift the unprocessed string down in memory, it is all index processing now. This makes for a much faster parser, especially for large files with many revisions (example: ChangeLogs). check-in: e7bb3d07 user: aku tags: trunk
20:58
Nicer parser integration into pass II, and sort files for easier filesystem traversal during parsing. check-in: ec053168 user: aku tags: trunk
18:43
Fleshed out pass II, added skeleton of rcs archive class, started integration of rcs parser. check-in: 8a93ffa9 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/cvs2fossil/lib/c2f_pcollrev.tcl.

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
...
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
	foreach project [repository projects] {
	    set base [file join $rbase [$project base]]
	    log write 1 collrev "Processing $base"

	    foreach file [$project files] {
		set path [$file path]
		log write 2 collrev "Parsing $path"
		rcs::process [file join $base $path] $file
	    }
	}

	repository printrevstatistics
	repository persistrev

	log write 1 collrev "Scan completed"
................................................................................

    # # ## ### ##### ######## #############
}

namespace eval ::vc::fossil::import::cvs::pass {
    namespace export collrev
    namespace eval collrev {
	namespace eval rcs {
	    namespace import ::vc::rcs::parser::process
	}
	namespace import ::vc::fossil::import::cvs::repository
	namespace import ::vc::fossil::import::cvs::state
	namespace import ::vc::tools::trouble
	namespace import ::vc::tools::log
	log register collrev
    }
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide vc::fossil::import::cvs::pass::collrev 1.0
return







|







 







<
|
<













188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
...
215
216
217
218
219
220
221

222

223
224
225
226
227
228
229
230
231
232
233
234
235
	foreach project [repository projects] {
	    set base [file join $rbase [$project base]]
	    log write 1 collrev "Processing $base"

	    foreach file [$project files] {
		set path [$file path]
		log write 2 collrev "Parsing $path"
		parser process [file join $base $path] $file
	    }
	}

	repository printrevstatistics
	repository persistrev

	log write 1 collrev "Scan completed"
................................................................................

    # # ## ### ##### ######## #############
}

namespace eval ::vc::fossil::import::cvs::pass {
    namespace export collrev
    namespace eval collrev {

	namespace import ::vc::rcs::parser

	namespace import ::vc::fossil::import::cvs::repository
	namespace import ::vc::fossil::import::cvs::state
	namespace import ::vc::tools::trouble
	namespace import ::vc::tools::log
	log register collrev
    }
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide vc::fossil::import::cvs::pass::collrev 1.0
return

Changes to tools/cvs2fossil/lib/c2f_project.tcl.

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

    method add {rcs usr} {
	set myfiles($rcs) $usr
	return
    }

    method filenames {} {
	return [array names myfiles]
    }

    method files {} {
	# TODO: Loading from state
	set res {}
	foreach f [array names myfiles] {
	    lappend res [file %AUTO% $f $self]
	}
	return $res
    }

    method persist {} {
	state transaction {







|





|







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

    method add {rcs usr} {
	set myfiles($rcs) $usr
	return
    }

    method filenames {} {
	return [lsort -dict [array names myfiles]]
    }

    method files {} {
	# TODO: Loading from state
	set res {}
	foreach f [lsort -dict [array names myfiles]] {
	    lappend res [file %AUTO% $f $self]
	}
	return $res
    }

    method persist {} {
	state transaction {