> stylesen
> Date: Fri Jan 25 09:58:32 2008 UTC (2 years, 1 month ago)
> Changed paths: 1
> Log Message:
>
> Testcase to prove issue #3020
>
> Reflect dropped/renumbered revisions in svn:mergeinfo data during svnadmin load
>
> * subversion/tests/cmdline/merge_tests.py
> (reflect_dropped_renumbered_revs): New function.
> (test_list): Add 'reflect_dropped_renumbered_revs' to test_list
>
> Index: subversion/tests/cmdline/svnadmin_tests.py
> ===================================================================
> --- subversion/tests/cmdline/svnadmin_tests.py (revision 869104)
> +++ subversion/tests/cmdline/svnadmin_tests.py (revision 869105)
> @@ -529,8 +529,54 @@
> if new_uuid != orig_uuid:
> print "Error: new UUID doesn't match the original one"
> raise svntest.Failure
> -
>
> +#----------------------------------------------------------------------
> +
> +def reflect_dropped_renumbered_revs(sbox):
> + "reflect dropped renumbered revs in svn:mergeinfo"
> +
> + ## See http://subversion.tigris.org/issues/show_bug.cgi?id=3020. ##
> +
> + test_create(sbox)
> +
> + dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
> + 'svndumpfilter_tests_data',
> + 'with_merges.dump')
> + dumpfile = svntest.main.file_read(dumpfile_location)
> +
> + # Create 'toplevel' dir in sbox.repo_url
> + svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 1.\n'],
> + [], "mkdir", sbox.repo_url + "/toplevel",
> + "-m", "Create toplevel dir")
> +
> + # Load the dump stream in sbox.repo_url
> + load_and_verify_dumpstream(sbox,[],[], None, dumpfile)
> +
> + # Load the dump stream in toplevel dir
> + load_and_verify_dumpstream(sbox,[],[], None, dumpfile, '--parent-dir',
> + '/toplevel')
> +
> + # Verify the svn:mergeinfo properties
> + svntest.actions.run_and_verify_svn(None, ["/trunk:1-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"],
> + [], '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"],
> + [], 'propget', 'svn:mergeinfo',
> + sbox.repo_url + '/toplevel/branch1')
> + svntest.actions.run_and_verify_svn(None, ["/trunk:1-3\n"],
> + [], 'propget', 'svn:mergeinfo',
> + sbox.repo_url + '/branch1')
Hi Senthil,
Why do you expect the starting ranges of branch1 and branch2 to never
change when loaded into the repos?
You start with a repository with 1 revision (and a single path '/toplevel').
You load a dumpfile with 9 revisions to the root of the repository.
The incoming dump file has the following mergeinfo:
/branch1 - /trunk:1-2
/branch2 - /trunk:1-3
/trunk - /branch:4-8
You expect the mergeinfo in the loaded repos to be:
/branch1 - /trunk:1-3
/branch2 - /trunk:1-4
/trunk - /branch:5-9
Rather than:
/branch1 - /trunk:2-3 <-- +1 to each rev
^
/branch2 - /trunk:2-4 <-- +1 to each rev
^
/trunk - /branch:5-9
The repos now has 10 revisions, then you load the same dumpfile into
the /toplevel directory, and expect this:
/toplevel/branch1 - /toplevel/trunk:1-12
/toplevel/branch2 - /toplevel/trunk:1-13
/toplevel/trunk - /toplevel/branch:14-18
Rather than:
/toplevel/branch1 - /toplevel/trunk:11-12 <-- +10 to each rev
^^
/toplevel/branch2 - /toplevel/trunk:11-13 <-- +10 to each rev
^^
/toplevel/trunk - /toplevel/branch:14-18
I'm going to change these expectations and set the test to XFail until
I fix it. This looks like what I refer to as the "second problem" in
this thread http://svn.haxx.se/dev/archive-2010-03/0160.shtml
I just want to be certain I am not missing something here. I suspect
this is simply a case of "writing the test after the fix" :-)
Paul
> +
> +
> ########################################################################
> # Run the tests
>
> @@ -551,6 +597,7 @@
> SkipUnless(recover_fsfs, svntest.main.is_fs_type_fsfs),
> load_with_parent_dir,
> set_uuid,
> + reflect_dropped_renumbered_revs,
> ]
>
> if __name__ == '__main__':
Received on 2010-03-10 17:44:48 CET