[PATCH 8 of 9 pager v2] annotate: migrate to modern pager API
Yuya Nishihara
yuya at tcha.org
Sun Feb 19 02:04:19 UTC 2017
On Sat, 18 Feb 2017 15:39:08 -0500, Augie Fackler wrote:
>
> > On Feb 18, 2017, at 3:11 PM, Martin von Zweigbergk <martinvonz at google.com> wrote:
> >
> >> > --- a/mercurial/commands.py
> >> > +++ b/mercurial/commands.py
> >> > @@ -361,6 +361,7 @@ def annotate(ui, repo, *pats, **opts):
> >> >
> >> > Returns 0 on success.
> >> > """
> >> > + ui.pager('annotate')
> >> > if not pats:
> >> > raise error.Abort(_('at least one filename or pattern is required'))
> >>
> >> Just to make sure. Do we plan to delay ui.pager() call so short error messages
> >> (and password prompt, etc.) won't be paged?
> >>
> > I was wondering the same, but was hoping the pager would be configured to exit if the full text would fit. I have no idea if that's true for most systems out there, though. I don't believe I've manually configured mine that way, so I suspect it's that way be default on our custom Ubuntu. I guess pager on by default will be pretty annoying if that is not a common default configuration, so I really hope it is.
>
> I don’t think that’s a safe assumption, sadly. I’ll do a follow-up to try and make sure that things are sane at least at a high level.
IIRC, "more" exits automatically, but "less" doesn't by default. Also, "less"
clears the paged contents on exit.
More information about the Mercurial-devel
mailing list