# HG changeset patch # User Martin Geisler # Date 2010-06-22 10:38:39 # Node ID d420ff348c492a490d9fe55518877d4aec7d9060 # Parent 45aabc523c86f577a7efb5cf5ccb99725044994d discovery: use stable sort order in --new-branch warning A Python set seems to do this already when you iterate over it, but this should be considered an implementation detail and not something we can rely on. This also gets rid of an unnecessary string conversion -- the set already contains strings. diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -280,7 +280,7 @@ def prepush(repo, remote, force, revs, n remotemap = remote.branchmap() newbranches = branches - set(remotemap) if newbranches and not newbranch: # new branch requires --new-branch - branchnames = ', '.join("%s" % b for b in newbranches) + branchnames = ', '.join(sorted(newbranches)) repo.ui.warn(_("abort: push creates " "new remote branches: %s!\n") % branchnames)