Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 40102:57500950f40e
cmdutil: sort unresolved paths
I noticed that `hg status` was printing unresolved paths in a
non-deterministic order. This patch fixes that.
I'm not sure if the sorting should be done in
merge.mergestate.unresolved() instead. Either way fixes the
presentation issue.
Differential Revision: https://phab.mercurial-scm.org/D4929
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 09 Oct 2018 12:56:11 -0700 |
parents | 1d09ba0d2ed3 |
children | fa88170c10bb |
comparison
equal
deleted
inserted
replaced
40101:ca4a32d0a4d6 | 40102:57500950f40e |
---|---|
579 m = scmutil.match(repo[None]) | 579 m = scmutil.match(repo[None]) |
580 unresolvedlist = [f for f in mergestate.unresolved() if m(f)] | 580 unresolvedlist = [f for f in mergestate.unresolved() if m(f)] |
581 if unresolvedlist: | 581 if unresolvedlist: |
582 mergeliststr = '\n'.join( | 582 mergeliststr = '\n'.join( |
583 [' %s' % util.pathto(repo.root, encoding.getcwd(), path) | 583 [' %s' % util.pathto(repo.root, encoding.getcwd(), path) |
584 for path in unresolvedlist]) | 584 for path in sorted(unresolvedlist)]) |
585 msg = _('''Unresolved merge conflicts: | 585 msg = _('''Unresolved merge conflicts: |
586 | 586 |
587 %s | 587 %s |
588 | 588 |
589 To mark files as resolved: hg resolve --mark FILE''') % mergeliststr | 589 To mark files as resolved: hg resolve --mark FILE''') % mergeliststr |