subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1775630 - /subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
Date Thu, 22 Dec 2016 11:23:41 GMT
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,



Mime
View raw message