copies: print list of divergent renames in sorted order
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 12 Apr 2019 09:41:08 -0700
changeset 42110 3a7efcbdf288
parent 42109 2a3c0106ded9
child 42111 f0fa0fc4900a
copies: print list of divergent renames in sorted order The current order is not obvious to the user (and I may change it in a later patch). Lexicographical order seems like the obvious choice here. Differential Revision: https://phab.mercurial-scm.org/D6227
mercurial/merge.py
tests/test-bundle-r.t
tests/test-graft.t
tests/test-issue1175.t
tests/test-rename-merge1.t
--- a/mercurial/merge.py	Fri Apr 12 12:20:38 2019 -0400
+++ b/mercurial/merge.py	Fri Apr 12 09:41:08 2019 -0700
@@ -2131,14 +2131,14 @@
         for f, fl in sorted(diverge.iteritems()):
             repo.ui.warn(_("note: possible conflict - %s was renamed "
                            "multiple times to:\n") % f)
-            for nf in fl:
+            for nf in sorted(fl):
                 repo.ui.warn(" %s\n" % nf)
 
         # rename and delete
         for f, fl in sorted(renamedelete.iteritems()):
             repo.ui.warn(_("note: possible conflict - %s was deleted "
                            "and renamed to:\n") % f)
-            for nf in fl:
+            for nf in sorted(fl):
                 repo.ui.warn(" %s\n" % nf)
 
         ### apply phase
--- a/tests/test-bundle-r.t	Fri Apr 12 12:20:38 2019 -0400
+++ b/tests/test-bundle-r.t	Fri Apr 12 09:41:08 2019 -0700
@@ -317,8 +317,8 @@
   $ cd ../test
   $ hg merge 7
   note: possible conflict - afile was renamed multiple times to:
+   adifferentfile
    anotherfile
-   adifferentfile
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg ci -m merge
--- a/tests/test-graft.t	Fri Apr 12 12:20:38 2019 -0400
+++ b/tests/test-graft.t	Fri Apr 12 09:41:08 2019 -0700
@@ -1059,8 +1059,8 @@
   $ HGEDITOR="echo D1 >" hg graft -r 'desc("D0")' --edit
   grafting 3:b69f5839d2d9 "D0"
   note: possible conflict - f3b was renamed multiple times to:
+   f3a
    f3d
-   f3a
   warning: can't find ancestor for 'f3d' copied from 'f3b'!
 
 Set up the repository for some further tests
@@ -1126,8 +1126,8 @@
   $ HGEDITOR="echo D2 >" hg graft -r 'desc("D0")' --edit
   grafting 3:b69f5839d2d9 "D0"
   note: possible conflict - f3b was renamed multiple times to:
+   f3d
    f3e
-   f3d
   merging f4e and f4a to f4e
   warning: can't find ancestor for 'f3d' copied from 'f3b'!
 
--- a/tests/test-issue1175.t	Fri Apr 12 12:20:38 2019 -0400
+++ b/tests/test-issue1175.t	Fri Apr 12 09:41:08 2019 -0700
@@ -14,8 +14,8 @@
   $ hg mv a a2
   $ hg up
   note: possible conflict - a was renamed multiple times to:
+   a1
    a2
-   a1
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
   $ hg ci -m2
--- a/tests/test-rename-merge1.t	Fri Apr 12 12:20:38 2019 -0400
+++ b/tests/test-rename-merge1.t	Fri Apr 12 09:41:08 2019 -0700
@@ -37,8 +37,8 @@
    branchmerge: True, force: False, partial: False
    ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c
   note: possible conflict - a2 was renamed multiple times to:
+   b2
    c2
-   b2
    preserving a for resolve of b
   removing a
    b2: remote created -> g