dispatch: when --pager=no is passed, also disable pager on req.repo.ui
authorJun Wu <quark@fb.com>
Mon, 09 Oct 2017 12:42:28 -0700
changeset 34638 021607b4ef49
parent 34637 5f79f5f8487a
child 34639 a568a46751b6
dispatch: when --pager=no is passed, also disable pager on req.repo.ui With a future chg change, `req.repo` could be set and currently it is unaffected by `--pager=on`. This patch makes it so. This could make one of the test cases in `test-pager.t` pass with future chg changes. Differential Revision: https://phab.mercurial-scm.org/D990
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Wed Oct 11 10:36:59 2017 -0700
+++ b/mercurial/dispatch.py	Mon Oct 09 12:42:28 2017 -0700
@@ -871,7 +871,8 @@
             # ui.pager() expects 'internal-always-' prefix in this case
             ui.pager('internal-always-' + cmd)
         elif options['pager'] != 'auto':
-            ui.disablepager()
+            for ui_ in uis:
+                ui_.disablepager()
 
         if options['version']:
             return commands.version_(ui)