changeset 17394:19e4861f9730 stable

tests: merging bookmarked heads 45b5eb2941d0 fixed an error that occured when heads being merged were both inactive bookmarks. Add a test for that case.
author John Li <jli@circularly.org>
date Mon, 27 Aug 2012 09:57:58 -0400
parents bdd248666dbc
children e82fad58df1e b0aad9fb87f9
files tests/test-bookmarks-merge.t
diffstat 1 files changed, 35 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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]