Overview
SHA1 Hash: | 9214c1183140fdbfec9a57640ba1f6fa9bf7c415 |
---|---|
Date: | 2008-02-02 07:03:39 |
User: | aku |
Comment: | Changeset handling, extended logging of how parent is determined. Fossil access, fixed importrev call to use correct workspace/repository. Fixed handling of output, stripping unwanted text, checking of output syntax. Extended logging. Added final 'rebuild'. NOTE: formation of the changesets/manifests is buggy, is not tracking unchanged files across changesets. Further not yet tracking when files have been removed. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/cvs2fossil/lib/c2f_fossil.tcl from [4e12eb8650] to [ecad76ba99].
@@ -36,10 +36,13 @@ ::file mkdir $myworkspace Do new [::file nativename $myrepository] $self InWorkspace ; Do open [::file nativename $myrepository] $self RestorePwd + + log write 8 fossil {scratch repository $myrepository} + log write 8 fossil {scratch workspace $myworkspace} return } # # ## ### ##### ######## ############# ## @@ -113,17 +116,31 @@ lappend cmd -f $frid $fpath log write 2 fossil {** <[format %5d $frid]> = <$flabel>} } # run fossil test-command performing the import. - set uuid [eval $cmd] + log write 8 fossil { [lreplace $cmd 3 3 @@]} + + $self InWorkspace + set res [eval $cmd] + $self RestorePwd + + integrity assert { + [regexp {^inserted as record \d+$} $res] + } {Unable to process unexpected fossil output '$res'} + set uuid [lindex $res 3] log write 2 fossil {== $uuid} + log write 2 fossil { } + log write 2 fossil { } + return $uuid } method finalize {destination} { + Do rebuild [::file nativename $myrepository] + ::file rename -force $myrepository $destination ::file delete -force $myworkspace $self destroy return }
Modified tools/cvs2fossil/lib/c2f_prev.tcl from [fd889684d2] to [b562462581].
@@ -447,10 +447,18 @@ proc Getparent {sv lodname project items} { upvar 1 $sv state struct::list assign [Getisdefault $items] isdefault lastdefaultontrunk + log write 8 csets {LOD '$lodname'} + log write 8 csets { def? $isdefault} + log write 8 csets { last? $lastdefaultontrunk} + + foreach k [lsort [array names state]] { + log write 8 csets { $k = $state($k)} + } + # See (a) below, we have to remember if the changeset is last # on vendor branch also belonging to trunk even if we find a # parent in the state. The caller will later (after import) # make us the first trunk changeset in the state (See (**)). @@ -498,13 +506,16 @@ # Case (c). We find the parent LOD of our LOD and take the # last changeset committed to that as our parent. If that # doesn't exist we have an error on our hands. - set lodname [[[$project getsymbol $lodname] parent] name] - if {[info exists state($lodname)]} { - return $state($lodname) + set plodname [[[$project getsymbol $lodname] parent] name] + + log write 8 csets {pLOD '$plodname'} + + if {[info exists state($plodname)]} { + return $state($plodname) } trouble internal {Unable to determine changeset parent} return }