mercurial/discovery.py
changeset 20403 47f25736d006
parent 20398 2bc520bd0ce0
child 20501 8a9e0b523d2d
--- a/mercurial/discovery.py	Sun Feb 09 17:30:49 2014 -0600
+++ b/mercurial/discovery.py	Sun Feb 09 17:31:26 2014 -0600
@@ -268,6 +268,7 @@
     # If there are more heads after the push than before, a suitable
     # error message, depending on unsynced status, is displayed.
     error = None
+    unsynced = False
     allmissing = set(outgoing.missing)
     allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common))
     allfuturecommon.update(allmissing)
@@ -311,15 +312,8 @@
                         newhs.add(nh)
         else:
             newhs = candidate_newhs
-        unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
-        if unsynced:
-            heads = ' '.join(short(h) for h in unsynced)
-            if branch is None:
-                repo.ui.warn(_("remote has heads that are not known locally: "
-                               "%s\n") % heads)
-            else:
-                repo.ui.warn(_("remote has heads on branch '%s' that are "
-                               "not known locally: %s\n") % (branch, heads))
+        if [h for h in unsyncedheads if h not in discardedheads]:
+            unsynced = True
         if remoteheads is None:
             if len(newhs) > 1:
                 dhs = list(newhs)
@@ -356,3 +350,7 @@
                 repo.ui.note((" %s\n") % short(h))
     if error:
         raise util.Abort(error, hint=hint)
+
+    # 6. Check for unsynced changes on involved branches.
+    if unsynced:
+        repo.ui.warn(_("note: unsynced remote changes!\n"))