use internal merge tool when specified for a merge-pattern in hgrc
authorDov Feldstern <dfeldstern@fastimap.com>
Fri, 04 Apr 2008 02:21:53 +0300
changeset 6522 2b181fb3a70a
parent 6521 a3668330f14a
child 6533 65f1b97484be
child 6534 9b35a9f34675
use internal merge tool when specified for a merge-pattern in hgrc It is possible to specify in the hgrc file that one of the internal merge tools (internal:fail, internal:local or internal:other) be used for performing merges on files matching a given pattern. However, this setting is not being acted upon (the merge tool is not found). This patch fixes that.
mercurial/filemerge.py
--- a/mercurial/filemerge.py	Fri Apr 04 02:20:58 2008 +0300
+++ b/mercurial/filemerge.py	Fri Apr 04 02:21:53 2008 +0300
@@ -16,6 +16,8 @@
     return ui.configbool("merge-tools", tool + "." + part, default)
 
 def _findtool(ui, tool):
+    if tool in ("internal:fail", "internal:local", "internal:other"):
+        return tool
     k = _toolstr(ui, tool, "regkey")
     if k:
         p = util.lookup_reg(k, _toolstr(ui, tool, "regname"))