cmdutil: sort unresolved paths
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 09 Oct 2018 12:56:11 -0700
changeset 40101 57500950f40e
parent 40100 ca4a32d0a4d6
child 40102 f9c5f7b048b0
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
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Tue Oct 09 07:46:01 2018 +0900
+++ b/mercurial/cmdutil.py	Tue Oct 09 12:56:11 2018 -0700
@@ -581,7 +581,7 @@
     if unresolvedlist:
         mergeliststr = '\n'.join(
             ['    %s' % util.pathto(repo.root, encoding.getcwd(), path)
-             for path in unresolvedlist])
+             for path in sorted(unresolvedlist)])
         msg = _('''Unresolved merge conflicts:
 
 %s