Author: rhuijben
Date: Tue Sep 21 11:11:22 2010
New Revision: 999312
URL: http://svn.apache.org/viewvc?rev=999312&view=rev
Log:
Fix the serf specific test failures in the svnrdump test by making serf
properly retrieve revision properties for svn_ra_replay_range when using
HTTPv2. (This leaves the same list of test failures as neon).
When using HTTPv2 revision properties should be retrieved using the 'rev'
stub, while before this patch the properties were retrieved on the 'me'
stub. (Before HTTPv2 reports and revision property requests were run
against the same VCC stub)
* subversion/libsvn_ra_serf/replay.c
(replay_context_t): Store revision property target and revision.
(start_replay): Retrieve properties from the revision property target
instead of from the report target.
(svn_ra_serf__replay_range): Calculate the target to perform the
revprop request on.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/replay.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/replay.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/replay.c?rev=999312&r1=999311&r2=999312&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/replay.c Tue Sep 21 11:11:22 2010
@@ -118,6 +118,10 @@ typedef struct replay_context_t {
/* Cached report target url */
const char *report_target;
+ /* Target and revision to fetch revision properties on */
+ const char *revprop_target;
+ svn_revnum_t revprop_rev;
+
/* Revision properties for this revision. */
apr_hash_t *revs_props;
apr_hash_t *props;
@@ -190,8 +194,8 @@ start_replay(svn_ra_serf__xml_parser_t *
/* Create a pool for the commit editor. */
ctx->dst_rev_pool = svn_pool_create(ctx->src_rev_pool);
ctx->props = apr_hash_make(ctx->dst_rev_pool);
- SVN_ERR(svn_ra_serf__walk_all_props(ctx->revs_props, ctx->report_target,
- ctx->revision,
+ SVN_ERR(svn_ra_serf__walk_all_props(ctx->revs_props, ctx->revprop_target,
+ ctx->revprop_rev,
svn_ra_serf__set_bare_props,
ctx->props, ctx->dst_rev_pool));
if (ctx->revstart_func)
@@ -758,10 +762,25 @@ svn_ra_serf__replay_range(svn_ra_session
/* Request all properties of a certain revision. */
replay_ctx->report_target = report_target;
replay_ctx->revs_props = apr_hash_make(replay_ctx->src_rev_pool);
+
+ if (SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(session))
+ {
+ replay_ctx->revprop_target = apr_psprintf(pool, "%s/%ld",
+ session->rev_stub, rev);
+ replay_ctx->revprop_rev = SVN_INVALID_REVNUM;
+ }
+ else
+ {
+ replay_ctx->revprop_target = report_target;
+ replay_ctx->revprop_rev = rev;
+ }
+
SVN_ERR(svn_ra_serf__deliver_props(&prop_ctx,
replay_ctx->revs_props, session,
- session->conns[0], report_target,
- rev, "0", all_props,
+ session->conns[0],
+ replay_ctx->revprop_target,
+ replay_ctx->revprop_rev,
+ "0", all_props,
TRUE, NULL,
replay_ctx->src_rev_pool));