[PATCH] merge: handle case when heads are all bookmarks
John Li
jli at janestreet.com
Mon Aug 27 13:51:21 CDT 2012
On Mon, Aug 27, 2012 at 01:01:00PM -0500, Kevin Bullock wrote:
> Looks good in principle, but for some reason I get whitespace weirdness on the output:
Sorry, my fault. An emacs save-hook "fixed" the trailing whitespace for
the 2 blank lines in the "hg heads" output. Try this:
# HG changeset patch
# User John Li <jli at circularly.org>
# Date 1346075878 14400
# Node ID a3e550fee75251841da36cdbb27959c47f169eeb
# Parent 99a2a4ae35e2180b7f825ef2677c36d538eac4ba
tests: merging bookmarked heads
45b5eb2941d0 fixed an error that occured when heads being merged were both
inactive bookmarks. Add a test for that case.
diff --git a/tests/test-bookmarks-merge.t b/tests/test-bookmarks-merge.t
--- a/tests/test-bookmarks-merge.t
+++ b/tests/test-bookmarks-merge.t
@@ -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]
More information about the Mercurial-devel
mailing list