Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/tests/cmdline/copy_tests.py view on Meta::CPAN
expected_status,
None, wc_dir)
# Now copy the directory back.
E_url = sbox.repo_url + "/A/B/E@1"
svntest.actions.run_and_verify_svn(None, None, [],
'copy', E_url, E_path)
expected_status.add({
'A/B/E' : Item(status='A ', copied='+', wc_rev='-'),
'A/B/E/alpha' : Item(status=' ', copied='+', wc_rev='-'),
'A/B/E/beta' : Item(status=' ', copied='+', wc_rev='-'),
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
expected_status.add({
'A/B/E' : Item(status='A ', copied='+', wc_rev='-'),
'A/B/E/alpha' : Item(status=' ', copied='+', wc_rev='-'),
'A/B/E/beta' : Item(status=' ', copied='+', wc_rev='-'),
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
#----------------------------------------------------------------------
# Regression test for issue 1814
@Issue(1814)
def double_uri_escaping_1814(sbox):
"check for double URI escaping in svn ls -R"
sbox.build(create_wc = False)
base_url = sbox.repo_url + '/base'
# rev. 2
svntest.actions.run_and_verify_svn(None, None, [],
'mkdir', '-m', 'mybase',
base_url)
orig_url = base_url + '/foo%20bar'
# rev. 3
svntest.actions.run_and_verify_svn(None, None, [],
'mkdir', '-m', 'r1',
orig_url)
orig_rev = 3
# rev. 4
new_url = base_url + '/foo_bar'
svntest.actions.run_and_verify_svn(None, None, [],
'mv', '-m', 'r2',
orig_url, new_url)
# This had failed with ra_neon because "foo bar" would be double-encoded
# "foo bar" ==> "foo%20bar" ==> "foo%2520bar"
svntest.actions.run_and_verify_svn(None, None, [],
'ls', ('-r'+str(orig_rev)),
'-R', base_url)
#----------------------------------------------------------------------
# Regression test for issues 2404
@Issue(2404)
def wc_to_wc_copy_between_different_repos(sbox):
"wc to wc copy attempts between different repos"
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
sbox2 = sbox.clone_dependent()
sbox2.build()
wc2_dir = sbox2.wc_dir
# Attempt a copy between different repositories.
exit_code, out, err = svntest.main.run_svn(1, 'cp',
os.path.join(wc2_dir, 'A'),
sbox.ospath('A/B'))
for line in err:
if line.find("it is not from repository") != -1:
break
else:
raise svntest.Failure
#----------------------------------------------------------------------
# Regression test for issues 2101, 2020 and 3776
@Issues(2101,2020,3776)
def wc_to_wc_copy_deleted(sbox):
"wc to wc copy with presence=not-present items"
sbox.build()
wc_dir = sbox.wc_dir
B_path = sbox.ospath('A/B')
B2_path = sbox.ospath('A/B2')
# Schedule for delete
svntest.actions.run_and_verify_svn(None, None, [], 'rm',
os.path.join(B_path, 'E', 'alpha'),
os.path.join(B_path, 'lambda'),
os.path.join(B_path, 'F'))
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/B/E/alpha', 'A/B/lambda', 'A/B/F', status='D ')
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Commit to get state not-present
expected_status.remove('A/B/E/alpha', 'A/B/lambda', 'A/B/F')
expected_output = svntest.wc.State(wc_dir, {
'A/B/E/alpha' : Item(verb='Deleting'),
'A/B/lambda' : Item(verb='Deleting'),
'A/B/F' : Item(verb='Deleting'),
})
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
None, wc_dir)
# Copy including stuff in state not-present
svntest.actions.run_and_verify_svn(None, None, [], 'copy', B_path, B2_path)
expected_status.add({
'A/B2' : Item(status='A ', wc_rev='-', copied='+'),
'A/B2/E' : Item(status=' ', wc_rev='-', copied='+'),
'A/B2/E/beta' : Item(status=' ', wc_rev='-', copied='+'),
'A/B2/E/alpha' : Item(status='D ', wc_rev='-', copied='+'),
( run in 0.666 second using v1.01-cache-2.11-cpan-39bf76dae61 )