diff mercurial/dispatch.py @ 34638:021607b4ef49

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
author Jun Wu <quark@fb.com>
date Mon, 09 Oct 2017 12:42:28 -0700
parents 163fa0aea71e
children fe987d0b9e1e
line wrap: on
line diff
--- 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)