# HG changeset patch # User Martin von Zweigbergk # Date 2018-07-11 19:26:44 # Node ID a3af500a1362ff061f1f5ef2e4814478b8b6738a # Parent 63aa928be559a7abba072e47479d8f0f4d5695f8 tests: add test showing that rebase of extinct commit with successor fails As the test case shows, attempting to rebase a commit that has a successor that is not in the rebase set and not in the destination currently fails because it "will cause divergences". However, it doesn't seem like there's any harm in skipping the extinct commit. I suspect this case missed simply because extinct revisions are usually hidden. Differential Revision: https://phab.mercurial-scm.org/D4407 diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t --- a/tests/test-rebase-obsolete.t +++ b/tests/test-rebase-obsolete.t @@ -1511,6 +1511,28 @@ Rebase merge where successor of other pa $ cd .. +Rebase merge where extinct node has successor that is not an ancestor of +destination + + $ hg init extinct-with-succ-not-in-dest + $ cd extinct-with-succ-not-in-dest + + $ hg debugdrawdag < E C # replace: C -> E + > | | + > D B + > |/ + > A + > EOF + +TODO: There doesn't seem to be much reason to fail this rebase. Make it pass? + $ hg rebase -d D -s B + abort: this rebase will cause divergences from: 26805aba1e60 + (to force the rebase please set experimental.evolution.allowdivergence=True) + [255] + + $ cd .. + $ hg init p2-succ-in-dest-c $ cd p2-succ-in-dest-c