diff mercurial/ui.py @ 33620:cc047a733f69 stable

ui: enable pager always for explicit --pager=on (issue5580) Before this patch, explicit --pager=on is unintentionally ignored by any disabling factor, even if priority of it is less than --pager=on (e.g. "[ui] paginate = off").
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 01 Aug 2017 18:52:52 +0900
parents d90f9e4704de
children c2c6a0f7408b
line wrap: on
line diff
--- a/mercurial/ui.py	Mon Jul 31 21:47:53 2017 +0900
+++ b/mercurial/ui.py	Tue Aug 01 18:52:52 2017 +0900
@@ -945,8 +945,14 @@
                    not "history, "summary" not "summ", etc.
         """
         if (self._disablepager
-            or self.pageractive
-            or command in self.configlist('pager', 'ignore')
+            or self.pageractive):
+            # how pager should do is already determined
+            return
+
+        if not command.startswith('internal-always-') and (
+            # explicit --pager=on (= 'internal-always-' prefix) should
+            # take precedence over disabling factors below
+            command in self.configlist('pager', 'ignore')
             or not self.configbool('ui', 'paginate')
             or not self.configbool('pager', 'attend-' + command, True)
             # TODO: if we want to allow HGPLAINEXCEPT=pager,