Differences From:
File
tools/lib/rcsparser.tcl
part of check-in
[3852590ce6]
- New feature for importer. rcs parser extended so that it can store parse results for quick loading in future runs. This feature has no real use in regular use of the importer, i.e. one-shot conversion of a CVS repository to fossil. It is however useful for debugging when the source repository is scanned many times during test runs. Especially for large files, with lots of changes (like ChangeLogs), the direct loading of a Tcl dictionary is much faster than actually parsing the archive files.
by
aku on
2007-09-26 05:02:06.
[view]
To:
File
tools/cvs2fossil/lib/rcsparser.tcl
part of check-in
[860f533e98]
- Bringing back in the old parser for rcs archives.
by
aku on
2007-10-06 18:28:33.
Also file
tools/lib/rcsparser.tcl
part of check-in
[f6f5c902e6]
- Bugfix for 3852590ce6. Make the use of cache files in the rcs parser actually dependent on the user option.
by
aku on
2007-09-26 07:06:45.
[view]
@@ -60,23 +60,29 @@
return
}
proc ::vc::rcs::parser::process {path} {
- set cache [Cache $path]
+ variable cache
+
+ if {!$cache} {
+ return [Process $path]
+ }
+
+ set cachefile [Cache $path]
if {
- [file exists $cache] &&
- ([file mtime $cache] > [file mtime $path])
+ [file exists $cachefile] &&
+ ([file mtime $cachefile] > [file mtime $path])
} {
# Use preparsed data if not invalidated by changes to the
# archive they are derived from.
write 4 rcs {Load preparsed data block}
- return [fileutil::cat -encoding binary $cache]
+ return [fileutil::cat -encoding binary $cachefile]
}
set res [Process $path]
# Save parse result for quick pickup by future runs.
- fileutil::writeFile $cache $res
+ fileutil::writeFile $cachefile $res
return $res
}