Fossil SCM

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.

aku 2007-11-24 04:34 trunk
Commit 17ec2d682c85343bdc476c9362346c42494a1de5
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -230,10 +230,17 @@
230230
231231
incr at
232232
}
233233
234234
log write 6 csets ". . .. ... ..... ........ ............."
235
+
236
+ # (*) We clear out the associated part of the myrevmap
237
+ # in-memory index in preparation for new data. A simple unset
238
+ # is enough, we have no symbol changesets at this time, and
239
+ # thus never more than one reference in the list.
240
+
241
+ foreach r $myrevisions { unset myrevmap($r) }
235242
236243
# Create changesets for the fragments, reusing the current one
237244
# for the first fragment. We sort them in order to allow
238245
# checking for gaps and nice messages.
239246
@@ -263,12 +270,19 @@
263270
264271
if {$laste != ([llength $myrevisions]-1)} {
265272
trouble internal "Bad fragment end @ $laste, gap, or beyond end of the range"
266273
}
267274
268
- # Put the first fragment into the current changeset.
275
+ # Put the first fragment into the current changeset, and
276
+ # update the in-memory index. We can simply (re)add the
277
+ # revisions because we cleared the previously existing
278
+ # information, see (*) above. Persistence does not matter
279
+ # here, none of the changesets has been saved to the
280
+ # persistent state yet.
281
+
269282
set myrevisions [lrange $myrevisions 0 $firste]
283
+ foreach r $myrevisions { lappend myrevmap($r) $self }
270284
271285
return 1
272286
}
273287
274288
method persist {} {
275289
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -230,10 +230,17 @@
230
231 incr at
232 }
233
234 log write 6 csets ". . .. ... ..... ........ ............."
 
 
 
 
 
 
 
235
236 # Create changesets for the fragments, reusing the current one
237 # for the first fragment. We sort them in order to allow
238 # checking for gaps and nice messages.
239
@@ -263,12 +270,19 @@
263
264 if {$laste != ([llength $myrevisions]-1)} {
265 trouble internal "Bad fragment end @ $laste, gap, or beyond end of the range"
266 }
267
268 # Put the first fragment into the current changeset.
 
 
 
 
 
 
269 set myrevisions [lrange $myrevisions 0 $firste]
 
270
271 return 1
272 }
273
274 method persist {} {
275
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -230,10 +230,17 @@
230
231 incr at
232 }
233
234 log write 6 csets ". . .. ... ..... ........ ............."
235
236 # (*) We clear out the associated part of the myrevmap
237 # in-memory index in preparation for new data. A simple unset
238 # is enough, we have no symbol changesets at this time, and
239 # thus never more than one reference in the list.
240
241 foreach r $myrevisions { unset myrevmap($r) }
242
243 # Create changesets for the fragments, reusing the current one
244 # for the first fragment. We sort them in order to allow
245 # checking for gaps and nice messages.
246
@@ -263,12 +270,19 @@
270
271 if {$laste != ([llength $myrevisions]-1)} {
272 trouble internal "Bad fragment end @ $laste, gap, or beyond end of the range"
273 }
274
275 # Put the first fragment into the current changeset, and
276 # update the in-memory index. We can simply (re)add the
277 # revisions because we cleared the previously existing
278 # information, see (*) above. Persistence does not matter
279 # here, none of the changesets has been saved to the
280 # persistent state yet.
281
282 set myrevisions [lrange $myrevisions 0 $firste]
283 foreach r $myrevisions { lappend myrevmap($r) $self }
284
285 return 1
286 }
287
288 method persist {} {
289

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button