changeset 49644:5744ceeb9067

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 20 Nov 2022 23:09:12 -0500
parents e1c586b9a43c
children 2a70d1fc70c4
files mercurial/configitems.py mercurial/filemerge.py
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Mon Nov 21 15:04:42 2022 -0500
+++ b/mercurial/configitems.py	Sun Nov 20 23:09:12 2022 -0500
@@ -1786,6 +1786,13 @@
 )
 coreconfigitem(
     b'merge-tools',
+    br'.*\.regappend$',
+    default=b"",
+    generic=True,
+    priority=-1,
+)
+coreconfigitem(
+    b'merge-tools',
     br'.*\.symlink$',
     default=False,
     generic=True,
--- a/mercurial/filemerge.py	Mon Nov 21 15:04:42 2022 -0500
+++ b/mercurial/filemerge.py	Sun Nov 20 23:09:12 2022 -0500
@@ -158,7 +158,7 @@
             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)