[issue1459] [merge-tools] autodetection suppressed when <tool>.executable is a full path

Max Bowsher mercurial-bugs at selenic.com
Thu Jan 8 15:06:14 CST 2009


New submission from Max Bowsher <maxb at f2s.com>:

When mergetools are configured with a bare (no directory path) executable,
mercurial will detect whether they exist, and automatically skip ones which do not.

However, if the mergetool is defined with a path - e.g.
"filemerge.executable=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge"
in contrib/mergetools.hgrc - then mercurial will try to use that tool regardless
of whether it exists or not.

This behaviour is a bit inconsistent, and restricts the use-cases of:
 * A distribution installing contrib/mergetools.hgrc to make as make merge tools
as possible work without further effort once installed.
 * A user sharing their personal .hgrc between multiple machines, with different
software installed.

The code in question is:
mercurial.filemerge._findtool uses mercurial.util.find_exe to process the
<tool>.executable configuration of the [merge-tools] section when deciding which
tool to use.

find_exe has the undesirable (in this case) behaviour of responding differently
to basenames vs. full paths.

----------
messages: 8353
nosy: maxb
priority: bug
status: unread
title: [merge-tools] autodetection suppressed when <tool>.executable is a full path

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1459>
____________________________________________________



More information about the Mercurial-devel mailing list