# HG changeset patch # User Jun Wu # Date 2016-03-14 15:03:19 # Node ID fa3438548b3d41a3f203f88950688d1097755c5f # Parent 5346e9b910fcccef4b1b294d6291a08fda8c3e15 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. diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -117,6 +117,11 @@ def uisetup(ui): 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