Mercurial > hg
changeset 28554:fa3438548b3d
pager: skip uisetup if chg is detected
chg has its own pager implementation that it wants to skip pager's uisetup.
It is currently done by redirecting stdout to /dev/null, which has unintended
side effects. This patch makes pager aware of chg and skip uisetup directly
from pager. We may want to merge chg and pager's pager implementation to
make this unnecessary in the future.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 14 Mar 2016 15:03:19 +0000 |
parents | 5346e9b910fc |
children | 1435a8e9b5fe |
files | hgext/pager.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/pager.py Mon Mar 14 23:08:03 2016 +0000 +++ b/hgext/pager.py Mon Mar 14 15:03:19 2016 +0000 @@ -117,6 +117,11 @@ if '--debugger' in sys.argv or not ui.formatted(): return + # chg has its own pager implementation + argv = sys.argv[:] + if 'chgunix' in dispatch._earlygetopt(['--cmdserver'], argv): + return + def pagecmd(orig, ui, options, cmd, cmdfunc): p = ui.config("pager", "pager", os.environ.get("PAGER")) usepager = False