Author: philip Date: Thu Dec 8 10:42:45 2011 New Revision: 1211813 URL: http://svn.apache.org/viewvc?rev=1211813&view=rev Log: * subversion/tests/libsvn_wc/op-depth-test.c (move_on_move): Tweak comment. (move_on_move2): New test, a variation on move_on_move. (test_funcs): Add new XFAIL test.
Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1211813&r1=1211812&r2=1211813&view=diff ============================================================================== --- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original) +++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Thu Dec 8 10:42:45 2011 @@ -4323,7 +4323,67 @@ move_on_move(const svn_test_opts_t *opts {1, "B2", "normal", 1, "A/B", MOVED_HERE}, {1, "B3", "normal", 1, "X/B", MOVED_HERE}, {1, "A", "normal", 1, "X"}, + {1, "A/B", "normal", 1, "X/B"}, /* moved_to=B3? */ + {2, "A/B", "base-deleted", NO_COPY_FROM}, + {0} + }; + SVN_ERR(check_db_rows(&b, "", nodes)); + } + + return SVN_NO_ERROR; +} + +static svn_error_t * +move_on_move2(const svn_test_opts_t *opts, apr_pool_t *pool) +{ + svn_test__sandbox_t b; + + SVN_ERR(svn_test__sandbox_create(&b, "move_on_move2", opts, pool)); + + SVN_ERR(wc_mkdir(&b, "A")); + SVN_ERR(wc_mkdir(&b, "A/B")); + SVN_ERR(wc_mkdir(&b, "X")); + SVN_ERR(wc_mkdir(&b, "X/B")); + SVN_ERR(wc_commit(&b, "")); + SVN_ERR(wc_update(&b, "", 1)); + + SVN_ERR(wc_move(&b, "A", "A2")); + SVN_ERR(wc_delete(&b, "A")); + SVN_ERR(wc_copy(&b, "X", "A")); + + { + nodes_row_t nodes[] = { + {0, "", "normal", 1, ""}, + {0, "A", "normal", 1, "A", FALSE, "A2"}, + {0, "A/B", "normal", 1, "A/B"}, + {0, "X", "normal", 1, "X"}, + {0, "X/B", "normal", 1, "X/B"}, + {1, "A2", "normal", 1, "A", MOVED_HERE}, + {1, "A2/B", "normal", 1, "A/B", MOVED_HERE}, + {1, "A", "normal", 1, "X"}, {1, "A/B", "normal", 1, "X/B"}, + {0} + }; + SVN_ERR(check_db_rows(&b, "", nodes)); + } + + /* A/B is already moved to A2/B but there is no explicit moved_to, + we derive it from A. The copy has given us another A/B that we + can move doing so stores explicit moved_to in A/B that breaks the + recording of the first move to A2/B. */ + SVN_ERR(wc_move(&b, "A/B", "B3")); + { + nodes_row_t nodes[] = { + {0, "", "normal", 1, ""}, + {0, "A", "normal", 1, "A", FALSE, "A2"}, + {0, "A/B", "normal", 1, "A/B"}, /* XFAIL */ + {0, "X", "normal", 1, "X"}, + {0, "X/B", "normal", 1, "X/B"}, + {1, "A2", "normal", 1, "A", MOVED_HERE}, + {1, "A2/B", "normal", 1, "A/B", MOVED_HERE}, + {1, "B3", "normal", 1, "X/B", MOVED_HERE}, + {1, "A", "normal", 1, "X"}, + {1, "A/B", "normal", 1, "X/B"}, /* moved_to=B3? */ {2, "A/B", "base-deleted", NO_COPY_FROM}, {0} }; @@ -4419,5 +4479,7 @@ struct svn_test_descriptor_t test_funcs[ "revert_nested_move"), SVN_TEST_OPTS_XFAIL(move_on_move, "move_on_move"), + SVN_TEST_OPTS_XFAIL(move_on_move2, + "move_on_move2"), SVN_TEST_NULL };