You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/06/26 21:28:22 UTC
svn commit: r1354186 [28/33] - in /subversion/branches/inheritable-props: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/ contrib/server-side/ notes/
notes/api-errata/1.8/ notes/directory-i...
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/copy_tests.py?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/copy_tests.py Tue Jun 26 19:26:49 2012
@@ -63,7 +63,7 @@ or a url (when false) copy source is use
wc_dir = sbox.wc_dir
# File scheduled for deletion
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', rho_path)
# Status before attempting copies
@@ -73,7 +73,7 @@ or a url (when false) copy source is use
# The copy shouldn't fail
if wc_copy:
- pi_src = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+ pi_src = sbox.ospath('A/D/G/pi')
else:
pi_src = sbox.repo_url + '/A/D/G/pi'
@@ -107,12 +107,12 @@ def copy_replace_with_props(sbox, wc_cop
# Use a temp file to set properties with wildcards in their values
# otherwise Win32/VS2005 will expand them
- prop_path = os.path.join(wc_dir, 'proptmp')
+ prop_path = sbox.ospath('proptmp')
svntest.main.file_append(prop_path, '*')
# Set props on file which is copy-source later on
- pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ pi_path = sbox.ospath('A/D/G/pi')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.actions.run_and_verify_svn(None, None, [],
'ps', 'phony-prop', '-F',
prop_path, pi_path)
@@ -156,7 +156,7 @@ def copy_replace_with_props(sbox, wc_cop
# The copy shouldn't fail
if wc_copy:
- pi_src = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+ pi_src = sbox.ospath('A/D/G/pi')
else:
pi_src = sbox.repo_url + '/A/D/G/pi'
@@ -270,14 +270,14 @@ def basic_copy_and_move_files(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- iota_path = os.path.join(wc_dir, 'iota')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- D_path = os.path.join(wc_dir, 'A', 'D')
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
- H_path = os.path.join(wc_dir, 'A', 'D', 'H')
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
- alpha2_path = os.path.join(wc_dir, 'A', 'C', 'alpha2')
+ mu_path = sbox.ospath('A/mu')
+ iota_path = sbox.ospath('iota')
+ rho_path = sbox.ospath('A/D/G/rho')
+ D_path = sbox.ospath('A/D')
+ alpha_path = sbox.ospath('A/B/E/alpha')
+ H_path = sbox.ospath('A/D/H')
+ F_path = sbox.ospath('A/B/F')
+ alpha2_path = sbox.ospath('A/C/alpha2')
# Make local mods to mu and rho
svntest.main.file_append(mu_path, 'appended mu text')
@@ -371,8 +371,8 @@ def receive_copy_in_update(sbox):
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Define a zillion paths in both working copies.
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
- newG_path = os.path.join(wc_dir, 'A', 'B', 'newG')
+ G_path = sbox.ospath('A/D/G')
+ newG_path = sbox.ospath('A/B/newG')
# Copy directory A/D to A/B/newG
svntest.actions.run_and_verify_svn(None, None, [], 'cp', G_path, newG_path)
@@ -449,7 +449,7 @@ def resurrect_deleted_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+ G_path = sbox.ospath('A/D/G')
# Delete directory A/D/G, commit that as r2.
svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--force',
@@ -502,7 +502,7 @@ def copy_deleted_dir_into_prefix(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- D_path = os.path.join(wc_dir, 'A', 'D')
+ D_path = sbox.ospath('A/D')
# Delete directory A/D, commit that as r2.
svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--force',
@@ -577,7 +577,7 @@ def no_wc_copy_overwrites(sbox):
wc_dir = sbox.wc_dir
# File simply missing
- tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
+ tau_path = sbox.ospath('A/D/G/tau')
os.remove(tau_path)
# Status before attempting copies
@@ -586,8 +586,8 @@ def no_wc_copy_overwrites(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# These copies should fail
- pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ pi_path = sbox.ospath('A/D/G/pi')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
'cp', pi_path, rho_path)
svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
@@ -606,13 +606,13 @@ def copy_modify_commit(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- B_path = os.path.join(wc_dir, 'A', 'B')
- B2_path = os.path.join(wc_dir, 'A', 'B2')
+ B_path = sbox.ospath('A/B')
+ B2_path = sbox.ospath('A/B2')
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
B_path, B2_path)
- alpha_path = os.path.join(wc_dir, 'A', 'B2', 'E', 'alpha')
+ alpha_path = sbox.ospath('A/B2/E/alpha')
svntest.main.file_append(alpha_path, "modified alpha")
expected_output = svntest.wc.State(wc_dir, {
@@ -638,7 +638,7 @@ def copy_files_with_properties(sbox):
wc_dir = sbox.wc_dir
# Set a property on a file
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.actions.run_and_verify_svn(None, None, [],
'propset', 'pname', 'pval', rho_path)
@@ -657,12 +657,12 @@ def copy_files_with_properties(sbox):
'propset', 'pname2', 'pval2', rho_path)
# WC to WC copy of file with committed and uncommitted properties
- rho_wc_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho_wc')
+ rho_wc_path = sbox.ospath('A/D/G/rho_wc')
svntest.actions.run_and_verify_svn(None, None, [],
'copy', rho_path, rho_wc_path)
# REPOS to WC copy of file with properties
- rho_url_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho_url')
+ rho_url_path = sbox.ospath('A/D/G/rho_url')
rho_url = sbox.repo_url + '/A/D/G/rho'
svntest.actions.run_and_verify_svn(None, None, [],
'copy', rho_url, rho_url_path)
@@ -708,16 +708,16 @@ def copy_delete_commit(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- B_path = os.path.join(wc_dir, 'A', 'B')
- B2_path = os.path.join(wc_dir, 'A', 'B2')
+ B_path = sbox.ospath('A/B')
+ B2_path = sbox.ospath('A/B2')
# copy a tree
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
B_path, B2_path)
# delete two files
- lambda_path = os.path.join(wc_dir, 'A', 'B2', 'lambda')
- alpha_path = os.path.join(wc_dir, 'A', 'B2', 'E', 'alpha')
+ lambda_path = sbox.ospath('A/B2/lambda')
+ alpha_path = sbox.ospath('A/B2/E/alpha')
svntest.actions.run_and_verify_svn(None, None, [],
'rm', alpha_path, lambda_path)
@@ -735,11 +735,11 @@ def copy_delete_commit(sbox):
# copy a tree
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
- os.path.join(wc_dir, 'A', 'B'),
- os.path.join(wc_dir, 'A', 'B3'))
+ sbox.ospath('A/B'),
+ sbox.ospath('A/B3'))
# delete a directory
- E_path = os.path.join(wc_dir, 'A', 'B3', 'E')
+ E_path = sbox.ospath('A/B3/E')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', E_path)
# commit copied tree containing a deleted directory
@@ -761,8 +761,8 @@ def mv_and_revert_directory(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ E_path = sbox.ospath('A/B/E')
+ F_path = sbox.ospath('A/B/F')
new_E_path = os.path.join(F_path, 'E')
# Issue 931: move failed to lock the directory being deleted
@@ -797,8 +797,8 @@ def copy_preserve_executable_bit(sbox):
wc_dir = sbox.wc_dir
# Create two paths
- newpath1 = os.path.join(wc_dir, 'newfile1')
- newpath2 = os.path.join(wc_dir, 'newfile2')
+ newpath1 = sbox.ospath('newfile1')
+ newpath2 = sbox.ospath('newfile2')
# Create the first file.
svntest.main.file_append(newpath1, "a new file")
@@ -841,13 +841,13 @@ def wc_to_repos(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- beta_path = os.path.join(wc_dir, "A", "B", "E", "beta")
+ beta_path = sbox.ospath('A/B/E/beta')
beta2_url = sbox.repo_url + "/A/B/E/beta2"
- H_path = os.path.join(wc_dir, "A", "D", "H")
+ H_path = sbox.ospath('A/D/H')
H2_url = sbox.repo_url + "/A/D/H2"
# modify some items to be copied
- svntest.main.file_append(os.path.join(wc_dir, 'A', 'D', 'H', 'omega'),
+ svntest.main.file_append(sbox.ospath('A/D/H/omega'),
"new otext\n")
svntest.actions.run_and_verify_svn(None, None, [], 'propset', 'foo', 'bar',
beta_path)
@@ -924,7 +924,7 @@ def repos_to_wc(sbox):
# we should get some scheduled additions *with history*.
E_url = sbox.repo_url + "/A/B/E"
pi_url = sbox.repo_url + "/A/D/G/pi"
- pi_path = os.path.join(wc_dir, 'pi')
+ pi_path = sbox.ospath('pi')
svntest.actions.run_and_verify_svn(None, None, [], 'copy', E_url, wc_dir)
svntest.actions.run_and_verify_svn(None, None, [], 'copy', pi_url, wc_dir)
@@ -956,7 +956,7 @@ def repos_to_wc(sbox):
# Revert everything and verify.
svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
- svntest.main.safe_rmtree(os.path.join(wc_dir, 'E'))
+ svntest.main.safe_rmtree(sbox.ospath('E'))
expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
svntest.actions.run_and_verify_status(wc_dir, expected_output)
@@ -976,7 +976,7 @@ def repos_to_wc(sbox):
# Revert everything and verify.
svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
- svntest.main.safe_rmtree(os.path.join(wc_dir, 'C'))
+ svntest.main.safe_rmtree(sbox.ospath('C'))
expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
svntest.actions.run_and_verify_status(wc_dir, expected_output)
@@ -1009,7 +1009,7 @@ def repos_to_wc(sbox):
# Copy a directory to a pre-existing WC directory.
# The source directory should be copied *under* the target directory.
B_url = sbox.repo_url + "/A/B"
- D_dir = os.path.join(wc_dir, 'A', 'D')
+ D_dir = sbox.ospath('A/D')
svntest.actions.run_and_verify_svn(None, None, [],
'copy', B_url, D_dir)
@@ -1242,7 +1242,7 @@ def diff_repos_to_wc_copy(sbox):
wc_dir = sbox.wc_dir
iota_repos_path = sbox.repo_url + '/iota'
- target_wc_path = os.path.join(wc_dir, 'new_file')
+ target_wc_path = sbox.ospath('new_file')
# Copy a file from the repository to the working copy.
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
@@ -1266,8 +1266,8 @@ def repos_to_wc_copy_eol_keywords(sbox):
wc_dir = sbox.wc_dir
iota_repos_path = sbox.repo_url + '/iota'
- iota_wc_path = os.path.join(wc_dir, 'iota')
- target_wc_path = os.path.join(wc_dir, 'new_file')
+ iota_wc_path = sbox.ospath('iota')
+ target_wc_path = sbox.ospath('new_file')
# Modify iota to make it checkworthy.
svntest.main.file_write(iota_wc_path,
@@ -1323,7 +1323,7 @@ def revision_kinds_local_source(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
# Make a file with different content in each revision and WC; BASE != HEAD.
expected_output = svntest.wc.State(wc_dir, {
@@ -1385,8 +1385,8 @@ def copy_over_missing_file(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- iota_path = os.path.join(wc_dir, 'iota')
+ mu_path = sbox.ospath('A/mu')
+ iota_path = sbox.ospath('iota')
iota_url = sbox.repo_url + "/iota"
# Make the target missing.
@@ -1420,7 +1420,7 @@ def repos_to_wc_1634(sbox):
wc_dir = sbox.wc_dir
# First delete a subdirectory and commit.
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+ E_path = sbox.ospath('A/B/E')
svntest.actions.run_and_verify_svn(None, None, [], 'delete', E_path)
expected_output = svntest.wc.State(wc_dir, {
'A/B/E' : Item(verb='Deleting'),
@@ -1504,7 +1504,7 @@ def wc_to_wc_copy_between_different_repo
# Attempt a copy between different repositories.
exit_code, out, err = svntest.main.run_svn(1, 'cp',
os.path.join(wc2_dir, 'A'),
- os.path.join(wc_dir, 'A', 'B'))
+ sbox.ospath('A/B'))
for line in err:
if line.find("it is not from repository") != -1:
break
@@ -1520,8 +1520,8 @@ def wc_to_wc_copy_deleted(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- B_path = os.path.join(wc_dir, 'A', 'B')
- B2_path = os.path.join(wc_dir, 'A', 'B2')
+ B_path = sbox.ospath('A/B')
+ B2_path = sbox.ospath('A/B2')
# Schedule for delete
svntest.actions.run_and_verify_svn(None, None, [], 'rm',
@@ -1720,14 +1720,14 @@ def mixed_wc_to_url(sbox):
wc_dir = sbox.wc_dir
Z_url = sbox.repo_url + '/A/D/Z'
Z2_url = sbox.repo_url + '/A/D/Z2'
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
- B_path = os.path.join(wc_dir, 'A', 'B')
- X_path = os.path.join(wc_dir, 'A', 'D', 'G', 'X')
- Y_path = os.path.join(wc_dir, 'A', 'D', 'G', 'Y')
- E_path = os.path.join(wc_dir, 'A', 'D', 'G', 'X', 'E')
- alpha_path = os.path.join(wc_dir, 'A', 'D', 'G', 'X', 'E', 'alpha')
- pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ G_path = sbox.ospath('A/D/G')
+ B_path = sbox.ospath('A/B')
+ X_path = sbox.ospath('A/D/G/X')
+ Y_path = sbox.ospath('A/D/G/Y')
+ E_path = sbox.ospath('A/D/G/X/E')
+ alpha_path = sbox.ospath('A/D/G/X/E/alpha')
+ pi_path = sbox.ospath('A/D/G/pi')
+ rho_path = sbox.ospath('A/D/G/rho')
# Remove A/D/G/pi, then commit that removal.
svntest.actions.run_and_verify_svn(None, None, [], 'rm', pi_path)
@@ -1789,10 +1789,10 @@ def mixed_wc_to_url(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'co', Z_url, wc_dir)
- if os.path.exists(os.path.join(wc_dir, 'pi')):
+ if os.path.exists(sbox.ospath('pi')):
raise svntest.Failure("Path 'pi' exists but should be gone.")
- fp = open(os.path.join(wc_dir, 'rho'), 'r')
+ fp = open(sbox.ospath('rho'), 'r')
found_it = 0
for line in fp.readlines():
if re.match("^Second modification to rho.", line):
@@ -1835,7 +1835,7 @@ def delete_replaced_file(sbox):
wc_dir = sbox.wc_dir
# File scheduled for deletion.
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', rho_path)
# Status before attempting copies
@@ -1844,7 +1844,7 @@ def delete_replaced_file(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Copy 'pi' over 'rho' with history.
- pi_src = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+ pi_src = sbox.ospath('A/D/G/pi')
svntest.actions.run_and_verify_svn(None, None, [], 'cp', pi_src, rho_path)
# Check that file copied.
@@ -1868,12 +1868,12 @@ def mv_unversioned_file(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- unver_path_1 = os.path.join(wc_dir, 'unversioned1')
- dest_path_1 = os.path.join(wc_dir, 'dest')
+ unver_path_1 = sbox.ospath('unversioned1')
+ dest_path_1 = sbox.ospath('dest')
svntest.main.file_append(unver_path_1, "an unversioned file")
- unver_path_2 = os.path.join(wc_dir, 'A', 'unversioned2')
- dest_path_2 = os.path.join(wc_dir, 'A', 'dest_forced')
+ unver_path_2 = sbox.ospath('A/unversioned2')
+ dest_path_2 = sbox.ospath('A/dest_forced')
svntest.main.file_append(unver_path_2, "another unversioned file")
# Try to move an unversioned file.
@@ -1925,7 +1925,7 @@ def force_move(sbox):
os.chdir(was_cwd)
# check for the new content
- file_handle = open(os.path.join(wc_dir, "dest"), "r")
+ file_handle = open(sbox.ospath('dest'), "r")
modified_file_content = file_handle.readlines()
file_handle.close()
# Error if we dont find the modified contents...
@@ -1960,9 +1960,9 @@ def copy_copied_file_and_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- rho_copy_path_1 = os.path.join(wc_dir, 'A', 'D', 'rho_copy_1')
- rho_copy_path_2 = os.path.join(wc_dir, 'A', 'B', 'F', 'rho_copy_2')
+ rho_path = sbox.ospath('A/D/G/rho')
+ rho_copy_path_1 = sbox.ospath('A/D/rho_copy_1')
+ rho_copy_path_2 = sbox.ospath('A/B/F/rho_copy_2')
# Copy A/D/G/rho to A/D/rho_copy_1
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
@@ -1972,9 +1972,9 @@ def copy_copied_file_and_dir(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
rho_copy_path_1, rho_copy_path_2)
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- E_path_copy_1 = os.path.join(wc_dir, 'A', 'B', 'F', 'E_copy_1')
- E_path_copy_2 = os.path.join(wc_dir, 'A', 'D', 'G', 'E_copy_2')
+ E_path = sbox.ospath('A/B/E')
+ E_path_copy_1 = sbox.ospath('A/B/F/E_copy_1')
+ E_path_copy_2 = sbox.ospath('A/D/G/E_copy_2')
# Copy A/B/E to A/B/F/E_copy_1
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
@@ -2018,9 +2018,9 @@ def move_copied_file_and_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- rho_copy_path = os.path.join(wc_dir, 'A', 'D', 'rho_copy')
- rho_copy_move_path = os.path.join(wc_dir, 'A', 'B', 'F', 'rho_copy_moved')
+ rho_path = sbox.ospath('A/D/G/rho')
+ rho_copy_path = sbox.ospath('A/D/rho_copy')
+ rho_copy_move_path = sbox.ospath('A/B/F/rho_copy_moved')
# Copy A/D/G/rho to A/D/rho_copy
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
@@ -2030,9 +2030,9 @@ def move_copied_file_and_dir(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
rho_copy_path, rho_copy_move_path)
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- E_path_copy = os.path.join(wc_dir, 'A', 'B', 'F', 'E_copy')
- E_path_copy_move = os.path.join(wc_dir, 'A', 'D', 'G', 'E_copy_moved')
+ E_path = sbox.ospath('A/B/E')
+ E_path_copy = sbox.ospath('A/B/F/E_copy')
+ E_path_copy_move = sbox.ospath('A/D/G/E_copy_moved')
# Copy A/B/E to A/B/F/E_copy
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
@@ -2073,9 +2073,9 @@ def move_moved_file_and_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- rho_move_path = os.path.join(wc_dir, 'A', 'D', 'rho_moved')
- rho_move_moved_path = os.path.join(wc_dir, 'A', 'B', 'F', 'rho_move_moved')
+ rho_path = sbox.ospath('A/D/G/rho')
+ rho_move_path = sbox.ospath('A/D/rho_moved')
+ rho_move_moved_path = sbox.ospath('A/B/F/rho_move_moved')
# Move A/D/G/rho to A/D/rho_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
@@ -2085,9 +2085,9 @@ def move_moved_file_and_dir(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
rho_move_path, rho_move_moved_path)
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- E_path_moved = os.path.join(wc_dir, 'A', 'B', 'F', 'E_moved')
- E_path_move_moved = os.path.join(wc_dir, 'A', 'D', 'G', 'E_move_moved')
+ E_path = sbox.ospath('A/B/E')
+ E_path_moved = sbox.ospath('A/B/F/E_moved')
+ E_path_move_moved = sbox.ospath('A/D/G/E_move_moved')
# Copy A/B/E to A/B/F/E_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
@@ -2132,14 +2132,14 @@ def move_file_within_moved_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- D_path = os.path.join(wc_dir, 'A', 'D')
- D_path_moved = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved')
+ D_path = sbox.ospath('A/D')
+ D_path_moved = sbox.ospath('A/B/F/D_moved')
# Move A/B/D to A/B/F/D_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
D_path, D_path_moved)
- chi_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved', 'H', 'chi')
+ chi_path = sbox.ospath('A/B/F/D_moved/H/chi')
chi_moved_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved',
'H', 'chi_moved')
chi_moved_again_path = os.path.join(wc_dir, 'A', 'B', 'F',
@@ -2201,17 +2201,17 @@ def move_file_out_of_moved_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- D_path = os.path.join(wc_dir, 'A', 'D')
- D_path_moved = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved')
+ D_path = sbox.ospath('A/D')
+ D_path_moved = sbox.ospath('A/B/F/D_moved')
# Move A/B/D to A/B/F/D_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
D_path, D_path_moved)
- chi_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved', 'H', 'chi')
+ chi_path = sbox.ospath('A/B/F/D_moved/H/chi')
chi_moved_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved',
'H', 'chi_moved')
- chi_moved_again_path = os.path.join(wc_dir, 'A', 'C', 'chi_moved_again')
+ chi_moved_again_path = sbox.ospath('A/C/chi_moved_again')
# Move A/B/F/D_moved/H/chi to A/B/F/D_moved/H/chi_moved
# then move that to A/C/chi_moved_again
@@ -2269,15 +2269,15 @@ def move_dir_within_moved_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- D_path = os.path.join(wc_dir, 'A', 'D')
- D_path_moved = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved')
+ D_path = sbox.ospath('A/D')
+ D_path_moved = sbox.ospath('A/B/F/D_moved')
# Move A/D to A/B/F/D_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
D_path, D_path_moved)
- H_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved', 'H')
- H_moved_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved', 'H_moved')
+ H_path = sbox.ospath('A/B/F/D_moved/H')
+ H_moved_path = sbox.ospath('A/B/F/D_moved/H_moved')
H_moved_again_path = os.path.join(wc_dir, 'A', 'B', 'F',
'D_moved', 'H_moved_again')
@@ -2337,16 +2337,16 @@ def move_dir_out_of_moved_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- D_path = os.path.join(wc_dir, 'A', 'D')
- D_path_moved = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved')
+ D_path = sbox.ospath('A/D')
+ D_path_moved = sbox.ospath('A/B/F/D_moved')
# Move A/D to A/B/F/D_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
D_path, D_path_moved)
- H_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved', 'H')
- H_moved_path = os.path.join(wc_dir, 'A', 'B', 'F', 'D_moved', 'H_moved')
- H_moved_again_path = os.path.join(wc_dir, 'A', 'C', 'H_moved_again')
+ H_path = sbox.ospath('A/B/F/D_moved/H')
+ H_moved_path = sbox.ospath('A/B/F/D_moved/H_moved')
+ H_moved_again_path = sbox.ospath('A/C/H_moved_again')
# Move A/B/F/D_moved/H to A/B/F/D_moved/H_moved
# then move that to A/C/H_moved_again
@@ -2406,8 +2406,8 @@ def move_file_back_and_forth(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- rho_move_path = os.path.join(wc_dir, 'A', 'D', 'rho_moved')
+ rho_path = sbox.ospath('A/D/G/rho')
+ rho_move_path = sbox.ospath('A/D/rho_moved')
# Move A/D/G/rho away from and then back to its original path
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
@@ -2446,8 +2446,8 @@ def move_dir_back_and_forth(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- D_path = os.path.join(wc_dir, 'A', 'D')
- D_move_path = os.path.join(wc_dir, 'D_moved')
+ D_path = sbox.ospath('A/D')
+ D_move_path = sbox.ospath('D_moved')
# Move A/D to D_moved
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
@@ -2492,12 +2492,12 @@ def copy_move_added_paths(sbox):
wc_dir = sbox.wc_dir
# Create a new file and schedule it for addition
- upsilon_path = os.path.join(wc_dir, 'A', 'D', 'upsilon')
+ upsilon_path = sbox.ospath('A/D/upsilon')
svntest.main.file_write(upsilon_path, "This is the file 'upsilon'\n")
svntest.actions.run_and_verify_svn(None, None, [], 'add', upsilon_path)
# Create a dir with children and schedule it for addition
- I_path = os.path.join(wc_dir, 'A', 'D', 'I')
+ I_path = sbox.ospath('A/D/I')
J_path = os.path.join(I_path, 'J')
eta_path = os.path.join(I_path, 'eta')
theta_path = os.path.join(I_path, 'theta')
@@ -2510,7 +2510,7 @@ def copy_move_added_paths(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'add', I_path)
# Create another dir and schedule it for addition
- K_path = os.path.join(wc_dir, 'K')
+ K_path = sbox.ospath('K')
os.mkdir(K_path)
svntest.actions.run_and_verify_svn(None, None, [], 'add', K_path)
@@ -2549,8 +2549,8 @@ def copy_move_added_paths(sbox):
# Move added file A/D/upsilon to upsilon,
# then move it again to A/upsilon
- upsilon_move_path = os.path.join(wc_dir, 'upsilon')
- upsilon_move_path_2 = os.path.join(wc_dir, 'A', 'upsilon')
+ upsilon_move_path = sbox.ospath('upsilon')
+ upsilon_move_path_2 = sbox.ospath('A/upsilon')
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
upsilon_path, upsilon_move_path)
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
@@ -2558,8 +2558,8 @@ def copy_move_added_paths(sbox):
# Move added dir A/D/I to A/B/I,
# then move it again to A/D/H/I
- I_move_path = os.path.join(wc_dir, 'A', 'B', 'I')
- I_move_path_2 = os.path.join(wc_dir, 'A', 'D', 'H', 'I')
+ I_move_path = sbox.ospath('A/B/I')
+ I_move_path_2 = sbox.ospath('A/D/H/I')
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
I_path, I_move_path)
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
@@ -2609,15 +2609,15 @@ def copy_move_added_paths(sbox):
# Run_and_verify_commit() doesn't handle status of unversioned paths
# so manually confirm unversioned paths got copied and moved too.
unversioned_paths = [
- os.path.join(wc_dir, 'A', 'D', 'H', 'I', 'unversioned1'),
- os.path.join(wc_dir, 'A', 'D', 'H', 'I', 'L_UNVERSIONED'),
+ sbox.ospath('A/D/H/I/unversioned1'),
+ sbox.ospath('A/D/H/I/L_UNVERSIONED'),
os.path.join(wc_dir, 'A', 'D', 'H', 'I', 'L_UNVERSIONED',
'unversioned3'),
- os.path.join(wc_dir, 'A', 'D', 'H', 'I', 'J', 'unversioned2'),
- os.path.join(wc_dir, 'K', 'I', 'unversioned1'),
- os.path.join(wc_dir, 'K', 'I', 'L_UNVERSIONED'),
- os.path.join(wc_dir, 'K', 'I', 'L_UNVERSIONED', 'unversioned3'),
- os.path.join(wc_dir, 'K', 'I', 'J', 'unversioned2')]
+ sbox.ospath('A/D/H/I/J/unversioned2'),
+ sbox.ospath('K/I/unversioned1'),
+ sbox.ospath('K/I/L_UNVERSIONED'),
+ sbox.ospath('K/I/L_UNVERSIONED/unversioned3'),
+ sbox.ospath('K/I/J/unversioned2')]
for path in unversioned_paths:
if not os.path.exists(path):
raise svntest.Failure("Unversioned path '%s' not found." % path)
@@ -2629,14 +2629,14 @@ def copy_added_paths_with_props(sbox):
wc_dir = sbox.wc_dir
# Create a new file, schedule it for addition and set properties
- upsilon_path = os.path.join(wc_dir, 'A', 'D', 'upsilon')
+ upsilon_path = sbox.ospath('A/D/upsilon')
svntest.main.file_write(upsilon_path, "This is the file 'upsilon'\n")
svntest.actions.run_and_verify_svn(None, None, [], 'add', upsilon_path)
svntest.actions.run_and_verify_svn(None, None, [], 'propset',
'foo', 'bar', upsilon_path)
# Create a dir and schedule it for addition and set properties
- I_path = os.path.join(wc_dir, 'A', 'D', 'I')
+ I_path = sbox.ospath('A/D/I')
os.mkdir(I_path)
svntest.actions.run_and_verify_svn(None, None, [], 'add', I_path)
svntest.actions.run_and_verify_svn(None, None, [], 'propset',
@@ -2665,12 +2665,12 @@ def copy_added_paths_with_props(sbox):
expected_disk.old_tree())
# Copy added dir I to dir A/C
- I_copy_path = os.path.join(wc_dir, 'A', 'C', 'I')
+ I_copy_path = sbox.ospath('A/C/I')
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
I_path, I_copy_path)
# Copy added file A/upsilon into dir A/C
- upsilon_copy_path = os.path.join(wc_dir, 'A', 'C', 'upsilon')
+ upsilon_copy_path = sbox.ospath('A/C/upsilon')
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
upsilon_path, upsilon_copy_path)
@@ -2717,12 +2717,12 @@ def copy_added_paths_to_URL(sbox):
wc_dir = sbox.wc_dir
# Create a new file and schedule it for addition
- upsilon_path = os.path.join(wc_dir, 'A', 'D', 'upsilon')
+ upsilon_path = sbox.ospath('A/D/upsilon')
svntest.main.file_write(upsilon_path, "This is the file 'upsilon'\n")
svntest.actions.run_and_verify_svn(None, None, [], 'add', upsilon_path)
# Create a dir with children and schedule it for addition
- I_path = os.path.join(wc_dir, 'A', 'D', 'I')
+ I_path = sbox.ospath('A/D/I')
J_path = os.path.join(I_path, 'J')
eta_path = os.path.join(I_path, 'eta')
theta_path = os.path.join(I_path, 'theta')
@@ -2859,7 +2859,7 @@ def move_to_relative_paths(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+ E_path = sbox.ospath('A/B/E')
rel_path = os.path.join('..', '..', '..')
current_dir = os.getcwd()
@@ -2881,7 +2881,7 @@ def move_from_relative_paths(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ F_path = sbox.ospath('A/B/F')
beta_rel_path = os.path.join('..', 'E', 'beta')
current_dir = os.getcwd()
@@ -2903,7 +2903,7 @@ def copy_to_relative_paths(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+ E_path = sbox.ospath('A/B/E')
rel_path = os.path.join('..', '..', '..')
current_dir = os.getcwd()
@@ -2924,7 +2924,7 @@ def copy_from_relative_paths(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ F_path = sbox.ospath('A/B/F')
beta_rel_path = os.path.join('..', 'E', 'beta')
current_dir = os.getcwd()
@@ -2949,11 +2949,11 @@ def move_multiple_wc(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
- psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
- omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- C_path = os.path.join(wc_dir, 'A', 'C')
+ chi_path = sbox.ospath('A/D/H/chi')
+ psi_path = sbox.ospath('A/D/H/psi')
+ omega_path = sbox.ospath('A/D/H/omega')
+ E_path = sbox.ospath('A/B/E')
+ C_path = sbox.ospath('A/C')
# Move chi, psi, omega and E to A/C
svntest.actions.run_and_verify_svn(None, None, [], 'mv', chi_path, psi_path,
@@ -3004,11 +3004,11 @@ def copy_multiple_wc(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
- psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
- omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- C_path = os.path.join(wc_dir, 'A', 'C')
+ chi_path = sbox.ospath('A/D/H/chi')
+ psi_path = sbox.ospath('A/D/H/psi')
+ omega_path = sbox.ospath('A/D/H/omega')
+ E_path = sbox.ospath('A/B/E')
+ C_path = sbox.ospath('A/C')
# Copy chi, psi, omega and E to A/C
svntest.actions.run_and_verify_svn(None, None, [], 'cp', chi_path, psi_path,
@@ -3179,7 +3179,7 @@ def copy_multiple_repo_wc(sbox):
psi_url = sbox.repo_url + '/A/D/H/psi'
omega_with_space_url = sbox.repo_url + '/A/D/H/omega 2'
E_url = sbox.repo_url + '/A/B/E'
- C_path = os.path.join(wc_dir, 'A', 'C')
+ C_path = sbox.ospath('A/C')
# We need this in order to check that we don't end up with URI-encoded
# paths in the WC (issue #2955)
@@ -3225,10 +3225,10 @@ def copy_multiple_wc_repo(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
- psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
- omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+ chi_path = sbox.ospath('A/D/H/chi')
+ psi_path = sbox.ospath('A/D/H/psi')
+ omega_path = sbox.ospath('A/D/H/omega')
+ E_path = sbox.ospath('A/B/E')
C_url = sbox.repo_url + '/A/C'
# Perform the copy and check the output
@@ -3283,10 +3283,10 @@ def copy_peg_rev_local_files(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
- new_iota_path = os.path.join(wc_dir, 'new_iota')
- iota_path = os.path.join(wc_dir, 'iota')
- sigma_path = os.path.join(wc_dir, 'sigma')
+ psi_path = sbox.ospath('A/D/H/psi')
+ new_iota_path = sbox.ospath('new_iota')
+ iota_path = sbox.ospath('iota')
+ sigma_path = sbox.ospath('sigma')
psi_text = "This is the file 'psi'.\n"
iota_text = "This is the file 'iota'.\n"
@@ -3340,10 +3340,10 @@ def copy_peg_rev_local_dirs(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
- I_path = os.path.join(wc_dir, 'A', 'D', 'I')
- J_path = os.path.join(wc_dir, 'A', 'J')
+ E_path = sbox.ospath('A/B/E')
+ G_path = sbox.ospath('A/D/G')
+ I_path = sbox.ospath('A/D/I')
+ J_path = sbox.ospath('A/J')
alpha_path = os.path.join(E_path, 'alpha')
# Make some changes to the repository
@@ -3423,9 +3423,9 @@ def copy_peg_rev_url(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
- new_iota_path = os.path.join(wc_dir, 'new_iota')
- iota_path = os.path.join(wc_dir, 'iota')
+ psi_path = sbox.ospath('A/D/H/psi')
+ new_iota_path = sbox.ospath('new_iota')
+ iota_path = sbox.ospath('iota')
iota_url = sbox.repo_url + '/iota'
sigma_url = sbox.repo_url + '/sigma'
@@ -3486,8 +3486,8 @@ def old_dir_wc_to_wc(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- E = os.path.join(wc_dir, 'A', 'B', 'E')
- E2 = os.path.join(wc_dir, 'E2')
+ E = sbox.ospath('A/B/E')
+ E2 = sbox.ospath('E2')
E_url = sbox.repo_url + '/A/B/E'
alpha_url = E_url + '/alpha'
@@ -3532,8 +3532,8 @@ def copy_make_parents_wc_wc(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- new_iota_path = os.path.join(wc_dir, 'X', 'Y', 'Z', 'iota')
+ iota_path = sbox.ospath('iota')
+ new_iota_path = sbox.ospath('X/Y/Z/iota')
# Copy iota
svntest.actions.run_and_verify_svn(None, None, [], 'cp', '--parents',
@@ -3574,7 +3574,7 @@ def copy_make_parents_repo_wc(sbox):
wc_dir = sbox.wc_dir
iota_url = sbox.repo_url + '/iota'
- new_iota_path = os.path.join(wc_dir, 'X', 'Y', 'Z', 'iota')
+ new_iota_path = sbox.ospath('X/Y/Z/iota')
# Copy iota
svntest.actions.run_and_verify_svn(None, None, [],
@@ -3616,7 +3616,7 @@ def copy_make_parents_wc_repo(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
new_iota_url = sbox.repo_url + '/X/Y/Z/iota'
# Copy iota
@@ -3807,7 +3807,7 @@ def allow_unversioned_parent_for_copy_sr
# Make the "other" working copy
wc2_dir = sbox.add_wc_path('other')
svntest.actions.duplicate_dir(wc_dir, wc2_dir)
- copy_to_path = os.path.join(wc_dir, 'A', 'copy_of_wc2')
+ copy_to_path = sbox.ospath('A/copy_of_wc2')
# Copy the wc-in-unversioned-parent working copy to our original wc.
svntest.actions.run_and_verify_svn(None,
@@ -3917,8 +3917,8 @@ def copy_into_absent_dir(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
- iota_path = os.path.join(wc_dir, 'iota')
+ A_path = sbox.ospath('A')
+ iota_path = sbox.ospath('iota')
# Remove 'A'
svntest.main.safe_rmtree(A_path)
@@ -3969,8 +3969,8 @@ def find_copyfrom_information_upstairs(s
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
- A2_path = os.path.join(wc_dir, 'A2')
+ A_path = sbox.ospath('A')
+ A2_path = sbox.ospath('A2')
B2_path = os.path.join(A2_path, 'B')
svntest.actions.run_and_verify_svn(None, None, [], 'cp', A_path, A2_path)
@@ -4021,25 +4021,25 @@ def path_move_and_copy_between_wcs_2475(
expected_wc)
# Copy a file from wc to wc2
- mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
E_path = os.path.join(wc2_dir, 'A', 'B', 'E')
svntest.main.run_svn(None, 'cp', mu_path, E_path)
# Copy a folder from wc to wc2
- C_path = os.path.join(sbox.wc_dir, 'A', 'C')
+ C_path = sbox.ospath('A/C')
B_path = os.path.join(wc2_dir, 'A', 'B')
svntest.main.run_svn(None, 'cp', C_path, B_path)
# Move a file from wc to wc2
- mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
B_path = os.path.join(wc2_dir, 'A', 'B')
svntest.main.run_svn(None, 'mv', mu_path, B_path)
# Move a folder from wc to wc2
- C_path = os.path.join(sbox.wc_dir, 'A', 'C')
+ C_path = sbox.ospath('A/C')
D_path = os.path.join(wc2_dir, 'A', 'D')
svntest.main.run_svn(None, 'mv', C_path, D_path)
@@ -4095,8 +4095,8 @@ def commit_copy_depth_empty(sbox):
"copy a wcdir, then commit it with --depth empty"
sbox.build()
- a = os.path.join(sbox.wc_dir, 'A')
- new_a = os.path.join(sbox.wc_dir, 'new_A')
+ a = sbox.ospath('A')
+ new_a = sbox.ospath('new_A')
svntest.actions.run_and_verify_svn(None, None, [],
'cp', a, new_a)
@@ -4109,8 +4109,8 @@ def copy_below_copy(sbox):
"copy a dir below a copied dir"
sbox.build()
- A = os.path.join(sbox.wc_dir, 'A')
- new_A = os.path.join(sbox.wc_dir, 'new_A')
+ A = sbox.ospath('A')
+ new_A = sbox.ospath('new_A')
new_A_D = os.path.join(new_A, 'D')
new_A_new_D = os.path.join(new_A, 'new_D')
new_A_mu = os.path.join(new_A, 'mu')
@@ -4173,8 +4173,8 @@ def move_below_move(sbox):
"move a dir below a moved dir"
sbox.build()
- A = os.path.join(sbox.wc_dir, 'A')
- new_A = os.path.join(sbox.wc_dir, 'new_A')
+ A = sbox.ospath('A')
+ new_A = sbox.ospath('new_A')
new_A_D = os.path.join(new_A, 'D')
new_A_new_D = os.path.join(new_A, 'new_D')
new_A_mu = os.path.join(new_A, 'mu')
@@ -4239,7 +4239,7 @@ def reverse_merge_move(sbox):
rav_svn = svntest.actions.run_and_verify_svn
wc_dir = sbox.wc_dir
- a_dir = os.path.join(wc_dir, 'A')
+ a_dir = sbox.ospath('A')
a_repo_url = sbox.repo_url + '/A'
sbox.build()
@@ -4292,12 +4292,12 @@ def nonrecursive_commit_of_copy(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- main.run_svn(None, 'cp', os.path.join(wc_dir, 'A'),
- os.path.join(wc_dir, 'A_new'))
- main.run_svn(None, 'cp', os.path.join(wc_dir, 'A/D/G'),
- os.path.join(wc_dir, 'A_new/G_new'))
- main.run_svn(None, 'rm', os.path.join(wc_dir, 'A_new/C'))
- main.run_svn(None, 'rm', os.path.join(wc_dir, 'A_new/B/E'))
+ main.run_svn(None, 'cp', sbox.ospath('A'),
+ sbox.ospath('A_new'))
+ main.run_svn(None, 'cp', sbox.ospath('A/D/G'),
+ sbox.ospath('A_new/G_new'))
+ main.run_svn(None, 'rm', sbox.ospath('A_new/C'))
+ main.run_svn(None, 'rm', sbox.ospath('A_new/B/E'))
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
@@ -4362,14 +4362,14 @@ def copy_added_dir_with_copy(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- new_dir = os.path.join(wc_dir, 'NewDir');
- new_dir2 = os.path.join(wc_dir, 'NewDir2');
+ new_dir = sbox.ospath('NewDir');
+ new_dir2 = sbox.ospath('NewDir2');
# Alias for svntest.actions.run_and_verify_svn
rav_svn = svntest.actions.run_and_verify_svn
rav_svn(None, None, [], 'mkdir', new_dir)
- rav_svn(None, None, [], 'cp', os.path.join(wc_dir, 'A', 'mu'), new_dir)
+ rav_svn(None, None, [], 'cp', sbox.ospath('A/mu'), new_dir)
rav_svn(None, None, [], 'cp', new_dir, new_dir2)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -4395,8 +4395,8 @@ def copy_broken_symlink(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- new_symlink = os.path.join(wc_dir, 'new_symlink');
- copied_symlink = os.path.join(wc_dir, 'copied_symlink');
+ new_symlink = sbox.ospath('new_symlink');
+ copied_symlink = sbox.ospath('copied_symlink');
os.symlink('linktarget', new_symlink)
# Alias for svntest.actions.run_and_verify_svn
@@ -4516,12 +4516,12 @@ def copy_dir_with_space(sbox):
wc_dir = sbox.wc_dir
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
- os.path.join(wc_dir, 'A', 'B', 'E'),
- os.path.join(wc_dir, 'E with spaces'))
+ sbox.ospath('A/B/E'),
+ sbox.ospath('E with spaces'))
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
- os.path.join(wc_dir, 'A', 'B', 'E', 'alpha'),
- os.path.join(wc_dir, 'E with spaces', 'al pha'))
+ sbox.ospath('A/B/E/alpha'),
+ sbox.ospath('E with spaces/al pha'))
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_output = svntest.wc.State(wc_dir, {
@@ -4540,13 +4540,13 @@ def copy_dir_with_space(sbox):
None, wc_dir)
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
- os.path.join(wc_dir, 'E with spaces'),
- os.path.join(wc_dir, 'E also spaces')
+ sbox.ospath('E with spaces'),
+ sbox.ospath('E also spaces')
)
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
- os.path.join(wc_dir, 'E with spaces/al pha'),
- os.path.join(wc_dir, 'E also spaces/al b')
+ sbox.ospath('E with spaces/al pha'),
+ sbox.ospath('E also spaces/al b')
)
expected_output = svntest.wc.State(wc_dir, {
@@ -4566,13 +4566,13 @@ def copy_dir_with_space(sbox):
None, wc_dir)
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
- os.path.join(wc_dir, 'E with spaces'),
- os.path.join(wc_dir, 'E new spaces')
+ sbox.ospath('E with spaces'),
+ sbox.ospath('E new spaces')
)
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
- os.path.join(wc_dir, 'E new spaces/al pha'),
- os.path.join(wc_dir, 'E also spaces/al c')
+ sbox.ospath('E new spaces/al pha'),
+ sbox.ospath('E also spaces/al c')
)
expected_output = svntest.wc.State(wc_dir, {
@@ -4605,8 +4605,8 @@ def changed_data_should_match_checkout(s
sbox.build()
wc_dir = sbox.wc_dir
- A_B_E = os.path.join(wc_dir, 'A', 'B', 'E')
- E_new = os.path.join(wc_dir, 'E_new')
+ A_B_E = sbox.ospath('A/B/E')
+ E_new = sbox.ospath('E_new')
verify_dir = sbox.add_wc_path('verify')
@@ -4636,8 +4636,8 @@ def changed_dir_data_should_match_checko
sbox.build()
wc_dir = sbox.wc_dir
- A_B = os.path.join(wc_dir, 'A', 'B')
- B_new = os.path.join(wc_dir, 'B_new')
+ A_B = sbox.ospath('A/B')
+ B_new = sbox.ospath('B_new')
verify_dir = sbox.add_wc_path('verify')
@@ -4706,9 +4706,9 @@ def copy_over_deleted_dir(sbox):
"copy a directory over a deleted directory"
sbox.build(read_only = True)
- main.run_svn(None, 'rm', os.path.join(sbox.wc_dir, 'A/B'))
- main.run_svn(None, 'cp', os.path.join(sbox.wc_dir, 'A/D'),
- os.path.join(sbox.wc_dir, 'A/B'))
+ main.run_svn(None, 'rm', sbox.ospath('A/B'))
+ main.run_svn(None, 'cp', sbox.ospath('A/D'),
+ sbox.ospath('A/B'))
@Issue(3314)
def mixed_rev_copy_del(sbox):
@@ -4805,7 +4805,7 @@ def copy_delete_undo(sbox, use_revert):
if (use_revert):
svntest.main.run_svn(wc_dir, 'revert', '--recursive',
sbox.ospath('A/B/E-copied'))
- svntest.main.safe_rmtree(os.path.join(wc_dir, 'A/B/E-copied'))
+ svntest.main.safe_rmtree(sbox.ospath('A/B/E-copied'))
else:
svntest.main.run_svn(wc_dir, 'rm', '--force', sbox.ospath('A/B/E-copied'))
expected_status.remove('A/B/E-copied',
@@ -4953,7 +4953,7 @@ def copy_wc_over_deleted_other_kind(sbox
def move_wc_and_repo_dir_to_itself(sbox):
"move wc and repo dir to itself"
sbox.build(read_only = True)
- wc_dir = os.path.join(sbox.wc_dir, 'A')
+ wc_dir = sbox.ospath('A')
repo_url = sbox.repo_url + '/A'
# try to move wc dir to itself
@@ -4986,19 +4986,19 @@ def copy_wc_url_with_absent(sbox):
# A/D excluded
svntest.main.run_svn(None, 'up', '--set-depth', 'exclude',
- os.path.join(sbox.wc_dir, 'A/D'))
+ sbox.ospath('A/D'))
# Test issue #3314 after copy
sbox.simple_copy('A', 'A_copied')
- svntest.main.run_svn(None, 'ci', os.path.join(sbox.wc_dir, 'A_copied'),
+ svntest.main.run_svn(None, 'ci', sbox.ospath('A_copied'),
'-m', 'Commit A_copied')
# This tests issue #2763
- svntest.main.run_svn(None, 'cp', os.path.join(sbox.wc_dir, 'A'),
+ svntest.main.run_svn(None, 'cp', sbox.ospath('A'),
'^/A_tagged', '-m', 'Tag A')
# And perform a normal commit
- svntest.main.run_svn(None, 'ci', os.path.join(sbox.wc_dir, 'A'),
+ svntest.main.run_svn(None, 'ci', sbox.ospath('A'),
'-m', 'Commit A')
expected_output = svntest.wc.State(wc_dir, {
@@ -5072,20 +5072,20 @@ def copy_wc_url_with_absent(sbox):
'D/G/rho' : Item(status=' ', wc_rev='6'),
}
- expected_status = svntest.wc.State(os.path.join(wc_dir, 'A_copied'), items)
- svntest.actions.run_and_verify_status(os.path.join(wc_dir, 'A_copied'),
+ expected_status = svntest.wc.State(sbox.ospath('A_copied'), items)
+ svntest.actions.run_and_verify_status(sbox.ospath('A_copied'),
expected_status)
- expected_status = svntest.wc.State(os.path.join(wc_dir, 'A_tagged'), items)
- svntest.actions.run_and_verify_status(os.path.join(wc_dir, 'A_tagged'),
+ expected_status = svntest.wc.State(sbox.ospath('A_tagged'), items)
+ svntest.actions.run_and_verify_status(sbox.ospath('A_tagged'),
expected_status)
expected_status.add({
'no' : Item(status=' ', wc_rev='6')
})
- expected_status = svntest.wc.State(os.path.join(wc_dir, 'A'), items)
- svntest.actions.run_and_verify_status(os.path.join(wc_dir, 'A'),
+ expected_status = svntest.wc.State(sbox.ospath('A'), items)
+ svntest.actions.run_and_verify_status(sbox.ospath('A'),
expected_status)
@@ -5136,9 +5136,9 @@ def deleted_file_with_case_clash(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- iota2_path = os.path.join(wc_dir, 'iota2')
- IOTA_path = os.path.join(wc_dir, 'IOTA')
+ iota_path = sbox.ospath('iota')
+ iota2_path = sbox.ospath('iota2')
+ IOTA_path = sbox.ospath('IOTA')
iota_url = sbox.repo_url + '/iota'
# Perform a case-only rename in two steps.
@@ -5198,10 +5198,10 @@ def case_only_rename(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- IoTa_path = os.path.join(wc_dir, 'IoTa')
- B_path = os.path.join(wc_dir, 'A/B')
- b_path = os.path.join(wc_dir, 'A/b')
+ iota_path = sbox.ospath('iota')
+ IoTa_path = sbox.ospath('IoTa')
+ B_path = sbox.ospath('A/B')
+ b_path = sbox.ospath('A/b')
# Perform a couple of case-only renames.
svntest.main.run_svn(None, 'move', iota_path, IoTa_path)
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/davautocheck.sh?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/davautocheck.sh Tue Jun 26 19:26:49 2012
@@ -67,6 +67,10 @@
#
# To prevent the server from advertising httpv2, pass USE_HTTPV1 in
# the environment.
+#
+# To enable "SVNCacheRevProps on" set CACHE_REVPROPS in the environment.
+#
+# To test over https set USE_SSL in the environment.
#
# To use value for "SVNPathAuthz" directive set SVN_PATH_AUTHZ with
# appropriate value in the environment.
@@ -90,6 +94,7 @@ export LC_ALL
stop_httpd_and_die() {
[ -e "$HTTPD_PID" ] && kill $(cat "$HTTPD_PID")
+ echo "HTTPD stopped."
exit 1
}
@@ -185,6 +190,11 @@ if [ ${SVN_PATH_AUTHZ:+set} ]; then
SVN_PATH_AUTHZ_LINE="SVNPathAuthz ${SVN_PATH_AUTHZ}"
fi
+CACHE_REVPROPS_SETTING=off
+if [ ${CACHE_REVPROPS:+set} ]; then
+ CACHE_REVPROPS_SETTING=on
+fi
+
# Find the source and build directories. The build dir can be found if it is
# the current working dir or the source dir.
ABS_SRCDIR=$(cd ${SCRIPTDIR}/../../../; pwd)
@@ -274,6 +284,10 @@ if [ ${APACHE_MPM:+set} ]; then
LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
|| fail "MPM module not found"
fi
+if [ ${USE_SSL:+set} ]; then
+ LOAD_MOD_SSL=$(get_loadmodule_config mod_ssl) \
+ || fail "SSL module not found"
+fi
random_port() {
if [ -n "$BASH_VERSION" ]; then
@@ -301,6 +315,53 @@ mkdir "$HTTPD_ROOT" \
say "Using directory '$HTTPD_ROOT'..."
+if [ ${USE_SSL:+set} ]; then
+ say "Setting up SSL"
+ BASE_URL="https://localhost:$HTTPD_PORT"
+# A self-signed certifcate for localhost generated via:
+# openssl req -new -x509 -nodes -out cert.pem -keyout cert-key.pem
+ SSL_CERTIFICATE_FILE="$HTTPD_ROOT/cert.pem"
+cat > "$SSL_CERTIFICATE_FILE" <<__EOF__
+-----BEGIN CERTIFICATE-----
+MIICrTCCAhagAwIBAgIJAN/ks6HqqeVKMA0GCSqGSIb3DQEBBQUAMEQxGjAYBgNV
+BAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIwEAYDVQQLEwl0ZXN0c3VpdGUxEjAQBgNV
+BAMTCWxvY2FsaG9zdDAeFw0xMjA2MTIyMTIyNDlaFw0xMjA3MTIyMTIyNDlaMEQx
+GjAYBgNVBAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIwEAYDVQQLEwl0ZXN0c3VpdGUx
+EjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+pAIkUHZbKgb6n75AZu7YG3skAeFZRVCiu9K/KwLKxDlhDuXhAjrGUOyfwtvj0Ezw
+F6J1Ke6NJFNOMw9FKcp9BegUyWHQ0hTxQSbgIGCgZGG74LUO5kdHQBU9bu/3daF+
+TC0e08OO90RLAoNr/CADZOTDDPD1QYFS3Au49GZPtI8CAwEAAaOBpjCBozAdBgNV
+HQ4EFgQUKgls7+vC/CGZKNJUczUSo+ZL2wAwdAYDVR0jBG0wa4AUKgls7+vC/CGZ
+KNJUczUSo+ZL2wChSKRGMEQxGjAYBgNVBAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIw
+EAYDVQQLEwl0ZXN0c3VpdGUxEjAQBgNVBAMTCWxvY2FsaG9zdIIJAN/ks6HqqeVK
+MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAFMkecdq3XuJaRaC+4G38
+RNzUFR5Mnv/Ue/43J5CEJ5g2RTxro8DnGcYw2Qbv8lCUDBhkQ8L/lwnLe5jd204D
+Ad9t+1LXNyrYYncOmoZyzKupbfR0m6qz2Q45tqEztHokVWLnchiBaOL0nnGY0rPM
+zyc9CVIgp7ivvAud6ja++CQ=
+-----END CERTIFICATE-----
+__EOF__
+ SSL_CERTIFICATE_KEY_FILE="$HTTPD_ROOT/cert-key.pem"
+cat > "$SSL_CERTIFICATE_KEY_FILE" <<__EOF__
+ -----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQCkAiRQdlsqBvqfvkBm7tgbeyQB4VlFUKK70r8rAsrEOWEO5eEC
+OsZQ7J/C2+PQTPAXonUp7o0kU04zD0Upyn0F6BTJYdDSFPFBJuAgYKBkYbvgtQ7m
+R0dAFT1u7/d1oX5MLR7Tw473REsCg2v8IANk5MMM8PVBgVLcC7j0Zk+0jwIDAQAB
+AoGAFU0x6kF1FcBSTO0o8DWVW/xicNwT/Cy89igpLCzwqQvKz2SMFP4NQ/V3ypdE
+v4k+pdMz5H5XVqB7R6Z0FTl3g1ecfZoxYuMYWgzaaS6nx1xWJUqMTUqHArt9Sl/K
+/k6H5cNPC3JxGv7Blz87a3ypi93ZgSOJZDixG0BoRClGegECQQDVLTMqH5pVeBH1
+kfY2O8initMhi1lluM7yREbvZtxm844P11m7V4sOX9XQtBaaW3qLjzIru0TBJCL6
+F1JF7mYlAkEAxPRsJuFtBtWpQvnFzX3uXtaJtKtBIHbyBhmzo4f+ed/JU4Kzu1Pk
+CMnKgglg8rzU8/0HIU0AiaV2ItlQwb6PowJATZkWds7qLxJ19x4ascMxV0uBb0R6
+Vjzfl/CioaKfuBoQLFQHpdpIFANuoXnsgGOsSADoEmMos+WjlcXHfQ06wQJBAJTe
+79Tftephm+QtKc9urbvvy/zNKZghcEUeLkOgqsByYBoIhFRHT+k4piJudmJkS071
+ZetM6eghMk+bFcisgqMCQDD3kQ8gYOS9GbHPuTF4dfFSBx51nvd+hWNna1wi3rl+
+7nYzmrRWOp4ZMUG7i6GwqYHZ9stwJ/xRup5oink5VoQ=
+-----END RSA PRIVATE KEY-----
+__EOF__
+ SSL_MAKE_VAR="SSL_CERT=$SSL_CERTIFICATE_FILE"
+ SSL_TEST_ARG="--ssl-cert $SSL_CERTIFICATE_FILE"
+fi
+
say "Adding users for lock authentication"
$HTPASSWD -bc $HTTPD_USERS jrandom rayjandom
$HTPASSWD -b $HTTPD_USERS jconstant rayjandom
@@ -309,6 +370,7 @@ touch $HTTPD_MIME_TYPES
cat > "$HTTPD_CFG" <<__EOF__
$LOAD_MOD_MPM
+$LOAD_MOD_SSL
$LOAD_MOD_LOG_CONFIG
$LOAD_MOD_MIME
$LOAD_MOD_ALIAS
@@ -338,6 +400,14 @@ else
__EOF__
fi
+if [ ${USE_SSL:+set} ]; then
+cat >> "$HTTPD_CFG" <<__EOF__
+SSLEngine on
+SSLCertificateFile $SSL_CERTIFICATE_FILE
+SSLCertificateKeyFile $SSL_CERTIFICATE_KEY_FILE
+__EOF__
+fi
+
cat >> "$HTTPD_CFG" <<__EOF__
Listen $HTTPD_PORT
ServerName localhost
@@ -379,6 +449,7 @@ CustomLog "$HTTPD_ROOT/ops" "%
AuthUserFile $HTTPD_USERS
Require valid-user
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+ SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /svn-test-work/local_tmp/repos>
@@ -415,7 +486,7 @@ say "HTTPD started and listening on '$BA
### server/request.c:ap_process_request_internal():
### [Wed Feb 22 13:06:55 2006] [crit] [client 127.0.0.1] configuration error: couldn't check user: /cfg
HTTP_FETCH=wget
-HTTP_FETCH_OUTPUT="-q -O"
+HTTP_FETCH_OUTPUT="--no-check-certificate -q -O"
type wget > /dev/null 2>&1
if [ $? -ne 0 ]; then
type curl > /dev/null 2>&1
@@ -423,7 +494,7 @@ if [ $? -ne 0 ]; then
fail "Neither curl or wget found."
fi
HTTP_FETCH=curl
- HTTP_FETCH_OUTPUT='-s -o'
+ HTTP_FETCH_OUTPUT='-s -k -o'
fi
$HTTP_FETCH $HTTP_FETCH_OUTPUT "$HTTPD_CFG-copy" "$BASE_URL/cfg"
diff -q "$HTTPD_CFG" "$HTTPD_CFG-copy" > /dev/null \
@@ -433,6 +504,7 @@ rm "$HTTPD_CFG-copy"
say "HTTPD is good"
if [ $# -eq 1 ] && [ "x$1" = 'x--no-tests' ]; then
+ echo "http://localhost:$HTTPD_PORT"
exit
fi
@@ -453,13 +525,13 @@ else
fi
if [ $# = 0 ]; then
- time make check "BASE_URL=$BASE_URL"
+ time make check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
r=$?
else
(cd "$ABS_BUILDDIR/subversion/tests/cmdline/"
TEST="$1"
shift
- time "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" "$@")
+ time "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
r=$?
fi
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/depth_tests.py?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/depth_tests.py Tue Jun 26 19:26:49 2012
@@ -151,10 +151,10 @@ def depth_files_same_as_nonrecursive(sbo
# Should create a depth-files top directory, so both iota and A
# should exist, and A should be empty and depth-empty.
- if not os.path.exists(os.path.join(sbox.wc_dir, "iota")):
+ if not os.path.exists(sbox.ospath('iota')):
raise svntest.Failure("'checkout %s' failed to create file 'iota'" % opt)
- if os.path.exists(os.path.join(sbox.wc_dir, "A")):
+ if os.path.exists(sbox.ospath('A')):
raise svntest.Failure("'checkout %s' unexpectedly created subdir 'A'" % opt)
verify_depth("Expected depth files for top of WC, got some other depth",
@@ -826,7 +826,7 @@ def depth_immediates_subdir_propset_2(sb
other_wc = sbox.add_wc_path('other')
svntest.actions.duplicate_dir(wc_dir, other_wc)
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
# Set a property on an immediate subdirectory of the working copy.
svntest.actions.run_and_verify_svn(None, None, [],
@@ -959,8 +959,8 @@ def commit_propmods_with_depth_empty_hel
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- A_path = os.path.join(wc_dir, 'A')
+ iota_path = sbox.ospath('iota')
+ A_path = sbox.ospath('A')
D_path = os.path.join(A_path, 'D')
gamma_path = os.path.join(D_path, 'gamma')
G_path = os.path.join(D_path, 'G')
@@ -1171,9 +1171,9 @@ def commit_depth_immediates(sbox):
# Transmitting file data ..
# Committed revision 2.
- iota_path = os.path.join(wc_dir, 'iota')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+ iota_path = sbox.ospath('iota')
+ mu_path = sbox.ospath('A/mu')
+ G_path = sbox.ospath('A/D/G')
rho_path = os.path.join(G_path, 'rho')
svntest.main.file_append(iota_path, "new text in iota\n")
@@ -1254,7 +1254,7 @@ def add_tree_with_depth(sbox):
"add multi-subdir tree with --depth options" # For issue #2931
sbox.build()
wc_dir = sbox.wc_dir
- new1_path = os.path.join(wc_dir, 'new1')
+ new1_path = sbox.ospath('new1')
new2_path = os.path.join(new1_path, 'new2')
new3_path = os.path.join(new2_path, 'new3')
new4_path = os.path.join(new3_path, 'new4')
@@ -1512,7 +1512,7 @@ def depth_folding_clean_trees_1(sbox):
ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
infinity=True)
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
C_path = os.path.join(A_path, 'C')
B_path = os.path.join(A_path, 'B')
D_path = os.path.join(A_path, 'D')
@@ -1979,7 +1979,7 @@ def fold_tree_with_unversioned_modified_
ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
infinity=True)
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
pi_path = os.path.join(A_path, 'D', 'G', 'pi')
mu_path = os.path.join(A_path, 'mu')
unv_path = os.path.join(A_path, 'B', 'unv')
@@ -2035,7 +2035,7 @@ def depth_empty_update_on_file(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
# Change iota and commit it in r2.
svntest.main.file_write(iota_path, 'Modified iota\n')
@@ -2073,11 +2073,11 @@ def excluded_path_update_operation(sbox)
ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
infinity=True)
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
B_path = os.path.join(A_path, 'B')
L_path = os.path.join(A_path, 'L')
E_path = os.path.join(B_path, 'E')
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
# Simply exclude a subtree
expected_output = svntest.wc.State(wc_dir, {
@@ -2190,7 +2190,7 @@ def excluded_path_misc_operation(sbox):
ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
infinity=True)
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
B_path = os.path.join(A_path, 'B')
L_path = os.path.join(A_path, 'L')
M_path = os.path.join(A_path, 'M')
@@ -2336,7 +2336,7 @@ def exclude_keeps_hidden_entries(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
os.chdir(A_path)
# the second 'up' used to cause the entry of 'C' to be lost.
@@ -2370,7 +2370,7 @@ def info_excluded(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
svntest.main.run_svn(None, 'up', '--set-depth', 'exclude', A_path)
expected_info = {
@@ -2539,7 +2539,7 @@ def update_excluded_path_sticky_depths(s
ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
infinity=True)
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
B_path = os.path.join(A_path, 'B')
# Exclude the subtree 'A/B'
@@ -2734,9 +2734,9 @@ def sparse_update_with_dash_dash_parents
sbox.build(create_wc = False)
sbox.add_test_path(sbox.wc_dir, True)
- alpha_path = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha')
- pi_path = os.path.join(sbox.wc_dir, 'A', 'D', 'G', 'pi')
- omega_path = os.path.join(sbox.wc_dir, 'A', 'D', 'H', 'omega')
+ alpha_path = sbox.ospath('A/B/E/alpha')
+ pi_path = sbox.ospath('A/D/G/pi')
+ omega_path = sbox.ospath('A/D/H/omega')
# Start with a depth=empty root checkout.
svntest.actions.run_and_verify_svn(
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/diff_tests.py?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/diff_tests.py Tue Jun 26 19:26:49 2012
@@ -653,21 +653,21 @@ def diff_non_recursive(sbox):
# full diff has three changes
exit_code, diff_output, err_output = svntest.main.run_svn(
- None, 'diff', '-r', '1', os.path.join(wc_dir, 'A', 'D'))
+ None, 'diff', '-r', '1', sbox.ospath('A/D'))
if count_diff_output(diff_output) != 3:
raise svntest.Failure
# non-recursive has one change
exit_code, diff_output, err_output = svntest.main.run_svn(
- None, 'diff', '-r', '1', '-N', os.path.join(wc_dir, 'A', 'D'))
+ None, 'diff', '-r', '1', '-N', sbox.ospath('A/D'))
if count_diff_output(diff_output) != 1:
raise svntest.Failure
# diffing a directory doesn't pick up other diffs in the anchor
exit_code, diff_output, err_output = svntest.main.run_svn(
- None, 'diff', '-r', '1', os.path.join(wc_dir, 'A', 'D', 'G'))
+ None, 'diff', '-r', '1', sbox.ospath('A/D/G'))
if count_diff_output(diff_output) != 1:
raise svntest.Failure
@@ -706,10 +706,10 @@ def diff_non_version_controlled_file(sbo
sbox.build()
wc_dir = sbox.wc_dir
- svntest.main.file_append(os.path.join(wc_dir, 'A', 'D', 'foo'), "a new file")
+ svntest.main.file_append(sbox.ospath('A/D/foo'), "a new file")
exit_code, diff_output, err_output = svntest.main.run_svn(
- 1, 'diff', os.path.join(wc_dir, 'A', 'D', 'foo'))
+ 1, 'diff', sbox.ospath('A/D/foo'))
if count_diff_output(diff_output) != 0: raise svntest.Failure
@@ -850,7 +850,7 @@ def dont_diff_binary_file(sbox):
# Add a binary file to the project.
theta_contents = open(os.path.join(sys.path[0], "theta.bin"), 'rb').read()
# Write PNG file data into 'A/theta'.
- theta_path = os.path.join(wc_dir, 'A', 'theta')
+ theta_path = sbox.ospath('A/theta')
svntest.main.file_write(theta_path, theta_contents, 'wb')
svntest.main.run_svn(None, 'add', theta_path)
@@ -975,7 +975,7 @@ def diff_head_of_moved_file(sbox):
"diff against the head of a moved file"
sbox.build()
- mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
new_mu_path = mu_path + '.new'
svntest.main.run_svn(None, 'mv', mu_path, new_mu_path)
@@ -999,9 +999,9 @@ def diff_base_to_repos(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(sbox.wc_dir, 'iota')
- newfile_path = os.path.join(sbox.wc_dir, 'A', 'D', 'newfile')
- mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+ iota_path = sbox.ospath('iota')
+ newfile_path = sbox.ospath('A/D/newfile')
+ mu_path = sbox.ospath('A/mu')
# Make changes to iota, commit r2, update to HEAD (r2).
svntest.main.file_append(iota_path, "some rev2 iota text.\n")
@@ -1199,8 +1199,8 @@ def diff_deleted_in_head(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(sbox.wc_dir, 'A')
- mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+ A_path = sbox.ospath('A')
+ mu_path = sbox.ospath('A/mu')
# Make a change to mu, commit r2, update.
svntest.main.file_append(mu_path, "some rev2 mu text.\n")
@@ -1331,8 +1331,8 @@ def diff_branches(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'up', sbox.wc_dir)
- A_alpha = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha')
- A2_alpha = os.path.join(sbox.wc_dir, 'A2', 'B', 'E', 'alpha')
+ A_alpha = sbox.ospath('A/B/E/alpha')
+ A2_alpha = sbox.ospath('A2/B/E/alpha')
svntest.main.file_append(A_alpha, "\nfoo\n")
svntest.actions.run_and_verify_svn(None, None, [],
@@ -1397,8 +1397,8 @@ def diff_repos_and_wc(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'up', sbox.wc_dir)
- A_alpha = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha')
- A2_alpha = os.path.join(sbox.wc_dir, 'A2', 'B', 'E', 'alpha')
+ A_alpha = sbox.ospath('A/B/E/alpha')
+ A2_alpha = sbox.ospath('A2/B/E/alpha')
svntest.main.file_append(A_alpha, "\nfoo\n")
svntest.actions.run_and_verify_svn(None, None, [],
@@ -1412,7 +1412,7 @@ def diff_repos_and_wc(sbox):
# Compare working file on one branch against repository file on
# another branch
- A_path = os.path.join(sbox.wc_dir, 'A')
+ A_path = sbox.ospath('A')
rel_path = os.path.join('B', 'E', 'alpha')
exit_code, diff_output, err = svntest.actions.run_and_verify_svn(
None, None, [],
@@ -1438,9 +1438,9 @@ def diff_file_urls(sbox):
sbox.build()
- iota_path = os.path.join(sbox.wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
iota_url = sbox.repo_url + '/iota'
- iota_copy_path = os.path.join(sbox.wc_dir, 'A', 'iota')
+ iota_copy_path = sbox.ospath('A/iota')
iota_copy_url = sbox.repo_url + '/A/iota'
iota_copy2_url = sbox.repo_url + '/A/iota2'
@@ -1497,7 +1497,7 @@ def diff_prop_change_local_edit(sbox):
sbox.build()
- iota_path = os.path.join(sbox.wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
iota_url = sbox.repo_url + '/iota'
# Change a property on iota, and commit.
@@ -1542,10 +1542,10 @@ def check_for_omitted_prefix_in_path_com
sbox.build()
svntest.actions.do_sleep_for_timestamps()
- prefix_path = os.path.join(sbox.wc_dir, 'prefix_mydir')
+ prefix_path = sbox.ospath('prefix_mydir')
svntest.actions.run_and_verify_svn(None, None, [],
'mkdir', prefix_path)
- other_prefix_path = os.path.join(sbox.wc_dir, 'prefix_other')
+ other_prefix_path = sbox.ospath('prefix_other')
svntest.actions.run_and_verify_svn(None, None, [],
'mkdir', other_prefix_path)
@@ -1589,7 +1589,6 @@ def check_for_omitted_prefix_in_path_com
raise svntest.Failure
#----------------------------------------------------------------------
-@XFail()
def diff_renamed_file(sbox):
"diff a file that has been renamed"
@@ -1797,7 +1796,7 @@ def diff_keywords(sbox):
sbox.build()
- iota_path = os.path.join(sbox.wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
svntest.actions.run_and_verify_svn(None, None, [],
'ps',
@@ -1878,7 +1877,7 @@ def diff_force(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
# Append a line to iota and make it binary.
svntest.main.file_append(iota_path, "new line")
@@ -1960,7 +1959,7 @@ def diff_renamed_dir(sbox):
svntest.main.run_svn(None, 'mv', os.path.join('A', 'D', 'G'),
os.path.join('A', 'D', 'I'))
- # Check a repos->wc diff
+ # Check a wc->wc diff
exit_code, diff_output, err_output = svntest.main.run_svn(
None, 'diff', '--show-copies-as-adds', os.path.join('A', 'D'))
@@ -1973,6 +1972,23 @@ def diff_renamed_dir(sbox):
'A') :
raise svntest.Failure
+ # Check a repos->wc diff of the moved-here node before commit
+ exit_code, diff_output, err_output = svntest.main.run_svn(
+ None, 'diff', '-r', '1', '--show-copies-as-adds',
+ os.path.join('A', 'D', 'I'))
+ if check_diff_output(diff_output,
+ os.path.join('A', 'D', 'I', 'pi'),
+ 'A') :
+ raise svntest.Failure
+
+ # Check a repos->wc diff of the moved-away node before commit
+ exit_code, diff_output, err_output = svntest.main.run_svn(
+ None, 'diff', '-r', '1', os.path.join('A', 'D', 'G'))
+ if check_diff_output(diff_output,
+ os.path.join('A', 'D', 'G', 'pi'),
+ 'D') :
+ raise svntest.Failure
+
# Commit
svntest.actions.run_and_verify_svn(None, None, [],
'ci', '-m', 'log msg')
@@ -2584,6 +2600,52 @@ def basic_diff_summarize(sbox):
wc_dir = sbox.wc_dir
p = sbox.ospath
+ # Diff summarize of a newly added file
+ expected_diff = svntest.wc.State(wc_dir, {
+ 'iota': Item(status='A '),
+ })
+ svntest.actions.run_and_verify_diff_summarize(expected_diff,
+ p('iota'), '-c1')
+
+ # Reverse summarize diff of a newly added file
+ expected_diff = svntest.wc.State(wc_dir, {
+ 'iota': Item(status='D '),
+ })
+ svntest.actions.run_and_verify_diff_summarize(expected_diff,
+ p('iota'), '-c-1')
+
+ # Diff summarize of a newly added directory
+ expected_diff = svntest.wc.State(wc_dir, {
+ 'A/D': Item(status='A '),
+ 'A/D/gamma': Item(status='A '),
+ 'A/D/H': Item(status='A '),
+ 'A/D/H/chi': Item(status='A '),
+ 'A/D/H/psi': Item(status='A '),
+ 'A/D/H/omega': Item(status='A '),
+ 'A/D/G': Item(status='A '),
+ 'A/D/G/pi': Item(status='A '),
+ 'A/D/G/rho': Item(status='A '),
+ 'A/D/G/tau': Item(status='A '),
+ })
+ svntest.actions.run_and_verify_diff_summarize(expected_diff,
+ p('A/D'), '-c1')
+
+ # Reverse summarize diff of a newly added directory
+ expected_diff = svntest.wc.State(wc_dir, {
+ 'A/D': Item(status='D '),
+ 'A/D/gamma': Item(status='D '),
+ 'A/D/H': Item(status='D '),
+ 'A/D/H/chi': Item(status='D '),
+ 'A/D/H/psi': Item(status='D '),
+ 'A/D/H/omega': Item(status='D '),
+ 'A/D/G': Item(status='D '),
+ 'A/D/G/pi': Item(status='D '),
+ 'A/D/G/rho': Item(status='D '),
+ 'A/D/G/tau': Item(status='D '),
+ })
+ svntest.actions.run_and_verify_diff_summarize(expected_diff,
+ p('A/D'), '-c-1')
+
# Add props to some items that will be deleted, and commit.
sbox.simple_propset('prop', 'val',
'A/C',
@@ -2695,7 +2757,7 @@ def diff_weird_author(sbox):
svntest.actions.enable_revprop_changes(sbox.repo_dir)
- svntest.main.file_write(os.path.join(sbox.wc_dir, 'A', 'mu'),
+ svntest.main.file_write(sbox.ospath('A/mu'),
"new content\n")
expected_output = svntest.wc.State(sbox.wc_dir, {
@@ -2821,8 +2883,8 @@ def diff_in_renamed_folder(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- C_path = os.path.join(wc_dir, "A", "C")
- D_path = os.path.join(wc_dir, "A", "D")
+ C_path = sbox.ospath('A/C')
+ D_path = sbox.ospath('A/D')
kappa_path = os.path.join(D_path, "C", "kappa")
# add a new file to a renamed (moved in this case) folder.
@@ -3083,21 +3145,21 @@ def diff_summarize_xml(sbox):
wc_dir = sbox.wc_dir
# A content modification.
- svntest.main.file_append(os.path.join(wc_dir, "A", "mu"), "New mu content")
+ svntest.main.file_append(sbox.ospath('A/mu'), "New mu content")
# A prop modification.
svntest.main.run_svn(None,
"propset", "prop", "val",
- os.path.join(wc_dir, 'iota'))
+ sbox.ospath('iota'))
# Both content and prop mods.
- tau_path = os.path.join(wc_dir, "A", "D", "G", "tau")
+ tau_path = sbox.ospath('A/D/G/tau')
svntest.main.file_append(tau_path, "tautau")
svntest.main.run_svn(None,
"propset", "prop", "val", tau_path)
# A file addition.
- newfile_path = os.path.join(wc_dir, 'newfile')
+ newfile_path = sbox.ospath('newfile')
svntest.main.file_append(newfile_path, 'newfile')
svntest.main.run_svn(None, 'add', newfile_path)
@@ -3106,7 +3168,7 @@ def diff_summarize_xml(sbox):
'lambda'))
# A directory addition
- svntest.main.run_svn(None, "mkdir", os.path.join(wc_dir, 'newdir'))
+ svntest.main.run_svn(None, "mkdir", sbox.ospath('newdir'))
expected_output = svntest.wc.State(wc_dir, {
'A/mu': Item(verb='Sending'),
@@ -3156,7 +3218,7 @@ def diff_summarize_xml(sbox):
svntest.actions.run_and_verify_diff_summarize_xml(
[], wc_dir, paths_iota, items_iota, props_iota, kinds_iota, '-c2',
- os.path.join(wc_dir, 'iota'))
+ sbox.ospath('iota'))
# 5) Test --summarize --xml on -r1:2
svntest.actions.run_and_verify_diff_summarize_xml(
@@ -3170,7 +3232,7 @@ def diff_file_depth_empty(sbox):
"svn diff --depth=empty FILE_WITH_LOCAL_MODS"
# The bug was that no diff output would be generated. Check that some is.
sbox.build()
- iota_path = os.path.join(sbox.wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
svntest.main.file_append(iota_path, "new text in iota")
exit_code, out, err = svntest.main.run_svn(None, 'diff',
'--depth', 'empty', iota_path)
@@ -3313,13 +3375,13 @@ def diff_git_format_wc_wc(sbox):
"create a diff in git unidiff format for wc-wc"
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- new_path = os.path.join(wc_dir, 'new')
- lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
- lambda_copied_path = os.path.join(wc_dir, 'A', 'B', 'lambda_copied')
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
- alpha_copied_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha_copied')
+ iota_path = sbox.ospath('iota')
+ mu_path = sbox.ospath('A/mu')
+ new_path = sbox.ospath('new')
+ lambda_path = sbox.ospath('A/B/lambda')
+ lambda_copied_path = sbox.ospath('A/B/lambda_copied')
+ alpha_path = sbox.ospath('A/B/E/alpha')
+ alpha_copied_path = sbox.ospath('A/B/E/alpha_copied')
svntest.main.file_append(iota_path, "Changed 'iota'.\n")
svntest.main.file_append(new_path, "This is the file 'new'.\n")
@@ -3369,9 +3431,9 @@ def diff_git_format_url_wc(sbox):
sbox.build()
wc_dir = sbox.wc_dir
repo_url = sbox.repo_url
- iota_path = os.path.join(wc_dir, 'iota')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- new_path = os.path.join(wc_dir, 'new')
+ iota_path = sbox.ospath('iota')
+ mu_path = sbox.ospath('A/mu')
+ new_path = sbox.ospath('new')
svntest.main.file_append(iota_path, "Changed 'iota'.\n")
svntest.main.file_append(new_path, "This is the file 'new'.\n")
svntest.main.run_svn(None, 'add', new_path)
@@ -3409,9 +3471,9 @@ def diff_git_format_url_url(sbox):
sbox.build()
wc_dir = sbox.wc_dir
repo_url = sbox.repo_url
- iota_path = os.path.join(wc_dir, 'iota')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- new_path = os.path.join(wc_dir, 'new')
+ iota_path = sbox.ospath('iota')
+ mu_path = sbox.ospath('A/mu')
+ new_path = sbox.ospath('new')
svntest.main.file_append(iota_path, "Changed 'iota'.\n")
svntest.main.file_append(new_path, "This is the file 'new'.\n")
svntest.main.run_svn(None, 'add', new_path)
@@ -3453,7 +3515,7 @@ def diff_prop_missing_context(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
prop_val = "".join([
"line 1\n",
"line 2\n",
@@ -3504,7 +3566,7 @@ def diff_prop_multiple_hunks(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
prop_val = "".join([
"line 1\n",
"line 2\n",
@@ -3578,8 +3640,8 @@ def diff_git_empty_files(sbox):
"create a diff in git format for empty files"
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- new_path = os.path.join(wc_dir, 'new')
+ iota_path = sbox.ospath('iota')
+ new_path = sbox.ospath('new')
svntest.main.file_write(iota_path, "")
# Now commit the local mod, creating rev 2.
@@ -3615,8 +3677,8 @@ def diff_git_with_props(sbox):
"create a diff in git format showing prop changes"
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- new_path = os.path.join(wc_dir, 'new')
+ iota_path = sbox.ospath('iota')
+ new_path = sbox.ospath('new')
svntest.main.file_write(iota_path, "")
# Now commit the local mod, creating rev 2.
@@ -3661,7 +3723,7 @@ def diff_correct_wc_base_revnum(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
svntest.main.file_write(iota_path, "")
# Commit a local mod, creating rev 2.
@@ -3730,8 +3792,8 @@ def diff_abs_localpath_from_wc_folder(sb
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
- B_abs_path = os.path.abspath(os.path.join(wc_dir, 'A', 'B'))
+ A_path = sbox.ospath('A')
+ B_abs_path = os.path.abspath(sbox.ospath('A/B'))
os.chdir(os.path.abspath(A_path))
svntest.actions.run_and_verify_svn(None, None, [], 'diff', B_abs_path)
@@ -3878,6 +3940,141 @@ def diff_two_working_copies(sbox):
'diff', '--old', wc_dir_old,
'--new', wc_dir)
+def diff_deleted_url(sbox):
+ "diff -cN of URL deleted in rN"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # remove A/D/H in r2
+ sbox.simple_rm("A/D/H")
+ sbox.simple_commit()
+
+ # A diff of r2 with target A/D/H should show the removed children
+ expected_output = make_diff_header("chi", "revision 1", "revision 2") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'chi'.\n",
+ ] + make_diff_header("omega", "revision 1",
+ "revision 2") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'omega'.\n",
+ ] + make_diff_header("psi", "revision 1",
+ "revision 2") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'psi'.\n",
+ ]
+
+ # Files in diff may be in any order.
+ expected_output = svntest.verify.UnorderedOutput(expected_output)
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', '-c2',
+ sbox.repo_url + '/A/D/H')
+
+def diff_arbitrary_files_and_dirs(sbox):
+ "diff arbitrary files and dirs"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # diff iota with A/mu
+ expected_output = make_diff_header("mu", "working copy", "working copy",
+ "iota", "A/mu") + [
+ "@@ -1 +1 @@\n",
+ "-This is the file 'iota'.\n",
+ "+This is the file 'mu'.\n"
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', '--old', sbox.ospath('iota'),
+ '--new', sbox.ospath('A/mu'))
+
+ # diff A/B/E with A/D
+ expected_output = make_diff_header("G/pi", "working copy", "working copy",
+ "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'pi'.\n"
+ ] + make_diff_header("G/rho", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'rho'.\n"
+ ] + make_diff_header("G/tau", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'tau'.\n"
+ ] + make_diff_header("H/chi", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'chi'.\n"
+ ] + make_diff_header("H/omega", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'omega'.\n"
+ ] + make_diff_header("H/psi", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'psi'.\n"
+ ] + make_diff_header("alpha", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'alpha'.\n"
+ ] + make_diff_header("beta", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'beta'.\n"
+ ] + make_diff_header("gamma", "working copy",
+ "working copy", "B/E", "D") + [
+ "@@ -0,0 +1 @@\n",
+ "+This is the file 'gamma'.\n"
+ ]
+
+ # Files in diff may be in any order.
+ expected_output = svntest.verify.UnorderedOutput(expected_output)
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', '--old', sbox.ospath('A/B/E'),
+ '--new', sbox.ospath('A/D'))
+
+def diff_properties_only(sbox):
+ "diff --properties-only"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ expected_output = \
+ make_diff_header("iota", "revision 1", "revision 2") + \
+ make_diff_prop_header("iota") + \
+ make_diff_prop_added("svn:eol-style", "native")
+
+ expected_reverse_output = \
+ make_diff_header("iota", "revision 2", "revision 1") + \
+ make_diff_prop_header("iota") + \
+ make_diff_prop_deleted("svn:eol-style", "native")
+
+ expected_rev1_output = \
+ make_diff_header("iota", "revision 1", "working copy") + \
+ make_diff_prop_header("iota") + \
+ make_diff_prop_added("svn:eol-style", "native")
+
+ # Make a property change and a content change to 'iota'
+ # Only the property change should be displayed by diff --properties-only
+ sbox.simple_propset('svn:eol-style', 'native', 'iota')
+ svntest.main.file_append(sbox.ospath('iota'), 'new text')
+
+ sbox.simple_commit() # r2
+
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', '--properties-only', '-r', '1:2',
+ sbox.repo_url + '/iota')
+
+ svntest.actions.run_and_verify_svn(None, expected_reverse_output, [],
+ 'diff', '--properties-only', '-r', '2:1',
+ sbox.repo_url + '/iota')
+
+ os.chdir(wc_dir)
+ svntest.actions.run_and_verify_svn(None, expected_rev1_output, [],
+ 'diff', '--properties-only', '-r', '1',
+ 'iota')
+
+ svntest.actions.run_and_verify_svn(None, expected_rev1_output, [],
+ 'diff', '--properties-only',
+ '-r', 'PREV', 'iota')
+
########################################################################
#Run the tests
@@ -3946,6 +4143,9 @@ test_list = [ None,
no_spurious_conflict,
diff_correct_wc_base_revnum,
diff_two_working_copies,
+ diff_deleted_url,
+ diff_arbitrary_files_and_dirs,
+ diff_properties_only,
]
if __name__ == '__main__':
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/entries-dump.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/entries-dump.c Tue Jun 26 19:26:49 2012
@@ -30,6 +30,7 @@
#define SVN_DEPRECATED
#include "svn_types.h"
+#include "svn_cmdline.h"
#include "svn_pools.h"
#include "svn_wc.h"
#include "svn_dirent_uri.h"
@@ -266,14 +267,15 @@ main(int argc, const char *argv[])
exit(1);
}
- if (apr_initialize() != APR_SUCCESS)
+ if (svn_cmdline_init("entries-dump", stderr) != EXIT_SUCCESS)
{
- fprintf(stderr, "apr_initialize() failed.\n");
- exit(1);
+ return EXIT_FAILURE;
}
- /* set up the global pool */
- pool = svn_pool_create(NULL);
+ /* Create our top-level pool. Use a separate mutexless allocator,
+ * given this application is single threaded.
+ */
+ pool = apr_allocator_owner_get(svn_pool_create_allocator(FALSE));
path = svn_dirent_internal_style(argv[argc-1], pool);
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/entries_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/entries_tests.py?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/entries_tests.py (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/entries_tests.py Tue Jun 26 19:26:49 2012
@@ -33,7 +33,9 @@
# test tries to pick up the straggly little edge cases.
#
-import os
+import os, logging
+
+logger = logging.getLogger()
import svntest
@@ -49,22 +51,22 @@ SCHEDULE_REPLACE = 3
def validate(entry, **kw):
for key, value in kw.items():
if getattr(entry, key) != value:
- print("Entry '%s' has an incorrect value for .%s" % (entry.name, key))
- print(" Expected: %s" % value)
- print(" Actual: %s" % getattr(entry, key))
+ logger.warn("Entry '%s' has an incorrect value for .%s", entry.name, key)
+ logger.warn(" Expected: %s", value)
+ logger.warn(" Actual: %s", getattr(entry, key))
raise svntest.Failure
def check_names(entries, *names):
if entries is None:
- print('entries-dump probably exited with a failure.')
+ logger.warn('entries-dump probably exited with a failure.')
raise svntest.Failure
have = set(entries.keys())
want = set(names)
missing = want - have
if missing:
- print("Entry name(s) not found: %s"
- % ', '.join("'%s'" % name for name in missing))
+ logger.warn("Entry name(s) not found: %s",
+ ', '.join("'%s'" % name for name in missing))
raise svntest.Failure
Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/export_tests.py?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/export_tests.py Tue Jun 26 19:26:49 2012
@@ -166,7 +166,7 @@ def export_working_copy_with_mods(sbox):
'A/D/G/tau' : Item(status='A '),
'A/mu' : Item(status='A '),
'A/B' : Item(status='A '),
- 'A/B/E' : Item(status='A '),
+ #'A/B/E' : Item(status='A '), # Used to be reported as added
'A/B/lambda' : Item(status='A '),
'A/B/F' : Item(status='A '),
'A/C' : Item(status='A '),