You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/11/10 16:17:48 UTC
svn commit: r1033508 - in /subversion/trunk/subversion: svnsync/main.c
tests/cmdline/svnsync_tests.py
Author: danielsh
Date: Wed Nov 10 15:17:47 2010
New Revision: 1033508
URL: http://svn.apache.org/viewvc?rev=1033508&view=rev
Log:
Fix issue #3728: 'svnsync copy-revprops' doesn't sync revprop deletions.
(Note, I didn't manually check the effects of this; I verified that
it makes the test XPASS, and I'm trusting C-Mike beyond that.)
* subversion/svnsync/main.c
(remove_props_not_in_source):
Add logic to avoid removing svn:sync-lock.
(do_copy_revprops):
Ask copy_revprops() to sync property deletions.
* subversion/tests/cmdline/svnsync_tests.py
(test_list): Expect delete_revprops() to pass.
Modified:
subversion/trunk/subversion/svnsync/main.c
subversion/trunk/subversion/tests/cmdline/svnsync_tests.py
Modified: subversion/trunk/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/main.c?rev=1033508&r1=1033507&r2=1033508&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/main.c (original)
+++ subversion/trunk/subversion/svnsync/main.c Wed Nov 10 15:17:47 2010
@@ -530,6 +530,8 @@ check_if_session_is_at_repos_root(svn_ra
/* Remove the properties in TARGET_PROPS but not in SOURCE_PROPS from
* revision REV of the repository associated with RA session SESSION.
*
+ * For REV zero, don't remove properties with the "svn:sync-" prefix.
+ *
* All allocations will be done in a subpool of POOL.
*/
static svn_error_t *
@@ -550,6 +552,10 @@ remove_props_not_in_source(svn_ra_sessio
svn_pool_clear(subpool);
+ if (rev == 0 && !strncmp(propname, SVNSYNC_PROP_PREFIX,
+ sizeof(SVNSYNC_PROP_PREFIX) - 1))
+ continue;
+
/* Delete property if the name can't be found in SOURCE_PROPS. */
if (! apr_hash_get(source_props, propname, APR_HASH_KEY_STRING))
SVN_ERR(svn_ra_change_rev_prop2(session, rev, propname, NULL,
@@ -1487,7 +1493,7 @@ do_copy_revprops(svn_ra_session_t *to_se
{
int normalized_count;
SVN_ERR(check_cancel(NULL));
- SVN_ERR(copy_revprops(from_session, to_session, i, FALSE,
+ SVN_ERR(copy_revprops(from_session, to_session, i, TRUE,
baton->quiet, &normalized_count, pool));
normalized_rev_props_count += normalized_count;
}
Modified: subversion/trunk/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnsync_tests.py?rev=1033508&r1=1033507&r2=1033508&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnsync_tests.py Wed Nov 10 15:17:47 2010
@@ -868,7 +868,7 @@ test_list = [ None,
delete_svn_props,
commit_a_copy_of_root,
descend_into_replace,
- XFail(delete_revprops),
+ delete_revprops,
]
serial_only = True