# HG changeset patch # User Matt Mackall # Date 1163975556 21600 # Node ID 20912eb2667de45415eff601bfc045ae0fe8db42 # Parent 05d877dfd33d12bf3cf74cc36f85645c75ad063f reorder tests in prepush It's more useful to show the new branches message than the unsynced changes message. diff -r 05d877dfd33d -r 20912eb2667d mercurial/localrepo.py --- a/mercurial/localrepo.py Sun Nov 19 17:01:59 2006 -0200 +++ b/mercurial/localrepo.py Sun Nov 19 16:32:36 2006 -0600 @@ -1298,11 +1298,6 @@ base = {} remote_heads = remote.heads() inc = self.findincoming(remote, base, remote_heads, force=force) - if not force and inc: - self.ui.warn(_("abort: unsynced remote changes!\n")) - self.ui.status(_("(did you forget to sync?" - " use push -f to force)\n")) - return None, 1 update, updated_heads = self.findoutgoing(remote, base, remote_heads) if revs is not None: @@ -1323,6 +1318,12 @@ " use push -f to force)\n")) return None, 1 + if not force and inc: + self.ui.warn(_("abort: unsynced remote changes!\n")) + self.ui.status(_("(did you forget to sync?" + " use push -f to force)\n")) + return None, 1 + if revs is None: cg = self.changegroup(update, 'push') else: