You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/12/25 12:46:33 UTC
svn commit: r1553370 - /subversion/trunk/subversion/svnsync/svnsync.c
Author: rhuijben
Date: Wed Dec 25 11:46:32 2013
New Revision: 1553370
URL: http://svn.apache.org/r1553370
Log:
Following up on r1553369, avoid an additional request at the end of every
revision sync in svnsync for atomic revprop change capable servers by passing
the revision of the just synced revision as old value.
* subversion/svnsync/svnsync.c
(replay_baton_t): Add boolean.
(replay_rev_finished): When the repository supports atomic revision property
changes pass old value when the sync is done.
(do_synchronize): Retrieve atomic revision property changes capability.
Modified:
subversion/trunk/subversion/svnsync/svnsync.c
Modified: subversion/trunk/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1553370&r1=1553369&r2=1553370&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Wed Dec 25 11:46:32 2013
@@ -968,6 +968,7 @@ typedef struct replay_baton_t {
svn_revnum_t current_revision;
subcommand_baton_t *sb;
svn_boolean_t has_commit_revprops_capability;
+ svn_boolean_t has_atomic_revprops_capability;
int normalized_rev_props_count;
int normalized_node_props_count;
const char *to_root;
@@ -1295,6 +1296,7 @@ replay_rev_finished(svn_revnum_t revisio
apr_hash_t *filtered, *existing_props;
int filtered_count;
int normalized_count;
+ svn_string_t *rev_str;
SVN_ERR(editor->close_edit(edit_baton, pool));
@@ -1334,21 +1336,24 @@ replay_rev_finished(svn_revnum_t revisio
svn_pool_clear(subpool);
+ rev_str = svn_string_create(apr_psprintf(pool, "%ld", revision), subpool);
+
/* Ok, we're done, bring the last-merged-rev property up to date. */
SVN_ERR(svn_ra_change_rev_prop2(
rb->to_session,
0,
SVNSYNC_PROP_LAST_MERGED_REV,
NULL,
- svn_string_create(apr_psprintf(pool, "%ld", revision),
- subpool),
+ rev_str,
subpool));
/* And finally drop the currently copying prop, since we're done
with this revision. */
SVN_ERR(svn_ra_change_rev_prop2(rb->to_session, 0,
SVNSYNC_PROP_CURRENTLY_COPYING,
- NULL, NULL, subpool));
+ rb->has_atomic_revprops_capability
+ ? &rev_str : NULL,
+ NULL, subpool));
/* Notify the user that we copied revision properties. */
if (! rb->sb->quiet)
@@ -1478,6 +1483,11 @@ do_synchronize(svn_ra_session_t *to_sess
SVN_RA_CAPABILITY_COMMIT_REVPROPS,
pool));
+ SVN_ERR(svn_ra_has_capability(rb->to_session,
+ &rb->has_atomic_revprops_capability,
+ SVN_RA_CAPABILITY_ATOMIC_REVPROPS,
+ pool));
+
start_revision = last_merged + 1;
end_revision = from_latest;