Author: rhuijben
Date: Sun Feb 8 13:26:37 2015
New Revision: 1658166
URL: http://svn.apache.org/r1658166
Log:
Add yet another op-depth test to show a bug in the move-update logic; currently
triggering a problem while running the workqueue. This scenario should trigger
a few tree conflicts, exactly like how this is handled during update.
* subversion/tests/libsvn_wc/op-depth-test.c
(move_edit_obstruction): New function.
(test_list): Add move_edit_obstruction as XFail.
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=1658166&r1=1658165&r2=1658166&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Sun Feb 8
13:26:37 2015
@@ -10481,6 +10481,85 @@ move_within_mixed_move(const svn_test_op
return SVN_NO_ERROR;
}
+
+static svn_error_t *
+move_edit_obstruction(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_edit_obstruction", opts, pool));
+
+ SVN_ERR(sbox_add_and_commit_greek_tree(&b));
+
+ SVN_ERR(sbox_file_write(&b, "A/B/E/alpha", "Update alpha"));
+ SVN_ERR(sbox_wc_propset(&b, "a", "b", "A/B/F"));
+ SVN_ERR(sbox_wc_commit(&b, "")); // r2
+
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+
+ /* Simple move */
+ SVN_ERR(sbox_wc_move(&b, "A", "A_mv"));
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+
+ {
+ nodes_row_t nodes[] = {
+ {1, "A_mv", "normal", 2, "A", MOVED_HERE},
+ {1, "A_mv/B", "normal", 2, "A/B", MOVED_HERE},
+ {1, "A_mv/B/E", "normal", 2, "A/B/E", MOVED_HERE},
+ {1, "A_mv/B/E/alpha", "normal", 2, "A/B/E/alpha", MOVED_HERE},
+ {1, "A_mv/B/E/beta", "normal", 2, "A/B/E/beta", MOVED_HERE},
+ {1, "A_mv/B/F", "normal", 2, "A/B/F", MOVED_HERE, "a"},
+ {1, "A_mv/B/lambda", "normal", 2, "A/B/lambda", MOVED_HERE},
+ {1, "A_mv/C", "normal", 2, "A/C", MOVED_HERE},
+ {1, "A_mv/D", "normal", 2, "A/D", MOVED_HERE},
+ {1, "A_mv/D/G", "normal", 2, "A/D/G", MOVED_HERE},
+ {1, "A_mv/D/G/pi", "normal", 2, "A/D/G/pi", MOVED_HERE},
+ {1, "A_mv/D/G/rho", "normal", 2, "A/D/G/rho", MOVED_HERE},
+ {1, "A_mv/D/G/tau", "normal", 2, "A/D/G/tau", MOVED_HERE},
+ {1, "A_mv/D/gamma", "normal", 2, "A/D/gamma", MOVED_HERE},
+ {1, "A_mv/D/H", "normal", 2, "A/D/H", MOVED_HERE},
+ {1, "A_mv/D/H/chi", "normal", 2, "A/D/H/chi", MOVED_HERE},
+ {1, "A_mv/D/H/omega", "normal", 2, "A/D/H/omega", MOVED_HERE},
+ {1, "A_mv/D/H/psi", "normal", 2, "A/D/H/psi", MOVED_HERE},
+ {1, "A_mv/mu", "normal", 2, "A/mu", MOVED_HERE},
+ {0}
+ };
+
+ SVN_ERR(check_db_rows(&b, "A_mv", nodes));
+ SVN_ERR(check_db_conflicts(&b, "", NULL));
+ }
+
+ /* Now do the same thing with local obstructions on the edited nodes */
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+ SVN_ERR(sbox_wc_move(&b, "A", "A_mv"));
+
+ SVN_ERR(svn_io_remove_file2(sbox_wc_path(&b, "A_mv/B/E/alpha"), FALSE,
pool));
+ SVN_ERR(svn_io_dir_make(sbox_wc_path(&b, "A_mv/B/E/alpha"), APR_OS_DEFAULT,
+ pool));
+ SVN_ERR(svn_io_dir_remove_nonrecursive(sbox_wc_path(&b, "A_mv/B/F"), pool));
+ SVN_ERR(sbox_file_write(&b, "A_mv/B/F", "F file"));
+
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
+
+ {
+ conflict_info_t conflicts[] = {
+ { "A_mv/B/E/alpha", FALSE, FALSE, TRUE },
+ { "A_mv/B/F", FALSE, FALSE, TRUE },
+
+ {0}
+ };
+
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* ---------------------------------------------------------------------- */
/* The list of test functions */
@@ -10686,6 +10765,8 @@ static struct svn_test_descriptor_t test
"nested move delete"),
SVN_TEST_OPTS_XFAIL(move_within_mixed_move,
"move within mixed move"),
+ SVN_TEST_OPTS_XFAIL(move_edit_obstruction,
+ "move edit obstruction"),
SVN_TEST_NULL
};