changeset 14874:d7b424a03627

commit: suppress spurious new head message for duplicate commit (issue2893)
author Matt Mackall <mpm@selenic.com>
date Wed, 13 Jul 2011 16:43:18 -0500
parents f79d47813b8b
children 3e9a5c3e24d8
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jul 13 16:58:51 2011 -0500
+++ b/mercurial/commands.py	Wed Jul 13 16:43:18 2011 -0500
@@ -1105,8 +1105,8 @@
     ctx = repo[node]
     parents = ctx.parents()
 
-    if bheads and not [x for x in parents
-                       if x.node() in bheads and x.branch() == branch]:
+    if (bheads and node not in bheads and not
+        [x for x in parents if x.node() in bheads and x.branch() == branch]):
         ui.status(_('created new head\n'))
         # The message is not printed for initial roots. For the other
         # changesets, it is printed in the following situations: