Differences From:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[faf57d7462]
- Modified the changeset class to move handling of the changeset lists to fully after their creation and storage. This is item (3) in cvsfossil.txt. The results do not satisfy however. During the creation of each changeset memory usage is (fractonally) lower, however at the end, after all changesets haven been loaded memory usage is consistently higher. The reason for that is not known. I am saving this for possible future evolution and usage, but will not pursue this further right now. The gains seem to be too small compared to the overall loss. InitializeBreakstate is likely a better target, despite its complexity.
by
aku on
2008-02-20 06:03:48.
[view]
To:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[383c10f004]
- Merged bugfix b3d61d7829 into this semi-abandoned branch just in case we will work on it again. Do it now instead of forgetting it later.
by
aku on
2008-02-23 06:37:54.
[view]
@@ -199,9 +199,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
@@ -305,8 +305,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.].
@@ -319,8 +320,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)"
@@ -344,9 +346,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)