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/17 14:40:23 UTC
svn commit: r1774764 -
/subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
Author: stsp
Date: Sat Dec 17 14:40:22 2016
New Revision: 1774764
URL: http://svn.apache.org/viewvc?rev=1774764&view=rev
Log:
Add a regression test which shows a problem in the resolver's move detection.
* subversion/tests/libsvn_client/conflicts-test.c
(run_test_update_incoming_dir_move_with_nested_file_move): New wrapper for
test, based on ...
(test_update_incoming_dir_move_with_nested_file_move): ... this function.
(test_update_incoming_dir_move_with_nested_file_move2): Run the same test
as test_update_incoming_dir_move_with_nested_file_move() does, but also
move a parent directory of the moved file. This throws the move detection
logic off, so this test is marked XFAIL.
(test_funcs): Add test_update_incoming_dir_move_with_nested_file_move2.
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=1774764&r1=1774763&r2=1774764&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Sat Dec 17 14:40:22 2016
@@ -3195,8 +3195,10 @@ test_merge_incoming_file_move_new_line_o
}
static svn_error_t *
-test_update_incoming_dir_move_with_nested_file_move(const svn_test_opts_t *opts,
- apr_pool_t *pool)
+run_test_update_incoming_dir_move_with_nested_file_move(
+ const svn_test_opts_t *opts,
+ svn_boolean_t move_parent,
+ apr_pool_t *pool)
{
svn_test__sandbox_t *b = apr_palloc(pool, sizeof(*b));
const char *deleted_dir;
@@ -3230,6 +3232,17 @@ test_update_incoming_dir_move_with_neste
SVN_ERR(sbox_wc_commit(b, ""));
+ if (move_parent)
+ {
+ /* Move the directory again. */
+ 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);
+ SVN_ERR(sbox_wc_move(b, deleted_dir, moved_dir));
+
+ SVN_ERR(sbox_wc_commit(b, ""));
+ }
+
/* Update into the past. */
SVN_ERR(sbox_wc_update(b, "", 1));
@@ -3374,6 +3387,24 @@ test_update_incoming_dir_move_with_neste
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_update_incoming_dir_move_with_nested_file_move(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ return run_test_update_incoming_dir_move_with_nested_file_move(opts, FALSE,
+ pool);
+}
+
+/* Same test as above, but with a moved parent directory. */
+static svn_error_t *
+test_update_incoming_dir_move_with_nested_file_move2(
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ return run_test_update_incoming_dir_move_with_nested_file_move(opts, TRUE,
+ pool);
+}
+
/* A helper function which prepares a working copy for the tests below. */
static svn_error_t *
create_wc_with_file_add_vs_file_add_update_conflict(svn_test__sandbox_t *b)
@@ -3847,6 +3878,8 @@ static struct svn_test_descriptor_t test
"merge incoming file move with new line of history"),
SVN_TEST_OPTS_PASS(test_update_incoming_dir_move_with_nested_file_move,
"update incoming dir move with nested file move"),
+ SVN_TEST_OPTS_XFAIL(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_added_file_text_merge,
"update incoming add file text merge"),
SVN_TEST_OPTS_PASS(test_merge_incoming_move_file_prop_merge_conflict,