[PATCH 2 of 3 V2] pager: skip uisetup if chg is detected
Yuya Nishihara
yuya at tcha.org
Fri Mar 18 18:35:32 EDT 2016
On Wed, 16 Mar 2016 12:08:10 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1457967799 0
> # Mon Mar 14 15:03:19 2016 +0000
> # Node ID f09ac10a2f99ebc65143aff19fa73d1ad3024da0
> # Parent bc925c3acec1c4938f49d623e797444d955eb59d
> 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 @@
> 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
Queued this version, thanks. I don't think this is ideal, but we can refactor
pager handling later.
More information about the Mercurial-devel
mailing list