filemerge: introduce :x as short version of internal:x merge tool name
authorMads Kiilerich <madski@unity3d.com>
Sun, 28 Sep 2014 17:15:25 +0200
changeset 22706 ad25986c4cd3
parent 22705 d4869b280cd6
child 22707 38e0363dcbe0
filemerge: introduce :x as short version of internal:x merge tool name "internal:" is so much typing - it is frequently specified on the command line and gives options that are longer than any other I have seen.
mercurial/filemerge.py
tests/test-merge-tools.t
--- a/mercurial/filemerge.py	Thu Oct 02 23:26:02 2014 +0900
+++ b/mercurial/filemerge.py	Sun Sep 28 17:15:25 2014 +0200
@@ -28,6 +28,7 @@
         fullname = 'internal:' + name
         func.__doc__ = "``%s``\n" % fullname + func.__doc__.strip()
         internals[fullname] = func
+        internals[':' + name] = func
         func.trymerge = trymerge
         func.onfailure = onfailure
         return func
--- a/tests/test-merge-tools.t	Thu Oct 02 23:26:02 2014 +0900
+++ b/tests/test-merge-tools.t	Sun Sep 28 17:15:25 2014 +0200
@@ -425,7 +425,7 @@
   # hg stat
   M f
 
-ui.merge specifies internal:local:
+ui.merge specifies :local (without internal prefix):
 
   $ beforemerge
   [merge-tools]
@@ -433,7 +433,7 @@
   true.priority=1
   true.executable=cat
   # hg update -C 1
-  $ hg merge -r 2 --config ui.merge=internal:local
+  $ hg merge -r 2 --config ui.merge=:local
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ aftermerge