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

Re: Broken pipe error

From: Ben Reser <ben_at_reser.org>
Date: 2004-08-25 00:40:05 CEST

On Tue, Aug 24, 2004 at 02:52:56PM -0500, Ben Gollmer wrote:
> Ran into an issue recently when trying to pipe svn's output into gedit
> (GEdit 2.6.0, Fedora Core 2):
>
> svn, version 1.0.6 (r10360) compiled Jul 20 2004, 07:03:06
>
> $ svn blame www/settings.php | gedit svn: Can't write to stream:
> Broken pipe
>
> $ svn cat www/settings.php | gedit svn: Can't write to stream: Broken
> pipe
>
> $ svn info www/settings.php | gedit (output appears in gedit as
> expected)
>
> Other commands, such as ls -l | gedit, also work fine. I searched the
> issue tracker to see if this was a known bug, but nothing turned up.
> To my untrained eye, it looks like the problem lies in the usage of
> svn_stream_printf() vs svn_cmdline_printf().

You know I have a theory on what's going on here...

The commands you say are not working are commands that muts go to the
network to talk to the server to get information.

Try these two commands:

svn stat | gedit

svn stat -u | gedit

If the first one works and the second one fails then what's happening
is gedit isn't seeing input fast enough so it stops watching stdin
(probably closes it, thus the Broken pipe message) and assumes you're
just starting it with no document selected.

So my bet is this is a side effect of gedit trying to infer what you
want, rather than you just being able to say what you want by say doing:
foo | gedit -

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 25 00:40:31 2004

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.