Differences From:
File
tools/cvs2fossil/lib/c2f_pimport.tcl
part of check-in
[d9fc75e587]
- Created new pass for the import of files and changesets. Uses the new file method and fossil accessor class to handle the file import. Changeset -> manifest conversion is _not_ covered yet.
by
aku on
2007-12-05 07:57:50.
[view]
To:
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]
@@ -46,8 +46,12 @@
state use project
state use file
state use revision
+ state use meta
+ state use author
+ state use cmessage
+ state use symbol
# This data is actually transient, confined to this pass. We
# use the state storage only to keep the RAM usage low.
state extend revuuid {
@@ -83,19 +87,21 @@
set fossil [fossil %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
}
-
- # TODO: Generate manifests for the changesets in the
- # project and import them. This needs
- # topological traversal. And the creation of
- # empty helper baselines for stuff like the root
- # of ntdb and such.
+ # Layer II: Changesets
+ array set rstate {}
+ foreach {revision date} [$project revisionsinorder] {
+ log write 2 import {Importing revision [$revision str]}
+ $revision pushto rstate $fossil $date
+ }
+ unset rstate
}
# At last copy the temporary repository file to its final
# destination and release the associated memory.