Differences From:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[08ebab80cd]
- Rewrote the algorithm for breaking internal dependencies to my liking. The complex part handling multiple splits has moved from the pass code to the changeset class itself, reusing the state computed for the first split. The state is a bit more complex to allow for its incremental update after a break has been done. Factored major pieces into separate procedures to keep the highlevel code readable. Added lots of official log output to help debugging in case of trouble.
by
aku on
2007-11-10 23:44:29.
[view]
To:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[24c0b662de]
- Reworked the in-memory storage of changesets in pass 5 and supporting classes, and added loading of changesets from the persistent state for when the pass is skipped.
by
aku on
2007-11-13 05:09:07.
[view]
@@ -35,16 +35,18 @@
set myproject $project
set mytype $cstype
set mysrcid $srcid
set myrevisions $revisions
+
+ # Keep track of the generated changesets.
+ lappend mychangesets $self
return
}
method id {} { return $myid }
-
- method breakinternaldependencies {cv} {
- upvar 2 $cv csets ; # simple-dispatch!
-
+ method setid {id} { set myid $id ; return }
+
+ method breakinternaldependencies {} {
# This method inspects the changesets for internal
# dependencies. Nothing is done if there are no
# such. Otherwise the changeset is split into a set of
# fragments without internal dependencies, transforming the
@@ -166,9 +168,8 @@
trouble internal "Bad fragment border <$laste | $s>, gap or overlap"
}
set new [$type %AUTO% $myproject $mytype $mysrcid [lrange $myrevisions $s $e]]
- lappend csets $new
log write 4 csets "Breaking <$myid> @ $laste, new <[$new id]>, cutting $breaks($laste)"
set laste $e
@@ -466,8 +467,16 @@
upvar 1 $sv s $ev e
set s [lindex $range 0]
set e [lindex $range end]
return
+ }
+
+ # # ## ### ##### ######## #############
+
+ typevariable mychangesets {} ; # List of all known changesets.
+
+ typemethod all {} {
+ return $mychangesets
}
# # ## ### ##### ######## #############
## Configuration