[PATCH 2 of 2] internal merge tool not working for merge-pattern in hgrc: fix

Matt Mackall mpm at selenic.com
Thu Apr 3 18:49:29 CDT 2008


On Fri, 2008-04-04 at 02:41 +0300, Dov Feldstern wrote:
> # HG changeset patch
> # User Dov Feldstern <dfeldstern at fastimap.com>
> # Date 1207264913 -10800
> # Node ID 448f5b405498937b7554fd0989dbbe8875227089
> # Parent  00dc8ed8af76d7490b48daffddd8c2657d7a93ca
> use internal merge tool when specified for a merge-pattern in hgrc
> 
> It is possible to specify in the hgrc file that one of the internal merge
> tools (internal:fail, internal:local or internal:other) be used for
> performing merges on files matching a given pattern. However, this setting
> is not being acted upon (the merge tool is not found). This patch fixes that.
> 
> diff -r 00dc8ed8af76 -r 448f5b405498 mercurial/filemerge.py
> --- a/mercurial/filemerge.py    Fri Apr 04 02:20:58 2008 +0300
> +++ b/mercurial/filemerge.py    Fri Apr 04 02:21:53 2008 +0300
> @@ -16,6 +16,8 @@
>       return ui.configbool("merge-tools", tool + "." + part, default)
> 
>   def _findtool(ui, tool):
> +    if tool in ("internal:fail", "internal:local", "internal:other"):
> +        return tool

Your indenting is inconsistent here.

How about 'if tool.startswith("internal:")'? Other than that, this is a
perfectly good fix.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list