# HG changeset patch # User Denis Laxalde # Date 1518001573 -3600 # Node ID a603a570cdbeb19ae958585599200b05ac419d0c # Parent 07cd54eae696bb85f4d50d674f8e32056708559b rebase: add a test case for issue5782 Issue 5782 reports that rebase incorrectly aborts when trying to rebase an extinct revision (an obsolete revision with only obsolete successor). We add a test to demonstrate this: the first "hg rebase" command aborts with the divergence warning while, when allowing divergence, the rebase completes and does not actually produce any divergence. diff -r 07cd54eae696 -r a603a570cdbe tests/test-rebase-obsolete.t --- a/tests/test-rebase-obsolete.t Fri Feb 09 13:18:17 2018 +0100 +++ b/tests/test-rebase-obsolete.t Wed Feb 07 12:06:13 2018 +0100 @@ -1218,6 +1218,50 @@ o 0:b173517d0057 a +issue5782 + $ hg strip -r 0: + $ hg debugdrawdag < d + > | + > c1 c # replace: c -> c1 + > \ / + > b + > | + > a + > EOF + 1 new orphan changesets + $ hg debugobsolete `hg log -T "{node}" --hidden -r 'desc("c1")'` + obsoleted 1 changesets + $ hg log -G -r 'a': --hidden + * 4:76be324c128b d + | + | x 3:ef8a456de8fa c1 (pruned) + | | + x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) + |/ + o 1:488e1b7e7341 b + | + o 0:b173517d0057 a + + $ hg rebase -d 0 -r 2 + abort: this rebase will cause divergences from: a82ac2b38757 + (to force the rebase please set experimental.evolution.allowdivergence=True) + [255] + $ hg rebase -d 0 -r 2 --config experimental.evolution.allowdivergence=True + rebasing 2:a82ac2b38757 "c" (c) + $ hg log -G -r 'a': --hidden + o 5:69ad416a4a26 c + | + | * 4:76be324c128b d + | | + | | x 3:ef8a456de8fa c1 (pruned) + | | | + | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) + | |/ + | o 1:488e1b7e7341 b + |/ + o 0:b173517d0057 a + $ cd .. Rebase merge where successor of one parent is equal to destination (issue5198)