tests/test-evolve.t
changeset 1398 7ddcbf5469bc
parent 1397 35f2f54b557c
child 1404 848a04c078c7
--- a/tests/test-evolve.t	Fri Jun 19 11:03:51 2015 -0700
+++ b/tests/test-evolve.t	Fri Jun 19 11:04:18 2015 -0700
@@ -1148,3 +1148,29 @@
   |/
   o  18:0bb66d4c1968@default(draft) a3
   |
+
+Check that fold respects the allowunstable option
+  $ hg up 0bb66d4c1968
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit unstableifparentisfolded
+  created new head
+  $ glog -r "18::"
+  @  30:30ecefd67c0a@default(draft) add unstableifparentisfolded
+  |
+  | o  29:5a6c53544778@default(draft) add c5_
+  | |
+  +---o  20:db3d894869b0@default(draft) add gh
+  | |
+  | o  19:10ffdd7e3cc9@default(draft) add gg
+  |/
+  o  18:0bb66d4c1968@default(draft) a3
+  |
+
+  $ hg fold --exact "19 + 18"
+  abort: cannot fold chain not ending with a head or with branching
+  [255]
+  $ hg fold --exact "18::29"
+  abort: cannot fold chain not ending with a head or with branching
+  [255]
+  $ hg fold --exact "19::"
+  2 changesets folded