Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 43660200BE3 for ; Thu, 22 Dec 2016 12:23:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 41FE7160B26; Thu, 22 Dec 2016 11:23:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 89628160B1F for ; Thu, 22 Dec 2016 12:23:43 +0100 (CET) Received: (qmail 4457 invoked by uid 500); 22 Dec 2016 11:23:42 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 4447 invoked by uid 99); 22 Dec 2016 11:23:42 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2016 11:23:42 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id EDC933A0111 for ; Thu, 22 Dec 2016 11:23:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1775630 - /subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Date: Thu, 22 Dec 2016 11:23:41 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161222112341.EDC933A0111@svn01-us-west.apache.org> archived-at: Thu, 22 Dec 2016 11:23:44 -0000 Author: stsp Date: Thu Dec 22 11:23:41 2016 New Revision: 1775630 URL: http://svn.apache.org/viewvc?rev=1775630&view=rev Log: Add another test to tickle the resolver's move detection code some more. * subversion/tests/libsvn_client/conflicts-test.c (run_test_update_incoming_dir_move_with_nested_file): Add 'move_parent_twice' parameter. (test_update_incoming_dir_move_with_nested_file, test_update_incoming_dir_move_with_parent_move, test_update_incoming_dir_move_with_parent_moved_back): Update callers. (test_update_incoming_dir_move_with_parent_moved_twice, 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=1775630&r1=1775629&r2=1775630&view=diff ============================================================================== --- subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c (original) +++ subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Thu Dec 22 11:23:41 2016 @@ -3353,6 +3353,7 @@ run_test_update_incoming_dir_move_with_n const svn_test_opts_t *opts, svn_boolean_t move_parent, svn_boolean_t move_back, + svn_boolean_t move_parent_twice, const char *sandbox_name, apr_pool_t *pool) { @@ -3405,6 +3406,16 @@ run_test_update_incoming_dir_move_with_n SVN_ERR(sbox_wc_move(b, deleted_dir, moved_dir)); SVN_ERR(sbox_wc_commit(b, "")); } + else if (move_parent_twice) + { + /* Move the directory again. */ + SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM)); + deleted_dir = svn_relpath_join(trunk_path, "D/H", b->pool); + moved_dir = svn_relpath_join(trunk_path, "D/G/H", b->pool); + SVN_ERR(sbox_wc_move(b, deleted_dir, moved_dir)); + SVN_ERR(sbox_wc_commit(b, "")); + moved_dir = svn_relpath_join(trunk_path, "D/G/H/B", b->pool); + } moved_file = svn_relpath_join(moved_dir, "lambda-moved", b->pool); } @@ -3558,7 +3569,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, FALSE, + opts, FALSE, FALSE, FALSE, "update_incoming_dir_move_with_nested_file_move", pool); } @@ -3569,21 +3580,32 @@ test_update_incoming_dir_move_with_paren apr_pool_t *pool) { return run_test_update_incoming_dir_move_with_nested_file_move( - opts, TRUE, FALSE, + opts, TRUE, FALSE, FALSE, "update_incoming_dir_move_with_parent_move", pool); } -/* Same test as above, but with a moved parent directory moved back. */ +/* Same test as above, but with the parent directory moved back. */ static svn_error_t * test_update_incoming_dir_move_with_parent_moved_back( const svn_test_opts_t *opts, apr_pool_t *pool) { return run_test_update_incoming_dir_move_with_nested_file_move( - opts, TRUE, TRUE, + opts, TRUE, TRUE, FALSE, "update_incoming_dir_move_with_parent_moved_back", pool); } +/* Same test as above, but with the parent directory moved twice. */ +static svn_error_t * +test_update_incoming_dir_move_with_parent_moved_twice( + const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + return run_test_update_incoming_dir_move_with_nested_file_move( + opts, TRUE, FALSE, TRUE, + "update_incoming_dir_move_with_parent_moved_twice", 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) @@ -4298,6 +4320,8 @@ static struct svn_test_descriptor_t test "update incoming dir move with parent move"), SVN_TEST_OPTS_PASS(test_update_incoming_dir_move_with_parent_moved_back, "update incoming dir move with parent moved back"), + SVN_TEST_OPTS_PASS(test_update_incoming_dir_move_with_parent_moved_twice, + "update incoming dir move with parent moved twice"), 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,