tests/test-rebase-obsolete.t
branchstable
changeset 38183 69d1cafe75f2
parent 37787 92213f6745ed
child 38239 ead71b15efd5
--- a/tests/test-rebase-obsolete.t	Sat Jun 02 13:44:44 2018 -0400
+++ b/tests/test-rebase-obsolete.t	Tue Jun 05 23:49:54 2018 -0400
@@ -1493,6 +1493,38 @@
   
   $ cd ..
 
+  $ hg init p2-succ-in-dest-c
+  $ cd p2-succ-in-dest-c
+
+The scenario here was that B::D were developed on default.  B was queued on
+stable, but amended before being push to hg-committed.  C was queued on default,
+along with unrelated J.
+
+  $ hg debugdrawdag <<EOF
+  > J
+  > |
+  > F
+  > |
+  > E
+  > | D
+  > | |
+  > | C      # replace: C -> F
+  > | |  H I # replace: B -> H -> I
+  > | B  |/
+  > |/   G
+  > A
+  > EOF
+  1 new orphan changesets
+
+This strip seems to be the key to avoid an early divergence warning.
+  $ hg --config extensions.strip= --hidden strip -qr H
+  1 new orphan changesets
+
+  $ hg rebase -b 'desc("D")' -d 'desc("J")'
+  abort: this rebase will cause divergences from: 112478962961
+  (to force the rebase please set experimental.evolution.allowdivergence=True)
+  [255]
+
 Rebase merge where both parents have successors in destination
 
   $ hg init p12-succ-in-dest