[email protected] wrote on Mon, Feb 27, 2012 at 02:30:38 -0000: > Author: danielsh > Date: Mon Feb 27 02:30:37 2012 > New Revision: 1293998 > > URL: http://svn.apache.org/viewvc?rev=1293998&view=rev > Log: > Fix issue #4121: svnsync of a copy followed by delete of was-unreadable child. http://subversion.tigris.org/issues/show_bug.cgi?id=4121 > > * subversion/libsvn_repos/replay.c > (was_readable): New helper. > (path_driver_cb_func): > Use new helper to determine whether to replay or discard deletions.
I've been trying to write a regression test for this, but got stuck
converting my shell script to Python.
I have a shellscript (attached) that reproduces the issue for me: with
r1293997 it outputs
Copied properties for revision 1.
subversion/libsvn_ra_svn/client.c:2440: (apr_err=210008)
svnsync: E210008: Error while replaying commit
zsh: exit 1 ./01repro
I am also attaching an attempt at an equivalent Python test. For me the
Python test passes against r1293997. Can anyone spot the difference?
Thanks,
Daniel
repro.sh
Description: Bourne shell script
Index: subversion/tests/cmdline/svnsync_tests.py
===================================================================
--- subversion/tests/cmdline/svnsync_tests.py (revision 1293992)
+++ subversion/tests/cmdline/svnsync_tests.py (working copy)
@@ -1029,10 +1029,40 @@ def fd_leak_sync_from_serf_to_local(sbox):
resource.setrlimit(resource.RLIMIT_NOFILE, (128, 128))
run_test(sbox, "largemods.dump", is_src_ra_local=None, is_dest_ra_local=True)
-########################################################################
-# Run the tests
+@Issue(4121)
+@Skip(svntest.main.is_ra_type_file)
+def copy_delete_unreadable_child(sbox):
+ "copy, then rm at-src-unreadable child"
+ ## Prepare the source: Greek tree (r1), cp+rm (r2).
+ sbox.build("copy-delete-unreadable-child")
+ svntest.actions.run_and_verify_svnmucc(None, None, [],
+ '-m', 'r2',
+ '-U', sbox.repo_url,
+ 'cp', 'HEAD', '/', 'branch',
+ 'rm', 'branch/A')
+ ## Create the destination.
+ dest_sbox = sbox.clone_dependent()
+ build_repos(dest_sbox)
+ svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
+
+ ## Lock down the source.
+ write_restrictive_svnserve_conf(sbox.repo_dir, anon_access='read')
+ svntest.main.file_write(sbox.authz_file,
+ "[copy-delete-unreadable-child:/]\n"
+ "* = r\n"
+ "[copy-delete-unreadable-child:/A]\n"
+ "* = \n"
+ )
+
+ dest_url = svntest.main.file_scheme_prefix \
+ + svntest.main.pathname2url(os.path.abspath(dest_sbox.repo_dir))
+ run_init(dest_url, sbox.repo_url)
+ run_sync(dest_url)
+
+######################################################################## # Run the tests
+
# list all tests here, starting with None:
test_list = [ None,
copy_and_modify,
@@ -1070,6 +1100,7 @@ test_list = [ None,
descend_into_replace,
delete_revprops,
fd_leak_sync_from_serf_to_local, # calls setrlimit
+ copy_delete_unreadable_child,
]
serial_only = True

