Experimental patch to disable the "merge kludge" which I believe is no longer necessary. This disables the kludge for merge_tests.py 1 through 50. With this patch, if merge_tests.py 1 through 50 still pass on all systems, this removal is successful. (Many of merge_tests.py 51 onwards will fail along with log_tests.py 27.) * subversion/tests/cmdline/merge_tests.py (shorten_path_kludge): Disable. In several test functions, disable the initial 'chdir' used with the kludge. Index: subversion/tests/cmdline/merge_tests.py =================================================================== --- subversion/tests/cmdline/merge_tests.py (revision 32586) +++ subversion/tests/cmdline/merge_tests.py (working copy) @@ -41,7 +41,8 @@ def shorten_path_kludge(path): this file, to understand why we shorten, and subsequently chdir() after calling this function.''' shorten_by = len(svntest.main.work_dir) + len(os.sep) - return path[shorten_by:] +# return path[shorten_by:] + return path def expected_merge_output(rev_ranges, additional_lines=None, foreign=False): """Generate an (inefficient) regex representing the expected merge @@ -490,7 +491,7 @@ def add_with_history(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_C_path, '1', '2', F_url, expected_output, expected_disk, @@ -1128,7 +1129,7 @@ def merge_similar_unrelated_trees(sbox): # Search for the comment entitled "The Merge Kluge" elsewhere in # this file, to understand why we shorten and chdir() below. saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # run_and_verify_merge doesn't support 'svn merge URL URL path' svntest.actions.run_and_verify_svn(None, None, [], 'merge', @@ -1563,7 +1564,7 @@ def merge_binary_file (sbox): }) expected_skip = wc.State('', { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_other_wc, '2', '3', sbox.repo_url, expected_output, @@ -1641,7 +1642,7 @@ def three_way_merge_add_of_existing_bina expected_status.remove("iota") expected_skip = wc.State("", { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # If we merge into short_wc alone, theta appears at the WC root, # which is in the wrong location -- append "/A" to stay on target. svntest.actions.run_and_verify_merge2(short_wc + "/A", "2", "3", @@ -1709,7 +1710,7 @@ def merge_in_new_file_and_diff(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_branch_path, '1', 'HEAD', trunk_url, expected_output, @@ -1805,7 +1806,7 @@ def merge_skips_obstructions(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_C_path, '1', '2', F_url, expected_output, expected_disk, @@ -1848,7 +1849,7 @@ def merge_skips_obstructions(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_C_path, '1', '2', F_url, expected_output, expected_disk, @@ -1910,7 +1911,7 @@ def merge_skips_obstructions(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_wc_dir, '2', '3', sbox.repo_url, expected_output, @@ -1975,7 +1976,7 @@ def merge_skips_obstructions(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_wc_dir, '3', '4', sbox.repo_url, expected_output, @@ -2016,7 +2017,7 @@ def merge_skips_obstructions(sbox): expected_output = wc.State(short_wc_dir, { }) expected_disk.remove('A/B/lambda') expected_status.tweak('A/B/lambda', status='! ') - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) expected_status.tweak('', status=' ') # Why do we need to --ignore-ancestry? Because the previous merge of r4, # despite being inoperative, set mergeinfo for r4 on the WC. With the @@ -2193,7 +2194,7 @@ def dry_run_adds_file_with_prop(sbox): expected_skip = wc.State('', { }) expected_status = None # status is optional - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_F_path, '1', '2', E_url, expected_output, expected_disk, @@ -2463,7 +2464,7 @@ def merge_funny_chars_on_path(sbox): saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_F_path, '1', '2', E_url, expected_output, expected_disk, @@ -2562,7 +2563,7 @@ def merge_keyword_expansions(sbox): }) expected_skip = wc.State(short_bpath, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_bpath, '2', 'HEAD', sbox.repo_url + '/t', expected_output, @@ -3826,7 +3827,7 @@ def merge_add_over_versioned_file_confli "new alpha content\n", 2) expected_skip = wc.State(short_E_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_E_path, '1', '2', sbox.repo_url + \ '/A/C', @@ -4264,7 +4265,7 @@ def avoid_repeated_merge_using_inherited expected_skip = wc.State(short_copy_of_B_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_copy_of_B_path, '4', '5', sbox.repo_url + \ '/A/B', @@ -4308,7 +4309,7 @@ def avoid_repeated_merge_using_inherited 'alpha' : Item(status=' ', wc_rev=6), 'beta' : Item(status=' ', wc_rev=6), }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-r4:5', sbox.repo_url + '/A/B/F/E', short_copy_of_B_F_E_path) @@ -4375,7 +4376,7 @@ def avoid_repeated_merge_on_subtree_with expected_skip = wc.State(short_path_name, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_path_name, '4', '5', sbox.repo_url + '/A/B/F/E', expected_output, @@ -4454,7 +4455,7 @@ def avoid_repeated_merge_on_subtree_with 'lambda' : Item("This is the file 'lambda'.\n") }) expected_skip = wc.State(short_copy_of_B_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_copy_of_B_path, '4', '8', sbox.repo_url + '/A/B', expected_output, @@ -4508,7 +4509,7 @@ def avoid_repeated_merge_on_subtree_with expected_skip = wc.State(short_copy_of_B_F_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_copy_of_B_F_path, '4', '5', sbox.repo_url + '/A/B/F', expected_output, @@ -4554,7 +4555,7 @@ def tweak_src_then_merge_to_dest(sbox, s { '': Item(wc_rev=new_rev, status='MM')}) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) merge_url = sbox.repo_url + '/' + canon_src_path if sys.platform == 'win32': @@ -4686,7 +4687,7 @@ def obey_reporter_api_semantics_while_do 'umlaut' : Item(), }) expected_skip = wc.State(short_copy_of_A_D_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_copy_of_A_D_path, 2, str(rev_to_merge_to_copy_of_D), @@ -4909,7 +4910,7 @@ def mergeinfo_inheritance(sbox): }) expected_skip = wc.State(short_D_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_D_COPY_path, '3', '4', sbox.repo_url + \ '/A/D', @@ -4939,7 +4940,7 @@ def mergeinfo_inheritance(sbox): 'tau' : Item("This is the file 'tau'.\n"), }) expected_skip = wc.State(short_G_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_G_COPY_path, '3', '4', sbox.repo_url + \ '/A/D/G', @@ -4974,7 +4975,7 @@ def mergeinfo_inheritance(sbox): }) expected_skip = wc.State(short_B_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_B_COPY_path, '4', '5', sbox.repo_url + \ '/A/B', @@ -4994,7 +4995,7 @@ def mergeinfo_inheritance(sbox): expected_skip = wc.State(short_beta_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # 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, [], [], 'merge', '-c5', @@ -5061,7 +5062,7 @@ def mergeinfo_inheritance(sbox): }) expected_skip = wc.State(short_A_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_A_COPY_path, '2', '3', sbox.repo_url + \ '/A', @@ -5079,7 +5080,7 @@ def mergeinfo_inheritance(sbox): short_omega_COPY_path = shorten_path_kludge(omega_COPY_path) expected_skip = wc.State(short_omega_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # 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, @@ -5157,7 +5158,7 @@ def mergeinfo_inheritance(sbox): }) expected_skip = wc.State(short_other_wc_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_other_wc_path, '5', '4', sbox.repo_url + \ '/A/B/E', @@ -5193,7 +5194,7 @@ def mergeinfo_elision(sbox): expected_skip = wc.State(short_beta_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # 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, @@ -5251,7 +5252,7 @@ def mergeinfo_elision(sbox): }) expected_skip = wc.State(short_G_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_G_COPY_path, '3', '4', sbox.repo_url + \ '/A/D/G', @@ -5318,7 +5319,7 @@ def mergeinfo_elision(sbox): }) expected_skip = wc.State(short_A_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_A_COPY_path, '3', '6', sbox.repo_url + \ '/A', @@ -5335,7 +5336,7 @@ def mergeinfo_elision(sbox): # minus r5 of course. expected_skip = wc.State(short_beta_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # 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, @@ -5359,7 +5360,7 @@ def mergeinfo_elision(sbox): # Merge r5 back into A_COPY/B/E/beta. Now the mergeinfo on the merge # target (A_COPY/B/E/beta) is identical to it's nearest ancestor with # mergeinfo (A_COPY) and so the former should elide. - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) # 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, @@ -5460,7 +5461,7 @@ def mergeinfo_inheritance_and_discontinu }) expected_skip = wc.State(short_D_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_D_COPY_path, '2', '6', sbox.repo_url + '/A/D', expected_output, @@ -5533,7 +5534,7 @@ def merge_to_target_with_copied_children # # Search for the comment entitled "The Merge Kluge" elsewhere in # this file, to understand why we shorten and chdir() below. - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) short_rho_COPY_COPY_path = shorten_path_kludge(rho_COPY_COPY_path) svntest.actions.run_and_verify_svn(None, expected_merge_output([[4]], @@ -5684,7 +5685,7 @@ def merge_to_switched_path(sbox): expected_skip = wc.State(short_G_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_G_COPY_path, '7', '8', sbox.repo_url + '/A/D/G_COPY', expected_output, expected_disk, @@ -5853,7 +5854,7 @@ def merge_to_path_with_switched_children expected_skip = wc.State(short_H_COPY_path, { }) saved_cwd = os.getcwd() - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_H_COPY_path, '7', '8', sbox.repo_url + '/A/D/H', @@ -5915,7 +5916,7 @@ def merge_to_path_with_switched_children props={SVN_PROP_MERGEINFO : '/A/D/gamma:6'}), }) expected_skip_D = wc.State(short_D_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_D_COPY_path, '5', '6', sbox.repo_url + '/A/D', expected_output, expected_disk_D, @@ -6017,7 +6018,7 @@ def merge_to_path_with_switched_children props={SVN_PROP_MERGEINFO : '/A/D/H/omega:5-8'}), }) expected_skip = wc.State(short_A_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_A_COPY_path, '4', '8', sbox.repo_url + '/A', expected_output, expected_disk, @@ -6113,7 +6114,7 @@ def merge_to_path_with_switched_children 'chi' : Item("This is the file 'chi'.\n"), }) expected_skip = wc.State(short_H_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_H_COPY_path, '4', '8', sbox.repo_url + '/A/D/H', expected_output, expected_disk, @@ -6169,7 +6170,7 @@ def merge_to_path_with_switched_children props={SVN_PROP_MERGEINFO : '/A/D/gamma:5-8,10'}) expected_disk_D.tweak('H/chi', 'H/omega', props={}) expected_disk_D.tweak('H/psi', contents="New content", props={}) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_D_COPY_path, '9', '10', sbox.repo_url + '/A/D', expected_output, expected_disk_D, @@ -6251,7 +6252,7 @@ def merge_to_path_with_switched_children 'D/H/omega' : Item("This is the file 'omega'.\n"), }) expected_skip = wc.State(short_A_COPY_path, { }) - os.chdir(svntest.main.work_dir) +# os.chdir(svntest.main.work_dir) svntest.actions.run_and_verify_merge(short_A_COPY_path, '8', '4', sbox.repo_url + '/A', expected_output, expected_disk, @@ -12822,6 +12823,9 @@ def subtree_merges_dont_cause_spurious_c 'D/H/omega' : Item(status='U '), 'D/H/psi' : Item(status='U '), }) +# expected_status.tweak('', status=' M') +# expected_status.tweak('B/E/beta', 'D/G/rho', 'D/H/omega', 'D/H/psi', +# status='M ') expected_status = wc.State(short_A_COPY_path, { '' : Item(status=' M', wc_rev=8), 'B' : Item(status=' ', wc_rev=8),