dispatch: consolidate pager flag handling to a single place
This makes a little more sense, thanks to Martin for suggesting it.
--- a/mercurial/dispatch.py Sun Feb 19 20:12:52 2017 -0500
+++ b/mercurial/dispatch.py Sun Feb 19 20:16:11 2017 -0500
@@ -749,7 +749,9 @@
for ui_ in uis:
ui_.setconfig('ui', 'interactive', 'off', '-y')
- if options['pager'] != 'auto' and not util.parsebool(options['pager']):
+ if util.parsebool(options['pager']):
+ ui.pager('internal-always-' + cmd)
+ elif options['pager'] != 'auto':
ui.disablepager()
if cmdoptions.get('insecure', False):
@@ -822,8 +824,6 @@
def _runcommand(ui, options, cmd, cmdfunc):
"""Run a command function, possibly with profiling enabled."""
- if util.parsebool(options['pager']):
- ui.pager('internal-always-' + cmd)
try:
return cmdfunc()
except error.SignatureError: