mercurial/discovery.py
changeset 14524 97d2259af787
parent 14213 30273f0c776b
child 14525 826a13720fbc
--- a/mercurial/discovery.py	Fri Jun 03 20:32:54 2011 +0200
+++ b/mercurial/discovery.py	Fri Jun 03 11:26:43 2011 +0200
@@ -160,19 +160,15 @@
             oldhs = set(oldmap[branch])
             if len(newhs) > len(oldhs):
                 if error is None:
-                    if branch:
-                        error = _("push creates new remote heads "
-                                  "on branch '%s'!") % branch
-                    else:
-                        error = _("push creates new remote heads!")
+                    error = _("push creates new remote heads "
+                              "on branch '%s'!") % branch
                     if branch in unsynced:
                         hint = _("you should pull and merge or "
                                  "use push -f to force")
                     else:
                         hint = _("did you forget to merge? "
                                  "use push -f to force")
-                if branch:
-                    repo.ui.debug("new remote heads on branch '%s'\n" % branch)
+                repo.ui.debug("new remote heads on branch '%s'\n" % branch)
                 for h in (newhs - oldhs):
                     repo.ui.debug("new remote head %s\n" % short(h))
         if error: