You may want to consider backporting this to 1.6 as well (I noticed
this issue when running 1.6.2).
--dave
On Fri, May 15, 2009 at 9:47 AM, Lieven Govaerts <lgo_at_mobsol.be> wrote:
> Author: lgo
> Date: Fri May 15 09:47:43 2009
> New Revision: 37740
>
> Log:
> Move test merge_fails_if_subtree_is_deleted_on_src from
> merge_tests.py to merge_authz_tests.py as this test requires
> an authz file to be written. We can't have that in
> merge_tests.py as that'd mean those tests can't be run in
> parallel anymore.
>
> Suggested by: glasser
>
> * subversion/tests/cmdline/merge_tests.py
> Â (global): Move imports ...
> Â (merge_fails_if_subtree_is_deleted_on_src):
> Â (test_list): and this test from here...
>
> * subversion/tests/cmdline/merge_authz_tests.py
> Â (global):
> Â (merge_fails_if_subtree_is_deleted_on_src):
> Â (test_list): ... to here.
>
> Modified:
> Â trunk/subversion/tests/cmdline/merge_authz_tests.py
> Â trunk/subversion/tests/cmdline/merge_tests.py
>
> Modified: trunk/subversion/tests/cmdline/merge_authz_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/merge_authz_tests.py?pathrev=37740&r1=37739&r2=37740
> ==============================================================================
> --- trunk/subversion/tests/cmdline/merge_authz_tests.py Fri May 15 09:42:12 2009 Â Â Â Â (r37739)
> +++ trunk/subversion/tests/cmdline/merge_authz_tests.py Fri May 15 09:47:43 2009 Â Â Â Â (r37740)
> @@ -31,10 +31,12 @@ Skip = svntest.testcase.Skip
> Â SkipUnless = svntest.testcase.SkipUnless
>
> Â from merge_tests import set_up_branch
> -
> +from merge_tests import expected_merge_output
> Â from svntest.main import SVN_PROP_MERGEINFO
> Â from svntest.main import write_restrictive_svnserve_conf
> Â from svntest.main import write_authz_file
> +from svntest.main import is_ra_type_dav
> +from svntest.main import is_ra_type_svn
> Â from svntest.main import server_has_mergeinfo
> Â from svntest.actions import fill_file_with_lines
> Â from svntest.actions import make_conflict_marker_text
> @@ -356,7 +358,6 @@ def mergeinfo_and_skipped_paths(sbox):
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None, None, None, None,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None, 1, 0, '-c5', '-c8')
>
> -
> Â # Test issue #2829 'Improve handling for skipped paths encountered
> Â # during a merge'
>
> @@ -408,6 +409,125 @@ def mergeinfo_and_skipped_paths(sbox):
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None, None, None, None,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None, 1, 0)
>
> +def merge_fails_if_subtree_is_deleted_on_src(sbox):
> + Â "merge fails if subtree is deleted on src"
> +
> + Â ## See http://subversion.tigris.org/issues/show_bug.cgi?id=2876. ##
> +
> + Â # Create a WC
> + Â sbox.build()
> + Â wc_dir = sbox.wc_dir
> +
> + Â if is_ra_type_svn() or is_ra_type_dav():
> + Â Â write_authz_file(sbox, {"/" : "* = rw",
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â "/unrelated" : ("* =\n" +
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â svntest.main.wc_author2 + " = rw")})
> +
> + Â # Some paths we'll care about
> + Â Acopy_path = os.path.join(wc_dir, 'A_copy')
> + Â gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
> + Â Acopy_gamma_path = os.path.join(wc_dir, 'A_copy', 'D', 'gamma')
> + Â Acopy_D_path = os.path.join(wc_dir, 'A_copy', 'D')
> + Â A_url = sbox.repo_url + '/A'
> + Â Acopy_url = sbox.repo_url + '/A_copy'
> +
> + Â # Contents to be added to 'gamma'
> + Â new_content = "line1\nline2\nline3\nline4\nline5\n"
> +
> + Â svntest.main.file_write(gamma_path, new_content)
> +
> + Â # Create expected output tree for commit
> + Â expected_output = wc.State(wc_dir, {
> + Â Â 'A/D/gamma' : Item(verb='Sending'),
> + Â Â })
> +
> + Â # Create expected status tree for commit
> + Â expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
> + Â expected_status.tweak('A/D/gamma', wc_rev=2)
> +
> + Â # Commit the new content
> + Â svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_status, None, wc_dir)
> +
> + Â svntest.actions.run_and_verify_svn(None, None, [], 'cp', A_url, Acopy_url,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â '-m', 'create a new copy of A')
> +
> + Â # Update working copy
> + Â svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
> +
> + Â svntest.main.file_substitute(gamma_path, "line1", "this is line1")
> + Â # Create expected output tree for commit
> + Â expected_output = wc.State(wc_dir, {
> + Â Â 'A/D/gamma' : Item(verb='Sending'),
> + Â Â })
> +
> + Â # Create expected status tree for commit
> + Â expected_status.tweak(wc_rev=3)
> + Â expected_status.tweak('A/D/gamma', wc_rev=4)
> + Â expected_status.add({
> + Â Â 'A_copy' Â Â Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/B' Â Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/B/lambda' : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/B/E' Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/B/E/alpha': Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/B/E/beta' : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/B/F' Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/mu' Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/C' Â Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D' Â Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/gamma' Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/G' Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/G/pi' Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/G/rho' Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/G/tau' Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/H' Â Â Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/H/chi' Â : Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/H/omega': Item(status=' Â ', wc_rev=3),
> + Â Â 'A_copy/D/H/psi' Â : Item(status=' Â ', wc_rev=3),
> + Â Â })
> +
> + Â svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_status, None, wc_dir)
> +
> + Â # Delete A/D/gamma from working copy
> + Â svntest.actions.run_and_verify_svn(None, None, [], 'delete', gamma_path)
> + Â # Create expected output tree for commit
> + Â expected_output = wc.State(wc_dir, {
> + Â Â 'A/D/gamma' : Item(verb='Deleting'),
> + Â Â })
> +
> + Â expected_status.remove('A/D/gamma')
> +
> + Â svntest.actions.run_and_verify_commit(wc_dir,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_output,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_status,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â wc_dir, wc_dir)
> + Â svntest.actions.run_and_verify_svn(None, expected_merge_output([[3,4]],
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 'U Â Â ' + Acopy_gamma_path + '\n'),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [], 'merge', '-r1:4',
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â A_url + '/D/gamma' + '@4',
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Acopy_gamma_path)
> +
> + Â # r6: create an empty (unreadable) commit.
> + Â # Empty or unreadable revisions used to crash a svn 1.6+ client when
> + Â # used with a 1.5 server:
> + Â # http://svn.haxx.se/dev/archive-2009-04/0476.shtml
> + Â svntest.main.run_svn(None, 'mkdir', sbox.repo_url + '/unrelated',
> + Â Â Â Â Â Â Â Â Â Â Â '--username', svntest.main.wc_author2,
> + Â Â Â Â Â Â Â Â Â Â Â '-m', 'creating a rev with no paths.')
> +
> + Â # This merge causes a tree conflict. Since the result of the previous
> + Â # merge of A/D/gamma into A_copy/D has not yet been committed, it is
> + Â # considered a local modification of A_Copy/D/gamma by the following
> + Â # merge. A delete merged ontop of a modified file is a tree conflict.
> + Â # See notes/tree-conflicts/detection.txt
> + Â svntest.actions.run_and_verify_svn(None, expected_merge_output([[6], [3,6]],
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ['D Â Â ' + Acopy_gamma_path + '\n',
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 'C Â Â ' + Acopy_D_path + '\n']),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [], 'merge', '-r1:6', '--force',
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â A_url, Acopy_path)
> +
> Â ########################################################################
> Â # Run the tests
>
> @@ -417,6 +537,8 @@ test_list = [ None,
> Â Â Â Â Â Â Â SkipUnless(Skip(mergeinfo_and_skipped_paths,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svntest.main.is_ra_type_file),
> Â Â Â Â Â Â Â Â Â Â Â Â Â svntest.main.server_has_mergeinfo),
> + Â Â Â Â Â Â Â SkipUnless(merge_fails_if_subtree_is_deleted_on_src,
> + Â Â Â Â Â Â Â Â Â Â Â Â server_has_mergeinfo),
> Â Â Â Â Â Â Â ]
>
> Â if __name__ == '__main__':
>
> Modified: trunk/subversion/tests/cmdline/merge_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/merge_tests.py?pathrev=37740&r1=37739&r2=37740
> ==============================================================================
> --- trunk/subversion/tests/cmdline/merge_tests.py    Fri May 15 09:42:12 2009     (r37739)
> +++ trunk/subversion/tests/cmdline/merge_tests.py    Fri May 15 09:47:43 2009     (r37740)
> @@ -32,9 +32,6 @@ SkipUnless = svntest.testcase.SkipUnless
>
> Â from svntest.main import SVN_PROP_MERGEINFO
> Â from svntest.main import server_has_mergeinfo
> -from svntest.main import write_authz_file
> -from svntest.main import is_ra_type_dav
> -from svntest.main import is_ra_type_svn
> Â from svntest.actions import fill_file_with_lines
> Â from svntest.actions import make_conflict_marker_text
> Â from svntest.actions import inject_conflict_into_expected_state
> @@ -7002,124 +6999,6 @@ def merge_with_depth_files(sbox):
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None, None, None, None, None, 1, 1,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â '--depth', 'files')
>
> -def merge_fails_if_subtree_is_deleted_on_src(sbox):
> - Â "merge fails if subtree is deleted on src"
> -
> - Â ## See http://subversion.tigris.org/issues/show_bug.cgi?id=2876. ##
> -
> - Â # Create a WC
> - Â sbox.build()
> - Â wc_dir = sbox.wc_dir
> -
> - Â if is_ra_type_svn() or is_ra_type_dav():
> - Â Â write_authz_file(sbox, {"/" : "* = rw",
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â "/unrelated" : ("* =\n" +
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â svntest.main.wc_author2 + " = rw")})
> -
> - Â # Some paths we'll care about
> - Â Acopy_path = os.path.join(wc_dir, 'A_copy')
> - Â gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
> - Â Acopy_gamma_path = os.path.join(wc_dir, 'A_copy', 'D', 'gamma')
> - Â Acopy_D_path = os.path.join(wc_dir, 'A_copy', 'D')
> - Â A_url = sbox.repo_url + '/A'
> - Â Acopy_url = sbox.repo_url + '/A_copy'
> -
> - Â # Contents to be added to 'gamma'
> - Â new_content = "line1\nline2\nline3\nline4\nline5\n"
> -
> - Â svntest.main.file_write(gamma_path, new_content)
> -
> - Â # Create expected output tree for commit
> - Â expected_output = wc.State(wc_dir, {
> - Â Â 'A/D/gamma' : Item(verb='Sending'),
> - Â Â })
> -
> - Â # Create expected status tree for commit
> - Â expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
> - Â expected_status.tweak('A/D/gamma', wc_rev=2)
> -
> - Â # Commit the new content
> - Â svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_status, None, wc_dir)
> -
> - Â svntest.actions.run_and_verify_svn(None, None, [], 'cp', A_url, Acopy_url,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â '-m', 'create a new copy of A')
> -
> - Â # Update working copy
> - Â svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
> -
> - Â svntest.main.file_substitute(gamma_path, "line1", "this is line1")
> - Â # Create expected output tree for commit
> - Â expected_output = wc.State(wc_dir, {
> - Â Â 'A/D/gamma' : Item(verb='Sending'),
> - Â Â })
> -
> - Â # Create expected status tree for commit
> - Â expected_status.tweak(wc_rev=3)
> - Â expected_status.tweak('A/D/gamma', wc_rev=4)
> - Â expected_status.add({
> - Â Â 'A_copy' Â Â Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/B' Â Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/B/lambda' : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/B/E' Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/B/E/alpha': Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/B/E/beta' : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/B/F' Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/mu' Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/C' Â Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D' Â Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/gamma' Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/G' Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/G/pi' Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/G/rho' Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/G/tau' Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/H' Â Â Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/H/chi' Â : Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/H/omega': Item(status=' Â ', wc_rev=3),
> - Â Â 'A_copy/D/H/psi' Â : Item(status=' Â ', wc_rev=3),
> - Â Â })
> -
> - Â svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_status, None, wc_dir)
> -
> - Â # Delete A/D/gamma from working copy
> - Â svntest.actions.run_and_verify_svn(None, None, [], 'delete', gamma_path)
> - Â # Create expected output tree for commit
> - Â expected_output = wc.State(wc_dir, {
> - Â Â 'A/D/gamma' : Item(verb='Deleting'),
> - Â Â })
> -
> - Â expected_status.remove('A/D/gamma')
> -
> - Â svntest.actions.run_and_verify_commit(wc_dir,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_output,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â expected_status,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â None,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â wc_dir, wc_dir)
> - Â svntest.actions.run_and_verify_svn(None, expected_merge_output([[3,4]],
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 'U Â Â ' + Acopy_gamma_path + '\n'),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [], 'merge', '-r1:4',
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â A_url + '/D/gamma' + '@4',
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Acopy_gamma_path)
> -
> - Â # r6: create an empty (unreadable) commit.
> - Â # Empty or unreadable revisions used to crash a svn 1.6+ client when
> - Â # used with a 1.5 server:
> - Â # http://svn.haxx.se/dev/archive-2009-04/0476.shtml
> - Â svntest.main.run_svn(None, 'mkdir', sbox.repo_url + '/unrelated',
> - Â Â Â Â Â Â Â Â Â Â Â '--username', svntest.main.wc_author2,
> - Â Â Â Â Â Â Â Â Â Â Â '-m', 'creating a rev with no paths.')
> -
> - Â # This merge causes a tree conflict. Since the result of the previous
> - Â # merge of A/D/gamma into A_copy/D has not yet been committed, it is
> - Â # considered a local modification of A_Copy/D/gamma by the following
> - Â # merge. A delete merged ontop of a modified file is a tree conflict.
> - Â # See notes/tree-conflicts/detection.txt
> - Â svntest.actions.run_and_verify_svn(None, expected_merge_output([[6], [3,6]],
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ['D Â Â ' + Acopy_gamma_path + '\n',
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 'C Â Â ' + Acopy_D_path + '\n']),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [], 'merge', '-r1:6', '--force',
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â A_url, Acopy_path)
>
> Â # Test for issue #2976 Subtrees can lose non-inheritable ranges.
> Â #
> @@ -15706,8 +15585,6 @@ test_list = [ None,
> Â Â Â Â Â Â Â Â Â Â Â Â Â server_has_mergeinfo),
> Â Â Â Â Â Â Â SkipUnless(merge_with_depth_files,
> Â Â Â Â Â Â Â Â Â Â Â Â Â server_has_mergeinfo),
> - Â Â Â Â Â Â Â SkipUnless(merge_fails_if_subtree_is_deleted_on_src,
> - Â Â Â Â Â Â Â Â Â Â Â Â server_has_mergeinfo),
> Â Â Â Â Â Â Â SkipUnless(merge_away_subtrees_noninheritable_ranges,
> Â Â Â Â Â Â Â Â Â Â Â Â Â server_has_mergeinfo),
> Â Â Â Â Â Â Â SkipUnless(merge_to_sparse_directories,
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2272694
>
--
glasser_at_davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2303941
Received on 2009-05-19 00:10:13 CEST