Differences From:
File
tools/cvs2fossil/lib/c2f_project.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]
To:
File
tools/cvs2fossil/lib/c2f_project.tcl
part of check-in
[da9295c6f6]
- Continued to flesh out revision and symbol processing. Started on the project level classses.
by
aku on
2007-10-12 07:18:27.
[view]
@@ -14,12 +14,13 @@
# # ## ### ##### ######## ############# #####################
## Requirements
-package require Tcl 8.4 ; # Required runtime.
-package require snit ; # OO system.
-package require vc::fossil::import::cvs::file ; # CVS archive file.
-package require vc::fossil::import::cvs::state ; # State storage
+package require Tcl 8.4 ; # Required runtime.
+package require snit ; # OO system.
+package require vc::fossil::import::cvs::file ; # CVS archive file.
+package require vc::fossil::import::cvs::state ; # State storage
+package require vc::fossil::import::cvs::project::sym ; # Per project symbols
# # ## ### ##### ######## ############# #####################
##
@@ -55,8 +56,15 @@
}
delegate method author to myrepository
delegate method cmessage to myrepository
+
+ method getsymbol {name} {
+ if {![info exists mysymbols($name)]} {
+ set mysymbols($name) [sym %AUTO% $name]
+ }
+ return $mysymbols($name)
+ }
# pass I persistence
method persist {} {
state transaction {
@@ -95,12 +103,13 @@
# # ## ### ##### ######## #############
## State
- variable mybase {} ; # Project directory
- variable myfiles -array {} ; # Maps rcs archive to their user files.
- variable myfobj {} ; # File objects for the rcs archives
- variable myrepository {} ; # Repository the prject belongs to.
+ variable mybase {} ; # Project directory
+ variable myfiles -array {} ; # Maps rcs archive to their user files.
+ variable myfobj {} ; # File objects for the rcs archives
+ variable myrepository {} ; # Repository the prject belongs to.
+ variable mysymbols -array {} ; # Map symbol names to project-level symbol objects.
# # ## ### ##### ######## #############
## Internal methods
@@ -135,8 +144,10 @@
namespace export project
namespace eval project {
namespace import ::vc::fossil::import::cvs::file
namespace import ::vc::fossil::import::cvs::state
+ # Import not required, already a child namespace.
+ # namespace import ::vc::fossil::import::cvs::project::sym
}
}
# # ## ### ##### ######## ############# #####################