Submitter | Augie Fackler |
---|---|
Date | Feb. 19, 2017, 11:13 p.m. |
Message ID | <b6f05836ba20bb8b2546.1487545981@imladris.local> |
Download | mbox | patch |
Permalink | /patch/18670/ |
State | Accepted |
Headers | show |
Comments
On Sun, 19 Feb 2017 18:13:01 -0500, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1486440228 18000 > # Mon Feb 06 23:03:48 2017 -0500 > # Node ID b6f05836ba20bb8b25469a30aeed1b3506392bbf > # Parent f6f080904a6ecac993f137b92d50bf4991f8d07c > incoming: enable pager > > The design of incoming means we have to activate the pager in several > places, depending on which codepath gets chosen. > > diff --git a/mercurial/commands.py b/mercurial/commands.py > --- a/mercurial/commands.py > +++ b/mercurial/commands.py > @@ -3210,6 +3210,7 @@ def incoming(ui, repo, source="default", > cmdutil.displaygraph(ui, repo, revdag, displayer, > graphmod.asciiedges) > > + ui.pager('incoming') > hg._incoming(display, lambda: 1, ui, repo, source, opts, buffered=True) > return 0 > > @@ -3223,11 +3224,13 @@ def incoming(ui, repo, source="default", > if 'bookmarks' not in other.listkeys('namespaces'): > ui.warn(_("remote doesn't support bookmarks\n")) > return 0 > + ui.pager('incoming') > ui.status(_('comparing with %s\n') % util.hidepassword(source)) > return bookmarks.incoming(ui, repo, other) > > repo._subtoppath = ui.expandpath(source) > try: > + ui.pager('incoming') > return hg.incoming(ui, repo, source, opts) As a follow-up, we'll probably want to delay ui.pager() until authentication of the peer repo.
Patch
diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3210,6 +3210,7 @@ def incoming(ui, repo, source="default", cmdutil.displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges) + ui.pager('incoming') hg._incoming(display, lambda: 1, ui, repo, source, opts, buffered=True) return 0 @@ -3223,11 +3224,13 @@ def incoming(ui, repo, source="default", if 'bookmarks' not in other.listkeys('namespaces'): ui.warn(_("remote doesn't support bookmarks\n")) return 0 + ui.pager('incoming') ui.status(_('comparing with %s\n') % util.hidepassword(source)) return bookmarks.incoming(ui, repo, other) repo._subtoppath = ui.expandpath(source) try: + ui.pager('incoming') return hg.incoming(ui, repo, source, opts) finally: del repo._subtoppath