[PATCH 1 of 3] filemerge: split the logic for finding an external tool to its own function

Matt Harbison matt_harbison at yahoo.com
Sun Nov 2 20:58:21 UTC 2014


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1414958330 18000
#      Sun Nov 02 14:58:50 2014 -0500
# Branch stable
# Node ID f72827d6b96cb953432fff89a0bd3b13a142e826
# Parent  cc1cbb0bba8ed1d95c8f1b8e27d4d2893e0dcca7
filemerge: split the logic for finding an external tool to its own function

This will be used by extdiff in an subsequent patch.

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -37,6 +37,9 @@
 def _findtool(ui, tool):
     if tool in internals:
         return tool
+    return findexternaltool(ui, tool)
+
+def findexternaltool(ui, tool):
     for kn in ("regkey", "regkeyalt"):
         k = _toolstr(ui, tool, kn)
         if not k:



More information about the Mercurial-devel mailing list