From patchwork Thu Oct 26 18:07:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: filemerge: pass a default value to _toolstr From: Kostia Balytskyi X-Patchwork-Id: 25287 Message-Id: <81db944aae69a96175fd.1509041239@devvm1416.lla2.facebook.com> To: Date: Thu, 26 Oct 2017 11:07:19 -0700 # HG changeset patch # User Kostia Balytskyi # 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 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", "")) if p: return p exe = _toolstr(ui, tool, "executable", tool)