configitems: register the 'pager.attend-.*' options
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 02:26:09 +0200
changeset 34669 03f7db5f8e71
parent 34668 31723cff35fa
child 34670 ec45d7a6d799
configitems: register the 'pager.attend-.*' options
hgext/pager.py
mercurial/configitems.py
--- a/hgext/pager.py	Fri Oct 13 16:39:06 2017 +0200
+++ b/hgext/pager.py	Wed Oct 11 02:26:09 2017 +0200
@@ -56,8 +56,8 @@
 
             for cmd in cmds:
                 var = 'attend-%s' % cmd
-                if ui.config('pager', var):
-                    usepager = ui.configbool('pager', var)
+                if ui.config('pager', var, None):
+                    usepager = ui.configbool('pager', var, True)
                     break
                 if (cmd in attend or
                      (cmd not in ignore and not attend)):
--- a/mercurial/configitems.py	Fri Oct 13 16:39:06 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 02:26:09 2017 +0200
@@ -498,6 +498,10 @@
 coreconfigitem('merge', 'preferancestor',
         default=lambda: ['*'],
 )
+coreconfigitem('pager', 'attend-.*',
+    default=dynamicdefault,
+    generic=True,
+)
 coreconfigitem('pager', 'ignore',
     default=list,
 )