Show More
@@ -515,6 +515,21 b' class rebaseruntime(object):' | |||||
515 | ctx = repo[rev] |
|
515 | ctx = repo[rev] | |
516 | if commitmsg is None: |
|
516 | if commitmsg is None: | |
517 | commitmsg = ctx.description() |
|
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 | date = self.date |
|
533 | date = self.date | |
519 | if date is None: |
|
534 | if date is None: | |
520 | date = ctx.date() |
|
535 | date = ctx.date() |
@@ -312,14 +312,14 b' Verify that copies get preserved (issue4' | |||||
312 | $ hg commit --message "File b created as copy of a and modified" |
|
312 | $ hg commit --message "File b created as copy of a and modified" | |
313 | $ hg copy b c |
|
313 | $ hg copy b c | |
314 | $ echo c > c |
|
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 | $ hg copy c d |
|
316 | $ hg copy c d | |
317 | $ echo d > d |
|
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 | Note that there are four entries in the log for d |
|
320 | Note that there are four entries in the log for d | |
321 | $ hg tglog --follow d |
|
321 | $ hg tglog --follow d | |
322 |
@ 3: |
|
322 | @ 3: 6be224292cfa 'File d created as copy of c and modified (child of 327f772bc074)' | |
323 | | |
|
323 | | | |
324 | o 2: 327f772bc074 'File c created as copy of b and modified' |
|
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 | $ hg rebase --source 1 --dest 4 |
|
342 | $ hg rebase --source 1 --dest 4 | |
343 | rebasing 1:79d255d24ad2 "File b created as copy of a and modified" |
|
343 | rebasing 1:79d255d24ad2 "File b created as copy of a and modified" | |
344 | rebasing 2:327f772bc074 "File c created as copy of b and modified" |
|
344 | rebasing 2:327f772bc074 "File c created as copy of b and modified" | |
345 |
rebasing 3: |
|
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-a |
|
346 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a3e674e3-rebase.hg | |
347 | $ hg update 4 |
|
347 | $ hg update 4 | |
348 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
348 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
349 |
|
349 | |||
350 | There should still be four entries in the log for d |
|
350 | There should still be four entries in the log for d | |
351 | $ hg tglog --follow d |
|
351 | $ hg tglog --follow d | |
352 |
@ 4: |
|
352 | @ 4: afbdde3a60d5 'File d created as copy of c and modified (child of af74b229bc02)' | |
353 | | |
|
353 | | | |
354 | o 3: af74b229bc02 'File c created as copy of b and modified' |
|
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 | rebasing 2:68bf06433839 "File b created as copy of a and modified" |
|
368 | rebasing 2:68bf06433839 "File b created as copy of a and modified" | |
369 | rebasing 3:af74b229bc02 "File c created as copy of b and modified" |
|
369 | rebasing 3:af74b229bc02 "File c created as copy of b and modified" | |
370 | merging b and c to c |
|
370 | merging b and c to c | |
371 |
rebasing 4: |
|
371 | rebasing 4:afbdde3a60d5 "File d created as copy of c and modified (child of af74b229bc02)" | |
372 | merging c and d to d |
|
372 | merging c and d to d | |
373 |
saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839- |
|
373 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-29d5057f-rebase.hg | |
374 | $ hg co tip |
|
374 | $ hg co tip | |
375 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
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 | copy of 'a'. |
|
378 | copy of 'a'. | |
379 |
|
379 | |||
380 | $ hg tglog --follow d |
|
380 | $ hg tglog --follow d | |
381 |
@ 3: 5 |
|
381 | @ 3: 75708a266e56 'Collapsed revision | |
382 | : * File b created as copy of a and modified |
|
382 | : * File b created as copy of a and modified | |
383 | : * File c created as copy of b and modified |
|
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 | o 0: b220cd6d2326 'File a created' |
|
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 | $ cd .. |
|
401 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now