You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/10/02 23:52:55 UTC
svn commit: r1393204 - in /subversion/trunk/subversion/tests/cmdline:
mergeinfo_tests.py svntest/actions.py
Author: julianfoad
Date: Tue Oct 2 21:52:55 2012
New Revision: 1393204
URL: http://svn.apache.org/viewvc?rev=1393204&view=rev
Log:
Revert the part of r1389031 that made one of the 'svn mergeinfo' tests start
testing the new graphical summary output. Rationale: that test should keep
doing what it was doing before, which is most directly achieved by adding
the '--show-revs=merged' option; and the graphical summary is in early
development and subject to change considerably so it is not yet useful to
test that it remains the same.
* subversion/tests/cmdline/mergeinfo_tests.py
(no_mergeinfo): Remove the graph-shaped expected output and restore the
original blank expectation; add the '--show-revs=merged' option.
* subversion/tests/cmdline/svntest/actions.py
(run_and_verify_mergeinfo): Remove the support for passing a single long
string as the expected output.
Modified:
subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/actions.py
Modified: subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py?rev=1393204&r1=1393203&r2=1393204&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py Tue Oct 2 21:52:55 2012
@@ -70,23 +70,10 @@ def no_mergeinfo(sbox):
sbox.build(create_wc=False)
sbox.simple_repo_copy('A', 'A2')
svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
- "\n".join(
-[" youngest last repos."] +
-[" common full tip of path of"] +
-[" ancestor merge branch branch"] +
-[""] +
-[" 1 2 "] +
-[" | | "] +
-[" ----------| ... |------------- A"] +
-[" \ "] +
-[" \ "] +
-[" -----| ... |------------- A2"] +
-[" | "] +
-[" WC "] +
-[""]
- ),
+ [],
sbox.repo_url + '/A',
- sbox.repo_url + '/A2')
+ sbox.repo_url + '/A2',
+ "--show-revs=merged")
def mergeinfo(sbox):
"'mergeinfo' on a path with mergeinfo"
Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=1393204&r1=1393203&r2=1393204&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Tue Oct 2 21:52:55 2012
@@ -1266,9 +1266,9 @@ def run_and_verify_mergeinfo(error_re_st
expected_output = [],
*args):
"""Run 'svn mergeinfo ARGS', and compare the result against
- EXPECTED_OUTPUT, which is either a list of string representations
- of revisions expected in the output, or a plain string.
- Raise an exception if an unexpected output is encountered."""
+ EXPECTED_OUTPUT, a list of string representations of revisions
+ expected in the output. Raise an exception if an unexpected
+ output is encountered."""
mergeinfo_command = ["mergeinfo"]
mergeinfo_command.extend(args)
@@ -1281,36 +1281,23 @@ def run_and_verify_mergeinfo(error_re_st
verify.verify_outputs(None, None, err, None, expected_err)
return
- if isinstance(expected_output, list):
- out = [_f for _f in [x.rstrip()[1:] for x in out] if _f]
- expected_output.sort()
- extra_out = []
- if out != expected_output:
- exp_hash = dict.fromkeys(expected_output)
- for rev in out:
- if rev in exp_hash:
- del(exp_hash[rev])
- else:
- extra_out.append(rev)
- extra_exp = list(exp_hash.keys())
- raise Exception("Unexpected 'svn mergeinfo' output:\n"
- " expected but not found: %s\n"
- " found but not expected: %s"
- % (', '.join([str(x) for x in extra_exp]),
- ', '.join([str(x) for x in extra_out])))
- elif isinstance(expected_output, str):
- out = "".join(out)
- if out != expected_output:
- raise Exception("Unexpected 'svn mergeinfo' output:\n"
- " expected:\n%s\n"
- " found:\n%s\n"
- " diff:\n%s\n"
- % (expected_output, out,
- '\n'.join(difflib.unified_diff(
- expected_output.splitlines(),
- out.splitlines()))))
- else:
- raise Exception("expected_output has unexpected type")
+ out = [_f for _f in [x.rstrip()[1:] for x in out] if _f]
+ expected_output.sort()
+ extra_out = []
+ if out != expected_output:
+ exp_hash = dict.fromkeys(expected_output)
+ for rev in out:
+ if rev in exp_hash:
+ del(exp_hash[rev])
+ else:
+ extra_out.append(rev)
+ extra_exp = list(exp_hash.keys())
+ raise Exception("Unexpected 'svn mergeinfo' output:\n"
+ " expected but not found: %s\n"
+ " found but not expected: %s"
+ % (', '.join([str(x) for x in extra_exp]),
+ ', '.join([str(x) for x in extra_out])))
+
def run_and_verify_switch(wc_dir_name,
wc_target,