[[[
In the regression tests, fix the order of arguments to compare_trees and
display_trees where it was wrong. This only affects the sense of the error
message that is produced when a test fails: sometimes the "expected output" and
"actual output" were transposed.
* subversion/tests/clients/cmdline/prop_tests.py
(make_local_props): Fix order of args to compare_trees.
* subversion/tests/clients/cmdline/svntest/actions.py
(run_and_verify_merge): Fix order of args to compare_trees.
(run_and_verify_commit): Change misleading variable name 'expected_tree'
to 'mytree'. Fix order of args to display_trees.
]]]
Patch attached for review.
Note that the order of arguments is different between compare_trees(actual, expected, ...) and display_trees(..., expected, actual). It would be good to make them the same. Changing compare_trees to the other way would be best in terms of matching the desired order of output messages, but would be a much more extensive change. Changing display_trees would be relatively easy and localised. I don't have the will to do either of these right now.
- Julian
In the regression tests, fix the order of arguments to compare_trees and
display_trees where it was wrong. This only affects the sense of the error
message that is produced when a test fails: sometimes the "expected output" and
"actual output" were transposed.
* subversion/tests/clients/cmdline/prop_tests.py
(make_local_props): Fix order of args to compare_trees.
* subversion/tests/clients/cmdline/svntest/actions.py
(run_and_verify_merge): Fix order of args to compare_trees.
(run_and_verify_commit): Change misleading variable name 'expected_tree'
to 'mytree'. Fix order of args to display_trees.
Index: subversion/tests/clients/cmdline/prop_tests.py
===================================================================
--- subversion/tests/clients/cmdline/prop_tests.py (revision 7713)
+++ subversion/tests/clients/cmdline/prop_tests.py (working copy)
@@ -87,7 +87,7 @@ def make_local_props(sbox):
actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
# Compare actual vs. expected disk trees.
- svntest.tree.compare_trees(expected_disk.old_tree(), actual_disk_tree)
+ svntest.tree.compare_trees(actual_disk_tree, expected_disk.old_tree())
#----------------------------------------------------------------------
Index: subversion/tests/clients/cmdline/svntest/actions.py
===================================================================
--- subversion/tests/clients/cmdline/svntest/actions.py (revision 7713)
+++ subversion/tests/clients/cmdline/svntest/actions.py (working copy)
@@ -406,7 +406,7 @@ def run_and_verify_merge(dir, rev1, rev2
out_dry, err_dry = main.run_svn(error_re_string, *dry_run_command)
post_disk = tree.build_tree_from_wc(dir)
try:
- tree.compare_trees(pre_disk, post_disk)
+ tree.compare_trees(post_disk, pre_disk)
except tree.SVNTreeError:
print "============================================================="
print "Dry-run merge altered working copy"
@@ -451,7 +451,7 @@ def run_and_verify_merge(dir, rev1, rev2
raise Failure
myskiptree = tree.build_tree_from_skipped(out)
- tree.compare_trees(skip_tree, myskiptree,
+ tree.compare_trees(myskiptree, skip_tree,
extra_skip, None, missing_skip, None)
mytree = tree.build_tree_from_checkout(out)
@@ -573,14 +573,14 @@ def run_and_verify_commit(wc_dir_name, o
output.append(lastline)
# Convert the output into a tree.
- expected_tree = tree.build_tree_from_commit (output)
+ mytree = tree.build_tree_from_commit (output)
# Verify actual output against expected output.
try:
- tree.compare_trees (expected_tree, output_tree)
+ tree.compare_trees (mytree, output_tree)
except tree.SVNTreeError:
display_trees("Output of commit is unexpected.",
- "OUTPUT TREE", expected_tree, output_tree)
+ "OUTPUT TREE", output_tree, mytree)
raise
# Verify via 'status' command too, if possible.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 14 05:00:56 2003