You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/12/22 10:33:39 UTC
svn commit: r1775611 -
/subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
Author: stsp
Date: Thu Dec 22 10:33:39 2016
New Revision: 1775611
URL: http://svn.apache.org/viewvc?rev=1775611&view=rev
Log:
Add another resolver test.
This new test moves a parent directory and then moves is back again.
* subversion/tests/libsvn_client/conflicts-test.c
(run_test_update_incoming_dir_move_with_nested_file_move): Add new
parameter 'move_back'.
(test_update_incoming_dir_move_with_nested_file_move,
test_update_incoming_dir_move_with_nested_file_move2): Update callers.
(test_update_incoming_dir_move_with_nested_file_move3, test_funcs): New test.
Modified:
subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
Modified: subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c?rev=1775611&r1=1775610&r2=1775611&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Thu Dec 22 10:33:39 2016
@@ -3352,6 +3352,7 @@ static svn_error_t *
run_test_update_incoming_dir_move_with_nested_file_move(
const svn_test_opts_t *opts,
svn_boolean_t move_parent,
+ svn_boolean_t move_back,
apr_pool_t *pool)
{
svn_test__sandbox_t *b = apr_palloc(pool, sizeof(*b));
@@ -3392,10 +3393,20 @@ run_test_update_incoming_dir_move_with_n
SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
deleted_dir = svn_relpath_join(trunk_path, "C/B", b->pool);
moved_dir = svn_relpath_join(trunk_path, "D/H/B", b->pool);
- moved_file = svn_relpath_join(moved_dir, "lambda-moved", b->pool);
SVN_ERR(sbox_wc_move(b, deleted_dir, moved_dir));
-
SVN_ERR(sbox_wc_commit(b, ""));
+
+ if (move_back)
+ {
+ /* And back again. */
+ SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
+ deleted_dir = svn_relpath_join(trunk_path, "D/H/B", b->pool);
+ moved_dir = svn_relpath_join(trunk_path, "C/B", b->pool);
+ SVN_ERR(sbox_wc_move(b, deleted_dir, moved_dir));
+ SVN_ERR(sbox_wc_commit(b, ""));
+ }
+
+ moved_file = svn_relpath_join(moved_dir, "lambda-moved", b->pool);
}
/* Update into the past. */
@@ -3547,7 +3558,7 @@ test_update_incoming_dir_move_with_neste
apr_pool_t *pool)
{
return run_test_update_incoming_dir_move_with_nested_file_move(opts, FALSE,
- pool);
+ FALSE, pool);
}
/* Same test as above, but with a moved parent directory. */
@@ -3557,6 +3568,18 @@ test_update_incoming_dir_move_with_neste
apr_pool_t *pool)
{
return run_test_update_incoming_dir_move_with_nested_file_move(opts, TRUE,
+ FALSE,
+ pool);
+}
+
+/* Same test as above, but with a moved parent directory moved back. */
+static svn_error_t *
+test_update_incoming_dir_move_with_nested_file_move3(
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ return run_test_update_incoming_dir_move_with_nested_file_move(opts, TRUE,
+ TRUE,
pool);
}
@@ -4272,6 +4295,8 @@ static struct svn_test_descriptor_t test
"update incoming dir move with nested file move"),
SVN_TEST_OPTS_PASS(test_update_incoming_dir_move_with_nested_file_move2,
"update incoming dir move with nested file move 2"),
+ SVN_TEST_OPTS_PASS(test_update_incoming_dir_move_with_nested_file_move3,
+ "update incoming dir move with nested file move 3"),
SVN_TEST_OPTS_PASS(test_update_incoming_added_file_text_merge,
"update incoming add file text merge"),
SVN_TEST_OPTS_PASS(test_merge_incoming_move_file_prop_merge_conflict,