summaryrefslogtreecommitdiff
path: root/subversion/tests/cmdline/trans_tests.py
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-08-05 16:22:51 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-08-05 16:22:51 +0000
commitcf46733632c7279a9fd0fe6ce26f9185a4ae82a9 (patch)
treeda27775a2161723ef342e91af41a8b51fedef405 /subversion/tests/cmdline/trans_tests.py
parentbb0ef45f7c46b0ae221b26265ef98a768c33f820 (diff)
downloadsubversion-tarball-cf46733632c7279a9fd0fe6ce26f9185a4ae82a9.tar.gz
Diffstat (limited to 'subversion/tests/cmdline/trans_tests.py')
-rwxr-xr-xsubversion/tests/cmdline/trans_tests.py122
1 files changed, 58 insertions, 64 deletions
diff --git a/subversion/tests/cmdline/trans_tests.py b/subversion/tests/cmdline/trans_tests.py
index 3dd4fd4..8aa2597 100755
--- a/subversion/tests/cmdline/trans_tests.py
+++ b/subversion/tests/cmdline/trans_tests.py
@@ -191,7 +191,7 @@ def setup_working_copy(wc_dir, value_len):
# Set the property keyword for PATH. Turn on all possible keywords.
### todo: Later, take list of keywords to set.
def keywords_on(path):
- svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+ svntest.actions.run_and_verify_svn(None, [], 'propset',
"svn:keywords",
"Author Rev Date URL Id Header",
path)
@@ -199,7 +199,7 @@ def keywords_on(path):
# Delete property NAME from versioned PATH in the working copy.
### todo: Later, take list of keywords to remove from the propval?
def keywords_off(path):
- svntest.actions.run_and_verify_svn(None, None, [], 'propdel',
+ svntest.actions.run_and_verify_svn(None, [], 'propdel',
"svn:keywords", path)
@@ -298,7 +298,7 @@ def keywords_from_birth(sbox):
})
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- None, None, wc_dir)
+ None)
# Make sure the unexpanded URL keyword got expanded correctly.
fp = open(url_unexp_path, 'r')
@@ -449,9 +449,6 @@ def keywords_from_birth(sbox):
# This is a slight rewrite of his test, to use the run_and_verify_* API.
# This is for issue #631.
-def do_nothing(x, y):
- return 0
-
@Issue(631)
def update_modified_with_translation(sbox):
"update modified file with eol-style 'native'"
@@ -462,7 +459,7 @@ def update_modified_with_translation(sbox):
# Replace contents of rho and set eol translation to 'native'
rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
svntest.main.file_write(rho_path, "1\n2\n3\n4\n5\n6\n7\n8\n9\n")
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'propset', 'svn:eol-style', 'native',
rho_path)
@@ -479,7 +476,7 @@ def update_modified_with_translation(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
- None, rho_path)
+ [], rho_path)
# Change rho again
svntest.main.file_write(rho_path, "1\n2\n3\n4\n4.5\n5\n6\n7\n8\n9\n")
@@ -491,7 +488,7 @@ def update_modified_with_translation(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
- None, rho_path)
+ [], rho_path)
# Locally modify rho again.
svntest.main.file_write(rho_path, "1\n2\n3\n4\n4.5\n5\n6\n7\n8\n9\n10\n")
@@ -515,6 +512,17 @@ def update_modified_with_translation(sbox):
"8",
"9",
"10",
+ "||||||| .r3",
+ "1",
+ "2",
+ "3",
+ "4",
+ "4.5",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
"=======",
"This is the file 'rho'.",
">>>>>>> .r1",
@@ -522,13 +530,14 @@ def update_modified_with_translation(sbox):
# Updating back to revision 1 should not error; the merge should
# work, with eol-translation turned on.
+ extra_files = ['rho.r1', 'rho.r3', 'rho.mine']
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
expected_disk,
- None, None,
- do_nothing, None,
- None, None,
- 0, '-r', '1', wc_dir)
+ None,
+ [], False,
+ '-r', '1', wc_dir,
+ extra_files=extra_files)
#----------------------------------------------------------------------
@@ -559,23 +568,24 @@ def eol_change_is_text_mod(sbox):
f.close()
# commit the file
- svntest.actions.run_and_verify_svn(None, None, [], 'add', foo_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [], 'add', foo_path)
+ svntest.actions.run_and_verify_svn(None, [],
'ci', '-m', 'log msg',
foo_path)
if svntest.main.windows:
- svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+ svntest.actions.run_and_verify_svn(None, [], 'propset',
'svn:eol-style', 'LF', foo_path)
else:
- svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+ svntest.actions.run_and_verify_svn(None, [], 'propset',
'svn:eol-style', 'CRLF', foo_path)
# check 1: did new contents get transmitted?
expected_output = ["Sending " + foo_path + "\n",
- "Transmitting file data .\n",
+ "Transmitting file data .done\n",
+ "Committing transaction...\n",
"Committed revision 3.\n"]
- svntest.actions.run_and_verify_svn(None, expected_output, [],
+ svntest.actions.run_and_verify_svn(expected_output, [],
'ci', '-m', 'log msg', foo_path)
# check 2: do the files have the right contents now?
@@ -605,20 +615,20 @@ def keyword_expanded_on_checkout(sbox):
# The bug didn't occur if there were multiple files in the
# directory, so setup an empty directory.
Z_path = os.path.join(wc_dir, 'Z')
- svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', Z_path)
+ svntest.actions.run_and_verify_svn(None, [], 'mkdir', Z_path)
# Add the file that has the keyword to be expanded
url_path = os.path.join(Z_path, 'url')
svntest.main.file_append(url_path, "$URL$")
- svntest.actions.run_and_verify_svn(None, None, [], 'add', url_path)
+ svntest.actions.run_and_verify_svn(None, [], 'add', url_path)
keywords_on(url_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'ci', '-m', 'log msg', wc_dir)
other_wc_dir = sbox.add_wc_path('other')
other_url_path = os.path.join(other_wc_dir, 'Z', 'url')
- svntest.actions.run_and_verify_svn(None, None, [], 'checkout',
+ svntest.actions.run_and_verify_svn(None, [], 'checkout',
sbox.repo_url,
other_wc_dir)
@@ -645,7 +655,7 @@ def cat_keyword_expansion(sbox):
# Set up A/mu to do $Rev$ keyword expansion
svntest.main.file_append(mu_path , "$Rev$\n$Author$")
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'propset', 'svn:keywords', 'Rev Author',
mu_path)
@@ -655,38 +665,35 @@ def cat_keyword_expansion(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/mu', wc_rev=2)
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# Change the author to value which will get truncated on expansion
full_author = "x" * 400
key_author = "x" * 244
svntest.actions.enable_revprop_changes(sbox.repo_dir)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'propset', '--revprop', '-r2',
'svn:author', full_author,
sbox.wc_dir)
- svntest.actions.run_and_verify_svn(None, [ full_author ], [],
+ svntest.actions.run_and_verify_svn([ full_author ], [],
'propget', '--revprop', '-r2',
- 'svn:author', '--strict',
+ 'svn:author', '--no-newline',
sbox.wc_dir)
# Make another commit so that the last changed revision for A/mu is
# not HEAD.
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'propset', 'foo', 'bar', lambda_path)
expected_output = wc.State(wc_dir, {
'A/B/lambda' : Item(verb='Sending'),
})
expected_status.tweak('A/B/lambda', wc_rev=3)
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# At one stage the keywords were expanded to values for the requested
# revision, not to those committed revision
- 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",
"$Rev: 2 $\n",
"$Author: " + key_author + " $"], [],
'cat', '-r', 'HEAD', mu_path)
@@ -702,8 +709,8 @@ def copy_propset_commit(sbox):
mu2_path = os.path.join(wc_dir, 'A', 'mu2')
# Copy and propset
- svntest.actions.run_and_verify_svn(None, None, [], 'copy', mu_path, mu2_path)
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [], 'copy', mu_path, mu2_path)
+ svntest.actions.run_and_verify_svn(None, [],
'propset', 'svn:eol-style', 'native',
mu2_path)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -718,8 +725,7 @@ def copy_propset_commit(sbox):
})
expected_status.tweak('A/mu2', status=' ', wc_rev=2, copied=None)
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
#----------------------------------------------------------------------
# Create a greek tree, commit a keyword into one file,
@@ -741,11 +747,10 @@ def propset_commit_checkout_nocrash(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/mu', wc_rev=2)
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# Set property to do keyword expansion on A/mu, commit.
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'propset', 'svn:keywords', 'Rev', mu_path)
expected_output = wc.State(wc_dir, {
'A/mu' : Item(verb='Sending'),
@@ -753,14 +758,13 @@ def propset_commit_checkout_nocrash(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/mu', wc_rev=3)
svntest.actions.run_and_verify_commit(wc_dir,
- expected_output, expected_status,
- None, wc_dir)
+ expected_output, expected_status)
# Check out into another wc dir
other_wc_dir = sbox.add_wc_path('other')
mu_other_path = os.path.join(other_wc_dir, 'A', 'mu')
- svntest.actions.run_and_verify_svn(None, None, [], 'checkout',
+ svntest.actions.run_and_verify_svn(None, [], 'checkout',
sbox.repo_url,
other_wc_dir)
@@ -783,14 +787,14 @@ def propset_revert_noerror(sbox):
# Set the Rev keyword for the mu file
# could use the keywords_on()/keywords_off() functions to
# set/del all svn:keywords
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'propset', 'svn:keywords', 'Rev', mu_path)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/mu', status=' M')
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Revert the propset
- svntest.actions.run_and_verify_svn(None, None, [], 'revert', mu_path)
+ svntest.actions.run_and_verify_svn(None, [], 'revert', mu_path)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -822,9 +826,7 @@ def props_only_file_update(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
# Create r3 that drops svn:keywords
@@ -837,9 +839,7 @@ def props_only_file_update(sbox):
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
- expected_status,
- None,
- wc_dir)
+ expected_status)
# Now, go back to r2. iota should have the Author keyword expanded.
expected_disk = svntest.main.greek_state.copy()
@@ -849,9 +849,7 @@ def props_only_file_update(sbox):
svntest.actions.run_and_verify_update(wc_dir,
None, None, expected_status,
- None,
- None, None, None, None,
- False,
+ [], False,
wc_dir, '-r', '2')
if open(iota_path).read() != ''.join(content_expanded):
@@ -864,11 +862,7 @@ def props_only_file_update(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
svntest.actions.run_and_verify_update(wc_dir,
- None, expected_disk, expected_status,
- None,
- None, None, None, None,
- False,
- wc_dir)
+ None, expected_disk, expected_status)
if open(iota_path).read() != ''.join(content):
raise svntest.Failure("$Author$ is not contracted in 'iota'")
@@ -905,11 +899,11 @@ def autoprops_inconsistent_eol(sbox):
sbox.simple_add_text(text, 'add.c')
sbox.simple_add_text(text, 'add-force.c')
- svntest.actions.run_and_verify_svn(None, None, '.*inconsistent newlines.*',
+ svntest.actions.run_and_verify_svn(None, '.*inconsistent newlines.*',
'ps', 'svn:eol-style', 'native',
sbox.ospath('add.c'))
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, [],
'ps', 'svn:eol-style', 'native', '--force',
sbox.ospath('add.c'))
@@ -931,7 +925,7 @@ def autoprops_inconsistent_eol(sbox):
expected_output = ['A %s\n' % sbox.ospath('auto.c')]
# Fails with svn: E200009: File '.*auto.c' has inconsistent newlines
- svntest.actions.run_and_verify_svn(None, expected_output,
+ svntest.actions.run_and_verify_svn(expected_output,
[], 'add', sbox.ospath('auto.c'))
@XFail()
@@ -950,7 +944,7 @@ def autoprops_inconsistent_mime(sbox):
expected_output = ['A %s\n' % sbox.ospath('c.iota.c')]
# Fails with svn: E200009: File '.*c.iota.c' has binary mime type property
- svntest.actions.run_and_verify_svn(None, expected_output,
+ svntest.actions.run_and_verify_svn(expected_output,
[], 'add', sbox.ospath('c.iota.c'))