[PATCH] filemerge: pass a default value to _toolstr

Yuya Nishihara yuya at tcha.org
Sat Oct 28 01:19:17 EDT 2017


On Thu, 26 Oct 2017 11:07:19 -0700, Kostia Balytskyi wrote:
> # HG changeset patch
> # User Kostia Balytskyi <ikostia at fb.com>
> # Date 1509041226 25200
> #      Thu Oct 26 11:07:06 2017 -0700
> # Branch stable
> # Node ID 81db944aae69a96175fd0d917834e67534a92735
> # Parent  9e9ff559440e4733fda49ddeb1b9ce5e7c9660af
> filemerge: pass a default value to _toolstr

(issue5718)

> After a refactoring, _toolstr stopped having default="" as one of it's args,
> therefore when called without a default it returns None and not "". This causes
> concatenation to fail.
> 
> diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
> --- a/mercurial/filemerge.py
> +++ b/mercurial/filemerge.py
> @@ -116,7 +116,7 @@ def findexternaltool(ui, tool):
>              continue
>          p = util.lookupreg(k, _toolstr(ui, tool, "regname"))
>          if p:
> -            p = util.findexe(p + _toolstr(ui, tool, "regappend"))
> +            p = util.findexe(p + _toolstr(ui, tool, "regappend", ""))

Perhaps this has to be added to the config table instead.


More information about the Mercurial-devel mailing list