You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/11/02 05:02:31 UTC

svn commit: r1538136 - in /subversion/branches/1.7.x: ./ STATUS subversion/include/svn_types.h subversion/libsvn_subr/cmdline.c subversion/libsvn_subr/io.c

Author: svn-role
Date: Sat Nov  2 04:02:31 2013
New Revision: 1538136

URL: http://svn.apache.org/r1538136
Log:
Merge r1522892 from trunk:

 * r1522892
   Fix issue #4425 and #3014 on Windows: svn.exe crashed when output of 'log'
   command interrupted when using ra_serf.
   Changes[client]:
     * fixed: command line client crashes when piped command is interrupted on
       Windows.
   Justification:
     User reported crash.
   Votes:
     +1: rhuijben, stefan2, brane

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/include/svn_types.h
    subversion/branches/1.7.x/subversion/libsvn_subr/cmdline.c
    subversion/branches/1.7.x/subversion/libsvn_subr/io.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1522892

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1538136&r1=1538135&r2=1538136&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Nov  2 04:02:31 2013
@@ -168,17 +168,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1522892
-   Fix issue #4425 and #3014 on Windows: svn.exe crashed when output of 'log'
-   command interrupted when using ra_serf.
-   Changes[client]:
-     * fixed: command line client crashes when piped command is interrupted on
-       Windows.
-   Justification:
-     User reported crash.
-   Votes:
-     +1: rhuijben, stefan2, brane
-
  * r1525902
    Fix issues #4428 and #4429: external references a redirected HTTP-URL.
    Changes:

Modified: subversion/branches/1.7.x/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/include/svn_types.h?rev=1538136&r1=1538135&r2=1538136&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/include/svn_types.h (original)
+++ subversion/branches/1.7.x/subversion/include/svn_types.h Sat Nov  2 04:02:31 2013
@@ -186,6 +186,16 @@ svn__apr_hash_index_val(const apr_hash_i
                       || ((s) == APR_OS_START_SYSERR + ERROR_INVALID_NAME))
 #endif
 
+/** On Windows, APR_STATUS_IS_EPIPE does not include ERROR_NO_DATA error.
+ * So we include it.*/
+/* ### These fixes should go into APR. */
+#ifndef WIN32
+#define SVN__APR_STATUS_IS_EPIPE(s)  APR_STATUS_IS_EPIPE(s)
+#else
+#define SVN__APR_STATUS_IS_EPIPE(s)  (APR_STATUS_IS_EPIPE(s) \
+                      || ((s) == APR_OS_START_SYSERR + ERROR_NO_DATA))
+#endif
+
 /** @} */
 
 /** The various types of nodes in the Subversion filesystem. */

Modified: subversion/branches/1.7.x/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_subr/cmdline.c?rev=1538136&r1=1538135&r2=1538136&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_subr/cmdline.c Sat Nov  2 04:02:31 2013
@@ -340,7 +340,7 @@ svn_cmdline_fputs(const char *string, FI
         {
           /* ### Issue #3014: Return a specific error for broken pipes,
            * ### with a single element in the error chain. */
-          if (APR_STATUS_IS_EPIPE(apr_get_os_error()))
+          if (SVN__APR_STATUS_IS_EPIPE(apr_get_os_error()))
             return svn_error_create(SVN_ERR_IO_PIPE_WRITE_ERROR, NULL, NULL);
           else
             return svn_error_wrap_apr(apr_get_os_error(), _("Write error"));
@@ -363,7 +363,7 @@ svn_cmdline_fflush(FILE *stream)
         {
           /* ### Issue #3014: Return a specific error for broken pipes,
            * ### with a single element in the error chain. */
-          if (APR_STATUS_IS_EPIPE(apr_get_os_error()))
+          if (SVN__APR_STATUS_IS_EPIPE(apr_get_os_error()))
             return svn_error_create(SVN_ERR_IO_PIPE_WRITE_ERROR, NULL, NULL);
           else
             return svn_error_wrap_apr(apr_get_os_error(), _("Write error"));

Modified: subversion/branches/1.7.x/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_subr/io.c?rev=1538136&r1=1538135&r2=1538136&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_subr/io.c Sat Nov  2 04:02:31 2013
@@ -3066,7 +3066,7 @@ do_io_file_wrapper_cleanup(apr_file_t *f
 
   /* ### Issue #3014: Return a specific error for broken pipes,
    * ### with a single element in the error chain. */
-  if (APR_STATUS_IS_EPIPE(status))
+  if (SVN__APR_STATUS_IS_EPIPE(status))
     return svn_error_create(SVN_ERR_IO_PIPE_WRITE_ERROR, NULL, NULL);
 
   if (name)