[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

PATCH: Python test for conflicts...

From: Mike Sussman <msussman_at_collab.net>
Date: 2001-06-08 03:28:37 CEST

Modified: subversion/tests/clients/cmdline/local_tests.py svn_tree.py

  * subversion/tests/clients/cmdline/svn_tree.py (compare_trees) : This
one's a biggie. In trying to write the conflict function, it became
apparent that the old compare trees was first flattening the tree structure
and then comparing children based only on an index into an array of
children. This worked fine until the conflict test, where there are extra
entries (namely, the .rej files) in the backup directory where the conflict
actually occurs. This means that rho.xxx.rej from the backup tree would be
compared to tau from the first tree, and fail. As a result, compare_trees
was rewritten to take and pass "singleton_handler" functions which would be
called in case one tree contains elements not found in the other tree. For
most tests this will simply call the "default_singleton_handler()" which
simply raises an SVNTreeUnequal exception. For the conflict test, however,
it calls local_tests.verify_rej_files(), which sees if the singleton was a
.rej file. This will also be useful for tests which update into a local
copy with pre-existing files not found in the repository.

  (compare_file_nodes) : Renamed version of compare_nodes to reflect its
express use as a comparison function only for files.

  (get_child, default_singleton_handler) : New helper funcs.

  (SVNTypeMismatch, SVNTreeIsNotDirectory) : New Exceptions.

  * subversion/tests/clients/cmdline/local_tests.py (conflict_from_wc_top)
: New test for conflict.

  (verify_rej_file) : New singleton func to handle the .rej files in the
conflict test.

  (extra_files) : New global dictionary needed by both verify_rej_file and
conflict_from_wc_top to verify that all .rej files have been covered exactly

  (run_and_verify_commit, run_and_verify_update, run_and_verify_status,
run_and_verify_checkout) : Take new singleton funcs as arguments and pass to
compare_trees. All callers changed.

  (guarantee_greek_repository) : Minor bugfix - modified url to take proper
number of forward slashes. We were actually passing a URL to SVN with four
forward slashes, but this was actually getting hidden by SVN's robustness.

  (test_list) : Run the new conflict test.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat Oct 21 14:36:31 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.