reorder tests in prepush
It's more useful to show the new branches message than the unsynced
changes message.
--- 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: