subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kame...@apache.org
Subject svn commit: r905326 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Date Mon, 01 Feb 2010 16:29:36 GMT
Author: kameshj
Date: Mon Feb  1 16:29:35 2010
New Revision: 905326

URL: http://svn.apache.org/viewvc?rev=905326&view=rev
Log:
[issue3561]
Follow-up commit similar to r900797 for ra_serf layer committing to
http-v2 unaware proxy.

Make CHECKOUT request on VCC url rather than the baseline url as that avoids
the detection of *out of date* baseline url from the mirror and leave that
to CHECKOUT itself via '<D:apply-to-version/>'.

As CHECKOUT is proxied by the mirror we are not getting hit by the original
issue.

* subversion/libsvn_ra_serf/commit.c
(commit_context_t): Replace baseline_url with vcc_url.
(create_checkout_body): Make CHECKOUT body to have '<D:apply-to-version/>'.
(checkout_dir): Make CHECKOUT on vcc_url instead of baseline url.
(open_root): Remove baseline url detection code.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/commit.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=905326&r1=905325&r2=905326&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Mon Feb  1 16:29:35 2010
@@ -90,7 +90,7 @@
   apr_size_t activity_url_len;   /* ...and length thereof */
   checkout_context_t *baseline;  /* checkout for the baseline */
   const char *checked_in_url;    /* checked-in root to base CHECKOUTs from */
-  const char *baseline_url;      /* root baseline collection */
+  const char *vcc_url;           /* vcc url */
 
 } commit_context_t;
 
@@ -254,6 +254,7 @@
 
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:href");
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:activity-set");
+  svn_ra_serf__add_tag_buckets(body_bkt, "D:apply-to-version", NULL, alloc);
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:checkout");
 
   return body_bkt;
@@ -393,7 +394,7 @@
    */
   if (!dir->parent_dir && !dir->commit->baseline)
     {
-      checkout_ctx->checkout_url = dir->commit->baseline_url;
+      checkout_ctx->checkout_url = dir->commit->vcc_url;
       dir->commit->baseline = checkout_ctx;
     }
   else
@@ -1080,7 +1081,6 @@
   svn_ra_serf__handler_t *handler;
   proppatch_context_t *proppatch_ctx;
   dir_context_t *dir;
-  apr_hash_t *props;
   apr_hash_index_t *hi;
   const char *proppatch_target;
 
@@ -1150,9 +1150,7 @@
     {
       svn_ra_serf__options_context_t *opt_ctx;
       svn_ra_serf__simple_request_context_t *mkact_ctx;
-      svn_ra_serf__propfind_context_t *propfind_ctx;
       const char *activity_str;
-      const char *vcc_url;
 
       SVN_ERR(svn_ra_serf__create_options_req(&opt_ctx, ctx->session,
                                               ctx->session->conns[0],
@@ -1202,30 +1200,9 @@
         }
 
       /* Now go fetch our VCC and baseline so we can do a CHECKOUT. */
-      SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, ctx->session,
+      SVN_ERR(svn_ra_serf__discover_vcc(&(ctx->vcc_url), ctx->session,
                                         ctx->conn, ctx->pool));
 
-      props = apr_hash_make(ctx->pool);
-      propfind_ctx = NULL;
-      SVN_ERR(svn_ra_serf__deliver_props(&propfind_ctx, props, ctx->session,
-                                         ctx->conn, vcc_url,
-                                         SVN_INVALID_REVNUM, "0",
-                                         checked_in_props, FALSE,
-                                         NULL, ctx->pool));
-
-      SVN_ERR(svn_ra_serf__wait_for_props(propfind_ctx, ctx->session,
-                                          ctx->pool));
-
-      ctx->baseline_url = svn_ra_serf__get_ver_prop(props, vcc_url,
-                                                    SVN_INVALID_REVNUM,
-                                                    "DAV:", "checked-in");
-
-      if (!ctx->baseline_url)
-        {
-          return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
-                                  _("The OPTIONS response did not include the "
-                                    "requested checked-in value"));
-        }
 
       /* Build our directory baton. */
       dir = apr_pcalloc(dir_pool, sizeof(*dir));



Mime
View raw message