changeset 12757:62c8f7691bc3

merge: make 'diverging renames' diagnostic a more helpful note. See the Hg Book on why we actually want to detect this case: http://hgbook.red-bean.com/read/mercurial-in-daily-use.html#id364290 Before: $ hg up deadbeef warning: detected divergent renames of X to: ... After: $ hg up deadbeef note: possible conflict - X was renamed multiple times to: ... No functionality change.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 10 Oct 2010 09:50:25 -0500
parents 13f0acfa974a
children 2d754eae430c
files mercurial/merge.py tests/test-bundle-r.t tests/test-issue1175.t tests/test-rename-merge1.t tests/test-rename-merge2.t
diffstat 5 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Oct 18 14:37:52 2010 +0200
+++ b/mercurial/merge.py	Sun Oct 10 09:50:25 2010 -0500
@@ -355,7 +355,8 @@
             updated += 1
         elif m == "dr": # divergent renames
             fl = a[2]
-            repo.ui.warn(_("warning: detected divergent renames of %s to:\n") % f)
+            repo.ui.warn(_("note: possible conflict - %s was renamed "
+                           "multiple times to:\n") % f)
             for nf in fl:
                 repo.ui.warn(" %s\n" % nf)
         elif m == "e": # exec
--- a/tests/test-bundle-r.t	Mon Oct 18 14:37:52 2010 +0200
+++ b/tests/test-bundle-r.t	Sun Oct 10 09:50:25 2010 -0500
@@ -340,7 +340,7 @@
 
   $ cd ../test
   $ hg merge 7
-  warning: detected divergent renames of afile to:
+  note: possible conflict - afile was renamed multiple times to:
    anotherfile
    adifferentfile
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-issue1175.t	Mon Oct 18 14:37:52 2010 +0200
+++ b/tests/test-issue1175.t	Sun Oct 10 09:50:25 2010 -0500
@@ -13,7 +13,7 @@
 
   $ hg mv a a2
   $ hg up
-  warning: detected divergent renames of a to:
+  note: possible conflict - a was renamed multiple times to:
    a2
    a1
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-rename-merge1.t	Mon Oct 18 14:37:52 2010 +0200
+++ b/tests/test-rename-merge1.t	Sun Oct 10 09:50:25 2010 -0500
@@ -47,7 +47,7 @@
   my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
    premerge successful
   updating: a2 2/3 files (66.67%)
-  warning: detected divergent renames of a2 to:
+  note: possible conflict - a2 was renamed multiple times to:
    c2
    b2
   updating: b2 3/3 files (100.00%)
@@ -95,7 +95,7 @@
   $ hg up c761c6948de0
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   $ hg up
-  warning: detected divergent renames of b to:
+  note: possible conflict - b was renamed multiple times to:
    b3
    b4
   2 files updated, 0 files merged, 1 files removed, 0 files unresolved
--- a/tests/test-rename-merge2.t	Mon Oct 18 14:37:52 2010 +0200
+++ b/tests/test-rename-merge2.t	Sun Oct 10 09:50:25 2010 -0500
@@ -383,7 +383,7 @@
    c: remote created -> g
   preserving rev for resolve of rev
   updating: a 1/3 files (33.33%)
-  warning: detected divergent renames of a to:
+  note: possible conflict - a was renamed multiple times to:
    b
    c
   updating: c 2/3 files (66.67%)