[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] pager support for command line client

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 4 Feb 2014 15:34:48 +0100

On Tue, Feb 04, 2014 at 12:37:45PM +0000, Julian Foad wrote:
> A pager for all commands when producing more than a screenful of output -- fine.

For this requirement, we need to count newlines and compare the
result to the terminal window's height, so we can make a decision
to launch a pager.

I've got this working for svn_cmdline_fputs(). The only issue is
that it also needs tweaks for other functions wrting to stdout,
such as svn_stream_for_stdout().

Another issue is that some people (e.g. Ben) want to use pagers
for more than just paging, e.g. colorization. In that case we
always want to use the pager right away. This could be made
configurable... (use-pager=[auto|always])

> Good behaviour, but don't implement it in Subversion, implement it in the pager!

For this requirement, we must always launch the pager upfront,
so the pager can count the lines and decide whether to quit itself.

I don't see a way to comply with both of these requirements of
yours at the same time. Otherwise I agree with the points you've made,
Received on 2014-02-04 15:36:51 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.