diff tests/test-stabilize-order.t @ 1420:0b714c4ad9ff

evolve: consider all potential candidates on bare evolve Instead of stopping at the first resolution, we returns all matches. If there is ambiguity, we abort. The function itself seems fairly flawed but will do the job in simple case.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 22 Jun 2015 19:24:21 -0700
parents 2c451fece7a6
children b86eea66ed02
line wrap: on
line diff
--- a/tests/test-stabilize-order.t	Tue Jun 23 13:20:00 2015 -0700
+++ b/tests/test-stabilize-order.t	Mon Jun 22 19:24:21 2015 -0700
@@ -182,3 +182,66 @@
   $ hg evolve --any -v
   no unstable changesets to evolve
   [1]
+
+Ambiguous evolution
+  $ echo a > k
+  $ hg add k
+  $ hg ci -m firstambiguous
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo a > l
+  $ hg add l
+  $ hg ci -m secondambiguous
+  created new head
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg commit --amend -m "newmessage"
+  2 new unstable changesets
+  $ hg log -G
+  @  changeset:   15:49773ccde390
+  |  tag:         tip
+  |  parent:      11:036cf654e942
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     newmessage
+  |
+  | o  changeset:   14:a9892777b519
+  | |  parent:      12:e99ecf51c867
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  summary:     secondambiguous
+  | |
+  | | o  changeset:   13:0b6e26b2472d
+  | |/   user:        test
+  | |    date:        Thu Jan 01 00:00:00 1970 +0000
+  | |    summary:     firstambiguous
+  | |
+  | x  changeset:   12:e99ecf51c867
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    summary:     addc
+  |
+  o  changeset:   11:036cf654e942
+  |  parent:      7:005fe5914f78
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     addb
+  |
+  o  changeset:   7:005fe5914f78
+  |  parent:      0:c471ef929e6a
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     adda
+  |
+  o  changeset:   0:c471ef929e6a
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     addroot
+  
+  $ hg evolve
+  abort: multiple evolve candidates
+  (select one of *, * with --rev) (glob)
+  [255]
+
+
+