diff mercurial/ui.py @ 32104:f06d23af6cdf stable

pager: rename 'pager.enable' to 'ui.paginate' This aligns with what we do for color (see 7fec37746417). Pager is a central enough notion that having the master config in the [ui] section makes senses. It will helps with consistency, discoverability. It will also help having a simple and clear example hgrc mentioning pager. The previous form of the option had never been released in a non-rc version but we keep it around for convenience. If both are set, 'ui.pager' take priority.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 01 May 2017 16:36:50 +0200
parents 21eb863187ea
children 2384a6546927
line wrap: on
line diff
--- a/mercurial/ui.py	Tue May 02 20:19:09 2017 +0200
+++ b/mercurial/ui.py	Mon May 01 16:36:50 2017 +0200
@@ -55,10 +55,9 @@
 # (see 'hg help color' for details)
 # color = never
 
-[pager]
 # uncomment to disable command output pagination
 # (see 'hg help pager' for details)
-# enable = never
+# paginate = never
 
 [extensions]
 # uncomment these lines to enable some popular extensions
@@ -108,10 +107,9 @@
 # (see 'hg help color' for details)
 # color = never
 
-[pager]
 # uncomment to disable command output pagination
 # (see 'hg help pager' for details)
-# enable = never
+# paginate = never
 
 [extensions]
 # uncomment these lines to enable some popular extensions
@@ -858,7 +856,8 @@
         if (self._disablepager
             or self.pageractive
             or command in self.configlist('pager', 'ignore')
-            or not self.configbool('pager', 'enable', True)
+            or not self.configbool('ui', 'paginate',
+                                   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.