Add a pseudo-test which just sets up a repository and WC containing some changes which are handy for testing tree conflict handling. * subversion/tests/cmdline/update_tests.py (tree_conflicts_sandbox): New test function. Index: subversion/tests/cmdline/update_tests.py =================================================================== --- subversion/tests/cmdline/update_tests.py (revision 33309) +++ subversion/tests/cmdline/update_tests.py (working copy) @@ -4125,6 +4125,50 @@ def tree_conflicts_on_update_3(sbox): expected_status) ] ) +def tree_conflicts_sandbox(sbox): + "set up tree-conflict scenarios for manual testing" + sbox.build() + os.chdir(sbox.wc_dir) + + j = os.path.join + + def do_edit(file): + svntest.main.file_append(file, "Edited text.\n") + + def do_move(src_file, dst_file): + # Actually, let's not try "move" yet; it's more complicated. Let's just try "delete" first. + svntest.main.run_svn(None, 'move', src_file, dst_file) + #svntest.main.run_svn(None, 'delete', src_file) + + # Make three identical subdirectories corresponding to use cases 1-3 in + # notes/tree-conflicts/use-cases.txt + + # Commit the initial state: a file 'Foo.c' in each. (r2) + for dir in ['uc1', 'uc2', 'uc3']: + os.mkdir(dir) + alpha = j(dir, 'Foo.c') + svntest.main.file_append(alpha, "This is the file 'Foo.c'.\n") + svntest.main.run_svn(None, 'add', dir) + svntest.main.run_svn(None, 'commit', '-m', 'initial state') + + # Commit some changes in each subdirectory (r3) + do_edit(j('uc1', 'Foo.c')) + do_move(j('uc2', 'Foo.c'), j('uc2', 'Bar.c')) + do_move(j('uc3', 'Foo.c'), j('uc3', 'Bar.c')) + svntest.main.run_svn(None, 'commit', '-m', 'incoming changes') + + # Return to the WC to its initial state (r2) + svntest.main.run_svn(None, 'update', '-r2') + + # Make some local, uncommitted changes in each subdirectory + do_move(j('uc1', 'Foo.c'), j('uc1', 'Bar.c')) + do_edit(j('uc2', 'Foo.c')) + do_move(j('uc3', 'Foo.c'), j('uc3', 'Bix.c')) + + # Now this pseudo-test has done the set-up work, the user can go into one + # of the subdirectories and try out some operations such as "update", + # "resolve", "commit", "status", etc. + ####################################################################### # Run the tests @@ -4185,6 +4229,7 @@ test_list = [ None, XFail(tree_conflicts_on_update_2_1), XFail(tree_conflicts_on_update_2_2), XFail(tree_conflicts_on_update_3), + tree_conflicts_sandbox, ] if __name__ == '__main__':