Patchwork [09,of,11] configitems: register the 'pager.attend-.*' options

login
register
mail settings
Submitter Boris Feld
Date Oct. 13, 2017, 5:55 p.m.
Message ID <9f8f4614d1366eaeea13.1507917315@FB>
Download mbox | patch
Permalink /patch/24846/
State Accepted
Headers show

Comments

Boris Feld - Oct. 13, 2017, 5:55 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1507681569 -7200
#      Wed Oct 11 02:26:09 2017 +0200
# Node ID 9f8f4614d1366eaeea1366f9563a9db3a0811a9d
# Parent  6ad9f6f42f33fe5efb78f76d39c41f28333144d6
# EXP-Topic config.register.ready
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9f8f4614d136
configitems: register the 'pager.attend-.*' options

Patch

diff --git a/hgext/pager.py b/hgext/pager.py
--- a/hgext/pager.py
+++ b/hgext/pager.py
@@ -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)):
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -552,6 +552,10 @@ 
     generic=True,
     priority=-1,
 )
+coreconfigitem('pager', 'attend-.*',
+    default=dynamicdefault,
+    generic=True,
+)
 coreconfigitem('pager', 'ignore',
     default=list,
 )