You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2013/02/23 02:25:44 UTC
svn commit: r1449262 [24/25] - in /subversion/branches/ev2-export: ./ build/
build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ build/win32/
contrib/server-side/fsfsfixer/fixer/ contrib/server-side/svncutter/ notes/
note...
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c Sat Feb 23 01:25:38 2013
@@ -2032,12 +2032,10 @@ test_op_revert(const svn_test_opts_t *op
before, before, before_actual4, after_actual4));
err = revert(&b, "A/B", svn_depth_empty,
before, before, common_actual5, common_actual5);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
err = revert(&b, "A/B/C", svn_depth_empty,
before, before, common_actual6, common_actual6);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
}
{
@@ -2090,30 +2088,24 @@ test_op_revert(const svn_test_opts_t *op
err = revert(&b, "A/B", svn_depth_empty,
common, common, NULL, NULL);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
err = revert(&b, "A/B", svn_depth_empty,
common, common, common_actual, common_actual);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
err = revert(&b, "P", svn_depth_empty,
common, common, NULL, NULL);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
err = revert(&b, "P", svn_depth_empty,
common, common, common_actual, common_actual);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
err = revert(&b, "X", svn_depth_empty,
common, common, NULL, NULL);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
err = revert(&b, "X", svn_depth_empty,
common, common, common_actual, common_actual);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
}
{
@@ -2314,8 +2306,7 @@ test_op_revert(const svn_test_opts_t *op
};
err = revert(&b, "A", svn_depth_empty,
common, common, NULL, NULL);
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_INVALID_OPERATION_DEPTH);
}
{
@@ -3512,8 +3503,7 @@ copy_wc_wc_server_excluded(const svn_tes
SVN_ERR(check_db_rows(&b, "", before));
SVN_ERR(sbox_disk_mkdir(&b, "A"));
err = sbox_wc_copy(&b, "A", "X");
- SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_PATH_UNEXPECTED_STATUS);
SVN_ERR(check_db_rows(&b, "", after));
return SVN_NO_ERROR;
@@ -4083,6 +4073,48 @@ move_to_swap(const svn_test_opts_t *opts
SVN_ERR(check_db_rows(&b, "", nodes));
}
+ /* And move this last bit back and check if the db state is restored */
+ SVN_ERR(sbox_wc_move(&b, "A/B", "X/B"));
+ SVN_ERR(sbox_wc_move(&b, "X/Y", "A/Y"));
+
+ {
+ /* Exact the same as before the initial moves */
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/Y", "normal", 1, "X/Y"},
+ {1, "A", "normal", 1, "X", FALSE, "X", TRUE},
+ {1, "A/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A", FALSE, "A", TRUE},
+ {1, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "X/Y", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* And try to undo the rest */
+ SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+ SVN_ERR(sbox_wc_move(&b, "X", "A"));
+ SVN_ERR(sbox_wc_move(&b, "A2", "X"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/Y", "normal", 1, "X/Y"},
+
+ {0}
+ };
+
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
return SVN_NO_ERROR;
}
@@ -4139,6 +4171,41 @@ revert_nested_move(const svn_test_opts_t
{3, "A2/B2/C2", "normal", 1, "A/B/C", MOVED_HERE},
{0}
};
+ nodes_row_t nodes_AB_moved_C_copied[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "A2"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM, "A2/B2"},
+ {2, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A2/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A2/B2/C2", "normal", 1, "A/B/C"},
+ {0}
+ };
+ nodes_row_t nodes_AC_moved_B_copied[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "A2"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B2", "normal", 1, "A/B"},
+ {2, "A2/B2/C", "normal", 1, "A/B/C"},
+ {3, "A2/B2/C", "base-deleted", NO_COPY_FROM, "A2/B2/C2"},
+ {3, "A2/B2/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
SVN_ERR(svn_test__sandbox_create(&b, "revert_nested_move", opts, pool));
@@ -4165,7 +4232,16 @@ revert_nested_move(const svn_test_opts_t
SVN_ERR(sbox_wc_move(&b, "A2/B2/C", "A2/B2/C2"));
SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+ SVN_ERR(sbox_wc_revert(&b, "A2/B2/C", svn_depth_empty));
+ SVN_ERR(check_db_rows(&b, "", nodes_AB_moved_C_copied));
+ SVN_ERR(sbox_wc_revert(&b, "A2/B2/C2", svn_depth_infinity));
+ SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
+
+ SVN_ERR(sbox_wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+ SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+
SVN_ERR(sbox_wc_revert(&b, "A2/B2/C", svn_depth_infinity));
+ SVN_ERR(check_db_rows(&b, "", nodes_AB_moved_C_copied));
SVN_ERR(sbox_wc_revert(&b, "A2/B2/C2", svn_depth_infinity));
SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
@@ -4180,6 +4256,9 @@ revert_nested_move(const svn_test_opts_t
SVN_ERR(sbox_wc_move(&b, "A", "A2"));
SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+ SVN_ERR(sbox_wc_revert(&b, "A2/B", svn_depth_infinity));
+ SVN_ERR(check_db_rows(&b, "", nodes_AC_moved_B_copied));
+
return SVN_NO_ERROR;
}
@@ -4419,7 +4498,8 @@ move_update(const svn_test_opts_t *opts,
}
/* Resolve should update the move. */
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 2, ""},
@@ -4462,7 +4542,8 @@ move_update(const svn_test_opts_t *opts,
SVN_ERR(check_db_rows(&b, "", nodes));
}
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 3, ""},
@@ -4508,7 +4589,8 @@ move_update(const svn_test_opts_t *opts,
}
SVN_ERR(sbox_wc_update(&b, "", 2));
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 2, ""},
@@ -4563,7 +4645,8 @@ move_update(const svn_test_opts_t *opts,
}
SVN_ERR(sbox_wc_update(&b, "", 4));
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 4, ""},
@@ -4593,7 +4676,8 @@ move_update(const svn_test_opts_t *opts,
}
SVN_ERR(sbox_wc_update(&b, "", 5));
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 5, ""},
@@ -5124,7 +5208,8 @@ update_prop_mod_into_moved(const svn_tes
}
/* Resolve should update the move. */
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 2, ""},
@@ -5203,8 +5288,10 @@ nested_move_update(const svn_test_opts_t
/* Following the A->A2 move should raise a tree-conflict on A2/B/C,
resolving that may require an explicit resolve. */
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
- SVN_ERR(sbox_wc_resolve(&b, "A2/B/C", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A2/B/C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 2, ""},
@@ -5382,8 +5469,7 @@ nested_move_commit(const svn_test_opts_t
{3, "A2/B/C", "base-deleted", NO_COPY_FROM, "C2"},
{3, "A2/B/C/f", "base-deleted", NO_COPY_FROM},
- /* Currently these are recorded as a move but still
- have the copy history from ^/A/B/C@1 */
+ /* These need to have their copyfrom information updated */
{1, "C2", "normal", 2, "A2/B/C", MOVED_HERE},
{1, "C2/f", "normal", 2, "A2/B/C/f", MOVED_HERE},
{0}
@@ -5586,7 +5672,8 @@ move_update_conflicts(const svn_test_opt
SVN_ERR(sbox_wc_update(&b, "A", 2));
SVN_ERR(check_tree_conflict_repos_path(&b, "A", "X/A", "X/A"));
- SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 1, "X"},
@@ -5669,7 +5756,8 @@ move_update_delete_mods(const svn_test_o
}
SVN_ERR(sbox_wc_update(&b, "A", 2));
- SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 1, ""},
@@ -5704,6 +5792,8 @@ nested_moves2(const svn_test_opts_t *opt
SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A"));
SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A/A"));
SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "X"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
SVN_ERR(sbox_wc_move(&b, "A/A/A/A/A/A", "C"));
SVN_ERR(sbox_wc_move(&b, "A/A/A/A", "D"));
@@ -5712,6 +5802,7 @@ nested_moves2(const svn_test_opts_t *opt
{
nodes_row_t nodes[] = {
{0, "", "normal", 0, ""},
+ {0, "X", "normal", 2, "X"},
{0, "A", "normal", 1, "A"},
{0, "A/A", "normal", 1, "A/A"},
{0, "A/A/A", "normal", 1, "A/A/A"},
@@ -5740,6 +5831,1239 @@ nested_moves2(const svn_test_opts_t *opt
};
SVN_ERR(check_db_rows(&b, "", nodes));
}
+
+ SVN_ERR(sbox_wc_update(&b, "A", 2));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 0, ""},
+ {0, "X", "normal", 2, "X"},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/A", "normal", 2, "A/A"},
+ {0, "A/A/A", "normal", 2, "A/A/A"},
+ {0, "A/A/A/A", "normal", 2, "A/A/A/A"},
+ {0, "A/A/A/A/A", "normal", 2, "A/A/A/A/A"},
+ {0, "A/A/A/A/A/A", "normal", 2, "A/A/A/A/A/A"},
+ {2, "A/A", "base-deleted", NO_COPY_FROM, "E"},
+ {2, "A/A/A", "base-deleted", NO_COPY_FROM},
+ {2, "A/A/A/A", "base-deleted", NO_COPY_FROM},
+ {2, "A/A/A/A/A", "base-deleted", NO_COPY_FROM},
+ {2, "A/A/A/A/A/A", "base-deleted", NO_COPY_FROM},
+ {1, "E", "normal", 2, "A/A", MOVED_HERE},
+ {1, "E/A", "normal", 2, "A/A/A", MOVED_HERE},
+ {1, "E/A/A", "normal", 2, "A/A/A/A", MOVED_HERE},
+ {1, "E/A/A/A", "normal", 2, "A/A/A/A/A", MOVED_HERE},
+ {1, "E/A/A/A/A", "normal", 2, "A/A/A/A/A/A", MOVED_HERE},
+ {3, "E/A/A", "base-deleted", NO_COPY_FROM, "D"},
+ {3, "E/A/A/A", "base-deleted", NO_COPY_FROM},
+ {3, "E/A/A/A/A", "base-deleted", NO_COPY_FROM},
+ {1, "D", "normal", 2, "A/A/A/A", MOVED_HERE},
+ {1, "D/A", "normal", 2, "A/A/A/A/A", MOVED_HERE},
+ {1, "D/A/A", "normal", 2, "A/A/A/A/A/A", MOVED_HERE},
+ {3, "D/A/A", "base-deleted", NO_COPY_FROM, "C"},
+ {1, "C", "normal", 2, "A/A/A/A/A/A", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_in_delete(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_in_delete", opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D/E"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "X"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+ SVN_ERR(sbox_wc_delete(&b, "A/B"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {1, "C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+ svn_wc_conflict_choose_merged));
+ SVN_ERR(sbox_wc_resolve(&b, "A/B/C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "A/B/C/D", "normal", 2, "A/B/C/D"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {2, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "C2/D", "normal", 2, "A/B/C/D", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_update(&b, "", 3));
+ SVN_ERR(sbox_wc_revert(&b, "A/B", svn_depth_empty));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 3, ""},
+ {0, "A", "normal", 3, "A"},
+ {0, "A/B", "normal", 3, "A/B"},
+ {0, "A/B/C", "normal", 3, "A/B/C"},
+ {0, "A/B/C/D", "normal", 3, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 3, "A/B/C/D/E"},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {3, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {3, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "C2/D", "normal", 2, "A/B/C/D", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Revert should have left a tree-conflict (or broken the move). */
+ SVN_ERR(sbox_wc_resolve(&b, "A/B/C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 3, ""},
+ {0, "A", "normal", 3, "A"},
+ {0, "A/B", "normal", 3, "A/B"},
+ {0, "A/B/C", "normal", 3, "A/B/C"},
+ {0, "A/B/C/D", "normal", 3, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 3, "A/B/C/D/E"},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {3, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {3, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 3, "A/B/C", MOVED_HERE},
+ {1, "C2/D", "normal", 3, "A/B/C/D", MOVED_HERE},
+ {1, "C2/D/E", "normal", 3, "A/B/C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+switch_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "switch_move", opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/D"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/D/E"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_copy(&b, "A", "X"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "X/B/D/E/F"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_switch(&b, "/A"));
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+
+ SVN_ERR(sbox_wc_move(&b, "B/C", "C2"));
+ SVN_ERR(sbox_wc_move(&b, "B/D", "D2"));
+ SVN_ERR(sbox_wc_move(&b, "D2/E", "D2/E2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, "A"},
+ {0, "B", "normal", 2, "A/B"},
+ {0, "B/C", "normal", 2, "A/B/C"},
+ {0, "B/D", "normal", 2, "A/B/D"},
+ {0, "B/D/E", "normal", 2, "A/B/D/E"},
+ {2, "B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {2, "B/D", "base-deleted", NO_COPY_FROM, "D2"},
+ {2, "B/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "D2", "normal", 2, "A/B/D", MOVED_HERE},
+ {1, "D2/E", "normal", 2, "A/B/D/E", MOVED_HERE},
+ {2, "D2/E", "base-deleted", NO_COPY_FROM, "D2/E2"},
+ {2, "D2/E2", "normal", 2, "A/B/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Switch "bumps" revisions and paths and raises conflicts just like
+ update. */
+ SVN_ERR(sbox_wc_switch(&b, "/X"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 3, "X"},
+ {0, "B", "normal", 3, "X/B"},
+ {0, "B/C", "normal", 3, "X/B/C"},
+ {0, "B/D", "normal", 3, "X/B/D"},
+ {0, "B/D/E", "normal", 3, "X/B/D/E"},
+ {0, "B/D/E/F", "normal", 3, "X/B/D/E/F"},
+ {2, "B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {2, "B/D", "base-deleted", NO_COPY_FROM, "D2"},
+ {2, "B/D/E", "base-deleted", NO_COPY_FROM},
+ {2, "B/D/E/F", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 3, "X/B/C", MOVED_HERE},
+ {1, "D2", "normal", 2, "A/B/D", MOVED_HERE},
+ {1, "D2/E", "normal", 2, "A/B/D/E", MOVED_HERE},
+ {2, "D2/E", "base-deleted", NO_COPY_FROM, "D2/E2"},
+ {2, "D2/E2", "normal", 2, "A/B/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Conflicts from switch are resolved just like those from update. */
+ SVN_ERR(sbox_wc_resolve(&b, "B/D", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 3, "X"},
+ {0, "B", "normal", 3, "X/B"},
+ {0, "B/C", "normal", 3, "X/B/C"},
+ {0, "B/D", "normal", 3, "X/B/D"},
+ {0, "B/D/E", "normal", 3, "X/B/D/E"},
+ {0, "B/D/E/F", "normal", 3, "X/B/D/E/F"},
+ {2, "B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {2, "B/D", "base-deleted", NO_COPY_FROM, "D2"},
+ {2, "B/D/E", "base-deleted", NO_COPY_FROM},
+ {2, "B/D/E/F", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 3, "X/B/C", MOVED_HERE},
+ {1, "D2", "normal", 3, "X/B/D", MOVED_HERE},
+ {1, "D2/E", "normal", 3, "X/B/D/E", MOVED_HERE},
+ {1, "D2/E/F", "normal", 3, "X/B/D/E/F", MOVED_HERE},
+ {2, "D2/E", "base-deleted", NO_COPY_FROM, "D2/E2"},
+ {2, "D2/E/F", "base-deleted", NO_COPY_FROM},
+ {2, "D2/E2", "normal", 2, "A/B/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_resolve(&b, "D2/E", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 3, "X"},
+ {0, "B", "normal", 3, "X/B"},
+ {0, "B/C", "normal", 3, "X/B/C"},
+ {0, "B/D", "normal", 3, "X/B/D"},
+ {0, "B/D/E", "normal", 3, "X/B/D/E"},
+ {0, "B/D/E/F", "normal", 3, "X/B/D/E/F"},
+ {2, "B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {2, "B/D", "base-deleted", NO_COPY_FROM, "D2"},
+ {2, "B/D/E", "base-deleted", NO_COPY_FROM},
+ {2, "B/D/E/F", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 3, "X/B/C", MOVED_HERE},
+ {1, "D2", "normal", 3, "X/B/D", MOVED_HERE},
+ {1, "D2/E", "normal", 3, "X/B/D/E", MOVED_HERE},
+ {1, "D2/E/F", "normal", 3, "X/B/D/E/F", MOVED_HERE},
+ {2, "D2/E", "base-deleted", NO_COPY_FROM, "D2/E2"},
+ {2, "D2/E/F", "base-deleted", NO_COPY_FROM},
+ {2, "D2/E2", "normal", 3, "X/B/D/E", MOVED_HERE},
+ {2, "D2/E2/F", "normal", 3, "X/B/D/E/F", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_replace(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_replace", opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "B/X"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_move(&b, "A", "X"));
+ SVN_ERR(sbox_wc_move(&b, "B", "A"));
+ SVN_ERR(sbox_wc_move(&b, "X", "B"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "B", "normal", 1, "B"},
+ {1, "A", "normal", 1, "B", FALSE, "B", TRUE},
+ {1, "B", "normal", 1, "A", FALSE, "A", TRUE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "B", "normal", 2, "B"},
+ {0, "B/X", "normal", 2, "B/X"},
+ {1, "A", "normal", 1, "B", FALSE, "B", TRUE},
+ {1, "B", "normal", 2, "A", FALSE, "A", TRUE},
+ {1, "B/X", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_resolve(&b, "B", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "B", "normal", 2, "B"},
+ {0, "B/X", "normal", 2, "B/X"},
+ {1, "A", "normal", 2, "B", FALSE, "B", TRUE},
+ {1, "A/X", "normal", 2, "B/X", MOVED_HERE},
+ {1, "B", "normal", 2, "A", FALSE, "A", TRUE},
+ {1, "B/X", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+layered_moved_to(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ svn_error_t *err;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "layered_moved_to", opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D/E"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C/D"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C/D/E"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_propset(&b, "property", "value", "A/B/C/D/E"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_propset(&b, "property", "value", "C/D/E"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "P"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_propset(&b, "property2", "value", "A/B/C/D/E"));
+ SVN_ERR(sbox_wc_propset(&b, "property2", "value", "C/D/E"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_move(&b, "A", "X"));
+ SVN_ERR(sbox_wc_move(&b, "X/B/C/D/E", "E2"));
+ SVN_ERR(sbox_wc_delete(&b, "X/B/C"));
+ SVN_ERR(sbox_wc_move(&b, "C", "X/B/C"));
+ SVN_ERR(sbox_wc_move(&b, "X/B/C/D/E", "E3"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {0, "A/B/C/D", "normal", 1, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 1, "A/B/C/D/E"},
+ {0, "C", "normal", 1, "C"},
+ {0, "C/D", "normal", 1, "C/D"},
+ {0, "C/D/E", "normal", 1, "C/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {1, "C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A", MOVED_HERE},
+ {1, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {1, "X/B/C/D", "normal", 1, "A/B/C/D", MOVED_HERE},
+ {1, "X/B/C/D/E", "normal", 1, "A/B/C/D/E", MOVED_HERE},
+ {3, "X/B/C", "normal", 1, "C", MOVED_HERE},
+ {3, "X/B/C/D", "normal", 1, "C/D", MOVED_HERE},
+ {3, "X/B/C/D/E", "normal", 1, "C/D/E", FALSE, "E2", TRUE},
+ {5, "X/B/C/D/E", "base-deleted", NO_COPY_FROM, "E3"},
+ {1, "E2", "normal", 1, "A/B/C/D/E", MOVED_HERE},
+ {1, "E3", "normal", 1, "C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_update(&b, "A", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "X/B/C", svn_depth_empty,
+ svn_wc_conflict_choose_merged));
+ SVN_ERR(sbox_wc_resolve(&b, "X/B/C/D/E", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "A/B/C/D", "normal", 2, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 2, "A/B/C/D/E"},
+ {0, "C", "normal", 1, "C"},
+ {0, "C/D", "normal", 1, "C/D"},
+ {0, "C/D/E", "normal", 1, "C/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {1, "C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 2, "A", MOVED_HERE},
+ {1, "X/B", "normal", 2, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "X/B/C/D", "normal", 2, "A/B/C/D", MOVED_HERE},
+ {1, "X/B/C/D/E", "normal", 2, "A/B/C/D/E", MOVED_HERE},
+ {3, "X/B/C", "normal", 1, "C", MOVED_HERE},
+ {3, "X/B/C/D", "normal", 1, "C/D", MOVED_HERE},
+ {3, "X/B/C/D/E", "normal", 1, "C/D/E", FALSE, "E2", TRUE},
+ {5, "X/B/C/D/E", "base-deleted", NO_COPY_FROM, "E3"},
+ {1, "E2", "normal", 2, "A/B/C/D/E", MOVED_HERE},
+ {1, "E3", "normal", 1, "C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_update(&b, "C", 3));
+ SVN_ERR(sbox_wc_resolve(&b, "C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "X/B/C/D/E", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "A/B/C/D", "normal", 2, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 2, "A/B/C/D/E"},
+ {0, "C", "normal", 3, "C"},
+ {0, "C/D", "normal", 3, "C/D"},
+ {0, "C/D/E", "normal", 3, "C/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {1, "C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 2, "A", MOVED_HERE},
+ {1, "X/B", "normal", 2, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "X/B/C/D", "normal", 2, "A/B/C/D", MOVED_HERE},
+ {1, "X/B/C/D/E", "normal", 2, "A/B/C/D/E", MOVED_HERE},
+ {3, "X/B/C", "normal", 3, "C", MOVED_HERE},
+ {3, "X/B/C/D", "normal", 3, "C/D", MOVED_HERE},
+ {3, "X/B/C/D/E", "normal", 3, "C/D/E", FALSE, "E2", TRUE},
+ {5, "X/B/C/D/E", "base-deleted", NO_COPY_FROM, "E3"},
+ {1, "E2", "normal", 2, "A/B/C/D/E", MOVED_HERE},
+ {1, "E3", "normal", 3, "C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* An update with no text/property/tree changes in A, just a revision bump. */
+ SVN_ERR(sbox_wc_update(&b, "A", 4));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 4, "A"},
+ {0, "A/B", "normal", 4, "A/B"},
+ {0, "A/B/C", "normal", 4, "A/B/C"},
+ {0, "A/B/C/D", "normal", 4, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 4, "A/B/C/D/E"},
+ {0, "C", "normal", 3, "C"},
+ {0, "C/D", "normal", 3, "C/D"},
+ {0, "C/D/E", "normal", 3, "C/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {1, "C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 4, "A", MOVED_HERE},
+ {1, "X/B", "normal", 4, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 4, "A/B/C", MOVED_HERE},
+ {1, "X/B/C/D", "normal", 4, "A/B/C/D", MOVED_HERE},
+ {1, "X/B/C/D/E", "normal", 4, "A/B/C/D/E", MOVED_HERE},
+ {3, "X/B/C", "normal", 3, "C", MOVED_HERE},
+ {3, "X/B/C/D", "normal", 3, "C/D", MOVED_HERE},
+ {3, "X/B/C/D/E", "normal", 3, "C/D/E", FALSE, "E2", TRUE},
+ {5, "X/B/C/D/E", "base-deleted", NO_COPY_FROM, "E3"},
+ {1, "E2", "normal", 4, "A/B/C/D/E", MOVED_HERE},
+ {1, "E3", "normal", 3, "C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Update for conflicts on A and C */
+ SVN_ERR(sbox_wc_update(&b, "", 5));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 5, ""},
+ {0, "A", "normal", 5, "A"},
+ {0, "A/B", "normal", 5, "A/B"},
+ {0, "A/B/C", "normal", 5, "A/B/C"},
+ {0, "A/B/C/D", "normal", 5, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 5, "A/B/C/D/E"},
+ {0, "P", "normal", 5, "P"},
+ {0, "C", "normal", 5, "C"},
+ {0, "C/D", "normal", 5, "C/D"},
+ {0, "C/D/E", "normal", 5, "C/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {1, "C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 4, "A", MOVED_HERE},
+ {1, "X/B", "normal", 4, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 4, "A/B/C", MOVED_HERE},
+ {1, "X/B/C/D", "normal", 4, "A/B/C/D", MOVED_HERE},
+ {1, "X/B/C/D/E", "normal", 4, "A/B/C/D/E", MOVED_HERE},
+ {3, "X/B/C", "normal", 3, "C", MOVED_HERE},
+ {3, "X/B/C/D", "normal", 3, "C/D", MOVED_HERE},
+ {3, "X/B/C/D/E", "normal", 3, "C/D/E", FALSE, "E2", TRUE},
+ {5, "X/B/C/D/E", "base-deleted", NO_COPY_FROM, "E3"},
+ {1, "E2", "normal", 4, "A/B/C/D/E", MOVED_HERE},
+ {1, "E3", "normal", 3, "C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Partially resolve A */
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "X/B/C", svn_depth_empty,
+ svn_wc_conflict_choose_merged));
+
+ /* Cannot resolve C */
+ err = sbox_wc_resolve(&b, "C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+ /* Complete resolving A and then resolve C */
+ SVN_ERR(sbox_wc_resolve(&b, "X/B/C/D/E", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+ SVN_ERR(sbox_wc_resolve(&b, "C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 5, ""},
+ {0, "A", "normal", 5, "A"},
+ {0, "A/B", "normal", 5, "A/B"},
+ {0, "A/B/C", "normal", 5, "A/B/C"},
+ {0, "A/B/C/D", "normal", 5, "A/B/C/D"},
+ {0, "A/B/C/D/E", "normal", 5, "A/B/C/D/E"},
+ {0, "P", "normal", 5, "P"},
+ {0, "C", "normal", 5, "C"},
+ {0, "C/D", "normal", 5, "C/D"},
+ {0, "C/D/E", "normal", 5, "C/D/E"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "C", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {1, "C/D", "base-deleted", NO_COPY_FROM},
+ {1, "C/D/E", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 5, "A", MOVED_HERE},
+ {1, "X/B", "normal", 5, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 5, "A/B/C", MOVED_HERE},
+ {1, "X/B/C/D", "normal", 5, "A/B/C/D", MOVED_HERE},
+ {1, "X/B/C/D/E", "normal", 5, "A/B/C/D/E", MOVED_HERE},
+ {3, "X/B/C", "normal", 5, "C", MOVED_HERE},
+ {3, "X/B/C/D", "normal", 5, "C/D", MOVED_HERE},
+ {3, "X/B/C/D/E", "normal", 5, "C/D/E", FALSE, "E2", TRUE},
+ {5, "X/B/C/D/E", "base-deleted", NO_COPY_FROM, "E3"},
+ {1, "E2", "normal", 5, "A/B/C/D/E", MOVED_HERE},
+ {1, "E3", "normal", 3, "C/D/E", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+update_within_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ svn_error_t *err;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "update_within_move", opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_move(&b, "A", "X"));
+ SVN_ERR(sbox_wc_update(&b, "A/B/C", 2));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "A/B/C/D", "normal", 2, "A/B/C/D"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A", MOVED_HERE},
+ {1, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "X/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Can't resolve mixed-revision source to mine-conflict. */
+ err = sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_merged));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "A/B/C/D", "normal", 2, "A/B/C/D"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A"},
+ {1, "X/B", "normal", 1, "A/B"},
+ {1, "X/B/C", "normal", 1, "A/B/C"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+commit_moved_descendant(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ SVN_ERR(svn_test__sandbox_create(&b, "commit_moved_descendant", opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A/A"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_copy(&b, "A", "A_copied"));
+ SVN_ERR(sbox_wc_move(&b, "A/A/A", "AAA_moved"));
+ SVN_ERR(sbox_wc_delete(&b, "A/A"));
+ SVN_ERR(sbox_wc_copy(&b, "A_copied/A", "A/A"));
+
+ /* And now I want to commit AAA_moved (the entire move), but not
+ the replacement of A/A */
+
+ /* For now, just start committing directly */
+ /* ### This fails, because A/A/A is not collected by the commit
+ harvester (it doesn't need committing, but our move filter
+ blocks on it) */
+ SVN_ERR(sbox_wc_commit(&b, ""));
+
+ /* It would be nicer if we could just do a: */
+ /* SVN_ERR(sbox_wc_commit(&b, "AAA_moved")); */
+ /* Which then includes the delete half of the move, when it is
+ shadowed, like in this case. The commit processing doesn't
+ support this yet though*/
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+commit_moved_away_descendant(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ SVN_ERR(svn_test__sandbox_create(&b, "commit_moved_away_descendant",
+ opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A/A"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_copy(&b, "A", "A_copied"));
+ SVN_ERR(sbox_wc_move(&b, "A/A/A", "AAA_moved"));
+ SVN_ERR(sbox_wc_delete(&b, "A/A"));
+ SVN_ERR(sbox_wc_copy(&b, "A_copied/A", "A/A"));
+
+ /* And now I want to make sure that I can't commit A, without also
+ committing AAA_moved, as that would break the move*/
+ SVN_ERR(sbox_wc_commit(&b, "A"));
+
+ return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
+ "The commit should have failed");
+
+ /*return SVN_NO_ERROR;*/
+}
+
+static svn_error_t *
+finite_move_update_bump(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ svn_error_t *err;
+ SVN_ERR(svn_test__sandbox_create(&b, "finite_move_update_bump",
+ opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "P"));
+ SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+ sbox_file_write(&b, "P/Q/f", "r1 content\n");
+ SVN_ERR(sbox_wc_add(&b, "P/Q/f"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_mkdir(&b, "X"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+ SVN_ERR(sbox_wc_update(&b, "A/B/C", 2));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
+ err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "P", "normal", 1, "P"},
+ {0, "P/Q", "normal", 1, "P/Q"},
+ {0, "P/Q/f", "normal", 1, "P/Q/f"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM, "B2"},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "B2", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+ SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
+ SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_files));
+ SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_files));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
+ err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {0, "P", "normal", 1, "P"},
+ {0, "P/Q", "normal", 2, "P/Q"},
+ {0, "P/Q/f", "normal", 2, "P/Q/f"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM, "B2"},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "P/Q", "base-deleted", NO_COPY_FROM, "Q2"},
+ {2, "P/Q/f", "base-deleted", NO_COPY_FROM},
+ {1, "B2", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {1, "Q2", "normal", 2, "P/Q", MOVED_HERE},
+ {1, "Q2/f", "normal", 2, "P/Q/f", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+ SVN_ERR(sbox_wc_move(&b, "P", "P2"));
+ SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_immediates));
+ SVN_ERR(sbox_wc_update_depth(&b, "P", 2, svn_depth_immediates));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "P", NULL, NULL));
+ err = sbox_wc_resolve(&b, "P", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "P", "normal", 2, "P"},
+ {0, "P/Q", "normal", 2, "P/Q"},
+ {0, "P/Q/f", "normal", 1, "P/Q/f"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM, "B2"},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "P", "base-deleted", NO_COPY_FROM, "P2"},
+ {1, "P/Q", "base-deleted", NO_COPY_FROM},
+ {1, "P/Q/f", "base-deleted", NO_COPY_FROM},
+ {1, "B2", "normal", 2, "A/B", MOVED_HERE},
+ {1, "B2/C", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "P2", "normal", 1, "P", MOVED_HERE},
+ {1, "P2/Q", "normal", 1, "P/Q", MOVED_HERE},
+ {1, "P2/Q/f", "normal", 1, "P/Q/f", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+ SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
+ SVN_ERR(sbox_wc_update_depth(&b, "A/B/C", 2, svn_depth_empty));
+ SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_empty));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", NULL, NULL));
+ err = sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 2, "A/B/C"},
+ {0, "P", "normal", 1, "P"},
+ {0, "P/Q", "normal", 2, "P/Q"},
+ {0, "P/Q/f", "normal", 1, "P/Q/f"},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {2, "P/Q", "base-deleted", NO_COPY_FROM, "Q2"},
+ {2, "P/Q/f", "base-deleted", NO_COPY_FROM},
+ {1, "C2", "normal", 2, "A/B/C", MOVED_HERE},
+ {1, "Q2", "normal", 1, "P/Q", MOVED_HERE},
+ {1, "Q2/f", "normal", 1, "P/Q/f", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_away_delete_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ SVN_ERR(svn_test__sandbox_create(&b, "move_away_delete_update",
+ opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "P"));
+ SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_delete(&b, "A/B"));
+ SVN_ERR(sbox_wc_delete(&b, "P/Q"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+ SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+ svn_wc_conflict_choose_merged));
+ SVN_ERR(sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
+ svn_wc_conflict_choose_merged));
+ /* Either update or resolve should clear the moved-here flags */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "P", "normal", 2, "P"},
+ {1, "C2", "normal", 1, "A/B/C"},
+ {1, "Q2", "normal", 1, "P/Q"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_not_present_variants(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ SVN_ERR(svn_test__sandbox_create(&b, "move_not_present_variants",
+ opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "D"));
+ SVN_ERR(sbox_wc_mkdir(&b, "D/B"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_delete(&b, "A/B"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+
+ SVN_ERR(sbox_wc_delete(&b, "B/B"));
+ SVN_ERR(sbox_wc_update(&b, "C/B", 0));
+ SVN_ERR(sbox_wc_exclude(&b, "D/B"));
+
+ SVN_ERR(sbox_wc_copy(&b, "A", "cA"));
+ SVN_ERR(sbox_wc_copy(&b, "B", "cB"));
+ SVN_ERR(sbox_wc_copy(&b, "C", "cC"));
+ SVN_ERR(sbox_wc_copy(&b, "D", "cD"));
+
+ SVN_ERR(sbox_wc_copy(&b, "cA", "ccA"));
+ SVN_ERR(sbox_wc_copy(&b, "cB", "ccB"));
+ SVN_ERR(sbox_wc_copy(&b, "cC", "ccC"));
+ SVN_ERR(sbox_wc_copy(&b, "cD", "ccD"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+
+ /* Copy of a deleted + committed node */
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "not-present", 2, "A/B"},
+
+ {1, "cA", "normal", 1, "A"},
+ {1, "cA/B", "not-present", 2, "A/B"},
+
+ {1, "ccA", "normal", 1, "A"},
+ {1, "ccA/B", "not-present", 2, "A/B"},
+
+ /* Copy of a local deleted node */
+ {0, "B", "normal", 1, "B"},
+ {0, "B/B", "normal", 1, "B/B"},
+ {2, "B/B", "base-deleted", NO_COPY_FROM},
+
+ {1, "cB", "normal", 1, "B",},
+ {1, "cB/B", "normal", 1, "B/B"},
+ {2, "cB/B", "base-deleted", NO_COPY_FROM},
+
+ {1, "ccB", "normal", 1, "B"},
+ {1, "ccB/B", "normal", 1, "B/B"},
+ {2, "ccB/B", "base-deleted", NO_COPY_FROM},
+
+ /* Copy of a to r0 updated node */
+ {0, "C", "normal", 1, "C"},
+ {0, "C/B", "not-present", 0, "C/B"},
+
+ {1, "cC", "normal", 1, "C"},
+ {1, "cC/B", "not-present", 0, "C/B"},
+
+ {1, "ccC", "normal", 1, "C"},
+ {1, "ccC/B", "not-present", 0, "C/B"},
+
+ /* Copy of an excluded node */
+ {0, "D", "normal", 1, "D"},
+ {0, "D/B", "excluded", 1, "D/B"},
+
+ {1, "cD", "normal", 1, "D"},
+ {1, "cD/B", "excluded", 1, "D/B"},
+
+ {1, "ccD", "normal", 1, "D"},
+ {1, "ccD/B", "excluded", 1, "D/B"},
+
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+ SVN_ERR(sbox_wc_delete(&b, "B/B"));
+
+ /* And now do the same thing with moves */
+
+ SVN_ERR(sbox_wc_move(&b, "A", "mA"));
+ SVN_ERR(sbox_wc_move(&b, "B", "mB"));
+ SVN_ERR(sbox_wc_move(&b, "C", "mC"));
+ SVN_ERR(sbox_wc_move(&b, "D", "mD"));
+
+ SVN_ERR(sbox_wc_move(&b, "mA", "mmA"));
+ SVN_ERR(sbox_wc_move(&b, "mB", "mmB"));
+ SVN_ERR(sbox_wc_move(&b, "mC", "mmC"));
+ SVN_ERR(sbox_wc_move(&b, "mD", "mmD"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+
+ /* Move of a deleted + committed node */
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "not-present", 2, "A/B"},
+ {1, "A", "base-deleted", NO_COPY_FROM, "mmA"},
+
+ {1, "mmA", "normal", 1, "A", MOVED_HERE},
+ {1, "mmA/B", "not-present", 2, "A/B", MOVED_HERE},
+
+
+ /* Move of a local deleted node */
+ {0, "B", "normal", 1, "B"},
+ {0, "B/B", "normal", 1, "B/B"},
+ {1, "B", "base-deleted", NO_COPY_FROM, "mmB"},
+ {1, "B/B", "base-deleted", NO_COPY_FROM},
+
+ {1, "mmB", "normal", 1, "B", MOVED_HERE},
+ {1, "mmB/B", "normal", 1, "B/B", MOVED_HERE},
+ {2, "mmB/B", "base-deleted", NO_COPY_FROM},
+
+ /* Move of a to r0 updated node */
+ {0, "C", "normal", 1, "C"},
+ {0, "C/B", "not-present", 0, "C/B"},
+ {1, "C", "base-deleted", NO_COPY_FROM, "mmC"},
+
+ {1, "mmC", "normal", 1, "C", MOVED_HERE},
+ {1, "mmC/B", "not-present", 0, "C/B", MOVED_HERE},
+
+ /* Move of an excluded node */
+ {0, "D", "normal", 1, "D",},
+ {0, "D/B", "excluded", 1, "D/B", },
+ {1, "D", "base-deleted", NO_COPY_FROM, "mmD"},
+
+ {1, "mmD", "normal", 1, "D", MOVED_HERE},
+ {1, "mmD/B", "excluded", 1, "D/B", MOVED_HERE},
+
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* And move everything back */
+ SVN_ERR(sbox_wc_move(&b, "mmA", "A"));
+ SVN_ERR(sbox_wc_move(&b, "mmB", "B"));
+ SVN_ERR(sbox_wc_move(&b, "mmC", "C"));
+ SVN_ERR(sbox_wc_move(&b, "mmD", "D"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+
+ /* deleted + committed node */
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "not-present", 2, "A/B"},
+
+ /* local deleted node */
+ {0, "B", "normal", 1, "B"},
+ {0, "B/B", "normal", 1, "B/B"},
+ {2, "B/B", "base-deleted", NO_COPY_FROM},
+
+ /* To r0 updated node */
+ {0, "C", "normal", 1, "C"},
+ {0, "C/B", "not-present", 0, "C/B"},
+
+ /* Move of an excluded node */
+ {0, "D", "normal", 1, "D",},
+ {0, "D/B", "excluded", 1, "D/B", },
+
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+update_child_under_add(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ svn_error_t *err;
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "not-present", 0, "A/B"},
+ {2, "A/B", "normal", NO_COPY_FROM},
+ {3, "A/B/C", "normal", NO_COPY_FROM},
+ {4, "A/B/C/D", "normal", NO_COPY_FROM},
+ {0}
+ };
+
+ SVN_ERR(svn_test__sandbox_create(&b, "update_child_under_add",
+ opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_update(&b, "A/B", 0));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D"));
+ SVN_ERR(check_db_rows(&b, "", nodes));
+
+ /* A/B/C/D is skipped as it has no base node parent */
+ SVN_ERR(sbox_wc_update(&b, "A/B/C/D", 1));
+ SVN_ERR(check_db_rows(&b, "", nodes));
+
+ /* A/B/C should be skipped as it has a not-present base node parent */
+ err = sbox_wc_update(&b, "A/B/C", 1);
+ svn_error_clear(err); /* Allow any error and always check NODES. */
+ SVN_ERR(check_db_rows(&b, "", nodes));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+delete_over_moved_away(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "delete_over_moved_away",
+ opts, pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+
+ SVN_ERR(sbox_wc_commit(&b, ""));
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ SVN_ERR(sbox_wc_move(&b, "A/B", "B"));
+ SVN_ERR(sbox_wc_delete(&b, "A"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+
+ {0, "A", "normal", 1, "A"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {0, "A/B", "normal", 1, "A/B"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM, "B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+
+ {1, "B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Now replace A with a similar tree */
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+
+ {0, "A", "normal", 1, "A"},
+ {1, "A", "normal", NO_COPY_FROM},
+ {0, "A/B", "normal", 1, "A/B"},
+ {1, "A/B", "base-deleted", NO_COPY_FROM, "B"},
+ {2, "A/B", "normal", NO_COPY_FROM},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {3, "A/B/C", "normal", NO_COPY_FROM},
+
+ {1, "B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* And delete the new A */
+ SVN_ERR(sbox_wc_delete(&b, "A"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+
+ {0, "A", "normal", 1, "A"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {0, "A/B", "normal", 1, "A/B"},
+ /* And here the moved-to information is lost */
+ {1, "A/B", "base-deleted", NO_COPY_FROM, "B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+
+ /* But the moved-here is still there */
+ {1, "B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
return SVN_NO_ERROR;
}
@@ -5838,13 +7162,14 @@ struct svn_test_descriptor_t test_funcs[
"scan_delete"),
SVN_TEST_OPTS_PASS(test_follow_moved_to,
"follow_moved_to"),
- SVN_TEST_OPTS_PASS(mixed_rev_move,
- "mixed_rev_move"),
+ SVN_TEST_OPTS_WIMP(mixed_rev_move,
+ "mixed_rev_move",
+ "needs different libsvn_wc entry point"),
SVN_TEST_OPTS_PASS(update_prop_mod_into_moved,
"update_prop_mod_into_moved"),
SVN_TEST_OPTS_PASS(nested_move_update,
"nested_move_update"),
- SVN_TEST_OPTS_XFAIL(nested_move_commit,
+ SVN_TEST_OPTS_PASS(nested_move_commit,
"nested_move_commit"),
SVN_TEST_OPTS_PASS(nested_move_update2,
"nested_move_update2"),
@@ -5854,5 +7179,29 @@ struct svn_test_descriptor_t test_funcs[
"move_update_delete_mods"),
SVN_TEST_OPTS_PASS(nested_moves2,
"nested_moves2"),
+ SVN_TEST_OPTS_PASS(move_in_delete,
+ "move_in_delete (issue 4303)"),
+ SVN_TEST_OPTS_PASS(switch_move,
+ "switch_move"),
+ SVN_TEST_OPTS_PASS(move_replace,
+ "move_replace"),
+ SVN_TEST_OPTS_PASS(layered_moved_to,
+ "layered_moved_to"),
+ SVN_TEST_OPTS_PASS(update_within_move,
+ "update_within_move"),
+ SVN_TEST_OPTS_XFAIL(commit_moved_descendant,
+ "commit_moved_descendant"),
+ SVN_TEST_OPTS_XFAIL(commit_moved_away_descendant,
+ "commit_moved_away_descendant"),
+ SVN_TEST_OPTS_PASS(finite_move_update_bump,
+ "finite_move_update_bump"),
+ SVN_TEST_OPTS_PASS(move_away_delete_update,
+ "move_away_delete_update"),
+ SVN_TEST_OPTS_PASS(move_not_present_variants,
+ "move_not_present_variants"),
+ SVN_TEST_OPTS_PASS(update_child_under_add,
+ "update_child_under_add (issue 4111)"),
+ SVN_TEST_OPTS_PASS(delete_over_moved_away,
+ "delete_over_moved_away"),
SVN_TEST_NULL
};
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/pristine-store-test.c Sat Feb 23 01:25:38 2013
@@ -187,8 +187,7 @@ pristine_write_read(const svn_test_opts_
SVN_ERR(svn_wc__db_pristine_remove(db, wc_abspath, data_sha1, pool));
err = svn_wc__db_pristine_read(&data_read_back, NULL, db, wc_abspath,
data_sha1, pool, pool);
- SVN_TEST_ASSERT(err != NULL);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_PATH_NOT_FOUND);
}
/* Ensure it's no longer found in the store. */
@@ -308,9 +307,7 @@ reject_mismatching_text(const svn_test_o
SVN_ERR(write_and_checksum_temp_file(&path, NULL, NULL,
data2, pristine_tmp_dir, pool));
err = svn_wc__db_pristine_install(db, path, data_sha1, data_md5, pool);
- SVN_TEST_ASSERT(err != NULL);
- SVN_TEST_ASSERT(err->apr_err == SVN_ERR_WC_CORRUPT_TEXT_BASE);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CORRUPT_TEXT_BASE);
}
return SVN_NO_ERROR;
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c Sat Feb 23 01:25:38 2013
@@ -314,7 +314,10 @@ sbox_wc_commit(svn_test__sandbox_t *b, c
}
svn_error_t *
-sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum)
+sbox_wc_update_depth(svn_test__sandbox_t *b,
+ const char *path,
+ svn_revnum_t revnum,
+ svn_depth_t depth)
{
svn_client_ctx_t *ctx;
apr_array_header_t *result_revs;
@@ -328,12 +331,19 @@ sbox_wc_update(svn_test__sandbox_t *b, c
APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, path);
SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
ctx->wc_ctx = b->wc_ctx;
- return svn_client_update4(&result_revs, paths, &revision, svn_depth_infinity,
- TRUE, FALSE, FALSE, FALSE, FALSE,
+ return svn_client_update4(&result_revs, paths, &revision, depth,
+ FALSE, FALSE, FALSE, FALSE, FALSE,
ctx, b->pool);
}
svn_error_t *
+sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum)
+{
+ SVN_ERR(sbox_wc_update_depth(b, path, revnum, svn_depth_infinity));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
sbox_wc_switch(svn_test__sandbox_t *b, const char *url)
{
svn_client_ctx_t *ctx;
@@ -355,15 +365,16 @@ sbox_wc_switch(svn_test__sandbox_t *b, c
svn_error_t *
sbox_wc_resolved(svn_test__sandbox_t *b, const char *path)
{
- return sbox_wc_resolve(b, path, svn_wc_conflict_choose_merged);
+ return sbox_wc_resolve(b, path, svn_depth_infinity,
+ svn_wc_conflict_choose_merged);
}
svn_error_t *
-sbox_wc_resolve(svn_test__sandbox_t *b, const char *path,
+sbox_wc_resolve(svn_test__sandbox_t *b, const char *path, svn_depth_t depth,
svn_wc_conflict_choice_t conflict_choice)
{
SVN_ERR(svn_wc__resolve_conflicts(b->wc_ctx, sbox_wc_path(b, path),
- svn_depth_infinity,
+ depth,
TRUE /* resolve_text */,
"" /* resolve_prop (ALL props) */,
TRUE /* resolve_tree */,
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h Sat Feb 23 01:25:38 2013
@@ -131,6 +131,12 @@ svn_error_t *
sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum);
svn_error_t *
+sbox_wc_update_depth(svn_test__sandbox_t *b,
+ const char *path,
+ svn_revnum_t revnum,
+ svn_depth_t depth);
+
+svn_error_t *
sbox_wc_switch(svn_test__sandbox_t *b, const char *url);
/* */
@@ -139,7 +145,7 @@ sbox_wc_resolved(svn_test__sandbox_t *b,
/* */
svn_error_t *
-sbox_wc_resolve(svn_test__sandbox_t *b, const char *path,
+sbox_wc_resolve(svn_test__sandbox_t *b, const char *path, svn_depth_t depth,
svn_wc_conflict_choice_t conflict_choice);
/* */
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-queries-test.c Sat Feb 23 01:25:38 2013
@@ -73,6 +73,7 @@ static const int schema_statements[] =
STMT_CREATE_TARGET_PROP_CACHE,
STMT_CREATE_REVERT_LIST,
STMT_CREATE_DELETE_LIST,
+ STMT_CREATE_UPDATE_MOVE_LIST,
-1 /* final marker */
};
@@ -81,8 +82,6 @@ static const int schema_statements[] =
static const int slow_statements[] =
{
/* Operate on the entire WC */
- STMT_HAS_SWITCHED_WCROOT, /* wc scan op_depth 0 */
- STMT_HAS_SWITCHED_WCROOT_REPOS_ROOT, /* wc scan op_depth 0 */
STMT_SELECT_ALL_NODES, /* schema validation code */
/* Is there a record? ### Can we somehow check for LIMIT 1? */
@@ -92,6 +91,7 @@ static const int slow_statements[] =
STMT_INSERT_ACTUAL_EMPTIES,
STMT_SELECT_REVERT_LIST_RECURSIVE,
STMT_SELECT_DELETE_LIST,
+ STMT_SELECT_UPDATE_MOVE_LIST,
/* Designed as slow to avoid penalty on other queries */
STMT_SELECT_UNREFERENCED_PRISTINES,
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-test.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-test.c Sat Feb 23 01:25:38 2013
@@ -135,6 +135,7 @@ test_node_get_base(const svn_test_opts_t
SVN_ERR(svn_wc__node_get_base(&revision, &repos_relpath,
&repos_root_url, &repos_uuid,
+ NULL,
b->wc_ctx, local_abspath,
b->pool, b->pool));
SVN_TEST_ASSERT(revision == subtest->base_rev);
Modified: subversion/branches/ev2-export/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/svn_test_fs.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/ev2-export/subversion/tests/svn_test_fs.c Sat Feb 23 01:25:38 2013
@@ -213,7 +213,10 @@ svn_test__create_repos(svn_repos_t **rep
if (apr_stat(&finfo, name, APR_FINFO_TYPE, pool) == APR_SUCCESS)
{
if (finfo.filetype == APR_DIR)
- SVN_ERR(svn_repos_delete(name, pool));
+ SVN_ERR_W(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool),
+ apr_psprintf(pool,
+ "cannot create repos '%s' there is already "
+ "a directory of that name", name));
else
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"there is already a file named '%s'", name);
Modified: subversion/branches/ev2-export/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/client-side/bash_completion?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/client-side/bash_completion (original)
+++ subversion/branches/ev2-export/tools/client-side/bash_completion Sat Feb 23 01:25:38 2013
@@ -647,14 +647,6 @@ _svn()
[[ ${COMPREPLY} ]] && return 0
fi
- # force mandatory --accept option for 'resolve' command
- if [[ $cmd = 'resolve' && ! $acceptOpt ]]
- then
- COMPREPLY=( $( compgen -W '--accept' -- $cur ) )
- # force option now! others will be available on later completions
- return 0
- fi
-
# maximum number of additional arguments expected in various forms
case $cmd in
merge)
@@ -789,7 +781,7 @@ _svn()
# otherwise build possible options for the command
pOpts="--username --password --no-auth-cache --non-interactive \
- --trust-server-cert"
+ --trust-server-cert --force-interactive"
mOpts="-m --message -F --file --encoding --force-log --with-revprop"
rOpts="-r --revision"
qOpts="-q --quiet"
@@ -826,7 +818,8 @@ _svn()
;;
commit|ci)
cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts \
- --no-unlock $cOpts --keep-changelists"
+ --no-unlock $cOpts --keep-changelists \
+ --include-externals"
;;
copy|cp)
cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
@@ -840,7 +833,9 @@ _svn()
cmdOpts="$rOpts -x --extensions --diff-cmd --no-diff-deleted \
$nOpts $pOpts --force --old --new --notice-ancestry \
-c --change --summarize $cOpts --xml --git \
- --internal-diff --show-copies-as-adds"
+ --internal-diff --show-copies-as-adds \
+ --ignore-properties --properties-only --no-diff-added \
+ --patch-compatible"
;;
export)
cmdOpts="$rOpts $qOpts $pOpts $nOpts --force --native-eol \
@@ -859,7 +854,7 @@ _svn()
;;
list|ls)
cmdOpts="$rOpts -v --verbose -R --recursive $pOpts \
- --incremental --xml --depth"
+ --incremental --xml --depth --include-externals"
;;
lock)
cmdOpts="-m --message -F --file --encoding --force-log \
@@ -870,13 +865,13 @@ _svn()
--incremental --xml $qOpts -l --limit -c --change \
$gOpts --with-all-revprops --with-revprop --depth \
--diff --diff-cmd -x --extensions --internal-diff \
- --with-no-revprops"
+ --with-no-revprops --search --search-and"
;;
merge)
cmdOpts="$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd \
$pOpts --ignore-ancestry -c --change -x --extensions \
--record-only --accept --reintegrate \
- --allow-mixed-revisions"
+ --allow-mixed-revisions -v --verbose"
;;
mergeinfo)
cmdOpts="$rOpts $pOpts --depth --show-revs -R --recursive"
@@ -886,7 +881,7 @@ _svn()
;;
move|mv|rename|ren)
cmdOpts="$mOpts $rOpts $qOpts --force --editor-cmd $pOpts \
- --parents"
+ --parents --allow-mixed-revisions"
;;
patch)
cmdOpts="$qOpts $pOpts --dry-run --ignore-whitespace \
@@ -903,13 +898,13 @@ _svn()
cmdOpts="$cmdOpts --revprop $rOpts"
;;
propget|pget|pg)
- cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts $cOpts \
- --depth --xml"
+ cmdOpts="-v --verbose -R --recursive $rOpts --strict \
+ $pOpts $cOpts --depth --xml --show-inherited-props"
[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
;;
proplist|plist|pl)
cmdOpts="-v --verbose -R --recursive $rOpts --revprop $qOpts \
- $pOpts $cOpts --depth --xml"
+ $pOpts $cOpts --depth --xml --show-inherited-props"
;;
propset|pset|ps)
cmdOpts="$qOpts --targets -R --recursive \
@@ -1035,9 +1030,9 @@ _svnadmin ()
cur=${COMP_WORDS[COMP_CWORD]}
# Possible expansions, without pure-prefix abbreviations such as "h".
- cmds='crashtest create deltify dump help hotcopy list-dblogs \
- list-unused-dblogs load lslocks lstxns pack recover rmlocks \
- rmtxns setlog setrevprop setuuid upgrade verify --version'
+ cmds='crashtest create deltify dump freeze help hotcopy list-dblogs \
+ list-unused-dblogs load lock lslocks lstxns pack recover rmlocks \
+ rmtxns setlog setrevprop setuuid unlock upgrade verify --version'
if [[ $COMP_CWORD -eq 1 ]] ; then
COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
@@ -1046,7 +1041,8 @@ _svnadmin ()
# options that require a parameter
# note: continued lines must end '|' continuing lines must start '|'
- optsParam="-r|--revision|--parent-dir|--fs-type"
+ optsParam="-r|--revision|--parent-dir|--fs-type|-M|--memory-cache-size"
+ optsParam="$optsParam|-F|--file"
# if not typing an option, or if the previous option required a
# parameter, then fallback on ordinary filename expansion
@@ -1061,13 +1057,18 @@ _svnadmin ()
case ${COMP_WORDS[1]} in
create)
cmdOpts="--bdb-txn-nosync --bdb-log-keep --config-dir \
- --fs-type --pre-1.4-compatible --pre-1.5-compatible"
+ --fs-type --pre-1.4-compatible --pre-1.5-compatible \
+ --pre-1.6-compatible --compatible-version"
;;
deltify)
cmdOpts="-r --revision -q --quiet"
;;
dump)
- cmdOpts="-r --revision --incremental -q --quiet --deltas"
+ cmdOpts="-r --revision --incremental -q --quiet --deltas \
+ -M --memory-cache-size"
+ ;;
+ freeze)
+ cmdOpts="-F --file"
;;
help|h|\?)
cmdOpts="$cmds"
@@ -1077,7 +1078,11 @@ _svnadmin ()
;;
load)
cmdOpts="--ignore-uuid --force-uuid --parent-dir -q --quiet \
- --use-pre-commit-hook --use-post-commit-hook"
+ --use-pre-commit-hook --use-post-commit-hook \
+ --bypass-prop-validation -M --memory-cache-size"
+ ;;
+ lock|unlock)
+ cmdOpts="--bypass-hooks"
;;
recover)
cmdOpts="--wait"
@@ -1121,6 +1126,10 @@ _svnadmin ()
--help) cmdOpts=${cmdOpts/ -h / } ;;
-r) cmdOpts=${cmdOpts/ --revision / } ;;
--revision) cmdOpts=${cmdOpts/ -r / } ;;
+ -F) cmdOpts=${cmdOpts/ --file / } ;;
+ --file) cmdOpts=${cmdOpts/ -F / } ;;
+ -M) cmdOpts=${cmdOpts/ --memory-cache-size / } ;;
+ --memory-cache-size) cmdOpts=${cmdOpts/ --M / } ;;
esac
# skip next option if this one requires a parameter
Modified: subversion/branches/ev2-export/tools/dev/gen-py-errors.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/gen-py-errors.py?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/gen-py-errors.py (original)
+++ subversion/branches/ev2-export/tools/dev/gen-py-errors.py Sat Feb 23 01:25:38 2013
@@ -33,7 +33,7 @@ import os
import re
HEADER = '''#!/usr/bin/env python
-### This file automatically generated by tools/dev/gen-py-error.py,
+### This file automatically generated by tools/dev/gen-py-errors.py,
### which see for more information
###
### It is versioned for convenience.
Modified: subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn Sat Feb 23 01:25:38 2013
@@ -71,7 +71,7 @@ GNU_ICONV_VER = 1.14
APR_UTIL_VER = 1.4.1
HTTPD_VER = 2.2.22
NEON_VER = 0.29.6
-SERF_VER = 1.1.0
+SERF_VER = 1.2.0
SERF_OLD_VER = 0.3.1
CYRUS_SASL_VER = 2.1.25
SQLITE_VER = 3071201
Modified: subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.conf.example
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.conf.example?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.conf.example (original)
+++ subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.conf.example Sat Feb 23 01:25:38 2013
@@ -146,6 +146,15 @@
#
# from_addr = %(author)s@example.com
#
+# The substitution variable "repos_basename" is provided, and is set to
+# the directory name of the repository. This can be useful to set
+# a custom subject that can be re-used in multiple repositories:
+#
+# commit_subject_prefix = [svn-%(repos_basename)s]
+#
+# For example if the repository is at /path/to/repo/project-x then
+# the subject of commit emails will be prefixed with [svn-project-x]
+#
#
# SUMMARY
#
Modified: subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.py?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.py (original)
+++ subversion/branches/ev2-export/tools/hook-scripts/mailer/mailer.py Sat Feb 23 01:25:38 2013
@@ -98,7 +98,10 @@ def main(pool, cmd, config_fname, repos_
if cmd == 'commit':
revision = int(cmd_args[0])
repos = Repository(repos_dir, revision, pool)
- cfg = Config(config_fname, repos, { 'author' : repos.author })
+ cfg = Config(config_fname, repos,
+ {'author': repos.author,
+ 'repos_basename': os.path.basename(repos.repos_dir)
+ })
messenger = Commit(pool, cfg, repos)
elif cmd == 'propchange' or cmd == 'propchange2':
revision = int(cmd_args[0])
@@ -108,14 +111,20 @@ def main(pool, cmd, config_fname, repos_
repos = Repository(repos_dir, revision, pool)
# Override the repos revision author with the author of the propchange
repos.author = author
- cfg = Config(config_fname, repos, { 'author' : author })
+ cfg = Config(config_fname, repos,
+ {'author': author,
+ 'repos_basename': os.path.basename(repos.repos_dir)
+ })
messenger = PropChange(pool, cfg, repos, author, propname, action)
elif cmd == 'lock' or cmd == 'unlock':
author = cmd_args[0]
repos = Repository(repos_dir, 0, pool) ### any old revision will do
# Override the repos revision author with the author of the lock/unlock
repos.author = author
- cfg = Config(config_fname, repos, { 'author' : author })
+ cfg = Config(config_fname, repos,
+ {'author': author,
+ 'repos_basename': os.path.basename(repos.repos_dir)
+ })
messenger = Lock(pool, cfg, repos, author, cmd == 'lock')
else:
raise UnknownSubcommand(cmd)
Propchange: subversion/branches/ev2-export/tools/server-side/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Feb 23 01:25:38 2013
@@ -1,6 +1,7 @@
.libs
svn-populate-node-origins-index
svnauthz
+svnauthz-validate
svn-rep-sharing-stats
fsfs-reorg
fsfs-stats