And with the right MIME types... Daniel Shahaf wrote on Mon, Feb 27, 2012 at 04:41:42 +0200: > danie...@apache.org 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
#!/bin/sh set -eux
fail(){ echo "$@" >&2 exit 1 } pgrep svnserve || fail "Run \$SVNSERVE -dr $(pwd)" U_local=file://$(pwd)/r1 U_ra=svn://localhost/r1 U_mirror=file://$(pwd)/r2 ra_flags="--username=harry --password=h --no-auth-cache --config-dir=$(pwd)/cfg" rm -rf r1 r2 wc1 cfg $SVNADMIN create r1 cat <<EOF > r1/conf/svnserve.conf [general] anon-access = read auth-access = write passwd-db = passwd authz-db = authz EOF cat <<EOF > r1/conf/passwd [users] harry = h EOF cat <<EOF > r1/conf/authz [/] * = r [/A] * = EOF $SVN mkdir -q -mm $U_local/A $SVNMUCC -mr2 -U $U_local cp HEAD / branch rm branch/A $SVN log -v $U_local $SVN log -v $U_ra $ra_flags $SVNADMIN create r2 ln -s $(which true) r2/hooks/pre-revprop-change $SVNSYNC init $U_mirror $U_ra $ra_flags $SVNSYNC sync $U_mirror $U_ra $ra_flags
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