comparison 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
comparison
equal deleted inserted replaced
15263:70d7293c41d6 15264:157d93c41c10
32 p = util.lookupreg(k, _toolstr(ui, tool, "regname")) 32 p = util.lookupreg(k, _toolstr(ui, tool, "regname"))
33 if p: 33 if p:
34 p = util.findexe(p + _toolstr(ui, tool, "regappend")) 34 p = util.findexe(p + _toolstr(ui, tool, "regappend"))
35 if p: 35 if p:
36 return p 36 return p
37 return util.findexe(_toolstr(ui, tool, "executable", tool)) 37 exe = _toolstr(ui, tool, "executable", tool)
38 return util.findexe(util.expandpath(exe))
38 39
39 def _picktool(repo, ui, path, binary, symlink): 40 def _picktool(repo, ui, path, binary, symlink):
40 def check(tool, pat, symlink, binary): 41 def check(tool, pat, symlink, binary):
41 tmsg = tool 42 tmsg = tool
42 if pat: 43 if pat: