[PATCH 2 of 2 pager-endgame] pager: add a config knob to just globally turn off the pager
Augie Fackler
raf at durin42.com
Tue Feb 21 16:18:13 EST 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1486505605 18000
# Tue Feb 07 17:13:25 2017 -0500
# Node ID 390e26db66994cc2f627933815db02353958289f
# Parent 589dcabe2b7a2b9f2d49646d710335e5a70ad492
pager: add a config knob to just globally turn off the pager
diff --git a/mercurial/help/pager.txt b/mercurial/help/pager.txt
--- a/mercurial/help/pager.txt
+++ b/mercurial/help/pager.txt
@@ -26,3 +26,10 @@ you can use --pager=<value>::
- 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.
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -857,6 +857,7 @@ class ui(object):
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.
More information about the Mercurial-devel
mailing list