Index: subversion/tests/cmdline/revert_tests.py =================================================================== --- subversion/tests/cmdline/revert_tests.py (revision 18747) +++ subversion/tests/cmdline/revert_tests.py (working copy) @@ -523,6 +523,44 @@ actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1) svntest.tree.compare_trees(actual_disk, expected_disk.old_tree()) + +#---------------------------------------------------------------------- +# Test for issue ### ??? +# +# Manual conflict resolution leads to spurious revert report. + +def revert_after_manual_conflict_resolution(sbox): + "revert after manual conflict resolution" + + sbox.build() + wc_dir_1 = sbox.wc_dir + + # Make a second working copy + wc_dir_2 = sbox.add_wc_path('other') + svntest.actions.duplicate_dir(wc_dir_1, wc_dir_2) + + # Cause a conflict + iota_path_1 = os.path.join(wc_dir_1, 'iota') + iota_path_2 = os.path.join(wc_dir_2, 'iota') + + svntest.main.file_write(iota_path_1, 'Modified iota text') + svntest.main.file_write(iota_path_2, 'Conflicting iota text') + + svntest.main.run_svn(None, 'commit', '-m', 'r2', wc_dir_1) + svntest.main.run_svn(None, 'update', wc_dir_2) + + # Resolve the conflict "manually" + svntest.main.file_write(iota_path_2, 'Modified iota text') + os.remove(iota_path_2 + '.mine') + os.remove(iota_path_2 + '.r1') + os.remove(iota_path_2 + '.r2') + + # Verify no output from status, diff, or revert + svntest.actions.run_and_verify_svn(None, [], [], "status", wc_dir_2) + svntest.actions.run_and_verify_svn(None, [], [], "diff", wc_dir_2) + svntest.actions.run_and_verify_svn(None, [], [], "revert", "-R", wc_dir_2) + + ######################################################################## # Run the tests @@ -537,6 +575,7 @@ revert_file_merge_replace_with_history, revert_repos_to_wc_replace_with_props, revert_after_second_replace, + XFail(revert_after_manual_conflict_resolution), ] if __name__ == '__main__': Index: subversion/tests/cmdline/svntest/main.py =================================================================== --- subversion/tests/cmdline/svntest/main.py (revision 18747) +++ subversion/tests/cmdline/svntest/main.py (working copy) @@ -395,6 +395,14 @@ fp.write(new_text) fp.close() +# For making local mods to files +def file_write(path, new_text): + "Replace contents of file at PATH with NEW_TEXT" + + fp = open(path, 'w') # open in (w)rite mode + fp.write(new_text) + fp.close() + # For creating blank new repositories def create_repos(path): """Create a brand-new SVN repository at PATH. If PATH does not yet