You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/08/06 12:06:46 UTC

svn commit: r982917 - in /subversion/trunk/subversion: include/svn_error_codes.h libsvn_ra_serf/update.c

Author: rhuijben
Date: Fri Aug  6 10:06:45 2010
New Revision: 982917

URL: http://svn.apache.org/viewvc?rev=982917&view=rev
Log:
Following up on r982791, make sure that errors returned from the update
editor are not seen as network related errors that should be handled by
serf.

This fixes update_tests.py 43 for, which tests the EOF safety of the
interactive conflict resolver.

* subversion/include/svn_error_codes.h
  (SVN_ERR_RA_SERF_WRAPPED_ERROR): New error code.

* subversion/libsvn_ra_serf/update.c
  (error_fetch): When handling a serf-handled error code, wrap it
    in a SVN_ERR_RA_SERF_WRAPPED_ERROR error.

Modified:
    subversion/trunk/subversion/include/svn_error_codes.h
    subversion/trunk/subversion/libsvn_ra_serf/update.c

Modified: subversion/trunk/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error_codes.h?rev=982917&r1=982916&r2=982917&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_error_codes.h (original)
+++ subversion/trunk/subversion/include/svn_error_codes.h Fri Aug  6 10:06:45 2010
@@ -969,6 +969,11 @@ SVN_ERROR_START
              SVN_ERR_RA_SERF_CATEGORY_START + 2,
              "Initialization of the GSSAPI context failed")
 
+  /** @since New in 1.7. */
+  SVN_ERRDEF(SVN_ERR_RA_SERF_WRAPPED_ERROR,
+             SVN_ERR_RA_SERF_CATEGORY_START + 3,
+             "While handling serf response:")
+
   /* libsvn_auth errors */
 
        /* this error can be used when an auth provider doesn't have

Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=982917&r1=982916&r2=982917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Fri Aug  6 10:06:45 2010
@@ -741,6 +741,11 @@ error_fetch(serf_request_t *request,
   serf_request_set_handler(request,
                            svn_ra_serf__response_discard_handler, NULL);
 
+  /* Some errors would be handled by serf; make sure they really make
+     the update fail by wrapping it in a different error. */
+  if (!SERF_BUCKET_READ_ERROR(err->apr_err))
+    return svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err, NULL);
+
   return err;
 }