subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1646230 - /subversion/trunk/subversion/tests/cmdline/
Date Wed, 17 Dec 2014 13:12:07 GMT
Author: julianfoad
Date: Wed Dec 17 13:12:06 2014
New Revision: 1646230

In the svnsync tests, remove a load-and-dump cycle from the repository
comparison function.

The load-and-dump cycle was introduced in r1230676 to account for different
ordering of nodes in dumpfiles generated by different versions of

In r1292507 the test suite was changed to compare dumpfiles in parsed form,
to account for variable ordering of nodes produced by different runs of
Subversion. This makes the previous patch redundant.

Loading and dumping can change data in some cases -- for example 'load'
currently rewrites svn:mergeinfo -- and so could mask errors or cause errors
in certain tests. The current tests seem to be unaffected but it broke a
test that I am writing for issue #4476 "Mergeinfo containing r0 makes
svnsync and dump and load fail". That is not to say that comparing dumpfiles
in parsed form cannot also mask errors, but one procedure is better than

* subversion/tests/cmdline/
  (verify_mirror): Take the expected dump file contents directly instead
    of in a repository in a sandbox.
   delete_revprops): Pass the expected dump file contents directly instead
    of in a repository in a sandbox.


Modified: subversion/trunk/subversion/tests/cmdline/
--- subversion/trunk/subversion/tests/cmdline/ (original)
+++ subversion/trunk/subversion/tests/cmdline/ Wed Dec 17 13:12:06 2014
@@ -209,8 +209,12 @@ def setup_and_sync(sbox, dump_file_conte
   return dest_sbox
-def verify_mirror(dest_sbox, src_sbox):
-  """Compare the contents of the DEST_SBOX repository with EXP_DUMP_FILE_CONTENTS."""
+def verify_mirror(dest_sbox, exp_dump_file_contents):
+  """Compare the contents of the mirror repository in DEST_SBOX with
+     EXP_DUMP_FILE_CONTENTS, by comparing the parsed dump stream content.
+     First remove svnsync rev-props from the DEST_SBOX repository.
+  """
   # Remove some SVNSync-specific housekeeping properties from the
   # mirror repository in preparation for the comparison dump.
@@ -222,10 +226,9 @@ def verify_mirror(dest_sbox, src_sbox):
   # Create a dump file from the mirror repository.
   dest_dump = svntest.actions.run_and_verify_dump(dest_sbox.repo_dir)
-  src_dump = svntest.actions.run_and_verify_dump(src_sbox.repo_dir)
-    "Dump files", "DUMP", src_dump, dest_dump)
+    "Dump files", "DUMP", exp_dump_file_contents, dest_dump)
 def run_test(sbox, dump_file_name, subdir=None, exp_dump_file_name=None,
              bypass_prop_validation=False, source_prop_encoding=None,
@@ -251,16 +254,12 @@ or another dump file."""
   # dump file (used to create the master repository) or another specified dump
   # file.
   if exp_dump_file_name:
-    build_repos(sbox)
-    svntest.actions.run_and_verify_load(sbox.repo_dir,
-                                        open(os.path.join(svnsync_tests_dir,
-                                                          exp_dump_file_name),
-                                             'rb').readlines())
-    src_sbox = sbox
+    exp_dump_file_contents = open(os.path.join(svnsync_tests_dir,
+                                  exp_dump_file_name), 'rb').readlines()
-    src_sbox = sbox
+    exp_dump_file_contents = master_dumpfile_contents
-  verify_mirror(dest_sbox, sbox)
+  verify_mirror(dest_sbox, exp_dump_file_contents)
@@ -564,9 +563,7 @@ def delete_revprops(sbox):
   run_copy_revprops(dest_sbox.repo_url, sbox.repo_url)
   # Does the result look as we expected?
-  build_repos(sbox)
-  svntest.actions.run_and_verify_load(sbox.repo_dir, expected_contents)
-  verify_mirror(dest_sbox, sbox)
+  verify_mirror(dest_sbox, expected_contents)

View raw message