changeset 26517:d8463a743d7d

filemerge: normalize 'internal:foo' names to ':foo' In upcoming patches we're going to present these names in the UI -- it would be good not to present deprecated names.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 07 Oct 2015 00:01:16 -0700
parents eb9876aa8770
children a77679d0b887
files mercurial/filemerge.py tests/test-backout.t tests/test-copy-move-merge.t tests/test-double-merge.t tests/test-graft.t tests/test-issue672.t tests/test-merge-commit.t tests/test-merge-criss-cross.t tests/test-merge-types.t tests/test-merge7.t tests/test-rename-merge1.t tests/test-subrepo.t
diffstat 12 files changed, 20 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Tue Oct 06 22:57:21 2015 -0700
+++ b/mercurial/filemerge.py	Wed Oct 07 00:01:16 2015 -0700
@@ -465,6 +465,9 @@
         binary = fcd.isbinary() or fco.isbinary() or fca.isbinary()
         symlink = 'l' in fcd.flags() + fco.flags()
         tool, toolpath = _picktool(repo, ui, fd, binary, symlink)
+        if tool in internals and tool.startswith('internal:'):
+            # normalize to new-style names (':merge' etc)
+            tool = tool[len('internal'):]
         ui.debug("picked tool '%s' for %s (binary %s symlink %s)\n" %
                    (tool, fd, binary, symlink))
 
--- a/tests/test-backout.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-backout.t	Wed Oct 07 00:01:16 2015 -0700
@@ -620,7 +620,7 @@
   update: (current)
   phases: 3 draft
   $ hg resolve --all --debug
-  picked tool 'internal:merge' for foo (binary False symlink False)
+  picked tool ':merge' for foo (binary False symlink False)
   merging foo
   my foo@b71750c4b0fd+ other foo@a30dd8addae3 ancestor foo@913609522437
    premerge successful
--- a/tests/test-copy-move-merge.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-copy-move-merge.t	Wed Oct 07 00:01:16 2015 -0700
@@ -35,12 +35,12 @@
    preserving a for resolve of c
   removing a
    b: remote moved from a -> m
-  picked tool 'internal:merge' for b (binary False symlink False)
+  picked tool ':merge' for b (binary False symlink False)
   merging a and b to b
   my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc
    premerge successful
    c: remote moved from a -> m
-  picked tool 'internal:merge' for c (binary False symlink False)
+  picked tool ':merge' for c (binary False symlink False)
   merging a and c to c
   my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc
    premerge successful
--- a/tests/test-double-merge.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-double-merge.t	Wed Oct 07 00:01:16 2015 -0700
@@ -38,12 +38,12 @@
    preserving foo for resolve of bar
    preserving foo for resolve of foo
    bar: remote copied from foo -> m
-  picked tool 'internal:merge' for bar (binary False symlink False)
+  picked tool ':merge' for bar (binary False symlink False)
   merging foo and bar to bar
   my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc
    premerge successful
    foo: versions differ -> m
-  picked tool 'internal:merge' for foo (binary False symlink False)
+  picked tool ':merge' for foo (binary False symlink False)
   merging foo
   my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc
    premerge successful
--- a/tests/test-graft.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-graft.t	Wed Oct 07 00:01:16 2015 -0700
@@ -154,7 +154,7 @@
    ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6
    preserving b for resolve of b
    b: local copied/moved from a -> m
-  picked tool 'internal:merge' for b (binary False symlink False)
+  picked tool ':merge' for b (binary False symlink False)
   merging b and a to b
   my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622
    premerge successful
@@ -184,7 +184,7 @@
   getting d
    b: remote unchanged -> k
    e: versions differ -> m
-  picked tool 'internal:merge' for e (binary False symlink False)
+  picked tool ':merge' for e (binary False symlink False)
   merging e
   my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622
   warning: conflicts during merge.
--- a/tests/test-issue672.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-issue672.t	Wed Oct 07 00:01:16 2015 -0700
@@ -66,7 +66,7 @@
    ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96
    preserving 1a for resolve of 1a
    1a: local copied/moved from 1 -> m
-  picked tool 'internal:merge' for 1a (binary False symlink False)
+  picked tool ':merge' for 1a (binary False symlink False)
   merging 1a and 1 to 1a
   my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d
    premerge successful
@@ -89,7 +89,7 @@
    preserving 1 for resolve of 1a
   removing 1
    1a: remote moved from 1 -> m
-  picked tool 'internal:merge' for 1a (binary False symlink False)
+  picked tool ':merge' for 1a (binary False symlink False)
   merging 1 and 1a to 1a
   my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d
    premerge successful
--- a/tests/test-merge-commit.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-merge-commit.t	Wed Oct 07 00:01:16 2015 -0700
@@ -73,7 +73,7 @@
    ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28
    preserving bar for resolve of bar
    bar: versions differ -> m
-  picked tool 'internal:merge' for bar (binary False symlink False)
+  picked tool ':merge' for bar (binary False symlink False)
   merging bar
   my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9
    premerge successful
@@ -159,7 +159,7 @@
    ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0
    preserving bar for resolve of bar
    bar: versions differ -> m
-  picked tool 'internal:merge' for bar (binary False symlink False)
+  picked tool ':merge' for bar (binary False symlink False)
   merging bar
   my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9
    premerge successful
--- a/tests/test-merge-criss-cross.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-merge-criss-cross.t	Wed Oct 07 00:01:16 2015 -0700
@@ -83,7 +83,7 @@
    f1: remote is newer -> g
   getting f1
    f2: versions differ -> m
-  picked tool 'internal:dump' for f2 (binary False symlink False)
+  picked tool ':dump' for f2 (binary False symlink False)
   merging f2
   my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
--- a/tests/test-merge-types.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-merge-types.t	Wed Oct 07 00:01:16 2015 -0700
@@ -36,7 +36,7 @@
    ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c
    preserving a for resolve of a
    a: versions differ -> m
-  picked tool 'internal:merge' for a (binary False symlink True)
+  picked tool ':merge' for a (binary False symlink True)
   merging a
   my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da
   warning: internal :merge cannot merge symlinks for a
@@ -69,7 +69,7 @@
    ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f
    preserving a for resolve of a
    a: versions differ -> m
-  picked tool 'internal:merge' for a (binary False symlink True)
+  picked tool ':merge' for a (binary False symlink True)
   merging a
   my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da
   warning: internal :merge cannot merge symlinks for a
--- a/tests/test-merge7.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-merge7.t	Wed Oct 07 00:01:16 2015 -0700
@@ -86,7 +86,7 @@
    ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8
    preserving test.txt for resolve of test.txt
    test.txt: versions differ -> m
-  picked tool 'internal:merge' for test.txt (binary False symlink False)
+  picked tool ':merge' for test.txt (binary False symlink False)
   merging test.txt
   my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118
   warning: conflicts during merge.
--- a/tests/test-rename-merge1.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-rename-merge1.t	Wed Oct 07 00:01:16 2015 -0700
@@ -41,7 +41,7 @@
    b2: remote created -> g
   getting b2
    b: remote moved from a -> m
-  picked tool 'internal:merge' for b (binary False symlink False)
+  picked tool ':merge' for b (binary False symlink False)
   merging a and b to b
   my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
    premerge successful
--- a/tests/test-subrepo.t	Tue Oct 06 22:57:21 2015 -0700
+++ b/tests/test-subrepo.t	Wed Oct 07 00:01:16 2015 -0700
@@ -297,7 +297,7 @@
    ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
    preserving t for resolve of t
    t: versions differ -> m
-  picked tool 'internal:merge' for t (binary False symlink False)
+  picked tool ':merge' for t (binary False symlink False)
   merging t
   my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
   warning: conflicts during merge.