subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1554021 - in /subversion/trunk/subversion/libsvn_ra_serf: commit.c inherited_props.c options.c property.c
Date Sun, 29 Dec 2013 12:41:03 GMT
Author: rhuijben
Date: Sun Dec 29 12:41:03 2013
New Revision: 1554021

URL: http://svn.apache.org/r1554021
Log:
Cleanup a bit more response checks found when doing the r1554019
handler cleanup.

* subversion/libsvn_ra_serf/commit.c
  (close_edit): Replace assertion by proper error. Clear
    activity url before/on delete to avoid trying another delete
    on failure of the delete.

* subversion/libsvn_ra_serf/inherited_props.c
  (svn_ra_serf__get_inherited_props): Expect strict result code.

* subversion/libsvn_ra_serf/options.c
  (svn_ra_serf__v2_get_youngest_revnum): Replace assertion by proper
    error by moving a bit of code from get_baseline_info here.

* subversion/libsvn_ra_serf/property.c
  (retrieve_baseline_info): Check if we really get a revision.
  (get_baseline_info): Remove check that is now in
    svn_ra_serf__v2_get_youngest_revnum.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/commit.c
    subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c
    subversion/trunk/subversion/libsvn_ra_serf/options.c
    subversion/trunk/subversion/libsvn_ra_serf/property.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1554021&r1=1554020&r2=1554021&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Sun Dec 29 12:41:03 2013
@@ -2163,9 +2163,12 @@ close_edit(void *edit_baton,
       handler->response_handler = svn_ra_serf__expect_empty_body;
       handler->response_baton = handler;
 
+      ctx->activity_url = NULL; /* Don't try again in abort_edit() on fail */
+
       SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
 
-      SVN_ERR_ASSERT(handler->sline.code == 204);
+      if (handler->sline.code != 204)
+        return svn_error_trace(svn_ra_serf__unexpected_status(handler));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c?rev=1554021&r1=1554020&r2=1554021&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c Sun Dec 29 12:41:03 2013
@@ -459,9 +459,8 @@ svn_ra_serf__get_inherited_props(svn_ra_
 
   SVN_ERR(svn_ra_serf__context_run_one(handler, scratch_pool));
 
-  SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
-                                       handler->path,
-                                       handler->location));
+  if (handler->sline.code != 200)
+    return svn_error_trace(svn_ra_serf__unexpected_status(handler));
 
   *iprops = iprops_ctx->iprops;
 

Modified: subversion/trunk/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/options.c?rev=1554021&r1=1554020&r2=1554021&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/options.c Sun Dec 29 12:41:03 2013
@@ -443,8 +443,12 @@ svn_ra_serf__v2_get_youngest_revnum(svn_
   if (opt_ctx->handler->sline.code != 200)
     return svn_error_trace(svn_ra_serf__unexpected_status(opt_ctx->handler));
 
+  if (! SVN_IS_VALID_REVNUM(opt_ctx->youngest_rev))
+    return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
+                            _("The OPTIONS response did not include "
+                              "the youngest revision"));
+
   *youngest = opt_ctx->youngest_rev;
-  SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(*youngest));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1554021&r1=1554020&r2=1554021&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Sun Dec 29 12:41:03 2013
@@ -1002,12 +1002,18 @@ retrieve_baseline_info(svn_revnum_t *act
       const char *version_name;
 
       version_name = svn_prop_get_value(dav_props, SVN_DAV__VERSION_NAME);
-      if (!version_name)
+      if (version_name)
+        {
+          apr_int64_t rev;
+
+          SVN_ERR(svn_cstring_atoi64(&rev, version_name));
+          *actual_revision = (svn_revnum_t)rev;
+        }
+
+      if (!version_name || !SVN_IS_VALID_REVNUM(*actual_revision))
         return svn_error_create(SVN_ERR_RA_DAV_PROPS_NOT_FOUND, NULL,
                                 _("The PROPFIND response did not include "
                                   "the requested version-name value"));
-
-      *actual_revision = SVN_STR_TO_REV(version_name);
     }
 
   return SVN_NO_ERROR;
@@ -1122,10 +1128,6 @@ get_baseline_info(const char **bc_url,
         {
           SVN_ERR(svn_ra_serf__v2_get_youngest_revnum(
                     revnum_used, conn, pool));
-          if (! SVN_IS_VALID_REVNUM(*revnum_used))
-            return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
-                                    _("The OPTIONS response did not include "
-                                      "the youngest revision"));
         }
 
       *bc_url = apr_psprintf(pool, "%s/%ld",



Mime
View raw message