changeset 11181:6e65b451b62e

commit: fix complaint about branch merge creating new heads (issue2186)
author Matt Mackall <mpm@selenic.com>
date Sat, 15 May 2010 21:24:23 -0500
parents 4b02fc71bbba
children b25464e9b448
files mercurial/commands.py tests/test-backout.out tests/test-branch-option.out tests/test-command-template.out tests/test-fetch.out tests/test-issue619.out tests/test-mq-safety.out tests/test-newbranch.out tests/test-push-warn.out tests/test-subrepo.out
diffstat 10 files changed, 2 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat May 15 00:34:07 2010 +0300
+++ b/mercurial/commands.py	Sat May 15 21:24:23 2010 -0500
@@ -766,7 +766,8 @@
     ctx = repo[node]
     parents = ctx.parents()
 
-    if bheads and [x for x in parents if x.node() not in bheads]:
+    if bheads and [x for x in parents
+                   if x.node() not in bheads and x.branch() == branch]:
         ui.status(_('created new head\n'))
 
     if not opts.get('close_branch'):
--- a/tests/test-backout.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-backout.out	Sat May 15 21:24:23 2010 -0500
@@ -73,7 +73,6 @@
 marked working directory as branch branch2
 adding file2
 removing file1
-created new head
 changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3
 the backout changeset is a new head - do not forget to merge
 (use "backout --merge" if you want to auto-merge)
--- a/tests/test-branch-option.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-branch-option.out	Sat May 15 21:24:23 2010 -0500
@@ -13,7 +13,6 @@
 marked working directory as branch b
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 marked working directory as branch b
-created new head
 in rev c branch a
 1:dd6e60a716c6
 2:f25d57ab0566
--- a/tests/test-command-template.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-command-template.out	Sat May 15 21:24:23 2010 -0500
@@ -1,4 +1,3 @@
-created new head
 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
 created new head
 # default style is like normal output
--- a/tests/test-fetch.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-fetch.out	Sat May 15 21:24:23 2010 -0500
@@ -155,7 +155,6 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 created new head
@@ -183,7 +182,6 @@
 adding b
 marked working directory as branch default
 adding c
-created new head
 updating to branch default
 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % fetch should succeed
--- a/tests/test-issue619.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-issue619.out	Sat May 15 21:24:23 2010 -0500
@@ -5,7 +5,6 @@
 fast-forward
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 bogus fast-forward should fail
 abort: can't merge with ancestor
 done
--- a/tests/test-mq-safety.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-mq-safety.out	Sat May 15 21:24:23 2010 -0500
@@ -21,7 +21,6 @@
 adding c
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 changeset:   2:65309210bf4e
 branch:      b
--- a/tests/test-newbranch.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-newbranch.out	Sat May 15 21:24:23 2010 -0500
@@ -4,7 +4,6 @@
 % branch shadowing
 abort: a branch of the same name already exists (use 'hg update' to switch to it)
 marked working directory as branch default
-created new head
 % there should be only one default branch head
 changeset:   3:bf1bc2f45e83
 tag:         tip
@@ -17,7 +16,6 @@
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
 foo
-created new head
 changeset:   5:5f8fb06e083e
 branch:      foo
 tag:         tip
@@ -113,7 +111,6 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
 foo
-created new head
 changeset:   6:f0c74f92a385
 branch:      foo
 tag:         tip
--- a/tests/test-push-warn.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-push-warn.out	Sat May 15 21:24:23 2010 -0500
@@ -169,7 +169,6 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 pushing to j
 searching for changes
 abort: push creates new remote branches: b!
@@ -266,10 +265,8 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 marked working directory as branch B
-created new head
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 marked working directory as branch A
-created new head
 %% glog of local
 @  5: A b3
 |
--- a/tests/test-subrepo.out	Sat May 15 00:34:07 2010 +0300
+++ b/tests/test-subrepo.out	Sat May 15 21:24:23 2010 -0500
@@ -226,13 +226,11 @@
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 adding c
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 adding .hgsub
 committing subrepository s
@@ -245,7 +243,6 @@
 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-created new head
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 adding d