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

Boris Feld boris.feld at octobus.net
Fri Oct 13 13:55:15 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at 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

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,
 )


More information about the Mercurial-devel mailing list