# HG changeset patch # User Matt Mackall # Date 1391988686 21600 # Node ID 47f25736d006358ed1beb101dfbd88c426a5017e # Parent a8c0f7b80e00c0d055dd7005b45a0602e0da6a91 push: backout 2bc520bd0ce0 due to test failures diff -r a8c0f7b80e00 -r 47f25736d006 mercurial/discovery.py --- 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")) diff -r a8c0f7b80e00 -r 47f25736d006 tests/test-ssh.t --- a/tests/test-ssh.t Sun Feb 09 17:30:49 2014 -0600 +++ b/tests/test-ssh.t Sun Feb 09 17:31:26 2014 -0600 @@ -223,7 +223,7 @@ $ hg push pushing to ssh://user@dummy/remote searching for changes - remote has heads on branch 'default' that are not known locally: 6c0482d977a3 + note: unsynced remote changes! remote: adding changesets remote: adding manifests remote: adding file changes