tests: merging bookmarked heads stable
authorJohn Li <jli@circularly.org>
Mon, 27 Aug 2012 09:57:58 -0400
branchstable
changeset 17394 19e4861f9730
parent 17392 bdd248666dbc
child 17395 e82fad58df1e
child 17405 b0aad9fb87f9
tests: merging bookmarked heads 45b5eb2941d0 fixed an error that occured when heads being merged were both inactive bookmarks. Add a test for that case.
tests/test-bookmarks-merge.t
--- a/tests/test-bookmarks-merge.t	Mon Aug 06 12:59:47 2012 +0200
+++ b/tests/test-bookmarks-merge.t	Mon Aug 27 09:57:58 2012 -0400
@@ -91,3 +91,38 @@
      b                         1:d2ae7f538514
      c                         3:b8f96cf4688b
    * e                         7:ca784329f0ba
+
+# test warning when all heads are inactive bookmarks
+
+  $ hg up -C 6
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo g > g
+  $ hg commit -Am 'g'
+  adding g
+  $ hg bookmark -i g
+  $ hg bookmarks
+     b                         1:d2ae7f538514
+     c                         3:b8f96cf4688b
+     e                         7:ca784329f0ba
+     g                         8:04dd21731d95
+  $ hg heads
+  changeset:   8:04dd21731d95
+  bookmark:    g
+  tag:         tip
+  parent:      6:be381d1126a0
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     g
+  
+  changeset:   7:ca784329f0ba
+  bookmark:    e
+  parent:      5:26bee9c5bcf3
+  parent:      4:a0546fcfe0fb
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     merge
+  
+  $ hg merge
+  abort: heads are bookmarked - please merge with an explicit rev
+  (run 'hg heads' to see all heads)
+  [255]