Mercurial > hg-stable
changeset 11429:d420ff348c49 stable
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.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 22 Jun 2010 12:38:39 +0200 |
parents | 45aabc523c86 |
children | 6bee25d51a7d |
files | mercurial/discovery.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/discovery.py Mon Jun 21 13:41:11 2010 -0500 +++ b/mercurial/discovery.py Tue Jun 22 12:38:39 2010 +0200 @@ -280,7 +280,7 @@ 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)