diff tests/test-evolve.t @ 1364:f00d91365ab9

evolve: make uncommit respect allowunsable Before this patch, the uncommit command was performing the same way regardless of the value of experimental.evolution. With this patch if the configuration does not allow unstability, uncommit won't create instability.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 20 May 2015 12:46:13 -0700
parents 82dd98428b8d
children 0799c5831a3d
line wrap: on
line diff
--- a/tests/test-evolve.t	Sat Jun 13 11:14:07 2015 -0700
+++ b/tests/test-evolve.t	Wed May 20 12:46:13 2015 -0700
@@ -1248,3 +1248,57 @@
   o  25:4c0bc042ef3b@default(draft) add j1
   |
 
+Check that uncommit respects the allowunstable option
+With only createmarkers we can only uncommit on a head
+  $ hg up 456e647fbe11
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat >> $HGRCPATH <<EOF
+  > [experimental]
+  > evolution=createmarkers, allnewcommands
+  > EOF
+  $ glog -r "25::"
+  @  52:456e647fbe11@default(draft) add c4_
+  |
+  o  51:07aaa06da467@default(draft) add c3_
+  |
+  | o  50:e543e9e71376@default(draft) add b4_
+  | |
+  o |  49:9379d7237601@default(draft) add c2prime
+  | |
+  | o  48:2b5cbe59aeca@default(draft) add b3prime
+  | |
+  | o  47:aa4f5bf8925e@default(draft) add b1prime
+  | |
+  o |  42:4a34f6744d4b@default(draft) add c1second
+  |/
+  o  25:4c0bc042ef3b@default(draft) add j1
+  |
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg uncommit --all
+  abort: cannot uncommit in the middle of a stack
+  [255]
+  $ hg up 456e647fbe11
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg uncommit --all
+  new changeset is empty
+  (use "hg prune ." to remove it)
+  $ hg up e543e9e71376 -C
+  3 files updated, 0 files merged, 3 files removed, 0 files unresolved
+  $ glog -r "25::"
+  o  53:897e7966b9ef@default(draft) add c4_
+  |
+  o  51:07aaa06da467@default(draft) add c3_
+  |
+  | @  50:e543e9e71376@default(draft) add b4_
+  | |
+  o |  49:9379d7237601@default(draft) add c2prime
+  | |
+  | o  48:2b5cbe59aeca@default(draft) add b3prime
+  | |
+  | o  47:aa4f5bf8925e@default(draft) add b1prime
+  | |
+  o |  42:4a34f6744d4b@default(draft) add c1second
+  |/
+  o  25:4c0bc042ef3b@default(draft) add j1
+  |