Differences From:
File
tools/cvs2fossil/lib/c2f_pimport.tcl
part of check-in
[348e45b0d6]
- Added basic import of changesets. Note that this code is incomplete with regard to handling the various possible interactions between a vendor-branh and trunk.
by
aku on
2008-01-30 08:28:34.
[view]
To:
File
tools/cvs2fossil/lib/c2f_pimport.tcl
part of check-in
[e1dbf3186d]
- Reworked the revision import to use the new state tracking system instead of the simple array. Moved some log outputs. Added a file listing the known problems to prevent me from forgetting stuff as it piles up :/
by
aku on
2008-02-04 06:05:11.
[view]
@@ -23,8 +23,9 @@
package require vc::tools::log ; # User feedback.
package require vc::fossil::import::cvs::repository ; # Repository management.
package require vc::fossil::import::cvs::state ; # State storage.
package require vc::fossil::import::cvs::fossil ; # Access to fossil repositories.
+package require vc::fossil::import::cvs::ristate ; # Import state (revisions)
# # ## ### ##### ######## ############# #####################
## Register the pass with the management
@@ -85,24 +86,23 @@
foreach project [repository projects] {
log write 1 import {Importing project "[$project base]"}
set fossil [fossil %AUTO%]
+ set rstate [ristate %AUTO%]
state transaction {
# Layer I: Files and their revisions
foreach file [$project files] {
- set path [$file path]
- log write 2 import {Importing file "$path"}
$file pushto $fossil
}
# Layer II: Changesets
- array set rstate {}
foreach {revision date} [$project revisionsinorder] {
- log write 2 import {Importing revision [$revision str]}
- $revision pushto rstate $fossil $date
+ $revision pushto $fossil $date $rstate
}
unset rstate
}
+
+ $rstate destroy
# At last copy the temporary repository file to its final
# destination and release the associated memory.
@@ -141,8 +141,9 @@
namespace eval import {
namespace import ::vc::fossil::import::cvs::repository
namespace import ::vc::fossil::import::cvs::state
namespace import ::vc::fossil::import::cvs::fossil
+ namespace import ::vc::fossil::import::cvs::ristate
namespace import ::vc::tools::log
log register import
}
}