[PATCH 2 of 3] mergetools.hgrc: disable vimdiff as a valid proposal for default mergetools

Mads Kiilerich mads at kiilerich.com
Thu Aug 2 08:25:44 CDT 2012


On 02/08/12 14:21, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1343908321 -7200
> # Branch stable
> # Node ID 68604f26c8b5962dd6bfc3099f6fa3e428fbc91d
> # Parent  192441ab174c489bd7bbc61d8bd0e4658f79aeaf
> mergetools.hgrc: disable vimdiff as a valid proposal for default mergetools.
>
> Vimdiff is currently prefered to the default merge tool is no graphical tool are
> available. Use is a very bad idea for multiple reasons:
>
> - People which don't know vim will have an hard time to even understand what
>    happen.
>
> - Most vimer don't use vimdiff themself.
>
> We keep the entry here to ease the use of vimdiff as a mergetool. We just don't
> want it enabled by default.

This will still leave vimdiff enabled and with higher priority than the 
internal:merge default.

I think you are right that there are some merge tools that safely can be 
used if they are found. Other merge tools should only be used if the 
user explicitly requested them ... but it is very handy that we ship 
configuration for these tools by default.

(kdiff3 is on the top of one of the lists - there are different opinions 
on which of the lists that is).

Users on bare systems also deserve a helpful error message instead of 
being given the result of internal:merge. Changing the merge tool search 
algorithm is probably not an option, but changing mergetools.hgrc might be.

How about introducing internal:abort and something like this in 
mergetools.hgrc:

internal:abort.priority = -1
internal:abort.message =
   No suitable merge tool has been found.
   Please make sure a merge tool of your choice is installed and 
configured in Mercurial with a positive priority.
   See 'hg help merge-tools' and 'hg showconfig --debug merge-tools'.

> 48e549d7c6ae

???

> diff --git a/contrib/mergetools.hgrc b/contrib/mergetools.hgrc
> --- a/contrib/mergetools.hgrc
> +++ b/contrib/mergetools.hgrc
> @@ -15,11 +15,11 @@ gvimdiff.regkeyalt=Software\Wow6432Node\
>   gvimdiff.regname=path
>   gvimdiff.priority=-9
>   
>   vimdiff.args=$local $other $base
>   vimdiff.check=changed
> -vimdiff.priority=-10
> +vimdiff.priority=-1000
>   
>   merge.checkconflicts=True
>   merge.priority=-100
>   
>   gpyfm.gui=True
>



More information about the Mercurial-devel mailing list