[PATCH 2 of 2] filemerge: protect against missing regappend key in _findtool

Lee Cantey lcantey at gmail.com
Mon Feb 4 01:11:39 CST 2008


# HG changeset patch
# User Lee Cantey <lcantey at gmail.com>
# Date 1202108966 28800
# Node ID bbf99f428bedf315c2a035a6249ac2e45b37d83b
# Parent  ddd5b1a7984fce0a23062804d54454ddbed45bfa
filemerge: protect against missing regappend key in _findtool

diff -r ddd5b1a7984f -r bbf99f428bed mercurial/filemerge.py
--- a/mercurial/filemerge.py	Sun Feb 03 23:08:16 2008 -0800
+++ b/mercurial/filemerge.py	Sun Feb 03 23:09:26 2008 -0800
@@ -20,9 +20,11 @@
     if k:
         p = util.lookup_reg(k, _toolstr(ui, tool, "regname"))
         if p:
-            p = util.find_exe(p + _toolstr(ui, tool, "regappend"))
-            if p:
-                return p
+            e = _toolstr(ui, tool, "regappend")
+            if e:
+                p = util.find_exe(p + e)
+                if p:
+                    return p
     return util.find_exe(_toolstr(ui, tool, "executable", tool))
 
 def _picktool(repo, ui, path, binary, symlink):


More information about the Mercurial-devel mailing list