You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2009/12/12 15:38:39 UTC

svn commit: r889935 - in /subversion/branches/1.6.x: ./ subversion/libsvn_ra_serf/

Author: hwright
Date: Sat Dec 12 14:38:38 2009
New Revision: 889935

URL: http://svn.apache.org/viewvc?rev=889935&view=rev
Log:
Reintegrate the 1.6.x-issue3519 branch:

 * r875632 (from ^/subversion/branches/http-protocol-v2@r875632), r880370
   Fix issue #3519: ra_serf using Label header unsupported by mod_dav_svn.
   Justification:
     This is the cause of the switch-tests.py 19 failures we've been ignoring
     for our 1.6.x releases.
   Notes:
     r875632 (from the http-protocol-v2 branch) is a plumbing change.
     r880370 (from trunk) is the real fix.
   Branch:
     ^/subversion/branches/1.6.x-issue3519
   Votes:
     +1: cmpilato, rhuijben, lgo

Modified:
    subversion/branches/1.6.x/   (props changed)
    subversion/branches/1.6.x/CHANGES   (props changed)
    subversion/branches/1.6.x/STATUS
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/blame.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/commit.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/get_deleted_rev.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocations.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocationsegments.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/log.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/mergeinfo.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/property.c
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/serf.c

Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 12 14:38:38 2009
@@ -1,4 +1,5 @@
 /subversion/branches/1.6.x-future-proof:880259-884209
+/subversion/branches/1.6.x-issue3519:880376-889934
 /subversion/trunk:879688,880274-880275,880474,881905,886164,886197,888979,889081
 subversion/branches/1.5.x-r30215:870312
 subversion/branches/1.6.x-UNC-paths:876471-876545
@@ -27,6 +28,7 @@
 subversion/branches/fs-rep-sharing:869036-873803
 subversion/branches/fsfs-pack:873717-874575
 subversion/branches/gnome-keyring:870558-871410
+subversion/branches/http-protocol-v2:875632
 subversion/branches/in-memory-cache:869829-871452
 subversion/branches/issue-2843-dev:871432-874179
 subversion/branches/issue-3000:871713,871716-871719,871721-871726,871728,871734
@@ -47,4 +49,4 @@
 subversion/branches/tc_url_rev:874351-874483
 subversion/branches/tree-conflicts:868291-873154
 subversion/branches/tree-conflicts-notify:873926-874008
-subversion/trunk:875965,875968,876004,876012,876017,876019,876022,876024,876041-876042,876048,876051,876055-876056,876059,876083,876091,876097,876101,876109,876123-876125,876129,876132,876138,876160,876167,876180,876185,876205,876223-876225,876230,876233,876252,876256,876283,876287,876312,876326-876327,876330,876366,876372,876374,876376,876383,876386,876442,876456-876457,876462-876464,876467,876469,876480,876486,876495-876497,876516-876518,876524,876526,876583,876601,876614,876628,876633,876641,876659,876687,876689,876705,876715,876726,876760,876763,876794,876804,876815-876816,876821,876825,876837,876840-876841,876843,876849,876857-876858,876873,876890,876897,876905,876908,876925,876931,876934,876948-876949,876953,876987,876993,877011,877028-877029,877038,877119,877127,877146,877157,877191,877195,877211,877230,877234,877237,877243,877249,877259,877261,877304,877319,877407,877437,877441-877442,877453,877459,877472,877544,877553,877565,877568,877573,877593,877601,877612,877667
 ,877681,877692,877696,877701,877720,877730,877784,877793,877797,877809,877815,877819,877821,877842,877848,877853,877867,877869,877873,877901,877909,877916,877931,877942,877953,877964,877968,877970,877981-877982,878005,878013,878015,878020,878046,878053,878062,878074,878080,878089,878091,878093,878095,878127,878129,878131,878142,878173-878176,878240,878242,878255,878272,878279,878296-878297,878303,878335,878338,878353,878364,878367-878368,878385,878462,878484,878491,878498,878532,878595,878646,878659,878673,878682-878683,878690-878691,878693,878723,878760-878761,878873,878875,878877,878879,878905,878915,878924-878925,878946,878949,878955,878960,878970,878981,879001,879033,879056,879074,879076,879081-879082,879105,879126,879148,879170,879198-879199,879201,879271,879293,879357,879375-879376,879403,879631,879635-879636,879709-879711,879747,879954,879961,880082,880095,880105,880162,880226
+subversion/trunk:875965,875968,876004,876012,876017,876019,876022,876024,876041-876042,876048,876051,876055-876056,876059,876083,876091,876097,876101,876109,876123-876125,876129,876132,876138,876160,876167,876180,876185,876205,876223-876225,876230,876233,876252,876256,876283,876287,876312,876326-876327,876330,876366,876372,876374,876376,876383,876386,876442,876456-876457,876462-876464,876467,876469,876480,876486,876495-876497,876516-876518,876524,876526,876583,876601,876614,876628,876633,876641,876659,876687,876689,876705,876715,876726,876760,876763,876794,876804,876815-876816,876821,876825,876837,876840-876841,876843,876849,876857-876858,876873,876890,876897,876905,876908,876925,876931,876934,876948-876949,876953,876987,876993,877011,877028-877029,877038,877119,877127,877146,877157,877191,877195,877211,877230,877234,877237,877243,877249,877259,877261,877304,877319,877407,877437,877441-877442,877453,877459,877472,877544,877553,877565,877568,877573,877593,877601,877612,877667
 ,877681,877692,877696,877701,877720,877730,877784,877793,877797,877809,877815,877819,877821,877842,877848,877853,877867,877869,877873,877901,877909,877916,877931,877942,877953,877964,877968,877970,877981-877982,878005,878013,878015,878020,878046,878053,878062,878074,878080,878089,878091,878093,878095,878127,878129,878131,878142,878173-878176,878240,878242,878255,878272,878279,878296-878297,878303,878335,878338,878353,878364,878367-878368,878385,878462,878484,878491,878498,878532,878595,878646,878659,878673,878682-878683,878690-878691,878693,878723,878760-878761,878873,878875,878877,878879,878905,878915,878924-878925,878946,878949,878955,878960,878970,878981,879001,879033,879056,879074,879076,879081-879082,879105,879126,879148,879170,879198-879199,879201,879271,879293,879357,879375-879376,879403,879631,879635-879636,879709-879711,879747,879954,879961,880082,880095,880105,880162,880226,880370

Propchange: subversion/branches/1.6.x/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 12 14:38:38 2009
@@ -1,4 +1,5 @@
 /subversion/branches/1.6.x-future-proof/CHANGES:880259-884209
+/subversion/branches/1.6.x-issue3519/CHANGES:880376-889934
 /subversion/trunk/CHANGES:879688,880274-880275,880474,881905,886164,886197,888979,889081
 subversion/branches/1.5.x-r30215/CHANGES:870312
 subversion/branches/1.6.x-UNC-paths/CHANGES:876471-876545

Modified: subversion/branches/1.6.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Sat Dec 12 14:38:38 2009
@@ -198,16 +198,3 @@
 
 Approved changes:
 =================
-
- * r875632 (from ^/subversion/branches/http-protocol-v2@r875632), r880370
-   Fix issue #3519: ra_serf using Label header unsupported by mod_dav_svn.
-   Justification:
-     This is the cause of the switch-tests.py 19 failures we've been ignoring
-     for our 1.6.x releases.
-   Notes:
-     r875632 (from the http-protocol-v2 branch) is a plumbing change.
-     r880370 (from trunk) is the real fix.
-   Branch:
-     ^/subversion/branches/1.6.x-issue3519
-   Votes:
-     +1: cmpilato, rhuijben, lgo

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/blame.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/blame.c Sat Dec 12 14:38:38 2009
@@ -432,8 +432,8 @@
   svn_ra_serf__add_close_tag_buckets(buckets, session->bkt_alloc,
                                      "S:file-revs-report");
 
-  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                         session, session->repos_url.path,
+  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
+                                         NULL, session->repos_url.path,
                                          end, NULL, pool));
   req_url = svn_path_url_add_component(basecoll_url, relative_url, pool);
 

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/commit.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/commit.c Sat Dec 12 14:38:38 2009
@@ -469,13 +469,33 @@
     {
       svn_ra_serf__propfind_context_t *propfind_ctx;
       apr_hash_t *props;
+      const char *propfind_url;
 
       props = apr_hash_make(pool);
 
       propfind_ctx = NULL;
-      svn_ra_serf__deliver_props(&propfind_ctx, props, session,
-                                 conn, session->repos_url.path,
-                                 base_revision, "0",
+      if (SVN_IS_VALID_REVNUM(base_revision))
+        {
+          const char *bc_url, *bc_relpath;
+          
+          /* mod_dav_svn can't handle the "Label:" header that
+             svn_ra_serf__deliver_props() is going to try to use for
+             this lookup, so we'll do things the hard(er) way, by
+             looking up the version URL from a resource in the
+             baseline collection. */
+          SVN_ERR(svn_ra_serf__get_baseline_info(&bc_url, &bc_relpath,
+                                                 session, conn,
+                                                 session->repos_url.path,
+                                                 base_revision, NULL, pool));
+          propfind_url = svn_path_url_add_component2(bc_url, bc_relpath, pool);
+        }
+      else
+        {
+          propfind_url = session->repos_url.path;
+        }
+
+      svn_ra_serf__deliver_props(&propfind_ctx, props, session, conn,
+                                 propfind_url, base_revision, "0",
                                  checked_in_props, FALSE, NULL, pool);
 
       SVN_ERR(svn_ra_serf__wait_for_props(propfind_ctx, session, pool));
@@ -483,7 +503,7 @@
       /* We wouldn't get here if the url wasn't found (404), so the checked-in
          property should have been set. */
       root_checkout =
-          svn_ra_serf__get_ver_prop(props, session->repos_url.path,
+          svn_ra_serf__get_ver_prop(props, propfind_url,
                                     base_revision, "DAV:", "checked-in");
 
       if (!root_checkout)

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/get_deleted_rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/get_deleted_rev.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/get_deleted_rev.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/get_deleted_rev.c Sat Dec 12 14:38:38 2009
@@ -197,7 +197,7 @@
   drev_ctx->done = FALSE;
 
   SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                         ras, NULL, peg_revision, NULL,
+                                         ras, NULL, NULL, peg_revision, NULL,
                                          pool));
 
   req_url = svn_path_url_add_component(basecoll_url, relative_url, pool);

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocations.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocations.c Sat Dec 12 14:38:38 2009
@@ -225,8 +225,8 @@
   svn_ra_serf__add_close_tag_buckets(buckets, session->bkt_alloc,
                                      "S:get-locations");
 
-  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                         session, NULL, peg_revision, NULL,
+  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
+                                         NULL, NULL, peg_revision, NULL,
                                          pool));
 
   req_url = svn_path_url_add_component(basecoll_url, relative_url, pool);

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocationsegments.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/getlocationsegments.c Sat Dec 12 14:38:38 2009
@@ -173,9 +173,8 @@
   svn_ra_serf__add_close_tag_buckets(buckets, session->bkt_alloc,
                                      "S:get-location-segments");
 
-  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                         session, NULL, peg_revision, NULL,
-                                         pool));
+  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
+                                         NULL, NULL, peg_revision, NULL, pool));
 
   req_url = svn_path_url_add_component(basecoll_url, relative_url, pool);
 

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/log.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/log.c Sat Dec 12 14:38:38 2009
@@ -573,9 +573,8 @@
    */
   peg_rev = (start > end) ? start : end;
 
-  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                         session, NULL, peg_rev, NULL,
-                                         pool));
+  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
+                                         NULL, NULL, peg_rev, NULL, pool));
 
   req_url = svn_path_url_add_component(basecoll_url, relative_url, pool);
 

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/mergeinfo.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/mergeinfo.c Sat Dec 12 14:38:38 2009
@@ -237,9 +237,8 @@
   const char *relative_url, *basecoll_url;
   const char *path;
 
-  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                         session, NULL, revision,
-                                         NULL, pool));
+  SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
+                                         NULL, NULL, revision, NULL, pool));
 
   path = svn_path_url_add_component(basecoll_url, relative_url, pool);
 

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/property.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/property.c Sat Dec 12 14:38:38 2009
@@ -928,6 +928,7 @@
 svn_ra_serf__get_baseline_info(const char **bc_url,
                                const char **bc_relative,
                                svn_ra_serf__session_t *session,
+                               svn_ra_serf__connection_t *conn,
                                const char *url,
                                svn_revnum_t revision,
                                svn_revnum_t *latest_revnum,
@@ -940,12 +941,17 @@
   if (! url)
     url = session->repos_url.path;
 
+  /* If the caller didn't provide a specific connection for us to use,
+     we'll use the default one.  */
+  if (! conn)
+    conn = session->conns[0];
+
   SVN_ERR(svn_ra_serf__discover_root(&vcc_url, &relative_url,
-                                     session, session->conns[0], url, pool));
+                                     session, conn, url, pool));
 
   if (revision != SVN_INVALID_REVNUM)
     {
-      SVN_ERR(svn_ra_serf__retrieve_props(props, session, session->conns[0],
+      SVN_ERR(svn_ra_serf__retrieve_props(props, session, conn,
                                           vcc_url, revision, "0",
                                           baseline_props, pool));
       basecoll_url = svn_ra_serf__get_ver_prop(props, vcc_url, revision,
@@ -953,7 +959,7 @@
     }
   else
     {
-      SVN_ERR(svn_ra_serf__retrieve_props(props, session, session->conns[0],
+      SVN_ERR(svn_ra_serf__retrieve_props(props, session, conn,
                                           vcc_url, revision, "0",
                                           checked_in_props, pool));
       baseline_url = svn_ra_serf__get_ver_prop(props, vcc_url, revision,
@@ -965,7 +971,7 @@
                                     "requested checked-in value"));
         }
 
-      SVN_ERR(svn_ra_serf__retrieve_props(props, session, session->conns[0],
+      SVN_ERR(svn_ra_serf__retrieve_props(props, session, conn,
                                           baseline_url, revision, "0",
                                           baseline_props, pool));
       basecoll_url = svn_ra_serf__get_ver_prop(props, baseline_url, revision,

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/ra_serf.h?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/ra_serf.h Sat Dec 12 14:38:38 2009
@@ -1041,12 +1041,16 @@
  * REVISION was set to SVN_INVALID_REVNUM, this will return the current
  * HEAD revision.
  *
+ * If non-NULL, use CONN for communications with the server;
+ * otherwise, use the default connection.
+ *
  * Use POOL for all allocations.
  */
 svn_error_t *
 svn_ra_serf__get_baseline_info(const char **bc_url,
                                const char **bc_relative,
                                svn_ra_serf__session_t *session,
+                               svn_ra_serf__connection_t *conn,
                                const char *url,
                                svn_revnum_t revision,
                                svn_revnum_t *latest_revnum,

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/serf.c?rev=889935&r1=889934&r2=889935&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/serf.c Sat Dec 12 14:38:38 2009
@@ -628,8 +628,8 @@
   const char *relative_url, *basecoll_url;
   svn_ra_serf__session_t *session = ra_session->priv;
 
-  return svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                        session, session->repos_url.path,
+  return svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
+                                        NULL, session->repos_url.path,
                                         SVN_INVALID_REVNUM, latest_revnum,
                                         pool);
 }
@@ -717,7 +717,7 @@
       const char *relative_url, *basecoll_url;
 
       SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                             session, path,
+                                             session, NULL, path,
                                              revision, NULL, pool));
 
       /* We will try again with our new path; however, we're now
@@ -988,7 +988,7 @@
       const char *relative_url, *basecoll_url;
 
       SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url,
-                                             session, path, revision,
+                                             session, NULL, path, revision,
                                              fetched_rev, pool));
 
       path = svn_path_url_add_component(basecoll_url, relative_url, pool);