Differences From:
File
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[70b0aa899a]
- Found easier way to access the typevariables of singletons when writing the rcs parser. Now moved the other singletons to the same construction.
by
aku on
2007-10-06 22:13:25.
[view]
To:
File
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[54ac684df7]
- Completed loading of pass I from persistent state when skipped.
by
aku on
2007-10-13 23:57:15.
[view]
@@ -51,11 +51,8 @@
return
}
typemethod projects {} {
- # TODO: Loading from the state database if CollAr is skipped
- # in a run.
-
return [TheProjects]
}
typemethod base? {} { return $mybase }
@@ -137,8 +134,26 @@
}
return
}
+ typemethod load {} {
+ array set pr {}
+ state transaction {
+ foreach {pid name} [state run {
+ SELECT pid, name FROM project ;
+ }] {
+ lappend myprojpaths $name
+ lappend myprojects [set pr($pid) [project %AUTO% $name $type]]
+ }
+ foreach {fid pid name visible exec} [state run {
+ SELECT fid, pid, name, visible, exec FROM file ;
+ }] {
+ $pr($pid) addfile $name $visible $exec
+ }
+ }
+ return
+ }
+
# pass II results
typemethod printrevstatistics {} {
log write 2 repository "Scanned ..."
# number of revisions, symbols, repository wide, per project ...
@@ -199,9 +214,8 @@
proc TheProjects {} {
upvar 1 type type
::variable myprojects
::variable myprojpaths
- ::variable mybase
if {![llength $myprojects]} {
set myprojects [EmptyProjects $myprojpaths]
}