Message8353

Author maxb
Recipients
Date 2009-01-08.21:06:13
Content
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.
History
Date User Action Args
2009-01-08 21:06:14maxbsetmessageid: <1231448774.6.0.43544057208.issue1459@selenic.com>
2009-01-08 21:06:14maxblinkissue1459 messages
2009-01-08 21:06:13maxbcreate