# HG changeset patch # User Mads Kiilerich # Date 1226022432 -3600 # Node ID 4c92d897180908ad547006f94c265c72d28c9fb1 # Parent 526c40a74bd0a97330458a1754d88371ce176060 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. diff -r 526c40a74bd0 -r 4c92d8971809 mercurial/filemerge.py --- 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)