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
[66235f2430]
- Updated the copyright information of all files touched in the new year.
by
aku on
2008-02-06 05:04:12.
Also file
tools/cvs2fossil/lib/c2f_pimport.tcl
part of check-in
[6b78df3861]
- Merge in changes from Andreas's branch.
by
drh on
2008-02-08 21:52:21.
[view]
@@ -1,7 +1,7 @@
## -*- tcl -*-
# # ## ### ##### ######## ############# #####################
-## Copyright (c) 2007 Andreas Kupries.
+## Copyright (c) 2007-2008 Andreas Kupries.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#
@@ -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,22 @@
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 +140,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
}
}