Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 30993:9c2977ceaa46
pager: move more behavior into core
This moves the global flag and the --pager=yes logic into core. Only
functionality change is that users now always get a --pager flag and
can enable the pager via the flag without the extension active.
Moving the flag into core exposes a defect in the ro localization,
which will have to be corrected later.
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 15 Feb 2017 17:47:57 -0500 |
parents | e92daf156d5c |
children | 3ed6e43998df |
comparison
equal
deleted
inserted
replaced
30992:61b4122019d3 | 30993:9c2977ceaa46 |
---|---|
817 if repo and repo != req.repo: | 817 if repo and repo != req.repo: |
818 repo.close() | 818 repo.close() |
819 | 819 |
820 def _runcommand(ui, options, cmd, cmdfunc): | 820 def _runcommand(ui, options, cmd, cmdfunc): |
821 """Run a command function, possibly with profiling enabled.""" | 821 """Run a command function, possibly with profiling enabled.""" |
822 if util.parsebool(options['pager']): | |
823 ui.pager('internal-always-' + cmd) | |
822 try: | 824 try: |
823 return cmdfunc() | 825 return cmdfunc() |
824 except error.SignatureError: | 826 except error.SignatureError: |
825 raise error.CommandError(cmd, _('invalid arguments')) | 827 raise error.CommandError(cmd, _('invalid arguments')) |
826 | 828 |