diff mercurial/filemerge.py @ 15264:157d93c41c10

merge: expand environment variables and ~/ in tool.executable hgrc(5) already implies that this works, so we might as well support it. Another approach would be to implement this in util.findexe(): that would benefit other callers of findexe(), e.g. convert and anyone calling the user's editor. But findexe() is really implemented in both posix.py and windows.py, so this would make both of those modules depend on util.py: not good. So keep it narrow and only for merge tools.
author Greg Ward <greg@gerg.ca>
date Wed, 12 Oct 2011 21:45:58 -0400
parents e3be7dc9a5e1
children 2371f4aea665
line wrap: on
line diff
--- a/mercurial/filemerge.py	Sat Oct 15 00:39:06 2011 -0500
+++ b/mercurial/filemerge.py	Wed Oct 12 21:45:58 2011 -0400
@@ -34,7 +34,8 @@
             p = util.findexe(p + _toolstr(ui, tool, "regappend"))
             if p:
                 return p
-    return util.findexe(_toolstr(ui, tool, "executable", tool))
+    exe = _toolstr(ui, tool, "executable", tool)
+    return util.findexe(util.expandpath(exe))
 
 def _picktool(repo, ui, path, binary, symlink):
     def check(tool, pat, symlink, binary):