[PATCH 3 of 4] hgmerge: remove obsoleted code, update docs

Matt Mackall mpm at selenic.com
Mon Jan 7 18:53:10 CST 2008


On Mon, 2008-01-07 at 15:20 -0600, Steve Borho wrote:
> +  Example ~/.hgrc:
> +
> +    [hgmerge]
> +    default = kdiff3
> +    ext.html = myHtmlPlugin
> +    ext.lib = takemine

Extension-based is a little limited. The decode/encode filters can take
patterns. It's a bit odd to have a [merge] and an hgmerge section, if
we're making this core functionality.

> +
> +  There are two special plug-ins intended for file extension use:
> +  'takemine' and 'takeother' (with predictable behaviors).

Hmmm, 'mine' should be 'local' here to be consistent.

> +hgmerge-plugins::
> +  The user can override and extend the stock merge plug-ins by adding
> +  entries to this section.
> +
> +  Example ~/.hgrc:
> +
> +    [hgmerge-plugins]
> +    # Override stock plug-in location
> +    kdiff3.executable = ~/bin/kdiff3

> +    # Define new plug-in
> +    myHtmlPlugin.arguments = -m $local $other $base $output
> +    myHtmlPlugin.priority = 1
> +    myHtmlPlugin.win.regpath_installpath = Software\FooSoftware\HtmlMerge

The 'plug-in' terminology isn't great as it makes it sound much more
substantial than it really is (typically two lines of config). It'd be
even better if we could get it down to one line in the typical end-user
case, ie:

mymerge = supermerge -vkm $local $other $base -o $output

(I just made that tool up, don't bother looking it up)

So this might want to be [merge-tools] or [merge-helpers] or maybe we
even want to combine it with the existing [merge] section too. Then
someone can just write:

[merge]
default = mymerge
mymerge = supermerge -vkm $local $other $base -o $output

If we can get that down to:

[merge]
default = supermerge -vkm $local $other $base -o $output

..then we know we can't do any better. I'm not saying this is precisely
how it should be done, just that we should give some serious thought to
absolutely minimizing the amount of work the average person will need to
do to customize their setup. One line is ideal.

> +
> +  executable;;
> +    Either just the name of the executable or its pathname.
> +    Default: the plug-in name.
> +  arguments;;
> +    The arguments to pass to the tool.
> +    Default: $base $local $other $output
> +  priority;;
> +    The priority in which to evaluate this plug-in.  Default: 0

You haven't defined what priorities mean.

> +  stdout;;
> +    Should the tool's standard output be used as the merge result.
> +    Default: False
> +  check_conflicts;;
> +    Check whether there are conflicts even though the tool reported
> +    none. Default: False
> +  win.regpath_installdir;;
> +    Specify a pathname in the Windows registry defining the tool's installation
> +    directory. The format of this option is like this: <key name>\<value name>.
> +    If the (default) key itself actually holds the value, end the pathname with
> +    a backslash, so it's clear there is no value name component. 
> +  win.regpath_installpath;;
> +    Like the former, except that the registry value is taken to specify the
> +    installation path of the tool's executable.

These last two are really confusing.

Also, please delete the old crap in a separate patch.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list