# HG changeset patch # User Matt Harbison # Date 2022-11-21 04:09:12 # Node ID 5744ceeb9067ac5f35f25d655105584e6ff9af10 # Parent e1c586b9a43c07d0a45e4928ee4191d8587d574d configitems: add a default value for "merge-tools.xxx.regappend" When trying to figure out how `hg help -v` took the Set interpolation path in f09bc2ed9100, I turned on devel warnings and noticed this (unrelated) warning: devel-warn: specifying a mismatched default value for a registered config item: 'merge-tools.beyondcompare4.regappend' '' at: c:\Users\Matt\hg\mercurial\filemerge.py:46 (_toolstr) The previous default value for this config was `None`, but that slightly complicates the code at the only site it is used, referenced above. diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -1786,6 +1786,13 @@ coreconfigitem( ) coreconfigitem( b'merge-tools', + br'.*\.regappend$', + default=b"", + generic=True, + priority=-1, +) +coreconfigitem( + b'merge-tools', br'.*\.symlink$', default=False, generic=True, diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -158,7 +158,7 @@ def findexternaltool(ui, tool): continue p = util.lookupreg(k, _toolstr(ui, tool, b"regname")) if p: - p = procutil.findexe(p + _toolstr(ui, tool, b"regappend", b"")) + p = procutil.findexe(p + _toolstr(ui, tool, b"regappend")) if p: return p exe = _toolstr(ui, tool, b"executable", tool)