Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2008-02-12 16:09:36
Size: 796
Editor: abuehl
Comment: new page
Revision 3 as of 2008-03-25 13:57:00
Size: 2103
Editor: abuehl
Comment: copied from mpm's mailing list posting
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
In February 2008, [:mpm:Matt Mackall] contributed a new [:Merge:merge] tool configuration feature into the Mercurial main source code repository. In February 2008, [:mpm:Matt Mackall] contributed a new [:Merge:merge] tool configuration feature. This feature is available in version 1.0.
Line 3: Line 3:
== Details ==
To describe a new merge tool, do something like the following in [:.hgrc]:

{{{
 [merge-tools]
 mymergetool.args=$local $other $base -o $output
}}}

If you've got no other merge tools defined, Mercurial will run
"mymergetool" with the appropriate arguments. Further tool options
include:

{{{
 <tool>.args - the arguments to pass (defaults to $local $base $other)
 <tool>.executable - executable name or path (defaults to <tool>)
 <tool>.binary - supports binary files (False)
 <tool>.symlinks - supports symlinks (False)
 <tool>.gui - requires a GUI (False)
 <tool>.priority - priority of this tool (0)

..etc.
}}}

If you have multiple tools defined, Mercurial looks for the highest
priority one that will work, falling back to the old hgmerge for
backwards compatibility.

If that's not found, we'll use our internal simplemerge code, which is a
tool named 'internal:merge'. There are also three other internal tools:
local, other, and fail.

To bypass the priority scheme and set the default tool directly, simply
set [ui]merge as always.

Merge tool settings suitable for a global configuration file (and
roughly equivalent to the ugly old hgmerge script) can be found in
contrib/mergetools.hgrc. People building binary packages will want to
use this.

To complete the picture, we also now support choosing a merge tool based
on file pattern, like so:

{{{
[merge-patterns]
**.jpg = myimgmerge
**.exe = internal:fail
}}}

=== References ===
Line 6: Line 55:
Note that &mdash; as of February 12, 2008 &mdash; this is an upcoming feature, not yet contained in the current 0.9.5 release of Mercurial. This feature is expected for release 1.0.

See also: [:WhatsNew], [:MergeProgram], [:.hgrc]
=== See also ===
 * [:MergeProgram]

In February 2008, [:mpm:Matt Mackall] contributed a new [:Merge:merge] tool configuration feature. This feature is available in version 1.0.

Details

To describe a new merge tool, do something like the following in [:.hgrc]:

 [merge-tools]
 mymergetool.args=$local $other $base -o $output

If you've got no other merge tools defined, Mercurial will run "mymergetool" with the appropriate arguments. Further tool options include:

 <tool>.args - the arguments to pass (defaults to $local $base $other)
 <tool>.executable - executable name or path (defaults to <tool>)
 <tool>.binary - supports binary files (False)
 <tool>.symlinks - supports symlinks (False)
 <tool>.gui - requires a GUI (False)
 <tool>.priority - priority of this tool (0)

..etc.

If you have multiple tools defined, Mercurial looks for the highest priority one that will work, falling back to the old hgmerge for backwards compatibility.

If that's not found, we'll use our internal simplemerge code, which is a tool named 'internal:merge'. There are also three other internal tools: local, other, and fail.

To bypass the priority scheme and set the default tool directly, simply set [ui]merge as always.

Merge tool settings suitable for a global configuration file (and roughly equivalent to the ugly old hgmerge script) can be found in contrib/mergetools.hgrc. People building binary packages will want to use this.

To complete the picture, we also now support choosing a merge tool based on file pattern, like so:

[merge-patterns]
**.jpg = myimgmerge
**.exe = internal:fail

1. References

2. See also

MergeToolConfiguration (last edited 2019-08-07 17:58:24 by GregTatum)