# HG changeset patch # User Mads Kiilerich # Date 1358215152 -3600 # Node ID 06f07583601055654d4235ad71fa7f3cb5e5e827 # Parent 760c0d67ce5e33f303c3cb2b4437369c408b5fa0 discovery: process heads in sorted order diff -r 760c0d67ce5e -r 06f075836010 mercurial/discovery.py --- a/mercurial/discovery.py Tue Jan 15 02:59:12 2013 +0100 +++ b/mercurial/discovery.py Tue Jan 15 02:59:12 2013 +0100 @@ -268,7 +268,7 @@ allmissing = set(outgoing.missing) allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common)) allfuturecommon.update(allmissing) - for branch, heads in headssum.iteritems(): + for branch, heads in sorted(headssum.iteritems()): if heads[0] is None: # Maybe we should abort if we push more that one head # for new branches ? @@ -312,7 +312,7 @@ unsynced = True if len(newhs) > len(oldhs): # strip updates to existing remote heads from the new heads list - dhs = list(newhs - bookmarkedheads - oldhs) + dhs = sorted(newhs - bookmarkedheads - oldhs) if dhs: if error is None: if branch not in ('default', None): diff -r 760c0d67ce5e -r 06f075836010 tests/test-push-warn.t --- a/tests/test-push-warn.t Tue Jan 15 02:59:12 2013 +0100 +++ b/tests/test-push-warn.t Tue Jan 15 02:59:12 2013 +0100 @@ -457,7 +457,7 @@ $ hg push ../l -b b pushing to ../l searching for changes - abort: push creates new remote head e7e31d71180f on branch 'a'! + abort: push creates new remote head 451211cc22b0 on branch 'a'! (did you forget to merge? use push -f to force) [255]