summaryrefslogtreecommitdiff
path: root/subversion/tests/cmdline/basic_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/tests/cmdline/basic_tests.py')
-rwxr-xr-xsubversion/tests/cmdline/basic_tests.py541
1 files changed, 283 insertions, 258 deletions
diff --git a/subversion/tests/cmdline/basic_tests.py b/subversion/tests/cmdline/basic_tests.py
index c51d80a..58f7554 100755
--- a/subversion/tests/cmdline/basic_tests.py
+++ b/subversion/tests/cmdline/basic_tests.py
@@ -60,8 +60,7 @@ def basic_checkout(sbox):
# Checkout of a different URL into a working copy fails
A_url = sbox.repo_url + '/A'
- svntest.actions.run_and_verify_svn("No error where some expected",
- None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
# "Obstructed update",
'co', A_url,
wc_dir)
@@ -73,7 +72,7 @@ def basic_checkout(sbox):
os.remove(lambda_path)
G_path = sbox.ospath('A/D/G')
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', G_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', G_path)
expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
expected_output.tweak('A/mu', status='M ')
@@ -88,7 +87,7 @@ def basic_checkout(sbox):
# Repeat checkout of original URL into working copy with modifications
url = sbox.repo_url
- svntest.actions.run_and_verify_svn("Repeat checkout failed", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'co', url,
wc_dir)
@@ -141,9 +140,7 @@ def basic_commit(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
#----------------------------------------------------------------------
@@ -177,7 +174,7 @@ def basic_update(sbox):
# Commit.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
+ expected_status)
# Create expected output tree for an update of the wc_backup.
expected_output = wc.State(wc_backup, {
@@ -204,17 +201,30 @@ def basic_update(sbox):
expected_status)
# Unversioned paths, those that are not immediate children of a versioned
- # path, are skipped and do not raise an error
+ # path, are skipped and do raise an error if they are the only targets
xx_path = sbox.ospath('xx/xx')
- exit_code, out, err = svntest.actions.run_and_verify_svn(
- "update xx/xx",
- ["Skipped '"+xx_path+"'\n",
- ] + svntest.main.summary_of_conflicts(skipped_paths=1),
- [], 'update', xx_path)
- exit_code, out, err = svntest.actions.run_and_verify_svn(
- "update xx/xx", [], [],
+ expected_err = "svn: E155007: "
+ svntest.actions.run_and_verify_svn(
+ ["Skipped '"+xx_path+"'\n", ],
+ expected_err,
+ 'update', xx_path)
+ svntest.actions.run_and_verify_svn(
+ [], expected_err,
'update', '--quiet', xx_path)
+ # Unversioned paths, that are not the only targets of the command are
+ # skipped without an error
+ svntest.actions.run_and_verify_svn(
+ ["Updating '"+mu_path+"':\n",
+ "At revision 2.\n",
+ "Skipped '"+xx_path+"'\n",
+ "Summary of updates:\n",
+ " Updated '"+mu_path+"' to r2.\n"
+ ] + svntest.main.summary_of_conflicts(skipped_paths=1),
+ [], 'update', mu_path, xx_path)
+ svntest.actions.run_and_verify_svn(
+ [], [], 'update', '--quiet', mu_path, xx_path)
+
#----------------------------------------------------------------------
def basic_mkdir_url(sbox):
"basic mkdir URL"
@@ -224,8 +234,8 @@ def basic_mkdir_url(sbox):
Y_url = sbox.repo_url + '/Y'
Y_Z_url = sbox.repo_url + '/Y/Z'
- svntest.actions.run_and_verify_svn("mkdir URL URL/subdir",
- ["\n", "Committed revision 2.\n"], [],
+ svntest.actions.run_and_verify_svn(["Committing transaction...\n",
+ "Committed revision 2.\n"], [],
'mkdir', '-m', 'log_msg', Y_url, Y_Z_url)
expected_output = wc.State(sbox.wc_dir, {
@@ -262,19 +272,18 @@ def basic_mkdir_url_with_parents(sbox):
U_url = sbox.repo_url + '/U'
U_V_url = sbox.repo_url + '/U/V'
U_V_W_url = sbox.repo_url + '/U/V/W'
- svntest.actions.run_and_verify_svn("erroneous mkdir sans --parents",
- [],
+ svntest.actions.run_and_verify_svn(None,
".*Try 'svn mkdir --parents' instead.*",
'mkdir', '-m', 'log_msg',
X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_W_url)
- svntest.actions.run_and_verify_svn("mkdir",
- ["\n", "Committed revision 2.\n"], [],
+ svntest.actions.run_and_verify_svn(["Committing transaction...\n",
+ "Committed revision 2.\n"], [],
'mkdir', '-m', 'log_msg',
X_url, U_url)
- svntest.actions.run_and_verify_svn("mkdir --parents",
- ["\n", "Committed revision 3.\n"], [],
+ svntest.actions.run_and_verify_svn(["Committing transaction...\n",
+ "Committed revision 3.\n"], [],
'mkdir', '-m', 'log_msg', '--parents',
X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_W_url)
@@ -328,11 +337,11 @@ def basic_mkdir_wc_with_parents(sbox):
Y_Z_path = sbox.ospath('Y/Z')
- svntest.actions.run_and_verify_svn("erroneous mkdir dir/subdir", [],
+ svntest.actions.run_and_verify_svn([],
".*Try 'svn mkdir --parents' instead.*",
'mkdir', Y_Z_path)
- svntest.actions.run_and_verify_svn("mkdir dir/subdir", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'mkdir', '--parents', Y_Z_path)
# Verify the WC status, because there was a regression in which parts of
@@ -395,8 +404,7 @@ def basic_commit_corruption(sbox):
# This commit should fail due to text base corruption.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
None, # expected_status,
- "svn: E200014: Checksum",
- wc_dir)
+ "svn: E200014: Checksum")
# Restore the uncorrupted text base.
os.chmod(tb_dir_path, 0777)
@@ -408,7 +416,7 @@ def basic_commit_corruption(sbox):
# This commit should succeed.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
+ expected_status)
#----------------------------------------------------------------------
def basic_update_corruption(sbox):
@@ -433,7 +441,7 @@ def basic_update_corruption(sbox):
# Make the "other" working copy
other_wc = sbox.add_wc_path('other')
- svntest.actions.run_and_verify_svn("Checkout to wc2", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'co', sbox.repo_url, other_wc)
# Make a local mod to mu
@@ -452,7 +460,7 @@ def basic_update_corruption(sbox):
# This commit should succeed.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
+ expected_status)
# Create expected output tree for an update of the other_wc.
expected_output = wc.State(other_wc, {
@@ -488,7 +496,7 @@ def basic_update_corruption(sbox):
fail_output,
expected_disk,
fail_status,
- "svn: E155017: Checksum", other_wc)
+ "svn: E155017: Checksum")
# Restore the uncorrupted text base.
os.chmod(tb_dir_path, 0777)
@@ -545,7 +553,7 @@ def basic_merging_update(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
- None,
+ [],
wc_dir)
# Make a backup copy of the working copy
@@ -571,7 +579,7 @@ def basic_merging_update(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
- None,
+ [],
wc_dir)
# Make local mods to wc_backup by recreating mu and rho
@@ -652,7 +660,7 @@ def basic_conflict(sbox):
# Commit.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
+ expected_status)
# Create expected output tree for an update of the wc_backup.
expected_output = wc.State(wc_backup, {
@@ -666,6 +674,7 @@ def basic_conflict(sbox):
contents="\n".join(["This is the file 'mu'.",
"<<<<<<< .mine",
"Conflicting appended text for mu",
+ "||||||| .r1",
"=======",
"Original appended text for mu",
">>>>>>> .r2",
@@ -674,6 +683,7 @@ def basic_conflict(sbox):
contents="\n".join(["This is the file 'rho'.",
"<<<<<<< .mine",
"Conflicting appended text for rho",
+ "||||||| .r1",
"=======",
"Original appended text for rho",
">>>>>>> .r2",
@@ -694,9 +704,7 @@ def basic_conflict(sbox):
expected_output,
expected_disk,
expected_status,
- None,
- svntest.tree.detect_conflict_files,
- extra_files)
+ extra_files=extra_files)
# verify that the extra_files list is now empty.
if len(extra_files) != 0:
@@ -753,7 +761,7 @@ def basic_cleanup(sbox):
svntest.main.safe_rmtree(tmp_path)
# Run cleanup (### todo: cleanup doesn't currently print anything)
- svntest.actions.run_and_verify_svn("Cleanup command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'cleanup', wc_dir)
# Verify unlocked status.
@@ -781,12 +789,12 @@ def basic_revert(sbox):
svntest.main.file_append(rho_path, "Added some text to 'rho'.\n")
svntest.main.file_append(zeta_path, "Added some text to 'zeta'.\n")
- svntest.actions.run_and_verify_svn("Add command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'add', zeta_path)
- svntest.actions.run_and_verify_svn("Add prop command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'ps', 'random-prop', 'propvalue',
gamma_path)
- svntest.actions.run_and_verify_svn("Add prop command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'ps', 'random-prop', 'propvalue',
iota_path)
@@ -802,19 +810,19 @@ def basic_revert(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_output)
# Run revert (### todo: revert doesn't currently print anything)
- svntest.actions.run_and_verify_svn("Revert command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'revert', beta_path)
- svntest.actions.run_and_verify_svn("Revert command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'revert', gamma_path)
- svntest.actions.run_and_verify_svn("Revert command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'revert', iota_path)
- svntest.actions.run_and_verify_svn("Revert command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'revert', rho_path)
- svntest.actions.run_and_verify_svn("Revert command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'revert', zeta_path)
# Verify unmodified status.
@@ -846,7 +854,7 @@ def basic_revert(sbox):
# Finally, check that reverted file is not readonly
os.remove(beta_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'revert', beta_path)
+ svntest.actions.run_and_verify_svn(None, [], 'revert', beta_path)
if not (open(beta_path, 'r+')):
raise svntest.Failure
@@ -854,7 +862,7 @@ def basic_revert(sbox):
# removed, can be reverted.
X_path = sbox.ospath('X')
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', X_path)
+ svntest.actions.run_and_verify_svn(None, [], 'mkdir', X_path)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
@@ -863,7 +871,7 @@ def basic_revert(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
svntest.main.safe_rmtree(X_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'revert', X_path)
+ svntest.actions.run_and_verify_svn(None, [], 'revert', X_path)
expected_status.remove('X')
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -875,7 +883,7 @@ def basic_revert(sbox):
### Most of the rest of this test is ineffective, due to the
### problems described in issue #1611.
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', E_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', E_path)
svntest.main.safe_rmtree(E_path)
expected_status.tweak('A/B/E', status='D ')
expected_status.tweak('A/B/E', wc_rev='?')
@@ -916,7 +924,7 @@ def basic_revert(sbox):
# try updating instead."
#
# ...but due to test suite lossage, it'll still look like success.
- svntest.actions.run_and_verify_svn(None, None, [], 'revert', E_path)
+ svntest.actions.run_and_verify_svn(None, [], 'revert', E_path)
### FIXME: Again, the problem described in issue #1611 bites us here.
#
@@ -956,7 +964,7 @@ def basic_switch(sbox):
# First, try the switch without the --ignore-ancestry flag,
# expecting failure.
expected_error = "svn: E195012: .*no common ancestry.*"
- svntest.actions.run_and_verify_svn(None, None, expected_error,
+ svntest.actions.run_and_verify_svn(None, expected_error,
'switch', gamma_url, iota_path)
# Now ignore ancestry so we can ge through this switch.
@@ -964,7 +972,7 @@ def basic_switch(sbox):
expected_output,
expected_disk,
expected_status,
- None, None, None, None, None,
+ [],
False, '--ignore-ancestry')
### Switch the directory `A/D/H' to `A/D/G'.
@@ -1016,7 +1024,7 @@ def basic_switch(sbox):
# First, try the switch without the --ignore-ancestry flag,
# expecting failure.
expected_error = "svn: E195012: .*no common ancestry.*"
- svntest.actions.run_and_verify_svn(None, None, expected_error,
+ svntest.actions.run_and_verify_svn(None, expected_error,
'switch', ADG_url, ADH_path)
# Do the switch and check the results in three ways.
@@ -1024,7 +1032,7 @@ def basic_switch(sbox):
expected_output,
expected_disk,
expected_status,
- None, None, None, None, None,
+ [],
False, '--ignore-ancestry')
#----------------------------------------------------------------------
@@ -1108,31 +1116,31 @@ def basic_delete(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_output)
# 'svn rm' that should fail
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', chi_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', chi_parent_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', rho_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', rho_parent_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', F_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', F_parent_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', sigma_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', sigma_parent_path)
- svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'rm', X_path)
# check status has not changed
@@ -1140,22 +1148,22 @@ def basic_delete(sbox):
# 'svn rm' that should work
E_path = sbox.ospath('A/B/E')
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', E_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', E_path)
# 'svn rm --force' that should work
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--force',
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '--force',
chi_parent_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', rho_parent_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', F_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', sigma_parent_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', X_path)
# Deleting an unchanged copy shouldn't error.
@@ -1167,18 +1175,18 @@ def basic_delete(sbox):
# Deleting already removed from wc versioned item with --force
iota_path = sbox.ospath('iota')
os.remove(iota_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', iota_path)
# and without --force
gamma_path = sbox.ospath('A/D/gamma')
os.remove(gamma_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', gamma_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', gamma_path)
# Deleting already scheduled for deletion doesn't require --force
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', gamma_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', gamma_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', E_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', E_path)
# check status
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -1204,7 +1212,7 @@ def basic_delete(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# issue 687 delete directory with uncommitted directory child
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', Y_parent_path)
expected_status.tweak('A/D', status='D ')
@@ -1237,21 +1245,21 @@ def basic_delete(sbox):
# Deleting unversioned file explicitly
foo_path = sbox.ospath('foo')
svntest.main.file_append(foo_path, 'unversioned foo')
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force', foo_path)
verify_file_deleted("Failed to remove unversioned file foo", foo_path)
# At one stage deleting a URL dumped core
iota_URL = sbox.repo_url + '/iota'
- svntest.actions.run_and_verify_svn(None,
- ["\n", "Committed revision 2.\n"], [],
+ svntest.actions.run_and_verify_svn(["Committing transaction...\n",
+ "Committed revision 2.\n"], [],
'rm', '-m', 'delete iota URL',
iota_URL)
# Issue 4074, deleting a root url SEGV.
expected_error = 'svn: E170000: .*not within a repository'
- svntest.actions.run_and_verify_svn(None, [], expected_error,
+ svntest.actions.run_and_verify_svn([], expected_error,
'rm', sbox.repo_url,
'--message', 'delete root')
@@ -1265,8 +1273,7 @@ def basic_checkout_deleted(sbox):
# Delete A/D and commit.
D_path = sbox.ospath('A/D')
- svntest.actions.run_and_verify_svn("error scheduling A/D for deletion",
- None, [], 'rm', '--force', D_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '--force', D_path)
expected_output = wc.State(wc_dir, {
'A/D' : Item(verb='Deleting'),
@@ -1278,14 +1285,12 @@ def basic_checkout_deleted(sbox):
'A/D/gamma')
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# Now try to checkout revision 1 of A/D.
url = sbox.repo_url + '/A/D'
wc2 = sbox.ospath('new_D')
- svntest.actions.run_and_verify_svn("error checking out r1 of A/D",
- None, [], 'co', '-r', '1',
+ svntest.actions.run_and_verify_svn(None, [], 'co', '-r', '1',
url + "@1", wc2)
#----------------------------------------------------------------------
@@ -1309,7 +1314,7 @@ def basic_node_kind_change(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Try and fail to create a directory (file scheduled for deletion)
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', gamma_path)
+ svntest.actions.run_and_verify_svn(None, [], 'mkdir', gamma_path)
# Status is replaced
expected_status.tweak('A/D/gamma', status='R ')
@@ -1322,23 +1327,21 @@ def basic_node_kind_change(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/D/gamma', status=' ', wc_rev='2')
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# Try and fail to create a directory (file deleted)
- svntest.actions.run_and_verify_svn(None,
- None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'mkdir', gamma_path)
# Status is unchanged
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Update to finally get rid of file
- svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir)
# mkdir should succeed
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', gamma_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', gamma_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', gamma_path)
+ svntest.actions.run_and_verify_svn(None, [], 'mkdir', gamma_path)
expected_status.tweak(wc_rev=2)
expected_status.add({
@@ -1362,7 +1365,7 @@ def basic_import(sbox):
# import new files into repository
url = sbox.repo_url + "/dirA/dirB/new_file"
exit_code, output, errput = svntest.actions.run_and_verify_svn(
- 'Cannot change node kind', None, [], 'import',
+ None, [], 'import',
'-m', 'Log message for new import', new_path, url)
lastline = output.pop().strip()
@@ -1402,8 +1405,7 @@ def basic_import(sbox):
expected_output,
expected_disk,
expected_status,
- None, None, None,
- None, None, 1)
+ [], True)
#----------------------------------------------------------------------
@@ -1417,7 +1419,7 @@ def basic_cat(sbox):
# Get repository text even if wc is modified
svntest.main.file_append(mu_path, "some text")
- svntest.actions.run_and_verify_svn(None, ["This is the file 'mu'.\n"],
+ svntest.actions.run_and_verify_svn(["This is the file 'mu'.\n"],
[], 'cat',
###TODO is user/pass really necessary?
mu_path)
@@ -1436,33 +1438,27 @@ def basic_ls(sbox):
cwd = os.getcwd()
os.chdir(wc_dir)
- svntest.actions.run_and_verify_svn("ls implicit current directory",
- ["A/\n", "iota\n"],
+ svntest.actions.run_and_verify_svn(["A/\n", "iota\n"],
[], 'ls')
os.chdir(cwd)
- svntest.actions.run_and_verify_svn('ls the root of working copy',
- ['A/\n', 'iota\n'],
+ svntest.actions.run_and_verify_svn(['A/\n', 'iota\n'],
[], 'ls',
wc_dir)
- svntest.actions.run_and_verify_svn('ls a working copy directory',
- ['B/\n', 'C/\n', 'D/\n', 'mu\n'],
+ svntest.actions.run_and_verify_svn(['B/\n', 'C/\n', 'D/\n', 'mu\n'],
[], 'ls',
sbox.ospath('A'))
- svntest.actions.run_and_verify_svn('ls working copy directory with -r BASE',
- ['B/\n', 'C/\n', 'D/\n', 'mu\n'],
+ svntest.actions.run_and_verify_svn(['B/\n', 'C/\n', 'D/\n', 'mu\n'],
[], 'ls', '-r', 'BASE',
sbox.ospath('A'))
- svntest.actions.run_and_verify_svn('ls a single file',
- ['mu\n'],
+ svntest.actions.run_and_verify_svn(['mu\n'],
[], 'ls',
sbox.ospath('A/mu'))
- svntest.actions.run_and_verify_svn('recursive ls',
- ['E/\n', 'E/alpha\n', 'E/beta\n', 'F/\n',
+ svntest.actions.run_and_verify_svn(['E/\n', 'E/alpha\n', 'E/beta\n', 'F/\n',
'lambda\n' ], [], 'ls', '-R',
sbox.ospath('A/B'))
@@ -1497,11 +1493,11 @@ def nonexistent_repository(sbox):
# the root directory, the test could fail, and that's just too bad :-).
exit_code, output, errput = svntest.actions.run_and_verify_svn(
- None, None, svntest.verify.AnyOutput,
+ None, svntest.verify.AnyOutput,
'log', 'file:///nonexistent_path')
for line in errput:
- if re.match(".*Unable to open an ra_local session to URL.*", line):
+ if re.match(".*Unable to connect to a repository at URL.*", line):
return
# Else never matched the expected error output, so the test failed.
@@ -1525,18 +1521,18 @@ def basic_auth_cache(sbox):
svntest.main.safe_rmtree(wc_dir)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'checkout',
repo_url, wc_dir)
# Failed with "not locked" error on missing directory
svntest.main.safe_rmtree(sbox.ospath('A/B/E'))
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'status', '-u',
sbox.ospath('A/B'))
# Failed with "already locked" error on new dir
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'copy',
repo_url + '/A/B/E',
sbox.ospath('A/D/G'))
@@ -1565,7 +1561,7 @@ def basic_add_ignores(sbox):
open(foo_o_path, 'w')
exit_code, output, err = svntest.actions.run_and_verify_svn(
- "No output where some expected", svntest.verify.AnyOutput, [],
+ svntest.verify.AnyOutput, [],
'add', dir_path)
for line in output:
@@ -1589,11 +1585,11 @@ def basic_add_local_ignores(sbox):
dir_path = sbox.ospath('dir')
file_path = os.path.join(dir_path, 'app.lock')
- svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [],
'mkdir', dir_path)
svntest.main.run_svn(None, 'propset', 'svn:ignore', '*.lock', dir_path)
open(file_path, 'w')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'add', '--force', dir_path)
#----------------------------------------------------------------------
@@ -1618,7 +1614,7 @@ def basic_add_no_ignores(sbox):
open(foo_rej_path, 'w')
exit_code, output, err = svntest.actions.run_and_verify_svn(
- "No output where some expected", svntest.verify.AnyOutput, [],
+ svntest.verify.AnyOutput, [],
'add', '--no-ignore', dir_path)
for line in output:
@@ -1653,7 +1649,7 @@ def basic_add_parents(sbox):
o.close()
# Add the file, with it's parents
- svntest.actions.run_and_verify_svn(None, None, [], 'add', '--parents',
+ svntest.actions.run_and_verify_svn(None, [], 'add', '--parents',
zeta_path)
# Build expected state
@@ -1675,14 +1671,12 @@ def basic_add_parents(sbox):
# Commit and verify
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', X_path, '--keep-local')
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'add', '--parents', zeta_path)
#----------------------------------------------------------------------
@@ -1696,8 +1690,7 @@ def uri_syntax(sbox):
url = sbox.repo_url
scheme = url[:url.find(":")]
url = scheme + "://some_nonexistent_host_with_no_trailing_slash"
- svntest.actions.run_and_verify_svn("No error where one expected",
- None, svntest.verify.AnyOutput,
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
'co', url, local_dir)
# Different RA layers give different errors for failed checkouts;
@@ -1793,15 +1786,15 @@ def basic_peg_revision(sbox):
# Without the trailing "@", expect failure.
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, None, ".*Syntax error parsing peg revision 'abc'", 'cat', wc_file)
+ None, ".*Syntax error parsing peg revision 'abc'", 'cat', wc_file)
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, None, ".*Syntax error parsing peg revision 'abc'", 'cat', url)
+ None, ".*Syntax error parsing peg revision 'abc'", 'cat', url)
# With the trailing "@", expect success.
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, ["xyz\n"], [], 'cat', wc_file + '@')
+ ["xyz\n"], [], 'cat', wc_file + '@')
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, ["xyz\n"], [], 'cat', url + '@')
+ ["xyz\n"], [], 'cat', url + '@')
# Test with leading @ character in filename.
filename = '@abc'
@@ -1810,23 +1803,23 @@ def basic_peg_revision(sbox):
svntest.main.file_append(wc_file, 'xyz\n')
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, None, [], 'add', wc_file + '@')
+ None, [], 'add', wc_file + '@')
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, None, [], 'ci', '-m', 'secret log msg', wc_file + '@')
+ None, [], 'ci', '-m', 'secret log msg', wc_file + '@')
# With a leading "@" which isn't escaped, expect failure.
# Note that we just test with filename starting with '@', because
# wc_file + '@' + filename is a different situation where svn
# will try to parse filename as a peg revision.
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, None, ".*'%s' is just a peg revision.*" % filename,
+ None, ".*'%s' is just a peg revision.*" % filename,
'cat', filename)
# With a leading "@" which is escaped, expect success.
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, ["xyz\n"], [], 'cat', wc_file + '@')
+ ["xyz\n"], [], 'cat', wc_file + '@')
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, ["xyz\n"], [], 'cat', repos_dir + '/' + filename + '@')
+ ["xyz\n"], [], 'cat', repos_dir + '/' + filename + '@')
def info_nonhead(sbox):
"info on file not existing in HEAD"
@@ -1838,7 +1831,7 @@ def info_nonhead(sbox):
furl = repo_url + "/iota"
# Remove iota and commit.
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
"delete", fname)
expected_output = svntest.wc.State(wc_dir, {
'iota' : Item(verb='Deleting'),
@@ -1847,9 +1840,7 @@ def info_nonhead(sbox):
expected_status.remove("iota")
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
# Get info for old iota at r1.
expected_infos = [
{ 'URL' : '.*' },
@@ -1868,8 +1859,7 @@ def ls_nonhead(sbox):
# Delete A/D/rho and commit.
G_path = sbox.ospath('A/D/G')
- svntest.actions.run_and_verify_svn("error scheduling A/D/G for deletion",
- None, [], 'rm', G_path)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', G_path)
expected_output = wc.State(wc_dir, {
'A/D/G' : Item(verb='Deleting'),
@@ -1879,12 +1869,11 @@ def ls_nonhead(sbox):
expected_status.remove('A/D/G', 'A/D/G/rho', 'A/D/G/pi', 'A/D/G/tau',)
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# Check that we can list a file in A/D/G at revision 1.
rho_url = sbox.repo_url + "/A/D/G/rho"
- svntest.actions.run_and_verify_svn(None, '.* rho\n', [],
+ svntest.actions.run_and_verify_svn('.* rho\n', [],
'ls', '--verbose', rho_url + '@1')
@@ -1900,12 +1889,10 @@ def cat_added_PREV(sbox):
# Create and add a file.
svntest.main.file_append(f_path, 'new text')
- svntest.actions.run_and_verify_svn("adding file",
- None, [], 'add', f_path)
+ svntest.actions.run_and_verify_svn(None, [], 'add', f_path)
# Cat'ing the previous version should fail.
- svntest.actions.run_and_verify_svn("cat PREV version of file",
- None, ".*has no committed revision.*",
+ svntest.actions.run_and_verify_svn(None, ".*has no committed revision.*",
'cat', '-rPREV', f_path)
# Issue #2612.
@@ -1916,8 +1903,7 @@ def ls_space_in_repo_name(sbox):
sbox.build(name = "repo with spaces")
wc_dir = sbox.wc_dir
- svntest.actions.run_and_verify_svn('ls the root of the repository',
- ['A/\n', 'iota\n'],
+ svntest.actions.run_and_verify_svn(['A/\n', 'iota\n'],
[], 'ls',
sbox.repo_url)
@@ -1931,11 +1917,11 @@ def delete_keep_local(sbox):
C_path = sbox.ospath('A/C')
# Remove file iota
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local',
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '--keep-local',
iota_path)
# Remove directory 'A/C'
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local',
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '--keep-local',
C_path)
# Commit changes
@@ -1950,9 +1936,7 @@ def delete_keep_local(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
# Update working copy to check disk state still greek tree
expected_disk = svntest.main.greek_state.copy()
@@ -1972,31 +1956,72 @@ def delete_keep_local_twice(sbox):
dir = sbox.ospath('dir')
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', dir)
+ svntest.actions.run_and_verify_svn(None, [], 'mkdir', dir)
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local', dir)
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local', dir)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '--keep-local', dir)
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '--keep-local', dir)
if not os.path.isdir(dir):
logger.warn('Directory was really deleted')
raise svntest.Failure
-def windows_paths_in_repos(sbox):
+@XFail(svntest.main.is_mod_dav_url_quoting_broken)
+def special_paths_in_repos(sbox):
"use folders with names like 'c:hi'"
sbox.build(create_wc = False)
+ test_file_source = os.path.join(sbox.repo_dir, 'format')
repo_url = sbox.repo_url
- chi_url = sbox.repo_url + '/c:hi'
+ test_urls = [ sbox.repo_url + '/c:hi',
+ sbox.repo_url + '/C:',
+ sbox.repo_url + '/C&',
+ sbox.repo_url + '/C<',
+ sbox.repo_url + '/C# hi',
+ sbox.repo_url + '/C?',
+ sbox.repo_url + '/C+',
+ sbox.repo_url + '/C%']
- # do some manipulations on a folder containing a windows drive name.
- svntest.actions.run_and_verify_svn(None, None, [],
- 'mkdir', '-m', 'log_msg',
- chi_url)
+ # On Windows Apache HTTPD breaks '\' for us :(
+ if not (svntest.main.is_os_windows() and
+ svntest.main.is_ra_type_dav()):
+ test_urls += [ sbox.repo_url + '/C\\ri' ]
+
+ for test_url in test_urls:
+ test_file_url = test_url + '/' + test_url[test_url.rindex('/')+1:]
+
+ # do some manipulations on a folder which problematic names
+ svntest.actions.run_and_verify_svn(None, [],
+ 'mkdir', '-m', 'log_msg',
+ test_url)
+
+ svntest.actions.run_and_verify_svnmucc(None, [],
+ '-m', 'log_msg',
+ 'put', test_file_source,
+ test_file_url)
+
+ svntest.actions.run_and_verify_svnmucc(None, [],
+ 'propset', '-m', 'log_msg',
+ 'propname', 'propvalue', test_url)
+
+ svntest.actions.run_and_verify_svn('propvalue', [],
+ 'propget', 'propname', test_url)
+
+ svntest.actions.run_and_verify_svnmucc(None, [],
+ 'propset', '-m', 'log_msg',
+ 'propname', 'propvalue', test_file_url)
+
+ svntest.actions.run_and_verify_svn('propvalue', [],
+ 'propget', 'propname', test_file_url)
+
+ svntest.actions.run_and_verify_svn(None, [],
+ 'rm', '-m', 'log_msg',
+ test_file_url)
+
+ svntest.actions.run_and_verify_svn(None, [],
+ 'rm', '-m', 'log_msg',
+ test_url)
- svntest.actions.run_and_verify_svn(None, None, [],
- 'rm', '-m', 'log_msg',
- chi_url)
def basic_rm_urls_one_repo(sbox):
"remotely remove directories from one repository"
@@ -2008,7 +2033,7 @@ def basic_rm_urls_one_repo(sbox):
# Test 1: remotely delete one directory
E_url = repo_url + '/A/B/E'
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '-m', 'log_msg',
E_url)
@@ -2031,7 +2056,7 @@ def basic_rm_urls_one_repo(sbox):
F_url = repo_url + '/A/B/F'
C_url = repo_url + '/A/C'
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '-m', 'log_msg',
F_url, C_url)
@@ -2068,8 +2093,7 @@ def basic_rm_urls_multi_repos(sbox):
other_repo_dir, other_repo_url = sbox.add_repo_path("other")
svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 1)
other_wc_dir = sbox.add_wc_path("other")
- svntest.actions.run_and_verify_svn("Unexpected error during co",
- svntest.verify.AnyOutput, [], "co",
+ svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], "co",
other_repo_url,
other_wc_dir)
@@ -2079,7 +2103,7 @@ def basic_rm_urls_multi_repos(sbox):
F2_url = other_repo_url + '/A/B/F'
C2_url = other_repo_url + '/A/C'
- svntest.actions.run_and_verify_svn(None, None, [], 'rm', '-m', 'log_msg',
+ svntest.actions.run_and_verify_svn(None, [], 'rm', '-m', 'log_msg',
F_url, C_url, F2_url, C2_url)
# Check that the two rm's to each of the repositories were handled in one
@@ -2167,7 +2191,7 @@ def automatic_conflict_resolution(sbox):
# Commit.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
+ expected_status)
# Create expected output tree for an update of the wc_backup.
expected_output = wc.State(wc_backup, {
@@ -2184,6 +2208,7 @@ def automatic_conflict_resolution(sbox):
contents="\n".join(["This is the file 'lambda'.",
"<<<<<<< .mine",
"Conflicting appended text for lambda",
+ "||||||| .r1",
"=======",
"Original appended text for lambda",
">>>>>>> .r2",
@@ -2192,6 +2217,7 @@ def automatic_conflict_resolution(sbox):
contents="\n".join(["This is the file 'mu'.",
"<<<<<<< .mine",
"Conflicting appended text for mu",
+ "||||||| .r1",
"=======",
"Original appended text for mu",
">>>>>>> .r2",
@@ -2200,6 +2226,7 @@ def automatic_conflict_resolution(sbox):
contents="\n".join(["This is the file 'rho'.",
"<<<<<<< .mine",
"Conflicting appended text for rho",
+ "||||||| .r1",
"=======",
"Original appended text for rho",
">>>>>>> .r2",
@@ -2208,6 +2235,7 @@ def automatic_conflict_resolution(sbox):
contents="\n".join(["This is the file 'tau'.",
"<<<<<<< .mine",
"Conflicting appended text for tau",
+ "||||||| .r1",
"=======",
"Original appended text for tau",
">>>>>>> .r2",
@@ -2216,6 +2244,7 @@ def automatic_conflict_resolution(sbox):
contents="\n".join(["This is the file 'omega'.",
"<<<<<<< .mine",
"Conflicting appended text for omega",
+ "||||||| .r1",
"=======",
"Original appended text for omega",
">>>>>>> .r2",
@@ -2241,66 +2270,49 @@ def automatic_conflict_resolution(sbox):
expected_output,
expected_disk,
expected_status,
- None,
- svntest.tree.detect_conflict_files,
- extra_files)
-
- # verify that the extra_files list is now empty.
- if len(extra_files) != 0:
- # Because we want to be a well-behaved test, we silently raise if
- # the test fails. However, these two print statements would
- # probably reveal the cause for the failure, if they were
- # uncommented:
- #
- # logger.warn("Not all extra reject files have been accounted for:")
- # logger.warn(extra_files)
- ### we should raise a less generic error here. which?
- raise svntest.Failure
+ extra_files=extra_files)
# So now lambda, mu and rho are all in a "conflicted" state. Run 'svn
# resolve' with the respective "--accept[mine|orig|repo]" flag.
# But first, check --accept actions resolved does not accept.
- svntest.actions.run_and_verify_svn(None,
- # stdout, stderr
+ svntest.actions.run_and_verify_svn(# stdout, stderr
None,
".*invalid 'accept' ARG",
'resolve', '--accept=postpone')
- svntest.actions.run_and_verify_svn(None,
- # stdout, stderr
+ svntest.actions.run_and_verify_svn(# stdout, stderr
None,
".*invalid 'accept' ARG",
'resolve', '--accept=edit',
'--force-interactive')
- svntest.actions.run_and_verify_svn(None,
- # stdout, stderr
+ svntest.actions.run_and_verify_svn(# stdout, stderr
None,
".*invalid 'accept' ARG",
'resolve', '--accept=launch',
'--force-interactive')
# Run 'svn resolved --accept=NOPE. Using omega for the test.
- svntest.actions.run_and_verify_svn("Resolve command", None,
+ svntest.actions.run_and_verify_svn(None,
".*NOPE' is not a valid --accept value",
'resolve',
'--accept=NOPE',
omega_path_backup)
# Resolve lambda, mu, and rho with different --accept options.
- svntest.actions.run_and_verify_svn("Resolve command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'resolve', '--accept=base',
lambda_path_backup)
- svntest.actions.run_and_verify_svn("Resolve command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'resolve',
'--accept=mine-full',
mu_path_backup)
- svntest.actions.run_and_verify_svn("Resolve command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'resolve',
'--accept=theirs-full',
rho_path_backup)
fp = open(tau_path_backup, 'w')
fp.write("Resolution text for 'tau'.\n")
fp.close()
- svntest.actions.run_and_verify_svn("Resolve command", None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'resolve',
'--accept=working',
tau_path_backup)
@@ -2318,6 +2330,7 @@ def automatic_conflict_resolution(sbox):
contents="\n".join(["This is the file 'omega'.",
"<<<<<<< .mine",
"Conflicting appended text for omega",
+ "||||||| .r1",
"=======",
"Original appended text for omega",
">>>>>>> .r2",
@@ -2345,9 +2358,7 @@ def automatic_conflict_resolution(sbox):
expected_output,
expected_disk,
expected_status,
- None,
- svntest.tree.detect_conflict_files,
- extra_files)
+ extra_files=extra_files)
def info_nonexisting_file(sbox):
"get info on a file not in the repo"
@@ -2390,8 +2401,7 @@ def basic_relative_url_using_current_dir(sbox):
orig_dir = os.getcwd()
os.chdir(sbox.wc_dir)
- exit_code, output, error = svntest.actions.run_and_verify_svn(None,
- expected_output, [],
+ exit_code, output, error = svntest.actions.run_and_verify_svn(expected_output, [],
'blame', '^/iota')
os.chdir(orig_dir)
@@ -2423,8 +2433,7 @@ def basic_relative_url_using_other_targets(sbox):
" 3 jrandom New contents for mu\n",
]
- exit_code, output, error = svntest.actions.run_and_verify_svn(None,
- expected_output, [], 'blame',
+ exit_code, output, error = svntest.actions.run_and_verify_svn(expected_output, [], 'blame',
'^/iota', mu_url)
def basic_relative_url_multi_repo(sbox):
@@ -2438,8 +2447,7 @@ def basic_relative_url_multi_repo(sbox):
repo_dir2, repo_url2 = sbox.add_repo_path("other")
svntest.main.copy_repos(repo_dir1, repo_dir2, 1, 1)
wc_dir2 = sbox.add_wc_path("other")
- svntest.actions.run_and_verify_svn("Unexpected error during co",
- svntest.verify.AnyOutput, [], "co",
+ svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], "co",
repo_url2,
wc_dir2)
@@ -2447,7 +2455,7 @@ def basic_relative_url_multi_repo(sbox):
iota_url_repo1 = repo_url1 + '/iota'
iota_url_repo2 = repo_url2 + '/iota'
- exit_code, output, error = svntest.actions.run_and_verify_svn(None, [],
+ exit_code, output, error = svntest.actions.run_and_verify_svn([],
svntest.verify.AnyOutput, 'blame',
'^/A/mu', iota_url_repo1, iota_url_repo2)
@@ -2466,12 +2474,10 @@ def basic_relative_url_non_canonical(sbox):
"iota\n"
]
- exit_code, output, error = svntest.actions.run_and_verify_svn(None,
- expected_output, [], 'ls',
+ exit_code, output, error = svntest.actions.run_and_verify_svn(expected_output, [], 'ls',
'^/A/', iota_url)
- exit_code, output, error = svntest.actions.run_and_verify_svn(None,
- expected_output, [], 'ls',
+ exit_code, output, error = svntest.actions.run_and_verify_svn(expected_output, [], 'ls',
'^//A/', iota_url)
def basic_relative_url_with_peg_revisions(sbox):
@@ -2506,13 +2512,11 @@ def basic_relative_url_with_peg_revisions(sbox):
]
# Canonical version with peg revision
- exit_code, output, error = svntest.actions.run_and_verify_svn(None,
- expected_output, [], 'ls', '-r3',
+ exit_code, output, error = svntest.actions.run_and_verify_svn(expected_output, [], 'ls', '-r3',
'^/A/@3', iota_url)
# Non-canonical version with peg revision
- exit_code, output, error = svntest.actions.run_and_verify_svn(None,
- expected_output, [], 'ls', '-r3',
+ exit_code, output, error = svntest.actions.run_and_verify_svn(expected_output, [], 'ls', '-r3',
'^//A/@3', iota_url)
@@ -2578,7 +2582,7 @@ def basic_add_svn_format_file(sbox):
# The .svn directory and the format file should not be added as this
# breaks the administrative area handling, so we expect some error here
- svntest.actions.run_and_verify_svn(None, None,
+ svntest.actions.run_and_verify_svn(None,
".*reserved name.*",
'add', '--parents', entries_path)
@@ -2595,7 +2599,7 @@ def basic_mkdir_mix_targets(sbox):
Y_url = sbox.repo_url + '/Y'
expected_error = "svn: E200009: Cannot mix repository and working copy targets"
- svntest.actions.run_and_verify_svn(None, None, expected_error,
+ svntest.actions.run_and_verify_svn(None, expected_error,
'mkdir', '-m', 'log_msg', Y_url, 'subdir')
def delete_from_url_with_spaces(sbox):
@@ -2606,15 +2610,15 @@ def delete_from_url_with_spaces(sbox):
sbox.simple_mkdir('Dir With')
sbox.simple_mkdir('Dir With/Spaces')
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'ci', sbox.wc_dir, '-m', 'Added dir')
# This fails on 1.6.11 with an escaping error.
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', sbox.repo_url + '/Dir%20With%20Spaces',
'-m', 'Deleted')
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', sbox.repo_url + '/Dir%20With/Spaces',
'-m', 'Deleted')
@@ -2623,8 +2627,7 @@ def meta_correct_library_being_used(sbox):
"verify that neon/serf are compiled if tested"
expected_re = (r'^\* ra_%s :' % svntest.main.options.http_library)
expected_output = svntest.verify.RegexOutput(expected_re, match_all=False)
- svntest.actions.run_and_verify_svn("is $http_library available",
- expected_output, [], '--version')
+ svntest.actions.run_and_verify_svn(expected_output, [], '--version')
def delete_and_add_same_file(sbox):
"commit deletes a file and adds one with same text"
@@ -2653,9 +2656,7 @@ def delete_and_add_same_file(sbox):
# not found".
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
def delete_child_parent_update(sbox):
"rm child, commit, rm parent"
@@ -2674,9 +2675,7 @@ def delete_child_parent_update(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
svntest.main.run_svn(wc_dir, 'rm', sbox.ospath('A/B/E'))
expected_status.tweak('A/B/E', 'A/B/E/beta', status='D ')
@@ -2720,29 +2719,29 @@ def basic_relocate(sbox):
# No-op relocation of just the scheme.
scheme = repo_url[:repo_url.index('://')+3]
- svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
+ svntest.actions.run_and_verify_svn(None, [], 'switch', '--relocate',
scheme, scheme, wc_dir)
_verify_url(wc_dir, repo_url)
# No-op relocation of a bit more of the URL.
substring = repo_url[:repo_url.index('://')+7]
- svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
+ svntest.actions.run_and_verify_svn(None, [], 'switch', '--relocate',
substring, substring, wc_dir)
_verify_url(wc_dir, repo_url)
# Real relocation to OTHER_REPO_URL.
- svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
+ svntest.actions.run_and_verify_svn(None, [], 'switch', '--relocate',
repo_url, other_repo_url, wc_dir)
_verify_url(wc_dir, other_repo_url)
# ... and back again, using the newer 'svn relocate' subcommand.
- svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
+ svntest.actions.run_and_verify_svn(None, [], 'relocate',
other_repo_url, repo_url, wc_dir)
_verify_url(wc_dir, repo_url)
# To OTHER_REPO_URL again, this time with the single-URL form of
# 'svn relocate'.
- svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
+ svntest.actions.run_and_verify_svn(None, [], 'relocate',
other_repo_url, wc_dir)
_verify_url(wc_dir, other_repo_url)
@@ -2756,19 +2755,19 @@ def delete_urls_with_spaces(sbox):
sbox.build(create_wc = False)
# Create three directories with a space in their name
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir',
+ svntest.actions.run_and_verify_svn(None, [], 'mkdir',
sbox.repo_url + '/A spaced',
sbox.repo_url + '/B spaced',
sbox.repo_url + '/C spaced',
'-m', 'Created dirs')
# Try to delete the first
- svntest.actions.run_and_verify_svn(None, None, [], 'rm',
+ svntest.actions.run_and_verify_svn(None, [], 'rm',
sbox.repo_url + '/A spaced',
'-m', 'Deleted A')
# And then two at once
- svntest.actions.run_and_verify_svn(None, None, [], 'rm',
+ svntest.actions.run_and_verify_svn(None, [], 'rm',
sbox.repo_url + '/B spaced',
sbox.repo_url + '/C spaced',
'-m', 'Deleted B and C')
@@ -2781,8 +2780,7 @@ def ls_url_special_characters(sbox):
sbox.repo_url + '%2F' + 'A']
for url in special_urls:
- svntest.actions.run_and_verify_svn('ls URL with special characters',
- ['B/\n', 'C/\n', 'D/\n', 'mu\n'],
+ svntest.actions.run_and_verify_svn(['B/\n', 'C/\n', 'D/\n', 'mu\n'],
[], 'ls',
url)
@@ -2797,7 +2795,7 @@ def ls_multiple_and_non_existent_targets(sbox):
non_existent_path = sbox.ospath('non-existent')
expected_err = ".*W155010.*"
- svntest.actions.run_and_verify_svn2(None, None, expected_err,
+ svntest.actions.run_and_verify_svn2(None, expected_err,
1, 'ls', non_existent_path)
def non_existent_url_target():
@@ -2805,7 +2803,7 @@ def ls_multiple_and_non_existent_targets(sbox):
non_existent_url = sbox.repo_url + '/non-existent'
expected_err = ".*W160013.*"
- svntest.actions.run_and_verify_svn2(None, None, expected_err,
+ svntest.actions.run_and_verify_svn2(None, expected_err,
1, 'ls', non_existent_url)
def multiple_wc_targets():
"multiple wc targets"
@@ -2815,7 +2813,7 @@ def ls_multiple_and_non_existent_targets(sbox):
non_existent_path = sbox.ospath('non-existent')
# All targets are existing
- svntest.actions.run_and_verify_svn2(None, None, [],
+ svntest.actions.run_and_verify_svn2(None, [],
0, 'ls', alpha, beta)
# One non-existing target
@@ -2838,7 +2836,7 @@ def ls_multiple_and_non_existent_targets(sbox):
non_existent_url = sbox.repo_url + '/non-existent'
# All targets are existing
- svntest.actions.run_and_verify_svn2(None, None, [],
+ svntest.actions.run_and_verify_svn2(None, [],
0, 'ls', alpha, beta)
# One non-existing target
@@ -2893,7 +2891,7 @@ def add_multiple_targets(sbox):
expected_status = svntest.verify.UnorderedOutput(
['A ' + file1 + '\n',
'A ' + file2 + '\n'])
- svntest.actions.run_and_verify_svn(None, expected_status, [],
+ svntest.actions.run_and_verify_svn(expected_status, [],
'status', wc_dir)
@@ -2904,29 +2902,29 @@ def quiet_commits(sbox):
svntest.main.file_append(sbox.ospath('A/mu'), 'xxx')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'commit', sbox.wc_dir,
'--message', 'commit', '--quiet')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'mkdir', sbox.repo_url + '/X',
'--message', 'mkdir URL', '--quiet')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'import', sbox.ospath('A/mu'),
sbox.repo_url + '/f',
'--message', 'import', '--quiet')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'rm', sbox.repo_url + '/f',
'--message', 'rm URL', '--quiet')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'copy', sbox.repo_url + '/X',
sbox.repo_url + '/Y',
'--message', 'cp URL URL', '--quiet')
- svntest.actions.run_and_verify_svn(None, [], [],
+ svntest.actions.run_and_verify_svn([], [],
'move', sbox.repo_url + '/Y',
sbox.repo_url + '/Z',
'--message', 'mv URL URL', '--quiet')
@@ -2980,7 +2978,7 @@ def rm_missing_with_case_clashing_ondisk_item(sbox):
# Verify that the casing is not updated, because the path is on-disk.
expected_output = [ 'D %s\n' % iota_path ]
# 'svn rm' iota, should leave IOTA alone.
- svntest.actions.run_and_verify_svn(None, expected_output, [],
+ svntest.actions.run_and_verify_svn(expected_output, [],
'rm', iota_path)
# Test status: the unversioned IOTA should still be there.
@@ -3001,14 +2999,14 @@ def delete_conflicts_one_of_many(sbox):
svntest.main.file_append(sbox.ospath('A/D/G/rho'), 'new rho')
sbox.simple_commit()
svntest.main.file_append(sbox.ospath('A/D/G/rho'), 'conflict rho')
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'update', '-r1', '--accept', 'postpone',
wc_dir)
if not os.path.exists(sbox.ospath('A/D/G/rho.mine')):
raise svntest.Failure("conflict file rho.mine missing")
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'rm', '--force',
sbox.ospath('A/D/G/rho'),
sbox.ospath('A/D/G/tau'))
@@ -3043,12 +3041,38 @@ def peg_rev_on_non_existent_wc_path(sbox):
# test something.
sbox.simple_update()
# This currently fails with ENOENT on A/mu3.
- svntest.actions.run_and_verify_svn(None, ['r2\n'], [],
+ svntest.actions.run_and_verify_svn(['r2\n'], [],
'cat', '-r2', sbox.ospath('A3/mu3') + '@3')
os.chdir(sbox.ospath('A4'))
- svntest.actions.run_and_verify_svn(None, ['r2\n'], [],
+ svntest.actions.run_and_verify_svn(['r2\n'], [],
'cat', '-r2', sbox.ospath('mu3') + '@3')
+
+# With 'svn mkdir --parents' the target directory may already exist on disk.
+# In that case it was wrongly performing a recursive 'add' on its contents.
+def mkdir_parents_target_exists_on_disk(sbox):
+ "mkdir parents target exists on disk"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ Y_path = sbox.ospath('Y')
+ Y_Z_path = sbox.ospath('Y/Z')
+
+ os.mkdir(Y_path)
+ os.mkdir(Y_Z_path)
+ svntest.actions.run_and_verify_svn(None, [],
+ 'mkdir', '--parents', Y_path)
+
+ # Y should be added, and Z should not. There was a regression in which Z
+ # was also added.
+ expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+ expected_status.add({
+ 'Y' : Item(status='A ', wc_rev=0),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
########################################################################
# Run the tests
@@ -3091,7 +3115,7 @@ test_list = [ None,
ls_space_in_repo_name,
delete_keep_local,
delete_keep_local_twice,
- windows_paths_in_repos,
+ special_paths_in_repos,
basic_rm_urls_one_repo,
basic_rm_urls_multi_repos,
automatic_conflict_resolution,
@@ -3117,6 +3141,7 @@ test_list = [ None,
rm_missing_with_case_clashing_ondisk_item,
delete_conflicts_one_of_many,
peg_rev_on_non_existent_wc_path,
+ mkdir_parents_target_exists_on_disk,
]
if __name__ == '__main__':