tests/test-fix-topology.t
changeset 45808 15a98880cc07
parent 45713 04de8a1ec08f
child 45809 136a86327316
--- a/tests/test-fix-topology.t	Fri Oct 16 15:05:43 2020 -0700
+++ b/tests/test-fix-topology.t	Fri Oct 16 11:15:00 2020 -0700
@@ -22,6 +22,7 @@
   > [extensions]
   > fix =
   > strip =
+  > debugdrawdag=$TESTDIR/drawdag.py
   > [fix]
   > uppercase-whole-file:command="$PYTHON" $UPPERCASEPY
   > uppercase-whole-file:pattern=set:**
@@ -366,6 +367,40 @@
   XXXX
 
   $ cd ..
+
+  $ hg init exclude-obsolete
+  $ cd exclude-obsolete
+  $ hg debugdrawdag <<'EOS'
+  > E C # prune: C
+  > | |
+  > D B # prune: B, D
+  > |/
+  > A
+  > EOS
+  1 new orphan changesets
+  $ hg log --graph --template '{rev} {desc}\n'
+  *  4 E
+  |
+  | x  3 C
+  | |
+  x |  2 D
+  | |
+  | x  1 B
+  |/
+  o  0 A
+  
+  $ hg fix -s A
+  abort: fixing obsolete revision could cause divergence
+  [255]
+  $ hg fix -s B
+  abort: fixing obsolete revision could cause divergence
+  [255]
+  $ hg fix -s D
+  abort: fixing obsolete revision could cause divergence
+  [255]
+  $ hg fix -s E
+  $ cd ..
+
 #endif
 
 The --all flag should fix anything that wouldn't cause a problem if you fixed