[PATCH] Log, annotate and diff use an environment pager if available
Frank Kingswood
frank at kingswood-consulting.co.uk
Thu Mar 6 10:11:33 CST 2008
Adrian Buehlmann wrote:
> On 06.03.2008 13:37, David Soria Parra wrote:
>> fixed
>
> not yet...
>
>> + def write(self, w):
>> + self.buffer.extend(w.splitlines())
>> + if len(self.buffer) >= self.min_lines and not self.buffer_written:
>> + # we reached the limit and not yet written the buffer
>> + self.buffer_written = True
>> + if self.getpager() and not self.proc:
>> + # we now that we need a process only if
>> + # we already reach the min_lines limit
>
There is another thread called "Patch updated" where I wrote this.
Copying that message here for reference.
> That is way too magic for my liking. You can not predict what users
> want either. I for example like to see output immediately, and am
> prepared to use scrollback.
>
> A simpler method that does not mess with the hg internals is to wrap
> hg in a bash function, like
>
> function hg() {
> command hg "$@" | crufty_pager
> }
>
> where crufty_pager is a script that reads its input and if it finds
> more than 25 lines fires up $PAGER, and otherwise just writes them
> to stdout.
If this automagic pager gets put in hg then it should be configurable
and turn-offable.
Frank
More information about the Mercurial-devel
mailing list