Differences From:
File
tools/cvs2fossil/lib/c2f_pcollar.tcl
part of check-in
[52f2254007]
- Continued work on pass I. Filled in the repository management, and basic implementation of project objects. Missing are persistence and the foundation for that (cache database).
by
aku on
2007-10-04 04:34:59.
[view]
To:
File
tools/cvs2fossil/lib/c2f_pcollar.tcl
part of check-in
[fb1e36d290]
- Extended state handling with methods to declare usage and structure of state,
started integration of state with pass I, collection of projects and files.
by
aku on
2007-10-05 06:50:57.
[view]
@@ -25,8 +25,9 @@
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
package require vc::fossil::import::cvs::pass ; # Pass management.
package require vc::fossil::import::cvs::repository ; # Repository management.
+package require vc::fossil::import::cvs::state ; # State storage
# # ## ### ##### ######## ############# #####################
## Register the pass with the management
@@ -42,9 +43,22 @@
# # ## ### ##### ######## #############
## Public API
typemethod setup {} {
- # TODO ... artifact/cache - drop projects/files, create projects/files
+ # Define names and structure of the persistent state of this
+ # pass.
+
+ state writing project {
+ pid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ name TEXT NOT NULL UNIQUE
+ }
+ state writing files {
+ fid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ pid INTEGER NOT NULL REFERENCES project,
+ name TEXT NOT NULL UNIQUE,
+ visible TEXT NOT NULL UNIQUE
+ }
+ return
}
typemethod run {} {
set rbase [repository base?]
@@ -165,8 +179,9 @@
namespace eval ::vc::fossil::import::cvs::pass {
namespace export collar
namespace eval collar {
namespace import ::vc::fossil::import::cvs::repository
+ namespace import ::vc::fossil::import::cvs::state
namespace import ::vc::tools::trouble
namespace import ::vc::tools::log
log register collar
}