You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/05/22 15:35:51 UTC

svn commit: r1596866 - /subversion/trunk/subversion/libsvn_subr/opt.c

Author: stsp
Date: Thu May 22 13:35:50 2014
New Revision: 1596866

URL: http://svn.apache.org/r1596866
Log:
Fix another instance of issue #3014: "svn log | head" should not print
"Write error: Broken pipe". This time, it affects help on subcommands.

$ svn help up | head
subversion/libsvn_subr/opt.c:317,
subversion/libsvn_subr/cmdline.c:446: (apr_err=SVN_ERR_IO_PIPE_WRITE_ERROR)
svn: E135007: Write error in pipe

* subversion/libsvn_subr/opt.c
  (svn_opt_subcommand_help3): Don't print anything for pipe-write errors.

Modified:
    subversion/trunk/subversion/libsvn_subr/opt.c

Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1596866&r1=1596865&r2=1596866&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Thu May 22 13:35:50 2014
@@ -417,7 +417,9 @@ svn_opt_subcommand_help3(const char *sub
                               _("\"%s\": unknown command.\n\n"), subcommand);
 
   if (err) {
-    svn_handle_error2(err, stderr, FALSE, "svn: ");
+    /* Issue #3014: Don't print anything on broken pipes. */
+    if (err->apr_err != SVN_ERR_IO_PIPE_WRITE_ERROR)
+      svn_handle_error2(err, stderr, FALSE, "svn: ");
     svn_error_clear(err);
   }
 }