Differences From:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[f46458d5bd]
- Reworked the basic structure of pass InitCSets to keep memory consumption down. Now incremental creates, breaks, saves, and releases changesets, instead of piling them on before saving all at the end. Memory tracking confirms that this changes the accumulating mountain into a near-constant usage, with the expected spikes from the breaking.
by
aku on
2008-02-17 02:06:19.
[view]
To:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[b3d61d7829]
- Fixed bug made in f46458d5bd which prevented the saving of the changesets generated by the breaking of the internal dependencies.
by
aku on
2008-02-23 06:33:30.
[view]
@@ -185,9 +185,9 @@
array set dependencies {}
$mytypeobj internalsuccessors dependencies $myitems
if {![array size dependencies]} {
- return 0
+ return {}
} ; # Nothing to break.
log write 5 csets ...[$self str].......................................................
vc::tools::mem::mark
@@ -291,8 +291,9 @@
# Create changesets for the fragments, reusing the current one
# for the first fragment. We sort them in order to allow
# checking for gaps and nice messages.
+ set newcsets {}
set fragments [lsort -index 0 -integer $fragments]
#puts \t.[join [PRs $fragments] .\n\t.].
@@ -305,8 +306,9 @@
Border $fragment s e
integrity assert {$laste == ($s - 1)} {Bad fragment border <$laste | $s>, gap or overlap}
set new [$type %AUTO% $myproject $mytype $mysrcid [lrange $myitems $s $e]]
+ lappend newcsets $new
incr counter
log write 4 csets "Breaking [$self str ] @ $laste, new [$new str], cutting $breaks($laste)"
@@ -330,9 +332,9 @@
set myitemmap($key) $self
log write 8 csets {MAP+ item <$key> $self = [$self str]}
}
- return 1
+ return $newcsets
}
method persist {} {
set tid $mycstype($mytype)