# HG changeset patch # User Augie Fackler # Date 1487553371 18000 # Node ID 04344226b3ce8e3a1199067d9e38b33844f5fbcb # Parent 9c827087df388d5547e94b952ebbeac25aaeb484 dispatch: consolidate pager flag handling to a single place This makes a little more sense, thanks to Martin for suggesting it. diff -r 9c827087df38 -r 04344226b3ce mercurial/dispatch.py --- 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: