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
--- a/tests/test-rebase-obsolete.t Mon Aug 27 10:44:43 2018 -0700
+++ b/tests/test-rebase-obsolete.t Wed Jul 11 12:26:44 2018 -0700
@@ -1511,6 +1511,28 @@
$ 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 <<EOF
+ > 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