pager: add a config knob to just globally turn off the pager
authorAugie Fackler <>
Tue, 07 Feb 2017 17:13:25 -0500
changeset 35955 88203f26ea57627cabd7cf9c4f7843661d6c43ae
parent 35954 900996da577ae0c221a1e3e36084538a150c19e3
child 35956 c962bb6af90965263dd265f73d939cb66688f3d1
push id461
push dateThu, 02 Mar 2017 23:57:55 +0000
pager: add a config knob to just globally turn off the pager
--- a/mercurial/help/pager.txt
+++ b/mercurial/help/pager.txt
@@ -21,8 +21,15 @@ to specify them in your user configurati
 To control whether the pager is used at all for an individual command,
 you can use --pager=<value>::
   - use as needed: `auto`.
   - require the pager: `yes` or `on`.
   - suppress the pager: `no` or `off` (any unrecognized value
   will also work).
+To globally turn off all attempts to use a pager, set::
+  [pager]
+  enable = false
+which will prevent the pager from running.
--- a/mercurial/
+++ b/mercurial/
@@ -852,16 +852,17 @@ class ui(object):
           command: The full, non-aliased name of the command. That is, "log"
                    not "history, "summary" not "summ", etc.
         if (self._disablepager
             or self.pageractive
             or command in self.configlist('pager', 'ignore')
+            or not self.configbool('pager', 'enable', True)
             or not self.configbool('pager', 'attend-' + command, True)
             # TODO: if we want to allow HGPLAINEXCEPT=pager,
             # formatted() will need some adjustment.
             or not self.formatted()
             or self.plain()
             # TODO: expose debugger-enabled on the UI object
             or '--debugger' in sys.argv):
             # We only want to paginate if the ui appears to be