Author: philip
Date: Fri Jul 2 11:20:02 2010
New Revision: 959952
URL: http://svn.apache.org/viewvc?rev=959952&view=rev
Log:
Add regression tests for wc-to-wc copy with excluded nodes.
* subversion/tests/cmdline/authz_tests.py
(wc_wc_copy, wc_wc_copy_revert): New.
(test_list): Add new tests.
Modified:
subversion/trunk/subversion/tests/cmdline/authz_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/authz_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/authz_tests.py?rev=959952&r1=959951&r2=959952&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/authz_tests.py Fri Jul 2
11:20:02 2010
@@ -973,6 +973,55 @@ def multiple_matches(sbox):
'-m', 'second copy',
root_url, root_url + '/second')
+def wc_wc_copy(sbox):
+ "wc-to-wc copy with absent nodes"
+
+ sbox.build(create_wc = False)
+ local_dir = sbox.wc_dir
+ write_restrictive_svnserve_conf(sbox.repo_dir)
+
+ write_authz_file(sbox, {'/' : '* = r',
+ '/A/B/E' : '* =', })
+
+ expected_output = svntest.main.greek_state.copy()
+ expected_output.wc_dir = local_dir
+ expected_output.tweak(status='A ', contents=None)
+ expected_output.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
+ expected_wc = svntest.main.greek_state.copy()
+ expected_wc.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
+
+ svntest.actions.run_and_verify_checkout(sbox.repo_url, local_dir,
+ expected_output,
+ expected_wc)
+
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: Cannot copy.*excluded by server',
+ 'cp', sbox.ospath('A'), sbox.ospath('A2'))
+
+ # The copy failed and A2/B/E is incomplete. That means A2 and A2/B
+ # are complete, but for the other parts of A2 the status is undefined.
+ expected_output = svntest.verify.ExpectedOutput(
+ ['A + - 1 jrandom ' + sbox.ospath('A2') + '\n',
+ ' + - 1 jrandom ' + sbox.ospath('A2/B') + '\n',
+ '! ? ? ? ' + sbox.ospath('A2/B/E') +
'\n',
+ ])
+ expected_output.match_all = False
+
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'st', '--verbose', sbox.ospath('A2'))
+
+def wc_wc_copy_revert(sbox):
+ "wc-to-wc-copy with absent nodes and then revert"
+
+ wc_wc_copy(sbox)
+
+ # Fails with a "No write-lock" error, as does "rm --force", on a
+ # path under A2. Multiple repeats fail on different paths until the
+ # command completes.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'revert', '--recursive',
sbox.ospath('A2'))
+
+
########################################################################
# Run the tests
@@ -1001,6 +1050,8 @@ test_list = [ None,
Skip(authz_access_required_at_repo_root2,
svntest.main.is_ra_type_file),
Skip(multiple_matches, svntest.main.is_ra_type_file),
+ Skip(wc_wc_copy, svntest.main.is_ra_type_file),
+ XFail(Skip(wc_wc_copy_revert, svntest.main.is_ra_type_file)),
]
if __name__ == '__main__':