diff options
Diffstat (limited to 'subversion/tests/cmdline/merge_reintegrate_tests.py')
-rwxr-xr-x | subversion/tests/cmdline/merge_reintegrate_tests.py | 389 |
1 files changed, 214 insertions, 175 deletions
diff --git a/subversion/tests/cmdline/merge_reintegrate_tests.py b/subversion/tests/cmdline/merge_reintegrate_tests.py index 8b3e91f..553a2dc 100755 --- a/subversion/tests/cmdline/merge_reintegrate_tests.py +++ b/subversion/tests/cmdline/merge_reintegrate_tests.py @@ -44,8 +44,8 @@ exp_noop_up_out = svntest.actions.expected_noop_update_output from svntest.main import SVN_PROP_MERGEINFO from svntest.main import server_has_mergeinfo -from merge_tests import set_up_branch -from merge_tests import expected_merge_output +from svntest.mergetrees import set_up_branch +from svntest.mergetrees import expected_merge_output #---------------------------------------------------------------------- def run_reintegrate(src_url, tgt_path): @@ -53,7 +53,7 @@ def run_reintegrate(src_url, tgt_path): there is nothing on stdout, anything on stderr, or a non-zero exit code. """ - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', '--reintegrate', src_url, tgt_path) @@ -71,7 +71,7 @@ def run_reintegrate_expect_error(src_url, tgt_path, # ourselves, but as the 'actual_stdout' argument, that way each line of # error must match the regex. exit_code, out, err = svntest.actions.run_and_verify_svn( - None, expected_stdout, svntest.verify.AnyOutput, + expected_stdout, svntest.verify.AnyOutput, 'merge', '--reintegrate', src_url, tgt_path) assert exit_code @@ -86,7 +86,7 @@ def run_and_verify_reintegrate(tgt_dir, src_url, mergeinfo_output_tree, elision_output_tree, disk_tree, status_tree, skip_tree, - error_re_string = None, + expected_stderr = [], check_props = True, dry_run = True): """Run 'svn merge --reintegrate SRC_URL TGT_DIR'. Raise an error if @@ -98,8 +98,7 @@ def run_and_verify_reintegrate(tgt_dir, src_url, tgt_dir, None, None, src_url, None, output_tree, mergeinfo_output_tree, elision_output_tree, disk_tree, status_tree, skip_tree, - error_re_string, - None, None, None, None, check_props, dry_run, + expected_stderr, check_props, dry_run, '--reintegrate', tgt_dir) @@ -122,7 +121,7 @@ def basic_reintegrate(sbox): expected_output = wc.State(wc_dir, {'A_COPY/mu' : Item(verb='Sending')}) expected_status.tweak('A_COPY/mu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A_COPY/mu', contents='Changed on the branch.') # Update the wcs. @@ -130,7 +129,7 @@ def basic_reintegrate(sbox): expected_status.tweak(wc_rev='7') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # Merge from trunk to branch (ie, r3-6), using normal cherry-harvest. A_COPY_path = sbox.ospath('A_COPY') @@ -196,8 +195,7 @@ def basic_reintegrate(sbox): k_expected_disk, k_expected_status, expected_skip, - None, None, None, None, - None, True) + [], True) expected_disk.tweak('A_COPY', props={SVN_PROP_MERGEINFO: '/A:2-7'}) expected_disk.tweak('A_COPY/B/E/beta', contents="New content") expected_disk.tweak('A_COPY/D/G/rho', contents="New content") @@ -215,14 +213,14 @@ def basic_reintegrate(sbox): expected_status.tweak('A_COPY', 'A_COPY/D/H/psi', 'A_COPY/D/G/rho', 'A_COPY/B/E/beta', 'A_COPY/D/H/omega', wc_rev=8) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Update the wcs again. expected_output = wc.State(wc_dir, {}) expected_status.tweak(wc_rev='8') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # *finally*, actually run merge --reintegrate in trunk with the @@ -268,7 +266,7 @@ def basic_reintegrate(sbox): k_expected_disk, k_expected_status, expected_skip, - None, True, True) + [], True, True) # Test issue #3640: # @@ -276,14 +274,14 @@ def basic_reintegrate(sbox): # targeting A_MOVED this time. This should work with almost the same # results. The only differences being the inclusion of r9 in the # mergeinfo and the A-->A_MOVED path difference. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 9.\n'], + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 9.\n'], [], 'move', sbox.repo_url + '/A', sbox.repo_url + '/A_MOVED', '-m', 'Copy A to A_MOVED') - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) A_MOVED_path = sbox.ospath('A_MOVED') expected_output = wc.State(A_MOVED_path, { 'mu' : Item(status='U '), @@ -325,9 +323,10 @@ def basic_reintegrate(sbox): k_expected_disk, expected_status, expected_skip, - None, True, True) + [], True, True) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def reintegrate_with_rename(sbox): "merge --reintegrate with renamed file on branch" @@ -342,7 +341,7 @@ def reintegrate_with_rename(sbox): expected_output = wc.State(wc_dir, {'A_COPY/mu' : Item(verb='Sending')}) expected_status.tweak('A_COPY/mu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A_COPY/mu', contents='Changed on the branch.') # Update the wcs. @@ -350,7 +349,7 @@ def reintegrate_with_rename(sbox): expected_status.tweak(wc_rev='7') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # Merge from trunk to branch (ie, r3-6), using normal cherry-harvest. A_COPY_path = sbox.ospath('A_COPY') @@ -416,8 +415,7 @@ def reintegrate_with_rename(sbox): k_expected_disk, k_expected_status, expected_skip, - None, None, None, None, - None, True) + [], True) expected_disk.tweak('A_COPY', props={SVN_PROP_MERGEINFO: '/A:2-7'}) expected_disk.tweak('A_COPY/B/E/beta', contents="New content") expected_disk.tweak('A_COPY/D/G/rho', contents="New content") @@ -435,7 +433,7 @@ def reintegrate_with_rename(sbox): expected_status.tweak('A_COPY', 'A_COPY/D/H/psi', 'A_COPY/D/G/rho', 'A_COPY/B/E/beta', 'A_COPY/D/H/omega', wc_rev=8) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Update the wcs again. @@ -473,11 +471,11 @@ def reintegrate_with_rename(sbox): expected_status.tweak(wc_rev='8') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # Make another change on the branch: copy tau to tauprime. Commit # in r9. - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', sbox.repo_url + '/A_COPY/D/G/tau', sbox.repo_url + '/A_COPY/D/G/tauprime', '-m', @@ -499,7 +497,7 @@ def reintegrate_with_rename(sbox): expected_status.tweak(wc_rev='9') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # *finally*, actually run merge --reintegrate in trunk with the # branch URL. This should bring in the mu change and the tauprime @@ -552,7 +550,7 @@ def reintegrate_with_rename(sbox): k_expected_disk, k_expected_status, expected_skip, - None, True, True) + [], True, True) # Finally, commit the result of the merge (r10). expected_output = wc.State(wc_dir, { @@ -565,9 +563,10 @@ def reintegrate_with_rename(sbox): }) expected_status.tweak('A', 'A/mu', wc_rev=10) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def reintegrate_branch_never_merged_to(sbox): "merge --reintegrate on a never-updated branch" @@ -582,7 +581,7 @@ def reintegrate_branch_never_merged_to(sbox): expected_output = wc.State(wc_dir, {'A_COPY/mu' : Item(verb='Sending')}) expected_status.tweak('A_COPY/mu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A_COPY/mu', contents='Changed on the branch.') # Update the wcs. @@ -590,11 +589,11 @@ def reintegrate_branch_never_merged_to(sbox): expected_status.tweak(wc_rev='7') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # Make another change on the branch: copy tau to tauprime. Commit # in r8. - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', os.path.join(wc_dir, 'A_COPY', 'D', 'G', 'tau'), os.path.join(wc_dir, 'A_COPY', 'D', 'G', @@ -604,7 +603,7 @@ def reintegrate_branch_never_merged_to(sbox): }) expected_status.add({'A_COPY/D/G/tauprime': Item(status=' ', wc_rev=8)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.add({ 'A_COPY/D/G/tauprime' : Item(contents="This is the file 'tau'.\n") }) @@ -615,7 +614,7 @@ def reintegrate_branch_never_merged_to(sbox): expected_status.tweak(wc_rev='8') svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) # *finally*, actually run merge --reintegrate in trunk with the # branch URL. This should bring in the mu change and the tauprime @@ -683,7 +682,7 @@ def reintegrate_branch_never_merged_to(sbox): k_expected_disk, k_expected_status, expected_skip, - None, True, True) + [], True, True) # Finally, commit the result of the merge (r9). expected_output = wc.State(wc_dir, { @@ -696,9 +695,10 @@ def reintegrate_branch_never_merged_to(sbox): }) expected_status.tweak('A', 'A/mu', wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def reintegrate_fail_on_modified_wc(sbox): "merge --reintegrate should fail in modified wc" sbox.build() @@ -714,14 +714,16 @@ def reintegrate_fail_on_modified_wc(sbox): sbox.simple_commit() svntest.main.file_write(mu_path, "Changed on 'trunk' (the merge target).") + expected_skip = wc.State(wc_dir, {}) sbox.simple_update() # avoid mixed-revision error run_and_verify_reintegrate( A_path, sbox.repo_url + '/A_COPY', None, None, None, - None, None, None, + None, None, expected_skip, ".*Cannot merge into a working copy that has local modifications.*", True, False) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def reintegrate_fail_on_mixed_rev_wc(sbox): "merge --reintegrate should fail in mixed-rev wc" sbox.build() @@ -736,15 +738,17 @@ def reintegrate_fail_on_mixed_rev_wc(sbox): }) expected_status.tweak('A/mu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) + expected_skip = wc.State(wc_dir, {}) # Try merging into that same wc, expecting failure. run_and_verify_reintegrate( A_path, sbox.repo_url + '/A_COPY', None, None, None, - None, None, None, + None, None, expected_skip, ".*Cannot merge into mixed-revision working copy.*", True, False) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def reintegrate_fail_on_switched_wc(sbox): "merge --reintegrate should fail in switched wc" sbox.build() @@ -801,18 +805,20 @@ def reintegrate_fail_on_switched_wc(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') sbox.simple_update() # avoid mixed-revision error + expected_skip = wc.State(wc_dir, {}) run_and_verify_reintegrate( A_path, sbox.repo_url + '/A_COPY', None, None, None, - None, None, None, + None, None, expected_skip, ".*Cannot merge into a working copy with a switched subtree.*", True, False) #---------------------------------------------------------------------- # Test for issue #3603 'allow reintegrate merges into WCs with # missing subtrees'. +@SkipUnless(server_has_mergeinfo) @Issue(3603) def reintegrate_on_shallow_wc(sbox): "merge --reintegrate in shallow wc" @@ -840,8 +846,8 @@ def reintegrate_on_shallow_wc(sbox): # depth of A/D to empty. Since the only change made on the branch # since the branch point is to A_COPY/mu, the reintegrate should # simply work and update A/mu with the branch's contents. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', '--set-depth', 'empty', A_D_path) expected_output = wc.State(A_path, { 'mu' : Item(status='U '), @@ -886,13 +892,13 @@ def reintegrate_on_shallow_wc(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, 1, 1) + [], 1, 1) # Now revert the reintegrate and make a second change on the # branch in r4, but this time change a subtree that corresponds # to the missing (shallow) portion of the source. The reintegrate # should still succeed. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) svntest.main.file_write(psi_COPY_path, "more branch work") svntest.main.run_svn(None, 'commit', '-m', 'Some more work on the A_COPY branch', wc_dir) @@ -923,7 +929,7 @@ def reintegrate_on_shallow_wc(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, 1, 1) + [], 1, 1) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -935,10 +941,10 @@ def reintegrate_fail_on_stale_source(sbox): A_path = sbox.ospath('A') mu_path = os.path.join(A_path, "mu") svntest.main.file_append(mu_path, 'some text appended to mu\n') - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'a change to mu', mu_path) # Unmix the revisions in the working copy. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # The merge --reintegrate succeeds but since there were no changes # on A_COPY after it was branched the only result is updated mergeinfo # on the reintegrate target. @@ -1003,6 +1009,7 @@ def reintegrate_fail_on_stale_source(sbox): [], True, True) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def merge_file_with_space_in_its_path(sbox): "merge a file with space in its path" @@ -1016,17 +1023,17 @@ def merge_file_with_space_in_its_path(sbox): os.mkdir(some_dir) svntest.main.file_append(file1, "Initial text in the file.\n") svntest.main.run_svn(None, "add", some_dir) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "ci", "-m", "r2", wc_dir) # Make r3. svntest.main.run_svn(None, "copy", file1, file2) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "ci", "-m", "r3", wc_dir) # Make r4. svntest.main.file_append(file2, "Next line of text in the file.\n") - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "ci", "-m", "r4", wc_dir) target_url = sbox.repo_url + '/some%20dir/file2' @@ -1096,16 +1103,15 @@ def reintegrate_with_subtree_mergeinfo(sbox): expected_output = wc.State(wc_dir, {'A_COPY_3/D/gamma' : Item(verb='Sending')}) expected_status.tweak('A_COPY_3/D/gamma', wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r10 - Merge r9 from A_COPY_3/D to A/D, creating explicit subtree # mergeinfo under A. For this and every subsequent merge we update the WC # first to allow full inheritance and elision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(9), [], 'up', wc_dir) expected_status.tweak(wc_rev=9) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[9]], ['U ' + gamma_path + '\n', ' U ' + D_path + '\n',]), @@ -1115,21 +1121,20 @@ def reintegrate_with_subtree_mergeinfo(sbox): 'A/D/gamma' : Item(verb='Sending')}) expected_status.tweak('A/D', 'A/D/gamma', wc_rev=10) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r11 - Make a text change to A_COPY_2/mu svntest.main.file_write(mu_COPY_2_path, "New content") expected_output = wc.State(wc_dir, {'A_COPY_2/mu' : Item(verb='Sending')}) expected_status.tweak('A_COPY_2/mu', wc_rev=11) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r12 - Merge r11 from A_COPY_2/mu to A_COPY/mu - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(11), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(11), [], 'up', wc_dir) expected_status.tweak(wc_rev=11) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[11]], ['U ' + mu_COPY_path + '\n', ' U ' + mu_COPY_path + '\n',]), @@ -1138,15 +1143,14 @@ def reintegrate_with_subtree_mergeinfo(sbox): {'A_COPY/mu' : Item(verb='Sending')}) expected_status.tweak('A_COPY/mu', wc_rev=12) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r13 - Do a 'synch' cherry harvest merge of all available revisions # from A to A_COPY - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(12), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(12), [], 'up', wc_dir) expected_status.tweak(wc_rev=12) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2,12]], ['U ' + beta_COPY_path + '\n', 'U ' + gamma_COPY_path + '\n', @@ -1176,17 +1180,17 @@ def reintegrate_with_subtree_mergeinfo(sbox): 'A_COPY/D/gamma', wc_rev=13) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r14 - Make a text change on A_COPY/B/E/alpha svntest.main.file_write(alpha_COPY_path, "New content") expected_output = wc.State(wc_dir, {'A_COPY/B/E/alpha' : Item(verb='Sending')}) expected_status.tweak('A_COPY/B/E/alpha', wc_rev=14) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Now, reintegrate A_COPY to A. This should succeed. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(14), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(14), [], 'up', wc_dir) expected_status.tweak(wc_rev=14) expected_output = wc.State(A_path, { @@ -1256,7 +1260,7 @@ def reintegrate_with_subtree_mergeinfo(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, 1, 1) + [], 1, 1) # Make some more changes to A_COPY so that the same revisions have *not* # been uniformly applied from A to A_COPY. In this case the reintegrate @@ -1275,12 +1279,11 @@ def reintegrate_with_subtree_mergeinfo(sbox): # A_COPY_2 3-------------[11]-- # First revert the previous reintegrate merge - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # r15 - Reverse Merge r8 from A/D to A_COPY/D. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-8]], ['U ' + omega_COPY_path + '\n', ' U ' + D_COPY_path + '\n',]), @@ -1290,7 +1293,7 @@ def reintegrate_with_subtree_mergeinfo(sbox): 'A_COPY/D/H/omega' : Item(verb='Sending')}) expected_status.tweak('A_COPY/D', 'A_COPY/D/H/omega', wc_rev=15) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Now reintegrate A_COPY back to A. Since A_COPY/D no longer has r8 merged # to it from A, the merge should fail. Further we expect an error message @@ -1325,7 +1328,7 @@ def reintegrate_with_subtree_mergeinfo(sbox): # # D) Synch merge the changes in C) from 'trunk' to 'branch' and commit in # rev N+3. The renamed subtree on 'branch' now has additional explicit - # mergeinfo decribing the synch merge from trunk@N+1 to trunk@N+2. + # mergeinfo describing the synch merge from trunk@N+1 to trunk@N+2. # # E) Reintegrate 'branch' to 'trunk'. # @@ -1345,12 +1348,12 @@ def reintegrate_with_subtree_mergeinfo(sbox): # r874258 WC-to-WC moves won't create mergeinfo on the dest if the source # doesn't have any. So do a repos-to-repos move so explicit mergeinfo # *is* created on the destination. - svntest.actions.run_and_verify_svn(None, None,[], 'move', + svntest.actions.run_and_verify_svn(None,[], 'move', sbox.repo_url + '/A/D/gamma', sbox.repo_url + '/A/D/gamma_moved', '-m', 'REPOS-to-REPOS move' ) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_status.tweak(wc_rev=16) expected_status.remove('A/D/gamma') expected_status.add({'A/D/gamma_moved' : Item(status=' ', wc_rev=16)}) @@ -1365,7 +1368,6 @@ def reintegrate_with_subtree_mergeinfo(sbox): # behavior pass. # r17 - B) Synch merge from A to A_COPY svntest.actions.run_and_verify_svn( - None, expected_merge_output([[8], [13,16], [2,16]], ['U ' + omega_COPY_path + '\n', 'A ' + gamma_moved_COPY_path + '\n', @@ -1391,18 +1393,17 @@ def reintegrate_with_subtree_mergeinfo(sbox): wc_rev=17) expected_status.add({'A_COPY/D/gamma_moved' : Item(status=' ', wc_rev=17)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r18 - C) Text mod to A/D/gamma_moved svntest.main.file_write(gamma_moved_path, "Even newer content") expected_output = wc.State(wc_dir, {'A/D/gamma_moved' : Item(verb='Sending')}) expected_status.tweak('A/D/gamma_moved', wc_rev=18) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r19 - D) Synch merge from A to A_COPY svntest.actions.run_and_verify_svn( - None, expected_merge_output([[17,18], [2,18]], ['U ' + gamma_moved_COPY_path + '\n', ' U ' + A_COPY_path + '\n', @@ -1420,7 +1421,7 @@ def reintegrate_with_subtree_mergeinfo(sbox): 'A_COPY/D/gamma_moved', wc_rev=19) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Reintegrate A_COPY to A, this should work since # A_COPY/D/gamma_moved's natural history, @@ -1430,7 +1431,7 @@ def reintegrate_with_subtree_mergeinfo(sbox): # /A_COPY/D/gamma_moved:17-19 # # shows that it is fully synched up with trunk. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(19), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(19), [], 'up', wc_dir) expected_output = wc.State(A_path, { 'B/E/alpha' : Item(status='U '), @@ -1528,7 +1529,7 @@ def reintegrate_with_subtree_mergeinfo(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, 1, 1) + [], 1, 1) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -1555,71 +1556,71 @@ def multiple_reintegrates_from_the_same_branch(sbox): # the reintegrate target. # # r7 - Create the feature branch. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'copy', A_path, Feature_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Make a feature branch', wc_dir) # r8 - Make a change under 'A'. svntest.main.file_write(mu_path, "New trunk content.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "A text change under 'A'", wc_dir) # r9 - Make a change on the feature branch. svntest.main.file_write(Feature_beta_path, "New branch content.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "A text change on the feature branch", wc_dir) # r10 - Sync merge all changes from 'A' to the feature branch. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A', Feature_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Sync merge 'A' to feature branch", wc_dir) # r11 - Reintegrate the feature branch back to 'A'. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) run_reintegrate(sbox.repo_url + '/A_FEATURE_BRANCH', A_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Reintegrate feature branch back to 'A'", wc_dir) # r12 - Do a --record-only merge from 'A' to the feature branch so we # don't try to merge r11 from trunk during the next sync merge. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c11', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c11', '--record-only', sbox.repo_url + '/A', Feature_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Sync merge 'A' to feature branch", wc_dir) # r13 - Make another change on the feature branch. svntest.main.file_write(Feature_beta_path, "Even newer branch content.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Different text on the feature branch", wc_dir) # r14 - Sync merge all changes from 'A' to the feature branch in # preparation for a second reintegrate from this branch. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A', Feature_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "2nd Sync merge 'A' to feature branch", wc_dir) # r15 - Reintegrate the feature branch back to 'A' a second time. # No self-referential mergeinfo should be applied on 'A'. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_output = wc.State(A_path, { #'' : Item(status=' U'), #<-- no self-referential mergeinfo applied! 'B/E/beta' : Item(status='U '), @@ -1685,25 +1686,24 @@ def multiple_reintegrates_from_the_same_branch(sbox): expected_disk, expected_status, expected_skip, - None, 1, 1) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + [], 1, 1) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "2nd Reintegrate feature branch back to 'A'", wc_dir) # Demonstrate the danger of any self-referential mergeinfo on trunk. # # Merge all available revisions except r3 from 'A' to 'A_COPY'. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-r3:HEAD', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'merge', '-r3:HEAD', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Merge -r3:HEAD from 'A' to 'A_COPY'", wc_dir) # No self-referential mergeinfo should have been carried on 'A_COPY' from # 'A' that would prevent the following merge from being operative. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2,3],[2,16]], ['U ' + psi_COPY_path + '\n', ' U ' + A_COPY_path + '\n',]), @@ -1716,6 +1716,7 @@ def multiple_reintegrates_from_the_same_branch(sbox): # # Also tests Issue #3591 'reintegrate merges update subtree mergeinfo # unconditionally'. +@SkipUnless(server_has_mergeinfo) @Issue(3591) def reintegrate_with_self_referential_mergeinfo(sbox): "source has target's history as explicit mergeinfo" @@ -1735,38 +1736,38 @@ def reintegrate_with_self_referential_mergeinfo(sbox): # r6 Copy A to A2 and then manually set some self-referential mergeinfo on # A2/B and A2. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(5), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(5), [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', A_path, A2_path) # /A:3 describes A2's natural history, a.k.a. it's implicit mergeinfo, so # it is self-referential. Same for /A/B:4 and A2/B. Normally this is # redundant but not harmful. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'svn:mergeinfo', '/A:3', A2_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'svn:mergeinfo', '/A/B:4', A2_B_path) svntest.actions.run_and_verify_svn( - None, None, [], 'ci', '-m', + None, [], 'ci', '-m', 'copy A to A2 and set some self-referential mergeinfo on the latter.', wc_dir) # r7 Copy A2 to A2.1 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', A2_path, A2_1_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'copy A2to A2.1.', wc_dir) # r8 Make a change on A2.1/mu svntest.main.file_write(A2_1_mu_path, 'New A2.1 stuff') - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Work done on the A2.1 branch.', wc_dir) # Update to uniform revision and reintegrate A2.1 back to A2. # Note that the mergeinfo on A2/B is not changed by the reintegration # and so is not expected to by updated to describe the merge. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(8), [], 'up', wc_dir) expected_output = wc.State(A2_path, { 'mu' : Item(status='U '), @@ -1841,7 +1842,7 @@ def reintegrate_with_self_referential_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, 1, 0) + [], 1, 0) #---------------------------------------------------------------------- # Test for issue #3577 '1.7 subtree mergeinfo recording breaks reintegrate' @@ -1877,20 +1878,20 @@ def reintegrate_with_subtree_merges(sbox): # from A to A_COPY, but do it via subtree merges so the mergeinfo # record of the merges insn't neatly reflected in the root of the # branch. Commit the merge as r8. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c5', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c5', sbox.repo_url + '/A/B', B_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c4', + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c4', sbox.repo_url + '/A/D/G/rho', rho_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c3', + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c3', sbox.repo_url + '/A/D/H', H_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c6', + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c6', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', '-m', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Merge everything from A to A_COPY', wc_dir) @@ -1915,7 +1916,7 @@ def reintegrate_with_subtree_merges(sbox): # Missing ranges: /A/D/G/rho:2-3,5-6 # A_COPY/D/H # Missing ranges: /A/D/H:2,4-5 - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_output = wc.State(A_path, { 'mu' : Item(status='U '), }) @@ -1976,14 +1977,14 @@ def reintegrate_with_subtree_merges(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, 1, 1) + [], 1, 1) # Test issue #4329. Revert previous merge and commit a new edit to # A/D/H/psi. Attempt the same merge without the --reintegrate option. # It should succeed because the automatic merge code should detect that # a reintegrate-style merge is required, that merge should succeed and # there should be not conflict on A/D/H/psi. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) svntest.main.file_write(psi_path, "Non-conflicting trunk edit.\n") svntest.main.run_svn(None, 'commit', '-m', 'An edit on trunk prior to reintegrate.', wc_dir) @@ -1997,11 +1998,12 @@ def reintegrate_with_subtree_merges(sbox): expected_mergeinfo_output, expected_elision_output, expected_A_disk, expected_A_status, - expected_A_skip, None, None, None, - None, None, True, False, A_path) + expected_A_skip, + [], True, False, A_path) #---------------------------------------------------------------------- # Test for issue #3654 'added subtrees with mergeinfo break reintegrate'. +@SkipUnless(server_has_mergeinfo) @Issue(3654) def added_subtrees_with_mergeinfo_break_reintegrate(sbox): "added subtrees with mergeinfo break reintegrate" @@ -2024,93 +2026,93 @@ def added_subtrees_with_mergeinfo_break_reintegrate(sbox): # r8 - Add a new file A_COPY_2/C/nu. svntest.main.file_write(nu_COPY_2_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'add', nu_COPY_2_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Add new file in A_COPY_2 branch', wc_dir) # r9 - Cyclic cherry pick merge r8 from A_COPY_2 back to A. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', '-c', '8', sbox.repo_url + '/A_COPY_2', A_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Merge r8 from A_COPY_2 to A.', wc_dir) # r10 - Make an edit to A_COPY_2/C/nu. svntest.main.file_write(nu_COPY_2_path, "A_COPY_2 edit to file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Edit new file on A_COPY_2 branch', wc_dir) # r11 - Cyclic subtree cherry pick merge r10 from A_COPY_2/C/nu # back to A/C/nu. - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', '-c', '10', sbox.repo_url + '/A_COPY_2/C/nu', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Merge r8 from A_COPY_2/C/nu to A/C/nu.', wc_dir) # r12 - Edit under A_COPY. svntest.main.file_write(mu_path, "mu edits on A_COPY.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Work on A_COPY branch.', wc_dir) # r13 - Sync merge A to A_COPY in preparation for reintegrate. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Prep for reintegrate: Sync A to A_COPY.', wc_dir) # r14 - Reintegrate A_COPY to A. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) run_reintegrate(sbox.repo_url + '/A_COPY', A_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Reintegrate A_COPY to A.', wc_dir) # r15 - Delete A_COPY. - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'delete', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Delete A_COPY branch', wc_dir) # r16 - Create new A_COPY from A@HEAD=15. # # Update so we copy HEAD: - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'copy', A_path, A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Create new A_COPY branch from A', wc_dir) # r17 - Unrelated edits under both A and A_COPY. svntest.main.file_write(nu_path, "Trunk work on nu.\n") svntest.main.file_write(lambda_COPY_path, "lambda edit on A_COPY.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Unrelated edits on A and A_COPY branch.', wc_dir) # r18 - Sync A to A_COPY in preparation for another reintegrate. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Prep for reintegrate: Sync A to A_COPY.', wc_dir) # Reintegrate A_COPY back to A. We just synced A_COPY with A, so this # should work. The only text change should be the change made to # A_COPY/B/lambda in r17 after the new A_COPY was created. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_output = wc.State(A_path, { '' : Item(status=' U'), 'B/lambda' : Item(status='U '), @@ -2190,11 +2192,12 @@ def added_subtrees_with_mergeinfo_break_reintegrate(sbox): expected_disk, expected_status, expected_skip, - None, 1, 1) + [], 1, 1) #---------------------------------------------------------------------- # Test for issue #3648 '2-URL merges incorrectly reverse-merge mergeinfo # for merge target'. +@SkipUnless(server_has_mergeinfo) @Issue(3648) def two_URL_merge_removes_valid_mergeinfo_from_target(sbox): "2-URL merge removes valid mergeinfo from target" @@ -2215,42 +2218,40 @@ def two_URL_merge_removes_valid_mergeinfo_from_target(sbox): # r8 - A simple text edit on the A_COPY branch. svntest.main.file_write(lambda_COPY_path, "Edit on 'branch 1'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Work on 'branch 1'.", wc_dir) # r9 - Sync the A_COPY branch with A up the HEAD (r8). Now A_COPY # differs from A only by the change made in r8 and by the mergeinfo # '/A:2-8' on A_COPY which was set to describe the merge. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Sync A to A_COPY.', wc_dir) # r10 - A simple text edit on our "trunk" A. svntest.main.file_write(mu_path, "Edit on 'trunk'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Work on 'trunk'", wc_dir) # r11 - Sync the A_COPY_2 branch with A up to HEAD (r10). - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Sync A to A_COPY_2.', wc_dir) # Confirm that the mergeinfo on each branch is what we expect. - svntest.actions.run_and_verify_svn(None, - [A_COPY_path + ' - /A:2-8\n'], + svntest.actions.run_and_verify_svn([A_COPY_path + ' - /A:2-8\n'], [], 'pg', SVN_PROP_MERGEINFO, '-R', A_COPY_path) - svntest.actions.run_and_verify_svn(None, - [A_COPY_2_path + ' - /A:3-10\n'], + svntest.actions.run_and_verify_svn([A_COPY_2_path + ' - /A:3-10\n'], [], 'pg', SVN_PROP_MERGEINFO, '-R', A_COPY_2_path) @@ -2285,7 +2286,7 @@ def two_URL_merge_removes_valid_mergeinfo_from_target(sbox): # # Before issue #3648 was fixed this test failed because the valid mergeinfo # '/A:r3-8' on A_COPY_2 was removed by the merge. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_output = wc.State(A_COPY_2_path, { '' : Item(status=' G'), 'B/lambda' : Item(status='U '), @@ -2349,12 +2350,12 @@ def two_URL_merge_removes_valid_mergeinfo_from_target(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 1) + [], True, True) #---------------------------------------------------------------------- # Test for issue #3867 'reintegrate merges create mergeinfo for # non-existent paths'. +@SkipUnless(server_has_mergeinfo) @Issue(3867) def reintegrate_creates_bogus_mergeinfo(sbox): "reintegrate creates bogus mergeinfo" @@ -2436,7 +2437,7 @@ def reintegrate_creates_bogus_mergeinfo(sbox): expected_mergeinfo_output, expected_elision_output, expected_disk, None, expected_skip, - None, + [], 1, 1) @@ -2445,6 +2446,7 @@ def reintegrate_creates_bogus_mergeinfo(sbox): # subtree mergeinfo is reintegrated into a target with subtree # mergeinfo. Deliberately written in a style that works with the 1.6 # testsuite. +@SkipUnless(server_has_mergeinfo) @Issue(3957) def no_source_subtree_mergeinfo(sbox): "source without subtree mergeinfo" @@ -2516,7 +2518,9 @@ def no_source_subtree_mergeinfo(sbox): svntest.main.run_svn(None, 'update', wc_dir) # Verify that merge results in no subtree mergeinfo - svntest.actions.run_and_verify_svn(None, [], [], 'propget', 'svn:mergeinfo', + expected_stderr = '.*W200017: Property.*not found' + svntest.actions.run_and_verify_svn([], expected_stderr, + 'propget', 'svn:mergeinfo', sbox.repo_url + '/A/B2/E') # Merge trunk to branch-2 @@ -2525,7 +2529,8 @@ def no_source_subtree_mergeinfo(sbox): svntest.main.run_svn(None, 'update', wc_dir) # Verify that there is still no subtree mergeinfo - svntest.actions.run_and_verify_svn(None, [], [], 'propget', 'svn:mergeinfo', + svntest.actions.run_and_verify_svn([], expected_stderr, + 'propget', 'svn:mergeinfo', sbox.repo_url + '/A/B2/E') # Reintegrate branch-2 to trunk, this fails in 1.6.x from 1.6.13. @@ -2558,7 +2563,7 @@ def no_source_subtree_mergeinfo(sbox): expected_output, expected_mergeinfo, expected_elision, expected_disk, None, expected_skip, - None, + [], 1, 1) #---------------------------------------------------------------------- @@ -2584,13 +2589,13 @@ def reintegrate_replaced_source(sbox): svntest.main.run_svn(None, 'up', wc_dir) svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path, '-c3') - svntest.main.run_svn(None, 'ci', '-m', 'Merge r3 from A to A_COPY', wc_dir) + sbox.simple_commit(message='Merge r3 from A to A_COPY') # r8 - Merge r4 from A to A_COPY svntest.main.run_svn(None, 'up', wc_dir) svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path, '-c4') - svntest.main.run_svn(None, 'ci', '-m', 'Merge r4 from A to A_COPY', wc_dir) + sbox.simple_commit(message='Merge r4 from A to A_COPY') # r9 - Merge r5 from A to A_COPY. Make an additional edit to # A_COPY/B/E/beta. @@ -2598,7 +2603,7 @@ def reintegrate_replaced_source(sbox): svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path, '-c5') svntest.main.file_write(beta_COPY_path, "Branch edit mistake.\n") - svntest.main.run_svn(None, 'ci', '-m', 'Merge r5 from A to A_COPY', wc_dir) + sbox.simple_commit(message='Merge r5 from A to A_COPY') # r10 - Delete A_COPY and replace it with A_COPY@8. This removes the edit # we made above in r9 to A_COPY/B/E/beta. @@ -2606,19 +2611,17 @@ def reintegrate_replaced_source(sbox): svntest.main.run_svn(None, 'delete', A_COPY_path) svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A_COPY@8', A_COPY_path) - svntest.main.run_svn(None, 'ci', '-m', 'Replace A_COPY with A_COPY@8', - wc_dir) + sbox.simple_commit(message='Replace A_COPY with A_COPY@8') # r11 - Make an edit on A_COPY/mu. svntest.main.file_write(mu_COPY_path, "Branch edit.\n") - svntest.main.run_svn(None, 'ci', '-m', 'Branch edit', - wc_dir) + sbox.simple_commit(message='Branch edit') # r12 - Do a final sync merge of A to A_COPY in preparation for # reintegration. svntest.main.run_svn(None, 'up', wc_dir) svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path) - svntest.main.run_svn(None, 'ci', '-m', 'Sycn A_COPY with A', wc_dir) + sbox.simple_commit(message='Sync A_COPY with A') # Reintegrate A_COPY to A. The resulting mergeinfo should be # '/A_COPY:2-8,10-12' because of the replacement which removed /A_COPY:9 @@ -2688,6 +2691,7 @@ def reintegrate_replaced_source(sbox): #---------------------------------------------------------------------- @SkipUnless(svntest.main.is_posix_os) +@SkipUnless(server_has_mergeinfo) @Issue(4052) def reintegrate_symlink_deletion(sbox): "reintegrate symlink deletion" @@ -2724,6 +2728,7 @@ def reintegrate_symlink_deletion(sbox): run_reintegrate(A_COPY_url, A_path) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def no_op_reintegrate(sbox): """no-op reintegrate""" @@ -2744,6 +2749,7 @@ def no_op_reintegrate(sbox): run_reintegrate(sbox.repo_url + '/A_COPY', A_path) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) def renamed_branch_reintegrate(sbox): """reintegrate a branch that has been renamed""" @@ -2782,6 +2788,38 @@ def renamed_branch_reintegrate(sbox): # ### TODO: Check the result more carefully than merely that it completed. run_reintegrate(sbox.repo_url + '/RENAMED@8', A_path) +@SkipUnless(server_has_mergeinfo) +def reintegrate_noop_branch_into_renamed_branch(sbox): + """reintegrate no-op branch into renamed branch""" + # In this test, the branch has no unique changes but contains a + # revision cherry-picked from trunk. Reintegrating such a branch + # should work, but used to error out when this test was written. + + # Make A_COPY branch in r2, and do a few more commits to A in r3-6. + sbox.build() + + wc_dir = sbox.wc_dir + A_path = sbox.ospath('A') + A_COPY_path = sbox.ospath('A_COPY') + expected_disk, expected_status = set_up_branch(sbox) + + # Cherry-pick merge from trunk to branch + youngest_rev = sbox.youngest() + svntest.main.run_svn(None, 'merge', '-c', youngest_rev, + sbox.repo_url + '/A', A_COPY_path) + sbox.simple_commit() + sbox.simple_update() + + # Rename the trunk + sbox.simple_move('A', 'A_RENAMED') + sbox.simple_commit() + sbox.simple_update() + + # Try to reintegrate the branch. This should work but used to fail with: + # svn: E160013: File not found: revision 5, path '/A_RENAMED' + run_reintegrate(sbox.repo_url + '/A_COPY', sbox.ospath('A_RENAMED')) + + ######################################################################## # Run the tests @@ -2809,6 +2847,7 @@ test_list = [ None, reintegrate_symlink_deletion, no_op_reintegrate, renamed_branch_reintegrate, + reintegrate_noop_branch_into_renamed_branch, ] if __name__ == '__main__': |