You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/02/07 21:31:21 UTC

svn commit: r1241599 - /subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py

Author: hwright
Date: Tue Feb  7 20:31:21 2012
New Revision: 1241599

URL: http://svn.apache.org/viewvc?rev=1241599&view=rev
Log:
Editors are not required to provide the base checksum, so allow the dumpfile
comparor to ignore them.

This change is being made specifically to placate the Ev2 editor shims.
Someday it may not be required, and if/when that day comes, feel free to back
it out.

Current number of Ev2 test failures: 10

* subversion/tests/cmdline/svnrdump_tests.py
  (compare_repos_dumps): If asked, strip out the text delta base from the
    dumpfile output.
  (copy_bad_line_endings2_dump): Ask the above to ignore the base checksums.

Modified:
    subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py?rev=1241599&r1=1241598&r2=1241599&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py Tue Feb  7 20:31:21 2012
@@ -93,7 +93,8 @@ def compare_repos_dumps(svnrdump_sbox, s
     "Dump files", "DUMP", svnadmin_contents, svnrdump_contents)
 
 def run_dump_test(sbox, dumpfile_name, expected_dumpfile_name = None,
-                  subdir = None, bypass_prop_validation = False):
+                  subdir = None, bypass_prop_validation = False,
+                  ignore_base_checksums = False):
   """Load a dumpfile using 'svnadmin load', dump it with 'svnrdump
   dump' and check that the same dumpfile is produced or that
   expected_dumpfile_name is produced if provided. Additionally, the
@@ -129,8 +130,15 @@ def run_dump_test(sbox, dumpfile_name, e
     svnadmin_dumpfile = open(os.path.join(svnrdump_tests_dir,
                                           expected_dumpfile_name),
                              'rb').readlines()
-    svnadmin_dumpfile = svntest.verify.UnorderedOutput(svnadmin_dumpfile)
     # Compare the output from stdout
+    if ignore_base_checksums:
+      svnadmin_dumpfile = [l for l in svnadmin_dumpfile
+                                    if not l.startswith('Text-delta-base-md5')]
+      svnrdump_dumpfile = [l for l in svnrdump_dumpfile
+                                    if not l.startswith('Text-delta-base-md5')]
+
+    svnadmin_dumpfile = svntest.verify.UnorderedOutput(svnadmin_dumpfile)
+
     svntest.verify.compare_and_display_lines(
       "Dump files", "DUMP", svnadmin_dumpfile, svnrdump_dumpfile,
       None, mismatched_headers_re)
@@ -354,7 +362,7 @@ def copy_bad_line_endings2_dump(sbox):
   "dump: non-LF line endings in svn:* props"
   run_dump_test(sbox, "copy-bad-line-endings2.dump",
                 expected_dumpfile_name="copy-bad-line-endings2.expected.dump",
-                bypass_prop_validation=True)
+                bypass_prop_validation=True, ignore_base_checksums=True)
 
 def commit_a_copy_of_root_dump(sbox):
   "dump: commit a copy of root"