Check-in [17ec2d682c]
Not logged in
Overview

SHA1 Hash:17ec2d682c85343bdc476c9362346c42494a1de5
Date: 2007-11-24 04:34:26
User: aku
Comment:Bugfix in changeset class. Forgot to update the map from revisions to containing changesets when breaking the internal dependencies of the initial changesets. This affected only the first fragment as all the revisions put into separate fragments where still pointing to the original changeset. This lead to bogus links at the level of changesets, the changeset was seemingly still referencing itself.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_prev.tcl from [d3b49cf4d5] to [137095386a].

@@ -231,10 +231,17 @@
 	    incr at
 	}
 
 	log write 6 csets ". . .. ... ..... ........ ............."
 
+	# (*) We clear out the associated part of the myrevmap
+	# in-memory index in preparation for new data. A simple unset
+	# is enough, we have no symbol changesets at this time, and
+	# thus never more than one reference in the list.
+
+	foreach r $myrevisions { unset myrevmap($r) }
+
 	# 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 fragments [lsort -index 0 -integer $fragments]
@@ -263,12 +270,19 @@
 
 	if {$laste != ([llength $myrevisions]-1)} {
 	    trouble internal "Bad fragment end @ $laste, gap, or beyond end of the range"
 	}
 
-	# Put the first fragment into the current changeset.
+	# Put the first fragment into the current changeset, and
+	# update the in-memory index. We can simply (re)add the
+	# revisions because we cleared the previously existing
+	# information, see (*) above. Persistence does not matter
+	# here, none of the changesets has been saved to the
+	# persistent state yet.
+
 	set myrevisions [lrange $myrevisions 0 $firste]
+	foreach r $myrevisions { lappend myrevmap($r) $self }
 
 	return 1
     }
 
     method persist {} {