Fossil SCM

Nicer parser integration into pass II, and sort files for easier filesystem traversal during parsing.

aku 2007-10-06 20:58 trunk
Commit ec053168a810e148e2eb04ab0d9ec0a8cf588720
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -190,11 +190,11 @@
190190
log write 1 collrev "Processing $base"
191191
192192
foreach file [$project files] {
193193
set path [$file path]
194194
log write 2 collrev "Parsing $path"
195
- rcs::process [file join $base $path] $file
195
+ parser process [file join $base $path] $file
196196
}
197197
}
198198
199199
repository printrevstatistics
200200
repository persistrev
@@ -217,13 +217,11 @@
217217
}
218218
219219
namespace eval ::vc::fossil::import::cvs::pass {
220220
namespace export collrev
221221
namespace eval collrev {
222
- namespace eval rcs {
223
- namespace import ::vc::rcs::parser::process
224
- }
222
+ namespace import ::vc::rcs::parser
225223
namespace import ::vc::fossil::import::cvs::repository
226224
namespace import ::vc::fossil::import::cvs::state
227225
namespace import ::vc::tools::trouble
228226
namespace import ::vc::tools::log
229227
log register collrev
230228
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -190,11 +190,11 @@
190 log write 1 collrev "Processing $base"
191
192 foreach file [$project files] {
193 set path [$file path]
194 log write 2 collrev "Parsing $path"
195 rcs::process [file join $base $path] $file
196 }
197 }
198
199 repository printrevstatistics
200 repository persistrev
@@ -217,13 +217,11 @@
217 }
218
219 namespace eval ::vc::fossil::import::cvs::pass {
220 namespace export collrev
221 namespace eval collrev {
222 namespace eval rcs {
223 namespace import ::vc::rcs::parser::process
224 }
225 namespace import ::vc::fossil::import::cvs::repository
226 namespace import ::vc::fossil::import::cvs::state
227 namespace import ::vc::tools::trouble
228 namespace import ::vc::tools::log
229 log register collrev
230
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -190,11 +190,11 @@
190 log write 1 collrev "Processing $base"
191
192 foreach file [$project files] {
193 set path [$file path]
194 log write 2 collrev "Parsing $path"
195 parser process [file join $base $path] $file
196 }
197 }
198
199 repository printrevstatistics
200 repository persistrev
@@ -217,13 +217,11 @@
217 }
218
219 namespace eval ::vc::fossil::import::cvs::pass {
220 namespace export collrev
221 namespace eval collrev {
222 namespace import ::vc::rcs::parser
 
 
223 namespace import ::vc::fossil::import::cvs::repository
224 namespace import ::vc::fossil::import::cvs::state
225 namespace import ::vc::tools::trouble
226 namespace import ::vc::tools::log
227 log register collrev
228
--- tools/cvs2fossil/lib/c2f_project.tcl
+++ tools/cvs2fossil/lib/c2f_project.tcl
@@ -43,17 +43,17 @@
4343
set myfiles($rcs) $usr
4444
return
4545
}
4646
4747
method filenames {} {
48
- return [array names myfiles]
48
+ return [lsort -dict [array names myfiles]]
4949
}
5050
5151
method files {} {
5252
# TODO: Loading from state
5353
set res {}
54
- foreach f [array names myfiles] {
54
+ foreach f [lsort -dict [array names myfiles]] {
5555
lappend res [file %AUTO% $f $self]
5656
}
5757
return $res
5858
}
5959
6060
--- tools/cvs2fossil/lib/c2f_project.tcl
+++ tools/cvs2fossil/lib/c2f_project.tcl
@@ -43,17 +43,17 @@
43 set myfiles($rcs) $usr
44 return
45 }
46
47 method filenames {} {
48 return [array names myfiles]
49 }
50
51 method files {} {
52 # TODO: Loading from state
53 set res {}
54 foreach f [array names myfiles] {
55 lappend res [file %AUTO% $f $self]
56 }
57 return $res
58 }
59
60
--- tools/cvs2fossil/lib/c2f_project.tcl
+++ tools/cvs2fossil/lib/c2f_project.tcl
@@ -43,17 +43,17 @@
43 set myfiles($rcs) $usr
44 return
45 }
46
47 method filenames {} {
48 return [lsort -dict [array names myfiles]]
49 }
50
51 method files {} {
52 # TODO: Loading from state
53 set res {}
54 foreach f [lsort -dict [array names myfiles]] {
55 lappend res [file %AUTO% $f $self]
56 }
57 return $res
58 }
59
60

Keyboard Shortcuts

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