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 2010/01/20 21:04:00 UTC
svn commit: r901358 - in /subversion/branches/1.6.x: ./ CHANGES STATUS
subversion/libsvn_ra_neon/commit.c
Author: hwright
Date: Wed Jan 20 20:04:00 2010
New Revision: 901358
URL: http://svn.apache.org/viewvc?rev=901358&view=rev
Log:
Merge r900797 from trunk:
* r900797
Fix the vague commit failure when committed via the out-of-date mirror
which is out-of-date by irrelevant revisions elsewhere in the repository.
Justification:
We see this ourself after moving to ASF often on european mirror.
Votes:
+1: kameshj, rhuijben, cmpilato
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_neon/commit.c
Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 20 20:04:00 2010
@@ -54,4 +54,4 @@
/subversion/branches/tc_url_rev:870696-870828
/subversion/branches/tree-conflicts:864636-869499
/subversion/branches/tree-conflicts-notify:870271-870353
-/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880474,880525-880526,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522
+/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880474,880525-880526,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522,900797
Propchange: subversion/branches/1.6.x/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 20 20:04:00 2010
@@ -53,4 +53,4 @@
/subversion/branches/tc_url_rev/CHANGES:870696-870828
/subversion/branches/tree-conflicts/CHANGES:864636-869499
/subversion/branches/tree-conflicts-notify/CHANGES:870271-870353
-/subversion/trunk/CHANGES:875962-898462
+/subversion/trunk/CHANGES:875962-898462,900797
Modified: subversion/branches/1.6.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=901358&r1=901357&r2=901358&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Wed Jan 20 20:04:00 2010
@@ -208,12 +208,3 @@
Approved changes:
=================
-
- * r900797
- Fix the vague commit failure when committed via the out-of-date mirror
- which is out-of-date by irrelevant revisions elsewhere in the repository.
- Justification:
- We see this ourself after moving to ASF often on european mirror.
- Votes:
- +1: kameshj, rhuijben, cmpilato
-
Modified: subversion/branches/1.6.x/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_neon/commit.c?rev=901358&r1=901357&r2=901358&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_neon/commit.c Wed Jan 20 20:04:00 2010
@@ -42,6 +42,7 @@
#include "ra_neon.h"
+#define APPLY_TO_VERSION "<D:apply-to-version/>"
/*
** version_rsrc_t: identify the relevant pieces of a resource on the server
**
@@ -393,6 +394,7 @@
const char *vsn_url,
svn_boolean_t allow_404,
const char *token,
+ svn_boolean_t is_vcc,
int *code,
const char **locn,
apr_pool_t *pool)
@@ -417,7 +419,9 @@
"<D:checkout xmlns:D=\"DAV:\">"
"<D:activity-set>"
"<D:href>%s</D:href>"
- "</D:activity-set></D:checkout>", cc->activity_url);
+ "</D:activity-set>%s</D:checkout>",
+ cc->activity_url,
+ is_vcc ? APPLY_TO_VERSION: "");
if (token)
{
@@ -453,6 +457,7 @@
version_rsrc_t *rsrc,
svn_boolean_t allow_404,
const char *token,
+ svn_boolean_t is_vcc,
apr_pool_t *pool)
{
int code;
@@ -467,7 +472,8 @@
}
/* check out the Version Resource */
- err = do_checkout(cc, rsrc->vsn_url, allow_404, token, &code, &locn, pool);
+ err = do_checkout(cc, rsrc->vsn_url, allow_404, token,
+ is_vcc, &code, &locn, pool);
/* possibly run the request again, with a re-fetched Version Resource */
if (err == NULL && allow_404 && code == 404)
@@ -478,7 +484,8 @@
SVN_ERR(get_version_url(cc, NULL, rsrc, TRUE, pool));
/* do it again, but don't allow a 404 this time */
- err = do_checkout(cc, rsrc->vsn_url, FALSE, token, &code, &locn, pool);
+ err = do_checkout(cc, rsrc->vsn_url, FALSE, token,
+ is_vcc, &code, &locn, pool);
}
/* special-case when conflicts occur */
@@ -705,7 +712,8 @@
}
/* get the URL to the working collection */
- SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE, NULL, pool));
+ SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE,
+ NULL, FALSE, pool));
/* create the URL for the child resource */
child = svn_path_url_add_component(parent->rsrc->wr_url, name, pool);
@@ -841,7 +849,8 @@
/* check out the parent resource so that we can create the new collection
as one of its children. */
- SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE, NULL, dir_pool));
+ SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE,
+ NULL, FALSE, dir_pool));
/* create a child object that contains all the resource urls */
child = apr_pcalloc(dir_pool, sizeof(*child));
@@ -953,7 +962,7 @@
record_prop_change(dir->pool, dir, name, value);
/* do the CHECKOUT sooner rather than later */
- SVN_ERR(checkout_resource(dir->cc, dir->rsrc, TRUE, NULL, pool));
+ SVN_ERR(checkout_resource(dir->cc, dir->rsrc, TRUE, NULL, FALSE, pool));
/* Add this path to the valid targets hash. */
add_valid_target(dir->cc, dir->rsrc->local_path, svn_nonrecursive);
@@ -994,7 +1003,8 @@
*/
/* Do the parent CHECKOUT first */
- SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE, NULL, workpool));
+ SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE,
+ NULL, FALSE, workpool));
/* Construct a file_baton that contains all the resource urls. */
file = apr_pcalloc(file_pool, sizeof(*file));
@@ -1133,7 +1143,7 @@
/* do the CHECKOUT now. we'll PUT the new file contents later on. */
SVN_ERR(checkout_resource(parent->cc, file->rsrc, TRUE,
- file->token, workpool));
+ file->token, FALSE, workpool));
/* ### wait for apply_txdelta before doing a PUT. it might arrive a
### "long time" from now. certainly after many other operations, so
@@ -1240,7 +1250,8 @@
record_prop_change(file->pool, file, name, value);
/* do the CHECKOUT sooner rather than later */
- SVN_ERR(checkout_resource(file->cc, file->rsrc, TRUE, file->token, pool));
+ SVN_ERR(checkout_resource(file->cc, file->rsrc, TRUE,
+ file->token, FALSE, pool));
/* Add this path to the valid targets hash. */
add_valid_target(file->cc, file->rsrc->local_path, svn_nonrecursive);
@@ -1376,8 +1387,7 @@
apr_pool_t *pool)
{
const char *vcc;
- const svn_string_t *baseline_url;
- version_rsrc_t baseline_rsrc = { SVN_INVALID_REVNUM };
+ version_rsrc_t vcc_rsrc = { SVN_INVALID_REVNUM };
svn_error_t *err = NULL;
int retry_count = 5;
@@ -1387,24 +1397,17 @@
/* fetch the DAV:version-controlled-configuration from the session's URL */
SVN_ERR(svn_ra_neon__get_vcc(&vcc, cc->ras, cc->ras->root.path, pool));
- /* ### we should use DAV:apply-to-version on the CHECKOUT so we can skip
- ### retrieval of the baseline */
do {
svn_error_clear(err);
- /* Get the latest baseline from VCC's DAV:checked-in property.
- This should give us the HEAD revision of the moment. */
- SVN_ERR(svn_ra_neon__get_one_prop(&baseline_url, cc->ras,
- vcc, NULL,
- &svn_ra_neon__checked_in_prop, pool));
- baseline_rsrc.pool = pool;
- baseline_rsrc.vsn_url = baseline_url->data;
+ vcc_rsrc.pool = pool;
+ vcc_rsrc.vsn_url = vcc;
/* To set the revision properties, we must checkout the latest baseline
and get back a mutable "working" baseline. */
- err = checkout_resource(cc, &baseline_rsrc, FALSE, NULL, pool);
+ err = checkout_resource(cc, &vcc_rsrc, FALSE, NULL, TRUE, pool);
/* There's a small chance of a race condition here, if apache is
experiencing heavy commit concurrency or if the network has
@@ -1424,7 +1427,7 @@
if (err)
return err;
- return svn_ra_neon__do_proppatch(cc->ras, baseline_rsrc.wr_url, revprop_table,
+ return svn_ra_neon__do_proppatch(cc->ras, vcc_rsrc.wr_url, revprop_table,
NULL, NULL, pool);
}