Differences between revisions 4 and 5
Revision 4 as of 2008-03-25 14:00:57
Size: 2123
Editor: abuehl
Comment:
Revision 5 as of 2008-06-02 15:07:43
Size: 2345
Editor: abuehl
Comment: notes / selecting internal merge with conflict markers in TortoiseHg
Deletions are marked like this. Additions are marked like this.
Line 57: Line 57:

=== Notes ===

==== Choosing internal merge with conflict markers ====
To have the internal merge with the conflict markers for example in [:TortoiseHg] set
{{{
[ui]
merge = internal:merge
}}}
in Mercurial.ini.

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

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

See also

Notes

1. Choosing internal merge with conflict markers

To have the internal merge with the conflict markers for example in [:TortoiseHg] set

[ui]
merge = internal:merge

in Mercurial.ini.

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