Differences From:
File
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[3d88cfd05d]
- Started capture of revision information in file objects. Capturing authors and commit messages and repository level. Completed persistence for these latter too. Rearranged the requirements, imports, and exports a bit to handle the new dependency cycle repository <- project <- file <- repository
by
aku on
2007-10-06 21:59:03.
[view]
To:
File
tools/cvs2fossil/lib/c2f_repository.tcl
part of check-in
[84871722547960b]
- Broke static dependency cycle repository <- project <- file <- repository, now using dynamic/runtime object references instead. This allows us to keep the nice and readable format for our files, code is readable too.
by
aku on
2007-10-06 22:06:05.
[view]
@@ -20,11 +20,11 @@
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
-package require vc::tools::misc ; # Text formatting
-# CVS Projects later (see bottom) to handle circular dependency in 'file'.
-package require vc::fossil::import::cvs::state ; # State storage
+package require vc::tools::misc ; # Text formatting.
+package require vc::fossil::import::cvs::project ; # CVS projects.
+package require vc::fossil::import::cvs::state ; # State storage.
package require struct::list ; # List operations.
package require fileutil ; # File operations.
# # ## ### ##### ######## ############# #####################
@@ -195,9 +195,9 @@
return 1
}
proc TheProjects {} {
- upvar 1 myprojects myprojects myprojpaths myprojpaths mybase mybase
+ upvar 1 myprojects myprojects myprojpaths myprojpaths mybase mybase type type
if {![llength $myprojects]} {
set myprojects [EmptyProjects $myprojpaths]
}
@@ -204,17 +204,17 @@
return $myprojects
}
proc EmptyProjects {projpaths} {
- upvar 1 mybase mybase
+ upvar 1 mybase mybase type type
set res {}
if {[llength $projpaths]} {
foreach pp $projpaths {
- lappend res [project %AUTO% $pp]
+ lappend res [project %AUTO% $pp $type]
}
} else {
# Base is the single project.
- lappend res [project %AUTO% ""]
+ lappend res [project %AUTO% "" $type]
}
return $res
}
@@ -255,24 +255,18 @@
}
namespace eval ::vc::fossil::import::cvs {
namespace export repository
-}
-
-# CVS projects here to handle circular dependency
-# repository <- project <- file <- repository
-
-package require vc::fossil::import::cvs::project
-
-namespace eval ::vc::fossil::import::cvs::repository {
- namespace import ::vc::fossil::import::cvs::project
- namespace import ::vc::fossil::import::cvs::state
- namespace import ::vc::tools::misc::*
- namespace import ::vc::tools::trouble
- namespace import ::vc::tools::log
- log register repository
+ namespace eval repository {
+ namespace import ::vc::fossil::import::cvs::project
+ namespace import ::vc::fossil::import::cvs::state
+ namespace import ::vc::tools::misc::*
+ namespace import ::vc::tools::trouble
+ namespace import ::vc::tools::log
+ log register repository
+ }
}
# # ## ### ##### ######## ############# #####################
## Ready
return