diff options
Diffstat (limited to 'subversion/tests/cmdline/merge_tests.py')
-rwxr-xr-x | subversion/tests/cmdline/merge_tests.py | 2805 |
1 files changed, 1018 insertions, 1787 deletions
diff --git a/subversion/tests/cmdline/merge_tests.py b/subversion/tests/cmdline/merge_tests.py index d116118..4321e37 100755 --- a/subversion/tests/cmdline/merge_tests.py +++ b/subversion/tests/cmdline/merge_tests.py @@ -51,86 +51,16 @@ from svntest.actions import make_conflict_marker_text from svntest.actions import inject_conflict_into_expected_state from svntest.verify import RegexListOutput -def expected_merge_output(rev_ranges, additional_lines=[], foreign=False, - elides=False, two_url=False, target=None, - text_conflicts=0, prop_conflicts=0, tree_conflicts=0, - text_resolved=0, prop_resolved=0, tree_resolved=0, - skipped_paths=0): - """Generate an (inefficient) regex representing the expected merge - output and mergeinfo notifications from REV_RANGES and ADDITIONAL_LINES. - - REV_RANGES is a list of revision ranges for which mergeinfo is being - recorded. Each range is of the form [start, end] (where both START and - END are inclusive, unlike in '-rX:Y') or the form [single_rev] (which is - like '-c SINGLE_REV'). If REV_RANGES is None then only the standard - notification for a 3-way merge is expected. - - ADDITIONAL_LINES is a list of strings to match the other lines of output; - these are basically regular expressions except that backslashes will be - escaped herein. If ADDITIONAL_LINES is a single string, it is interpreted - the same as a list containing that string. - - If ELIDES is true, add to the regex an expression representing elision - notification. If TWO_URL is true, tweak the regex to expect the - appropriate mergeinfo notification for a 3-way merge. - - TARGET is the local path to the target, as it should appear in - notifications; if None, it is not checked. - - TEXT_CONFLICTS, PROP_CONFLICTS, TREE_CONFLICTS and SKIPPED_PATHS specify - the number of each kind of conflict to expect. - """ - - if rev_ranges is None: - lines = [svntest.main.merge_notify_line(None, None, False, foreign)] - else: - lines = [] - for rng in rev_ranges: - start_rev = rng[0] - if len(rng) > 1: - end_rev = rng[1] - else: - end_rev = None - lines += [svntest.main.merge_notify_line(start_rev, end_rev, - True, foreign, target)] - lines += [svntest.main.mergeinfo_notify_line(start_rev, end_rev, target)] - - if (elides): - lines += ["--- Eliding mergeinfo from .*\n"] - - if (two_url): - lines += ["--- Recording mergeinfo for merge between repository URLs .*\n"] - - # Address "The Backslash Plague" - # - # If ADDITIONAL_LINES are present there are possibly paths in it with - # multiple components and on Windows these components are separated with - # '\'. These need to be escaped properly in the regexp for the match to - # work correctly. See http://aspn.activestate.com/ASPN/docs/ActivePython - # /2.2/howto/regex/regex.html#SECTION000420000000000000000. - if isinstance(additional_lines, str): - additional_lines = [additional_lines] - if sys.platform == 'win32': - additional_lines = [line.replace("\\", "\\\\") for line in additional_lines] - lines += additional_lines - - lines += svntest.main.summary_of_conflicts( - text_conflicts, prop_conflicts, tree_conflicts, - text_resolved, prop_resolved, tree_resolved, - skipped_paths, - as_regex=True) - - return "|".join(lines) - -def check_mergeinfo_recursively(root_path, subpaths_mergeinfo): - """Check that the mergeinfo properties on and under ROOT_PATH are those in - SUBPATHS_MERGEINFO, a {path: mergeinfo-prop-val} dictionary.""" - expected = svntest.verify.UnorderedOutput( - [path + ' - ' + subpaths_mergeinfo[path] + '\n' - for path in subpaths_mergeinfo]) - svntest.actions.run_and_verify_svn(None, expected, [], - 'propget', '-R', SVN_PROP_MERGEINFO, - root_path) +from svntest.mergetrees import expected_merge_output, \ + check_mergeinfo_recursively, \ + set_up_dir_replace, \ + set_up_branch, \ + local_path, \ + svn_mkfile, \ + svn_modfile, \ + svn_copy, \ + svn_merge, \ + noninheritable_mergeinfo_test_set_up ###################################################################### # Tests @@ -224,9 +154,7 @@ def textual_merges_galore(sbox): # Initial commit. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Make the "other" working copy other_wc = sbox.add_wc_path('other') @@ -260,9 +188,7 @@ def textual_merges_galore(sbox): # Commit revision 3. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Make local mods in wc.other other_pi_path = os.path.join(other_wc, 'A', 'D', 'G', 'pi') @@ -278,7 +204,7 @@ def textual_merges_galore(sbox): # We skip A/D/G/rho in this merge; it will be tested with a separate # merge command. Temporarily put it back to revision 1, so this # merge succeeds cleanly. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', '-r', '1', other_rho_path) # For A/D/G/tau, we append few different lines, to conflict with the @@ -317,7 +243,7 @@ def textual_merges_galore(sbox): inject_conflict_into_expected_state('A/D/G/tau', expected_disk, expected_status, other_tau_text, tau_text, - 3) + 1, 3) expected_skip = wc.State('', { }) @@ -333,12 +259,9 @@ def textual_merges_galore(sbox): expected_disk, expected_status, expected_skip, - None, - svntest.tree.detect_conflict_files, - (list(tau_conflict_support_files)), - None, None, False, True, - '--allow-mixed-revisions', - other_wc) + [], False, True, + '--allow-mixed-revisions', other_wc, + extra_files=list(tau_conflict_support_files)) # Now reverse merge r3 into A/D/G/rho, give it non-conflicting local # mods, then merge in the 2:3 change. ### Not bothering to do the @@ -350,7 +273,6 @@ def textual_merges_galore(sbox): # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-3]], ['G ' + other_rho_path + '\n', ' G ' + other_rho_path + '\n',]), @@ -406,7 +328,7 @@ def textual_merges_galore(sbox): }) inject_conflict_into_expected_state('tau', expected_disk, expected_status, - other_tau_text, tau_text, 3) + other_tau_text, tau_text, 1, 3) # Do the merge, but check svn:mergeinfo props separately since # run_and_verify_merge would attempt to proplist tau's conflict @@ -421,11 +343,10 @@ def textual_merges_galore(sbox): expected_disk, expected_status, expected_skip, - None, - svntest.tree.detect_conflict_files, list(tau_conflict_support_files)) + extra_files=list(tau_conflict_support_files)) - svntest.actions.run_and_verify_svn(None, [], [], + svntest.actions.run_and_verify_svn([], '.*W200017: Property.*not found', 'propget', SVN_PROP_MERGEINFO, os.path.join(other_wc, "A", "D", "G", "rho")) @@ -481,9 +402,7 @@ def add_with_history(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) expected_output = wc.State(C_path, { 'Q' : Item(status='A '), @@ -533,8 +452,7 @@ def add_with_history(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1) # check props + check_props=True) expected_output = svntest.wc.State(wc_dir, { 'A/C' : Item(verb='Sending'), @@ -561,9 +479,7 @@ def add_with_history(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- # Issue 953 @@ -580,14 +496,14 @@ def simple_property_merges(sbox): beta_path = sbox.ospath('A/B/E/beta') E_path = sbox.ospath('A/B/E') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', alpha_path) # A binary, non-UTF8 property value - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo\201val', beta_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', E_path) @@ -601,31 +517,30 @@ def simple_property_merges(sbox): expected_status.tweak('A/B/E', 'A/B/E/alpha', 'A/B/E/beta', wc_rev=2, status=' ') svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Copy B to B2 as rev 3 B_url = sbox.repo_url + '/A/B' B2_url = sbox.repo_url + '/A/B2' - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', '-m', 'copy B to B2', B_url, B2_url) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Modify a property and add a property for the file and directory - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'mod_foo', alpha_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'bar', 'bar_val', alpha_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'mod\201foo', beta_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'bar', 'bar\201val', beta_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'mod_foo', E_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'bar', 'bar_val', E_path) # Commit change as rev 4 @@ -641,9 +556,8 @@ def simple_property_merges(sbox): 'A/B2/lambda' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) pristine_status = expected_status pristine_status.tweak(wc_rev=4) @@ -689,10 +603,10 @@ def simple_property_merges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Revert merge - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) svntest.actions.run_and_verify_status(wc_dir, pristine_status) @@ -710,13 +624,15 @@ def simple_property_merges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) def error_message(property, old_value, new_value): return "Trying to change property '%s'\n" \ "but the property has been locally deleted.\n" \ - "<<<<<<< (local property value)\n=======\n" \ - "%s>>>>>>> (incoming property value)\n" % (property, new_value) + "<<<<<<< (local property value)\n" \ + "||||||| (incoming 'changed from' value)\n" \ + "%s=======\n" \ + "%s>>>>>>> (incoming 'changed to' value)\n" % (property, old_value, new_value) # Merge B 3:4 into B2 now causes a conflict expected_disk.add({ @@ -726,7 +642,7 @@ def simple_property_merges(sbox): 'E/alpha.prej' : Item(error_message('foo', 'foo_val', 'mod_foo')), 'E/beta.prej' - : Item(error_message('foo', 'foo?\\129val', 'mod?\\129foo')), + : Item(error_message('foo', 'foo?\\81val', 'mod?\\81foo')), }) expected_disk.tweak('E', 'E/alpha', props={'bar' : 'bar_val'}) expected_disk.tweak('E/beta', props={'bar' : 'bar\201val'}) @@ -742,25 +658,25 @@ def simple_property_merges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # issue 1109 : single file property merge. This test performs a merge # that should be a no-op (adding properties that are already present). - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) svntest.actions.run_and_verify_status(wc_dir, pristine_status) # Copy A at rev 4 to A2 to make revision 5. A_url = sbox.repo_url + '/A' A2_url = sbox.repo_url + '/A2' - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 5.\n'], [], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 5.\n'], [], 'copy', '-m', 'copy A to A2', A_url, A2_url) # Re-root the WC at A2. svntest.main.safe_rmtree(wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'checkout', + svntest.actions.run_and_verify_svn(None, [], 'checkout', A2_url, wc_dir) # Attempt to re-merge rev 4 of the original A's alpha. Mergeinfo @@ -770,10 +686,10 @@ def simple_property_merges(sbox): alpha_path = sbox.ospath('B/E/alpha') # Cannot use run_and_verify_merge with a file target - svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-r', '3:4', + svntest.actions.run_and_verify_svn([], [], 'merge', '-r', '3:4', alpha_url, alpha_path) - exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [], + exit_code, output, err = svntest.actions.run_and_verify_svn(None, [], 'pl', alpha_path) saw_foo = 0 @@ -832,10 +748,10 @@ def merge_similar_unrelated_trees(sbox): os.rename(os.path.join(base2_path, 'A', 'B', 'beta'), os.path.join(base2_path, 'A', 'B', 'zeta')) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'add', base1_path, base2_path, apply_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'rev 2', wc_dir) expected_output = wc.State(apply_path, { @@ -846,7 +762,7 @@ def merge_similar_unrelated_trees(sbox): # run_and_verify_merge doesn't support 'svn merge URL URL path' ### TODO: We can use run_and_verify_merge() here now. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '--ignore-ancestry', base1_url, base2_url, @@ -890,12 +806,10 @@ def merge_one_file_helper(sbox, arg_flav, record_only = 0): expected_status.tweak('A/D/G/rho', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Backdate rho to revision 1, so we can merge in the rev 2 changes. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', '-r', '1', rho_path) # Try one merge with an explicit target; it should succeed. @@ -904,21 +818,18 @@ def merge_one_file_helper(sbox, arg_flav, record_only = 0): # right. I think something is still assuming a directory target. if arg_flav == 'r': svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2]], ['U ' + rho_path + '\n', ' U ' + rho_path + '\n']), [], 'merge', '-r', '1:2', rho_url, rho_path) elif arg_flav == 'c': svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2]], ['U ' + rho_path + '\n', ' U ' + rho_path + '\n']), [], 'merge', '-c', '2', rho_url, rho_path) elif arg_flav == '*': svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2]], ['U ' + rho_path + '\n', ' U ' + rho_path + '\n']), @@ -934,7 +845,7 @@ def merge_one_file_helper(sbox, arg_flav, record_only = 0): raise svntest.Failure("Unexpected text in merged '" + rho_path + "'") # Restore rho to pristine revision 1, for another merge. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', rho_path) + svntest.actions.run_and_verify_svn(None, [], 'revert', rho_path) expected_status.tweak('A/D/G/rho', status=' ') svntest.actions.run_and_verify_status(wc_dir, expected_status) @@ -962,7 +873,7 @@ def merge_one_file_helper(sbox, arg_flav, record_only = 0): rho_expected_status = 'MM' merge_cmd.append(rho_url) - svntest.actions.run_and_verify_svn(None, expected_output, [], *merge_cmd) + svntest.actions.run_and_verify_svn(expected_output, [], *merge_cmd) # Inspect rho, make sure it's right. rho_text = svntest.tree.get_text('rho') @@ -1041,9 +952,7 @@ def merge_with_implicit_target_helper(sbox, arg_flav): # Initial commit. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Make the "other" working copy, at r1 other_wc = sbox.add_wc_path('other') @@ -1059,15 +968,13 @@ def merge_with_implicit_target_helper(sbox, arg_flav): # merge using filename for sourcepath # Cannot use run_and_verify_merge with a file target if arg_flav == 'r': - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[2]], + svntest.actions.run_and_verify_svn(expected_merge_output([[2]], ['U mu\n', ' U mu\n']), [], 'merge', '-r', '1:2', 'mu') elif arg_flav == 'c': - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[2]], + svntest.actions.run_and_verify_svn(expected_merge_output([[2]], ['U mu\n', ' U mu\n']), [], @@ -1077,9 +984,8 @@ def merge_with_implicit_target_helper(sbox, arg_flav): # Without a peg revision, the default merge range of BASE:1 (which # is a no-op) will be chosen. Let's do it both ways (no-op first, # of course). - svntest.actions.run_and_verify_svn(None, None, [], 'merge', 'mu') - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[2]], + svntest.actions.run_and_verify_svn(None, [], 'merge', 'mu') + svntest.actions.run_and_verify_svn(expected_merge_output([[2]], ['U mu\n', ' U mu\n']), [], @@ -1091,8 +997,7 @@ def merge_with_implicit_target_helper(sbox, arg_flav): # merge using URL for sourcepath if arg_flav == 'r': - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[-2]], + svntest.actions.run_and_verify_svn(expected_merge_output([[-2]], ['G mu\n', ' U mu\n', ' G mu\n',], @@ -1100,8 +1005,7 @@ def merge_with_implicit_target_helper(sbox, arg_flav): [], 'merge', '-r', '2:1', mu_url) elif arg_flav == 'c': - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[-2]], + svntest.actions.run_and_verify_svn(expected_merge_output([[-2]], ['G mu\n', ' U mu\n', ' G mu\n'], @@ -1112,8 +1016,7 @@ def merge_with_implicit_target_helper(sbox, arg_flav): # Implicit merge source URL and revision range detection is for # forward merges only (e.g. non-reverts). Undo application of # r2 to enable continuation of the test case. - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[-2]], + svntest.actions.run_and_verify_svn(expected_merge_output([[-2]], ['G mu\n', ' U mu\n', ' G mu\n'], @@ -1127,6 +1030,7 @@ def merge_with_implicit_target_helper(sbox, arg_flav): (svntest.tree.get_text('mu'), orig_mu_text)) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) @Issue(785) def merge_with_implicit_target_using_r(sbox): "merging a file w/no explicit target path using -r" @@ -1180,9 +1084,7 @@ def merge_with_prev(sbox): # Initial commit. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Make some other working copies other_wc = sbox.add_wc_path('other') @@ -1197,8 +1099,7 @@ def merge_with_prev(sbox): # Try to revert the last change to mu via svn merge # Cannot use run_and_verify_merge with a file target - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[-2]], + svntest.actions.run_and_verify_svn(expected_merge_output([[-2]], ['U mu\n', ' U mu\n'], elides=True), @@ -1220,11 +1121,11 @@ def merge_with_prev(sbox): os.chdir(another_wc) # ensure 'A' will be at revision 2 - svntest.actions.run_and_verify_svn(None, None, [], 'up') + svntest.actions.run_and_verify_svn(None, [], 'up') # now try a revert on a directory, and verify that it removed the zot # file we had added previously - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-r', 'COMMITTED:PREV', 'A', 'A') @@ -1269,8 +1170,7 @@ def merge_binary_file(sbox): 'A/theta' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # Make the "other" working copy other_wc = sbox.add_wc_path('other') @@ -1286,8 +1186,7 @@ def merge_binary_file(sbox): 'A/theta' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # In second working copy, attempt to 'svn merge -r 2:3'. # We should *not* see a conflict during the update, but a 'U'. @@ -1321,7 +1220,7 @@ def merge_binary_file(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, + [], True, True, '--allow-mixed-revisions', other_wc) @@ -1340,21 +1239,21 @@ def merge_in_new_file_and_diff(sbox): trunk_url = sbox.repo_url + '/A/B/E' # Create a branch - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', trunk_url, sbox.repo_url + '/branch', '-m', "Creating the Branch") # Update to revision 2. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) new_file_path = sbox.ospath('A/B/E/newfile') svntest.main.file_write(new_file_path, "newfile\n") # Add the new file, and commit revision 3. - svntest.actions.run_and_verify_svn(None, None, [], "add", new_file_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "add", new_file_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', "Changing the trunk.", wc_dir) @@ -1396,7 +1295,7 @@ def merge_in_new_file_and_diff(sbox): expected_output = [ "Index: " + url_branch_path + "/newfile\n", "===================================================================\n", - "--- "+ url_branch_path + "/newfile (revision 0)\n", + "--- "+ url_branch_path + "/newfile (nonexistent)\n", "+++ "+ url_branch_path + "/newfile (working copy)\n", "@@ -0,0 +1 @@\n", "+newfile\n", @@ -1409,9 +1308,10 @@ def merge_in_new_file_and_diff(sbox): "Property changes on: " + url_branch_path + "\n", "___________________________________________________________________\n", "Added: " + SVN_PROP_MERGEINFO + "\n", + "## -0,0 +0,1 ##\n", " Merged /A/B/E:r2-3\n", ] - svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', + svntest.actions.run_and_verify_svn(expected_output, [], 'diff', '--show-copies-as-adds', branch_path) @@ -1453,9 +1353,7 @@ def merge_skips_obstructions(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) pre_merge_status = expected_status @@ -1497,14 +1395,13 @@ def merge_skips_obstructions(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 0) + [], True) # Revert the local mods, and this time make "Q" obstructed. An # unversioned file called "Q" will obstruct the adding of the # directory of the same name. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) os.unlink(os.path.join(C_path, "foo")) svntest.main.safe_rmtree(os.path.join(C_path, "Q")) @@ -1540,17 +1437,16 @@ def merge_skips_obstructions(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 0) + [], True) # Revert the local mods, and commit the deletion of iota and A/D/G. (r3) os.unlink(os.path.join(C_path, "foo")) - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) svntest.actions.run_and_verify_status(wc_dir, pre_merge_status) iota_path = sbox.ospath('iota') G_path = sbox.ospath('A/D/G') - svntest.actions.run_and_verify_svn(None, None, [], 'rm', iota_path, G_path) + svntest.actions.run_and_verify_svn(None, [], 'rm', iota_path, G_path) expected_output = wc.State(wc_dir, { 'A/D/G' : Item(verb='Deleting'), @@ -1560,8 +1456,7 @@ def merge_skips_obstructions(sbox): expected_status.remove('iota', 'A/D/G', 'A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now create unversioned iota and A/D/G, try running a merge -r2:3. # The merge process should skip over these targets, since they're @@ -1601,14 +1496,14 @@ def merge_skips_obstructions(sbox): expected_disk, expected_status.copy(wc_dir), expected_skip, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', wc_dir) # Revert the local mods, and commit a change to A/B/lambda (r4), and then # commit the deletion of the same file. (r5) svntest.main.safe_rmtree(G_path) - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) expected_status.tweak('', status=' ') svntest.actions.run_and_verify_status(wc_dir, expected_status) @@ -1620,10 +1515,9 @@ def merge_skips_obstructions(sbox): expected_status.tweak('A/B/lambda', wc_rev=4) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) - svntest.actions.run_and_verify_svn(None, None, [], 'rm', lambda_path) + svntest.actions.run_and_verify_svn(None, [], 'rm', lambda_path) expected_output = wc.State(wc_dir, { 'A/B/lambda' : Item(verb='Deleting'), @@ -1631,8 +1525,7 @@ def merge_skips_obstructions(sbox): expected_status.remove('A/B/lambda') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # lambda is gone, so create an unversioned lambda in its place. # Then attempt to merge -r3:4, which is a change to lambda. The merge @@ -1666,7 +1559,7 @@ def merge_skips_obstructions(sbox): expected_disk, expected_status_short, expected_skip, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', wc_dir) @@ -1674,10 +1567,10 @@ def merge_skips_obstructions(sbox): # working file. Then re-run the -r3:4 merge, and see how svn deals # with a file being under version control, but missing. - svntest.actions.run_and_verify_svn(None, None, [], 'add', lambda_path) + svntest.actions.run_and_verify_svn(None, [], 'add', lambda_path) # Mergeinfo prop changed so update to avoid out of date error. - 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(wc_dir, { '' : Item(verb='Sending'), @@ -1692,8 +1585,7 @@ def merge_skips_obstructions(sbox): expected_status.tweak('', status=' ', wc_rev=6) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) os.unlink(lambda_path) expected_output = wc.State(wc_dir, { }) @@ -1716,7 +1608,7 @@ def merge_skips_obstructions(sbox): expected_disk, expected_status.copy(wc_dir), expected_skip, - None, None, None, None, None, + [], 1, 0, '--ignore-ancestry', '--allow-mixed-revisions', wc_dir) @@ -1738,9 +1630,9 @@ def merge_into_missing(sbox): Q_path = os.path.join(F_path, 'Q') foo_path = os.path.join(F_path, 'foo') - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', Q_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', Q_path) svntest.main.file_append(foo_path, "foo") - svntest.actions.run_and_verify_svn(None, None, [], 'add', foo_path) + svntest.actions.run_and_verify_svn(None, [], 'add', foo_path) expected_output = wc.State(wc_dir, { 'A/B/F/Q' : Item(verb='Adding'), @@ -1753,17 +1645,16 @@ def merge_into_missing(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) R_path = os.path.join(Q_path, 'R') bar_path = os.path.join(R_path, 'bar') baz_path = os.path.join(Q_path, 'baz') - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', R_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', R_path) svntest.main.file_append(bar_path, "bar") - svntest.actions.run_and_verify_svn(None, None, [], 'add', bar_path) + svntest.actions.run_and_verify_svn(None, [], 'add', bar_path) svntest.main.file_append(baz_path, "baz") - svntest.actions.run_and_verify_svn(None, None, [], 'add', baz_path) + svntest.actions.run_and_verify_svn(None, [], 'add', baz_path) expected_output = wc.State(wc_dir, { 'A/B/F/Q/R' : Item(verb='Adding'), @@ -1777,8 +1668,7 @@ def merge_into_missing(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) os.unlink(foo_path) svntest.main.safe_rmtree(Q_path) @@ -1817,8 +1707,8 @@ def merge_into_missing(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 0, 0, '--dry-run', + [], False, False, + '--dry-run', '--ignore-ancestry', '--allow-mixed-revisions', F_path) @@ -1842,8 +1732,7 @@ def merge_into_missing(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 0, 0, + [], False, False, '--ignore-ancestry', '--allow-mixed-revisions', F_path) @@ -1884,8 +1773,8 @@ def dry_run_adds_file_with_prop(sbox): # Commit a new file which has a property. zig_path = sbox.ospath('A/B/E/zig') svntest.main.file_append(zig_path, "zig contents") - svntest.actions.run_and_verify_svn(None, None, [], 'add', zig_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'add', zig_path) + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', zig_path) @@ -1898,8 +1787,7 @@ def dry_run_adds_file_with_prop(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Do a regular merge of that change into a different dir. F_path = sbox.ospath('A/B/F') @@ -1927,9 +1815,7 @@ def dry_run_adds_file_with_prop(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, # please check props - 1) # and do a dry-run also) + [], True, True) #---------------------------------------------------------------------- # Regression test for issue #1673 @@ -1966,9 +1852,7 @@ def merge_binary_with_common_ancestry(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, - wc_dir) + expected_output, expected_status) # Create the first branch J_path = sbox.ospath('J') @@ -1985,9 +1869,7 @@ def merge_binary_with_common_ancestry(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, - wc_dir) + expected_output, expected_status) # Create the path where the files will be merged K_path = sbox.ospath('K') @@ -2003,9 +1885,7 @@ def merge_binary_with_common_ancestry(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, - wc_dir) + expected_output, expected_status) # Copy 'I/theta' to 'K/'. This file will be merged later. theta_K_path = os.path.join(K_path, 'theta') @@ -2021,9 +1901,7 @@ def merge_binary_with_common_ancestry(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, - wc_dir) + expected_output, expected_status) # Modify the original ancestry 'I/theta' svntest.main.file_append(theta_I_path, "some extra junk") @@ -2036,9 +1914,7 @@ def merge_binary_with_common_ancestry(sbox): expected_status.tweak('I/theta', wc_rev=6) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, - wc_dir) + expected_output, expected_status) # Create the second branch from the modified ancestry L_path = sbox.ospath('L') @@ -2056,9 +1932,7 @@ def merge_binary_with_common_ancestry(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, - wc_dir) + expected_output, expected_status) # Now merge first ('J/') and second ('L/') branches into 'K/' saved_cwd = os.getcwd() @@ -2066,8 +1940,7 @@ def merge_binary_with_common_ancestry(sbox): os.chdir(K_path) theta_J_url = sbox.repo_url + '/J/theta' theta_L_url = sbox.repo_url + '/L/theta' - svntest.actions.run_and_verify_svn(None, - expected_merge_output(None, + svntest.actions.run_and_verify_svn(expected_merge_output(None, ['U theta\n', ' U theta\n', ' G theta\n',], @@ -2115,11 +1988,11 @@ def merge_funny_chars_on_path(sbox): target_path = os.path.join(wc_dir, 'A', 'B', 'E', '%s' % target[1], target[2]) svntest.main.file_append(target_path, "%s/%s" % (target[1], target[2])) - svntest.actions.run_and_verify_svn(None, None, [], 'add', target_dir) + svntest.actions.run_and_verify_svn(None, [], 'add', target_dir) elif target[0] == 'f': target_path = os.path.join(wc_dir, 'A', 'B', 'E', '%s' % target[1]) svntest.main.file_append(target_path, "%s" % target[1]) - svntest.actions.run_and_verify_svn(None, None, [], 'add', target_path) + svntest.actions.run_and_verify_svn(None, [], 'add', target_path) else: raise svntest.Failure @@ -2127,12 +2000,12 @@ def merge_funny_chars_on_path(sbox): for target in add_by_mkdir: if target[0] == 'd': target_dir = os.path.join(wc_dir, 'A', 'B', 'E', target[1]) - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', target_dir) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', target_dir) if target[2]: target_path = os.path.join(wc_dir, 'A', 'B', 'E', '%s' % target[1], target[2]) svntest.main.file_append(target_path, "%s/%s" % (target[1], target[2])) - svntest.actions.run_and_verify_svn(None, None, [], 'add', target_path) + svntest.actions.run_and_verify_svn(None, [], 'add', target_path) expected_output_dic = {} expected_status_dic = {} @@ -2156,8 +2029,7 @@ def merge_funny_chars_on_path(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Do a regular merge of that change into a different dir. F_path = sbox.ospath('A/B/F') @@ -2198,9 +2070,9 @@ def merge_funny_chars_on_path(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 0, # don't check props - 1) # but do a dry-run + [], + False, # don't check props + True) # but do a dry-run expected_output_dic = {} @@ -2216,8 +2088,7 @@ def merge_funny_chars_on_path(sbox): svntest.actions.run_and_verify_commit(F_path, expected_output, - None, - None, wc_dir) + None) #----------------------------------------------------------------------- # Regression test for issue #2064 @@ -2236,29 +2107,29 @@ def merge_keyword_expansions(sbox): os.mkdir(tpath) svntest.main.run_svn(None, "add", tpath) # Commit r2. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "ci", "-m", "r2", wcpath) # Copy t to b. svntest.main.run_svn(None, "cp", tpath, bpath) # Commit r3 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "ci", "-m", "r3", wcpath) # Add a file to t. svntest.main.file_append(t_fpath, "$Revision$") - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'add', t_fpath) # Ask for keyword expansion in the file. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'svn:keywords', 'Revision', t_fpath) # Commit r4 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'r4', wcpath) # Update the wc before the merge. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'update', wcpath) expected_status = svntest.actions.get_virginal_state(wcpath, 4) @@ -2307,7 +2178,7 @@ def merge_prop_change_to_deleted_target(sbox): # Add a property to alpha. alpha_path = sbox.ospath('A/B/E/alpha') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', alpha_path) @@ -2318,13 +2189,12 @@ def merge_prop_change_to_deleted_target(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/B/E/alpha', wc_rev=2, status=' ') svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], + expected_output, expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Remove alpha entirely. - svntest.actions.run_and_verify_svn(None, None, [], 'rm', alpha_path) + svntest.actions.run_and_verify_svn(None, [], 'rm', alpha_path) expected_output = wc.State(wc_dir, { 'A/B/E/alpha' : Item(verb='Deleting'), }) @@ -2333,7 +2203,7 @@ def merge_prop_change_to_deleted_target(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, alpha_path) + [], alpha_path) # Try merging the original propset, which applies to a target that # no longer exists. The bug would only reproduce when run from @@ -2341,123 +2211,10 @@ def merge_prop_change_to_deleted_target(sbox): # --ignore-ancestry here because our merge logic will otherwise # prevent a merge of changes we already have. os.chdir(wc_dir) - svntest.actions.run_and_verify_svn("Merge errored unexpectedly", - svntest.verify.AnyOutput, [], 'merge', + svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'merge', '-r1:2', '--ignore-ancestry', '.') #---------------------------------------------------------------------- -def set_up_dir_replace(sbox): - """Set up the working copy for directory replace tests, creating - directory 'A/B/F/foo' with files 'new file' and 'new file2' within - it (r2), and merging 'foo' onto 'C' (r3), then deleting 'A/B/F/foo' - (r4).""" - - sbox.build() - wc_dir = sbox.wc_dir - - C_path = sbox.ospath('A/C') - F_path = sbox.ospath('A/B/F') - F_url = sbox.repo_url + '/A/B/F' - - foo_path = os.path.join(F_path, 'foo') - new_file = os.path.join(foo_path, "new file") - new_file2 = os.path.join(foo_path, "new file 2") - - # Make directory foo in F, and add some files within it. - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path) - svntest.main.file_append(new_file, "Initial text in new file.\n") - svntest.main.file_append(new_file2, "Initial text in new file 2.\n") - svntest.main.run_svn(None, "add", new_file) - svntest.main.run_svn(None, "add", new_file2) - - # Commit all the new content, creating r2. - expected_output = wc.State(wc_dir, { - 'A/B/F/foo' : Item(verb='Adding'), - 'A/B/F/foo/new file' : Item(verb='Adding'), - 'A/B/F/foo/new file 2' : Item(verb='Adding'), - }) - expected_status = svntest.actions.get_virginal_state(wc_dir, 1) - expected_status.add({ - 'A/B/F/foo' : Item(status=' ', wc_rev=2), - 'A/B/F/foo/new file' : Item(status=' ', wc_rev=2), - 'A/B/F/foo/new file 2' : Item(status=' ', wc_rev=2), - }) - svntest.actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, wc_dir) - - # Merge foo onto C - expected_output = wc.State(C_path, { - 'foo' : Item(status='A '), - 'foo/new file' : Item(status='A '), - 'foo/new file 2' : Item(status='A '), - }) - expected_mergeinfo_output = wc.State(C_path, { - '' : Item(status=' U'), - }) - expected_elision_output = wc.State(C_path, { - }) - expected_disk = wc.State('', { - '' : Item(props={SVN_PROP_MERGEINFO : '/A/B/F:2'}), - 'foo' : Item(), - 'foo/new file' : Item("Initial text in new file.\n"), - 'foo/new file 2' : Item("Initial text in new file 2.\n"), - }) - expected_status = wc.State(C_path, { - '' : Item(status=' M', wc_rev=1), - 'foo' : Item(status='A ', wc_rev='-', copied='+'), - 'foo/new file' : Item(status=' ', wc_rev='-', copied='+'), - 'foo/new file 2' : Item(status=' ', wc_rev='-', copied='+'), - }) - expected_skip = wc.State(C_path, { }) - svntest.actions.run_and_verify_merge(C_path, '1', '2', F_url, None, - expected_output, - expected_mergeinfo_output, - expected_elision_output, - expected_disk, - expected_status, - expected_skip, - None, None, None, None, None, 1) - # Commit merge of foo onto C, creating r3. - expected_output = svntest.wc.State(wc_dir, { - 'A/C' : Item(verb='Sending'), - 'A/C/foo' : Item(verb='Adding'), - }) - expected_status = svntest.actions.get_virginal_state(wc_dir, 1) - expected_status.add({ - 'A/B/F/foo' : Item(status=' ', wc_rev=2), - 'A/C' : Item(status=' ', wc_rev=3), - 'A/B/F/foo/new file' : Item(status=' ', wc_rev=2), - 'A/B/F/foo/new file 2' : Item(status=' ', wc_rev=2), - 'A/C/foo' : Item(status=' ', wc_rev=3), - 'A/C/foo/new file' : Item(status=' ', wc_rev=3), - 'A/C/foo/new file 2' : Item(status=' ', wc_rev=3), - - }) - svntest.actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, wc_dir) - - # Delete foo on F, creating r4. - svntest.actions.run_and_verify_svn(None, None, [], 'rm', foo_path) - expected_output = svntest.wc.State(wc_dir, { - 'A/B/F/foo' : Item(verb='Deleting'), - }) - expected_status = svntest.actions.get_virginal_state(wc_dir, 1) - expected_status.add({ - 'A/C' : Item(status=' ', wc_rev=3), - 'A/C/foo' : Item(status=' ', wc_rev=3), - 'A/C/foo/new file' : Item(status=' ', wc_rev=3), - 'A/C/foo/new file 2' : Item(status=' ', wc_rev=3), - }) - svntest.actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, wc_dir) - -#---------------------------------------------------------------------- # A merge that replaces a directory # Tests for Issue #2144 and Issue #2607 @SkipUnless(server_has_mergeinfo) @@ -2480,8 +2237,8 @@ def merge_dir_replace(sbox): new_file3 = os.path.join(bar_path, "new file 3") # Make a couple of directories, and add some files within them. - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path) - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', bar_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', foo_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', bar_path) svntest.main.file_append(new_file3, "Initial text in new file 3.\n") svntest.main.run_svn(None, "add", new_file3) svntest.main.file_append(foo_file, "Initial text in file foo.\n") @@ -2507,8 +2264,7 @@ def merge_dir_replace(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Merge replacement of foo onto C expected_output = wc.State(C_path, { 'foo' : Item(status='R '), @@ -2545,10 +2301,9 @@ def merge_dir_replace(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, - 0) # don't do a dry-run - # the output differs + [], True, + False) # don't do a dry-run + # the output differs # Commit merge of foo onto C expected_output = svntest.wc.State(wc_dir, { @@ -2569,8 +2324,7 @@ def merge_dir_replace(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- # A merge that replaces a directory and one of its children @@ -2591,8 +2345,8 @@ def merge_dir_and_file_replace(sbox): # Recreate foo and 'new file 2' in F and add a new folder with a file bar_path = os.path.join(foo_path, 'bar') new_file3 = os.path.join(bar_path, "new file 3") - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path) - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', bar_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', foo_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', bar_path) svntest.main.file_append(new_file3, "Initial text in new file 3.\n") svntest.main.run_svn(None, "add", new_file3) svntest.main.file_append(new_file2, "New text in new file 2.\n") @@ -2617,8 +2371,7 @@ def merge_dir_and_file_replace(sbox): expected_status.tweak('A/C', wc_rev=3) # From mergeinfo svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Merge replacement of foo onto C expected_output = wc.State(C_path, { 'foo' : Item(status='R '), @@ -2654,10 +2407,10 @@ def merge_dir_and_file_replace(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, - 0) # don't do a dry-run - # the output differs + [], + True, + False) # don't do a dry-run + # the output differs # Commit merge of foo onto C expected_output = svntest.wc.State(wc_dir, { @@ -2679,16 +2432,15 @@ def merge_dir_and_file_replace(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Confirm the files are present in the repository. new_file_2_url = sbox.repo_url + '/A/C/foo/new file 2' - svntest.actions.run_and_verify_svn(None, ["New text in new file 2.\n"], + svntest.actions.run_and_verify_svn(["New text in new file 2.\n"], [], 'cat', new_file_2_url) new_file_3_url = sbox.repo_url + '/A/C/foo/bar/new file 3' - svntest.actions.run_and_verify_svn(None, ["Initial text in new file 3.\n"], + svntest.actions.run_and_verify_svn(["Initial text in new file 3.\n"], [], 'cat', new_file_3_url) @@ -2704,12 +2456,12 @@ def merge_file_with_space_in_its_name(sbox): # Make r2. svntest.main.file_append(new_file, "Initial text in the file.\n") svntest.main.run_svn(None, "add", new_file) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "ci", "-m", "r2", wc_dir) # Make r3. svntest.main.file_append(new_file, "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", "r3", wc_dir) # Try to reverse merge. @@ -2719,7 +2471,7 @@ def merge_file_with_space_in_its_name(sbox): # file (i.e., the URL basename) lives. os.chdir(wc_dir) target_url = sbox.repo_url + '/new%20file' - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], "merge", "-r3:2", target_url) #---------------------------------------------------------------------- @@ -2740,7 +2492,7 @@ def merge_dir_branches(sbox): # Create foo in F foo_path = os.path.join(F_path, 'foo') - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', foo_path) expected_output = wc.State(wc_dir, { 'A/B/F/foo' : Item(verb='Adding'), @@ -2751,8 +2503,7 @@ def merge_dir_branches(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Create an unversioned foo foo_path = sbox.ospath('foo') @@ -2763,7 +2514,7 @@ def merge_dir_branches(sbox): # syntax of the merge command. ### TODO: We can use run_and_verify_merge() here now. expected_output = expected_merge_output(None, "A " + foo_path + "\n") - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '--allow-mixed-revisions', C_url, F_url, wc_dir) @@ -2793,10 +2544,10 @@ def safe_property_merge(sbox): beta_path = sbox.ospath('A/B/E/beta') E_path = sbox.ospath('A/B/E') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', alpha_path, beta_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', E_path) @@ -2809,27 +2560,26 @@ def safe_property_merge(sbox): expected_status.tweak('A/B/E', 'A/B/E/alpha', 'A/B/E/beta', wc_rev=2, status=' ') svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Copy B to B2 as rev 3 (making a branch) B_url = sbox.repo_url + '/A/B' B2_url = sbox.repo_url + '/A/B2' - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', '-m', 'copy B to B2', B_url, B2_url) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Change the properties underneath B again, and commit as r4 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val2', alpha_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propdel', 'foo', beta_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val2', E_path) expected_output = svntest.wc.State(wc_dir, { @@ -2838,19 +2588,18 @@ def safe_property_merge(sbox): 'A/B/E/beta' : Item(verb='Sending'), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, None, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, None) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Make local propchanges to E, alpha and beta in the branch. alpha_path2 = sbox.ospath('A/B2/E/alpha') beta_path2 = sbox.ospath('A/B2/E/beta') E_path2 = sbox.ospath('A/B2/E') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'branchval', alpha_path2, beta_path2) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'branchval', E_path2) @@ -2901,12 +2650,8 @@ def safe_property_merge(sbox): expected_disk, expected_status, expected_skip, - None, # expected error string - svntest.tree.detect_conflict_files, - extra_files, - None, None, # no B singleton handler - 1, # check props - 0) # dry_run + [], True, False, + extra_files=extra_files) #---------------------------------------------------------------------- # Test for issue 2035, whereby 'svn merge' wouldn't always mark @@ -2923,10 +2668,10 @@ def property_merge_from_branch(sbox): alpha_path = sbox.ospath('A/B/E/alpha') E_path = sbox.ospath('A/B/E') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', alpha_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', E_path) @@ -2937,24 +2682,23 @@ def property_merge_from_branch(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/B/E', 'A/B/E/alpha', wc_rev=2, status=' ') svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Copy B to B2 as rev 3 (making a branch) B_url = sbox.repo_url + '/A/B' B2_url = sbox.repo_url + '/A/B2' - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', '-m', 'copy B to B2', B_url, B2_url) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Change the properties underneath B again, and commit as r4 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val2', alpha_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val2', E_path) expected_output = svntest.wc.State(wc_dir, { @@ -2962,18 +2706,17 @@ def property_merge_from_branch(sbox): 'A/B/E/alpha' : Item(verb='Sending'), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, None, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, None) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Make different propchanges changes to the B2 branch and commit as r5. alpha_path2 = sbox.ospath('A/B2/E/alpha') E_path2 = sbox.ospath('A/B2/E') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'branchval', alpha_path2) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'branchval', E_path2) expected_output = svntest.wc.State(wc_dir, { @@ -2981,9 +2724,8 @@ def property_merge_from_branch(sbox): 'A/B2/E/alpha' : Item(verb='Sending'), }) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, None, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, None) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Now merge the recent B change to the branch. There are no local # mods anywhere, but we should still get property conflicts anyway! @@ -3031,12 +2773,8 @@ def property_merge_from_branch(sbox): expected_disk, expected_status, expected_skip, - None, # expected error string - svntest.tree.detect_conflict_files, - extra_files, - None, None, # no B singleton handler - 1, # check props - 0) # dry_run + [], True, False, + extra_files=extra_files) #---------------------------------------------------------------------- # Another test for issue 2035, whereby sometimes 'svn merge' marked @@ -3050,7 +2788,7 @@ def property_merge_undo_redo(sbox): # Add a property to a file, commit as r2. alpha_path = sbox.ospath('A/B/E/alpha') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'foo', 'foo_val', alpha_path) @@ -3061,9 +2799,8 @@ def property_merge_undo_redo(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/B/E/alpha', wc_rev=2, status=' ') svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output, expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Use 'svn merge' to undo the commit. ('svn merge -r2:1') # Result should be a single local-prop-mod. @@ -3089,11 +2826,7 @@ def property_merge_undo_redo(sbox): expected_disk, expected_status, expected_skip, - None, # expected error string - None, None, # no A singleton handler - None, None, # no B singleton handler - 1, # check props - 0) # dry_run + [], True, False) # Change mind, re-apply the change ('svn merge -r1:2'). # This should merge cleanly into existing prop-mod, status shows nothing. @@ -3123,11 +2856,7 @@ def property_merge_undo_redo(sbox): expected_disk, expected_status, expected_skip, - None, # expected error string - None, None, # no A singleton handler - None, None, # no B singleton handler - 1, # check props - 0, # dry_run + [], True, False, '--ignore-ancestry', wc_dir) @@ -3147,25 +2876,24 @@ def cherry_pick_text_conflict(sbox): branch_mu_path = sbox.ospath('copy-of-A/mu') # Create a branch of A. - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', A_url, branch_A_url, '-m', "Creating copy-of-A") # Update to get the branch. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # Change mu's text on the branch, producing r3 through r6. for rev in range(3, 7): svntest.main.file_append(branch_mu_path, ("r%d\n" % rev) * 3) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Add lines to mu in r%d.' % rev, wc_dir) # Mark r5 as merged into trunk, to create disparate revision ranges # which need to be merged. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], [' U ' + A_path + '\n']), [], 'merge', '-c5', '--record-only', @@ -3176,12 +2904,15 @@ def cherry_pick_text_conflict(sbox): expected_output = wc.State(A_path, { 'mu' : Item(status='C '), }) - expected_mergeinfo_output = wc.State(A_path, {}) + expected_mergeinfo_output = wc.State(A_path, { + '' : Item(status=' G') + }) expected_elision_output = wc.State(A_path, { }) expected_disk = wc.State('', { 'mu' : Item("This is the file 'mu'.\n" - + make_conflict_marker_text("r3\n" * 3, "r4\n" * 3, 4)), + + make_conflict_marker_text('', "r3\n" * 3 + "r4\n" * 3, 3, 4, + old_text='r3\n' * 3)), 'B' : Item(), 'B/lambda' : Item("This is the file 'lambda'.\n"), 'B/E' : Item(), @@ -3223,7 +2954,7 @@ def cherry_pick_text_conflict(sbox): }) expected_status.tweak(wc_rev=2) expected_skip = wc.State('', { }) - expected_error = "conflicts were produced while merging r3:4" + expected_error = ".*conflicts were produced while merging r3:4.*" svntest.actions.run_and_verify_merge(A_path, '3', '6', branch_A_url, None, expected_output, expected_mergeinfo_output, @@ -3232,13 +2963,10 @@ def cherry_pick_text_conflict(sbox): expected_status, expected_skip, expected_error, - svntest.tree.detect_conflict_files, + extra_files= ["mu\.working", "mu\.merge-right\.r4", - "mu\.merge-left\.r3"], - None, None, # no singleton handler - 0, # don't check props - 0) # not a dry_run + "mu\.merge-left\.r3"]) #---------------------------------------------------------------------- # Test for issue 2135 @@ -3251,7 +2979,7 @@ def merge_file_replace(sbox): # File scheduled for deletion rho_path = sbox.ospath('A/D/G/rho') - svntest.actions.run_and_verify_svn(None, None, [], 'rm', rho_path) + svntest.actions.run_and_verify_svn(None, [], 'rm', rho_path) expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/D/G/rho', status='D ') @@ -3266,11 +2994,10 @@ def merge_file_replace(sbox): # Commit rev 2 svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Create and add a new file. svntest.main.file_write(rho_path, "new rho\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', rho_path) + svntest.actions.run_and_verify_svn(None, [], 'add', rho_path) # Commit revsion 3 expected_status.add({ @@ -3283,8 +3010,7 @@ def merge_file_replace(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, - None, wc_dir) + None) # Update working copy expected_output = svntest.wc.State(wc_dir, {}) @@ -3327,9 +3053,7 @@ def merge_file_replace(sbox): expected_status.tweak('A/D/G/rho', status=' ', copied=None, wc_rev='4') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- # Test for issue 2522 @@ -3343,7 +3067,7 @@ def merge_file_replace_to_mixed_rev_wc(sbox): # File scheduled for deletion rho_path = sbox.ospath('A/D/G/rho') - svntest.actions.run_and_verify_svn(None, None, [], 'rm', rho_path) + svntest.actions.run_and_verify_svn(None, [], 'rm', rho_path) expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/D/G/rho', status='D ') @@ -3358,8 +3082,7 @@ def merge_file_replace_to_mixed_rev_wc(sbox): # Commit rev 2 svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Update working copy expected_disk = svntest.main.greek_state.copy() @@ -3374,7 +3097,7 @@ def merge_file_replace_to_mixed_rev_wc(sbox): # Create and add a new file. svntest.main.file_write(rho_path, "new rho\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', rho_path) + svntest.actions.run_and_verify_svn(None, [], 'add', rho_path) # Commit revsion 3 expected_status.add({ @@ -3391,8 +3114,7 @@ def merge_file_replace_to_mixed_rev_wc(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # merge changes from r3:1... # @@ -3404,9 +3126,9 @@ def merge_file_replace_to_mixed_rev_wc(sbox): # Normally we'd simply update the whole working copy, but since that would # defeat the purpose of this test (see the comment below), instead we'll # update only "." using --depth empty. This preserves the intent of the - # orginal mixed-rev test for this issue, but allows the merge tracking + # original mixed-rev test for this issue, but allows the merge tracking # logic to consider r3 as valid for reverse merging. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', '--depth', 'empty', wc_dir) expected_status.tweak('', wc_rev=3) expected_output = svntest.wc.State(wc_dir, { @@ -3429,7 +3151,7 @@ def merge_file_replace_to_mixed_rev_wc(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', wc_dir) @@ -3444,9 +3166,7 @@ def merge_file_replace_to_mixed_rev_wc(sbox): expected_status.tweak('A/D/G/rho', status=' ', copied=None, wc_rev='4') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) #---------------------------------------------------------------------- # use -x -w option for ignoring whitespace during merge @@ -3469,8 +3189,7 @@ def merge_ignore_whitespace(sbox): expected_output = svntest.wc.State(wc_dir, { 'iota' : Item(verb='Sending'), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, None) # change the file, mostly whitespace changes + an extra line svntest.main.file_write(file_path, "A a\nBb \n Cc\nNew line in iota\n") @@ -3479,12 +3198,10 @@ def merge_ignore_whitespace(sbox): expected_status.tweak(file_name, wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Backdate iota to revision 2, so we can merge in the rev 3 changes. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', '-r', '2', file_path) # Make some local whitespace changes, these should not conflict # with the remote whitespace changes as both will be ignored. @@ -3517,8 +3234,8 @@ def merge_ignore_whitespace(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 0, 0, '--allow-mixed-revisions', + [], False, False, + '--allow-mixed-revisions', '-x', '-w', wc_dir) #---------------------------------------------------------------------- @@ -3543,8 +3260,7 @@ def merge_ignore_eolstyle(sbox): expected_output = svntest.wc.State(wc_dir, { 'iota' : Item(verb='Sending'), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, None) # change the file, mostly eol changes + an extra line svntest.main.file_write(file_path, @@ -3558,12 +3274,10 @@ def merge_ignore_eolstyle(sbox): expected_status.tweak(file_name, wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Backdate iota to revision 2, so we can merge in the rev 3 changes. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', '-r', '2', file_path) # Make some local eol changes, these should not conflict # with the remote eol changes as both will be ignored. @@ -3600,8 +3314,8 @@ def merge_ignore_eolstyle(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 0, 0, '--allow-mixed-revisions', + [], False, False, + '--allow-mixed-revisions', '-x', '--ignore-eol-style', wc_dir) #---------------------------------------------------------------------- @@ -3630,7 +3344,7 @@ def merge_conflict_markers_matching_eol(sbox): # Checkout a second working copy wc_backup = sbox.add_wc_path('backup') - svntest.actions.run_and_verify_svn(None, None, [], 'checkout', + svntest.actions.run_and_verify_svn(None, [], 'checkout', sbox.repo_url, wc_backup) # set starting revision @@ -3663,8 +3377,7 @@ def merge_conflict_markers_matching_eol(sbox): # Commit the original change and note the 'base' revision number svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) cur_rev = cur_rev + 1 base_rev = cur_rev @@ -3696,6 +3409,7 @@ def merge_conflict_markers_matching_eol(sbox): 'A/mu' : Item(contents= "This is the file 'mu'." + eolchar + "<<<<<<< .working" + eolchar + "Conflicting appended text for mu" + eolchar + + "||||||| .merge-left.r" + str(cur_rev - 1) + eolchar + "=======" + eolchar + "Original appended text for mu" + eolchar + ">>>>>>> .merge-right.r" + str(cur_rev) + eolchar), @@ -3771,7 +3485,7 @@ def merge_eolstyle_handling(sbox): # Checkout a second working copy wc_backup = sbox.add_wc_path('backup') - svntest.actions.run_and_verify_svn(None, None, [], 'checkout', + svntest.actions.run_and_verify_svn(None, [], 'checkout', sbox.repo_url, wc_backup) path_backup = os.path.join(wc_backup, 'A', 'mu') @@ -3895,8 +3609,7 @@ def create_deep_trees(wc_dir): 'A/B/F/E/beta' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) svntest.main.run_svn(None, 'cp', A_B_F_E_path, A_B_F_E1_path) @@ -3910,11 +3623,10 @@ def create_deep_trees(wc_dir): 'A/B/F/E1/beta' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # Bring the entire WC up to date with rev 3. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) expected_status.tweak(wc_rev=3) # Copy B and commit, creating revision 4. @@ -3935,8 +3647,7 @@ def create_deep_trees(wc_dir): 'A/copy-of-B/lambda' : Item(status=' ', wc_rev=4), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) expected_disk = svntest.main.greek_state.copy() expected_disk.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta') @@ -3960,7 +3671,7 @@ def create_deep_trees(wc_dir): svntest.actions.verify_disk(wc_dir, expected_disk, True) # Bring the entire WC up to date with rev 4. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) svntest.actions.verify_disk(wc_dir, expected_disk, True) @@ -3994,11 +3705,10 @@ def avoid_repeated_merge_using_inherited_merge_info(sbox): }) expected_status.tweak('A/B/F/E/alpha', wc_rev=5) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # Bring the entire WC up to date with rev 5. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # Merge changes from rev 5 of B (to alpha) into copy_of_B. expected_output = wc.State(copy_of_B_path, { @@ -4041,11 +3751,7 @@ def avoid_repeated_merge_using_inherited_merge_info(sbox): expected_disk, expected_status, expected_skip, - None, - None, - None, - None, - None, 1) + check_props=True) # Commit the result of the merge, creating revision 6. expected_output = svntest.wc.State(copy_of_B_path, { @@ -4053,14 +3759,14 @@ def avoid_repeated_merge_using_inherited_merge_info(sbox): 'F/E/alpha' : Item(verb='Sending'), }) svntest.actions.run_and_verify_commit(copy_of_B_path, expected_output, - None, None, wc_dir) + None) # Update the WC to bring /A/copy_of_B/F from rev 4 to rev 6. # Without this update, a subsequent merge will not find any merge # info for /A/copy_of_B/F -- nor its parent dir in the repos -- at # rev 4. Mergeinfo wasn't introduced until rev 6. copy_of_B_F_E_path = os.path.join(copy_of_B_path, 'F', 'E') - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # Attempt to re-merge changes to alpha from rev 4. Use the merge # info inherited from the grandparent (copy-of-B) of our merge @@ -4071,7 +3777,6 @@ def avoid_repeated_merge_using_inherited_merge_info(sbox): 'beta' : Item(status=' ', wc_rev=6), }) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], [' U ' + copy_of_B_F_E_path + '\n', ' G ' + copy_of_B_F_E_path + '\n'], @@ -4118,7 +3823,7 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox): }) expected_status.tweak('A/B/F/E/alpha', wc_rev=5) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) for path_and_mergeinfo in (('E', '/A/B/F/E:5'), ('E1', '/A/B/F/E:5')): @@ -4152,11 +3857,7 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox): expected_disk, expected_status, expected_skip, - None, - None, - None, - None, - None, 1) + check_props=True) # Commit the result of the merge, creating new revision. expected_output = svntest.wc.State(path_name, { @@ -4164,7 +3865,7 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox): 'alpha' : Item(verb='Sending'), }) svntest.actions.run_and_verify_commit(path_name, - expected_output, None, None, wc_dir) + expected_output, None, [], wc_dir) # Edit A/B/F/E/alpha and commit it, creating revision 8. new_content_for_alpha = 'new content to alpha\none more line\n' @@ -4179,12 +3880,12 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox): 'beta' : Item(status=' ', wc_rev=4), }) svntest.actions.run_and_verify_commit(A_B_F_E_path, expected_output, - expected_status, None, wc_dir) + expected_status, [], wc_dir) # Update the WC to bring /A/copy_of_B to rev 8. # Without this update expected_status tree would be cumbersome to # understand. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # Merge changes from rev 4:8 of A/B into A/copy_of_B. A/copy_of_B/F/E1 # has explicit mergeinfo and exists at r4 in the merge source, so it @@ -4234,17 +3935,13 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox): expected_disk, expected_status, expected_skip, - None, - None, - None, - None, - None, 1) + check_props=True) # Test for part of Issue #2821, see # http://subversion.tigris.org/issues/show_bug.cgi?id=2821#desc22 # # Revert all local changes. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Make a text mod to A/copy-of-B/F/E/alpha newer_content_for_alpha = "Conflicting content" @@ -4292,11 +3989,7 @@ def avoid_repeated_merge_on_subtree_with_merge_info(sbox): expected_disk, expected_status, expected_skip, - None, - None, - None, - None, - None, 1) + check_props=True) #---------------------------------------------------------------------- def tweak_src_then_merge_to_dest(sbox, src_path, dst_path, @@ -4316,11 +4009,11 @@ def tweak_src_then_merge_to_dest(sbox, src_path, dst_path, { '': Item(wc_rev=new_rev, status=' ')}) svntest.actions.run_and_verify_commit(src_path, expected_output, - expected_status, None, src_path) + expected_status) # Update the WC to new_rev so that it would be easier to expect everyone # to be at new_rev. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # Merge new_rev of src_path to dst_path. @@ -4332,7 +4025,6 @@ def tweak_src_then_merge_to_dest(sbox, src_path, dst_path, merge_url = merge_url.replace('\\', '/') svntest.actions.run_and_verify_svn( - None, expected_merge_output([[new_rev]], ['U ' + dst_path + '\n', ' U ' + dst_path + '\n']), @@ -4380,7 +4072,7 @@ def obey_reporter_api_semantics_while_doing_subtree_merges(sbox): 'A/copy-of-D/gamma' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) cur_rev = 2 @@ -4403,8 +4095,7 @@ def obey_reporter_api_semantics_while_doing_subtree_merges(sbox): file_contents, cur_rev) copy_of_A_D_wc_rev = cur_rev - svntest.actions.run_and_verify_svn(None, - ['\n', + svntest.actions.run_and_verify_svn(['Committing transaction...\n', 'Committed revision ' + str(cur_rev+1) + '.\n'], [], @@ -4472,158 +4163,7 @@ def obey_reporter_api_semantics_while_doing_subtree_merges(sbox): expected_disk, expected_status, expected_skip, - None, - None, - None, - None, - None, 1) - -#---------------------------------------------------------------------- -def set_up_branch(sbox, branch_only = False, nbr_of_branches = 1): - '''Starting with standard greek tree, copy 'A' NBR_OF_BRANCHES times - to A_COPY, A_COPY_2, A_COPY_3, and so on. Then make four modifications - (setting file contents to "New content") under A: - r(2 + NBR_OF_BRANCHES) - A/D/H/psi - r(3 + NBR_OF_BRANCHES) - A/D/G/rho - r(4 + NBR_OF_BRANCHES) - A/B/E/beta - r(5 + NBR_OF_BRANCHES) - A/D/H/omega - Return (expected_disk, expected_status).''' - - # With the default parameters, the branching looks like this: - # - # A -1-----3-4-5-6-- - # \ - # A_COPY 2----------- - - wc_dir = sbox.wc_dir - - expected_status = svntest.actions.get_virginal_state(wc_dir, 1) - expected_disk = svntest.main.greek_state.copy() - - def copy_A(dest_name, rev): - expected = svntest.verify.UnorderedOutput( - ["A " + os.path.join(wc_dir, dest_name, "B") + "\n", - "A " + os.path.join(wc_dir, dest_name, "B", "lambda") + "\n", - "A " + os.path.join(wc_dir, dest_name, "B", "E") + "\n", - "A " + os.path.join(wc_dir, dest_name, "B", "E", "alpha") + "\n", - "A " + os.path.join(wc_dir, dest_name, "B", "E", "beta") + "\n", - "A " + os.path.join(wc_dir, dest_name, "B", "F") + "\n", - "A " + os.path.join(wc_dir, dest_name, "mu") + "\n", - "A " + os.path.join(wc_dir, dest_name, "C") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "gamma") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "G") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "G", "pi") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "G", "rho") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "G", "tau") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "H") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "H", "chi") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "H", "omega") + "\n", - "A " + os.path.join(wc_dir, dest_name, "D", "H", "psi") + "\n", - "Checked out revision " + str(rev - 1) + ".\n", - "A " + os.path.join(wc_dir, dest_name) + "\n"]) - expected_status.add({ - dest_name + "/B" : Item(status=' ', wc_rev=rev), - dest_name + "/B/lambda" : Item(status=' ', wc_rev=rev), - dest_name + "/B/E" : Item(status=' ', wc_rev=rev), - dest_name + "/B/E/alpha" : Item(status=' ', wc_rev=rev), - dest_name + "/B/E/beta" : Item(status=' ', wc_rev=rev), - dest_name + "/B/F" : Item(status=' ', wc_rev=rev), - dest_name + "/mu" : Item(status=' ', wc_rev=rev), - dest_name + "/C" : Item(status=' ', wc_rev=rev), - dest_name + "/D" : Item(status=' ', wc_rev=rev), - dest_name + "/D/gamma" : Item(status=' ', wc_rev=rev), - dest_name + "/D/G" : Item(status=' ', wc_rev=rev), - dest_name + "/D/G/pi" : Item(status=' ', wc_rev=rev), - dest_name + "/D/G/rho" : Item(status=' ', wc_rev=rev), - dest_name + "/D/G/tau" : Item(status=' ', wc_rev=rev), - dest_name + "/D/H" : Item(status=' ', wc_rev=rev), - dest_name + "/D/H/chi" : Item(status=' ', wc_rev=rev), - dest_name + "/D/H/omega" : Item(status=' ', wc_rev=rev), - dest_name + "/D/H/psi" : Item(status=' ', wc_rev=rev), - dest_name : Item(status=' ', wc_rev=rev)}) - expected_disk.add({ - dest_name : Item(), - dest_name + '/B' : Item(), - dest_name + '/B/lambda' : Item("This is the file 'lambda'.\n"), - dest_name + '/B/E' : Item(), - dest_name + '/B/E/alpha' : Item("This is the file 'alpha'.\n"), - dest_name + '/B/E/beta' : Item("This is the file 'beta'.\n"), - dest_name + '/B/F' : Item(), - dest_name + '/mu' : Item("This is the file 'mu'.\n"), - dest_name + '/C' : Item(), - dest_name + '/D' : Item(), - dest_name + '/D/gamma' : Item("This is the file 'gamma'.\n"), - dest_name + '/D/G' : Item(), - dest_name + '/D/G/pi' : Item("This is the file 'pi'.\n"), - dest_name + '/D/G/rho' : Item("This is the file 'rho'.\n"), - dest_name + '/D/G/tau' : Item("This is the file 'tau'.\n"), - dest_name + '/D/H' : Item(), - dest_name + '/D/H/chi' : Item("This is the file 'chi'.\n"), - dest_name + '/D/H/omega' : Item("This is the file 'omega'.\n"), - dest_name + '/D/H/psi' : Item("This is the file 'psi'.\n"), - }) - - # Make a branch A_COPY to merge into. - svntest.actions.run_and_verify_svn(None, expected, [], 'copy', - sbox.repo_url + "/A", - os.path.join(wc_dir, - dest_name)) - - expected_output = wc.State(wc_dir, {dest_name : Item(verb='Adding')}) - svntest.actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, - wc_dir) - for i in range(nbr_of_branches): - if i == 0: - copy_A('A_COPY', i + 2) - else: - copy_A('A_COPY_' + str(i + 1), i + 2) - - if branch_only: - return expected_disk, expected_status - - # Make some changes under A which we'll later merge under A_COPY: - - # r(nbr_of_branches + 2) - modify and commit A/D/H/psi - svntest.main.file_write(sbox.ospath('A/D/H/psi'), - "New content") - expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')}) - expected_status.tweak('A/D/H/psi', wc_rev=nbr_of_branches + 2) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) - expected_disk.tweak('A/D/H/psi', contents="New content") - - # r(nbr_of_branches + 3) - modify and commit A/D/G/rho - svntest.main.file_write(sbox.ospath('A/D/G/rho'), - "New content") - expected_output = wc.State(wc_dir, {'A/D/G/rho' : Item(verb='Sending')}) - expected_status.tweak('A/D/G/rho', wc_rev=nbr_of_branches + 3) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) - expected_disk.tweak('A/D/G/rho', contents="New content") - - # r(nbr_of_branches + 4) - modify and commit A/B/E/beta - svntest.main.file_write(sbox.ospath('A/B/E/beta'), - "New content") - expected_output = wc.State(wc_dir, {'A/B/E/beta' : Item(verb='Sending')}) - expected_status.tweak('A/B/E/beta', wc_rev=nbr_of_branches + 4) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) - expected_disk.tweak('A/B/E/beta', contents="New content") - - # r(nbr_of_branches + 5) - modify and commit A/D/H/omega - svntest.main.file_write(sbox.ospath('A/D/H/omega'), - "New content") - expected_output = wc.State(wc_dir, {'A/D/H/omega' : Item(verb='Sending')}) - expected_status.tweak('A/D/H/omega', wc_rev=nbr_of_branches + 5) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) - expected_disk.tweak('A/D/H/omega', contents="New content") - - return expected_disk, expected_status + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -4705,8 +4245,7 @@ def mergeinfo_inheritance(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge r4 again, this time into A_COPY/D/G. An ancestor directory # (A_COPY/D) exists with identical local mergeinfo, so the merge @@ -4740,8 +4279,7 @@ def mergeinfo_inheritance(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge r5 into A_COPY/B. Again, r1 should be inherited from # A_COPY (Issue #2733) @@ -4779,8 +4317,7 @@ def mergeinfo_inheritance(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge r5 again, this time into A_COPY/B/E/beta. An ancestor # directory (A_COPY/B) exists with identical local mergeinfo, so @@ -4791,7 +4328,7 @@ def mergeinfo_inheritance(sbox): # run_and_verify_merge doesn't support merging to a file WCPATH # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. - svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-c5', + svntest.actions.run_and_verify_svn([], [], 'merge', '-c5', sbox.repo_url + '/A/B/E/beta', beta_COPY_path) @@ -4866,8 +4403,7 @@ def mergeinfo_inheritance(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge r6 into A_COPY/D/H/omega, it should inherit it's nearest # ancestor's (A_COPY/D) mergeinfo (Issue #2733 with a file as the @@ -4877,7 +4413,6 @@ def mergeinfo_inheritance(sbox): # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[6]], ['U ' + omega_COPY_path + '\n', ' G ' + omega_COPY_path + '\n']), @@ -4886,8 +4421,7 @@ def mergeinfo_inheritance(sbox): omega_COPY_path) # Check that mergeinfo was properly set on A_COPY/D/H/omega - svntest.actions.run_and_verify_svn(None, - ["/A/D/H/omega:3-4,6\n"], + svntest.actions.run_and_verify_svn(["/A/D/H/omega:3-4,6\n"], [], 'propget', SVN_PROP_MERGEINFO, omega_COPY_path) @@ -4916,9 +4450,7 @@ def mergeinfo_inheritance(sbox): wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) # In single-db mode you can't create a disconnected working copy by just # copying a subdir @@ -4930,7 +4462,7 @@ def mergeinfo_inheritance(sbox): # ## Update the disconnected WC it so it will get the most recent mergeinfo ## from the repos when merging. - #svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], 'up', + #svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'up', # other_wc) # ## Merge r5:4 into the root of the disconnected WC. @@ -4968,8 +4500,7 @@ def mergeinfo_inheritance(sbox): # expected_disk, # expected_status, # expected_skip, - # None, None, None, None, - # None, 1) + # check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -5000,7 +4531,6 @@ def mergeinfo_elision(sbox): # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], ['U ' + beta_COPY_path + '\n', ' U ' + beta_COPY_path + '\n']), @@ -5014,7 +4544,7 @@ def mergeinfo_elision(sbox): }) svntest.actions.run_and_verify_status(beta_COPY_path, expected_status) - svntest.actions.run_and_verify_svn(None, ["/A/B/E/beta:5\n"], [], + svntest.actions.run_and_verify_svn(["/A/B/E/beta:5\n"], [], 'propget', SVN_PROP_MERGEINFO, beta_COPY_path) @@ -5025,12 +4555,10 @@ def mergeinfo_elision(sbox): wc_status.tweak('A_COPY/B/E/beta', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) # Update A_COPY to get all paths to the same working revision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'up', wc_dir) wc_status.tweak(wc_rev=7) @@ -5065,8 +4593,7 @@ def mergeinfo_elision(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge r3:6 into A_COPY. The merge doesn't touch either of A_COPY's # subtrees with explicit mergeinfo, so those are left alone. @@ -5130,8 +4657,7 @@ def mergeinfo_elision(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # New repeat the above merge but with the --record-only option. # This would result in identical mergeinfo # (r4-6) on A_COPY and two of its descendants, A_COPY/D/G and @@ -5165,8 +4691,8 @@ def mergeinfo_elision(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 1, '--record-only', + [], True, True, + '--record-only', A_COPY_path) # Reverse merge r5 out of A_COPY/B/E/beta. The mergeinfo on @@ -5178,7 +4704,6 @@ def mergeinfo_elision(sbox): # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-5]], ['U ' + beta_COPY_path + '\n', ' G ' + beta_COPY_path + '\n']), @@ -5192,7 +4717,7 @@ def mergeinfo_elision(sbox): }) svntest.actions.run_and_verify_status(beta_COPY_path, expected_status) - svntest.actions.run_and_verify_svn(None, ["/A/B/E/beta:4,6\n"], [], + svntest.actions.run_and_verify_svn(["/A/B/E/beta:4,6\n"], [], 'propget', SVN_PROP_MERGEINFO, beta_COPY_path) @@ -5202,7 +4727,6 @@ def mergeinfo_elision(sbox): # run_and_verify_merge doesn't support merging to a file WCPATH # so use run_and_verify_svn. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], ['G ' + beta_COPY_path + '\n', ' G ' + beta_COPY_path + '\n', # Update mergeinfo @@ -5219,7 +4743,7 @@ def mergeinfo_elision(sbox): svntest.actions.run_and_verify_status(beta_COPY_path, expected_status) # Once again A_COPY/B/E/beta has no mergeinfo. - svntest.actions.run_and_verify_svn(None, [], [], + svntest.actions.run_and_verify_svn([], '.*W200017: Property.*not found', 'propget', SVN_PROP_MERGEINFO, beta_COPY_path) @@ -5252,7 +4776,6 @@ def mergeinfo_inheritance_and_discontinuous_ranges(sbox): os.chdir(A_COPY_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[4]], ['U ' + os.path.join("D", "G", "rho") + '\n', ' U .\n']), @@ -5263,7 +4786,7 @@ def mergeinfo_inheritance_and_discontinuous_ranges(sbox): expected_status.tweak("A_COPY", status=' M') expected_status.tweak("A_COPY/D/G/rho", status='M ') svntest.actions.run_and_verify_status(wc_dir, expected_status) - svntest.actions.run_and_verify_svn(None, ["/A:4\n"], [], + svntest.actions.run_and_verify_svn(["/A:4\n"], [], 'propget', SVN_PROP_MERGEINFO, A_COPY_path) @@ -5315,15 +4838,13 @@ def mergeinfo_inheritance_and_discontinuous_ranges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Wipe the memory of a portion of the previous merge... ### It'd be nice to use 'merge --record-only' here, but we can't (yet) ### wipe all ranges for a file due to the bug pointed out in r864719. mu_copy_path = os.path.join(A_COPY_path, 'mu') - svntest.actions.run_and_verify_svn(None, - ["property '" + SVN_PROP_MERGEINFO + svntest.actions.run_and_verify_svn(["property '" + SVN_PROP_MERGEINFO + "' set on '" + mu_copy_path + "'\n"], [], 'propset', SVN_PROP_MERGEINFO, '', mu_copy_path) @@ -5334,11 +4855,11 @@ def mergeinfo_inheritance_and_discontinuous_ranges(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, None, - None, + [], mu_copy_path) # ...and that the presence of the property is retained, even when # the value has been wiped. - svntest.actions.run_and_verify_svn(None, ['\n'], [], 'propget', + svntest.actions.run_and_verify_svn(['\n'], [], 'propget', SVN_PROP_MERGEINFO, mu_copy_path) #---------------------------------------------------------------------- @@ -5359,7 +4880,7 @@ def merge_to_target_with_copied_children(sbox): rho_COPY_COPY_path = sbox.ospath('A_COPY/D/G/rho_copy') # URL to URL copy A_COPY/D/G/rho to A_COPY/D/G/rho_copy - svntest.actions.run_and_verify_svn(None, None, [], 'copy', + svntest.actions.run_and_verify_svn(None, [], 'copy', sbox.repo_url + '/A_COPY/D/G/rho', sbox.repo_url + '/A_COPY/D/G/rho_copy', '-m', 'copy') @@ -5376,12 +4897,10 @@ def merge_to_target_with_copied_children(sbox): expected_output, expected_disk, expected_status, - None, None, None, - None, None, 1) + check_props=True) # Merge r4 into A_COPY/D/G/rho_copy. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[4]], ['U ' + rho_COPY_COPY_path + '\n', ' U ' + rho_COPY_COPY_path + '\n']), @@ -5422,8 +4941,7 @@ def merge_to_target_with_copied_children(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -5454,7 +4972,7 @@ def merge_to_switched_path(sbox): "A " + G_COPY_path + "\n"]) # r7 - Copy A/D/G to A/D/G_COPY and commit. - svntest.actions.run_and_verify_svn(None, expected, [], 'copy', + svntest.actions.run_and_verify_svn(expected, [], 'copy', sbox.repo_url + "/A/D/G", G_COPY_path) @@ -5466,16 +4984,14 @@ def merge_to_switched_path(sbox): "A/D/G_COPY/tau" : Item(status=' ', wc_rev=7), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # r8 - modify and commit A/D/G_COPY/rho svntest.main.file_write(sbox.ospath('A/D/G_COPY/rho'), "New *and* improved rho content") expected_output = wc.State(wc_dir, {'A/D/G_COPY/rho' : Item(verb='Sending')}) wc_status.tweak('A/D/G_COPY/rho', wc_rev=8) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Switch A_COPY/D/G to A/D/G. wc_disk.add({ @@ -5496,17 +5012,16 @@ def merge_to_switched_path(sbox): svntest.actions.run_and_verify_switch(sbox.wc_dir, A_COPY_D_G_path, sbox.repo_url + "/A/D/G", expected_output, wc_disk, wc_status, - None, None, None, None, None, 1) + [], 1) # Update working copy to allow elision (if any). - 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) # Set some mergeinfo on a working copy parent of our switched subtree # A_COPY/D/G. Because the subtree is switched it should *not* inherit # this mergeinfo. - svntest.actions.run_and_verify_svn(None, - ["property '" + SVN_PROP_MERGEINFO + + svntest.actions.run_and_verify_svn(["property '" + SVN_PROP_MERGEINFO + "' set on '" + A_COPY_path + "'" + "\n"], [], 'ps', SVN_PROP_MERGEINFO, '/A:4', A_COPY_path) @@ -5546,7 +5061,7 @@ def merge_to_switched_path(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Check that the mergeinfo set on a switched target can elide to the # repository. @@ -5562,19 +5077,16 @@ def merge_to_switched_path(sbox): # but as it is switched this empty mergeinfo just elides to the # repository (empty mergeinfo on a path can elide if that path doesn't # inherit *any* mergeinfo). - svntest.actions.run_and_verify_svn(None, - ["Reverted '" + A_COPY_path+ "'\n", + svntest.actions.run_and_verify_svn(["Reverted '" + A_COPY_path+ "'\n", "Reverted '" + A_COPY_D_G_path+ "'\n", "Reverted '" + A_COPY_D_G_rho_path + "'\n"], [], 'revert', '-R', wc_dir) - svntest.actions.run_and_verify_svn(None, - ["property '" + SVN_PROP_MERGEINFO + + svntest.actions.run_and_verify_svn(["property '" + SVN_PROP_MERGEINFO + "' set on '" + A_COPY_D_path+ "'" + "\n"], [], 'ps', SVN_PROP_MERGEINFO, '/A/D:4', A_COPY_D_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-4]], ['U ' + A_COPY_D_G_rho_path + '\n', ' U ' + A_COPY_D_G_path + '\n'], @@ -5646,7 +5158,7 @@ def merge_to_path_with_switched_children(sbox): A_COPY_gamma_path = sbox.ospath('A_COPY/D/gamma') H_COPY_2_path = sbox.ospath('A_COPY_2/D/H') - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(8), [], 'up', wc_dir) wc_status.tweak(wc_rev=8) @@ -5658,7 +5170,7 @@ def merge_to_path_with_switched_children(sbox): svntest.actions.run_and_verify_switch(sbox.wc_dir, A_COPY_G_path, sbox.repo_url + "/A_COPY_2/D/G", expected_output, wc_disk, wc_status, - None, None, None, None, None, 1) + [], 1) # Switch A_COPY/D/G/rho to A_COPY_3/D/G/rho. wc_status.tweak("A_COPY/D/G/rho", switched='S') @@ -5666,7 +5178,7 @@ def merge_to_path_with_switched_children(sbox): svntest.actions.run_and_verify_switch(sbox.wc_dir, A_COPY_rho_path, sbox.repo_url + "/A_COPY_3/D/G/rho", expected_output, wc_disk, wc_status, - None, None, None, None, None, 1) + [], 1) # Switch A_COPY/D/H/psi to A_COPY_2/D/H/psi. wc_status.tweak("A_COPY/D/H/psi", switched='S') @@ -5674,7 +5186,7 @@ def merge_to_path_with_switched_children(sbox): svntest.actions.run_and_verify_switch(sbox.wc_dir, A_COPY_psi_path, sbox.repo_url + "/A_COPY_2/D/H/psi", expected_output, wc_disk, wc_status, - None, None, None, None, None, 1) + [], 1) # Target with switched file child: # @@ -5721,7 +5233,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Target with switched dir child: # @@ -5772,7 +5284,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk_D, expected_status_D, expected_skip_D, - None, None, None, None, None, 1) + check_props=True) # Merge r5 from A/D into A_COPY/D. This updates the mergeinfo on the @@ -5801,7 +5313,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk_D, expected_status_D, expected_skip_D, - None, None, None, None, None, 1) + check_props=True) # Finally, merge r4:8 into A_COPY. A_COPY gets mergeinfo for r5-8 added but # since none of A_COPY's subtrees with mergeinfo are affected, none of them @@ -5866,7 +5378,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Commit changes thus far. expected_output = svntest.wc.State(wc_dir, { 'A_COPY' : Item(verb='Sending'), @@ -5881,8 +5393,7 @@ def merge_to_path_with_switched_children(sbox): wc_status.tweak('A_COPY', 'A_COPY/B/E/beta', 'A_COPY/D', 'A_COPY/D/G', 'A_COPY/D/G/rho', 'A_COPY/D/H', 'A_COPY/D/H/omega', 'A_COPY/D/H/psi', wc_rev=9) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Unswitch A_COPY/D/H/psi. expected_output = svntest.wc.State(wc_dir, { @@ -5907,7 +5418,7 @@ def merge_to_path_with_switched_children(sbox): svntest.actions.run_and_verify_switch(sbox.wc_dir, A_COPY_psi_path, sbox.repo_url + "/A_COPY/D/H/psi", expected_output, wc_disk, wc_status, - None, None, None, None, None, 1) + [], 1) # Non-inheritable mergeinfo ranges on a target don't prevent repeat # merges of that range on the target's children. @@ -5952,7 +5463,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', A_COPY_H_path) @@ -5963,8 +5474,7 @@ def merge_to_path_with_switched_children(sbox): # A_COPY/D has a switched child it gets r10 added as a non-inheritable # range. Repeat the same merge checking that no repeat merge is # attempted on A_COPY/D. - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + D_path + "'\n"], [], 'ps', 'prop:name', 'propval', D_path) expected_output = svntest.wc.State(wc_dir, { @@ -5974,8 +5484,7 @@ def merge_to_path_with_switched_children(sbox): }) wc_status.tweak('A_COPY/D', wc_rev=9) wc_status.tweak('A/D', 'A_COPY/D/H', 'A_COPY/D/H/psi', wc_rev=10) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) expected_output = wc.State(A_COPY_D_path, { '' : Item(status=' U') }) @@ -6004,7 +5513,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk_D, expected_status_D, expected_skip_D, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', A_COPY_D_path) # Repeated merge is a no-op, though we still see the notification reporting @@ -6021,7 +5530,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk_D, expected_status_D, expected_skip_D, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', A_COPY_D_path) @@ -6036,11 +5545,11 @@ def merge_to_path_with_switched_children(sbox): # Revert all local changes. This leaves just the mergeinfo for r5-8 # on A_COPY and its various subtrees. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Update merge target so working revisions are uniform and all # possible elision occurs. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(10), [], 'up', A_COPY_path) # Do the reverse merge. @@ -6113,7 +5622,7 @@ def merge_to_path_with_switched_children(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue 2047: Merge from parent dir fails while it succeeds from @@ -6139,16 +5648,16 @@ def merge_with_implicit_target_file(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Update to revision 2. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # Revert the change committed in r2 os.chdir(wc_dir) # run_and_verify_merge doesn't accept file paths. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-r', '2:1', + svntest.actions.run_and_verify_svn(None, [], 'merge', '-r', '2:1', 'A/mu') #---------------------------------------------------------------------- @@ -6173,7 +5682,7 @@ def empty_mergeinfo(sbox): # B) Empty mergeinfo elides to empty mergeinfo. # # C) If a merge sets empty mergeinfo on its target and that target has - # no ancestor in either the WC or the repository with explict + # no ancestor in either the WC or the repository with explicit # mergeinfo, then the target's mergeinfo is removed (a.k.a. elides # to nothing). sbox.build() @@ -6249,8 +5758,7 @@ def empty_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Now do the reverse merge into the subtree. expected_output = wc.State(H_COPY_path, { 'psi' : Item(status='G '), @@ -6281,8 +5789,7 @@ def empty_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Test areas B and C -- Reverse merge r3 into A_COPY, this would result in # empty mergeinfo on A_COPY and A_COPY/D/H, but the empty mergeinfo on the @@ -6296,13 +5803,14 @@ def empty_mergeinfo(sbox): ' U ' + H_COPY_path + '\n', ' U ' + A_COPY_path + '\n',], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-r4:2', sbox.repo_url + '/A', A_COPY_path) svntest.actions.run_and_verify_status(wc_dir, wc_status) # Check that A_COPY's mergeinfo is gone. - svntest.actions.run_and_verify_svn(None, [], [], 'pg', 'svn:mergeinfo', + svntest.actions.run_and_verify_svn([], '.*W200017: Property.*not found', + 'pg', 'svn:mergeinfo', A_COPY_path) #---------------------------------------------------------------------- @@ -6324,8 +5832,7 @@ def prop_add_to_child_with_mergeinfo(sbox): B_COPY_path = sbox.ospath('A_COPY/B') # Set a non-mergeinfo prop on a file. - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + beta_path + "'\n"], [], 'ps', 'prop:name', 'propval', beta_path) expected_disk.tweak('A/B/E/beta', props={'prop:name' : 'propval'}) @@ -6334,13 +5841,10 @@ def prop_add_to_child_with_mergeinfo(sbox): {'A/B/E/beta' : Item(verb='Sending')}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Merge r4:5 from A/B/E/beta into A_COPY/B/E/beta. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], ['U ' + beta_COPY_path +'\n', ' U ' + beta_COPY_path +'\n',]), @@ -6386,8 +5890,7 @@ def prop_add_to_child_with_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @Issue(2788,3383) @@ -6411,8 +5914,7 @@ def foreign_repos_does_not_update_mergeinfo(sbox): # Merge r3:4 (using implied peg revisions) from 'other' repos into # A_COPY/D/G. Merge should succeed, but no mergeinfo should be set. G_COPY_path = sbox.ospath('A_COPY/D/G') - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[4]], + svntest.actions.run_and_verify_svn(expected_merge_output([[4]], 'U ' + os.path.join(G_COPY_path, "rho") + '\n', True), @@ -6423,8 +5925,7 @@ def foreign_repos_does_not_update_mergeinfo(sbox): # Merge r4:5 (using explicit peg revisions) from 'other' repos into # A_COPY/B/E. Merge should succeed, but no mergeinfo should be set. E_COPY_path = sbox.ospath('A_COPY/B/E') - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[5]], + svntest.actions.run_and_verify_svn(expected_merge_output([[5]], 'U ' + os.path.join(E_COPY_path, "beta") +'\n', True), @@ -6437,10 +5938,10 @@ def foreign_repos_does_not_update_mergeinfo(sbox): svntest.actions.run_and_verify_status(wc_dir, expected_status) # Set up for test of issue #3383. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Get a working copy for the foreign repos. - svntest.actions.run_and_verify_svn(None, None, [], 'co', other_repo_url, + svntest.actions.run_and_verify_svn(None, [], 'co', other_repo_url, other_wc_dir) # Create mergeinfo on the foreign repos on an existing directory and @@ -6449,13 +5950,13 @@ def foreign_repos_does_not_update_mergeinfo(sbox): # simple merges to *death* elsewhere. # Create mergeinfo on an existing directory. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', other_repo_url + '/A', os.path.join(other_wc_dir, 'A_COPY'), '-c5') # Create mergeinfo on an existing file. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', other_repo_url + '/A/D/H/psi', os.path.join(other_wc_dir, 'A_COPY', 'D', 'H', 'psi'), @@ -6463,15 +5964,15 @@ def foreign_repos_does_not_update_mergeinfo(sbox): # Add a new directory with mergeinfo in the foreign repos. new_dir = os.path.join(other_wc_dir, 'A_COPY', 'N') - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', new_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'ps', + svntest.actions.run_and_verify_svn(None, [], 'mkdir', new_dir) + svntest.actions.run_and_verify_svn(None, [], 'ps', SVN_PROP_MERGEINFO, '', new_dir) # Add a new file with mergeinfo in the foreign repos. new_file = os.path.join(other_wc_dir, 'A_COPY', 'nu') svntest.main.file_write(new_file, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', new_file) - svntest.actions.run_and_verify_svn(None, None, [], 'ps', + svntest.actions.run_and_verify_svn(None, [], 'add', new_file) + svntest.actions.run_and_verify_svn(None, [], 'ps', SVN_PROP_MERGEINFO, '', new_file) expected_output = wc.State(other_wc_dir,{ @@ -6482,19 +5983,19 @@ def foreign_repos_does_not_update_mergeinfo(sbox): 'A_COPY/nu' : Item(verb='Adding'), # Has empty mergeinfo }) svntest.actions.run_and_verify_commit(other_wc_dir, expected_output, - None, None, other_wc_dir, + None, [], other_wc_dir, '-m', 'create mergeinfo on foreign repos') # Now merge a diff from the foreign repos that contains the mergeinfo # addition in r7 to A_COPY. The mergeinfo diff should *not* be applied # to A_COPY since it refers to a foreign repository... - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', other_repo_url + '/A@1', other_repo_url + '/A_COPY@7', sbox.ospath('A_COPY')) #...which means there should be no mergeinfo anywhere in WC_DIR, since # this test never created any. - svntest.actions.run_and_verify_svn(None, [], [], 'pg', + svntest.actions.run_and_verify_svn([], [], 'pg', SVN_PROP_MERGEINFO, '-vR', wc_dir) @@ -6505,7 +6006,18 @@ def foreign_repos_does_not_update_mergeinfo(sbox): def avoid_reflected_revs(sbox): "avoid repeated merges for cyclic merging" - ## See http://subversion.tigris.org/issues/show_bug.cgi?id=2897. ## + # See <http://subversion.tigris.org/issues/show_bug.cgi?id=2897>. + # + # This test cherry-picks some changes (all of them, in fact) from the + # parent branch 'A' to the child branch 'A_COPY', and then tries to + # reintegrate 'A_COPY' to 'A' (explicitly specifying a revision range + # on the source branch). It expects the changes that are unique to the + # branch 'A_COPY' to be merged to 'A'. + # + # A --1----[3]---[5]----------? + # \ \_____\___ / + # \ \ \ / + # A_COPY 2-[---4-----6--7--8]- # Create a WC with a single branch sbox.build() @@ -6529,27 +6041,27 @@ def avoid_reflected_revs(sbox): # We'll consider A as the trunk and A_COPY as the feature branch # r3 - Create a tfile1 in A svntest.main.file_write(tfile1_path, tfile1_content) - svntest.actions.run_and_verify_svn(None, None, [], 'add', tfile1_path) + svntest.actions.run_and_verify_svn(None, [], 'add', tfile1_path) expected_output = wc.State(wc_dir, {'A/tfile1' : Item(verb='Adding')}) wc_status.add({'A/tfile1' : Item(status=' ', wc_rev=3)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r4 - Create a bfile1 in A_COPY svntest.main.file_write(bfile1_path, bfile1_content) - svntest.actions.run_and_verify_svn(None, None, [], 'add', bfile1_path) + svntest.actions.run_and_verify_svn(None, [], 'add', bfile1_path) expected_output = wc.State(wc_dir, {'A_COPY/bfile1' : Item(verb='Adding')}) wc_status.add({'A_COPY/bfile1' : Item(status=' ', wc_rev=4)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r5 - Create one more file in A svntest.main.file_write(tfile2_path, tfile2_content) - svntest.actions.run_and_verify_svn(None, None, [], 'add', tfile2_path) + svntest.actions.run_and_verify_svn(None, [], 'add', tfile2_path) expected_output = wc.State(wc_dir, {'A/tfile2' : Item(verb='Adding')}) wc_status.add({'A/tfile2' : Item(status=' ', wc_rev=5)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Merge r5 from /A to /A_COPY, creating r6 expected_output = wc.State(A_COPY_path, { @@ -6616,17 +6128,17 @@ def avoid_reflected_revs(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, - None, A_COPY_path, + [], True, False, + A_COPY_path, '--allow-mixed-revisions') - 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(wc_dir, { 'A_COPY' : Item(verb='Sending'), 'A_COPY/tfile2' : Item(verb='Adding'), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, None, wc_dir) + None) # Merge r3 from /A to /A_COPY, creating r7 expected_output = wc.State(A_COPY_path, { @@ -6656,21 +6168,21 @@ def avoid_reflected_revs(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, - None, A_COPY_path, + [], True, False, + A_COPY_path, '--allow-mixed-revisions') - 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(wc_dir, { 'A_COPY' : Item(verb='Sending'), 'A_COPY/tfile1' : Item(verb='Adding'), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, None, wc_dir) + None) # r8 - Add bfile2 to A_COPY svntest.main.file_write(bfile2_path, bfile2_content) - svntest.actions.run_and_verify_svn(None, None, [], 'add', bfile2_path) + svntest.actions.run_and_verify_svn(None, [], 'add', bfile2_path) expected_output = wc.State(wc_dir, {'A_COPY/bfile2' : Item(verb='Adding')}) wc_status.tweak(wc_rev=6) wc_status.add({ @@ -6680,7 +6192,7 @@ def avoid_reflected_revs(sbox): 'A_COPY/tfile1' : Item(status=' ', wc_rev=7), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Merge 2:8 from A_COPY(feature branch) to A(trunk). expected_output = wc.State(A_path, { @@ -6753,7 +6265,7 @@ def avoid_reflected_revs(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -6772,10 +6284,12 @@ def update_loses_mergeinfo(sbox): A_B_url = sbox.repo_url + '/A/B' A_B_J_url = sbox.repo_url + '/A/B/J' A_B_K_url = sbox.repo_url + '/A/B/K' - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 2.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 2.\n'], [], 'mkdir', '-m', 'rev 2', A_B_J_url) - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 3.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 3.\n'], [], 'mkdir', '-m', 'rev 3', A_B_K_url) @@ -6819,9 +6333,7 @@ def update_loses_mergeinfo(sbox): ) svntest.actions.run_and_verify_commit(A_C_wc_dir, expected_output, - expected_status, - None, - A_C_wc_dir) + expected_status) other_A_C_wc_dir = os.path.join(other_wc, 'A', 'C') expected_output = wc.State(other_A_C_wc_dir, {'K' : Item(status='A ')}) @@ -6871,7 +6383,7 @@ def update_loses_mergeinfo(sbox): expected_output, expected_disk, expected_status, - check_props=1) + check_props=True) #---------------------------------------------------------------------- # Tests part of issue# 2829. @@ -6892,10 +6404,12 @@ def merge_loses_mergeinfo(sbox): A_B_url = sbox.repo_url + '/A/B' A_B_J_url = sbox.repo_url + '/A/B/J' A_B_K_url = sbox.repo_url + '/A/B/K' - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 2.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 2.\n'], [], 'mkdir', '-m', 'rev 2', A_B_J_url) - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 3.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 3.\n'], [], 'mkdir', '-m', 'rev 3', A_B_K_url) @@ -6936,9 +6450,7 @@ def merge_loses_mergeinfo(sbox): ) svntest.actions.run_and_verify_commit(A_C_wc_dir, expected_output, - expected_status, - None, - A_C_wc_dir) + expected_status) expected_output = wc.State(A_C_wc_dir, {'J' : Item(status='D ')}) expected_elision_output = wc.State(A_C_wc_dir, { '' : Item(status=' U'), @@ -7012,12 +6524,10 @@ def single_file_replace_style_merge_capability(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Merge the file mu alone to rev1 - svntest.actions.run_and_verify_svn(None, - expected_merge_output(None, + svntest.actions.run_and_verify_svn(expected_merge_output(None, ['R ' + mu_path + '\n']), [], 'merge', @@ -7074,7 +6584,7 @@ def merge_to_out_of_date_target(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Commit merge to first WC. wc_status.tweak('A_COPY/D/H/psi', 'A_COPY/D/H', wc_rev=7) @@ -7084,8 +6594,7 @@ def merge_to_out_of_date_target(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, wc_dir) + wc_status) # Merge -c6 into A_COPY/D/H of other WC. expected_output = wc.State(other_A_COPY_H_path, { @@ -7116,7 +6625,7 @@ def merge_to_out_of_date_target(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=1) # Update A_COPY/D/H in other WC. Local mergeinfo for r6 on A_COPY/D/H # should be *merged* with r3 from first WC. @@ -7140,7 +6649,7 @@ def merge_to_out_of_date_target(sbox): expected_output, other_disk, other_status, - check_props=1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -7159,7 +6668,7 @@ def merge_with_depth_files(sbox): Acopy_url = sbox.repo_url + '/A_copy' # Copy A_url to A_copy_url - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', A_url, Acopy_url, '-m', 'create a new copy of A') @@ -7182,12 +6691,10 @@ def merge_with_depth_files(sbox): # Commit the modified contents svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Update working copy - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', Acopy_path) # Merge r1:3 into A_copy with --depth files. The merge only affects @@ -7255,7 +6762,7 @@ def merge_with_depth_files(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--depth', 'files', Acopy_path) #---------------------------------------------------------------------- @@ -7292,18 +6799,17 @@ def merge_away_subtrees_noninheritable_ranges(sbox): nu_COPY_path = sbox.ospath('A_COPY/nu') # Make a change to directory A/D/H and commit as r8. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'update', wc_dir) svntest.actions.run_and_verify_svn( - None, ["property 'prop:name' set on '" + H_path + "'\n"], [], + ["property 'prop:name' set on '" + H_path + "'\n"], [], 'ps', 'prop:name', 'propval', H_path) expected_output = svntest.wc.State(wc_dir, { 'A/D/H' : Item(verb='Sending'),}) wc_status.tweak(wc_rev=7) wc_status.tweak('A/D/H', wc_rev=8) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Merge r6:8 --depth immediates to A_COPY/D. This should merge the # prop change from r8 to A_COPY/H but not the change to A_COPY/D/H/omega @@ -7352,7 +6858,7 @@ def merge_away_subtrees_noninheritable_ranges(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--depth', 'immediates', D_COPY_path) # Repeat the previous merge but at default depth of infinity. The change @@ -7384,36 +6890,35 @@ def merge_away_subtrees_noninheritable_ranges(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) # Now test the problem described in # http://svn.haxx.se/dev/archive-2008-12/0133.shtml. # # First revert all local mods. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # r9: Merge all available revisions from A to A_COPY at a depth of empty # this will create non-inheritable mergeinfo on A_COPY. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) wc_status.tweak(wc_rev=8) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '--depth', 'empty', sbox.repo_url + '/A', A_COPY_path) wc_status.tweak('A_COPY', wc_rev=9) expected_output = wc.State(wc_dir, {'A_COPY' : Item(verb='Sending')}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # r10: Add the file A/nu. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) expected_output = wc.State(wc_dir, {'A/nu' : Item(verb='Adding')}) wc_status.add({'A/nu' : Item(status=' ', wc_rev=10)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Now merge -c10 from A to A_COPY. - 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('', { 'nu': Item(status='A '), }) @@ -7481,8 +6986,7 @@ def merge_away_subtrees_noninheritable_ranges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) os.chdir(saved_cwd) # If a merge target has inheritable and non-inheritable ranges and has a @@ -7492,21 +6996,20 @@ def merge_away_subtrees_noninheritable_ranges(sbox): # *and* the mergeinfo inherited from it's parent. # # First revert all local changes and remove A_COPY/C/nu from disk. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Make a text change to A_COPY_2/mu in r11 and then merge that # change to A/mu in r12. This will create mergeinfo of '/A_COPY_2/mu:11' # on A/mu. svntest.main.file_write(mu_2_path, 'new content') - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'log msg', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'log msg', wc_dir) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[11]], ['U ' + mu_path + '\n', ' U ' + mu_path + '\n']), [], 'merge', '-c11', sbox.repo_url + '/A_COPY_2/mu', mu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'log msg', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'log msg', wc_dir) # Now merge r12 from A to A_COPY. A_COPY/mu should get the mergeinfo from @@ -7579,16 +7082,14 @@ def merge_away_subtrees_noninheritable_ranges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, - False) # No dry-run. + [], True, False) os.chdir(saved_cwd) # Test for issue #3392 # # Revert local changes and update. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Merge r8 from A/D/H to A_COPY_D/H at depth empty. Since r8 affects only # A_COPY/D/H itself, the resulting mergeinfo is inheritable. Commit this @@ -7622,11 +7123,11 @@ def merge_away_subtrees_noninheritable_ranges(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--depth', 'empty', H_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', '-m', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'log msg', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Now reverse the prior merge. Issue #3392 manifests itself here with # a mergeinfo parsing error: # >svn merge %url%/A/D/H merge_tests-62\A_COPY_2\D\H -c-8 @@ -7651,29 +7152,27 @@ def merge_away_subtrees_noninheritable_ranges(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Test issue #3407 'Shallow merges incorrectly set mergeinfo on children'. # # Revert all local mods. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Merge all available changes from A to A_COPY at --depth empty. Only the # mergeinfo on A_COPY should be affected. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[9,13]], [' U ' + A_COPY_path + '\n']), [], 'merge', '--depth', 'empty', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, - [A_COPY_path + ' - /A:2-13*\n'], + svntest.actions.run_and_verify_svn([A_COPY_path + ' - /A:2-13*\n'], [], 'pg', SVN_PROP_MERGEINFO, '-R', A_COPY_path) # Merge all available changes from A to A_COPY at --depth files. Only the # mergeinfo on A_COPY and its file children should be affected. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Revisions 2-13 are already merged to A_COPY and now they will be merged # to A_COPY's file children. Due to the way we drive the merge editor # r2-3, which are inoperative on A_COPY's file children, do not show up @@ -7687,15 +7186,14 @@ def merge_away_subtrees_noninheritable_ranges(sbox): ' U %s\n' % (A_COPY_path), ' G %s\n' % (mu_COPY_path), ' U %s\n' % (nu_COPY_path),]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '--depth', 'files', sbox.repo_url + '/A', A_COPY_path) expected_output = svntest.verify.UnorderedOutput( [A_COPY_path + ' - /A:2-13*\n', mu_COPY_path + ' - /A/mu:2-13\n', nu_COPY_path + ' - /A/nu:10-13\n',]) - svntest.actions.run_and_verify_svn(None, - expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'pg', SVN_PROP_MERGEINFO, '-R', A_COPY_path) @@ -7729,14 +7227,13 @@ def merge_to_sparse_directories(sbox): expected_output = wc.State(wc_dir, {'A/mu' : Item(verb='Sending')}) wc_status.tweak('A/mu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) wc_disk.tweak('A/mu', contents="New content") # r8 - Add a prop to A/D and commit. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + D_path + "'\n"], [], 'ps', 'prop:name', 'propval', D_path) expected_output = svntest.wc.State(wc_dir, { @@ -7744,14 +7241,12 @@ def merge_to_sparse_directories(sbox): }) wc_status.tweak(wc_rev=7) wc_status.tweak('A/D', wc_rev=8) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # r9 - Add a prop to A and commit. - 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) - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + A_path + "'\n"], [], 'ps', 'prop:name', 'propval', A_path) expected_output = svntest.wc.State(wc_dir, { @@ -7759,8 +7254,7 @@ def merge_to_sparse_directories(sbox): }) wc_status.tweak(wc_rev=8) wc_status.tweak('A', wc_rev=9) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Do an --immediates checkout of A_COPY immediates_dir = sbox.add_wc_path('immediates') @@ -7779,7 +7273,7 @@ def merge_to_sparse_directories(sbox): svntest.actions.run_and_verify_checkout(sbox.repo_url + "/A_COPY", immediates_dir, expected_output, expected_disk, - None, None, None, None, + [], "--depth", "immediates") # Merge r4:9 into the immediates WC. @@ -7836,8 +7330,7 @@ def merge_to_sparse_directories(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Do a --files checkout of A_COPY files_dir = sbox.add_wc_path('files') @@ -7850,7 +7343,7 @@ def merge_to_sparse_directories(sbox): svntest.actions.run_and_verify_checkout(sbox.repo_url + "/A_COPY", files_dir, expected_output, expected_disk, - None, None, None, None, + [], "--depth", "files") # Merge r4:9 into the files WC. @@ -7893,8 +7386,7 @@ def merge_to_sparse_directories(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Do an --empty checkout of A_COPY empty_dir = sbox.add_wc_path('empty') @@ -7903,7 +7395,7 @@ def merge_to_sparse_directories(sbox): svntest.actions.run_and_verify_checkout(sbox.repo_url + "/A_COPY", empty_dir, expected_output, expected_disk, - None, None, None, None, + [], "--depth", "empty") # Merge r4:9 into the empty WC. @@ -7940,16 +7432,15 @@ def merge_to_sparse_directories(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Check that default depth for merge is infinity. # # Revert the previous changes to the immediates WC and update one # child in that WC to depth infinity. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', immediates_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', '--set-depth', + svntest.actions.run_and_verify_svn(None, [], 'up', '--set-depth', 'infinity', os.path.join(immediates_dir, 'D')) # Now merge r6 into the immediates WC, even though the root of the @@ -8004,8 +7495,7 @@ def merge_to_sparse_directories(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -8032,16 +7522,16 @@ def merge_old_and_new_revs_from_renamed_dir(sbox): svntest.main.file_write(mu_path, "This is the file 'mu' modified.\n") expected_output = wc.State(wc_dir, {'A/mu' : Item(verb='Sending')}) wc_status.add({'A/mu' : Item(status=' ', wc_rev=3)}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Move A to A_MOVED - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 4.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 4.\n'], [], 'mv', '-m', 'mv A to A_MOVED', A_url, A_MOVED_url) # Update the working copy to get A_MOVED - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Make a modification to A_MOVED/mu svntest.main.file_write(A_MOVED_mu_path, "This is 'mu' in A_MOVED.\n") @@ -8095,7 +7585,7 @@ def merge_old_and_new_revs_from_renamed_dir(sbox): 'A_COPY/D/H/psi' : Item(status=' ', wc_rev=4), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Merge /A_MOVED to /A_COPY - this happens in multiple passes # because /A_MOVED has renames in its history between the boundaries @@ -8162,8 +7652,7 @@ def merge_old_and_new_revs_from_renamed_dir(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - True, False) + [], True, False) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -8205,11 +7694,11 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], + expected_status) + svntest.actions.run_and_verify_svn(None, [], 'cp', A_url, A_COPY_url, '-m', 'rev 3') # Update the working copy to get A_COPY - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_status.add({'A_COPY' : Item(status=' '), 'A_COPY/mu' : Item(status=' '), 'A_COPY/C' : Item(status=' '), @@ -8234,8 +7723,8 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): svntest.main.file_write(mu_path, tweaked_7th_line) expected_status.tweak('A/mu', wc_rev=4) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_status) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) expected_status.tweak(wc_rev=4) tweaked_17th_line = tweaked_7th_line.replace('line17', 'LINE 17') svntest.main.file_write(mu_path, tweaked_17th_line) @@ -8249,16 +7738,15 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): expected_status.tweak('A', wc_rev=5) expected_status.tweak('A/mu', wc_rev=5) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) tweaked_27th_line = tweaked_17th_line.replace('line27', 'LINE 27') svntest.main.file_write(mu_path, tweaked_27th_line) expected_status.tweak('A/mu', wc_rev=6) expected_output = wc.State(wc_dir, {'A/mu' : Item(verb='Sending')}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Merge r5 to A_COPY/mu svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], ['U ' + A_COPY_mu_path + '\n', ' U ' + A_COPY_mu_path + '\n']), @@ -8327,10 +7815,9 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Revert r5 and r6 on A_COPY/mu svntest.actions.run_and_verify_svn( - None, expected_merge_output([[6,5]], ['G ' + A_COPY_mu_path + '\n', ' G ' + A_COPY_mu_path + '\n']), @@ -8361,7 +7848,7 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) expected_disk.add({'' : Item(props={SVN_PROP_MERGEINFO : '/A:4-6', 'prop1' : 'val1'})}) @@ -8385,10 +7872,9 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) #Revert r5 on A_COPY/mu svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-5]], ['G ' + A_COPY_mu_path + '\n', ' G ' + A_COPY_mu_path + '\n']), @@ -8422,7 +7908,7 @@ def merge_with_child_having_different_rev_ranges_to_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -8444,7 +7930,8 @@ def merge_old_and_new_revs_from_renamed_file(sbox): mu_MOVED_path = sbox.ospath('A/mu_MOVED') # Copy mu to mu_COPY - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 2.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 2.\n'], [], 'cp', '-m', 'cp mu to mu_COPY', mu_url, mu_COPY_url) @@ -8454,15 +7941,16 @@ def merge_old_and_new_revs_from_renamed_file(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Move mu to mu_MOVED - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 4.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 4.\n'], [], 'mv', '-m', 'mv mu to mu_MOVED', mu_url, mu_MOVED_url) # Update the working copy to get mu_MOVED - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Make a modification to mu_MOVED svntest.main.file_write(mu_MOVED_path, "This is 'mu' in mu_MOVED.\n") @@ -8474,7 +7962,7 @@ def merge_old_and_new_revs_from_renamed_file(sbox): 'A/mu_COPY' : Item(status=' ', wc_rev=4), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Merge A/mu_MOVED to A/mu_COPY - this happens in multiple passes # because A/mu_MOVED has renames in its history between the @@ -8484,11 +7972,11 @@ def merge_old_and_new_revs_from_renamed_file(sbox): ' U %s\n' % (mu_COPY_path), 'G %s\n' % (mu_COPY_path), ' G %s\n' % (mu_COPY_path),]) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-r', '1:5', mu_MOVED_url, mu_COPY_path) - svntest.actions.run_and_verify_svn(None, ['/A/mu:2-3\n', + svntest.actions.run_and_verify_svn(['/A/mu:2-3\n', '/A/mu_MOVED:4-5\n'], [], 'propget', SVN_PROP_MERGEINFO, mu_COPY_path) @@ -8512,13 +8000,13 @@ def merge_with_auto_rev_range_detection(sbox): A_COPY_path = sbox.ospath('A_COPY') # Create B1 inside A - svntest.actions.run_and_verify_svn(None, ["A " + B1_path + "\n"], + svntest.actions.run_and_verify_svn(["A " + B1_path + "\n"], [], 'mkdir', B1_path) # Add a file mu inside B1 svntest.main.file_write(B1_mu_path, "This is the file 'mu'.\n") - svntest.actions.run_and_verify_svn(None, ["A " + B1_mu_path + "\n"], + svntest.actions.run_and_verify_svn(["A " + B1_mu_path + "\n"], [], 'add', B1_mu_path) # Commit B1 and B1/mu @@ -8532,10 +8020,11 @@ def merge_with_auto_rev_range_detection(sbox): 'A/B1/mu' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Copy A to A_COPY - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 3.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 3.\n'], [], 'cp', '-m', 'cp A to A_COPY', A_url, A_COPY_url) @@ -8548,10 +8037,10 @@ def merge_with_auto_rev_range_detection(sbox): 'A/B1/mu' : Item(status=' ', wc_rev=4), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Update the working copy to get A_COPY - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Merge /A to /A_COPY expected_output = wc.State(A_COPY_path, { @@ -8617,8 +8106,7 @@ def merge_with_auto_rev_range_detection(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1) + [], True, True) #---------------------------------------------------------------------- # Test for issue 2818: Provide a 'merge' API which allows for merging of @@ -8648,28 +8136,24 @@ def cherry_picking(sbox): wc_status.tweak(wc_rev='6') svntest.actions.run_and_verify_update(wc_dir, expected_output, wc_disk, wc_status, - None, None, None, None, None, True) + check_props=True) # Make some prop changes to some dirs. - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + G_path + "'\n"], [], 'ps', 'prop:name', 'propval', G_path) expected_output = svntest.wc.State(wc_dir, {'A/D/G': Item(verb='Sending'),}) wc_status.tweak('A/D/G', wc_rev=7) wc_disk.tweak('A/D/G', props={'prop:name' : 'propval'}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + H_path + "'\n"], [], 'ps', 'prop:name', 'propval', H_path) expected_output = svntest.wc.State(wc_dir, {'A/D/H': Item(verb='Sending'),}) wc_status.tweak('A/D/H', wc_rev=8) wc_disk.tweak('A/D/H', props={'prop:name' : 'propval'}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Do multiple additive merges to a file" # Merge -r2:4 -c6 into A_COPY/D/G/rho. @@ -8678,7 +8162,6 @@ def cherry_picking(sbox): # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[3,4],[6]], ['U ' + rho_COPY_path + '\n', ' U ' + rho_COPY_path + '\n', @@ -8690,7 +8173,7 @@ def cherry_picking(sbox): expected_status = wc.State(rho_COPY_path, {'' : Item(status='MM', wc_rev=6)}) svntest.actions.run_and_verify_status(rho_COPY_path, expected_status) - svntest.actions.run_and_verify_svn(None, ["/A/D/G/rho:3-4,6\n"], [], + svntest.actions.run_and_verify_svn(["/A/D/G/rho:3-4,6\n"], [], 'propget', SVN_PROP_MERGEINFO, rho_COPY_path) @@ -8701,7 +8184,7 @@ def cherry_picking(sbox): ['U ' + omega_COPY_path + '\n', ' U ' + H_COPY_path + '\n', ' G ' + H_COPY_path + '\n',]) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c6', '-c8', sbox.repo_url + '/A/D/H', H_COPY_path) @@ -8713,8 +8196,7 @@ def cherry_picking(sbox): 'chi' : Item(status=' ', wc_rev=6), 'omega': Item(status='M ', wc_rev=6),}) svntest.actions.run_and_verify_status(H_COPY_path, expected_status) - svntest.actions.run_and_verify_svn(None, - [H_COPY_path + " - /A/D/H:6,8\n"], + svntest.actions.run_and_verify_svn([H_COPY_path + " - /A/D/H:6,8\n"], [], 'propget', '-R', SVN_PROP_MERGEINFO, H_COPY_path) @@ -8728,7 +8210,7 @@ def cherry_picking(sbox): ' G ' + A_COPY_path + '\n', ' G ' + H_COPY_path + '\n',], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c-3', '-c-6', sbox.repo_url + '/A', A_COPY_path) @@ -8760,7 +8242,7 @@ def cherry_picking(sbox): # Construct proper regex for '\' infested Windows paths. if sys.platform == 'win32': expected_out = expected_out.replace("\\", "\\\\") - svntest.actions.run_and_verify_svn(None, expected_out, [], + svntest.actions.run_and_verify_svn(expected_out, [], 'propget', '-R', SVN_PROP_MERGEINFO, A_COPY_path) @@ -8779,7 +8261,7 @@ def cherry_picking(sbox): ' U ' + rho_COPY_path + '\n', ' G ' + rho_COPY_path + '\n'], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge', + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-r2:3', '-c-4', '-r4:7', sbox.repo_url + '/A/D', D_COPY_path) @@ -8801,7 +8283,7 @@ def cherry_picking(sbox): # Construct proper regex for '\' infested Windows paths. if sys.platform == 'win32': expected_out = expected_out.replace("\\", "\\\\") - svntest.actions.run_and_verify_svn(None, expected_out, [], + svntest.actions.run_and_verify_svn(expected_out, [], 'propget', '-R', SVN_PROP_MERGEINFO, D_COPY_path) @@ -8839,7 +8321,7 @@ def propchange_of_subdir_raises_conflict(sbox): 'A/B/E' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Merge /A/B to /A_COPY/B ie., r1 to r3 with depth files expected_output = wc.State(A_COPY_B_path, { @@ -8878,8 +8360,8 @@ def propchange_of_subdir_raises_conflict(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1, '--depth', 'files', + [], True, True, + '--depth', 'files', A_COPY_B_path) # Merge /A/B to /A_COPY/B ie., r1 to r3 with infinite depth @@ -8918,8 +8400,7 @@ def propchange_of_subdir_raises_conflict(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1) + [], 1, 1) #---------------------------------------------------------------------- # Test for issue #2971: Reverse merge of prop add segfaults if @@ -8939,16 +8420,14 @@ def reverse_merge_prop_add_on_child(sbox): G_COPY_path = sbox.ospath('A_COPY/D/G') # Make some prop changes to some dirs. - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + G_path + "'\n"], [], 'ps', 'prop:name', 'propval', G_path) expected_output = svntest.wc.State(wc_dir, {'A/D/G': Item(verb='Sending'),}) wc_status.tweak('A/D/G', wc_rev=3) wc_disk.tweak('A/D/G', props={'prop:name' : 'propval'}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Merge -c3's prop add to A_COPY/D/G expected_output = wc.State(G_COPY_path, { @@ -8981,8 +8460,7 @@ def reverse_merge_prop_add_on_child(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Now merge -c-3 but target the previous target's parent instead. expected_output = wc.State(D_COPY_path, { @@ -9028,8 +8506,7 @@ def reverse_merge_prop_add_on_child(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @XFail() @@ -9053,7 +8530,7 @@ def merge_target_with_non_inheritable_mergeinfo(sbox): # Make a modifications to A/B/lambda and add A/B/E/newfile svntest.main.file_write(lambda_path, "This is the file 'lambda' modified.\n") svntest.main.file_write(newfile_path, "This is the file 'newfile'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', newfile_path) + svntest.actions.run_and_verify_svn(None, [], 'add', newfile_path) expected_output = wc.State(wc_dir, { 'A/B/lambda' : Item(verb='Sending'), 'A/B/E/newfile' : Item(verb='Adding'), @@ -9063,7 +8540,7 @@ def merge_target_with_non_inheritable_mergeinfo(sbox): 'A/B/E/newfile' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Merge /A/B to /A_COPY/B ie., r1 to r3 with depth immediates expected_output = wc.State(A_COPY_B_path, { @@ -9106,8 +8583,8 @@ def merge_target_with_non_inheritable_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1, '--depth', 'immediates', + [], True, True, + '--depth', 'immediates', A_COPY_B_path) # Merge /A/B to /A_COPY/B ie., r1 to r3 with infinite depth @@ -9146,8 +8623,7 @@ def merge_target_with_non_inheritable_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1) + [], True, True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -9173,13 +8649,11 @@ def self_reverse_merge(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # update to HEAD so that the to-be-undone revision is found in the # implicit mergeinfo (the natural history) of the target. - svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) expected_output = wc.State(wc_dir, { 'A/mu' : Item(status='U ') @@ -9200,12 +8674,12 @@ def self_reverse_merge(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + [], True, True) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # record dummy self mergeinfo to test the fact that self-reversal should work # irrespective of mergeinfo. - svntest.actions.run_and_verify_svn(None, None, [], 'ps', SVN_PROP_MERGEINFO, + svntest.actions.run_and_verify_svn(None, [], 'ps', SVN_PROP_MERGEINFO, '/:1', wc_dir) # Bad svntest.main.greek_state does not have '', so adding it explicitly. @@ -9224,7 +8698,7 @@ def self_reverse_merge(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -9251,9 +8725,9 @@ def ignore_ancestry_and_mergeinfo(sbox): 'A/B/lambda' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Merge /A/B to /A_COPY/B ie., r1 to r3 with depth immediates expected_output = wc.State(A_COPY_B_path, { @@ -9290,10 +8764,10 @@ def ignore_ancestry_and_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) # Now, revert lambda and repeat the merge. Nothing should happen. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', A_COPY_lambda_path) expected_output.remove('lambda') expected_disk.tweak('lambda', contents="This is the file 'lambda'.\n") @@ -9309,7 +8783,7 @@ def ignore_ancestry_and_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) # Now, try the merge again with --ignore-ancestry. We should get # lambda re-modified. */ @@ -9330,7 +8804,7 @@ def ignore_ancestry_and_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--ignore-ancestry', A_COPY_B_path) #---------------------------------------------------------------------- @@ -9361,7 +8835,7 @@ def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox): svntest.main.run_svn(None, 'cp', A_C_url, A_COPY_C_url, '-m', 'copy...') svntest.main.run_svn(None, 'mv', A_COPY_C_url, A_RENAMED_C_url, '-m', 'rename...') - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) svntest.main.file_write(A_RENAMED_C_file1_path, "This is the file1.\n") svntest.main.run_svn(None, 'add', A_RENAMED_C_file1_path) @@ -9373,8 +8847,7 @@ def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox): 'file1' : Item(status=' ', wc_rev=4), }) svntest.actions.run_and_verify_commit(A_RENAMED_C_path, expected_output, - expected_status, None, - A_RENAMED_C_path) + expected_status) svntest.main.file_write(A_RENAMED_C_file1_path, "This is the file1 modified.\n") expected_output = wc.State(A_RENAMED_C_path, { @@ -9382,8 +8855,7 @@ def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox): }) expected_status.tweak('file1', wc_rev=5) svntest.actions.run_and_verify_commit(A_RENAMED_C_path, expected_output, - expected_status, None, - A_RENAMED_C_path) + expected_status) expected_skip = wc.State(A_C_path, {}) expected_output = wc.State(A_C_path, { @@ -9410,7 +8882,7 @@ def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) expected_output = wc.State(A_C_path, { 'file1' : Item(status='U '), @@ -9434,7 +8906,7 @@ def merge_from_renamed_branch_fails_while_avoiding_repeat_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) #---------------------------------------------------------------------- # Test for part of issue #2877: 'do subtree merge only if subtree has @@ -9455,7 +8927,8 @@ def merge_source_normalization_and_subtree_merges(sbox): wc_disk, wc_status = set_up_branch(sbox) # r7 - Move A to A_MOVED - svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 7.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 7.\n'], [], 'mv', '-m', 'mv A to A_MOVED', sbox.repo_url + '/A', sbox.repo_url + '/A_MOVED') @@ -9487,7 +8960,7 @@ def merge_source_normalization_and_subtree_merges(sbox): wc_status.tweak(status=' ', wc_rev=7) # Update the WC - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir) # r8 - Make a text mod to 'A_MOVED/D/G/tau' @@ -9496,8 +8969,7 @@ def merge_source_normalization_and_subtree_merges(sbox): expected_output = wc.State(wc_dir, {'A_MOVED/D/G/tau' : Item(verb='Sending')}) wc_status.tweak('A_MOVED/D/G/tau', status=' ', wc_rev=8) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Merge -c4 URL/A_MOVED/D/G A_COPY/D/G. # @@ -9535,8 +9007,7 @@ def merge_source_normalization_and_subtree_merges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge -c8 URL/A_MOVED/D A_COPY/D. # @@ -9587,8 +9058,7 @@ def merge_source_normalization_and_subtree_merges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Tests for issue #3067: 'subtrees with intersecting mergeinfo, that don't @@ -9612,16 +9082,14 @@ def new_subtrees_should_not_break_merge(sbox): # Create 'A/D/H/nu', commit it as r7, make a text mod to it in r8. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Adding')}) wc_status.add({'A/D/H/nu' : Item(status=' ', wc_rev=7)}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) svntest.main.file_write(nu_path, "New content") expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Sending')}) wc_status.tweak('A/D/H/nu', wc_rev=8) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Merge r7 to A_COPY/D/H, then, so it has it's own explicit mergeinfo, # then merge r8 to A_COPY/D/H/nu so it too has explicit mergeinfo. @@ -9655,12 +9123,11 @@ def new_subtrees_should_not_break_merge(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # run_and_verify_merge doesn't support merging to a file WCPATH # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[8]], ['U ' + nu_COPY_path + '\n', ' G ' + nu_COPY_path + '\n']), @@ -9732,8 +9199,7 @@ def new_subtrees_should_not_break_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) expected_output = wc.State(D_COPY_path, { 'H/omega': Item(status='G '), }) @@ -9778,8 +9244,7 @@ def new_subtrees_should_not_break_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Now once again merge r6 to A_COPY. A_COPY already has r6 in its mergeinfo # so we expect only subtree merges on A_COPY/D, A_COPY_D_H, and # A_COPY/D/H/nu. The fact that A/D/H/nu doesn't exist at r6 should not cause @@ -9850,13 +9315,12 @@ def new_subtrees_should_not_break_merge(sbox): expected_disk_1, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Commit this merge as r9. # # Update the wc first to make setting the expected status a bit easier. - 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) wc_status.tweak(wc_rev=8) expected_output = wc.State(wc_dir, { @@ -9872,15 +9336,14 @@ def new_subtrees_should_not_break_merge(sbox): 'A_COPY/D/H/omega', wc_rev=9) wc_status.add({'A_COPY/D/H/nu' : Item(status=' ', wc_rev=9)}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Update the WC. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(9), [], 'up', wc_dir) wc_status.tweak(wc_rev=9) # Yet another test for issue #3067. Merge -rX:Y, where X>Y (reverse merge) - # and the merge target has a subtree that came into existance at some rev + # and the merge target has a subtree that came into existence at some rev # N where X < N < Y. This merge should simply delete the subtree. # # For this test merge -r9:2 to A_COPY. This should revert all the merges @@ -9950,14 +9413,12 @@ def new_subtrees_should_not_break_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Revert the previous merge, then merge r4 to A_COPY/D/G/rho. Commit # this merge as r10. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[4]], ['U ' + rho_COPY_path + '\n', ' G ' + rho_COPY_path + '\n']), @@ -9965,9 +9426,8 @@ def new_subtrees_should_not_break_merge(sbox): expected_output = wc.State(wc_dir, { 'A_COPY/D/G/rho' : Item(verb='Sending'),}) wc_status.tweak('A_COPY/D/G/rho', wc_rev=10) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) + svntest.actions.run_and_verify_svn(exp_noop_up_out(10), [], 'up', wc_dir) wc_status.tweak(wc_rev=10) @@ -10022,8 +9482,7 @@ def new_subtrees_should_not_break_merge(sbox): expected_disk_1, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -10106,8 +9565,7 @@ def dont_add_mergeinfo_from_own_history(sbox): expected_A_COPY_disk, expected_A_COPY_status, expected_A_COPY_skip, - None, None, None, None, - None, 1) + check_props=True) # Change 'A_COPY/mu' svntest.main.file_write(mu_COPY_path, "New content") @@ -10121,9 +9579,7 @@ def dont_add_mergeinfo_from_own_history(sbox): wc_status.tweak('A_COPY', 'A_COPY/D/H/psi', 'A_COPY/mu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) # Merge r7 back to the 'A' expected_output = wc.State(A_path, { @@ -10185,13 +9641,11 @@ def dont_add_mergeinfo_from_own_history(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, None, None, None, - None, True, False, + [], True, False, '--allow-mixed-revisions', A_path) # Revert all local mods - svntest.actions.run_and_verify_svn(None, - ["Reverted '" + A_path + "'\n", + svntest.actions.run_and_verify_svn(["Reverted '" + A_path + "'\n", "Reverted '" + mu_path + "'\n"], [], 'revert', '-R', wc_dir) @@ -10200,8 +9654,8 @@ def dont_add_mergeinfo_from_own_history(sbox): # 'A_MOVED', but 'A_MOVED@3' is 'A', so again this mergeinfo is filtered # out, leaving the only the mergeinfo created from the merge itself: # '/A_COPY:7'. - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 8.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 8.\n'], [], 'move', sbox.repo_url + '/A', sbox.repo_url + '/A_MOVED', @@ -10285,8 +9739,7 @@ def dont_add_mergeinfo_from_own_history(sbox): expected_output, wc_disk, wc_status, - None, None, None, None, None, - True) + check_props=True) expected_output = wc.State(A_MOVED_path, { 'mu' : Item(status='U '), @@ -10326,12 +9779,10 @@ def dont_add_mergeinfo_from_own_history(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, None, None, None, - None, 1) + check_props=True) # Revert all local mods - svntest.actions.run_and_verify_svn(None, - ["Reverted '" + A_MOVED_path + "'\n", + svntest.actions.run_and_verify_svn(["Reverted '" + A_MOVED_path + "'\n", "Reverted '" + mu_MOVED_path + "'\n"], [], 'revert', '-R', wc_dir) @@ -10364,7 +9815,7 @@ def dont_add_mergeinfo_from_own_history(sbox): "A " + sbox.ospath('A/D/H/psi') + "\n", "Exported revision 1.\n",] ) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'export', sbox.repo_url + '/A@1', A_path) expected_output = svntest.verify.UnorderedOutput( @@ -10388,7 +9839,7 @@ def dont_add_mergeinfo_from_own_history(sbox): "A " + sbox.ospath('A/D/H/omega') + "\n", "A " + sbox.ospath('A/D/H/psi') + "\n",] ) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'add', A_path) # Commit the new 'A' as r9 expected_output = wc.State(wc_dir, { @@ -10437,9 +9888,7 @@ def dont_add_mergeinfo_from_own_history(sbox): wc_status.tweak(status=' ') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) expected_output = wc.State(A_path, { 'mu' : Item(status='U '), @@ -10502,10 +9951,10 @@ def dont_add_mergeinfo_from_own_history(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) @Issue(3094) def merge_range_predates_history(sbox): "merge range predates history" @@ -10523,7 +9972,7 @@ def merge_range_predates_history(sbox): # Tweak a file and commit. (r2) svntest.main.file_append(iota_path, "More data.\n") - svntest.main.run_svn(None, 'ci', '-m', 'tweak iota', wc_dir) + sbox.simple_commit(message='tweak iota') # Create our trunk and branches directory, and update working copy. (r3) svntest.main.run_svn(None, 'mkdir', trunk_url, branches_url, @@ -10533,7 +9982,7 @@ def merge_range_predates_history(sbox): # Add a file to the trunk and commit. (r4) svntest.main.file_append(trunk_file_path, "This is the file 'file'.\n") svntest.main.run_svn(None, 'add', trunk_file_path) - svntest.main.run_svn(None, 'ci', '-m', 'add trunk file', wc_dir) + sbox.simple_commit(message='add trunk file') # Branch trunk from r3, and update working copy. (r5) svntest.main.run_svn(None, 'cp', trunk_url, branch_url, '-r3', @@ -10545,7 +9994,7 @@ def merge_range_predates_history(sbox): expected_output = expected_merge_output([[4,5]], ['A ' + branch_file_path + '\n', ' U ' + branch_path + '\n']) - svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge', + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', trunk_url, branch_path) #---------------------------------------------------------------------- @@ -10636,9 +10085,7 @@ def foreign_repos(sbox): + added_contents) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) svntest.actions.verify_disk(wc_dir, expected_disk, True) # Now, merge our committed revision into a working copy of another @@ -10647,7 +10094,7 @@ def foreign_repos(sbox): ### TODO: Use run_and_verify_merge() ### svntest.main.run_svn(None, 'merge', '-c2', sbox.repo_url, wc_dir2) - svntest.main.run_svn(None, 'ci', '-m', 'Merge from foreign repos', wc_dir2) + sbox2.simple_commit(message='Merge from foreign repo') svntest.actions.verify_disk(wc_dir2, expected_disk, True) # Now, let's make a third checkout -- our second from the original @@ -10656,7 +10103,7 @@ def foreign_repos(sbox): # This is a regression test for issue #3623 in which wc_dir2 had the # correct state but the committed state was wrong. wc_dir3 = sbox.add_wc_path('wc3') - svntest.actions.run_and_verify_svn(None, None, [], 'checkout', + svntest.actions.run_and_verify_svn(None, [], 'checkout', sbox2.repo_url, wc_dir3) svntest.actions.verify_disk(wc_dir3, expected_disk, True) @@ -10703,13 +10150,11 @@ def foreign_repos_uuid(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) svntest.actions.verify_disk(wc_dir, expected_disk, True) svntest.main.run_svn(None, 'merge', '-c2', sbox.repo_url, wc_dir2) - svntest.main.run_svn(None, 'ci', '-m', 'Merge from foreign repos', wc_dir2) + sbox2.simple_commit(message='Merge from foreign repos') # Run info to check the copied rev to make sure it's right zeta2_path = os.path.join(wc_dir2, 'A', 'D', 'G', 'zeta') @@ -10813,9 +10258,7 @@ def foreign_repos_2_url(sbox): + added_contents) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) svntest.actions.verify_disk(wc_dir, expected_disk, True) # Now, "tag" the new state of the repository. @@ -10831,7 +10274,7 @@ def foreign_repos_2_url(sbox): svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A-tag1', sbox.repo_url + '/A-tag2', os.path.join(wc_dir2, 'A')) - svntest.main.run_svn(None, 'ci', '-m', 'Merge from foreign repos', wc_dir2) + sbox2.simple_commit(message='Merge from foreign repos') svntest.actions.verify_disk(wc_dir2, expected_disk, True) #---------------------------------------------------------------------- @@ -10854,9 +10297,11 @@ def merge_added_subtree(sbox): A_COPY_url = url + "/A_COPY" A_path = sbox.ospath('A') - svntest.actions.run_and_verify_svn("",["\n", "Committed revision 2.\n"], [], + svntest.actions.run_and_verify_svn(["Committing transaction...\n", + "Committed revision 2.\n"], [], "cp", "-m", "", A_url, A_COPY_url) - svntest.actions.run_and_verify_svn("",["\n", "Committed revision 3.\n"], [], + svntest.actions.run_and_verify_svn(["Committing transaction...\n", + "Committed revision 3.\n"], [], "cp", "-m", "", A_COPY_url + '/D', A_COPY_url + '/D2') @@ -10905,14 +10350,14 @@ def merge_added_subtree(sbox): }) # Using the above information, verify a REPO->WC copy - svntest.actions.run_and_verify_svn("", None, [], + svntest.actions.run_and_verify_svn(None, [], "cp", A_COPY_url + '/D2', os.path.join(A_path, "D2")) svntest.actions.verify_disk(A_path, expected_disk) svntest.actions.run_and_verify_status(A_path, expected_status) # Remove the copy artifacts - svntest.actions.run_and_verify_svn("", None, [], + svntest.actions.run_and_verify_svn(None, [], "revert", "-R", A_path) svntest.main.safe_rmtree(os.path.join(A_path, "D2")) @@ -10943,14 +10388,14 @@ def merge_unknown_url(sbox): # remove a path from the repo and commit. iota_path = sbox.ospath('iota') - svntest.actions.run_and_verify_svn(None, None, [], 'rm', iota_path) - svntest.actions.run_and_verify_svn("", None, [], + svntest.actions.run_and_verify_svn(None, [], 'rm', iota_path) + svntest.actions.run_and_verify_svn(None, [], "ci", wc_dir, "-m", "log message") url = sbox.repo_url + "/iota" expected_err = ".*File not found.*iota.*|.*iota.*path not found.*" - svntest.actions.run_and_verify_svn("", None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, "merge", url, wc_dir) #---------------------------------------------------------------------- @@ -10995,7 +10440,7 @@ def reverse_merge_away_all_mergeinfo(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Commit the merge as r7 expected_output = wc.State(wc_dir, { @@ -11007,9 +10452,7 @@ def reverse_merge_away_all_mergeinfo(sbox): wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) # Now reverse merge r7 from itself, all mergeinfo should be removed. expected_output = wc.State(A_COPY_H_path, { @@ -11042,7 +10485,7 @@ def reverse_merge_away_all_mergeinfo(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, + [], True, False, '--allow-mixed-revisions', A_COPY_H_path) @@ -11087,35 +10530,35 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox): expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')}) expected_status.tweak('A/D/H/psi', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A/D/H/psi', contents="New content") # Create 'A/D/H/nu' and commit it as r3. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Adding')}) expected_status.add({'A/D/H/nu' : Item(status=' ', wc_rev=3)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Delete 'A/D/H/nu' and commit it as r4. - svntest.actions.run_and_verify_svn(None, None, [], 'rm', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'rm', nu_path) expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Deleting')}) expected_status.remove('A/D/H/nu') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Copy 'A/D/H/nu' from r3 and commit it as r5. - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', sbox.repo_url + '/A/D/H/nu@3', nu_path) expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Adding')}) expected_status.add({'A/D/H/nu' : Item(status=' ', wc_rev=5)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Copy 'A/D/H' to 'H_COPY' in r6. - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 6.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 6.\n'], [], 'copy', sbox.repo_url + "/A/D/H", sbox.repo_url + "/H_COPY", @@ -11136,7 +10579,7 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox): expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Sending')}) expected_status.tweak('A/D/H/nu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Remove A/D/H/nu and commit it as r8. # We do this deletion so that following cherry harvest has a *tough* @@ -11145,7 +10588,7 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox): expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Deleting')}) expected_status.remove('A/D/H/nu') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Make another text mod to 'A/D/H/psi' that can be merged to 'H_COPY' # during a cherry harvest and commit it as r9. @@ -11153,7 +10596,7 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox): expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')}) expected_status.tweak('A/D/H/psi', wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A/D/H/psi', contents="Even *newer* content") # Update WC so elision occurs smoothly. @@ -11162,7 +10605,6 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox): # Merge r7 from 'A/D/H/nu' to 'H_COPY/nu'. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[7]], ['U ' + nu_COPY_path + '\n', ' U ' + nu_COPY_path + '\n']), @@ -11178,13 +10620,12 @@ def dont_merge_revs_into_subtree_that_predate_it(sbox): expected_skip = wc.State(H_COPY_path, { }) #Cherry pick r2 prior to cherry harvest. - svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-c2', + svntest.actions.run_and_verify_svn([], [], 'merge', '-c2', sbox.repo_url + '/A/D/H', H_COPY_path) # H_COPY needs r6-9 applied while H_COPY/nu needs only 6,8-9. svntest.actions.run_and_verify_svn( - None, expected_merge_output( [[7,9], # Merge notification [6,9]], # Mergeinfo notification @@ -11233,7 +10674,7 @@ def set_up_renamed_subtree(sbox): expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')}) expected_status.tweak('A/D/H/psi', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A/D/H/psi', contents="New content") # Make a text mod to 'A/D/H/omega' and commit it as r3 @@ -11241,11 +10682,11 @@ def set_up_renamed_subtree(sbox): expected_output = wc.State(wc_dir, {'A/D/H/omega' : Item(verb='Sending')}) expected_status.tweak('A/D/H/omega', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.tweak('A/D/H/omega', contents="New omega") # Move 'A/D/H/psi' to 'A/D/H/psi_moved' and commit it as r4. - svntest.actions.run_and_verify_svn(None, None, [], 'move', + svntest.actions.run_and_verify_svn(None, [], 'move', psi_path, psi_moved_path) expected_output = wc.State(wc_dir, { 'A/D/H/psi' : Item(verb='Deleting'), @@ -11259,15 +10700,15 @@ def set_up_renamed_subtree(sbox): # this so we still want to test that the issue #3067 fixes tested by # merge_chokes_on_renamed_subtrees and subtrees_with_empty_mergeinfo # still work. - svntest.actions.run_and_verify_svn(None, None, [], 'ps', SVN_PROP_MERGEINFO, + svntest.actions.run_and_verify_svn(None, [], 'ps', SVN_PROP_MERGEINFO, "", psi_moved_path) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Copy 'A/D/H' to 'H_COPY' in r5. - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 5.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 5.\n'], [], 'copy', sbox.repo_url + "/A/D/H", sbox.repo_url + "/H_COPY", @@ -11288,7 +10729,7 @@ def set_up_renamed_subtree(sbox): {'A/D/H/psi_moved' : Item(verb='Sending')}) expected_status.tweak('A/D/H/psi_moved', wc_rev=6) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) expected_disk.remove('A/D/H/psi') expected_disk.add({ 'A/D/H/psi_moved' : Item("Even *Newer* content"), @@ -11321,7 +10762,6 @@ def merge_chokes_on_renamed_subtrees(sbox): # Here is where issue #3174 appears, the merge fails with: # svn: svn: File not found: revision 3, path '/A/D/H/psi' svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5,6],[3,6]], ['U ' + psi_COPY_moved_path + '\n', ' U ' + psi_COPY_moved_path + '\n', @@ -11353,7 +10793,7 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): nu_copy_path = sbox.ospath('A_copy/D/H/nu') def _commit_and_update(rev, action): - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'r%d - %s' % (rev, action), sbox.wc_dir) svntest.main.run_svn(None, 'up', wc_dir) @@ -11381,7 +10821,6 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): # a propget. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], ['U ' + A_copy_mu_path + '\n', ' U ' + A_copy_mu_path + '\n']), [], 'merge', '-c5', sbox.repo_url + '/A_copy2/mu', A_copy_mu_path) @@ -11450,13 +10889,13 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Revert the previous merges and try a cherry harvest merge where # the subtree's natural history is a proper subset of the merge. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) wc_status = svntest.actions.get_virginal_state(wc_dir, 5) wc_status.add({ 'A_copy' : Item(), @@ -11502,18 +10941,18 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): # r6 - Add the file 'A/D/H/nu'. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Adding')}) wc_status.add({'A/D/H/nu' : Item(status=' ', wc_rev=6)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r7 - Make a change to 'A/D/H/nu'. svntest.main.file_write(nu_path, "Nu content") expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Sending')}) wc_status.tweak('A/D/H/nu', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r8 - Merge r6 to 'A_copy'. expected_output = wc.State(A_copy_path, { @@ -11577,8 +11016,7 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): expected_A_copy_disk, expected_A_copy_status, expected_A_copy_skip, - None, None, None, None, - None, 1) + check_props=True) wc_status.add({'A_copy/D/H/nu' : Item(status=' ', wc_rev=8)}) wc_status.tweak('A_copy', wc_rev=8) expected_output = wc.State(wc_dir, { @@ -11586,7 +11024,7 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): 'A_copy' : Item(verb='Sending'), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r9 - Merge r7 to 'A_copy/D/H/nu'. expected_skip = wc.State(nu_copy_path, { }) @@ -11594,7 +11032,6 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[7]], ['U ' + nu_copy_path + '\n', ' G ' + nu_copy_path + '\n',]), @@ -11602,10 +11039,10 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): expected_output = wc.State(wc_dir, {'A_copy/D/H/nu' : Item(verb='Sending')}) wc_status.tweak('A_copy/D/H/nu', wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Update WC - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) wc_status.tweak(wc_rev=9) # r10 - Make another change to 'A/D/H/nu'. @@ -11613,10 +11050,10 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Sending')}) wc_status.tweak('A/D/H/nu', wc_rev=10) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Update WC - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) wc_status.tweak(wc_rev=10) # Now do a cherry harvest merge to 'A_copy'. @@ -11683,8 +11120,7 @@ def dont_explicitly_record_implicit_mergeinfo(sbox): expected_A_copy_disk, expected_A_copy_status, expected_A_copy_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue where merging a change to a broken link fails @@ -11709,7 +11145,6 @@ def merge_broken_link(sbox): os.symlink('beta', link_path) svntest.main.run_svn(None, 'commit', '-m', 'Fix a broken link', link_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[4]], ['U ' + copy_path + '/beta_link\n', ' U ' + copy_path + '\n']), @@ -11750,12 +11185,12 @@ def subtree_merges_dont_intersect_with_targets(sbox): }) wc_status.tweak('A/D/gamma', 'A/D/H/psi', wc_rev=8) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) wc_disk.tweak('A/D/gamma', contents="New content") wc_disk.tweak('A/D/H/psi', contents="Even newer content") # Update the WC. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(8), [], 'update', wc_dir) wc_status.tweak(wc_rev=8) @@ -11774,27 +11209,27 @@ def subtree_merges_dont_intersect_with_targets(sbox): # run_and_verify_merge() because these types of simple merges are # tested to death elsewhere and this is just setup for the "real" # test. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c4', sbox.repo_url + '/A/D/H/psi', psi_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c8', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c-8', sbox.repo_url + '/A/D/H/psi', psi_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A', A_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c-5', sbox.repo_url + '/A', A_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c5', '-c-8', sbox.repo_url + '/A/D/H', H_COPY_2_path) @@ -11823,12 +11258,10 @@ def subtree_merges_dont_intersect_with_targets(sbox): wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) # Update the WC. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(9), [], 'update', wc_dir) # Make sure we have mergeinfo that meets the two criteria set out above. @@ -11912,8 +11345,7 @@ def subtree_merges_dont_intersect_with_targets(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merging to the criterion 1 branch. # @@ -11986,8 +11418,7 @@ def subtree_merges_dont_intersect_with_targets(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Test the notification portion of issue #3199. # @@ -12004,7 +11435,7 @@ def subtree_merges_dont_intersect_with_targets(sbox): ### shortcomings (and allowed merges to file targets). # # Revert the previous merges. - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Repeat the forward merge expected_output = expected_merge_output( @@ -12014,7 +11445,7 @@ def subtree_merges_dont_intersect_with_targets(sbox): ' U %s\n' % (H_COPY_2_path), ' U %s\n' % (A_COPY_2_path),], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-r', '3:9', sbox.repo_url + '/A', A_COPY_2_path) @@ -12026,7 +11457,7 @@ def subtree_merges_dont_intersect_with_targets(sbox): ' U %s\n' % (A_COPY_path), ' U %s\n' % (psi_COPY_path)], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-r', '9:3', sbox.repo_url + '/A', A_COPY_path) @@ -12053,7 +11484,7 @@ def subtree_source_missing_in_requested_range(sbox): omega_COPY_path = sbox.ospath('A_COPY/D/H/omega') # r7 Delete A/D/H/psi. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'delete', psi_path) sbox.simple_commit(message='delete psi') @@ -12065,7 +11496,7 @@ def subtree_source_missing_in_requested_range(sbox): expected_output = expected_merge_output( [[3]], ['U %s\n' % (psi_COPY_path), ' U %s\n' % (psi_COPY_path),]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c', '3', sbox.repo_url + '/A/D/H/psi@3', psi_COPY_path) @@ -12075,12 +11506,12 @@ def subtree_source_missing_in_requested_range(sbox): expected_output = expected_merge_output( [[6]], ['U %s\n' % (omega_COPY_path), ' U %s\n' % (omega_COPY_path),]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c', '6', sbox.repo_url + '/A/D/H/omega', omega_COPY_path) sbox.simple_commit(message='merge r6 to A_COPY') - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(10), [], 'up', wc_dir) # r11 - Merge r8 to A_COPY. @@ -12088,7 +11519,7 @@ def subtree_source_missing_in_requested_range(sbox): [[8]], ['U %s\n' % (omega_COPY_path), ' U %s\n' % (omega_COPY_path), ' U %s\n' % (A_COPY_path)]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c', '8', sbox.repo_url + '/A', A_COPY_path) @@ -12102,12 +11533,12 @@ def subtree_source_missing_in_requested_range(sbox): [[8]], [' G %s\n' % (omega_COPY_path), ' U %s\n' % (psi_COPY_path), ' G %s\n' % (A_COPY_path)]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c', '8', sbox.repo_url + '/A', A_COPY_path, '--record-only') sbox.simple_commit(message='merge r8 to A_COPY/D/H/omega') - 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) # r12 - modify A/D/H/omega yet again. @@ -12119,12 +11550,12 @@ def subtree_source_missing_in_requested_range(sbox): expected_output = expected_merge_output( [[9,12],[2,12]], ['U %s\n' % (omega_COPY_path), ' U %s\n' % (omega_COPY_path)]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', sbox.repo_url + '/A/D/H/omega', omega_COPY_path) sbox.simple_commit(message='cherry harvest to A_COPY/D/H/omega') - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(13), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(13), [], 'up', wc_dir) # Check that svn:mergeinfo is as expected. @@ -12134,7 +11565,7 @@ def subtree_source_missing_in_requested_range(sbox): psi_COPY_path : '/A/D/H/psi:3,8' }) # Now test a reverse merge where part of the requested range postdates - # a subtree's existance. Merge -r12:1 to A_COPY. This should revert + # a subtree's existence. Merge -r12:1 to A_COPY. This should revert # all of the merges done thus far. The fact that A/D/H/psi no longer # exists after r7 shouldn't break the subtree merge into A_COPY/D/H/psi. # A_COPY/D/H/psi should simply have r3 reverse merged. No paths under @@ -12204,11 +11635,10 @@ def subtree_source_missing_in_requested_range(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, True, False) + [], True, False) # Revert the previous merge. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) # Merge r12 to A_COPY and commit as r14. expected_output = wc.State(A_COPY_path, {}) @@ -12270,8 +11700,7 @@ def subtree_source_missing_in_requested_range(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, True, False) + [], True, False) # As we did earlier, repeat the merge with the --record-only option to # preserve the old behavior of recording mergeinfo on every subtree, thus # allowing this test to actually test the issue #3067 fixes. @@ -12280,7 +11709,7 @@ def subtree_source_missing_in_requested_range(sbox): ' G %s\n' % (A_COPY_path), ' U %s\n' % (psi_COPY_path), ' U %s\n' % (omega_COPY_path),]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c', '12', sbox.repo_url + '/A', A_COPY_path, '--record-only') @@ -12289,7 +11718,7 @@ def subtree_source_missing_in_requested_range(sbox): # Update A_COPY/D/H/rho back to r13 so it's mergeinfo doesn't include # r12. Then merge a range, -r6:12 which should delete a subtree # (A_COPY/D/H/psi). - 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_output = wc.State(A_COPY_path, { 'D/H/psi' : Item(status='D '), @@ -12350,8 +11779,7 @@ def subtree_source_missing_in_requested_range(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, True, False) + [], True, False) #---------------------------------------------------------------------- # Another test for issue #3067: 'subtrees that don't exist at the start @@ -12406,11 +11834,12 @@ def subtrees_with_empty_mergeinfo(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue #3240 'commits to subtrees added by merge # corrupt working copy and repos'. +@SkipUnless(server_has_mergeinfo) @Issue(3240) def commit_to_subtree_added_by_merge(sbox): "commits to subtrees added by merge wreak havoc" @@ -12432,14 +11861,14 @@ def commit_to_subtree_added_by_merge(sbox): # subtree as r3. os.mkdir(N_path) svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', N_path) + svntest.actions.run_and_verify_svn(None, [], 'add', N_path) expected_output = wc.State(wc_dir, {'A/D/H/N' : Item(verb='Adding'), 'A/D/H/N/nu' : Item(verb='Adding')}) wc_status.add({'A/D/H/N' : Item(status=' ', wc_rev=3), 'A/D/H/N/nu' : Item(status=' ', wc_rev=3)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Merge r3 to 'A_COPY/D/H', creating A_COPY/D/H/N' and 'A_COPY/D/H/N/nu'. # Commit the merge as r4. @@ -12477,7 +11906,7 @@ def commit_to_subtree_added_by_merge(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) expected_output = wc.State(wc_dir, { 'A_COPY/D/H' : Item(verb='Sending'), 'A_COPY/D/H/N' : Item(verb='Adding'), @@ -12486,7 +11915,7 @@ def commit_to_subtree_added_by_merge(sbox): 'A_COPY/D/H/N/nu' : Item(status=' ', wc_rev=4)}) wc_status.tweak('A_COPY/D/H', wc_rev=4) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Make a text change to 'A_COPY/D/H/N/nu' and commit it as r5. This # is the first place issue #3240 appears over DAV layers, and the @@ -12505,94 +11934,16 @@ def commit_to_subtree_added_by_merge(sbox): {'A_COPY/D/H/N/nu' : Item(verb='Sending')}) wc_status.tweak('A_COPY/D/H/N/nu', wc_rev=5) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # The second place issue #3240 shows up is in the fact that the commit # *did* succeed, but the wrong path ('A/D/H/nu' rather than 'A_COPY/D/H/nu') # is affected. We can see this by running an update; since we just # committed there shouldn't be any incoming changes. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(5), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(5), [], 'up', wc_dir) #---------------------------------------------------------------------- -# Helper functions. These take local paths using '/' separators. - -def local_path(path): - "Convert a path from '/' separators to the local style." - return os.sep.join(path.split('/')) - -def svn_mkfile(path): - "Make and add a file with some default content, and keyword expansion." - path = local_path(path) - dirname, filename = os.path.split(path) - svntest.main.file_write(path, "This is the file '" + filename + "'.\n" + - "Last changed in '$Revision$'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', path) - svntest.actions.run_and_verify_svn(None, None, [], 'propset', - 'svn:keywords', 'Revision', path) - -def svn_modfile(path): - "Make text and property mods to a WC file." - path = local_path(path) - svntest.main.file_append(path, "An extra line.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'propset', - 'newprop', 'v', path) - -def svn_copy(s_rev, path1, path2): - "Copy a WC path locally." - path1 = local_path(path1) - path2 = local_path(path2) - svntest.actions.run_and_verify_svn(None, None, [], 'copy', '--parents', - '-r', s_rev, path1, path2) - -def svn_merge(rev_range, source, target, lines=None, elides=[], - text_conflicts=0, prop_conflicts=0, tree_conflicts=0, - text_resolved=0, prop_resolved=0, tree_resolved=0, - args=[]): - """Merge a single change from path SOURCE to path TARGET and verify the - output and that there is no error. (The changes made are not verified.) - - REV_RANGE is either a number (to cherry-pick that specific change) or a - two-element list [X,Y] to pick the revision range '-r(X-1):Y'. - - LINES is a list of regular expressions to match other lines of output; if - LINES is 'None' then match all normal (non-conflicting) merges. - - ELIDES is a list of paths on which mergeinfo elision should be reported. - - TEXT_CONFLICTS, PROP_CONFLICTS and TREE_CONFLICTS specify the number of - each kind of conflict to expect. - - ARGS are additional arguments passed to svn merge. - """ - - source = local_path(source) - target = local_path(target) - elides = [local_path(p) for p in elides] - if isinstance(rev_range, int): - mi_rev_range = [rev_range] - rev_arg = '-c' + str(rev_range) - else: - mi_rev_range = rev_range - rev_arg = '-r' + str(rev_range[0] - 1) + ':' + str(rev_range[1]) - if lines is None: - lines = ["(A |D |[UG] | [UG]|[UG][UG]) " + target + ".*\n"] - else: - # Expect mergeinfo on the target; caller must supply matches for any - # subtree mergeinfo paths. - lines.append(" [UG] " + target + "\n") - exp_out = expected_merge_output([mi_rev_range], lines, target=target, - elides=elides, - text_conflicts=text_conflicts, - prop_conflicts=prop_conflicts, - tree_conflicts=tree_conflicts, - text_resolved=text_resolved, - prop_resolved=prop_resolved, - tree_resolved=tree_resolved) - svntest.actions.run_and_verify_svn(None, exp_out, [], - 'merge', rev_arg, source, target, *args) - -#---------------------------------------------------------------------- # Tests for merging the deletion of a node, where the node to be deleted # is the same as or different from the node that was deleted. @@ -12697,19 +12048,18 @@ def subtree_merges_dont_cause_spurious_conflicts(sbox): expected_output = wc.State(wc_dir, {'A/D/G/rho' : Item(verb='Sending')}) wc_status.tweak('A/D/G/rho', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) wc_disk.tweak('A/D/G/rho', contents="Newer content") # r8 Make another text change to A/D/G/rho. svntest.main.file_write(rho_path, "Even *newer* content") expected_output = wc.State(wc_dir, {'A/D/G/rho' : Item(verb='Sending')}) wc_status.tweak('A/D/G/rho', wc_rev=8) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) wc_disk.tweak('A/D/G/rho', contents="Even *newer* content") # Update the WC to allow full mergeinfo inheritance and elision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(8), [], 'up', wc_dir) wc_status.tweak(wc_rev=8) @@ -12776,12 +12126,11 @@ def subtree_merges_dont_cause_spurious_conflicts(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # run_and_verify_merge doesn't support merging to a file WCPATH # so use run_and_verify_svn. ### TODO: We can use run_and_verify_merge() here now. - svntest.actions.run_and_verify_svn(None, - expected_merge_output([[-3]], + svntest.actions.run_and_verify_svn(expected_merge_output([[-3]], ['G ' + psi_COPY_path + '\n', ' G ' + psi_COPY_path + '\n']), [], 'merge', '-c-3', @@ -12802,10 +12151,10 @@ def subtree_merges_dont_cause_spurious_conflicts(sbox): 'A_COPY/D/H/omega', wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Update the WC to allow full mergeinfo 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) wc_status.tweak(wc_rev=9) @@ -12892,7 +12241,7 @@ def subtree_merges_dont_cause_spurious_conflicts(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 0) + check_props=True) #---------------------------------------------------------------------- # Test for yet another variant of issue #3067. @@ -12918,18 +12267,18 @@ def merge_target_and_subtrees_need_nonintersecting_ranges(sbox): # Add file A/D/G/nu in r7. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) expected_output = wc.State(wc_dir, {'A/D/G/nu' : Item(verb='Adding')}) wc_status.add({'A/D/G/nu' : Item(status=' ', wc_rev=7)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Make a text mod to A/D/G/nu in r8. svntest.main.file_write(nu_path, "New content") expected_output = wc.State(wc_dir, {'A/D/G/nu' : Item(verb='Sending')}) wc_status.tweak('A/D/G/nu', wc_rev=8) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Do several merges to setup a situation where the merge # target and two of its subtrees need non-intersecting ranges @@ -12945,7 +12294,7 @@ def merge_target_and_subtrees_need_nonintersecting_ranges(sbox): # of merges to death we don't use run_and_verify_merge() on these # intermediate merges. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2,7]], + expected_merge_output([[2,7]], ['U ' + beta_COPY_path + '\n', 'A ' + nu_COPY_path + '\n', 'U ' + rho_COPY_path + '\n', @@ -12955,12 +12304,12 @@ def merge_target_and_subtrees_need_nonintersecting_ranges(sbox): ), [], 'merge', '-r0:7', sbox.repo_url + '/A', A_COPY_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[8]], ['U ' + nu_COPY_path + '\n', + expected_merge_output([[8]], ['U ' + nu_COPY_path + '\n', ' G ' + nu_COPY_path + '\n']), [], 'merge', '-c8', sbox.repo_url + '/A/D/G/nu', nu_COPY_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-6]], ['G ' + omega_COPY_path + '\n', + expected_merge_output([[-6]], ['G ' + omega_COPY_path + '\n', ' G ' + omega_COPY_path + '\n']), [], 'merge', '-c-6', sbox.repo_url + '/A/D/H/omega', omega_COPY_path) wc_status.add({'A_COPY/D/G/nu' : Item(status=' ', wc_rev=9)}) @@ -12978,11 +12327,10 @@ def merge_target_and_subtrees_need_nonintersecting_ranges(sbox): 'A_COPY/D/H/omega' : Item(verb='Sending'), 'A_COPY/D/H/psi' : Item(verb='Sending'), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Update the WC to allow full mergeinfo 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) # Merge all available revisions from A to A_COPY, the merge logic @@ -13055,8 +12403,7 @@ def merge_target_and_subtrees_need_nonintersecting_ranges(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Part of this test is a regression test for issue #3250 "Repeated merging @@ -13118,7 +12465,7 @@ def merge_two_edits_to_same_prop(sbox): # the conflict, so it no longer tests the original #3250 scenario. # # Revert changes to branch wc - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', A_COPY_path) # In the branch, make two successive changes to the same property @@ -13135,7 +12482,7 @@ def merge_two_edits_to_same_prop(sbox): ], prop_conflicts=1, args=['--allow-mixed-revisions']) # Revert changes to trunk wc, to test next scenario of #3250 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', A_path) # Merge the first change, then the second, to trunk. @@ -13235,7 +12582,7 @@ def merge_adds_mergeinfo_correctly(sbox): D_COPY_2_path = sbox.ospath('A_COPY_2/D') # Update working copy to allow full inheritance and elision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'up', wc_dir) wc_status.tweak(wc_rev=7) @@ -13300,8 +12647,7 @@ def merge_adds_mergeinfo_correctly(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) wc_status.tweak('A_COPY', 'A_COPY/D/G/rho', wc_rev=8) @@ -13309,8 +12655,7 @@ def merge_adds_mergeinfo_correctly(sbox): 'A_COPY' : Item(verb='Sending'), 'A_COPY/D/G/rho' : Item(verb='Sending'), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Merge r7 from A/D to A_COPY_2/D and commit as r9. # This creates explicit mergeinfo on A_COPY_2/D of '/A/D:7'. @@ -13355,8 +12700,7 @@ def merge_adds_mergeinfo_correctly(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) wc_status.tweak('A_COPY_2/D', 'A_COPY_2/D/H/omega', wc_rev=9) @@ -13364,8 +12708,7 @@ def merge_adds_mergeinfo_correctly(sbox): 'A_COPY_2/D' : Item(verb='Sending'), 'A_COPY_2/D/H/omega' : Item(verb='Sending'), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Merge r9 from A_COPY_2 to A_COPY. A_COPY/D gets the explicit mergeinfo # '/A/D/:7' added from r9. But it prior to the merge it inherited '/A/D:5' @@ -13373,7 +12716,7 @@ def merge_adds_mergeinfo_correctly(sbox): # the mergeinfo describing this merge '/A_COPY_2:9' should also be present # in A_COPY's explicit mergeinfo. # Update working copy to allow full inheritance and elision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(9), [], 'up', wc_dir) expected_output = wc.State(A_COPY_path, { 'D' : Item(status=' U'), @@ -13436,16 +12779,15 @@ def merge_adds_mergeinfo_correctly(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Revert and repeat the above merge, but this time create some # uncommitted mergeinfo on A_COPY/D, this should not cause a write # lock error as was seen in http://subversion.tigris.org/ # ds/viewMessage.do?dsForumId=462&dsMessageId=103945 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', SVN_PROP_MERGEINFO, '', D_COPY_path) expected_output = wc.State(A_COPY_path, { @@ -13466,8 +12808,7 @@ def merge_adds_mergeinfo_correctly(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -13581,27 +12922,25 @@ def natural_history_filtering(sbox): "A_COPY_2" + '/D/H/omega' : Item("This is the file 'omega'.\n"), "A_COPY_2" + '/D/H/psi' : Item("New content"), }) - svntest.actions.run_and_verify_svn(None, expected, [], 'copy', + svntest.actions.run_and_verify_svn(expected, [], 'copy', sbox.repo_url + "/A", A_COPY_2_path) expected_output = wc.State(wc_dir, {"A_COPY_2" : Item(verb='Adding')}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, - None, - wc_dir) + wc_status) # r8: Make a text change under A, to A/D/H/chi. svntest.main.file_write(chi_path, "New content") expected_output = wc.State(wc_dir, {'A/D/H/chi' : Item(verb='Sending')}) wc_status.tweak('A/D/H/chi', wc_rev=8) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) wc_disk.tweak('A/D/H/psi', contents="New content") # r9: Merge all available revisions from A to A_COPY. But first # update working copy to allow full inheritance and elision. - 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) wc_status.tweak(wc_rev=8) expected_output = wc.State(A_COPY_path, { @@ -13667,8 +13006,7 @@ def natural_history_filtering(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) wc_status.tweak('A_COPY', 'A_COPY/B/E/beta', 'A_COPY/D/G/rho', @@ -13684,11 +13022,10 @@ def natural_history_filtering(sbox): 'A_COPY/D/H/psi' : Item(verb='Sending'), 'A_COPY/D/H/omega' : Item(verb='Sending'), }) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # Again update the working copy to allow full inheritance and elision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(9), [], 'up', wc_dir) wc_status.tweak(wc_rev=9) @@ -13757,8 +13094,7 @@ def natural_history_filtering(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -13797,7 +13133,7 @@ def subtree_gets_changes_even_if_ultimately_deleted(sbox): sbox.simple_commit(message='mod psi') # r8: Delete A/D/H/psi. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'delete', psi_path) sbox.simple_commit(message='delete psi') @@ -13836,10 +13172,9 @@ def subtree_gets_changes_even_if_ultimately_deleted(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 0, + [], True, False, '-c3,7', H_COPY_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[-7]], ['G ' + psi_COPY_path + '\n', ' G ' + psi_COPY_path + '\n',]), @@ -13886,7 +13221,7 @@ def subtree_gets_changes_even_if_ultimately_deleted(sbox): expected_elision_output, expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 0) + [], True, False) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -13906,8 +13241,7 @@ def no_self_referential_filtering_on_added_path(sbox): wc_disk, wc_status = set_up_branch(sbox, False, 2) # r8: Make a prop change on A_COPY/C. - svntest.actions.run_and_verify_svn(None, - ["property 'propname' set on '" + + svntest.actions.run_and_verify_svn(["property 'propname' set on '" + C_COPY_path + "'\n"], [], 'ps', 'propname', 'propval', C_COPY_path) @@ -13916,17 +13250,15 @@ def no_self_referential_filtering_on_added_path(sbox): wc_status.tweak('A_COPY/C', wc_rev=8) wc_disk.tweak("A_COPY/C", props={'propname' : 'propval'}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # r9: Merge r8 from A_COPY to A. # # Update first to avoid an out of date error. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(8), [], 'up', wc_dir) wc_status.tweak(wc_rev=8) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[8]], [' U ' + C_path + '\n', ' U ' + A_path + '\n',]), @@ -13935,8 +13267,7 @@ def no_self_referential_filtering_on_added_path(sbox): {'A' : Item(verb='Sending'), 'A/C' : Item(verb='Sending')}) wc_status.tweak('A', 'A/C', wc_rev=9) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) wc_disk.tweak("A/C", props={'propname' : 'propval'}) @@ -13944,13 +13275,13 @@ def no_self_referential_filtering_on_added_path(sbox): props={SVN_PROP_MERGEINFO : '/A_COPY:8'}) # r10: Move A/C to A/C_MOVED. - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 10.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 10.\n'], [], 'move', sbox.repo_url + '/A/C', sbox.repo_url + '/A/C_MOVED', '-m', 'Copy A/C to A/C_MOVED') - svntest.actions.run_and_verify_svn(None, None, [], 'up', + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Now try to merge all available revisions from A to A_COPY_2. @@ -14038,8 +13369,7 @@ def no_self_referential_filtering_on_added_path(sbox): expected_A_COPY_2_disk, expected_A_COPY_2_status, expected_A_COPY_2_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue #3324 @@ -14087,27 +13417,26 @@ def merge_range_prior_to_rename_source_existence(sbox): # r8 - Text change to A/B/E/alpha svntest.main.file_write(alpha_path, "New content") wc_status.tweak('A/B/E/alpha', wc_rev=8) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Text change', wc_dir) # r9 - Add the file A/D/H/nu and make another change to A/B/E/alpha. svntest.main.file_write(alpha_path, "Even newer content") svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) expected_output = wc.State(wc_dir, {'A/D/H/nu' : Item(verb='Adding'), 'A/B/E/alpha' : Item(verb='Sending')}) wc_status.add({'A/D/H/nu' : Item(status=' ', wc_rev=9)}) wc_status.tweak('A/B/E/alpha', wc_rev=9) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r10 - Merge all available revisions (i.e. -r1:9) from A to A_COPY. - 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) wc_status.tweak(wc_rev=9) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[2,9]], ['A ' + nu_COPY_path + '\n', 'U ' + alpha_COPY_path + '\n', @@ -14134,14 +13463,13 @@ def merge_range_prior_to_rename_source_existence(sbox): wc_rev=10) wc_status.add({'A_COPY/D/H/nu' : Item(status=' ', wc_rev=10)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r11 - Reverse merge -r9:1 from A/B to A_COPY/B - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(10), [], 'up', wc_dir) wc_status.tweak(wc_rev=10) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[9,2]], ['U ' + alpha_COPY_path + '\n', 'U ' + beta_COPY_path + '\n', ' G ' + B_COPY_path + '\n',]), @@ -14155,10 +13483,10 @@ def merge_range_prior_to_rename_source_existence(sbox): 'A_COPY/B/E/beta', wc_rev=11) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # r12 - Move A/D/H/nu to A/D/H/nu_moved - svntest.actions.run_and_verify_svn(None, ["\n", + svntest.actions.run_and_verify_svn(["Committing transaction...\n", "Committed revision 12.\n"], [], 'move', sbox.repo_url + '/A/D/H/nu', sbox.repo_url + '/A/D/H/nu_moved', @@ -14169,7 +13497,7 @@ def merge_range_prior_to_rename_source_existence(sbox): "A " + nu_moved_path + "\n", "Updated to revision 12.\n"], ) - svntest.actions.run_and_verify_svn(None, expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'up', wc_dir) # Now merge -r7:12 from A to A_COPY. @@ -14246,9 +13574,8 @@ def merge_range_prior_to_rename_source_existence(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 0) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + check_props=True) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Merge -r7:12 from A to A_COPY', wc_dir) # Now run a similar scenario as above on the second branch, but with @@ -14264,20 +13591,19 @@ def merge_range_prior_to_rename_source_existence(sbox): # Properties on 'A_COPY_2\B': # svn:mergeinfo # /A/B:3-13 - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(13), [], 'up', + svntest.actions.run_and_verify_svn(exp_noop_up_out(13), [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, - None, # Don't check stdout, we test this + svntest.actions.run_and_verify_svn(None, # Don't check stdout, we test this # type of merge to death elsewhere. [], 'merge', sbox.repo_url + '/A/B', B_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None,[], 'merge', '-r', '2:9', + svntest.actions.run_and_verify_svn(None,[], 'merge', '-r', '2:9', sbox.repo_url + '/A', A_COPY_2_path) svntest.actions.run_and_verify_svn( - None, None, [], 'ci', '-m', + None, [], 'ci', '-m', 'Merge all from A/B to A_COPY_2/B\nMerge -r2:9 from A to A_COPY_2', wc_dir) - 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) # Now reverse merge -r13:7 from A to A_COPY_2. @@ -14377,8 +13703,7 @@ def merge_range_prior_to_rename_source_existence(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 1) + [], True, True) #---------------------------------------------------------------------- def set_up_natural_history_gap(sbox): @@ -14408,23 +13733,26 @@ def set_up_natural_history_gap(sbox): # r6: Delete 'A' exit_code, out, err = svntest.actions.run_and_verify_svn( - None, "(Committed revision 6.)|(\n)", [], + ["Committing transaction...\n", + "Committed revision 6.\n"], [], 'delete', sbox.repo_url + '/A', '-m', 'Delete A') # r7: Resurrect 'A' by copying 'A@2' to 'A'. exit_code, out, err = svntest.actions.run_and_verify_svn( - None, "(Committed revision 7.)|(\n)", [], + ["Committing transaction...\n", + "Committed revision 7.\n"], [], 'copy', sbox.repo_url + '/A@2', sbox.repo_url + '/A', '-m', 'Resurrect A from A@2') # r8: Branch the resurrected 'A' to 'A_COPY'. exit_code, out, err = svntest.actions.run_and_verify_svn( - None, "(Committed revision 8.)|(\n)", [], + ["Committing transaction...\n", + "Committed revision 8.\n"], [], 'copy', sbox.repo_url + '/A', sbox.repo_url + '/A_COPY', '-m', 'Copy A to A_COPY') # Update to bring all the repos side changes down. - exit_code, out, err = svntest.actions.run_and_verify_svn(None, None, [], + exit_code, out, err = svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) wc_status.add({ "A_COPY/B" : Item(status=' '), @@ -14455,8 +13783,8 @@ def set_up_natural_history_gap(sbox): # Update the WC to a uniform revision. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], + wc_status) + svntest.actions.run_and_verify_svn(exp_noop_up_out(9), [], 'up', wc_dir) return wc_disk, wc_status @@ -14548,8 +13876,7 @@ def dont_merge_gaps_in_history(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue #3432 'Merge can record mergeinfo from natural history @@ -14643,8 +13970,7 @@ def handle_gaps_in_implicit_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Now reverse merge -r9:2 from 'A@HEAD' to 'A_COPY'. This should be # a no-op since the only operative change made on 'A@HEAD' between r2:9 @@ -14666,8 +13992,7 @@ def handle_gaps_in_implicit_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Now merge all available revisions from 'A' to 'A_COPY'. # The mergeinfo '/A:4' on 'A_COPY' should have no impact on this merge @@ -14687,8 +14012,7 @@ def handle_gaps_in_implicit_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue #3323 'Mergeinfo deleted by a merge should disappear' @@ -14712,43 +14036,42 @@ def mergeinfo_deleted_by_a_merge_should_disappear(sbox): # r7: Merge all available revisions from A/D to A_COPY/D, this creates # mergeinfo on A_COPY/D. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, - None, # Don't check stdout, we test this + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, # Don't check stdout, we test this # type of merge to death elsewhere. [], 'merge', sbox.repo_url + '/A/D', D_COPY_path) svntest.actions.run_and_verify_svn( - None, None, [], 'ci', '-m', + None, [], 'ci', '-m', 'Merge all available revisions from A/D to A_COPY/D', wc_dir) # r8: Copy A_COPY to A_COPY_2, this carries the mergeinf on A_COPY/D # to A_COPY_2/D. - 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_COPY_path, A_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Copy A_COPY to A_COPY_2', wc_dir) # r9: Propdel the mergeinfo on A_COPY/D. - svntest.actions.run_and_verify_svn(None, None,[], + svntest.actions.run_and_verify_svn(None,[], 'pd', SVN_PROP_MERGEINFO, D_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Propdel the mergeinfo on A_COPY/D', wc_dir) # r10: Merge r5 from A to A_COPY_2 so the latter gets some explicit # mergeinfo. - 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', A_COPY_2_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Merge r5 from A to A_COPY_2', wc_dir) # Now merge r9 from A_COPY to A_COPY_2. Since the merge itself cleanly # removes all explicit mergeinfo from A_COPY_2/D, we should not set any # mergeinfo on that subtree describing 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, { 'D' : Item(status=' U'), }) @@ -14809,8 +14132,7 @@ def mergeinfo_deleted_by_a_merge_should_disappear(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # File merge optimization caused segfault during noop file merge @@ -14836,35 +14158,33 @@ def noop_file_merge(sbox): # eligible ranges to be merged to A_COPY/D/H/chi into two discrete # sets: r1-4 and r5-HEAD svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5]], ['U ' + beta_COPY_path + '\n', ' U ' + A_COPY_path + '\n',]), [], 'merge', '-c5', 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 r5 from A to A_COPY', wc_dir) # Update working copy to allow full inheritance and elision. - svntest.actions.run_and_verify_svn(None, exp_noop_up_out(7), [], + svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'up', wc_dir) # Merge all available revisions from A/D/H/chi to A_COPY/D/H/chi. # There are no operative changes in the source, so this should # not produce any output other than mergeinfo updates on # A_COPY/D/H/chi. This is where the segfault occurred. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A/D/H/chi', chi_COPY_path) - svntest.actions.run_and_verify_svn(None, - [' M ' + chi_COPY_path + '\n'], + svntest.actions.run_and_verify_svn([' M ' + chi_COPY_path + '\n'], [], 'st', chi_COPY_path) - svntest.actions.run_and_verify_svn(None, - ['/A/D/H/chi:2-7\n'], + svntest.actions.run_and_verify_svn(['/A/D/H/chi:2-7\n'], [], 'pg', SVN_PROP_MERGEINFO, chi_COPY_path) #---------------------------------------------------------------------- +@SkipUnless(server_has_mergeinfo) @Issue(2690) def copy_then_replace_via_merge(sbox): "copy then replace via merge" @@ -14901,17 +14221,17 @@ def copy_then_replace_via_merge(sbox): main.file_append(AJK_zeta, 'new text') main.file_append(AJL_zeta, 'new text') main.run_svn(None, 'add', AJ) - main.run_svn(None, 'ci', wc_dir, '-m', 'create tree J') # r3 + sbox.simple_commit(message='create tree J') # r3 main.run_svn(None, 'up', wc_dir) # Copy J to the branch via merge main.run_svn(None, 'merge', url_A, branch) - main.run_svn(None, 'ci', wc_dir, '-m', 'merge to branch') # r4 + sbox.simple_commit(message='merge to branch') # r4 main.run_svn(None, 'up', wc_dir) # In A, replace J with a slightly different tree main.run_svn(None, 'rm', AJ) - main.run_svn(None, 'ci', wc_dir, '-m', 'rm AJ') # r5 + sbox.simple_commit(message='rm AJ') # r5 main.run_svn(None, 'up', wc_dir) os.makedirs(AJL) @@ -14921,7 +14241,7 @@ def copy_then_replace_via_merge(sbox): main.file_append(AJL_zeta, 'really new text') main.file_append(AJM_zeta, 'really new text') main.run_svn(None, 'add', AJ) - main.run_svn(None, 'ci', wc_dir, '-m', 'create tree J again') # r6 + sbox.simple_commit(message='create tree J again') # r6 main.run_svn(None, 'up', wc_dir) # Run merge to replace /branch/J in one swell foop. @@ -14961,8 +14281,7 @@ def copy_then_replace_via_merge(sbox): }) actions.run_and_verify_commit(branch_J, expected_output, - expected_status, - None, branch_J) + expected_status) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -14985,33 +14304,32 @@ def record_only_merge(sbox): nu_COPY_path = sbox.ospath('A_COPY/C/nu') # r7 - Copy the branch A_COPY@2 to A2 and update the WC. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', A_COPY_path, A2_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Branch the branch', wc_dir) # r8 - Add A/C/nu and A/B/Z. # Add a new file with mergeinfo in the foreign repos. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', Z_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', Z_path) + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Add subtrees', wc_dir) # r9 - Edit A/C/nu and add a random property on A/B/Z. svntest.main.file_write(nu_path, "New content.\n") - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'propname', 'propval', Z_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Subtree changes', wc_dir) # r10 - Merge r8 from A to A_COPY. - 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) - svntest.actions.run_and_verify_svn(None, - expected_merge_output( + svntest.actions.run_and_verify_svn(expected_merge_output( [[8]], ['A ' + Z_COPY_path + '\n', 'A ' + nu_COPY_path + '\n', @@ -15019,7 +14337,7 @@ def record_only_merge(sbox): [], 'merge', '-c8', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Root merge of r8', wc_dir) @@ -15029,8 +14347,7 @@ def record_only_merge(sbox): # r6 from A/D/H to A_COPY/D/H # r9 from A/C/nu to A_COPY/C/nu # r9 from A/B/Z to A_COPY/B/Z - svntest.actions.run_and_verify_svn(None, - expected_merge_output( + svntest.actions.run_and_verify_svn(expected_merge_output( [[4]], ['U ' + rho_COPY_path + '\n', ' U ' + rho_COPY_path + '\n',]), @@ -15038,32 +14355,29 @@ def record_only_merge(sbox): sbox.repo_url + '/A/D/G/rho', rho_COPY_path) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[6]], ['U ' + omega_COPY_path + '\n', ' U ' + H_COPY_path + '\n',]), [], 'merge', '-c6', sbox.repo_url + '/A/D/H', H_COPY_path) - svntest.actions.run_and_verify_svn(None, - expected_merge_output( + svntest.actions.run_and_verify_svn(expected_merge_output( [[9]], ['U ' + nu_COPY_path + '\n', ' G ' + nu_COPY_path + '\n',]), [], 'merge', '-c9', sbox.repo_url + '/A/C/nu', nu_COPY_path) - svntest.actions.run_and_verify_svn(None, - expected_merge_output( + svntest.actions.run_and_verify_svn(expected_merge_output( [[9]], [' U ' + Z_COPY_path + '\n', ' G ' + Z_COPY_path + '\n']), [], 'merge', '-c9', sbox.repo_url + '/A/B/Z', Z_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Several subtree merges', wc_dir) - 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) # Now do a --record-only merge of r10 and r11 from A_COPY to A2. @@ -15150,7 +14464,7 @@ def record_only_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 0, + [], True, False, '--record-only', A2_path) #---------------------------------------------------------------------- @@ -15171,7 +14485,7 @@ def merge_automatic_conflict_resolution(sbox): # r7 - Make a change on A_COPY that will conflict with r3 on A svntest.main.file_write(psi_COPY_path, "BASE.\n") - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'log msg', wc_dir) # Set up our base expectations, we'll tweak accordingly for each option. @@ -15228,6 +14542,8 @@ def merge_automatic_conflict_resolution(sbox): }) expected_disk.tweak('D/H/psi', contents="<<<<<<< .working\n" "BASE.\n" + "||||||| .merge-left.r2\n" + "This is the file 'psi'.\n" "=======\n" "New content>>>>>>> .merge-right.r3\n") expected_status.tweak('D/H/psi', status='C ') @@ -15242,14 +14558,13 @@ def merge_automatic_conflict_resolution(sbox): expected_disk, expected_status, expected_skip, - None, - svntest.tree.detect_conflict_files, - list(psi_conflict_support_files), - None, None, 1, 1, + [], True, True, '--accept', 'postpone', '--allow-mixed-revisions', - A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + A_COPY_path, + extra_files= + list(psi_conflict_support_files)) + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) # Test --accept mine-conflict and mine-full @@ -15265,12 +14580,11 @@ def merge_automatic_conflict_resolution(sbox): expected_disk, expected_status, expected_skip, - None, None, None, - None, None, 1, 0, + [], True, False, '--accept', 'mine-conflict', '--allow-mixed-revisions', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3', sbox.repo_url + '/A', None, @@ -15280,12 +14594,11 @@ def merge_automatic_conflict_resolution(sbox): expected_disk, expected_status, expected_skip, - None, None, None, - None, None, 1, 0, + [], True, False, '--accept', 'mine-full', '--allow-mixed-revisions', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) # Test --accept theirs-conflict and theirs-full @@ -15301,12 +14614,11 @@ def merge_automatic_conflict_resolution(sbox): expected_disk, expected_status, expected_skip, - None, None, None, - None, None, 1, 0, + [], True, False, '--accept', 'theirs-conflict', '--allow-mixed-revisions', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3', sbox.repo_url + '/A', None, @@ -15316,12 +14628,11 @@ def merge_automatic_conflict_resolution(sbox): expected_disk, expected_status, expected_skip, - None, None, None, - None, None, 1, 0, + [], True, False, '--accept', 'theirs-full', '--allow-mixed-revisions', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', wc_dir) # Test --accept base ### TODO: Also test that the output has a 'Resolved' line for this path. @@ -15338,8 +14649,7 @@ def merge_automatic_conflict_resolution(sbox): expected_disk, expected_status, expected_skip, - None, None, None, - None, None, 1, 0, + [], True, False, '--accept', 'base', '--allow-mixed-revisions', A_COPY_path) @@ -15347,6 +14657,7 @@ def merge_automatic_conflict_resolution(sbox): #---------------------------------------------------------------------- # Test for issue #3440 'Skipped paths get incorrect override mergeinfo # during merge'. +@SkipUnless(server_has_mergeinfo) @Issue(3440) def skipped_files_get_correct_mergeinfo(sbox): "skipped files get correct mergeinfo set" @@ -15377,7 +14688,6 @@ def skipped_files_get_correct_mergeinfo(sbox): # Merge r3 from A to A_COPY, this will create explicit mergeinfo of # '/A:3' on A_COPY. Commit this merge as r8. svntest.actions.run_and_verify_svn( - None, expected_merge_output([[3]], ['U ' + psi_COPY_path + '\n', ' U ' + A_COPY_path + '\n',]), @@ -15395,9 +14705,9 @@ def skipped_files_get_correct_mergeinfo(sbox): # # Issue #3440 occurred when empty mergeinfo was set on A_COPY/D/H, making # it appear that r3 was never merged. - 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) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', '--set-depth=empty', H_COPY_path) expected_status = wc.State(A_COPY_path, { '' : Item(status=' M'), @@ -15458,8 +14768,7 @@ def skipped_files_get_correct_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1) + [], True, True) #---------------------------------------------------------------------- # Test for issue #3115 'Case only renames resulting from merges don't @@ -15476,8 +14785,8 @@ def committed_case_only_move_and_revert(sbox): A_COPY_path = sbox.ospath('A_COPY') # r3: A case-only file rename on the server - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 3.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 3.\n'], [], 'move', sbox.repo_url + '/A/mu', sbox.repo_url + '/A/MU', @@ -15545,8 +14854,7 @@ def committed_case_only_move_and_revert(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 0) + [], True, False) # Commit the merge expected_output = svntest.wc.State(wc_dir, { @@ -15558,8 +14866,7 @@ def committed_case_only_move_and_revert(sbox): wc_status.remove('A_COPY/mu') wc_status.add({'A_COPY/MU': Item(status=' ', wc_rev=4)}) - svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status, - None, wc_dir) + svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status) # In issue #3115 the WC gets corrupted and any subsequent revert # attempts fail with this error: @@ -15577,11 +14884,11 @@ def committed_case_only_move_and_revert(sbox): # ..\..\..\subversion\libsvn_wc\workqueue.c:490: (apr_err=2) # svn: Error restoring text for 'C:\SVN\src-trunk\Debug\subversion\tests # \cmdline\svn-test-work\working_copies\merge_tests-139\A_COPY\MU' - svntest.actions.run_and_verify_svn(None, [], [], 'revert', '-R', wc_dir) + svntest.actions.run_and_verify_svn([], [], 'revert', '-R', wc_dir) # r5: A case-only directory rename on the server - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 5.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 5.\n'], [], 'move', sbox.repo_url + '/A/C', sbox.repo_url + '/A/c', @@ -15614,13 +14921,13 @@ def committed_case_only_move_and_revert(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 0, + [], True, False, '--allow-mixed-revisions', A_COPY_path) #---------------------------------------------------------------------- # This is a test for issue #3221 'Unable to merge into working copy of # deleted branch'. +@SkipUnless(server_has_mergeinfo) @Issue(3221) def merge_into_wc_for_deleted_branch(sbox): "merge into WC of deleted branch should work" @@ -15637,7 +14944,7 @@ def merge_into_wc_for_deleted_branch(sbox): # r7 - Delete the branch on the repository, obviously it still # exists in our WC. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'delete', sbox.repo_url + '/A_COPY', '-m', 'Delete A_COPY directly in repos') @@ -15725,8 +15032,7 @@ def merge_into_wc_for_deleted_branch(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 0) + check_props=True) #---------------------------------------------------------------------- def foreign_repos_del_and_props(sbox): @@ -15739,32 +15045,32 @@ def foreign_repos_del_and_props(sbox): (r2_path, r2_url) = sbox.add_repo_path('fgn') svntest.main.create_repos(r2_path) - svntest.actions.run_and_verify_svn(None, None, [], 'checkout', + svntest.actions.run_and_verify_svn(None, [], 'checkout', r2_url, wc2_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'propset', + svntest.actions.run_and_verify_svn(None, [], 'propset', 'svn:eol-style', 'native', sbox.ospath('iota')) - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', sbox.ospath('A/D'), sbox.ospath('D')) - svntest.actions.run_and_verify_svn(None, None, [], 'rm', + svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.ospath('A/D'), sbox.ospath('D/G')) new_file = sbox.ospath('new-file') svntest.main.file_write(new_file, 'new-file') - svntest.actions.run_and_verify_svn(None, None, [], 'add', new_file) + svntest.actions.run_and_verify_svn(None, [], 'add', new_file) - svntest.actions.run_and_verify_svn(None, None, [], 'propset', + svntest.actions.run_and_verify_svn(None, [], 'propset', 'svn:eol-style', 'native', new_file) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', wc_dir, + svntest.actions.run_and_verify_svn(None, [], 'commit', wc_dir, '-m', 'changed') - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url, wc2_dir, '-r', '0:1') @@ -15778,10 +15084,10 @@ def foreign_repos_del_and_props(sbox): expected_status = svntest.actions.get_virginal_state(wc2_dir, 1) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', wc2_dir, + svntest.actions.run_and_verify_svn(None, [], 'commit', wc2_dir, '-m', 'Merged r1') - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url, wc2_dir, '-r', '1:2', '--allow-mixed-revisions') @@ -15809,7 +15115,7 @@ def foreign_repos_del_and_props(sbox): " svn:eol-style\n", "Properties on '%s':\n" % (os.path.join(wc2_dir, 'new-file')), " svn:eol-style\n" ] - svntest.actions.run_and_verify_svn(None, expected_output, [], 'proplist', + svntest.actions.run_and_verify_svn(expected_output, [], 'proplist', os.path.join(wc2_dir, 'iota'), os.path.join(wc2_dir, 'new-file')) @@ -15828,7 +15134,7 @@ def immediate_depth_merge_creates_minimal_subtree_mergeinfo(sbox): B_COPY_path = sbox.ospath('A_COPY/B') - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Merge -c5 from A/B to A_COPY/B at --depth immediates. # This should create only the minimum subtree mergeinfo @@ -15875,13 +15181,14 @@ def immediate_depth_merge_creates_minimal_subtree_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1, '--depth', 'immediates', + [], True, True, + '--depth', 'immediates', B_COPY_path) #---------------------------------------------------------------------- # Test for issue #3646 'cyclic --record-only merges create self-referential # mergeinfo' +@SkipUnless(server_has_mergeinfo) @Issue(3646) def record_only_merge_creates_self_referential_mergeinfo(sbox): "merge creates self referential mergeinfo" @@ -15902,15 +15209,15 @@ def record_only_merge_creates_self_referential_mergeinfo(sbox): # Make a change to A/mu in r2. svntest.main.file_write(mu_path, "Trunk edit\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'trunk edit', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'trunk edit', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Copy A to A-branch in r3 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', A_path, A_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Branch A to A-branch', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Merge A-branch back to A. This should record the mergeinfo '/A-branch:3' # on A. @@ -15971,7 +15278,7 @@ def record_only_merge_creates_self_referential_mergeinfo(sbox): expected_A_disk, expected_A_status, expected_A_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--record-only', A_path) #---------------------------------------------------------------------- @@ -15991,44 +15298,44 @@ def dav_skelta_mode_causes_spurious_conflicts(sbox): A_branch_path = sbox.ospath('A-branch') C_branch_path = sbox.ospath('A-branch/C') - # r2 - Set some intial properties: + # r2 - Set some initial properties: # # 'dir-prop'='value1' on A/C. # 'svn:eol-style'='native' on A/mu. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'dir-prop', 'initial-val', C_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'svn:eol-style', 'native', mu_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Set some properties', wc_dir) # r3 - Branch 'A' to 'A-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, A_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Create a branch of A', wc_dir) # r4 - Make a text mod to 'A/mu' and add new props to 'A/mu' and 'A/C': svntest.main.file_write(mu_path, "The new mu!\n") - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'prop-name', 'prop-val', mu_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'another-dir-prop', 'initial-val', C_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Edit a file and make some prop changes', wc_dir) # r5 - Modify the sole property on 'A-branch/C': - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ps', 'dir-prop', 'branch-val', C_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'prop mod on branch', wc_dir) # Now merge r4 from 'A' to 'A-branch'. @@ -16055,7 +15362,7 @@ def dav_skelta_mode_causes_spurious_conflicts(sbox): # Summary of conflicts: # Text conflicts: 1 # Property conflicts: 1 - 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_branch_path, { 'mu' : Item(status='UU'), 'C' : Item(status=' U'), @@ -16121,7 +15428,7 @@ def dav_skelta_mode_causes_spurious_conflicts(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1) + [], True, True) #---------------------------------------------------------------------- @@ -16165,8 +15472,8 @@ def merge_into_locally_added_file(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - True, True, new_path) + [], True, True, + new_path) sbox.simple_commit() #---------------------------------------------------------------------- @@ -16226,13 +15533,14 @@ def merge_into_locally_added_directory(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - True, True, new_dir_path) + [], True, True, + new_dir_path) sbox.simple_commit() #---------------------------------------------------------------------- # Test for issue #2915 'Handle mergeinfo for subtrees missing due to removal # by non-svn command' +@SkipUnless(server_has_mergeinfo) @Issue(2915) def merge_with_os_deleted_subtrees(sbox): "merge tracking fails if target missing subtrees" @@ -16277,7 +15585,7 @@ def merge_with_os_deleted_subtrees(sbox): "|(.*A_COPY" + re_sep + "C\n)" + \ "|(.*A_COPY" + re_sep + "D" + re_sep + "H" + re_sep + "psi\n)" exit_code, out, err = svntest.actions.run_and_verify_svn( - "Missing subtrees should raise error", [], svntest.verify.AnyOutput, + [], svntest.verify.AnyOutput, 'merge', sbox.repo_url + '/A', A_COPY_path) svntest.verify.verify_outputs("Merge failed but not in the way expected", err, None, err_re + missing, None, @@ -16289,7 +15597,7 @@ def merge_with_os_deleted_subtrees(sbox): missing = "|(.*A_COPY" + re_sep + "mu\n)" + \ "|(.*A_COPY" + re_sep + "C\n)" exit_code, out, err = svntest.actions.run_and_verify_svn( - "Missing subtrees should raise error", [], svntest.verify.AnyOutput, + [], svntest.verify.AnyOutput, 'merge', sbox.repo_url + '/A', A_COPY_path, '--depth=immediates') svntest.verify.verify_outputs("Merge failed but not in the way expected", err, None, err_re + missing, None, True) @@ -16299,7 +15607,7 @@ def merge_with_os_deleted_subtrees(sbox): # as missing. missing = "|(.*A_COPY" + re_sep + "mu\n)" exit_code, out, err = svntest.actions.run_and_verify_svn( - "Missing subtrees should raise error", [], svntest.verify.AnyOutput, + [], svntest.verify.AnyOutput, 'merge', sbox.repo_url + '/A', A_COPY_path, '--depth=files') svntest.verify.verify_outputs("Merge failed but not in the way expected", err, None, err_re + missing, None, True) @@ -16308,7 +15616,6 @@ def merge_with_os_deleted_subtrees(sbox): # Only the...oh, wait, the target is present and that is as deep # as the merge goes, so this merge should succeed! svntest.actions.run_and_verify_svn( - "Depth empty merge should succeed as long at the target is present", svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path, '--depth=empty') @@ -16338,45 +15645,43 @@ def no_self_referential_or_nonexistent_inherited_mergeinfo(sbox): # r7 - Add the file A/C/nu svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Add file', wc_dir) # r8 - Sync merge A to A_COPY svntest.actions.run_and_verify_svn( - "Synch merge failed unexpectedly", svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Sync A_COPY with A', wc_dir) # r9 - Add the subtree A/D/J # A/D/J/zeta - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', J_path) + svntest.actions.run_and_verify_svn(None, [], 'mkdir', J_path) svntest.main.file_write(zeta_path, "This is the file 'zeta'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', zeta_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'add', zeta_path) + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Add subtree', wc_dir) # Update the WC in preparation for merges. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # r10 - Sync merge A to A_COPY svntest.actions.run_and_verify_svn( - "Synch merge failed unexpectedly", svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Sync A_COPY with A', wc_dir) # r11 - Text changes to A/C/nu and A/D/J/zeta. svntest.main.file_write(nu_path, "This is the EDITED file 'nu'.\n") svntest.main.file_write(zeta_path, "This is the EDITED file 'zeta'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Edit added files', wc_dir) # Update the WC in preparation for merges. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # This test is marked as XFail because the following two merges # create mergeinfo with both non-existent path-revs and self-referential @@ -16412,8 +15717,7 @@ def no_self_referential_or_nonexistent_inherited_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Merge all available revisions from A/D/J to A_COPY/D/J. Like the # previous merge, the target should not have any non-existent ('/A/D/J:2-8') @@ -16443,8 +15747,7 @@ def no_self_referential_or_nonexistent_inherited_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) #---------------------------------------------------------------------- # Test for issue #3756 'subtree merge can inherit invalid working mergeinfo', @@ -16470,26 +15773,25 @@ def subtree_merges_inherit_invalid_working_mergeinfo(sbox): # r7 - Add the file A/C/nu svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Add file', wc_dir) # r8 Merge c7 from A to A_COPY. svntest.actions.run_and_verify_svn( - "Merge failed unexpectedly", svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path, '-c7') - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Merge subtree file addition', wc_dir) # r9 - A text change to A/C/nu. svntest.main.file_write(nu_path, "This is the EDITED file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'commit', + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'Edit added file', wc_dir) # Update the WC in preparation for merges. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Now do two merges. The first, r3 to the root of the branch A_COPY. # This creates working mergeinfo '/A:3,7' on A_COPY. Then do a subtree @@ -16503,15 +15805,12 @@ def subtree_merges_inherit_invalid_working_mergeinfo(sbox): # Currently this test is marked as XFail because the resulting mergeinfo is # '/A/C/nu:3,7,9' and thus includes a non-existent path-rev. svntest.actions.run_and_verify_svn( - "Merge failed unexpectedly", svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A', A_COPY_path, '-c3') svntest.actions.run_and_verify_svn( - "Merge failed unexpectedly", svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A/C/nu', nu_COPY_path, '-c9') svntest.actions.run_and_verify_svn( - "Subtree merge under working merge produced the wrong mergeinfo", '/A/C/nu:9', [], 'pg', SVN_PROP_MERGEINFO, nu_COPY_path) @@ -16519,6 +15818,7 @@ def subtree_merges_inherit_invalid_working_mergeinfo(sbox): # Test for issue #3686 'executable flag not correctly set on merge' # See http://subversion.tigris.org/issues/show_bug.cgi?id=3686 @Issue(3686) +@SkipUnless(server_has_mergeinfo) @SkipUnless(svntest.main.is_posix_os) def merge_change_to_file_with_executable(sbox): "executable flag is maintained during binary merge" @@ -16534,18 +15834,18 @@ def merge_change_to_file_with_executable(sbox): beta_path = sbox.ospath('A/B/E/beta') # Force one of the files to be a binary type - svntest.actions.run_and_verify_svn2(None, None, + svntest.actions.run_and_verify_svn2(None, binary_mime_type_on_text_file_warning, 0, 'propset', 'svn:mime-type', 'application/octet-stream', alpha_path) # Set the 'svn:executable' property on both files - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'svn:executable', 'ON', beta_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'propset', 'svn:executable', 'ON', alpha_path) @@ -16565,7 +15865,7 @@ def merge_change_to_file_with_executable(sbox): raise svntest.Failure("beta is not marked as executable before commit") # Create the branch - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', trunk_url, sbox.repo_url + '/branch', '-m', "Creating the Branch") @@ -16577,7 +15877,7 @@ def merge_change_to_file_with_executable(sbox): # Re-root the WC at the branch svntest.main.safe_rmtree(wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'checkout', + svntest.actions.run_and_verify_svn(None, [], 'checkout', sbox.repo_url + '/branch', wc_dir) # Recalculate the paths @@ -16617,8 +15917,7 @@ def merge_change_to_file_with_executable(sbox): expected_disk, expected_status, expected_skip, - None, None, None, - None, None, True, True) + [], True, True) # Verify the executable bit has been set @@ -16662,8 +15961,7 @@ def dry_run_merge_conflicting_binary(sbox): 'A/theta' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # Make the "other" working copy other_wc = sbox.add_wc_path('other') @@ -16679,8 +15977,7 @@ def dry_run_merge_conflicting_binary(sbox): 'A/theta' : Item(status=' ', wc_rev=3), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # In second working copy, append different content to the binary # and attempt to 'svn merge -r 2:3'. @@ -16728,8 +16025,8 @@ def dry_run_merge_conflicting_binary(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - True, True, '--allow-mixed-revisions', + [], True, True, + '--allow-mixed-revisions', other_wc) #---------------------------------------------------------------------- @@ -16746,19 +16043,19 @@ def foreign_repos_prop_conflict(sbox): other_repo_dir, other_repo_url = sbox.add_repo_path("other") other_wc_dir = sbox.add_wc_path("other") svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 1) - svntest.actions.run_and_verify_svn(None, None, [], 'co', other_repo_url, + svntest.actions.run_and_verify_svn(None, [], 'co', other_repo_url, other_wc_dir) # Add properties in the first repos and commit. sbox.simple_propset('red', 'rojo', 'A/D/G') sbox.simple_propset('yellow', 'amarillo', 'A/D/G') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'spenglish', wc_dir) # Tweak properties in the first repos and commit. sbox.simple_propset('red', 'rosso', 'A/D/G') sbox.simple_propset('yellow', 'giallo', 'A/D/G') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'engtalian', wc_dir) # Now, merge the propchange to the *second* working copy. @@ -16766,8 +16063,7 @@ def foreign_repos_prop_conflict(sbox): "A", "D", "G"))] expected_output = expected_merge_output([[3]], expected_output, True, prop_conflicts=1) - svntest.actions.run_and_verify_svn(None, - expected_output, + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-c3', sbox.repo_url, other_wc_dir) @@ -16793,36 +16089,36 @@ def merge_adds_subtree_with_mergeinfo(sbox): # r8 - Add the file A_COPY/C/nu. svntest.main.file_write(nu_COPY_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'add', nu_COPY_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Add a file on the A_COPY branch', wc_dir) # r9 - Cherry pick r8 from A_COPY to A. - 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_COPY', A_path, '-c8') - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Merge r8 from A_COPY to A', wc_dir) # r10 - Make a modification to A_COPY/C/nu svntest.main.file_append(nu_COPY_path, "More work on the A_COPY branch.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Some work on the A_COPY branch', wc_dir) # r9 - Cherry pick r10 from A_COPY/C/nu to A/C/nu. Make some # changes to A/C/nu before committing the merge. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A_COPY/C/nu', nu_path, '-c10') svntest.main.file_append(nu_path, "A faux conflict resolution.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Merge r8 from A_COPY to A', wc_dir) # Sync merge A to A_COPY_2 - 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_COPY2_path, { 'B/E/beta' : Item(status='U '), 'C/nu' : Item(status='A '), @@ -16900,8 +16196,7 @@ def merge_adds_subtree_with_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, False) + check_props=True) #---------------------------------------------------------------------- # A test for issue #3978 'reverse merge which adds subtree fails'. @@ -16922,26 +16217,26 @@ def reverse_merge_adds_subtree(sbox): H_COPY_path = sbox.ospath('A_COPY/D/H') # r7 - Delete A\D\H\chi - svntest.actions.run_and_verify_svn(None, None, [], 'delete', chi_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'delete', chi_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Delete a file', wc_dir) # r8 - Merge r7 from A to A_COPY - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A', A_COPY_path, '-c7') - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Cherry-pick r7 from A to A_COPY', wc_dir) # r9 - File depth sync merge from A/D/H to A_COPY/D/H/ # This shallow merge does not create non-inheritable mergeinfo because of # the issue #4057 fix; all subtrees affected by the diff are present, so # non-inheritable mergeinfo is not required. - 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/D/H', H_COPY_path, '--depth', 'files') - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Cherry-pick r7 from A to A_COPY', wc_dir) # Reverse merge r7 from A to A_COPY @@ -16973,7 +16268,7 @@ def reverse_merge_adds_subtree(sbox): # ..\..\..\subversion\libsvn_subr\mergeinfo.c:504: (apr_err=200022) # ..\..\..\subversion\libsvn_subr\kitchensink.c:57: (apr_err=200022) # svn: E200022: Negative revision number found parsing '-7' - 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_path, { 'D/H/chi' : Item(status='A '), }) @@ -17036,8 +16331,7 @@ def reverse_merge_adds_subtree(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, False) + check_props=True) #---------------------------------------------------------------------- # A test for issue #3989 'merge which deletes file with native eol-style @@ -17057,22 +16351,22 @@ def merged_deletion_causes_tree_conflict(sbox): H_branch_path = sbox.ospath('branch/D/H') # r2 - Set svn:eol-style native on A/D/H/psi - svntest.actions.run_and_verify_svn(None, None, [], 'ps', 'svn:eol-style', + svntest.actions.run_and_verify_svn(None, [], 'ps', 'svn:eol-style', 'native', psi_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Set eol-style native on a path', wc_dir) # r3 - Branch ^/A to ^/branch - svntest.actions.run_and_verify_svn(None, None, [], 'copy', + svntest.actions.run_and_verify_svn(None, [], 'copy', sbox.repo_url + '/A', sbox.repo_url + '/branch', '-m', 'Copy ^/A to ^/branch') - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # r4 - Delete A/D/H/psi - svntest.actions.run_and_verify_svn(None, None, [], 'delete', psi_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'delete', psi_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Delete a a path with native eol-style', wc_dir) @@ -17081,7 +16375,7 @@ def merged_deletion_causes_tree_conflict(sbox): # branch/D/H/psi is, ignoring differences caused by svn:eol-style, identical # to ^/A/D/H/psi when the latter was deleted, so the deletion should merge # cleanly. - 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(H_branch_path, { 'psi' : Item(status='D '), }) @@ -17110,8 +16404,7 @@ def merged_deletion_causes_tree_conflict(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, False) + check_props=True) #---------------------------------------------------------------------- # A test for issue #3976 'record-only merges which add new subtree mergeinfo @@ -17132,7 +16425,7 @@ def record_only_merge_adds_new_subtree_mergeinfo(sbox): H_COPY2_path = sbox.ospath('A_COPY_2/D/H') # r7 - Copy ^/A_COPY to ^/A_COPY_2 - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'copy', '-m', 'copy A_COPY to A_COPY_2', sbox.repo_url + '/A_COPY', sbox.repo_url + '/A_COPY_2') @@ -17144,13 +16437,13 @@ def record_only_merge_adds_new_subtree_mergeinfo(sbox): svntest.main.run_svn(None, 'commit', '-m', 'set svn:eol-style', wc_dir) # r9 - Merge r3 from ^/A/D/H/psi to A_COPY/D/H/psi. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A/D/H/psi', psi_COPY_path, '-c3') svntest.main.run_svn(None, 'commit', '-m', 'Subtree merge', wc_dir) # r10 - Merge r8 from ^/A/D/H/psi to A_COPY/D/H/psi. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], 'merge', sbox.repo_url + '/A/D/H/psi', psi_COPY_path, '-c8') svntest.main.run_svn(None, 'commit', '-m', 'Subtree merge', wc_dir) @@ -17163,7 +16456,7 @@ def record_only_merge_adds_new_subtree_mergeinfo(sbox): # 2) The mergeinfo '/A/D/H/psi:8' from r10. # # 3) The mergeinfo '/A_COPY/D/H/psi:10' describing the merge itself. - 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(H_COPY2_path, { 'psi' : Item(status=' U'), }) @@ -17197,64 +16490,7 @@ def record_only_merge_adds_new_subtree_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, False) - -#---------------------------------------------------------------------- -# Setup helper for issue #4056 and issue #4057 tests. -def noninheritable_mergeinfo_test_set_up(sbox): - '''Starting with standard greek tree, copy 'A' to 'branch' in r2 and - then made a file edit to A/B/lambda in r3. - Return (expected_output, expected_mergeinfo_output, expected_elision_output, - expected_status, expected_disk, expected_skip) for a merge of - r3 from ^/A/B to branch/B.''' - - sbox.build() - wc_dir = sbox.wc_dir - - lambda_path = sbox.ospath('A/B/lambda') - B_branch_path = sbox.ospath('branch/B') - - # r2 - Branch ^/A to ^/branch. - svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A', - sbox.repo_url + '/branch', '-m', 'make a branch') - - # r3 - Make an edit to A/B/lambda. - svntest.main.file_write(lambda_path, "trunk edit.\n") - svntest.main.run_svn(None, 'commit', '-m', 'file edit', wc_dir) - svntest.main.run_svn(None, 'up', wc_dir) - - expected_output = wc.State(B_branch_path, { - 'lambda' : Item(status='U '), - }) - expected_mergeinfo_output = wc.State(B_branch_path, { - '' : Item(status=' U'), - 'lambda' : Item(status=' U'), - }) - expected_elision_output = wc.State(B_branch_path, { - 'lambda' : Item(status=' U'), - }) - expected_status = wc.State(B_branch_path, { - '' : Item(status=' M'), - 'lambda' : Item(status='M '), - 'E' : Item(status=' '), - 'E/alpha' : Item(status=' '), - 'E/beta' : Item(status=' '), - 'F' : Item(status=' '), - }) - expected_status.tweak(wc_rev='3') - expected_disk = wc.State('', { - '' : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}), - 'lambda' : Item("trunk edit.\n"), - 'E' : Item(), - 'E/alpha' : Item("This is the file 'alpha'.\n"), - 'E/beta' : Item("This is the file 'beta'.\n"), - 'F' : Item(), - }) - expected_skip = wc.State(B_branch_path, {}) - - return expected_output, expected_mergeinfo_output, expected_elision_output, \ - expected_status, expected_disk, expected_skip + check_props=True) #---------------------------------------------------------------------- @@ -17298,7 +16534,7 @@ def unnecessary_noninheritable_mergeinfo_missing_subtrees(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, B_branch_path) #---------------------------------------------------------------------- @@ -17341,20 +16577,19 @@ def unnecessary_noninheritable_mergeinfo_shallow_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--depth', 'files', B_branch_path) # Revert the merge and then make a prop change to A/B/E in r4. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', sbox.wc_dir) - svntest.actions.run_and_verify_svn(None, - ["property 'prop:name' set on '" + + svntest.actions.run_and_verify_svn(["property 'prop:name' set on '" + E_path + "'\n"], [], 'ps', 'prop:name', 'propval', E_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'A new property on a dir', sbox.wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'up', sbox.wc_dir) # Merge r4 from ^/A/B to branch/B at operational depth=immediates @@ -17406,7 +16641,7 @@ def unnecessary_noninheritable_mergeinfo_shallow_merge(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1, 1, + [], True, True, '--depth', 'immediates', B_branch_path) #---------------------------------------------------------------------- @@ -17436,14 +16671,14 @@ def svnmucc_abuse_1(sbox): sbox.simple_commit() ## r5: fail to revert it - svntest.actions.run_and_verify_svnmucc(None, None, [], + svntest.actions.run_and_verify_svnmucc(None, [], '-m', 'r5', '-U', sbox.repo_url, 'rm', 'A', 'cp', 'HEAD', 'A', 'A') ## r6: really revert it - svntest.actions.run_and_verify_svnmucc(None, None, [], + svntest.actions.run_and_verify_svnmucc(None, [], '-m', 'r6', '-U', sbox.repo_url, 'rm', 'A', @@ -17496,12 +16731,11 @@ def merge_source_with_replacement(sbox): svntest.main.run_svn(None, 'up', wc_dir) svntest.main.run_svn(None, 'del', A_path) svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A@5', A_path) - svntest.main.run_svn(None, 'ci', '-m', - 'Replace A with older version of itself', wc_dir) + sbox.simple_commit(message='Replace A with older version of itself') # r8: Make an edit to A/D/H/omega: svntest.main.file_write(omega_path, "New content for 'omega'.\n") - svntest.main.run_svn(None, 'ci', '-m', 'file edit', wc_dir) + sbox.simple_commit(message='file edit') # Update and sync merge ^/A to A_COPY. # @@ -17540,14 +16774,13 @@ def merge_source_with_replacement(sbox): 'U ' + psi_COPY_path + '\n', ' U ' + A_COPY_path + '\n', ' G ' + A_COPY_path + '\n',]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', sbox.repo_url + '/A', A_COPY_path) # Misleading notifications are one thing, incorrect mergeinfo is quite # another. - svntest.actions.run_and_verify_svn(None, - [A_COPY_path + ' - /A:2-5,7-8\n'], + svntest.actions.run_and_verify_svn([A_COPY_path + ' - /A:2-5,7-8\n'], [], 'pg', SVN_PROP_MERGEINFO, '-R', A_COPY_path) @@ -17564,7 +16797,7 @@ def merge_source_with_replacement(sbox): ' U ' + A_COPY_path + '\n', ' G ' + A_COPY_path + '\n',], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', sbox.repo_url + '/A', A_COPY_path, '-r8:1') @@ -17594,26 +16827,25 @@ def reverse_merge_with_rename(sbox): wc_disk, wc_status = set_up_branch(sbox) # r7 - Rename ^/A to ^/trunk. - svntest.actions.run_and_verify_svn(None, - ['\n', 'Committed revision 7.\n'], + svntest.actions.run_and_verify_svn(['Committing transaction...\n', + 'Committed revision 7.\n'], [], 'move', sbox.repo_url + '/A', sbox.repo_url + '/trunk', '-m', "Rename 'A' to 'trunk'") - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # r8 - Make and edit to trunk/D/H/omega (which was also edited in r6). svntest.main.file_write(omega_path, "Edit 'omega' on trunk.\n") - svntest.main.run_svn(None, 'ci', '-m', 'Another omega edit', wc_dir) + sbox.simple_commit(message='Another omega edit') # r9 - Sync merge ^/trunk to A_COPY. - svntest.actions.run_and_verify_svn(None, - None, # Don't check stdout, we test this + svntest.actions.run_and_verify_svn(None, # Don't check stdout, we test this # type of merge to death elsewhere. [], 'merge', sbox.repo_url + '/trunk', A_COPY_path) - svntest.main.run_svn(None, 'ci', '-m', 'Sync A_COPY with ^/trunk', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + sbox.simple_commit(message='Sync A_COPY with ^/trunk') + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Reverse merge -r9:1 from ^/trunk to A_COPY. This should return # A_COPY to the same state it had prior to the sync merge in r2. @@ -17649,7 +16881,7 @@ def reverse_merge_with_rename(sbox): 'U ' + psi_COPY_path + '\n', ' U ' + A_COPY_path + '\n', ' G ' + A_COPY_path + '\n',], elides=True) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', sbox.repo_url + '/trunk', A_COPY_path, '-r9:1') @@ -17673,18 +16905,18 @@ def merge_adds_then_deletes_subtree(sbox): nu_branch_path = sbox.ospath('branch/C/nu') # Make a branch. - svntest.actions.run_and_verify_svn(None, None, [], 'copy', + svntest.actions.run_and_verify_svn(None, [], 'copy', sbox.repo_url + '/A', sbox.repo_url + '/branch', '-m', 'Make a branch.') # On the branch parent: Add a file in r3 and then delete it in r4. svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir, + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', wc_dir, '-m', 'Add a file') - svntest.actions.run_and_verify_svn(None, None, [], 'delete', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir, + svntest.actions.run_and_verify_svn(None, [], 'delete', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', wc_dir, '-m', 'Delete a file') # Merge r3 and r4 from ^/A/C to branch/C as part of one merge @@ -17715,9 +16947,8 @@ def merge_adds_then_deletes_subtree(sbox): # svn: E155010: The node 'C:\SVN\src-trunk\Debug\subversion\tests # \cmdline\svn-test-work\working_copies\merge_tests-128\branch\C\nu' # was not found. - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) svntest.actions.run_and_verify_svn( - None, expected_merge_output([[3],[4]], ['A ' + nu_branch_path + '\n', 'D ' + nu_branch_path + '\n', @@ -17752,35 +16983,35 @@ def merge_with_added_subtrees_with_mergeinfo(sbox): wc_disk, wc_status = set_up_branch(sbox, nbr_of_branches=2) # r8 - Add a subtree under A. - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', '--parents', + svntest.actions.run_and_verify_svn(None, [], 'mkdir', '--parents', Z_path) svntest.main.file_write(nu_path, "This is the file 'nu'.\n") - svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir, + svntest.actions.run_and_verify_svn(None, [], 'add', nu_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', wc_dir, '-m', 'Add a subtree on our "trunk"') # r9 - Sync ^/A to the first branch A_COPY. - 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', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir, + svntest.actions.run_and_verify_svn(None, [], 'ci', wc_dir, '-m', 'Sync ^/A to ^/A_COPY') # r10 - Make some edits on the first branch. - svntest.actions.run_and_verify_svn(None, None, [], 'ps', 'branch-prop-foo', + svntest.actions.run_and_verify_svn(None, [], 'ps', 'branch-prop-foo', 'bar', Y_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', W_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir, + svntest.actions.run_and_verify_svn(None, [], 'mkdir', W_COPY_path) + svntest.actions.run_and_verify_svn(None, [], 'ci', wc_dir, '-m', 'Make some edits on "branch 1"') # r11 - Cherry-pick r10 on the first branch back to A, but # do so at depth=empty so non-inheritable mergeinfo is created. - 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, [], 'merge', '-c10', '--depth=empty', sbox.repo_url + '/A_COPY/C/X/Y', Y_path) svntest.actions.run_and_verify_svn( - None, None, [], 'ci', wc_dir, + None, [], 'ci', wc_dir, '-m', 'Depth empty subtree cherry pick from "branch 1" to "trunk"') # Sync ^/A to the second branch A_COPY_2. @@ -17821,7 +17052,7 @@ def merge_with_added_subtrees_with_mergeinfo(sbox): # svn:mergeinfo # /A/C/X/Y/Z:8-11 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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_COPY2_path, { 'B/E/beta' : Item(status='U '), 'D/G/rho' : Item(status='U '), @@ -17899,8 +17130,7 @@ def merge_with_added_subtrees_with_mergeinfo(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 0) + check_props=True) #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -17923,34 +17153,33 @@ def merge_with_externals_with_mergeinfo(sbox): wc_disk, wc_status = set_up_branch(sbox) svntest.main.file_write(mu_COPY_path, "branch edit") - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'file edit on the branch', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) # Create a file external under 'A' and set some bogus mergeinfo # on it (the fact that this mergeinfo is bogus has no bearing on # this test). - svntest.actions.run_and_verify_svn(None, None, [], 'propset', + svntest.actions.run_and_verify_svn(None, [], 'propset', 'svn:externals', '^/iota file-external', A_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'set file external', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - svntest.actions.run_and_verify_svn(None, None, [], 'ps', SVN_PROP_MERGEINFO, + svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, [], 'ps', SVN_PROP_MERGEINFO, "/bogus-mergeinfo:5", file_external_path) - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'set mergeinfo on file external', file_external_path) # Sync merge ^/A to A_COPY and then reintegrate A_COPY back to A. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', + svntest.actions.run_and_verify_svn(None, [], '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', 'sync merge', wc_dir) # This was segfaulting, see # http://svn.haxx.se/dev/archive-2012-10/0364.shtml svntest.actions.run_and_verify_svn( - None, expected_merge_output(None, ['U ' + mu_path + '\n', ' U ' + A_path + '\n'], @@ -18020,7 +17249,6 @@ def merge_binary_file_with_keywords(sbox): # merge back svntest.actions.run_and_verify_svn( - None, expected_merge_output([[3,4]], ['C ' + sbox.ospath(file_mod_both) + '\n', 'U ' + sbox.ospath(file_mod_src) + '\n', @@ -18063,7 +17291,6 @@ def merge_conflict_when_keywords_removed(sbox): # sync merge svntest.actions.run_and_verify_svn( - None, expected_merge_output([[3,4]], ['U '+ sbox.ospath('A2/keyfile') + '\n', ' U A2\n']), @@ -18078,7 +17305,6 @@ def merge_conflict_when_keywords_removed(sbox): # sync merge again svntest.actions.run_and_verify_svn( - None, expected_merge_output([[5,6]], ['UU ' + sbox.ospath('A2/keyfile') + '\n', ' U A2\n']), @@ -18119,7 +17345,7 @@ def merge_target_selection(sbox): '--- Recording mergeinfo for merge of r4 into \'.\':\n', ' U .\n', ] - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '^/dir', '-c', '4') svntest.main.run_svn(None, 'revert', '-R', '.') @@ -18131,7 +17357,7 @@ def merge_target_selection(sbox): '--- Recording mergeinfo for merge of r4 into \'binary-file\':\n', ' U binary-file\n', ] - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '^/dir/binary-file', '-c', '4') svntest.main.run_svn(None, 'revert', '-R', '.') @@ -18143,7 +17369,7 @@ def merge_target_selection(sbox): '--- Recording mergeinfo for merge of r4 into \'.\':\n', ' U .\n', ] - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '^/dir', '-c', '4', '.') svntest.main.run_svn(None, 'revert', '-R', '.') @@ -18155,7 +17381,7 @@ def merge_target_selection(sbox): '--- Recording mergeinfo for merge of r4 into \'binary-file\':\n', ' U binary-file\n', ] - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '^/dir/binary-file', '-c', '4', 'binary-file') svntest.main.run_svn(None, 'revert', '-R', '.') @@ -18167,7 +17393,7 @@ def merge_target_selection(sbox): '--- Recording mergeinfo for merge of r4 into \'.\':\n', ' U .\n', ] + svntest.main.summary_of_conflicts(tree_conflicts=1) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '^/dir/binary-file', '-c', '4', '.') svntest.main.run_svn(None, 'revert', '-R', '.') @@ -18179,10 +17405,11 @@ def merge_target_selection(sbox): '--- Recording mergeinfo for merge of r4 into \'binary-file\':\n', ' U binary-file\n', ] + svntest.main.summary_of_conflicts(tree_conflicts=1) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '^/dir', '-c', '4', 'binary-file') -@Issue(3405) +@SkipUnless(server_has_mergeinfo) +@Issue(3405) # seems to be the wrong issue number def merge_properties_on_adds(sbox): "merged directory properties are added" @@ -18200,7 +17427,7 @@ def merge_properties_on_adds(sbox): sbox.simple_commit() sbox.simple_update() - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '^/A/D/G', sbox.ospath('G')) expected_output = svntest.verify.UnorderedOutput([ @@ -18215,7 +17442,7 @@ def merge_properties_on_adds(sbox): 'Properties on \'%s\':\n' % sbox.ospath('G/M/file'), ' key\n', ]) - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'proplist', '-R', sbox.ospath('G')) expected_output = svntest.verify.UnorderedOutput([ @@ -18232,7 +17459,7 @@ def merge_properties_on_adds(sbox): # I merged the tree, which should include history but only the files have # the properties stored in PRISTINE. All directories have the properties # as local changes in ACTUAL. - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'proplist', '-R', sbox.ospath('G'), '-r', 'BASE') @@ -18404,7 +17631,7 @@ def check_mergeinfo(expected_mergeinfo, tgt_ospath): EXPECTED_MERGEINFO (list of lines). """ svntest.actions.run_and_verify_svn( - None, expected_mergeinfo, [], 'pg', SVN_PROP_MERGEINFO, tgt_ospath) + expected_mergeinfo, [], 'pg', SVN_PROP_MERGEINFO, tgt_ospath) def simple_merge(src_path, tgt_ospath, rev_args): """Merge from ^/SRC_PATH to TGT_OSPATH using revision arguments REV_ARGS @@ -18419,7 +17646,7 @@ def simple_merge(src_path, tgt_ospath, rev_args): target=tgt_ospath) src_url = '^/' + src_path svntest.actions.run_and_verify_svn( - None, expected_out, [], + expected_out, [], 'merge', src_url, tgt_ospath, '--accept', 'postpone', *rev_args) @SkipUnless(server_has_mergeinfo) @@ -18463,14 +17690,14 @@ def conflict_aborted_mergeinfo_described_partial_merge(sbox): sbox.simple_commit() # r14: merge some changes to the branch so that later merges will be split - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c5,9', + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c5,9', '^/' + trunk, sbox.ospath(branch), '--accept', 'theirs-conflict') sbox.simple_commit() sbox.simple_update() def revert_branch(): - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', sbox.ospath(branch)) def try_merge(relpath, conflict_rev, rev_args, @@ -18501,7 +17728,7 @@ def conflict_aborted_mergeinfo_described_partial_merge(sbox): src_url = '^/' + src_path svntest.actions.run_and_verify_svn( - None, expected_out, expected_err, + expected_out, expected_err, 'merge', src_url, tgt_ospath, '--accept', 'postpone', *rev_args) @@ -18645,9 +17872,9 @@ def multiple_editor_drive_merge_notifications(sbox): sbox.simple_commit() # Cherry pick merge r5 and r6 to each branch and commit. - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/iota', + svntest.actions.run_and_verify_svn(None, [], 'merge', '^/iota', '-c', '5,7', iota_branch_path) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/A/C', + svntest.actions.run_and_verify_svn(None, [], 'merge', '^/A/C', '-c', '5,7', C_branch_path) sbox.simple_commit() @@ -18658,7 +17885,6 @@ def multiple_editor_drive_merge_notifications(sbox): # re checking the merge notification headers -- which need to be improved # at some point. svntest.actions.run_and_verify_svn( - None, ["--- Merging r2 through r4 into '" + C_branch_path + "':\n", " U " + C_branch_path + "\n", "--- Merging r6 into '" + C_branch_path + "':\n", @@ -18693,7 +17919,6 @@ def multiple_editor_drive_merge_notifications(sbox): # --- Recording mergeinfo for merge of r2 through r9 into 'iota-copy': # U iota-copy svntest.actions.run_and_verify_svn( - None, ["--- Merging r2 through r4 into '" + iota_branch_path + "':\n", " U " + iota_branch_path + "\n", "--- Merging r6 into '" + iota_branch_path + "':\n", @@ -18726,7 +17951,7 @@ def single_editor_drive_merge_notifications(sbox): set_up_branch(sbox) # r7 - Subtree merge - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/A/D', + svntest.actions.run_and_verify_svn(None, [], 'merge', '^/A/D', '-c4', D_copy_path) sbox.simple_commit() sbox.simple_update() @@ -18766,13 +17991,13 @@ def single_editor_drive_merge_notifications(sbox): " U " + D_copy_path + "\n", "--- Eliding mergeinfo from '" + D_copy_path + "':\n", " U " + D_copy_path + "\n"]) - svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge', + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', sbox.repo_url + '/A', A_copy_path) # r8 and r9 - Commit and do reverse subtree merge. sbox.simple_commit() sbox.simple_update() - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/A/D', + svntest.actions.run_and_verify_svn(None, [], 'merge', '^/A/D', '-c-4', D_copy_path) sbox.simple_commit() @@ -18793,7 +18018,7 @@ def single_editor_drive_merge_notifications(sbox): " U " + D_copy_path + "\n", "--- Eliding mergeinfo from '" + D_copy_path + "':\n", " U " + D_copy_path + "\n"]) - svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge', + svntest.actions.run_and_verify_svn(expected_output, [], 'merge', '-r9:2', sbox.repo_url + '/A', A_copy_path) @@ -18841,14 +18066,14 @@ def conflicted_split_merge_with_resolve(sbox): sbox.simple_commit() # r14: merge some changes to the branch so that later merges will be split - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c5,9', + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c5,9', '^/' + trunk, sbox.ospath(branch), '--accept', 'theirs-conflict') sbox.simple_commit() sbox.simple_update() def revert_branch(): - svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', + svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', sbox.ospath(branch)) def try_merge(relpath, conflict_rev, rev_args, @@ -18879,7 +18104,7 @@ def conflicted_split_merge_with_resolve(sbox): src_url = '^/' + src_path + '@11' svntest.actions.run_and_verify_svn( - None, expected_out, expected_err, + expected_out, expected_err, 'merge', src_url, tgt_ospath, '--accept', 'mine-full', *rev_args) @@ -19021,7 +18246,7 @@ def merge_to_empty_target_merge_to_infinite_target(sbox): C1_path = sbox.ospath('A/C/C1') test3_path = sbox.ospath('A/C/C1/test.txt') - + # r3 - Add some subtrees: # A /A/B/B1 # A /A/B/B1/B1a @@ -19048,16 +18273,16 @@ def merge_to_empty_target_merge_to_infinite_target(sbox): sbox.simple_commit() # r6 - Set depth of A_COPY to empty, merge all available revs from ^/A. - svntest.actions.run_and_verify_svn(None, None, [], 'up', + svntest.actions.run_and_verify_svn(None, [], 'up', '--set-depth=empty', A_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'up', + svntest.actions.run_and_verify_svn(None, [], 'up', '--set-depth=infinity', C_COPY_path) - svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/A', + svntest.actions.run_and_verify_svn(None, [], 'merge', '^/A', A_COPY_path) sbox.simple_commit() # Update A_COPY back to depth infinity and retry the prior merge. - svntest.actions.run_and_verify_svn(None, None, [], 'up', + svntest.actions.run_and_verify_svn(None, [], 'up', '--set-depth=infinity', A_COPY_path) expected_output = wc.State(A_COPY_path, { @@ -19137,36 +18362,11 @@ def merge_to_empty_target_merge_to_infinite_target(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, - None, 1, 0) + [], True, False) # Commit the merge. #sbox.simple_commit() -def merge_dir_delete_force(sbox): - "merge a directory delete with --force" - - sbox.build() - - sbox.simple_rm('A/D/G') - sbox.simple_commit() # r2 - - sbox.simple_update(revision=1) - - # Just merging r2 on r1 succeeds - svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [], - 'merge', '-c2', '^/', sbox.wc_dir, - '--ignore-ancestry') - - # Bring working copy to r1 again - svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [], - 'revert', '-R', sbox.wc_dir) - - # But when using --force this same merge caused a segfault in 1.8.0-1.8.8 - svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [], - 'merge', '-c2', '^/', sbox.wc_dir, - '--ignore-ancestry', '--force') - def conflict_naming(sbox): "verify conflict file naming" @@ -19196,6 +18396,8 @@ def conflict_naming(sbox): 'file.txt.r2' : Item(contents="This is the initial content\n"), 'file.txt' : Item(contents="<<<<<<< .mine\n" \ "This is conflicting content\n" \ + "||||||| .r3\n" \ + "This is the new content\n" \ "=======\n" \ "This is the initial content\n" \ ">>>>>>> .r2\n"), @@ -19204,8 +18406,7 @@ def conflict_naming(sbox): svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, - None, None, None, + [], False, wc_dir, '-r', '2') sbox.simple_revert('file.txt') @@ -19227,6 +18428,8 @@ def conflict_naming(sbox): 'file.txt.r2.txt' : Item(contents="This is the initial content\n"), 'file.txt' : Item(contents="<<<<<<< .mine.txt\n" \ "This is conflicting content\n" \ + "||||||| .r3.txt\n" \ + "This is the new content\n" \ "=======\n" \ "This is the initial content\n" \ ">>>>>>> .r2.txt\n"), @@ -19235,7 +18438,7 @@ def conflict_naming(sbox): svntest.actions.run_and_verify_update( wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, None, + [], False, wc_dir, '-r', '2', '--config-option', 'config:miscellany:preserved-conflict-file-exts=' + @@ -19256,13 +18459,15 @@ def conflict_naming(sbox): 'file.txt.merge-right.r2': Item(contents="This is the initial content\n"), 'file.txt' : Item(contents="<<<<<<< .working\n" \ "This is conflicting content\n" \ + "||||||| .merge-left.r3\n" \ + "This is the new content\n" \ "=======\n" \ "This is the initial content\n" \ ">>>>>>> .merge-right.r2\n"), 'file.txt.working' : Item(contents="This is conflicting content\n"), }) - svntest.actions.run_and_verify_svn(wc_dir, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c-3', '^/', sbox.ospath('')) svntest.actions.run_and_verify_status(wc_dir, expected_status) svntest.actions.verify_disk(wc_dir, expected_disk) @@ -19281,6 +18486,8 @@ def conflict_naming(sbox): 'file.txt.merge-right.r2.txt': Item(contents="This is the initial content\n"), 'file.txt' : Item(contents="<<<<<<< .working.txt\n" \ "This is conflicting content\n" \ + "||||||| .merge-left.r3.txt\n" \ + "This is the new content\n" \ "=======\n" \ "This is the initial content\n" \ ">>>>>>> .merge-right.r2.txt\n"), @@ -19288,7 +18495,7 @@ def conflict_naming(sbox): }) svntest.actions.run_and_verify_svn( - wc_dir, None, [], + None, [], 'merge', '-c-3', '^/', sbox.ospath(''), '--config-option', 'config:miscellany:preserved-conflict-file-exts=' + @@ -19296,6 +18503,30 @@ def conflict_naming(sbox): svntest.actions.run_and_verify_status(wc_dir, expected_status) svntest.actions.verify_disk(wc_dir, expected_disk) +def merge_dir_delete_force(sbox): + "merge a directory delete with --force" + + sbox.build() + + sbox.simple_rm('A/D/G') + sbox.simple_commit() # r2 + + sbox.simple_update(revision=1) + + # Just merging r2 on r1 succeeds + svntest.actions.run_and_verify_svn(None, [], + 'merge', '-c2', '^/', sbox.wc_dir, + '--ignore-ancestry') + + # Bring working copy to r1 again + svntest.actions.run_and_verify_svn(None, [], + 'revert', '-R', sbox.wc_dir) + + # But when using --force this same merge caused a segfault in 1.8.0-1.8.8 + svntest.actions.run_and_verify_svn(None, [], + 'merge', '-c2', '^/', sbox.wc_dir, + '--ignore-ancestry', '--force') + ######################################################################## # Run the tests @@ -19441,8 +18672,8 @@ test_list = [ None, single_editor_drive_merge_notifications, conflicted_split_merge_with_resolve, merge_to_empty_target_merge_to_infinite_target, - merge_dir_delete_force, conflict_naming, + merge_dir_delete_force, ] if __name__ == '__main__': |