Mercurial > hg
changeset 7397:4c92d8971809
More verbose logging when filemerge searches for merge-tool
Previously it was very hard to find out what was going on when the expected
merge tool wasn't used. This patch tries to improve that.
hg merge -v now shows which tools were searched for but not found.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 07 Nov 2008 02:47:12 +0100 |
parents | 526c40a74bd0 |
children | 2cd1308cb588 |
files | mercurial/filemerge.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filemerge.py Fri Nov 21 15:51:40 2008 -0800 +++ b/mercurial/filemerge.py Fri Nov 07 02:47:12 2008 +0100 @@ -32,8 +32,11 @@ tmsg = tool if pat: tmsg += " specified for " + pat - if pat and not _findtool(ui, tool): # skip search if not matching - ui.warn(_("couldn't find merge tool %s\n") % tmsg) + if not _findtool(ui, tool): + if pat: # explicitly requested tool deserves a warning + ui.warn(_("couldn't find merge tool %s\n") % tmsg) + else: # configured but non-existing tools are more silent + ui.note(_("couldn't find merge tool %s\n") % tmsg) elif symlink and not _toolbool(ui, tool, "symlink"): ui.warn(_("tool %s can't handle symlinks\n") % tmsg) elif binary and not _toolbool(ui, tool, "binary"): @@ -71,8 +74,8 @@ tools.insert(0, (None, uimerge)) # highest priority tools.append((None, "hgmerge")) # the old default, if found for p,t in tools: - toolpath = _findtool(ui, t) - if toolpath and check(t, None, symlink, binary): + if check(t, None, symlink, binary): + toolpath = _findtool(ui, t) return (t, '"' + toolpath + '"') # internal merge as last resort return (not (symlink or binary) and "internal:merge" or None, None)