[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 11:53:50 +0100

On Tue, Feb 04, 2014 at 09:14:52AM +0000, Philip Martin wrote:
> We want some pattern that ensures __close is always called even when an
> error is returned part way through. Either a pool cleanup or some sort
> of __with_pager(). Otherwise we have to ensure that none of the error
> pass bypass __close, e.g.
>
> PAGER=less svn diff wc file:///
>
> leaves me needing to reset my terminal.

That's interesting. It seems whether a terminal reset is needed depends
on the pager, because I don't see this issue with OpenBSD's less(1).

What I do see is that the error message raised by 'svn diff'
("Unable to open repository 'file://'") does not appear consistenly.
There seems to be a race between svn and the pager.

And if I set PAGER="less -F" and run a command which produces output
that does not fill the terminal completely I don't see any output at all.
It seems the pager decides to exit immediately and we're writing to a
dead fd instead of stdout. I'm not sure what to do here. However, piping
svn's output to 'less -F' shows the same behaviour, so perhaps there
is nothing we can do about this.
Received on 2014-02-04 11:55:54 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.