Patchwork D6227: copies: print list of divergent renames in sorted order

login
register
mail settings
Submitter phabricator
Date April 12, 2019, 4:45 p.m.
Message ID <differential-rev-PHID-DREV-3c2qp5biu2tfnfh64mrk-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39570/
State Superseded
Headers show

Comments

phabricator - April 12, 2019, 4:45 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6227

AFFECTED FILES
  mercurial/merge.py
  tests/test-bundle-r.t
  tests/test-graft.t
  tests/test-issue1175.t
  tests/test-rename-merge1.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-rename-merge1.t b/tests/test-rename-merge1.t
--- a/tests/test-rename-merge1.t
+++ b/tests/test-rename-merge1.t
@@ -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
diff --git a/tests/test-issue1175.t b/tests/test-issue1175.t
--- a/tests/test-issue1175.t
+++ b/tests/test-issue1175.t
@@ -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
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -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'!
 
diff --git a/tests/test-bundle-r.t b/tests/test-bundle-r.t
--- a/tests/test-bundle-r.t
+++ b/tests/test-bundle-r.t
@@ -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
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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