Mercurial > hg
comparison tests/test-rebase-obsolete.t @ 27012:5eac7ab59b95
rebase: don't rebase obsolete commits with no successor
This patch avoids unnecessary conflicts to resolve during rebase for the users
of changeset evolution.
This patch modifies rebase to skip obsolete commits with no successor.
It introduces a new rebase state 'revpruned' for these revisions that are
being skipped and a new message to inform the user of what is happening.
This feature is gated behind the config flag experimental.rebaseskipobsolete
When an obsolete commit is skipped, the output is:
note: not rebasing 7:360bbaa7d3ce "O", it has no successor
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 18 Nov 2015 13:44:29 -0800 |
parents | 53c668dc6b16 |
children | 804abe8999f3 |
comparison
equal
deleted
inserted
replaced
27011:53c668dc6b16 | 27012:5eac7ab59b95 |
---|---|
657 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg (glob) | 657 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg (glob) |
658 | 658 |
659 $ hg rebase -d 'desc(B2)' | 659 $ hg rebase -d 'desc(B2)' |
660 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" | 660 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" |
661 rebasing 5:1a79b7535141 "D" (tip) | 661 rebasing 5:1a79b7535141 "D" (tip) |
662 $ hg up 4 | |
663 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
664 $ echo "O" > O | |
665 $ hg add O | |
666 $ hg commit -m O | |
667 $ echo "P" > P | |
668 $ hg add P | |
669 $ hg commit -m P | |
670 $ hg log -G | |
671 @ 8:8d47583e023f P | |
672 | | |
673 o 7:360bbaa7d3ce O | |
674 | | |
675 | o 6:9c48361117de D | |
676 | | | |
677 o | 4:ff2c4d47b71d C | |
678 |/ | |
679 o 2:261e70097290 B2 | |
680 | | |
681 o 0:4a2df7238c3b A | |
682 | |
683 $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=all | |
684 $ hg rebase -d 6 -r "4::" | |
685 rebasing 4:ff2c4d47b71d "C" | |
686 note: not rebasing 7:360bbaa7d3ce "O", it has no successor | |
687 rebasing 8:8d47583e023f "P" (tip) |