You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vincent Lefevre <vi...@vinc17.net> on 2010/07/30 16:52:23 UTC
Avoiding the "svn: Write error: Broken pipe" error messages
Since http://subversion.tigris.org/issues/show_bug.cgi?id=3014
("svn log | head" should not print "Write error: Broken pipe")
isn't fixed yet, I've eventually written a simple wrapper. See
attachment. It's not perfect, but better than nothing.
Note: for those who use localized messages, the script needs to
be modified accordingly.
--
Vincent Lefèvre <vi...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Re: Avoiding the "svn: Write error: Broken pipe" error messages
Posted by Vincent Lefevre <vi...@vinc17.net>.
On 2010-07-30 16:52:23 +0200, Vincent Lefevre wrote:
> Since http://subversion.tigris.org/issues/show_bug.cgi?id=3014
> ("svn log | head" should not print "Write error: Broken pipe")
> isn't fixed yet, I've eventually written a simple wrapper. See
> attachment. It's not perfect, but better than nothing.
>
> Note: for those who use localized messages, the script needs to
> be modified accordingly.
Here's a new version (attached). The previous script had a freezing
problem when a background process was started via $SVN_SSH. The
method used to solve this problem also allowed me to solve the
exit status problem.
--
Vincent Lefèvre <vi...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Re: Avoiding the "svn: Write error: Broken pipe" error messages
Posted by Vincent Lefevre <vi...@vinc17.net>.
On 2010-07-30 16:52:23 +0200, Vincent Lefevre wrote:
> Since http://subversion.tigris.org/issues/show_bug.cgi?id=3014
> ("svn log | head" should not print "Write error: Broken pipe")
> isn't fixed yet, I've eventually written a simple wrapper. See
> attachment. It's not perfect, but better than nothing.
>
> Note: for those who use localized messages, the script needs to
> be modified accordingly.
Here's a new version (attached). The previous script had a freezing
problem when a background process was started via $SVN_SSH. The
method used to solve this problem also allowed me to solve the
exit status problem.
--
Vincent Lefèvre <vi...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Temp file to avoid the "svn: Write error: Broken pipe" error
messages
Posted by Aldo Castillo <ac...@quipudigital.com>.
Try using a temp file to store log output
http://code.quipudigital.net/get-svn-head-revision-number.php
http://code.quipudigital.net/get-svn-head-revision-number.php
Vincent Lefevre-11 wrote:
>
> Since http://subversion.tigris.org/issues/show_bug.cgi?id=3014
> ("svn log | head" should not print "Write error: Broken pipe")
> isn't fixed yet, I've eventually written a simple wrapper. See
> attachment. It's not perfect, but better than nothing.
>
> Note: for those who use localized messages, the script needs to
> be modified accordingly.
>
> --
> Vincent Lefèvre <vi...@vinc17.net> - Web: <http://www.vinc17.net/>
> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
>
> #!/bin/sh
>
> # svn wrapper to avoid "svn: Write error: Broken pipe" error messages
> # when piping the svn output to some command.
> #
> # Caveat: if svn fails, its exit status is lost. However this script
> # will generally be used in an interactive way before a pipe (where
> # the user doesn't have a direct access to the exit status), and the
> # user can still look at the possible other error messages.
> #
> # Script written by Vincent Lefevre <vi...@vinc17.net> in July 2010,
> # released in the public domain.
>
> filter()
> {
> unset brpipe
> while read err
> do
> case "$err" in
> *Write\ error:\ Broken\ pipe) brpipe=1 ;;
> *) printf "%s\n" "$err" ;;
> esac
> done
> test -z "$brpipe" || kill -PIPE $$
> }
>
> { svn "$@" 2>&1 >&3 3>&- | filter >&2 3>&-; } 3>&1
>
> # $Id: svnwrapper 38281 2010-07-30 13:34:46Z vinc17/ypig $
>
>
--
View this message in context: http://old.nabble.com/Avoiding-the-%22svn%3A-Write-error%3A-Broken-pipe%22-error-messages-tp29306886p31253585.html
Sent from the Subversion Users mailing list archive at Nabble.com.