Author: rhuijben
Date: Sun Feb 8 00:05:46 2015
New Revision: 1658118
URL: http://svn.apache.org/r1658118
Log:
Extend the 'move4/delete4' tests in op-depth with replace cases.
These tests are new in 1.9, so I inserted them in-place.
* subversion/tests/libsvn_wc/op-depth-test.c
(init_move4): Initialize cases.
(del4_update_replace_AAA): New function.
(del4_update_delself_AAA): Tweak comment.
(del4_update_replaceself_AAA,
move4_update_replace_AAA,
move4_update_replaceself_AAA): New function.
(test_list): Add all new functions 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=1658118&r1=1658117&r2=1658118&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
00:05:46 2015
@@ -9168,6 +9168,21 @@ init_move4(svn_test__sandbox_t *sandbox,
SVN_ERR(sbox_wc_mkdir(sandbox, "C/A/A/NEW"));
SVN_ERR(sbox_wc_mkdir(sandbox, "D/A/A/NEW"));
}
+ else if (strstr(test_name, "_replace_"))
+ {
+ SVN_ERR(sbox_wc_delete(sandbox, "A/A/A/A"));
+ SVN_ERR(sbox_wc_delete(sandbox, "B/A/A/A"));
+ SVN_ERR(sbox_wc_delete(sandbox, "C/A/A/A"));
+ SVN_ERR(sbox_wc_delete(sandbox, "D/A/A/A"));
+ SVN_ERR(sbox_file_write(sandbox, "A/A/A/A", "A"));
+ SVN_ERR(sbox_file_write(sandbox, "B/A/A/A", "A"));
+ SVN_ERR(sbox_file_write(sandbox, "C/A/A/A", "A"));
+ SVN_ERR(sbox_file_write(sandbox, "D/A/A/A", "A"));
+ SVN_ERR(sbox_wc_add(sandbox, "A/A/A/A"));
+ SVN_ERR(sbox_wc_add(sandbox, "B/A/A/A"));
+ SVN_ERR(sbox_wc_add(sandbox, "C/A/A/A"));
+ SVN_ERR(sbox_wc_add(sandbox, "D/A/A/A"));
+ }
else if (strstr(test_name, "_delself_"))
{
SVN_ERR(sbox_wc_delete(sandbox, "A/A/A"));
@@ -9175,6 +9190,21 @@ init_move4(svn_test__sandbox_t *sandbox,
SVN_ERR(sbox_wc_delete(sandbox, "C/A/A"));
SVN_ERR(sbox_wc_delete(sandbox, "D/A/A"));
}
+ else if (strstr(test_name, "_replaceself_"))
+ {
+ SVN_ERR(sbox_wc_delete(sandbox, "A/A/A"));
+ SVN_ERR(sbox_wc_delete(sandbox, "B/A/A"));
+ SVN_ERR(sbox_wc_delete(sandbox, "C/A/A"));
+ SVN_ERR(sbox_wc_delete(sandbox, "D/A/A"));
+ SVN_ERR(sbox_file_write(sandbox, "A/A/A", "A"));
+ SVN_ERR(sbox_file_write(sandbox, "B/A/A", "A"));
+ SVN_ERR(sbox_file_write(sandbox, "C/A/A", "A"));
+ SVN_ERR(sbox_file_write(sandbox, "D/A/A", "A"));
+ SVN_ERR(sbox_wc_add(sandbox, "A/A/A"));
+ SVN_ERR(sbox_wc_add(sandbox, "B/A/A"));
+ SVN_ERR(sbox_wc_add(sandbox, "C/A/A"));
+ SVN_ERR(sbox_wc_add(sandbox, "D/A/A"));
+ }
SVN_ERR(sbox_wc_commit(sandbox, ""));
SVN_ERR(sbox_wc_update(sandbox, "", 1));
@@ -9323,6 +9353,26 @@ del4_update_add_AAA(const svn_test_opts_
}
static svn_error_t *
+del4_update_replace_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(init_move4(&b, "del4_update_replace_AAA", opts, FALSE, pool));
+
+ /* Update and resolve via mine strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Go back to start position */
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Update and resolve via their strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_merged));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
del4_update_delself_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
{
svn_test__sandbox_t b;
@@ -9399,7 +9449,8 @@ del4_update_delself_AAA(const svn_test_o
SVN_ERR(check_db_conflicts(&b, "", conflicts));
}
- /* ### These can currently only be resolved to merged ???? */
+ /* These can only be resolved to merged, as the merge is already broken
+ (because the move source is gone): incoming delete on moved_away */
SVN_ERR(sbox_wc_resolve(&b, "D/A/A", svn_depth_empty,
svn_wc_conflict_choose_merged));
SVN_ERR(sbox_wc_resolve(&b, "A/A/A", svn_depth_empty,
@@ -9417,6 +9468,27 @@ del4_update_delself_AAA(const svn_test_o
}
static svn_error_t *
+del4_update_replaceself_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(init_move4(&b, "del4_update_replaceself_AAA", opts, FALSE, pool));
+
+ /* Update and resolve via mine strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Go back to start position */
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Update and resolve via their strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_merged));
+
+ return SVN_NO_ERROR;
+}
+
+
+static svn_error_t *
move4_update_edit_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
{
svn_test__sandbox_t b;
@@ -9534,6 +9606,26 @@ move4_update_add_AAA(const svn_test_opts
}
static svn_error_t *
+move4_update_replace_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(init_move4(&b, "move4_update_replace_AAA", opts, TRUE, pool));
+
+ /* Update and resolve via mine strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Go back to start position */
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Update and resolve via their strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_merged));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
move4_update_delself_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
{
svn_test__sandbox_t b;
@@ -9680,6 +9772,26 @@ move4_update_delself_AAA(const svn_test_
}
static svn_error_t *
+move4_update_replaceself_AAA(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(init_move4(&b, "move4_update_replaceself_AAA", opts, TRUE, pool));
+
+ /* Update and resolve via mine strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Go back to start position */
+ SVN_ERR(sbox_wc_update(&b, "", 1));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_mine_conflict));
+ /* Update and resolve via their strategy */
+ SVN_ERR(sbox_wc_update(&b, "", 2));
+ SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_merged));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
simple_move_bump(const svn_test_opts_t *opts, apr_pool_t *pool)
{
svn_test__sandbox_t b;
@@ -10544,16 +10656,24 @@ static struct svn_test_descriptor_t test
"del4: delete AAA"),
SVN_TEST_OPTS_PASS(del4_update_add_AAA,
"del4: add AAA"),
+ SVN_TEST_OPTS_XFAIL(del4_update_replace_AAA,
+ "del4: replace AAA"),
SVN_TEST_OPTS_PASS(del4_update_delself_AAA,
"del4: delete self AAA"),
+ SVN_TEST_OPTS_XFAIL(del4_update_replaceself_AAA,
+ "del4: replace self AAA"),
SVN_TEST_OPTS_PASS(move4_update_edit_AAA,
"move4: edit AAA"),
SVN_TEST_OPTS_PASS(move4_update_delete_AAA,
"move4: delete AAA"),
SVN_TEST_OPTS_PASS(move4_update_add_AAA,
"move4: add AAA"),
+ SVN_TEST_OPTS_XFAIL(move4_update_replace_AAA,
+ "move4: replace AAA"),
SVN_TEST_OPTS_PASS(move4_update_delself_AAA,
"move4: delete self AAA"),
+ SVN_TEST_OPTS_XFAIL(move4_update_replaceself_AAA,
+ "move4: replace self AAA"),
SVN_TEST_OPTS_PASS(simple_move_bump,
"simple move bump"),
SVN_TEST_OPTS_PASS(movedhere_extract_retract,