subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r927467 - in /subversion/branches/1.6.x-issue3020: ./ subversion/tests/cmdline/ subversion/tests/cmdline/svnadmin_tests_data/
Date Thu, 25 Mar 2010 16:08:41 GMT
Author: pburba
Date: Thu Mar 25 16:08:41 2010
New Revision: 927467

URL: http://svn.apache.org/viewvc?rev=927467&view=rev
Log:
Merge r921453 and r927184 from subversion/trunk to
subversion/branches/1.6.x-issue3020.

Added:
    subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests_data/mergeinfo_included_partial.dump
      - copied unchanged from r927184, subversion/trunk/subversion/tests/cmdline/svnadmin_tests_data/mergeinfo_included_partial.dump
    subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests_data/skeleton_repos.dump
      - copied unchanged from r927184, subversion/trunk/subversion/tests/cmdline/svnadmin_tests_data/skeleton_repos.dump
Modified:
    subversion/branches/1.6.x-issue3020/   (props changed)
    subversion/branches/1.6.x-issue3020/CHANGES   (props changed)
    subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests.py

Propchange: subversion/branches/1.6.x-issue3020/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 25 16:08:41 2010
@@ -64,4 +64,4 @@
 /subversion/branches/tc_url_rev:870696-870828
 /subversion/branches/tree-conflicts:864636-869499
 /subversion/branches/tree-conflicts-notify:870271-870353
-/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,876862,877203,877595,877597,877665,878216,878269,878321,878341,878343,878399,878423,878426,879093,879688,880274-880275,880370,880450,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,891672,892050,892085,895514,895653,896522,896915,898963,899826,899828,900797,901752,904301,904394,904594,905303,905326,906256,906305,917640,918211,922516
+/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,876862,877203,877595,877597,877665,878216,878269,878321,878341,878343,878399,878423,878426,879093,879688,880274-880275,880370,880450,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,891672,892050,892085,895514,895653,896522,896915,898963,899826,899828,900797,901752,904301,904394,904594,905303,905326,906256,906305,917640,918211,921453,922516,927184

Propchange: subversion/branches/1.6.x-issue3020/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 25 16:08:41 2010
@@ -63,4 +63,4 @@
 /subversion/branches/tc_url_rev/CHANGES:870696-870828
 /subversion/branches/tree-conflicts/CHANGES:864636-869499
 /subversion/branches/tree-conflicts-notify/CHANGES:870271-870353
-/subversion/trunk/CHANGES:875962-901365,901752,904301,904394,904594,905303,905326,917640,918211,922516
+/subversion/trunk/CHANGES:875962-901365,901752,904301,904394,904594,905303,905326,917640,918211,921453,922516,927184

Modified: subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests.py?rev=927467&r1=927466&r2=927467&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.6.x-issue3020/subversion/tests/cmdline/svnadmin_tests.py Thu Mar
25 16:08:41 2010
@@ -25,6 +25,7 @@ import sys
 import svntest
 from svntest.verify import SVNExpectedStdout, SVNExpectedStderr
 from svntest.verify import SVNUnexpectedStderr
+from svntest.main import SVN_PROP_MERGEINFO
 
 # (abbreviation)
 Skip = svntest.testcase.Skip
@@ -804,22 +805,25 @@ def reflect_dropped_renumbered_revs(sbox
                              '/toplevel')
 
   # Verify the svn:mergeinfo properties
-  svntest.actions.run_and_verify_svn(None, ["/trunk:1-4\n"],
+  # Currently this test is set as XFail because the original fix for
+  # issue #3020 didn't have the correct expecations, see
+  # http://svn.haxx.se/dev/archive-2010-03/0244.shtml.
+  svntest.actions.run_and_verify_svn(None, ["/trunk:2-4\n"],
                                      [], 'propget', 'svn:mergeinfo',
                                      sbox.repo_url + '/branch2')
   svntest.actions.run_and_verify_svn(None, ["/branch1:5-9\n"],
                                      [], 'propget', 'svn:mergeinfo',
                                      sbox.repo_url + '/trunk')
-  svntest.actions.run_and_verify_svn(None, ["/toplevel/trunk:1-13\n"],
+  svntest.actions.run_and_verify_svn(None, ["/toplevel/trunk:11-13\n"],
                                      [], 'propget', 'svn:mergeinfo',
                                      sbox.repo_url + '/toplevel/branch2')
   svntest.actions.run_and_verify_svn(None, ["/toplevel/branch1:14-18\n"],
                                      [], 'propget', 'svn:mergeinfo',
                                      sbox.repo_url + '/toplevel/trunk')
-  svntest.actions.run_and_verify_svn(None, ["/toplevel/trunk:1-12\n"],
+  svntest.actions.run_and_verify_svn(None, ["/toplevel/trunk:11-12\n"],
                                      [], 'propget', 'svn:mergeinfo',
                                      sbox.repo_url + '/toplevel/branch1')
-  svntest.actions.run_and_verify_svn(None, ["/trunk:1-3\n"],
+  svntest.actions.run_and_verify_svn(None, ["/trunk:2-3\n"],
                                      [], 'propget', 'svn:mergeinfo',
                                      sbox.repo_url + '/branch1')
 
@@ -950,6 +954,169 @@ def verify_with_invalid_revprops(sbox):
     ".*Malformed file"):
     raise svntest.Failure
 
+#----------------------------------------------------------------------
+# More testing for issue #3020 'Reflect dropped/renumbered revisions in
+# svn:mergeinfo data during svnadmin load'
+#
+# Specifically, test that loading a partial dump file filters out
+# mergeinfo that refers to revisions that are older than the oldest
+# loaded revisions -- See
+# http://subversion.tigris.org/issues/show_bug.cgi?id=3020#desc10.
+def drop_mergeinfo_outside_of_dump_stream(sbox):
+  "filter mergeinfo revs outside of dump stream"
+
+  test_create(sbox)
+
+  # Load a partial dump into an existing repository.
+  #
+  # Picture == 1k words:
+  #
+  # The existing repos loaded from skeleton_repos.dump looks like this:
+  #
+  # Projects/       (Added r1)
+  #   README        (Added r2)
+  #   Project-X     (Added r3)
+  #   Project-Y     (Added r4)
+  #   Project-Z     (Added r5)
+  #   docs/         (Added r6)
+  #     README      (Added r6)
+  #
+  # The dump file 'mergeinfo_included_partial.dump' is a dump of r6:HEAD of
+  # the following repos:
+  #                       __________________________________________
+  #                      |                                         |
+  #                      |             ____________________________|_____
+  #                      |            |                            |     |
+  # trunk---r2---r3-----r5---r6-------r8---r9--------------->      |     |
+  #   r1             |        |     |       |                      |     |
+  # intial           |        |     |       |______                |     |
+  # import         copy       |   copy             |            merge   merge
+  #                  |        |     |            merge           (r5)   (r8)
+  #                  |        |     |            (r9)              |     |
+  #                  |        |     |              |               |     |
+  #                  |        |     V              V               |     |
+  #                  |        | branches/B2-------r11---r12---->   |     |
+  #                  |        |     r7              |____|         |     |
+  #                  |        |                        |           |     |
+  #                  |      merge                      |___        |     |
+  #                  |      (r6)                           |       |     |
+  #                  |        |_________________           |       |     |
+  #                  |                          |        merge     |     |
+  #                  |                          |      (r11-12)    |     |
+  #                  |                          |          |       |     |
+  #                  V                          V          V       |     |
+  #              branches/B1-------------------r10--------r13-->   |     |
+  #                  r4                                            |     |
+  #                   |                                            V     V
+  #                  branches/B1/B/E------------------------------r14---r15->
+  #                  
+  #
+  # The mergeinfo on the complete repos in the preceeding repos looks like:
+  #
+  #   Properties on 'branches/B1':
+  #     svn:mergeinfo
+  #       /branches/B2:11-12
+  #       /trunk:6,9
+  #   Properties on 'branches/B1/B/E':
+  #     svn:mergeinfo
+  #       /branches/B2/B/E:11-12
+  #       /trunk/B/E:5-6,8-9
+  #   Properties on 'branches/B2':
+  #     svn:mergeinfo
+  #       /trunk:9
+  #
+  # If we were to load the dump of r6:HEAD into an empty repository, we'd
+  # expect any references to revisions <r6 to be removed entirely (since
+  # that history no longer exists) and the the remaining mergeinfo should
+  # have its revisions offset by -5.  The resulting mergeinfo should look
+  # like this:
+  #
+  #   Properties on 'branches/B1':
+  #     svn:mergeinfo
+  #       /branches/B2:6-7
+  #       /trunk:1,4
+  #   Properties on 'branches/B1/B/E':
+  #     svn:mergeinfo
+  #       /branches/B2/B/E:6-7
+  #       /trunk/B/E:1,3-4
+  #   Properties on 'branches/B2':
+  #     svn:mergeinfo
+  #       /trunk:4
+  #
+  # But here we will load it into the existing skeleton repository in the
+  # projects/Project-X directory.  Since we are loading the dump into a
+  # subtree, all the merge sources should be prefixed with the path to
+  # that subtree, i.e. 'projects/Project-X', compared to the mergeinfo above.
+  # In addition, since the skeleton repos already has 6 revisions, we expect
+  # all the remaining revisions to be offset +6 from the above.  That should
+  # result in this mergeinfo:
+  #
+  #   Properties on 'projects/Project-X/branches/B1':
+  #     svn:mergeinfo
+  #       /projects/Project-X/branches/B2:12-13
+  #       /projects/Project-X/trunk:7,10
+  #   Properties on 'projects/Project-X/branches/B1/B/E':
+  #     svn:mergeinfo
+  #       /projects/Project-X/branches/B2/B/E:12-13
+  #       /projects/Project-X/trunk/B/E:7,9-10
+  #   Properties on 'projects/Project-X/branches/B2':
+  #     svn:mergeinfo
+  #       /projects/Project-X/trunk:10
+  #
+  # ...Unfortunately this is currently the resulting mergeinfo
+  # (and why this test is set to XFail):
+  #
+  #   Properties on 'projects\Project-X\branches\B1':
+  #     svn:mergeinfo
+  #       /projects/Project-X/branches/B2:12-13
+  #       /projects/Project-X/trunk:6-7,10
+  #                                 ^
+  #   Properties on 'projects\Project-X\branches\B1\B\E':
+  #     svn:mergeinfo
+  #       /projects/Project-X/branches/B2/B/E:12-13
+  #       /projects/Project-X/trunk/B/E:5-7,9-10
+  #                                     ^^
+  #   Properties on 'projects\Project-X\branches\B2':
+  #     svn:mergeinfo
+  #       /projects/Project-X/trunk:10
+
+  # Load the skeleton dump:
+  dumpfile1 = svntest.main.file_read(
+    os.path.join(os.path.dirname(sys.argv[0]),
+                 'svnadmin_tests_data',
+                 'skeleton_repos.dump'))
+  load_and_verify_dumpstream(sbox, [], [], None, dumpfile1, '--ignore-uuid')
+
+  # Load the partial repository with mergeinfo dump:
+  dumpfile2 = svntest.main.file_read(
+    os.path.join(os.path.dirname(sys.argv[0]),
+                 'svnadmin_tests_data',
+                 'mergeinfo_included_partial.dump'))
+  load_and_verify_dumpstream(sbox, [], [], None, dumpfile2, '--ignore-uuid',
+                             '--parent-dir', '/Projects/Project-X')
+
+  # Check the resulting mergeinfo.
+  #
+  # TODO: Use pg -vR, which would make the expected output easier on the eyes.
+  #       Not using it because pg -vR on windows is outputting <CR><CR><LF>
+  #       after the first line of multiline mergeinfo, which breaks the
+  #       comparison, e.g.:
+  #
+  #   Properties on 'Projects/Project-X/branches/B1/B/E':<CR><LF>
+  #     svn:mergeinfo<CR><LF>
+  #       /Projects/Project-X/branches/B2:12-13<CR><CR><LF>
+  #                                            ^^^
+  #       /Projects/Project-X/trunk:7,10<CR><LF>
+  url = sbox.repo_url + '/Projects/Project-X/branches/'
+  expected_output = svntest.verify.UnorderedOutput([
+    url + "B1 - /Projects/Project-X/branches/B2:12-13\n",
+    "/Projects/Project-X/trunk:7,10\n",
+    url + "B2 - /Projects/Project-X/trunk:10\n",
+    url + "B1/B/E - /Projects/Project-X/branches/B2/B/E:12-13\n",
+    "/Projects/Project-X/trunk/B/E:7,9-10\n"])
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'propget', 'svn:mergeinfo', '-R',
+                                     sbox.repo_url)
 
 ########################################################################
 # Run the tests
@@ -972,11 +1139,12 @@ test_list = [ None,
               SkipUnless(recover_fsfs, svntest.main.is_fs_type_fsfs),
               load_with_parent_dir,
               set_uuid,
-              reflect_dropped_renumbered_revs,
+              XFail(reflect_dropped_renumbered_revs),
               SkipUnless(fsfs_recover_handle_missing_revs_or_revprops_file,
                          svntest.main.is_fs_type_fsfs),
               create_in_repo_subdir,
               verify_with_invalid_revprops,
+              XFail(drop_mergeinfo_outside_of_dump_stream),
              ]
 
 if __name__ == '__main__':



Mime
View raw message