Fossil SCM

Bugfix for 3852590ce6. Make the use of cache files in the rcs parser actually dependent on the user option.

aku 2007-09-26 07:06 trunk
Commit f6f5c902e60fdbf223c96ef7424d1fff548941d3
1 file changed +11 -5
--- tools/lib/rcsparser.tcl
+++ tools/lib/rcsparser.tcl
@@ -59,25 +59,31 @@
5959
}
6060
return
6161
}
6262
6363
proc ::vc::rcs::parser::process {path} {
64
- set cache [Cache $path]
64
+ variable cache
65
+
66
+ if {!$cache} {
67
+ return [Process $path]
68
+ }
69
+
70
+ set cachefile [Cache $path]
6571
if {
66
- [file exists $cache] &&
67
- ([file mtime $cache] > [file mtime $path])
72
+ [file exists $cachefile] &&
73
+ ([file mtime $cachefile] > [file mtime $path])
6874
} {
6975
# Use preparsed data if not invalidated by changes to the
7076
# archive they are derived from.
7177
write 4 rcs {Load preparsed data block}
72
- return [fileutil::cat -encoding binary $cache]
78
+ return [fileutil::cat -encoding binary $cachefile]
7379
}
7480
7581
set res [Process $path]
7682
7783
# Save parse result for quick pickup by future runs.
78
- fileutil::writeFile $cache $res
84
+ fileutil::writeFile $cachefile $res
7985
8086
return $res
8187
}
8288
8389
# -----------------------------------------------------------------------------
8490
--- tools/lib/rcsparser.tcl
+++ tools/lib/rcsparser.tcl
@@ -59,25 +59,31 @@
59 }
60 return
61 }
62
63 proc ::vc::rcs::parser::process {path} {
64 set cache [Cache $path]
 
 
 
 
 
 
65 if {
66 [file exists $cache] &&
67 ([file mtime $cache] > [file mtime $path])
68 } {
69 # Use preparsed data if not invalidated by changes to the
70 # archive they are derived from.
71 write 4 rcs {Load preparsed data block}
72 return [fileutil::cat -encoding binary $cache]
73 }
74
75 set res [Process $path]
76
77 # Save parse result for quick pickup by future runs.
78 fileutil::writeFile $cache $res
79
80 return $res
81 }
82
83 # -----------------------------------------------------------------------------
84
--- tools/lib/rcsparser.tcl
+++ tools/lib/rcsparser.tcl
@@ -59,25 +59,31 @@
59 }
60 return
61 }
62
63 proc ::vc::rcs::parser::process {path} {
64 variable cache
65
66 if {!$cache} {
67 return [Process $path]
68 }
69
70 set cachefile [Cache $path]
71 if {
72 [file exists $cachefile] &&
73 ([file mtime $cachefile] > [file mtime $path])
74 } {
75 # Use preparsed data if not invalidated by changes to the
76 # archive they are derived from.
77 write 4 rcs {Load preparsed data block}
78 return [fileutil::cat -encoding binary $cachefile]
79 }
80
81 set res [Process $path]
82
83 # Save parse result for quick pickup by future runs.
84 fileutil::writeFile $cachefile $res
85
86 return $res
87 }
88
89 # -----------------------------------------------------------------------------
90

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button