##// END OF EJS Templates
rebase: update commit hash references in the new commits...
Matt Harbison -
r46377:1703a7f9 default
parent child Browse files
Show More
@@ -515,6 +515,21 b' class rebaseruntime(object):'
515 515 ctx = repo[rev]
516 516 if commitmsg is None:
517 517 commitmsg = ctx.description()
518
519 # Skip replacement if collapsing, as that degenerates to p1 for all
520 # nodes.
521 if not self.collapsef:
522 cl = repo.changelog
523 commitmsg = rewriteutil.update_hash_refs(
524 repo,
525 commitmsg,
526 {
527 cl.node(oldrev): [cl.node(newrev)]
528 for oldrev, newrev in self.state.items()
529 if newrev != revtodo
530 },
531 )
532
518 533 date = self.date
519 534 if date is None:
520 535 date = ctx.date()
@@ -312,14 +312,14 b' Verify that copies get preserved (issue4'
312 312 $ hg commit --message "File b created as copy of a and modified"
313 313 $ hg copy b c
314 314 $ echo c > c
315 $ hg commit --message "File c created as copy of b and modified"
315 $ hg commit --message "File c created as copy of b and modified" ##
316 316 $ hg copy c d
317 317 $ echo d > d
318 $ hg commit --message "File d created as copy of c and modified"
318 $ hg commit --message "File d created as copy of c and modified (child of 327f772bc074)"
319 319
320 320 Note that there are four entries in the log for d
321 321 $ hg tglog --follow d
322 @ 3: 421b7e82bb85 'File d created as copy of c and modified'
322 @ 3: 6be224292cfa 'File d created as copy of c and modified (child of 327f772bc074)'
323 323 |
324 324 o 2: 327f772bc074 'File c created as copy of b and modified'
325 325 |
@@ -342,14 +342,14 b' Rebase the copies on top of the unrelate'
342 342 $ hg rebase --source 1 --dest 4
343 343 rebasing 1:79d255d24ad2 "File b created as copy of a and modified"
344 344 rebasing 2:327f772bc074 "File c created as copy of b and modified"
345 rebasing 3:421b7e82bb85 "File d created as copy of c and modified"
346 saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a2265555-rebase.hg
345 rebasing 3:6be224292cfa "File d created as copy of c and modified (child of 327f772bc074)"
346 saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a3e674e3-rebase.hg
347 347 $ hg update 4
348 348 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
349 349
350 350 There should still be four entries in the log for d
351 351 $ hg tglog --follow d
352 @ 4: dbb9ba033561 'File d created as copy of c and modified'
352 @ 4: afbdde3a60d5 'File d created as copy of c and modified (child of af74b229bc02)'
353 353 |
354 354 o 3: af74b229bc02 'File c created as copy of b and modified'
355 355 |
@@ -368,9 +368,9 b' copy records collapse correctly.'
368 368 rebasing 2:68bf06433839 "File b created as copy of a and modified"
369 369 rebasing 3:af74b229bc02 "File c created as copy of b and modified"
370 370 merging b and c to c
371 rebasing 4:dbb9ba033561 "File d created as copy of c and modified"
371 rebasing 4:afbdde3a60d5 "File d created as copy of c and modified (child of af74b229bc02)"
372 372 merging c and d to d
373 saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-rebase.hg
373 saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-29d5057f-rebase.hg
374 374 $ hg co tip
375 375 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
376 376
@@ -378,11 +378,24 b' This should show both revision 3 and 0 s'
378 378 copy of 'a'.
379 379
380 380 $ hg tglog --follow d
381 @ 3: 5a46b94210e5 'Collapsed revision
381 @ 3: 75708a266e56 'Collapsed revision
382 382 : * File b created as copy of a and modified
383 383 : * File c created as copy of b and modified
384 : * File d created as copy of c and modified'
384 : * File d created as copy of c and modified (child of af74b229bc02)'
385 385 o 0: b220cd6d2326 'File a created'
386 386
387 $ hg log -G -Tcompact
388 @ 3[tip] 75708a266e56 1970-01-01 00:00 +0000 test
389 | Collapsed revision
390 |
391 o 2 15258cf0cf10 1970-01-01 00:00 +0000 test
392 | unrelated commit is unrelated
393 |
394 o 1 1d689898494b 1970-01-01 00:00 +0000 test
395 | Unrelated file created
396 |
397 o 0 b220cd6d2326 1970-01-01 00:00 +0000 test
398 File a created
399
387 400
388 401 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now