Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/merge_tree_conflict_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/merge_tree_conflict_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/merge_tree_conflict_tests.py Sun Jun 14 20:58:10 2015 @@ -78,9 +78,7 @@ def delete_file_and_dir(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Rev 3 delete E and lambda from B E_path = os.path.join(B_path, 'E') @@ -98,9 +96,7 @@ def delete_file_and_dir(sbox): 'A/B/lambda') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) def modify_B2(): # Local mods in B2 @@ -157,8 +153,7 @@ def delete_file_and_dir(sbox): expected_disk, expected_status2, expected_skip, - None, None, None, None, None, - True) + check_props=True) #---------------------------------------------------------------------- # This is a regression for issue #1176. @@ -203,8 +198,7 @@ def merge_catches_nonexistent_target(sbo ### (M)odified child. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Change newfile, creating r3. svntest.main.file_append(newfile_path, 'A change to newfile.\n') @@ -214,8 +208,7 @@ def merge_catches_nonexistent_target(sbo expected_status.tweak('A/D/Q/newfile', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Merge the change to newfile (from r3) into G, where newfile # doesn't exist. This is a tree conflict (use case 4, see @@ -258,7 +251,7 @@ def merge_catches_nonexistent_target(sbo expected_disk, expected_status, expected_skip, - None, None, None, None, None, True) + check_props=True) expected_status.add({ 'newfile' : Item(status='! ', treeconflict='C'), @@ -333,8 +326,7 @@ def merge_tree_deleted_in_target(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 0) + check_props=True) expected_status.add({ 'E' : Item(status='! ', treeconflict='C'), }) @@ -377,8 +369,7 @@ def three_way_merge_add_of_existing_bina "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 the working copy, attempt to 'svn merge branch_A_url@2 A_url@3 A'. # We should *not* see a conflict during the merge, but an 'A'. @@ -423,8 +414,8 @@ def three_way_merge_add_of_existing_bina expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 0, '--allow-mixed-revisions', A_path) + [], True, False, + '--allow-mixed-revisions', A_path) #---------------------------------------------------------------------- # Issue #2515 @@ -482,9 +473,7 @@ def merge_added_dir_to_deleted_in_target expected_elision_output, expected_disk, None, - expected_skip, - None, None, None, None, None, - 0, 0) + expected_skip) #---------------------------------------------------------------------- # Issue 2584 @@ -514,8 +503,7 @@ def merge_add_over_versioned_file_confli 'A/C/alpha' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, - wc_dir) + expected_status) # Merge r1:2 from A/C to A/B/E. This will attempt to add A/C/alpha, # but since A/B/E/alpha already exists we get a tree conflict. @@ -573,14 +561,14 @@ def mergeinfo_recording_in_skipped_merge 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) + wc_status) # Make a modification to A/B/E/alpha svntest.main.file_write(alpha_path, "This is the file 'alpha' modified.\n") expected_output = wc.State(wc_dir, {'A/B/E/alpha' : Item(verb='Sending')}) wc_status.add({'A/B/E/alpha' : Item(status=' ', wc_rev=4)}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - wc_status, None, wc_dir) + wc_status) # Delete A_COPY/B/E svntest.actions.run_and_verify_svn(None, [], 'rm', @@ -644,8 +632,7 @@ def mergeinfo_recording_in_skipped_merge expected_disk, expected_status, expected_skip, - None, None, None, None, None, - 1, 1) + [], True, True) #---------------------------------------------------------------------- def del_differing_file(sbox): @@ -1534,7 +1521,7 @@ def merge_replace_setup(sbox): }) actions.run_and_verify_update(wc_dir, expected_output, expected_disk, - expected_status, None, None, None, None, None, False, wc_dir) + expected_status) # ACTIONS ON THE MERGE SOURCE (branch) # various deletes of files and dirs @@ -1566,8 +1553,7 @@ def merge_replace_setup(sbox): 'branch/D/H/chi', 'branch/D/H/psi', 'branch/D/G/pi', 'branch/B/E', 'branch/B/E/beta', 'branch/B/E/alpha') - actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) # svn up expected_output = svntest.wc.State(wc_dir, {}) @@ -1579,7 +1565,7 @@ def merge_replace_setup(sbox): expected_status.tweak(wc_rev='3') actions.run_and_verify_update(wc_dir, expected_output, expected_disk, - expected_status, None, None, None, None, None, False, wc_dir) + expected_status) # replacements. # file-with-file @@ -1643,8 +1629,7 @@ def merge_replace_setup(sbox): 'branch/mu' : Item(status=' ', wc_rev='4'), }) - actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) return expected_disk, expected_status @@ -1949,6 +1934,269 @@ def merge_replace_on_del_fails(sbox): actions.run_and_verify_svn2(expected_stdout, [], 0, 'merge', sbox.repo_url + '/A', branch_path) +def merge_conflict_details(sbox): + "merge conflict details" + + sbox.build() + wc_dir = sbox.wc_dir + + sbox.simple_append('A/B/E/new', 'new\n') + sbox.simple_add('A/B/E/new') + sbox.simple_append('A/B/E/alpha', '\nextra\nlines\n') + sbox.simple_rm('A/B/E/beta', 'A/B/F') + sbox.simple_propset('key', 'VAL', 'A/B/E', 'A/B') + sbox.simple_mkdir('A/B/E/new-dir1') + sbox.simple_mkdir('A/B/E/new-dir2') + sbox.simple_mkdir('A/B/E/new-dir3') + sbox.simple_rm('A/B/lambda') + sbox.simple_mkdir('A/B/lambda') + sbox.simple_commit() + + sbox.simple_update('', 1) + + sbox.simple_move('A/B', 'B') + + sbox.simple_propset('key', 'vAl', 'B') + sbox.simple_move('B/E/beta', 'beta') + sbox.simple_propset('a', 'b', 'B/F', 'B/lambda') + sbox.simple_append('B/E/alpha', 'other\nnew\nlines') + sbox.simple_mkdir('B/E/new') + sbox.simple_mkdir('B/E/new-dir1') + sbox.simple_append('B/E/new-dir2', 'something') + sbox.simple_append('B/E/new-dir3', 'something') + sbox.simple_add('B/E/new-dir3') + + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.add({ + 'B' : Item(status=' C', copied='+', moved_from='A/B', + wc_rev='-', entry_status='AC'), + 'B/E' : Item(status=' M', copied='+', wc_rev='-'), + 'B/E/new' : Item(status='A ', treeconflict='C', wc_rev='-'), + 'B/E/beta' : Item(status='D ', copied='+', treeconflict='C', + wc_rev='-', moved_to='beta'), + 'B/E/alpha' : Item(status='C ', copied='+', wc_rev='-'), + 'B/E/new-dir3' : Item(status='A ', treeconflict='C', wc_rev='-'), + 'B/E/new-dir1' : Item(status='A ', treeconflict='C', wc_rev='-'), + 'B/F' : Item(status=' M', copied='+', treeconflict='C', + wc_rev='-'), + 'B/lambda' : Item(status=' M', copied='+', treeconflict='C', + wc_rev='-'), + 'beta' : Item(status='A ', copied='+', + moved_from='B/E/beta', wc_rev='-') + }) + expected_status.tweak('A/B', status='D ', wc_rev='1', moved_to='B') + expected_status.tweak('A/B/lambda', 'A/B/E', 'A/B/E/beta', 'A/B/E/alpha', + 'A/B/F', status='D ') + + expected_output = svntest.wc.State(wc_dir, { + 'B' : Item(status=' C'), + 'B/E' : Item(status=' U'), + 'B/E/new' : Item(status=' ', treeconflict='C'), + 'B/E/beta' : Item(status=' ', treeconflict='C'), + 'B/E/alpha' : Item(status='C '), + 'B/E/new-dir3' : Item(status=' ', treeconflict='C'), + 'B/E/new-dir1' : Item(status=' ', treeconflict='C'), + 'B/F' : Item(status=' ', treeconflict='C'), + 'B/lambda' : Item(status=' ', treeconflict='C'), + }) + expected_skip = wc.State(wc_dir, { + 'B/E/new-dir2' : Item(verb='Skipped'), + }) + svntest.actions.run_and_verify_merge(sbox.ospath('B'), + 1, 2, '^/A/B', '^/A/B', + expected_output, + None, None, + None, None, expected_skip) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + expected_info = [ + { + "Path" : re.escape(sbox.ospath('B')), + + "Conflict Properties File" : + re.escape(sbox.ospath('B/dir_conflicts.prej')) + '.*', + "Conflict Details": re.escape( + 'incoming dir edit upon merge' + + ' Source left: (dir) ^/A/B@1' + + ' Source right: (dir) ^/A/B@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E')), + }, + { + "Path" : re.escape(sbox.ospath('B/E/alpha')), + "Conflict Previous Base File" : '.*alpha.*', + "Conflict Previous Working File" : '.*alpha.*', + "Conflict Current Base File": '.*alpha.*', + "Conflict Details": re.escape( + 'incoming file edit upon merge' + + ' Source left: (file) ^/A/B/E/alpha@1' + + ' Source right: (file) ^/A/B/E/alpha@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E/beta')), + "Tree conflict": re.escape( + 'local file moved away, incoming file delete or move upon merge' + + ' Source left: (file) ^/A/B/E/beta@1' + + ' Source right: (none) ^/A/B/E/beta@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E/new')), + "Tree conflict": re.escape( + 'local dir add, incoming file add upon merge' + + ' Source left: (none) ^/A/B/E/new@1' + + ' Source right: (file) ^/A/B/E/new@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E/new-dir1')), + "Tree conflict": re.escape( + 'local dir add, incoming dir add upon merge' + + ' Source left: (none) ^/A/B/E/new-dir1@1' + + ' Source right: (dir) ^/A/B/E/new-dir1@2') + }, + #{ ### Skipped + # "Path" : re.escape(sbox.ospath('B/E/new-dir2')), + # "Tree conflict": re.escape( + # 'local file unversioned, incoming dir add upon merge' + + # ' Source left: (none) ^/A/B/E/new-dir2@1' + + # ' Source right: (dir) ^/A/B/E/new-dir2@2') + #}, + { + "Path" : re.escape(sbox.ospath('B/E/new-dir3')), + "Tree conflict": re.escape( + 'local file add, incoming dir add upon merge' + + ' Source left: (none) ^/A/B/E/new-dir3@1' + + ' Source right: (dir) ^/A/B/E/new-dir3@2') + }, + { + "Path" : re.escape(sbox.ospath('B/F')), + "Tree conflict": re.escape( + 'local dir edit, incoming dir delete or move upon merge' + + ' Source left: (dir) ^/A/B/F@1' + + ' Source right: (none) ^/A/B/F@2') + }, + { + "Path" : re.escape(sbox.ospath('B/lambda')), + "Tree conflict": re.escape( + 'local file edit, incoming replace with dir upon merge' + + ' Source left: (file) ^/A/B/lambda@1' + + ' Source right: (dir) ^/A/B/lambda@2') + }, + ] + + svntest.actions.run_and_verify_info(expected_info, sbox.ospath('B'), + '--depth', 'infinity') + +def merge_obstruction_recording(sbox): + "merge obstruction recording" + + sbox.build(empty=True) + wc_dir = sbox.wc_dir + + sbox.simple_mkdir('trunk') + sbox.simple_mkdir('branches') + sbox.simple_commit() #r1 + + svntest.actions.run_and_verify_svn(None, [], + 'copy', sbox.repo_url + '/trunk', + sbox.repo_url + '/branches/branch', + '-mCopy') # r2 + + sbox.simple_mkdir('trunk/dir') + sbox.simple_add_text('The file on trunk\n', 'trunk/dir/file.txt') + sbox.simple_commit() #r3 + + sbox.simple_update() + + sbox.simple_mkdir('branches/branch/dir') + sbox.simple_add_text('The file on branch\n', 'branches/branch/dir/file.txt') + sbox.simple_commit() #r4 + + sbox.simple_update() + + svntest.actions.run_and_verify_svn(None, [], + 'switch', '^/branches/branch', wc_dir, + '--ignore-ancestry') + + expected_output = wc.State(wc_dir, { + 'dir' : Item(status=' ', treeconflict='C'), + 'dir/file.txt' : Item(status=' ', treeconflict='A'), + }) + expected_mergeinfo_output = wc.State(wc_dir, { + '' : Item(status=' U'), + 'dir' : Item(status=' U'), # Because dir already exists + }) + expected_elision_output = wc.State(wc_dir, { + }) + expected_disk = wc.State('', { + 'dir/file.txt' : Item(contents="The file on branch\n"), + 'dir' : Item(props={'svn:mergeinfo':''}), + '.' : Item(props={'svn:mergeinfo':'/trunk:2-4'}), + }) + expected_status = wc.State(wc_dir, { + '' : Item(status=' M', wc_rev='4'), + 'dir' : Item(status=' M', treeconflict='C', wc_rev='4'), + 'dir/file.txt' : Item(status=' ', wc_rev='4'), + }) + expected_skip = wc.State('', { + }) + svntest.actions.run_and_verify_merge(wc_dir, '1', '4', sbox.repo_url + '/trunk', + None, + expected_output, + expected_mergeinfo_output, + expected_elision_output, + expected_disk, + expected_status, + expected_skip, + check_props=True) + expected_info = [ + { + "Path" : re.escape(sbox.ospath('dir')), + "Tree conflict": re.escape( + 'local dir obstruction, incoming dir add upon merge' + + ' Source left: (none) ^/trunk/dir@1' + + ' Source right: (dir) ^/trunk/dir@4') + }, + ] + + svntest.actions.run_and_verify_info(expected_info, sbox.ospath('dir')) + + # How should the user handle this conflict? + # ### Would be nice if we could just accept mine (leave as is, fix mergeinfo) + # ### or accept theirs (delete what is here and insert copy + svntest.actions.run_and_verify_svn(None, [], + 'resolve', '--accept=working', + sbox.ospath('dir')) + + # Redo the skipped merge as record only merge + expected_output = [ + '--- Recording mergeinfo for merge of r4 into \'%s\':\n' % \ + sbox.ospath('dir'), + ' G %s\n' % sbox.ospath('dir'), + ] + # ### Why are r1-r3 not recorded? + # ### Guess: Because dir's history only exists since r4. + svntest.actions.run_and_verify_svn(expected_output, [], + 'merge', '--record-only', + sbox.repo_url + '/trunk/dir', + sbox.ospath('dir'), + '-c', '1-4') + + expected_disk = wc.State('', { + 'dir' : Item(props={'svn:mergeinfo':'/trunk/dir:4'}), + 'dir/file.txt' : Item(contents="The file on branch\n"), + '.' : Item(props={'svn:mergeinfo':'/trunk:2-4'}), + }) + svntest.actions.verify_disk(wc_dir, expected_disk, check_props=True) + + # Because r1-r3 are not recorded, the mergeinfo is not elided :( + + # Even something like a two url merge wouldn't work, because dir + # didn't exist below trunk in r1 either. + + # A resolver action could be smarter though... + + ######################################################################## # Run the tests @@ -1979,6 +2227,8 @@ test_list = [ None, merge_replace_causes_tree_conflict, merge_replace_causes_tree_conflict2, merge_replace_on_del_fails, + merge_conflict_details, + merge_obstruction_recording, ] if __name__ == '__main__':
Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py Sun Jun 14 20:58:10 2015 @@ -234,7 +234,7 @@ def non_inheritable_mergeinfo(sbox): }) expected_status.tweak('A_COPY', 'A_COPY/D/G/rho', wc_rev=7) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Update the WC a last time to ensure full inheritance. svntest.actions.run_and_verify_svn(exp_noop_up_out(7), [], 'up', Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py Sun Jun 14 20:58:10 2015 @@ -152,7 +152,7 @@ def move_file_test(sbox, source, dest, m # update to start_rev svntest.actions.run_and_verify_update(wc_dir, test['start_output'], test['start_disk'], test['start_status'], - None, None, None, None, None, False, + [], False, '-r', test['start_rev'], wc_dir) # execute the move move_func(test['start_rev']) @@ -162,7 +162,7 @@ def move_file_test(sbox, source, dest, m # properties. svntest.actions.run_and_verify_update(wc_dir, test['up_output'], test['up_disk'], test['up_status'], - None, None, None, None, None, True, + [], True, '-r', test['end_rev'], wc_dir) revert_paths = None @@ -853,13 +853,13 @@ def build_simple_file_move_func(sbox, so mv_info_src = [ { 'Path' : re.escape(source_path), - 'Moved To' : re.escape(dest), + 'Moved To' : re.escape(sbox.ospath(dest)), } ] mv_info_dst = [ { 'Path' : re.escape(dest_path), - 'Moved From' : re.escape(source), + 'Moved From' : re.escape(sbox.ospath(source)), } ] @@ -1156,23 +1156,11 @@ def move_missing(sbox): expected_status.tweak('A/D/G', 'A/D/G/tau', 'A/D/G/pi', 'A/D/G/rho', status='! ', entry_status=' ') - expected_status.add({ - 'R' : Item(status='! ', wc_rev='-', - entry_status='A ', entry_copied='+'), - 'R/pi' : Item(status='! ', wc_rev='-', - entry_status=' ', entry_copied='+'), - 'R/tau' : Item(status='! ', wc_rev='-', - entry_status=' ', entry_copied='+'), - 'R/rho' : Item(status='! ', wc_rev='-', - entry_status=' ', entry_copied='+'), - }) - # Verify that the status processing doesn't crash svntest.actions.run_and_verify_status(wc_dir, expected_status) # The issue is a crash when the destination is present os.mkdir(sbox.ospath('R')) - expected_status.tweak('R', status='A ', copied='+') svntest.actions.run_and_verify_status(wc_dir, expected_status) @@ -1373,7 +1361,7 @@ def move_many_update_delete(sbox): svntest.actions.run_and_verify_update(wc_dir, expected_output, None, expected_status) - # Would be nice if we could run the resolver as a separate step, + # Would be nice if we could run the resolver as a separate step, # but 'svn resolve' just fails for any value but working def move_many_update_add(sbox): @@ -1415,8 +1403,7 @@ def move_many_update_add(sbox): svntest.actions.run_and_verify_update(wc_dir, expected_output, None, expected_status, - None, None, None, - None, None, None, + [], False, wc_dir, '--accept', 'mine-conflict') # And another one @@ -1446,8 +1433,7 @@ def move_many_update_add(sbox): # This currently triggers an assertion failure svntest.actions.run_and_verify_update(wc_dir, expected_output, None, expected_status, - None, None, None, - None, None, None, + [], False, wc_dir, '--accept', 'mine-conflict') @Issue(4437) @@ -1483,7 +1469,7 @@ def copy_move_commit(sbox): # create table bbb (Id int not null) # - Commit # Repro Issue 2 - # - Copy folder aaa under same parent folder (i.e. as a sibling). (using Ctrl drag/drop). + # - Copy folder aaa under same parent folder (i.e. as a sibling). (using Ctrl drag/drop). # Creates Copy of aaa # - Rename Copy of aaa to eee # - Commit @@ -1512,7 +1498,7 @@ def move_to_from_external(sbox): 'move', sbox.ospath('iota'), sbox.ospath('GG/tau')) - + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Commit both', sbox.ospath(''), @@ -1574,84 +1560,209 @@ def move_conflict_details(sbox): sbox.simple_append('A/B/E/new', 'new\n') sbox.simple_add('A/B/E/new') sbox.simple_append('A/B/E/alpha', '\nextra\nlines\n') - sbox.simple_rm('A/B/E/beta') - sbox.simple_propset('key', 'VAL', 'A/B/E') + sbox.simple_rm('A/B/E/beta', 'A/B/F') + sbox.simple_propset('key', 'VAL', 'A/B/E', 'A/B') + sbox.simple_mkdir('A/B/E/new-dir1') + sbox.simple_mkdir('A/B/E/new-dir2') + sbox.simple_mkdir('A/B/E/new-dir3') + sbox.simple_rm('A/B/lambda') + sbox.simple_mkdir('A/B/lambda') sbox.simple_commit() sbox.simple_update('', 1) - sbox.simple_move('A/B/E', 'E') + sbox.simple_move('A/B', 'B') sbox.simple_update('', 2) expected_info = [ - {"Tree conflict": re.escape( + { + "Moved To": re.escape(sbox.ospath("B")), + "Tree conflict": re.escape( 'local dir moved away, incoming dir edit upon update' + - ' Source left: (dir) ^/A/B/E@1' + - ' Source right: (dir) ^/A/B/E@2') + ' Source left: (dir) ^/A/B@1' + + ' Source right: (dir) ^/A/B@2') } ] - svntest.actions.run_and_verify_info(expected_info, sbox.ospath('A/B/E')) + svntest.actions.run_and_verify_info(expected_info, sbox.ospath('A/B')) + + sbox.simple_propset('key', 'vAl', 'B') + sbox.simple_move('B/E/beta', 'beta') + sbox.simple_propset('a', 'b', 'B/F', 'B/lambda') + sbox.simple_append('B/E/alpha', 'other\nnew\nlines') + sbox.simple_mkdir('B/E/new') + sbox.simple_mkdir('B/E/new-dir1') + sbox.simple_append('B/E/new-dir2', 'something') + sbox.simple_append('B/E/new-dir3', 'something') + sbox.simple_add('B/E/new-dir3') - sbox.simple_propset('key', 'vAl', 'E') - sbox.simple_move('E/beta', 'beta') - sbox.simple_append('E/alpha', 'other\nnew\nlines') - sbox.simple_mkdir('E/new') expected_output = [ - " C %s\n" % sbox.ospath('E'), # Property conflicted - "C %s\n" % sbox.ospath('E/alpha'), # Text conflicted - " C %s\n" % sbox.ospath('E/beta'), - " C %s\n" % sbox.ospath('E/new'), + " C %s\n" % sbox.ospath('B'), # Property conflicted + " U %s\n" % sbox.ospath('B/E'), # Just updated + "C %s\n" % sbox.ospath('B/E/alpha'), # Text conflicted + " C %s\n" % sbox.ospath('B/E/beta'), + " C %s\n" % sbox.ospath('B/E/new'), + " C %s\n" % sbox.ospath('B/E/new-dir1'), + " C %s\n" % sbox.ospath('B/E/new-dir2'), + " C %s\n" % sbox.ospath('B/E/new-dir3'), + " C %s\n" % sbox.ospath('B/F'), + " C %s\n" % sbox.ospath('B/lambda'), "Updated to revision 2.\n", - "Resolved conflicted state of '%s'\n" % sbox.ospath('A/B/E') + "Resolved conflicted state of '%s'\n" % sbox.ospath('A/B') ] svntest.actions.run_and_verify_svn(expected_output, [], - 'resolve', sbox.ospath('A/B/E'), + 'resolve', sbox.ospath('A/B'), '--depth', 'empty', '--accept', 'mine-conflict') expected_info = [ { - "Tree conflict": re.escape( - 'local dir moved away, incoming dir edit upon update' + - ' Source left: (dir) ^/A/B/E@1' + - ' Source right: (dir) ^/A/B/E@2') - } - ] + "Path" : re.escape(sbox.ospath('B')), - expected_info = [ - { - "Path" : re.escape(sbox.ospath('E')), "Conflict Properties File" : - re.escape(os.path.abspath(sbox.ospath('E/dir_conflicts.prej'))) + - '.*' + re.escape(sbox.ospath('B/dir_conflicts.prej')) + '.*', + "Conflict Details": re.escape( + 'incoming dir edit upon update' + + ' Source left: (dir) ^/A/B@1' + + ' Source right: (dir) ^/A/B@2') }, { - "Path" : re.escape(sbox.ospath('E/alpha')), + "Path" : re.escape(sbox.ospath('B/E')), + }, + { + "Path" : re.escape(sbox.ospath('B/E/alpha')), "Conflict Previous Base File" : '.*alpha.*', "Conflict Previous Working File" : '.*alpha.*', "Conflict Current Base File": '.*alpha.*', + "Conflict Details": re.escape( + 'incoming file edit upon update' + + ' Source left: (file) ^/A/B/E/alpha@1' + + ' Source right: (file) ^/A/B/E/alpha@2') }, { - "Path" : re.escape(sbox.ospath('E/beta')), + "Path" : re.escape(sbox.ospath('B/E/beta')), "Tree conflict": re.escape( 'local file moved away, incoming file delete or move upon update' + ' Source left: (file) ^/A/B/E/beta@1' + ' Source right: (none) ^/A/B/E/beta@2') }, { - "Path" : re.escape(sbox.ospath('E/new')), - "Tree conflict": - 'local .*, incoming file add upon update .*' # Not recorded properly - } + "Path" : re.escape(sbox.ospath('B/E/new')), + "Tree conflict": re.escape( + 'local dir add, incoming file add upon update' + + ' Source left: (none) ^/A/B/E/new@1' + + ' Source right: (file) ^/A/B/E/new@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E/new-dir1')), + "Tree conflict": re.escape( + 'local dir add, incoming dir add upon update' + + ' Source left: (none) ^/A/B/E/new-dir1@1' + + ' Source right: (dir) ^/A/B/E/new-dir1@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E/new-dir2')), + "Tree conflict": re.escape( + 'local file unversioned, incoming dir add upon update' + + ' Source left: (none) ^/A/B/E/new-dir2@1' + + ' Source right: (dir) ^/A/B/E/new-dir2@2') + }, + { + "Path" : re.escape(sbox.ospath('B/E/new-dir3')), + "Tree conflict": re.escape( + 'local file add, incoming dir add upon update' + + ' Source left: (none) ^/A/B/E/new-dir3@1' + + ' Source right: (dir) ^/A/B/E/new-dir3@2') + }, + { + "Path" : re.escape(sbox.ospath('B/F')), + "Tree conflict": re.escape( + 'local dir edit, incoming dir delete or move upon update' + + ' Source left: (dir) ^/A/B/F@1' + + ' Source right: (none) ^/A/B/F@2') + }, + { + "Path" : re.escape(sbox.ospath('B/lambda')), + "Tree conflict": re.escape( + 'local file edit, incoming replace with dir upon update' + + ' Source left: (file) ^/A/B/lambda@1' + + ' Source right: (dir) ^/A/B/lambda@2') + }, ] - svntest.actions.run_and_verify_info(expected_info, sbox.ospath('E'), - sbox.ospath('E/alpha'), - sbox.ospath('E/beta'), - sbox.ospath('E/new')) + svntest.actions.run_and_verify_info(expected_info, sbox.ospath('B'), + '--depth', 'infinity') + +def move_conflict_markers(sbox): + "move conflict markers" + sbox.build() + wc_dir = sbox.wc_dir + sbox.simple_propset('key','val', 'iota', 'A/B/E', 'A/B/E/beta') + sbox.simple_commit() + sbox.simple_update('', 1) + sbox.simple_propset('key','false', 'iota', 'A/B/E', 'A/B/E/beta') + + expected_output = svntest.wc.State(wc_dir, { + 'A/B/E' : Item(status=' C'), + 'A/B/E/beta' : Item(status=' C'), + 'iota' : Item(status=' C'), + }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 2) + expected_status.tweak('iota', 'A/B/E', 'A/B/E/beta', status=' C') + expected_disk = svntest.main.greek_state.copy() + expected_disk.add({ + 'A/B/E/dir_conflicts.prej' : Item(contents= + "Trying to add new property 'key'\n" + "but the property already exists.\n" + "<<<<<<< (local property value)\n" + "false||||||| (incoming 'changed from' value)\n" + "=======\n" + "val>>>>>>> (incoming 'changed to' value)\n"), + 'A/B/E/beta.prej' : Item(contents= + "Trying to add new property 'key'\n" + "but the property already exists.\n" + "<<<<<<< (local property value)\n" + "false||||||| (incoming 'changed from' value)\n" + "=======\n" + "val>>>>>>> (incoming 'changed to' value)\n"), + 'iota.prej' : Item(contents= + "Trying to add new property 'key'\n" + "but the property already exists.\n" + "<<<<<<< (local property value)\n" + "false||||||| (incoming 'changed from' value)\n" + "=======\n" + "val>>>>>>> (incoming 'changed to' value)\n"), + }) + svntest.actions.run_and_verify_update(wc_dir, + expected_output, + expected_disk, + expected_status) + + sbox.simple_move('iota', 'A/iotb') + sbox.simple_move('A/B/E', 'E') + + expected_status.tweak('iota', status='D ', moved_to='A/iotb') + expected_status.tweak('A/B/E', status='D ', moved_to='E') + expected_status.tweak('A/B/E/alpha', 'A/B/E/beta', status='D ') + expected_status.add({ + 'A/iotb' : Item(status='A ', copied='+', moved_from='iota', wc_rev='-'), + 'E' : Item(status='A ', copied='+', moved_from='A/B/E', wc_rev='-'), + 'E/beta' : Item(status=' M', copied='+', wc_rev='-'), + 'E/alpha' : Item(status=' ', copied='+', wc_rev='-'), + }) + expected_disk.remove('iota', 'iota.prej', + 'A/B/E', 'A/B/E/alpha', 'A/B/E/beta', + 'A/B/E/dir_conflicts.prej', + 'A/B/E/beta.prej') + expected_disk.add({ + 'A/iotb' : Item(contents="This is the file 'iota'.\n"), + 'E/beta' : Item(contents="This is the file 'beta'.\n"), + 'E/alpha' : Item(contents="This is the file 'alpha'.\n"), + }) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + svntest.actions.verify_disk(wc_dir, expected_disk) ####################################################################### # Run the tests @@ -1672,6 +1783,7 @@ test_list = [ None, move_to_from_external, revert_del_root_of_move, move_conflict_details, + move_conflict_markers, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/patch_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/patch_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/patch_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/patch_tests.py Sun Jun 14 20:58:10 2015 @@ -102,7 +102,7 @@ def patch(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) # Apply patch @@ -377,7 +377,7 @@ def patch_offset(sbox): expected_status.tweak('A/mu', wc_rev=2) expected_status.tweak('iota', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Apply patch @@ -546,7 +546,7 @@ def patch_chopped_leading_spaces(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) # Apply patch @@ -716,7 +716,7 @@ def patch_strip1(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) # Apply patch @@ -869,7 +869,7 @@ def patch_no_index_line(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/D/gamma', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) unidiff_patch = [ "--- A/D/gamma\t(revision 1)\n", "+++ A/D/gamma\t(working copy)\n", @@ -1148,7 +1148,7 @@ def patch_reject(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/D/gamma', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) patch_file_path = make_patch_path(sbox) @@ -1219,7 +1219,7 @@ def patch_keywords(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/D/gamma', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) patch_file_path = make_patch_path(sbox) @@ -1308,7 +1308,7 @@ def patch_with_fuzz(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) unidiff_patch = [ "Index: mu\n", @@ -1444,7 +1444,7 @@ def patch_reverse(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) # Apply patch @@ -1943,7 +1943,7 @@ def patch_with_ignore_whitespace(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) # Apply patch with leading and trailing spaces removed and tabs transformed # to spaces. The patch should match and the hunks should be written to the @@ -2077,7 +2077,7 @@ def patch_replace_locally_deleted_file(s 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) # Locally delete mu svntest.main.run_svn(None, 'rm', mu_path) @@ -2143,7 +2143,7 @@ def patch_no_eol_at_eof(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('iota', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) unidiff_patch = [ "--- iota\t(revision 1)\n", "+++ iota\t(working copy)\n", @@ -2213,7 +2213,7 @@ def patch_with_properties(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('iota', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Apply patch unidiff_patch = [ @@ -2306,7 +2306,7 @@ def patch_same_twice(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) # Apply patch @@ -2491,7 +2491,7 @@ def patch_dir_properties(sbox): expected_status.tweak('', wc_rev=2) expected_status.tweak('A/B', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Apply patch unidiff_patch = [ @@ -2713,7 +2713,7 @@ def patch_prop_offset(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('iota', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Apply patch @@ -2888,7 +2888,7 @@ def patch_prop_with_fuzz(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) unidiff_patch = [ "Index: mu\n", @@ -3072,7 +3072,7 @@ def patch_old_target_names(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) # Apply patch @@ -3198,7 +3198,7 @@ def patch_reverse_revert(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) # Apply patch @@ -3520,7 +3520,7 @@ def patch_moved_away(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) # Move mu away sbox.simple_move("A/mu", "A/mu2") @@ -3681,7 +3681,7 @@ def patch_deletes_prop(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('iota', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Apply patch unidiff_patch = [ @@ -3828,7 +3828,7 @@ def patch_reversed_add_with_props2(sbox) expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.add({'newfile' : Item(wc_rev=2, status=' ')}) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Now, we'll try to reverse-apply the very diff we just created. We # expect the original state of the working copy in r1 plus 'newfile' @@ -4019,7 +4019,7 @@ def patch_target_no_eol_at_eof(sbox): expected_status.tweak('iota', wc_rev=2) 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) unidiff_patch = [ "Index: A/mu\n", "===================================================================\n", @@ -4222,8 +4222,7 @@ def patch_change_symlink_target(sbox): expected_output = svntest.wc.State(wc_dir, { 'link' : Item(verb='Adding'), }) - 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) patch_output = [ 'U %s\n' % sbox.ospath('link'), @@ -4236,8 +4235,7 @@ def patch_change_symlink_target(sbox): expected_output = svntest.wc.State(wc_dir, { 'link' : 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) # r4 - Now as symlink sbox.simple_rm('link') @@ -4245,8 +4243,7 @@ def patch_change_symlink_target(sbox): expected_output = svntest.wc.State(wc_dir, { 'link' : Item(verb='Replacing'), }) - 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) svntest.actions.run_and_verify_svn(patch_output, [], 'patch', patch_file_path, wc_dir) @@ -5440,6 +5437,189 @@ def patch_closest(sbox): expected_output, expected_disk, expected_status, expected_skip) +@SkipUnless(svntest.main.is_posix_os) +def patch_symlink_traversal(sbox): + """symlink traversal behaviour""" + + sbox.build(read_only=True) + wc_dir = sbox.wc_dir + alpha_contents = "This is the file 'alpha'.\n" + + # A/B/E/unversioned -> alpha + # A/B/E/versioned -> alpha + # A/B/unversioned -> E (so A/B/unversioned/alpha is A/B/E/alpha) + # A/B/versioned -> E (so A/B/versioned/alpha is A/B/E/alpha) + os.symlink('alpha', sbox.ospath('A/B/E/unversioned')) + os.symlink('alpha', sbox.ospath('A/B/E/versioned')) + os.symlink('E', sbox.ospath('A/B/unversioned')) + os.symlink('E', sbox.ospath('A/B/versioned')) + sbox.simple_add('A/B/E/versioned', 'A/B/versioned') + + prepatch_status = svntest.actions.get_virginal_state(wc_dir, 1) + prepatch_status.add({'A/B/E/versioned' : Item(status='A ', wc_rev='-')}) + prepatch_status.add({'A/B/versioned' : Item(status='A ', wc_rev='-')}) + svntest.actions.run_and_verify_status(wc_dir, prepatch_status) + + # Patch through unversioned symlink to file + unidiff_patch = ( + "Index: A/B/E/unversioned\n" + "===================================================================\n" + "--- A/B/E/unversioned\t(revision 2)\n" + "+++ A/B/E/unversioned\t(working copy)\n" + "@@ -1 +1,2 @@\n" + " This is the file 'alpha'.\n" + "+xx\n" + ) + patch_file_path = make_patch_path(sbox) + svntest.main.file_write(patch_file_path, unidiff_patch) + + expected_output = [ + 'Skipped missing target: \'%s\'\n' % sbox.ospath('A/B/E/unversioned'), + ] + svntest.main.summary_of_conflicts(skipped_paths=1) + expected_disk = svntest.main.greek_state.copy() + expected_disk.add({'A/B/E/unversioned' : Item(contents=alpha_contents)}) + expected_disk.add({'A/B/E/versioned' : Item(contents=alpha_contents)}) + expected_disk.add({'A/B/unversioned' : Item()}) + expected_disk.add({'A/B/versioned' : Item()}) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.add({'A/B/E/versioned' : Item(status='A ', wc_rev='-')}) + expected_status.add({'A/B/versioned' : Item(status='A ', wc_rev='-')}) + expected_skip = wc.State('', { + sbox.ospath('A/B/E/unversioned') : Item(verb='Skipped missing target'), + }) + svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path), + expected_output, expected_disk, + expected_status, expected_skip) + svntest.actions.run_and_verify_status(wc_dir, prepatch_status) + + # Patch through versioned symlink to file + unidiff_patch = ( + "Index: A/B/E/versioned\n" + "===================================================================\n" + "--- A/B/E/versioned\t(revision 2)\n" + "+++ A/B/E/versioned\t(working copy)\n" + "@@ -1 +1,2 @@\n" + " This is the file 'alpha'.\n" + "+xx\n" + ) + patch_file_path = make_patch_path(sbox) + svntest.main.file_write(patch_file_path, unidiff_patch) + reject_contents = ( + "--- A/B/E/versioned\n" + "+++ A/B/E/versioned\n" + "@@ -1,1 +1,2 @@\n" + " This is the file 'alpha'.\n" + "+xx\n" + ) + + expected_output = [ + 'C %s\n' % sbox.ospath('A/B/E/versioned'), + '> rejected hunk @@ -1,1 +1,2 @@\n', + ] + svntest.main.summary_of_conflicts(text_conflicts=1) + expected_disk.add({'A/B/E/versioned.svnpatch.rej' + : Item(contents=reject_contents)}) + expected_skip = wc.State('', { }) + svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path), + expected_output, expected_disk, + expected_status, expected_skip) + os.remove(sbox.ospath('A/B/E/versioned.svnpatch.rej')) + expected_disk.remove('A/B/E/versioned.svnpatch.rej') + svntest.actions.run_and_verify_status(wc_dir, prepatch_status) + + # Patch through unversioned symlink to parent of file + unidiff_patch = ( + "Index: A/B/unversioned/alpha\n" + "===================================================================\n" + "--- A/B/unversioned/alpha\t(revision 2)\n" + "+++ A/B/unversioned/alpha\t(working copy)\n" + "@@ -1 +1,2 @@\n" + " This is the file 'alpha'.\n" + "+xx\n" + ) + patch_file_path = make_patch_path(sbox) + svntest.main.file_write(patch_file_path, unidiff_patch) + + expected_output = [ + 'Skipped missing target: \'%s\'\n' % sbox.ospath('A/B/unversioned/alpha'), + ] + svntest.main.summary_of_conflicts(skipped_paths=1) + expected_skip = wc.State('', { + sbox.ospath('A/B/unversioned/alpha') : Item(verb='Skipped missing target'), + }) + svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path), + expected_output, expected_disk, + expected_status, expected_skip) + svntest.actions.run_and_verify_status(wc_dir, prepatch_status) + + # Patch through versioned symlink to parent of file + unidiff_patch = ( + "Index: A/B/versioned/alpha\n" + "===================================================================\n" + "--- A/B/versioned/alpha\t(revision 2)\n" + "+++ A/B/versioned/alpha\t(working copy)\n" + "@@ -1 +1,2 @@\n" + " This is the file 'alpha'.\n" + "+xx\n" + ) + patch_file_path = make_patch_path(sbox) + svntest.main.file_write(patch_file_path, unidiff_patch) + + expected_output = [ + 'Skipped missing target: \'%s\'\n' % sbox.ospath('A/B/versioned/alpha'), + ] + svntest.main.summary_of_conflicts(skipped_paths=1) + expected_skip = wc.State('', { + sbox.ospath('A/B/versioned/alpha') : Item(verb='Skipped missing target'), + }) + svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path), + expected_output, expected_disk, + expected_status, expected_skip) + svntest.actions.run_and_verify_status(wc_dir, prepatch_status) + +@SkipUnless(svntest.main.is_posix_os) +def patch_obstructing_symlink_traversal(sbox): + """obstructing symlink traversal behaviour""" + + sbox.build() + wc_dir = sbox.wc_dir + alpha_contents = "This is the file 'alpha'.\n" + sbox.simple_append('A/B/F/alpha', alpha_contents) + sbox.simple_add('A/B/F/alpha') + sbox.simple_commit() + sbox.simple_update() + + # Unversioned symlink A/B/E -> F obstructing versioned A/B/E so + # versioned A/B/E/alpha is A/B/F/alpha + svntest.main.safe_rmtree(sbox.ospath('A/B/E')) + os.symlink('F', sbox.ospath('A/B/E')) + + unidiff_patch = ( + "Index: A/B/E/alpha\n" + "===================================================================\n" + "--- A/B/E/alpha\t(revision 2)\n" + "+++ A/B/E/alpha\t(working copy)\n" + "@@ -1 +1,2 @@\n" + " This is the file 'alpha'.\n" + "+xx\n" + ) + patch_file_path = make_patch_path(sbox) + svntest.main.file_write(patch_file_path, unidiff_patch) + + ### Patch applies through the unversioned symlink + expected_output = [ + 'U %s\n' % sbox.ospath('A/B/E/alpha'), + ] + expected_disk = svntest.main.greek_state.copy() + expected_disk.remove('A/B/E/alpha', 'A/B/E/beta') + expected_disk.add({'A/B/F/alpha' : Item(contents=alpha_contents+"xx\n")}) + expected_status = svntest.actions.get_virginal_state(wc_dir, 2) + expected_status.add({'A/B/F/alpha' : Item(status=' ', wc_rev=2)}) + expected_status.tweak('A/B/E', status='~ ') + expected_status.tweak('A/B/E/alpha', 'A/B/F/alpha', status='M ') + expected_status.tweak('A/B/E/beta', status='! ') + expected_skip = wc.State('', { }) + svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path), + expected_output, expected_disk, + expected_status, expected_skip) + ######################################################################## #Run the tests @@ -5499,6 +5679,8 @@ test_list = [ None, patch_hunk_overlap, patch_delete_modified, patch_closest, + patch_symlink_traversal, + patch_obstructing_symlink_traversal, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py Sun Jun 14 20:58:10 2015 @@ -133,9 +133,7 @@ def commit_props(sbox): # Commit the one file. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) @@ -169,16 +167,14 @@ def update_props(sbox): # Commit property mods svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Add more properties sbox.simple_propset('blue2', 'azul2', 'A/mu') sbox.simple_propset('red2', 'rojo2', 'A/D/H') expected_status.tweak('A/mu', 'A/D/H', wc_rev=3, status=' ') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Create expected output tree for an update of the wc_backup. expected_output = svntest.wc.State(wc_backup, { @@ -201,7 +197,7 @@ def update_props(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, + [], 1, '-r', '2', wc_backup) # This adds properties to nodes that have properties @@ -214,7 +210,7 @@ def update_props(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, + [], 1, '-r', '3', wc_backup) @@ -243,8 +239,7 @@ def downdate_props(sbox): # Commit the one file. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Make some mod (something to commit) svntest.main.file_append(mu_path, "some mod") @@ -261,8 +256,7 @@ def downdate_props(sbox): # Commit the one file. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Create expected output tree for an update. expected_output = svntest.wc.State(wc_dir, { @@ -281,7 +275,7 @@ def downdate_props(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, + [], 1, '-r', '1', wc_dir) #---------------------------------------------------------------------- @@ -313,8 +307,7 @@ def remove_props(sbox): # Commit the one file. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -362,14 +355,8 @@ def update_conflict_props(sbox): expected_output, expected_disk, expected_status, - None, - svntest.tree.detect_conflict_files, - extra_files, - None, None, 1) - - if len(extra_files) != 0: - logger.warn("didn't get expected conflict files") - raise svntest.verify.SVNUnexpectedOutput + check_props=True, + extra_files=extra_files) # Resolve the conflicts svntest.actions.run_and_verify_resolved([mu_path, A_path]) @@ -404,8 +391,7 @@ def commit_conflict_dirprops(sbox): sbox.simple_propset('foo', 'eek', '') svntest.actions.run_and_verify_commit(wc_dir, None, None, - "[oO]ut[- ]of[- ]date", - wc_dir) + ".*[oO]ut[- ]of[- ]date.*") #---------------------------------------------------------------------- @@ -464,8 +450,7 @@ def commit_replacement_props(sbox): expected_status.tweak('A/B/lambda', wc_rev=3, status=' ') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -529,8 +514,7 @@ def revert_replacement_props(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, - 1) + check_props=True) #---------------------------------------------------------------------- @Issues(920,2065) @@ -1001,9 +985,7 @@ def binary_props(sbox): # Commit the propsets. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Create expected output, disk, and status trees for an update of # the wc_backup. @@ -1021,8 +1003,7 @@ def binary_props(sbox): svntest.actions.run_and_verify_update(wc_backup, expected_output, expected_disk, - expected_status, - None, None, None, None, None, 0) + expected_status) # Now, check those properties. svntest.actions.check_prop('prop_zb', B_path_bak, [prop_zb]) @@ -1268,8 +1249,7 @@ def update_props_on_wc_root(sbox): # Commit the working copy svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Create expected output tree for an update of the wc_backup. expected_output = svntest.wc.State(wc_backup, { @@ -1289,7 +1269,7 @@ def update_props_on_wc_root(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, 1) + check_props=True) # test for issue 2743 @Issue(2743) @@ -1527,8 +1507,7 @@ def remove_custom_ns_props(sbox): # Commit the one file. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Create expected trees for the update. expected_output = svntest.wc.State(wc_backup, { @@ -1543,7 +1522,7 @@ def remove_custom_ns_props(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, 1) + check_props=True) def props_over_time(sbox): "property retrieval with peg and operative revs" @@ -2316,7 +2295,7 @@ def file_matching_dir_prop_reject(sbox): 'A/dir_conflicts' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Modify/commit property change sbox.simple_propset('prop', 'val2', 'A/dir_conflicts') @@ -2327,7 +2306,7 @@ def file_matching_dir_prop_reject(sbox): }) expected_status.tweak('A', 'A/dir_conflicts', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Local property mod sbox.simple_propset('prop', 'val3', 'A/dir_conflicts') @@ -2352,13 +2331,9 @@ def file_matching_dir_prop_reject(sbox): expected_output, expected_disk, expected_status, - None, - svntest.tree.detect_conflict_files, - extra_files, - None, None, True, '-r', '2', wc_dir) - if len(extra_files) != 0: - logger.warn("didn't get expected conflict files") - raise svntest.verify.SVNUnexpectedOutput + [], True, + '-r', '2', wc_dir, + extra_files=extra_files) # Revert and update to check that conflict files are removed svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir) @@ -2375,7 +2350,7 @@ def file_matching_dir_prop_reject(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, True) + check_props=True) def pristine_props_listed(sbox): "check if pristine properties are visible" @@ -2597,7 +2572,7 @@ def almost_known_prop_names(sbox): svntest.actions.set_prop('svn:foobar', 'x', iota_path, "svn: E195011: 'svn:foobar'" " is not a valid svn: property name;" - " re-run with '--force' to set it") + " use '--force' to set it") @Issue(3231) def peg_rev_base_working(sbox): @@ -2611,7 +2586,7 @@ def peg_rev_base_working(sbox): sbox.simple_commit(message='r2') svntest.actions.set_prop('cardinal', 'nine\n', sbox.ospath('iota')) svntest.actions.run_and_verify_svn(['ninth\n'], [], - 'propget', '--strict', 'ordinal', + 'propget', '--no-newline', 'ordinal', sbox.ospath('iota') + '@BASE') @Issue(4415) @@ -2644,7 +2619,7 @@ def xml_unsafe_author(sbox): # a single property value which skips creating the creator-displayname property svntest.actions.run_and_verify_svn(['foo\bbar'], [], 'propget', '--revprop', '-r', '1', - 'svn:author', '--strict', wc_dir) + 'svn:author', '--no-newline', wc_dir) # Ensure a stable date svntest.actions.run_and_verify_svn(None, [], @@ -2691,13 +2666,37 @@ def xml_unsafe_author2(sbox): else: expected_author = 'foo\bbar' - expected_output = svntest.verify.UnorderedOutput([ - ' 1 %-8s Jan 01 2000 ./\n' % expected_author, - ' 1 %-8s Jan 01 2000 A/\n' % expected_author, - ' 1 %-8s 25 Jan 01 2000 iota\n' % expected_author - ]) + # Use svn ls in --xml mode to test locale independent output. + expected_output = [ + '<?xml version="1.0" encoding="UTF-8"?>\n', + '<lists>\n', + '<list\n', + ' path="%s">\n' % sbox.repo_url, + '<entry\n', + ' kind="dir">\n', + '<name>A</name>\n', + '<commit\n', + ' revision="1">\n', + '<author>%s</author>\n' % expected_author, + '<date>2000-01-01T12:00:00.000000Z</date>\n', + '</commit>\n', + '</entry>\n', + '<entry\n', + ' kind="file">\n', + '<name>iota</name>\n', + '<size>25</size>\n', + '<commit\n', + ' revision="1">\n', + '<author>%s</author>\n' % expected_author, + '<date>2000-01-01T12:00:00.000000Z</date>\n', + '</commit>\n', + '</entry>\n', + '</list>\n', + '</lists>\n' + ] + svntest.actions.run_and_verify_svn(expected_output, [], - 'ls', '-v', repo_url) + 'ls', '--xml', repo_url) expected_info = [{ 'Repository Root' : sbox.repo_url, @@ -2728,8 +2727,7 @@ def dir_prop_conflict_details(sbox): svntest.actions.run_and_verify_commit(wc_dir, None, None, - '.*[Oo]ut of date.*', - wc_dir) + '.*[Oo]ut of date.*') expected_output = svntest.wc.State(wc_dir, { 'A' : Item(status=' C'), @@ -2741,14 +2739,13 @@ def dir_prop_conflict_details(sbox): expected_output, None, expected_status, - None, None, None, None, None, 1, - wc_dir) + check_props=True) # The conflict properties file line was shown for previous versions, but the # conflict source urls are new since 1.8. expected_info = { - 'Conflict Properties File' : re.escape(os.path.abspath( - sbox.ospath('A/dir_conflicts.prej')) + 'Conflict Properties File' : re.escape(sbox.ospath('A/dir_conflicts.prej')), + 'Conflict Details': re.escape('incoming dir edit upon update' + ' Source left: (dir) ^/A@1' + ' Source right: (dir) ^/A@2') } @@ -2810,6 +2807,31 @@ def wc_propop_on_url(sbox): 'pg', 'my:Q', '-r', 'PREV', sbox.repo_url) +def prop_conflict_root(sbox): + """property conflict on wc root""" + + sbox.build() + wc_dir = sbox.wc_dir + + sbox.simple_propset('propname', 'propval1', '') + sbox.simple_commit() + sbox.simple_propset('propname', 'propval2', '') + sbox.simple_commit() + sbox.simple_update(revision=2) + sbox.simple_propset('propname', 'propvalconflict', '') + + expected_output = svntest.wc.State(wc_dir, { + '' : Item(status=' C'), + }) + expected_disk = svntest.main.greek_state.copy() + expected_status = svntest.actions.get_virginal_state(wc_dir, 3) + expected_status.tweak('', status=' C') + extra_files = ['dir_conflicts.prej'] + svntest.actions.run_and_verify_update(wc_dir, + expected_output, + expected_disk, + expected_status, + extra_files=extra_files) ######################################################################## # Run the tests @@ -2861,6 +2883,7 @@ test_list = [ None, dir_prop_conflict_details, iprops_list_abspath, wc_propop_on_url, + prop_conflict_root, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/redirect_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/redirect_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/redirect_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/redirect_tests.py Sun Jun 14 20:58:10 2015 @@ -154,7 +154,7 @@ def redirected_nonroot_update(sbox): checkout_url, wc_dir) if err: raise svntest.Failure - + # Relocate (by cheating) the working copy to the redirect URL. When # we then update, we'll expect to find ourselves automagically back # to the original URL. (This is because we can't easily introduce a @@ -241,6 +241,25 @@ def redirected_copy(sbox): sbox.redirected_root_url(temporary=True) + '/A', '^/copy-of-A') #---------------------------------------------------------------------- +@SkipUnless(svntest.main.is_ra_type_dav) +def redirected_commands(sbox): + "redirected commands" + + sbox.build(create_wc=False) + + svntest.actions.run_and_verify_svn(None, [], + 'log', + sbox.redirected_root_url() + '/A') + + svntest.actions.run_and_verify_svn(None, [], + 'ls', + sbox.redirected_root_url() + '/A') + + svntest.actions.run_and_verify_svn(None, [], + 'info', + sbox.redirected_root_url() + '/A') + +#---------------------------------------------------------------------- ######################################################################## # Run the tests @@ -253,6 +272,7 @@ test_list = [ None, redirected_nonroot_update, redirected_externals, redirected_copy, + redirected_commands, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/relocate_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/relocate_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/relocate_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/relocate_tests.py Sun Jun 14 20:58:10 2015 @@ -61,8 +61,7 @@ def relocate_deleted_missing_copied(sbox }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Remove A/B/F to create a missing entry svntest.main.safe_rmtree(os.path.join(wc_dir, 'A', 'B', 'F')) @@ -141,8 +140,7 @@ def relocate_deleted_missing_copied(sbox status=' ', wc_rev='3', copied=None) expected_status.remove('A/D2/G', 'A/D2/G/pi', 'A/D2/G/rho', 'A/D2/G/tau') svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) #---------------------------------------------------------------------- @@ -245,8 +243,7 @@ def relocate_and_propset(sbox): # Commit the deletion of gamma and verify. svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Now gamma should be marked as `deleted' under the hood, at # revision 2. Meanwhile, A/D is still lagging at revision 1. @@ -258,8 +255,7 @@ def relocate_and_propset(sbox): svntest.actions.run_and_verify_commit(wc_dir, None, None, - "[Oo]ut.of.date", - wc_dir) + ".*[Oo]ut of date.*") #---------------------------------------------------------------------- @@ -330,8 +326,7 @@ def relocate_with_switched_children(sbox # This won't actually do a commit, because nothing should be modified. svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # Check the URLs of various nodes. info_output = { Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/resolve_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/resolve_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/resolve_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/resolve_tests.py Sun Jun 14 20:58:10 2015 @@ -303,9 +303,7 @@ def resolved_on_wc_root(sbox): svntest.actions.run_and_verify_commit(wc, expected_output, - expected_status, - None, - wc) + expected_status) # Go back to rev 1 expected_output = svntest.wc.State(wc, { @@ -319,7 +317,7 @@ def resolved_on_wc_root(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, False, + [], False, '-r1', wc) # Deletions so that the item becomes unversioned and @@ -351,7 +349,7 @@ def resolved_on_wc_root(sbox): expected_output, expected_disk, None, - None, None, None, None, None, False, + [], False, wc) svntest.actions.run_and_verify_unquiet_status(wc, expected_status) @@ -450,7 +448,7 @@ def resolved_on_deleted_item(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, False, + [], False, wc) # Create some conflicts... @@ -469,9 +467,7 @@ def resolved_on_deleted_item(sbox): svntest.actions.run_and_verify_commit(wc, expected_output, - expected_status, - None, - wc) + expected_status) # Delete the paths in the second directory. svntest.actions.run_and_verify_svn(None, [], @@ -490,7 +486,7 @@ def resolved_on_deleted_item(sbox): svntest.actions.run_and_verify_commit(wc, expected_output, expected_status, - None, + [], A2) # Now merge A to A2, creating conflicts... @@ -543,7 +539,7 @@ def resolved_on_deleted_item(sbox): expected_mergeinfo_output, expected_elision_output, expected_disk, None, expected_skip, - None, dry_run = False) + [], dry_run = False) svntest.actions.run_and_verify_unquiet_status(A2, expected_status) # Now resolve by recursing on the working copy root. Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/revert_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/revert_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/revert_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/revert_tests.py Sun Jun 14 20:58:10 2015 @@ -91,8 +91,7 @@ def revert_replacement_with_props(sbox, 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) # Bring wc into sync svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) @@ -303,8 +302,8 @@ def revert_reexpand_keyword(sbox): # This commit fails because newfile2_path is missing, but only after # we call svn_wc__internal_file_modified_p() on new_file. - svntest.actions.run_and_verify_commit(wc_dir, None, None, "2' is scheduled"+ - " for addition, but is missing", + svntest.actions.run_and_verify_commit(wc_dir, None, None, ".*2' is scheduled"+ + " for addition, but is missing.*", newfile_path, newfile2_path, '-m', "Shouldn't be committed") @@ -339,7 +338,7 @@ def revert_replaced_file_without_props(s }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # delete file1 svntest.actions.run_and_verify_svn(None, [], 'rm', file1_path) @@ -444,8 +443,7 @@ def revert_file_merge_replace_with_histo # Commit rev 2 svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # create new rho file svntest.main.file_write(rho_path, "new rho\n") @@ -463,7 +461,7 @@ def revert_file_merge_replace_with_histo 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, {}) @@ -713,8 +711,7 @@ def revert_replaced_with_history_file_1( }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # update the working copy svntest.main.run_svn(None, 'up', wc_dir) @@ -754,8 +751,7 @@ def revert_replaced_with_history_file_1( }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Verify the content of 'mu' svntest.actions.run_and_verify_svn(text_r1, [], 'cat', mu_path) @@ -821,8 +817,7 @@ def status_of_missing_dir_after_revert_r }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # copy A/D/G from A/B/E and commit E_path = os.path.join(wc_dir, "A", "B", "E") @@ -837,8 +832,7 @@ def status_of_missing_dir_after_revert_r }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # update the working copy svntest.main.run_svn(None, 'up', wc_dir) @@ -928,8 +922,7 @@ def revert_replaced_with_history_file_2( expected_status.tweak('A/mu', status=' ', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) #---------------------------------------------------------------------- @@ -1170,8 +1163,7 @@ def revert_permissions_only(sbox): expected_status.tweak('A/B/E/beta', wc_rev='2') svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) os.chmod(sbox.ospath('A/B/E/alpha'), 0666) # not read-only is_writable(sbox.ospath('A/B/E/alpha')) @@ -1606,13 +1598,13 @@ def revert_obstructing_wc(sbox): # Checkout wc as depth empty svntest.actions.run_and_verify_checkout(sbox.repo_url, wc_dir, expected_output, expected_disk, - None, None, None, None, + [], '--depth', 'empty') # And create an obstructing working copy as A svntest.actions.run_and_verify_checkout(sbox.repo_url, wc_dir + '/A', expected_output, expected_disk, - None, None, None, None, + [], '--depth', 'empty') # Now try to fetch the entire wc, which will find an obstruction @@ -1626,12 +1618,10 @@ def revert_obstructing_wc(sbox): # A is not versioned but exists }) - # Use expected_status.old_tree() to avoid doing an entries comparion svntest.actions.run_and_verify_update(wc_dir, expected_output, None, - expected_status.old_tree(), - None, None, None, - None, None, None, + expected_status, + [], False, wc_dir, '--set-depth', 'infinity') # Revert should do nothing (no local changes), and report the obstruction
