subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1442344 [37/39] - in /subversion/branches/fsfs-format7: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ contrib/server-side/fsfsfixer/fixer/ contrib/server-side/svncutter/ doc/...
Date Mon, 04 Feb 2013 20:48:13 GMT
Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c Mon Feb  4 20:48:05 2013
@@ -1117,7 +1117,7 @@ test_rangelist_to_string(apr_pool_t *poo
 
   SVN_ERR(svn_rangelist_to_string(&output, result, pool));
 
-  if (svn_string_compare(expected, output) != TRUE)
+  if (!svn_string_compare(expected, output))
     return fail(pool, "Rangelist string not what we expected");
 
   return SVN_NO_ERROR;
@@ -1134,7 +1134,7 @@ test_mergeinfo_to_string(apr_pool_t *poo
 
   SVN_ERR(svn_mergeinfo_to_string(&output, info1, pool));
 
-  if (svn_string_compare(expected, output) != TRUE)
+  if (!svn_string_compare(expected, output))
     return fail(pool, "Mergeinfo string not what we expected");
 
   /* Manually construct some mergeinfo with relative path
@@ -1150,7 +1150,7 @@ test_mergeinfo_to_string(apr_pool_t *poo
                apr_hash_get(info1, "/trunk", APR_HASH_KEY_STRING));
   SVN_ERR(svn_mergeinfo_to_string(&output, info2, pool));
 
-  if (svn_string_compare(expected, output) != TRUE)
+  if (!svn_string_compare(expected, output))
     return fail(pool, "Mergeinfo string not what we expected");
 
   return SVN_NO_ERROR;
@@ -1702,7 +1702,7 @@ struct svn_test_descriptor_t test_funcs[
                    "turning rangelist back into a string"),
     SVN_TEST_PASS2(test_mergeinfo_to_string,
                    "turning mergeinfo back into a string"),
-    SVN_TEST_XFAIL2(test_rangelist_merge,
+    SVN_TEST_PASS2(test_rangelist_merge,
                    "merge of rangelists"),
     SVN_TEST_PASS2(test_rangelist_diff,
                    "diff of rangelists"),

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/named_atomic-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/named_atomic-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/named_atomic-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/named_atomic-test.c Mon Feb  4 20:48:05 2013
@@ -178,17 +178,17 @@ init_test_shm(apr_pool_t *pool)
   SVN_ERR(svn_named_atomic__get(&atomic, ns, ATOMIC_NAME "2", TRUE));
   SVN_ERR(svn_named_atomic__write(NULL, 0, atomic));
 
-  apr_pool_clear(scratch);
+  svn_pool_clear(scratch);
 
   SVN_ERR(svn_atomic_namespace__create(&ns, name_namespace1, scratch));
   SVN_ERR(svn_named_atomic__get(&atomic, ns, ATOMIC_NAME, TRUE));
   SVN_ERR(svn_named_atomic__write(NULL, 0, atomic));
-  apr_pool_clear(scratch);
+  svn_pool_clear(scratch);
 
   SVN_ERR(svn_atomic_namespace__create(&ns, name_namespace2, scratch));
   SVN_ERR(svn_named_atomic__get(&atomic, ns, ATOMIC_NAME, TRUE));
   SVN_ERR(svn_named_atomic__write(NULL, 0, atomic));
-  apr_pool_clear(scratch);
+  svn_pool_clear(scratch);
 
   /* done */
 
@@ -256,7 +256,7 @@ APR_THREAD_FUNC test_thread(apr_thread_t
                                    params->thread_count,
                                    params->iterations,
                                    pool);
-  apr_pool_destroy(pool);
+  svn_pool_destroy(pool);
   apr_thread_exit(thread, APR_SUCCESS);
 
   return NULL;
@@ -401,7 +401,7 @@ calibrate_iterations(apr_pool_t *pool, i
       SVN_ERR(run_procs(pool, TEST_PROC, count, calib_iterations));
 
       taken = (double)(apr_time_now() - start);
-      apr_pool_destroy(scratch);
+      svn_pool_destroy(scratch);
     }
 
   /* scale that to 1s */

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/path-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/path-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/path-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/path-test.c Mon Feb  4 20:48:05 2013
@@ -1624,6 +1624,71 @@ test_path_condense_targets(apr_pool_t *p
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_path_is_repos_relative_url(apr_pool_t *pool)
+{
+  int i;
+  struct {
+    const char* path;
+    svn_boolean_t result;
+  } tests[] = {
+    { "^/A",           TRUE },
+    { "http://host/A", FALSE },
+    { "/A/B",          FALSE },
+  };
+
+  for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)
+    {
+      svn_boolean_t result = svn_path_is_repos_relative_url(tests[i].path);
+
+      if (tests[i].result != result)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "svn_path_is_repos_relative_url(\"%s\")"
+                                 " returned \"%s\" expected \"%s\"",
+                                 tests[i].path,
+                                 result ? "TRUE" : "FALSE",
+                                 tests[i].result ? "TRUE" : "FALSE");
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_path_resolve_repos_relative_url(apr_pool_t *pool)
+{
+  int i;
+  struct {
+    const char *relative_url;
+    const char *repos_root_url;
+    const char *absolute_url;
+  } tests[] = {
+    { "^/A", "file:///Z/X", "file:///Z/X/A" },
+    { "^/A", "file:///Z/X/", "file:///Z/X//A" }, /* doesn't canonicalize */
+    { "^/A@2", "file:///Z/X", "file:///Z/X/A@2" }, /* peg rev */
+    { "^/A", "/Z/X", "/Z/X/A" }, /* doesn't verify repos_root is URL */
+  };
+
+  for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)
+    {
+      const char *result;
+
+      SVN_ERR(svn_path_resolve_repos_relative_url(&result,
+                                                  tests[i].relative_url,
+                                                  tests[i].repos_root_url,
+                                                  pool));
+
+      if (strcmp(tests[i].absolute_url,result))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "svn_path_resolve_repos_relative_url(\"%s\","
+                                 "\"%s\") returned \"%s\" expected \"%s\"",
+                                 tests[i].relative_url,
+                                 tests[i].repos_root_url,
+                                 result, tests[i].absolute_url);
+    }
+  
+  return SVN_NO_ERROR;
+}
+
 
 /* local define to support XFail-ing tests on Windows/Cygwin only */
 #ifdef SVN_USE_DOS_PATHS
@@ -1688,5 +1753,9 @@ struct svn_test_descriptor_t test_funcs[
                    "test svn_path_internal_style"),
     SVN_TEST_PASS2(test_path_condense_targets,
                    "test svn_path_condense_targets"),
+    SVN_TEST_PASS2(test_path_is_repos_relative_url,
+                   "test svn_path_is_repos_relative_url"),
+    SVN_TEST_PASS2(test_path_resolve_repos_relative_url,
+                   "test svn_path_resolve_repos_relative_url"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/stream-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/stream-test.c Mon Feb  4 20:48:05 2013
@@ -490,7 +490,7 @@ test_readonly(apr_pool_t *pool)
   /* File should be writable */
   SVN_ERR(svn_io_stat(&finfo, path, wanted, pool));
   SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo, pool));
-  SVN_TEST_ASSERT(read_only == FALSE);
+  SVN_TEST_ASSERT(!read_only);
 
   /* Set read only */
   SVN_ERR(svn_io_set_file_read_only(path, FALSE, pool));
@@ -506,7 +506,7 @@ test_readonly(apr_pool_t *pool)
   /* File should be writable */
   SVN_ERR(svn_io_stat(&finfo, path, wanted, pool));
   SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo, pool));
-  SVN_TEST_ASSERT(read_only == FALSE);
+  SVN_TEST_ASSERT(!read_only);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c Mon Feb  4 20:48:05 2013
@@ -479,7 +479,7 @@ test21(apr_pool_t *pool)
 
   svn_stringbuf_strip_whitespace(a);
 
-  if (svn_stringbuf_compare(a, b) == TRUE)
+  if (svn_stringbuf_compare(a, b))
     return SVN_NO_ERROR;
   else
     return fail(pool, "test failed");

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c Mon Feb  4 20:48:05 2013
@@ -123,8 +123,8 @@ test_svn_subst_translate_string2_null_en
                                         source_string, NULL, FALSE,
                                         pool, pool));
     SVN_TEST_STRING_ASSERT(new_value->data, "\xc3\x86");
-    SVN_TEST_ASSERT(translated_to_utf8 == TRUE);
-    SVN_TEST_ASSERT(translated_line_endings == FALSE);
+    SVN_TEST_ASSERT(translated_to_utf8);
+    SVN_TEST_ASSERT(!translated_line_endings);
   }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c Mon Feb  4 20:48:05 2013
@@ -202,8 +202,8 @@ test_read_write_tree_conflicts(const svn
 
   SVN_ERR(svn_test__sandbox_create(&sbox, "read_write_tree_conflicts", opts, pool));
   parent_abspath = svn_dirent_join(sbox.wc_abspath, "A", pool);
-  SVN_ERR(svn_wc__db_op_add_directory(sbox.wc_ctx->db, parent_abspath, NULL,
-                                      pool));
+  SVN_ERR(svn_wc__db_op_add_directory(sbox.wc_ctx->db, parent_abspath,
+                                      NULL /*props*/, NULL, pool));
   child1_abspath = svn_dirent_join(parent_abspath, "foo", pool);
   child2_abspath = svn_dirent_join(parent_abspath, "bar", pool);
 
@@ -229,9 +229,9 @@ test_read_write_tree_conflicts(const svn
 
   /* Write */
   SVN_ERR(svn_wc__add_tree_conflict(sbox.wc_ctx, /*child1_abspath,*/
-                                    conflict1, pool));
+                                    conflict1, NULL, pool));
   SVN_ERR(svn_wc__add_tree_conflict(sbox.wc_ctx, /*child2_abspath,*/
-                                    conflict2, pool));
+                                    conflict2, NULL, pool));
 
   /* Query (conflict1 through WC-DB API, conflict2 through WC API) */
   {
@@ -337,6 +337,7 @@ test_serialize_prop_conflict(const svn_t
                         svn_wc_conflict_version_create2("http://my-repos/svn",
                                                         "uuid", "trunk", 12,
                                                         svn_node_dir, pool),
+                        NULL /* wc_only */,
                         pool, pool));
 
   SVN_ERR(svn_wc__conflict_skel_is_complete(&complete, conflict_skel));
@@ -500,9 +501,10 @@ test_serialize_tree_conflict(const svn_t
 
   SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(
                               conflict_skel,
-                              sbox.wc_ctx->db, sbox.wc_abspath,
+                              sbox.wc_ctx->db, sbox_wc_path(&sbox, "A/B"),
                               svn_wc_conflict_reason_moved_away,
                               svn_wc_conflict_action_delete,
+                              sbox_wc_path(&sbox, "A/B"),
                               pool, pool));
 
   SVN_ERR(svn_wc__conflict_skel_set_op_switch(
@@ -510,6 +512,7 @@ test_serialize_tree_conflict(const svn_t
                         svn_wc_conflict_version_create2("http://my-repos/svn",
                                                         "uuid", "trunk", 12,
                                                         svn_node_dir, pool),
+                        NULL /* wc_only */,
                         pool, pool));
 
   SVN_ERR(svn_wc__conflict_skel_is_complete(&complete, conflict_skel));
@@ -518,9 +521,11 @@ test_serialize_tree_conflict(const svn_t
   {
     svn_wc_conflict_reason_t local_change;
     svn_wc_conflict_action_t incoming_change;
+    const char *moved_away_op_root_abspath;
 
     SVN_ERR(svn_wc__conflict_read_tree_conflict(&local_change,
                                                 &incoming_change,
+                                                &moved_away_op_root_abspath,
                                                 sbox.wc_ctx->db,
                                                 sbox.wc_abspath,
                                                 conflict_skel,
@@ -528,6 +533,8 @@ test_serialize_tree_conflict(const svn_t
 
     SVN_TEST_ASSERT(local_change == svn_wc_conflict_reason_moved_away);
     SVN_TEST_ASSERT(incoming_change == svn_wc_conflict_action_delete);
+    SVN_TEST_ASSERT(!strcmp(moved_away_op_root_abspath,
+                            sbox_wc_path(&sbox, "A/B")));
   }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c Mon Feb  4 20:48:05 2013
@@ -391,6 +391,7 @@ test_getting_info(apr_pool_t *pool)
   const svn_checksum_t *checksum;
   const char *target;
   svn_boolean_t had_props;
+  apr_hash_t *props;
   svn_boolean_t update_root;
   svn_wc__db_lock_t *lock;
   svn_wc__db_t *db;
@@ -403,7 +404,7 @@ test_getting_info(apr_pool_t *pool)
             &status, &kind, &revision,
             &repos_relpath, &repos_root_url, &repos_uuid,
             &changed_rev, &changed_date, &changed_author,&depth, &checksum,
-            &target, &lock, &had_props,
+            &target, &lock, &had_props, &props,
             &update_root,
             db, local_abspath,
             pool, pool));
@@ -420,6 +421,9 @@ test_getting_info(apr_pool_t *pool)
   SVN_TEST_ASSERT(checksum == NULL);
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_ASSERT(lock == NULL);
+  SVN_TEST_ASSERT(!had_props);
+  SVN_TEST_ASSERT(apr_hash_count(props) == 0);
+  /* SVN_TEST_ASSERT(update_root == ???); */
 
   /* Test: file-specific values. */
   SVN_ERR(svn_wc__db_base_get_info(
@@ -427,7 +431,7 @@ test_getting_info(apr_pool_t *pool)
             &repos_relpath, &repos_root_url, &repos_uuid,
             NULL, NULL, NULL, NULL,
             &checksum, NULL, NULL,
-            NULL, NULL,
+            NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "A", pool),
             pool, pool));
   SVN_TEST_ASSERT(kind == svn_kind_file);
@@ -442,7 +446,7 @@ test_getting_info(apr_pool_t *pool)
             &repos_relpath, &repos_root_url, &repos_uuid,
             &changed_rev, &changed_date, &changed_author,
             &depth, &checksum, &target, &lock,
-            NULL, NULL,
+            NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "B", pool),
             pool, pool));
   SVN_TEST_ASSERT(kind == svn_kind_symlink);
@@ -465,7 +469,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, NULL, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "C", pool),
             pool, pool));
   SVN_TEST_ASSERT(kind == svn_kind_unknown);
@@ -477,7 +481,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, NULL, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "D", pool),
             pool, pool));
   SVN_TEST_ASSERT(status == svn_wc__db_status_not_present);
@@ -488,7 +492,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, NULL, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "E", pool),
             pool, pool));
   SVN_TEST_ASSERT(status == svn_wc__db_status_incomplete);
@@ -499,7 +503,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, &checksum, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "F", pool),
             pool, pool));
   SVN_TEST_STRING_ASSERT(SHA1_1,
@@ -511,7 +515,7 @@ test_getting_info(apr_pool_t *pool)
             &repos_relpath, &repos_root_url, &repos_uuid,
             &changed_rev, &changed_date, &changed_author,
             NULL, NULL, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "G", pool),
             pool, pool));
   SVN_TEST_STRING_ASSERT(repos_relpath, "G-alt");
@@ -527,7 +531,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, &checksum, &target,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "H", pool),
             pool, pool));
   SVN_TEST_ASSERT(checksum == NULL);
@@ -539,7 +543,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, NULL, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "missing-file", pool),
             pool, pool);
   SVN_TEST_ASSERT(err != NULL && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND);
@@ -568,14 +572,12 @@ validate_node(svn_wc__db_t *db,
             NULL, NULL, NULL,
             NULL, NULL, NULL,
             NULL, NULL, NULL,
-            NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
             db, path,
             scratch_pool, scratch_pool));
   SVN_TEST_ASSERT(kind == expected_kind);
   SVN_TEST_ASSERT(status == expected_status);
 
-  SVN_ERR(svn_wc__db_base_get_props(&props, db, path,
-                                    scratch_pool, scratch_pool));
   switch (status)
     {
     case svn_wc__db_status_server_excluded:
@@ -583,13 +585,18 @@ validate_node(svn_wc__db_t *db,
     case svn_wc__db_status_incomplete:
     case svn_wc__db_status_not_present:
       /* Our tests aren't setting properties on these node types, so
-         short-circuit examination of name/value pairs. */
+         short-circuit examination of name/value pairs, to avoid having
+         to handle the error from svn_wc__db_base_get_props(). */
       return SVN_NO_ERROR;
-
     default:
-      SVN_TEST_ASSERT(props != NULL);
+      break; /* Fall through */
     }
 
+  SVN_ERR(svn_wc__db_base_get_props(&props, db, path,
+                                    scratch_pool, scratch_pool));
+
+  SVN_TEST_ASSERT(props != NULL);
+
   value = apr_hash_get(props, "p1", APR_HASH_KEY_STRING);
   SVN_TEST_STRING_ASSERT(value->data, "v1");
 
@@ -803,10 +810,10 @@ test_working_info(apr_pool_t *pool)
   svn_revnum_t changed_rev;
   apr_time_t changed_date;
   const char *changed_author;
-  apr_time_t last_mod_time;
+  apr_time_t recorded_time;
   svn_depth_t depth;
   const svn_checksum_t *checksum;
-  svn_filesize_t translated_size;
+  svn_filesize_t recorded_size;
   const char *target;
   const char *changelist;
   const char *original_repos_relpath;
@@ -832,7 +839,7 @@ test_working_info(apr_pool_t *pool)
             &changed_rev, &changed_date, &changed_author,
             &depth, &checksum, &target, &original_repos_relpath,
             &original_root_url, &original_uuid, &original_revnum,
-            &lock, &translated_size, &last_mod_time, &changelist,
+            &lock, &recorded_size, &recorded_time, &changelist,
             &conflicted, &op_root, &had_props, &props_mod,
             &have_base, &have_more_work, &have_work,
             db, svn_dirent_join(local_abspath, "I", pool),
@@ -848,18 +855,22 @@ test_working_info(apr_pool_t *pool)
   SVN_TEST_STRING_ASSERT(changed_author, AUTHOR_2);
   SVN_TEST_ASSERT(depth == svn_depth_immediates);
   SVN_TEST_ASSERT(checksum == NULL);
-  SVN_TEST_ASSERT(translated_size == SVN_INVALID_FILESIZE);
+  SVN_TEST_ASSERT(recorded_size == SVN_INVALID_FILESIZE);
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_STRING_ASSERT(changelist, "changelist");
   SVN_TEST_STRING_ASSERT(original_repos_relpath, "some/dir");
   SVN_TEST_STRING_ASSERT(original_root_url, ROOT_TWO);
   SVN_TEST_STRING_ASSERT(original_uuid, UUID_TWO);
   SVN_TEST_ASSERT(original_revnum == 2);
-  SVN_TEST_ASSERT(props_mod == FALSE);
-  SVN_TEST_ASSERT(have_base == TRUE);
-  SVN_TEST_ASSERT(have_work == TRUE);
-  SVN_TEST_ASSERT(conflicted == FALSE);
+  SVN_TEST_ASSERT(!had_props);
+  SVN_TEST_ASSERT(!props_mod);
+  SVN_TEST_ASSERT(have_base);
+  /* SVN_TEST_ASSERT(have_more_work...); */
+  SVN_TEST_ASSERT(have_work);
+  SVN_TEST_ASSERT(!conflicted);
   SVN_TEST_ASSERT(lock == NULL);
+  /* SVN_TEST_ASSERT(last_mod_time...); */
+  /* SVN_TEST_ASSERT(op_root...); */
 
 
   /* ### we need a hojillion more tests in here. I just want to get this

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c Mon Feb  4 20:48:05 2013
@@ -332,7 +332,7 @@ create_open(svn_wc__db_t **db,
                                   pool));
   SVN_ERR(svn_wc__db_open(db,
                           NULL /* config */,
-                          FALSE /* auto_upgrade */,
+                          FALSE /* not_upgraded_ok */,
                           TRUE /* enforce_empty_wq */,
                           pool, pool));
 
@@ -614,13 +614,13 @@ test_access_baton_like_locking(apr_pool_
                                repos_root_url, 0, svn_depth_infinity,
                                pool));
 
-    SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, NULL, wc_ctx->db, subdir,
-                                  pool));
+    SVN_ERR(svn_wc__db_is_switched(&is_root, NULL, NULL, wc_ctx->db, subdir,
+                                   pool));
 
     SVN_TEST_ASSERT(is_root);
 
-    SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, NULL, wc_ctx2->db, subdir,
-                                  pool));
+    SVN_ERR(svn_wc__db_is_switched(&is_root, NULL, NULL, wc_ctx2->db, subdir,
+                                   pool));
 
     /* This test was added to show a regression where the next check failed,
        but the check above this succeeded */

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c Mon Feb  4 20:48:05 2013
@@ -35,6 +35,7 @@
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_hash.h"
+#include "svn_sorts.h"
 
 #include "utils.h"
 
@@ -44,6 +45,7 @@
 #include "../../libsvn_wc/wc.h"
 #include "../../libsvn_wc/wc_db.h"
 #include "../../libsvn_wc/workqueue.h"
+#include "../../libsvn_wc/conflicts.h"
 #define SVN_WC__I_AM_WC_DB
 #include "../../libsvn_wc/wc_db_private.h"
 
@@ -98,19 +100,49 @@ typedef struct nodes_row_t {
     svn_boolean_t file_external;
     const char *moved_to;
     svn_boolean_t moved_here;
+    const char *props;  /* comma-separated list of prop names */
 } nodes_row_t;
 
 /* Macro for filling in the REPO_* fields of a non-base NODES_ROW_T
  * that has no copy-from info. */
 #define NO_COPY_FROM SVN_INVALID_REVNUM, NULL, FALSE
 #define MOVED_HERE FALSE, NULL, TRUE
+#define NOT_MOVED  FALSE, NULL, FALSE
+
+/* Return a comma-separated list of the prop names in PROPS, in lexically
+ * ascending order, or NULL if PROPS is empty or NULL.  (Here, we don't
+ * care about the difference between 'has no props' and 'can't have props',
+ * and we choose to represent both of those as NULL.) */
+static const char *
+props_hash_to_text(apr_hash_t *props, apr_pool_t *pool)
+{
+  apr_array_header_t *props_sorted;
+  svn_stringbuf_t *str;
+  int i;
+
+  if (! props)
+    return NULL;
+
+  str = svn_stringbuf_create_empty(pool);
+  props_sorted = svn_sort__hash(props, svn_sort_compare_items_lexically, pool);
+  for (i = 0; i < props_sorted->nelts; i++)
+    {
+      const svn_sort__item_t *item
+        = &APR_ARRAY_IDX(props_sorted, i, svn_sort__item_t);
+
+      if (str->len)
+        svn_stringbuf_appendbyte(str, ',');
+      svn_stringbuf_appendcstr(str, item->key);
+    }
+  return str->len ? str->data : NULL;
+}
 
 /* Return a human-readable string representing ROW. */
 static const char *
 print_row(const nodes_row_t *row,
           apr_pool_t *result_pool)
 {
-  const char *file_external_str, *moved_here_str, *moved_to_str;
+  const char *file_external_str, *moved_here_str, *moved_to_str, *props;
 
   if (row == NULL)
     return "(null)";
@@ -130,18 +162,23 @@ print_row(const nodes_row_t *row,
   else
     file_external_str = "";
 
+  if (row->props)
+    props = apr_psprintf(result_pool, ", p=(%s)", row->props);
+  else
+    props = "";
+
   if (row->repo_revnum == SVN_INVALID_REVNUM)
-    return apr_psprintf(result_pool, "%d, %s, %s%s%s%s",
+    return apr_psprintf(result_pool, "%d, %s, %s%s%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
                         moved_here_str, moved_to_str,
-                        file_external_str);
+                        file_external_str, props);
   else
-    return apr_psprintf(result_pool, "%d, %s, %s, %s ^/%s@%d%s%s%s",
+    return apr_psprintf(result_pool, "%d, %s, %s, %s ^/%s@%d%s%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
                         row->op_depth == 0 ? "base" : "copyfrom",
                         row->repo_relpath, (int)row->repo_revnum,
                         moved_here_str, moved_to_str,
-                        file_external_str);
+                        file_external_str, props);
 }
 
 /* A baton to pass through svn_hash_diff() to compare_nodes_rows(). */
@@ -188,7 +225,9 @@ compare_nodes_rows(const void *key, apr_
            || (expected->moved_to && !found->moved_to)
            || (!expected->moved_to && found->moved_to)
            || (expected->moved_to
-               && strcmp(expected->moved_to, found->moved_to)))
+               && strcmp(expected->moved_to, found->moved_to))
+           || (expected->props != NULL
+               && strcmp_null(expected->props, found->props) != 0))
     {
       b->errors = svn_error_createf(
                     SVN_ERR_TEST_FAILED, b->errors,
@@ -218,7 +257,8 @@ check_db_rows(svn_test__sandbox_t *b,
   svn_sqlite__stmt_t *stmt;
   static const char *const statements[] = {
     "SELECT op_depth, nodes.presence, nodes.local_relpath, revision,"
-    "       repos_path, file_external, def_local_relpath, moved_to, moved_here"
+    "       repos_path, file_external, def_local_relpath, moved_to, moved_here,"
+    "       properties"
     " FROM nodes "
     " LEFT OUTER JOIN externals"
     "             ON nodes.local_relpath = externals.local_relpath"
@@ -248,6 +288,7 @@ check_db_rows(svn_test__sandbox_t *b,
     {
       const char *key;
       nodes_row_t *row = apr_palloc(b->pool, sizeof(*row));
+      apr_hash_t *props_hash;
 
       row->op_depth = svn_sqlite__column_int(stmt, 0);
       row->presence = svn_sqlite__column_text(stmt, 1, b->pool);
@@ -261,6 +302,9 @@ check_db_rows(svn_test__sandbox_t *b,
                               "incomplete {%s}", print_row(row, b->pool));
       row->moved_to = svn_sqlite__column_text(stmt, 7, b->pool);
       row->moved_here = svn_sqlite__column_boolean(stmt, 8);
+      SVN_ERR(svn_sqlite__column_properties(&props_hash, stmt, 9,
+                                            b->pool, b->pool));
+      row->props = props_hash_to_text(props_hash, b->pool);
 
       key = apr_psprintf(b->pool, "%d %s", row->op_depth, row->local_relpath);
       apr_hash_set(found_hash, key, APR_HASH_KEY_STRING, row);
@@ -1063,7 +1107,9 @@ base_dir_insert_remove(svn_test__sandbox
   SVN_ERR(check_db_rows(b, "", after));
 
   SVN_ERR(svn_wc__db_base_remove(b->wc_ctx->db, dir_abspath,
-                                 FALSE, SVN_INVALID_REVNUM,
+                                 FALSE /* keep_as_Working */,
+                                 FALSE /* queue_deletes */,
+                                 SVN_INVALID_REVNUM,
                                  NULL, NULL, b->pool));
   SVN_ERR(svn_wc__wq_run(b->wc_ctx->db, dir_abspath,
                          NULL, NULL, b->pool));
@@ -4284,6 +4330,8 @@ move_added(const svn_test_opts_t *opts, 
   return SVN_NO_ERROR;
 }
 
+/* Test the result of 'update' when the incoming changes are inside a
+ * directory that is locally moved. */
 static svn_error_t *
 move_update(const svn_test_opts_t *opts, apr_pool_t *pool)
 {
@@ -4291,16 +4339,39 @@ move_update(const svn_test_opts_t *opts,
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_update", opts, pool));
 
+  /* r1: Create files 'f', 'h' */
   SVN_ERR(sbox_wc_mkdir(&b, "A"));
   SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
   sbox_file_write(&b, "A/B/f", "r1 content\n");
+  sbox_file_write(&b, "A/B/h", "r1 content\n");
   SVN_ERR(sbox_wc_add(&b, "A/B/f"));
+  SVN_ERR(sbox_wc_add(&b, "A/B/h"));
   SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r2: Modify 'f' */
   sbox_file_write(&b, "A/B/f", "r1 content\nr2 content\n");
   SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r3: Delete 'h', add 'g' */
   sbox_file_write(&b, "A/B/g", "r3 content\n");
   SVN_ERR(sbox_wc_add(&b, "A/B/g"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/h"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r4: Add a new subtree 'X' */
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  sbox_file_write(&b, "X/f", "r4 content\n");
+  sbox_file_write(&b, "X/g", "r4 content\n");
+  sbox_file_write(&b, "X/h", "r4 content\n");
+  SVN_ERR(sbox_wc_add(&b, "X/f"));
+  SVN_ERR(sbox_wc_add(&b, "X/g"));
+  SVN_ERR(sbox_wc_add(&b, "X/h"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r5: Add a subtree 'A/B/C' */
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
   SVN_ERR(sbox_wc_commit(&b, ""));
+
   SVN_ERR(sbox_wc_update(&b, "", 1));
 
   /* A is single-revision so A2 is a single-revision copy */
@@ -4311,12 +4382,15 @@ move_update(const svn_test_opts_t *opts,
       {0, "A",        "normal",       1, "A"},
       {0, "A/B",      "normal",       1, "A/B"},
       {0, "A/B/f",    "normal",       1, "A/B/f"},
+      {0, "A/B/h",    "normal",       1, "A/B/h"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       1, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4330,31 +4404,37 @@ move_update(const svn_test_opts_t *opts,
       {0, "A",        "normal",       2, "A"},
       {0, "A/B",      "normal",       2, "A/B"},
       {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       1, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
   /* Resolve should update the move. */
-  SVN_ERR(sbox_wc_resolve(&b, "A"));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       2, ""},
       {0, "A",        "normal",       2, "A"},
       {0, "A/B",      "normal",       2, "A/B"},
       {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       2, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4376,13 +4456,34 @@ move_update(const svn_test_opts_t *opts,
       {1, "A2",       "normal",       2, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       3, ""},
+      {0, "A",        "normal",       3, "A"},
+      {0, "A/B",      "normal",       3, "A/B"},
+      {0, "A/B/f",    "normal",       3, "A/B/f"},
+      {0, "A/B/g",    "normal",       3, "A/B/g"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/g",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       3, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       3, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       3, "A/B/f", MOVED_HERE},
+      {1, "A2/B/g",   "normal",       3, "A/B/g", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  /* Are we going to handle this case? */
-  SVN_ERR(sbox_wc_resolve(&b, "A"));
+  SVN_ERR(sbox_wc_delete(&b, "A2/B"));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       3, ""},
@@ -4398,11 +4499,134 @@ move_update(const svn_test_opts_t *opts,
       {1, "A2/B",     "normal",       3, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       3, "A/B/f", MOVED_HERE},
       {1, "A2/B/g",   "normal",       3, "A/B/g", MOVED_HERE},
+      {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/f",   "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/g",   "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       2, ""},
+      {0, "A",        "normal",       2, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
+      {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/f",   "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/h",   "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "X", 4));
+  SVN_ERR(sbox_wc_copy(&b, "X", "A2/B"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       2, ""},
+      {0, "A",        "normal",       2, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
+      {0, "X",        "normal",       4, "X"},
+      {0, "X/f",      "normal",       4, "X/f"},
+      {0, "X/g",      "normal",       4, "X/g"},
+      {0, "X/h",      "normal",       4, "X/h"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
+      {2, "A2/B",     "normal",       4, "X"},
+      {2, "A2/B/f",   "normal",       4, "X/f"},
+      {2, "A2/B/g",   "normal",       4, "X/g"},
+      {2, "A2/B/h",   "normal",       4, "X/h"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 4));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       4, ""},
+      {0, "A",        "normal",       4, "A"},
+      {0, "A/B",      "normal",       4, "A/B"},
+      {0, "A/B/f",    "normal",       4, "A/B/f"},
+      {0, "A/B/g",    "normal",       4, "A/B/g"},
+      {0, "X",        "normal",       4, "X"},
+      {0, "X/f",      "normal",       4, "X/f"},
+      {0, "X/g",      "normal",       4, "X/g"},
+      {0, "X/h",      "normal",       4, "X/h"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/g",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       4, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       4, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       4, "A/B/f", MOVED_HERE},
+      {1, "A2/B/g",   "normal",       4, "A/B/g", MOVED_HERE},
+      {2, "A2/B",     "normal",       4, "X"},
+      {2, "A2/B/f",   "normal",       4, "X/f"},
+      {2, "A2/B/g",   "normal",       4, "X/g"},
+      {2, "A2/B/h",   "normal",       4, "X/h"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 5));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       5, ""},
+      {0, "A",        "normal",       5, "A"},
+      {0, "A/B",      "normal",       5, "A/B"},
+      {0, "A/B/f",    "normal",       5, "A/B/f"},
+      {0, "A/B/g",    "normal",       5, "A/B/g"},
+      {0, "A/B/C",    "normal",       5, "A/B/C"},
+      {0, "X",        "normal",       5, "X"},
+      {0, "X/f",      "normal",       5, "X/f"},
+      {0, "X/g",      "normal",       5, "X/g"},
+      {0, "X/h",      "normal",       5, "X/h"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/g",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       5, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       5, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       5, "A/B/f", MOVED_HERE},
+      {1, "A2/B/g",   "normal",       5, "A/B/g", MOVED_HERE},
+      {1, "A2/B/C",   "normal",       5, "A/B/C", MOVED_HERE},
+      {2, "A2/B",     "normal",       4, "X"},
+      {2, "A2/B/f",   "normal",       4, "X/f"},
+      {2, "A2/B/g",   "normal",       4, "X/g"},
+      {2, "A2/B/h",   "normal",       4, "X/h"},
+      {2, "A2/B/C",   "base-deleted", NO_COPY_FROM},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
+
   return SVN_NO_ERROR;
 }
 
@@ -4805,6 +5029,1083 @@ mixed_rev_move(const svn_test_opts_t *op
   return SVN_NO_ERROR;
 }
 
+/* Test the result of 'update' when the incoming changes are inside a
+ * directory that is locally moved. */
+static svn_error_t *
+update_prop_mod_into_moved(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "update_prop_mod_into_moved", opts, pool));
+
+  /* r1: Create files 'f', 'h' */
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  sbox_file_write(&b, "A/B/f", "r1 content\n");
+  sbox_file_write(&b, "A/B/h", "r1 content\n");
+  SVN_ERR(sbox_wc_add(&b, "A/B/f"));
+  SVN_ERR(sbox_wc_add(&b, "A/B/h"));
+  SVN_ERR(sbox_wc_propset(&b, "pd", "f1", "A/B/f"));
+  SVN_ERR(sbox_wc_propset(&b, "pn", "f1", "A/B/f"));
+  SVN_ERR(sbox_wc_propset(&b, "pm", "f1", "A/B/f"));
+  SVN_ERR(sbox_wc_propset(&b, "p", "h1", "A/B/h"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r2: Modify 'f'. Delete prop 'pd', modify prop 'pm', add prop 'pa',
+   * leave prop 'pn' unchanged. */
+  sbox_file_write(&b, "A/B/f", "r1 content\nr2 content\n");
+  SVN_ERR(sbox_wc_propset(&b, "pd", NULL, "A/B/f"));
+  SVN_ERR(sbox_wc_propset(&b, "pm", "f2", "A/B/f"));
+  SVN_ERR(sbox_wc_propset(&b, "pa", "f2", "A/B/f"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r3: Delete 'h', add 'g' */
+  sbox_file_write(&b, "A/B/g", "r3 content\n");
+  SVN_ERR(sbox_wc_add(&b, "A/B/g"));
+  SVN_ERR(sbox_wc_propset(&b, "p", "g3", "A/B/g"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/h"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       1, "A/B"},
+      {0, "A/B/f",    "normal",       1, "A/B/f", NOT_MOVED,  "pd,pm,pn"},
+      {0, "A/B/h",    "normal",       1, "A/B/h", NOT_MOVED,  "p"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* A is single-revision so A2 is a single-revision copy */
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       1, "A/B"},
+      {0, "A/B/f",    "normal",       1, "A/B/f", NOT_MOVED,  "pd,pm,pn"},
+      {0, "A/B/h",    "normal",       1, "A/B/h", NOT_MOVED,  "p"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE, "pd,pm,pn"},
+      {1, "A2/B/h",   "normal",       1, "A/B/h", MOVED_HERE, "p"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update causes a tree-conflict on A due to incoming text-change. */
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       2, ""},
+      {0, "A",        "normal",       2, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/f",    "normal",       2, "A/B/f", NOT_MOVED,  "pa,pm,pn"},
+      {0, "A/B/h",    "normal",       2, "A/B/h", NOT_MOVED,  "p"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE, "pd,pm,pn"},
+      {1, "A2/B/h",   "normal",       1, "A/B/h", MOVED_HERE, "p"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Resolve should update the move. */
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       2, ""},
+      {0, "A",        "normal",       2, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/f",    "normal",       2, "A/B/f", NOT_MOVED,  "pa,pm,pn"},
+      {0, "A/B/h",    "normal",       2, "A/B/h", NOT_MOVED,  "p"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE, "pa,pm,pn"},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE, "p"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_move_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_move_update", opts, pool));
+
+  /* r1: Create file 'f' */
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  sbox_file_write(&b, "A/B/C/f", "r1 content\n");
+  SVN_ERR(sbox_wc_add(&b, "A/B/C/f"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r2: Modify 'f' */
+  sbox_file_write(&b, "A/B/C/f", "r1 content\nr2 content\n");
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  /* r3: Create 'X' */
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B/C", "A2/B/C2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "normal",       1, "A"},
+      {0, "A/B",       "normal",       1, "A/B"},
+      {0, "A/B/C",     "normal",       1, "A/B/C"},
+      {0, "A/B/C/f",   "normal",       1, "A/B/C/f"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/f",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",      "normal",       1, "A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "A2/B/C/f",  "normal",       1, "A/B/C/f", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/f",  "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",   "normal",       1, "A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/f", "normal",       1, "A/B/C/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+
+  /* Following the A->A2 move should raise a tree-conflict on A2/B/C,
+     resolving that may require an explicit resolve. */
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  SVN_ERR(sbox_wc_resolve(&b, "A2/B/C", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       2, ""},
+      {0, "A",         "normal",       2, "A"},
+      {0, "A/B",       "normal",       2, "A/B"},
+      {0, "A/B/C",     "normal",       2, "A/B/C"},
+      {0, "A/B/C/f",   "normal",       2, "A/B/C/f"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/f",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",      "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "A2/B/C/f",  "normal",       2, "A/B/C/f", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/f",  "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",   "normal",       2, "A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/f", "normal",       2, "A/B/C/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update A to r3 brings no changes but updates the revisions. */
+  SVN_ERR(sbox_wc_update(&b, "A", 3));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       2, ""},
+      {0, "A",         "normal",       3, "A"},
+      {0, "A/B",       "normal",       3, "A/B"},
+      {0, "A/B/C",     "normal",       3, "A/B/C"},
+      {0, "A/B/C/f",   "normal",       3, "A/B/C/f"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/f",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       3, "A", MOVED_HERE},
+      {1, "A2/B",      "normal",       3, "A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       3, "A/B/C", MOVED_HERE},
+      {1, "A2/B/C/f",  "normal",       3, "A/B/C/f", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/f",  "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",   "normal",       3, "A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/f", "normal",       3, "A/B/C/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_move_commit(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_move_commit", opts, pool));
+
+  /* r1: Create file 'f' */
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  sbox_file_write(&b, "A/B/C/f", "r1 content\n");
+  SVN_ERR(sbox_wc_add(&b, "A/B/C/f"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+
+  {
+    const char *moved_to;
+    const char *expected_to;
+    SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, NULL, &moved_to,
+                                     b.wc_ctx->db, sbox_wc_path(&b, "A/B/C"),
+                                     pool, pool));
+
+    expected_to = sbox_wc_path(&b, "C2");
+
+    if (strcmp(moved_to, expected_to) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "Expected moved to %s, but was %s",
+                                 expected_to, moved_to);
+  }
+  {
+    const char *moved_from;
+    const char *expected_from;
+    SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     NULL, NULL, &moved_from, NULL,
+                                     b.wc_ctx->db, sbox_wc_path(&b, "C2"),
+                                     pool, pool));
+
+    expected_from = sbox_wc_path(&b, "A/B/C");
+
+    if (strcmp(moved_from, expected_from) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "Expected moved from %s, but was %s",
+                                 expected_from, moved_from);
+  }
+
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "normal",       1, "A"},
+      {0, "A/B",       "normal",       1, "A/B"},
+      {0, "A/B/C",     "normal",       1, "A/B/C"},
+      {0, "A/B/C/f",   "normal",       1, "A/B/C/f"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/f",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",      "normal",       1, "A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "A2/B/C/f",  "normal",       1, "A/B/C/f", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "C2"},
+      {3, "A2/B/C/f",  "base-deleted", NO_COPY_FROM},
+      {1, "C2",        "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "C2/f",      "normal",       1, "A/B/C/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  {
+    const char *moved_to;
+    const char *expected_to;
+    SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, NULL, &moved_to,
+                                     b.wc_ctx->db, sbox_wc_path(&b, "A/B/C"),
+                                     pool, pool));
+
+    expected_to = sbox_wc_path(&b, "A2" /* ### I would have expected "C2" */);
+
+    if (strcmp(moved_to, expected_to) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "Expected moved to %s, but was %s",
+                                 expected_to, moved_to);
+  }
+  {
+    const char *moved_from;
+    const char *expected_from;
+    SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     NULL, NULL, &moved_from, NULL,
+                                     b.wc_ctx->db, sbox_wc_path(&b, "C2"),
+                                     pool, pool));
+
+    expected_from = sbox_wc_path(&b, "A2/B/C"
+                                 /* ### I would have expected "A/B/C" */);
+
+    if (strcmp(moved_from, expected_from) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "Expected moved from %s, but was %s",
+                                 expected_from, moved_from);
+  }
+
+  {
+    apr_array_header_t *targets = apr_array_make(pool, 2, sizeof(const char *));
+
+    APR_ARRAY_PUSH(targets, const char *) = sbox_wc_path(&b, "A");
+    APR_ARRAY_PUSH(targets, const char *) = sbox_wc_path(&b, "A2");
+
+    SVN_ERR(sbox_wc_commit_ex(&b, targets, svn_depth_empty));
+  }
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "not-present",  2, "A"},
+      {0, "A2",        "normal",       2, "A2"},
+      {0, "A2/B",      "normal",       2, "A2/B"},
+      {0, "A2/B/C",    "normal",       2, "A2/B/C"},
+      {0, "A2/B/C/f",  "normal",       2, "A2/B/C/f"},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "C2"},
+      {3, "A2/B/C/f",  "base-deleted", NO_COPY_FROM},
+
+      /* Currently these are recorded as a move but still
+         have the copy history from ^/A/B/C@1 */
+      {1, "C2",        "normal",       2, "A2/B/C", MOVED_HERE},
+      {1, "C2/f",      "normal",       2, "A2/B/C/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  {
+    const char *moved_to;
+    const char *expected_to;
+    SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, NULL, &moved_to,
+                                     b.wc_ctx->db, sbox_wc_path(&b, "A2/B/C"),
+                                     pool, pool));
+
+    expected_to = sbox_wc_path(&b, "C2");
+
+    if (strcmp(moved_to, expected_to) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "Expected moved to %s, but was %s",
+                                 expected_to, moved_to);
+  }
+
+  {
+    const char *moved_from;
+    const char *expected_from;
+    SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     NULL, NULL, &moved_from, NULL,
+                                     b.wc_ctx->db, sbox_wc_path(&b, "C2"),
+                                     pool, pool));
+
+    expected_from = sbox_wc_path(&b, "A2/B/C");
+
+    if (strcmp(moved_from, expected_from) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "Expected moved from %s, but was %s",
+                                 expected_from, moved_from);
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_move_update2(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_move_update2", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "P", "A"));
+  SVN_ERR(sbox_wc_move(&b, "A2", "P"));
+  SVN_ERR(sbox_wc_move(&b, "A/Q", "A/Q2"));
+  SVN_ERR(sbox_wc_move(&b, "P/B", "P/B2"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "normal",       1, "A"},
+      {0, "A/B",       "normal",       1, "A/B"},
+      {0, "P",         "normal",       1, "P"},
+      {0, "P/Q",       "normal",       1, "P/Q"},
+      {1, "A",         "normal",       1, "P", FALSE, "P", TRUE},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/Q",       "normal",       1, "P/Q", MOVED_HERE},
+      {1, "P",         "normal",       1, "A", FALSE, "A", TRUE},
+      {1, "P/Q",       "base-deleted", NO_COPY_FROM},
+      {1, "P/B",       "normal",       1, "A/B", MOVED_HERE},
+      {2, "A/Q",       "base-deleted", NO_COPY_FROM, "A/Q2"},
+      {2, "A/Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {2, "P/B",       "base-deleted", NO_COPY_FROM, "P/B2"},
+      {2, "P/B2",      "normal",       1, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update A bumps revisions but only for moves originating in A.  In
+     particular A/Q to A/Q2 does not get bumped. */
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "normal",       2, "A"},
+      {0, "A/B",       "normal",       2, "A/B"},
+      {0, "P",         "normal",       1, "P"},
+      {0, "P/Q",       "normal",       1, "P/Q"},
+      {1, "A",         "normal",       1, "P", FALSE, "P", TRUE},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/Q",       "normal",       1, "P/Q", MOVED_HERE},
+      {1, "P",         "normal",       2, "A", FALSE, "A", TRUE},
+      {1, "P/Q",       "base-deleted", NO_COPY_FROM},
+      {1, "P/B",       "normal",       2, "A/B", MOVED_HERE},
+      {2, "A/Q",       "base-deleted", NO_COPY_FROM, "A/Q2"},
+      {2, "A/Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {2, "P/B",       "base-deleted", NO_COPY_FROM, "P/B2"},
+      {2, "P/B2",      "normal",       2, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+check_tree_conflict_repos_path(svn_test__sandbox_t *b,
+                               const char *wc_path,
+                               const char *repos_path1,
+                               const char *repos_path2)
+{
+  svn_skel_t *conflict;
+  svn_wc_operation_t operation;
+  const apr_array_header_t *locations;
+  svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
+
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, b->wc_ctx->db,
+                                   sbox_wc_path(b, wc_path),
+                                   b->pool, b->pool));
+
+  SVN_ERR(svn_wc__conflict_read_info(&operation, &locations,
+                                     &text_conflicted, &prop_conflicted,
+                                     &tree_conflicted,
+                                     b->wc_ctx->db,  b->wc_abspath,
+                                     conflict, b->pool, b->pool));
+
+  SVN_ERR_ASSERT(tree_conflicted);
+
+  if (repos_path1)
+    {
+      svn_wc_conflict_version_t *version
+        = APR_ARRAY_IDX(locations, 0, svn_wc_conflict_version_t *);
+
+      SVN_ERR_ASSERT(!strcmp(version->path_in_repos, repos_path1));
+    }
+
+  if (repos_path2)
+    {
+      svn_wc_conflict_version_t *version
+        = APR_ARRAY_IDX(locations, 1, svn_wc_conflict_version_t *);
+
+      SVN_ERR_ASSERT(!strcmp(version->path_in_repos, repos_path2));
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_update_conflicts(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_update_conflicts", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/C/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/C/D/E"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/F"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_switch(&b, "/X"));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B/C", "A2/B/C2"));
+  sbox_file_write(&b, "A2/B/F", "obstruction\n");
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, "X"},
+      {0, "A",         "normal",       1, "X/A"},
+      {0, "A/B",       "normal",       1, "X/A/B"},
+      {0, "A/B/C",     "normal",       1, "X/A/B/C"},
+      {0, "A/B/C/D",   "normal",       1, "X/A/B/C/D"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/D",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       1, "X/A", MOVED_HERE},
+      {1, "A2/B",      "normal",       1, "X/A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       1, "X/A/B/C", MOVED_HERE},
+      {1, "A2/B/C/D",  "normal",       1, "X/A/B/C/D", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",   "normal",       1, "X/A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/D", "normal",       1, "X/A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A", "X/A", "X/A"));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",           "normal",       1, "X"},
+      {0, "A",          "normal",       2, "X/A"},
+      {0, "A/B",        "normal",       2, "X/A/B"},
+      {0, "A/B/C",      "normal",       2, "X/A/B/C"},
+      {0, "A/B/C/D",    "normal",       2, "X/A/B/C/D"},
+      {0, "A/B/C/D/E",  "normal",       2, "X/A/B/C/D/E"},
+      {0, "A/B/F",      "normal",       2, "X/A/B/F"},
+      {1, "A",          "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",        "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/D",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/D/E",  "base-deleted", NO_COPY_FROM},
+      {1, "A/B/F",      "base-deleted", NO_COPY_FROM},
+      {1, "A2",         "normal",       2, "X/A", MOVED_HERE},
+      {1, "A2/B",       "normal",       2, "X/A/B", MOVED_HERE},
+      {1, "A2/B/C",     "normal",       2, "X/A/B/C", MOVED_HERE},
+      {1, "A2/B/C/D",   "normal",       2, "X/A/B/C/D", MOVED_HERE},
+      {1, "A2/B/C/D/E", "normal",       2, "X/A/B/C/D/E", MOVED_HERE},
+      {1, "A2/B/F",     "normal",       2, "X/A/B/F", MOVED_HERE},
+      {3, "A2/B/C",     "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/D",   "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C/D/E", "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",    "normal",       1, "X/A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/D",  "normal",       1, "X/A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A2/B/C", "X/A/B/C", "X/A/B/C"));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A2/B/F", NULL, "X/A/B/F"));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_update_delete_mods(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_update_delete_mods", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/D"));
+  sbox_file_write(&b, "A/B/C/f", "r1 content\n");
+  SVN_ERR(sbox_wc_add(&b, "A/B/C/f"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+  sbox_file_write(&b, "B2/C/f", "modified content\n");
+  SVN_ERR(sbox_wc_delete(&b, "B2/D"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {0, "A/B/C/f", "normal",       1, "A/B/C/f"},
+      {0, "A/B/D",   "normal",       1, "A/B/D"},
+      {2, "A/B",     "base-deleted",  NO_COPY_FROM, "B2"},
+      {2, "A/B/C",   "base-deleted",  NO_COPY_FROM},
+      {2, "A/B/C/f", "base-deleted",  NO_COPY_FROM},
+      {2, "A/B/D",   "base-deleted",  NO_COPY_FROM},
+      {1, "B2",      "normal",       1, "A/B", MOVED_HERE},
+      {1, "B2/C",    "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "B2/C/f",  "normal",       1, "A/B/C/f", MOVED_HERE},
+      {1, "B2/D",    "normal",       1, "A/B/D", MOVED_HERE},
+      {2, "B2/D",    "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       2, "A"},
+      {0, "A/B",     "normal",       2, "A/B"},
+      {2, "A/B",     "base-deleted",  NO_COPY_FROM, "B2"},
+      {1, "B2",      "normal",       2, "A/B", MOVED_HERE},
+      {2, "B2/C",    "normal",       1, "A/B/C"},
+      {2, "B2/C/f",  "normal",       1, "A/B/C/f"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(check_tree_conflict_repos_path(&b, "B2/C", "A/B/C", "A/B/C"));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "B2/D", "A/B/D", "A/B/D"));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_moves2(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_moves2", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A/A/A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_move(&b, "A/A/A/A/A/A", "C"));
+  SVN_ERR(sbox_wc_move(&b, "A/A/A/A", "D"));
+  SVN_ERR(sbox_wc_move(&b, "A/A", "E"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",            "normal",       0, ""},
+      {0, "X",           "normal",       2, "X"},
+      {0, "A",           "normal",       1, "A"},
+      {0, "A/A",         "normal",       1, "A/A"},
+      {0, "A/A/A",       "normal",       1, "A/A/A"},
+      {0, "A/A/A/A",     "normal",       1, "A/A/A/A"},
+      {0, "A/A/A/A/A",   "normal",       1, "A/A/A/A/A"},
+      {0, "A/A/A/A/A/A", "normal",       1, "A/A/A/A/A/A"},
+      {2, "A/A",         "base-deleted", NO_COPY_FROM, "E"},
+      {2, "A/A/A",       "base-deleted", NO_COPY_FROM},
+      {2, "A/A/A/A",     "base-deleted", NO_COPY_FROM},
+      {2, "A/A/A/A/A",   "base-deleted", NO_COPY_FROM},
+      {2, "A/A/A/A/A/A", "base-deleted", NO_COPY_FROM},
+      {1, "E",           "normal",       1, "A/A", MOVED_HERE},
+      {1, "E/A",         "normal",       1, "A/A/A", MOVED_HERE},
+      {1, "E/A/A",       "normal",       1, "A/A/A/A", MOVED_HERE},
+      {1, "E/A/A/A",     "normal",       1, "A/A/A/A/A", MOVED_HERE},
+      {1, "E/A/A/A/A",   "normal",       1, "A/A/A/A/A/A", MOVED_HERE},
+      {3, "E/A/A",       "base-deleted", NO_COPY_FROM, "D"},
+      {3, "E/A/A/A",     "base-deleted", NO_COPY_FROM},
+      {3, "E/A/A/A/A",   "base-deleted", NO_COPY_FROM},
+      {1, "D",           "normal",       1, "A/A/A/A", MOVED_HERE},
+      {1, "D/A",         "normal",       1, "A/A/A/A/A", MOVED_HERE},
+      {1, "D/A/A",       "normal",       1, "A/A/A/A/A/A", MOVED_HERE},
+      {3, "D/A/A",       "base-deleted", NO_COPY_FROM, "C"},
+      {1, "C",           "normal",       1, "A/A/A/A/A/A", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",            "normal",       0, ""},
+      {0, "X",           "normal",       2, "X"},
+      {0, "A",           "normal",       2, "A"},
+      {0, "A/A",         "normal",       2, "A/A"},
+      {0, "A/A/A",       "normal",       2, "A/A/A"},
+      {0, "A/A/A/A",     "normal",       2, "A/A/A/A"},
+      {0, "A/A/A/A/A",   "normal",       2, "A/A/A/A/A"},
+      {0, "A/A/A/A/A/A", "normal",       2, "A/A/A/A/A/A"},
+      {2, "A/A",         "base-deleted", NO_COPY_FROM, "E"},
+      {2, "A/A/A",       "base-deleted", NO_COPY_FROM},
+      {2, "A/A/A/A",     "base-deleted", NO_COPY_FROM},
+      {2, "A/A/A/A/A",   "base-deleted", NO_COPY_FROM},
+      {2, "A/A/A/A/A/A", "base-deleted", NO_COPY_FROM},
+      {1, "E",           "normal",       2, "A/A", MOVED_HERE},
+      {1, "E/A",         "normal",       2, "A/A/A", MOVED_HERE},
+      {1, "E/A/A",       "normal",       2, "A/A/A/A", MOVED_HERE},
+      {1, "E/A/A/A",     "normal",       2, "A/A/A/A/A", MOVED_HERE},
+      {1, "E/A/A/A/A",   "normal",       2, "A/A/A/A/A/A", MOVED_HERE},
+      {3, "E/A/A",       "base-deleted", NO_COPY_FROM, "D"},
+      {3, "E/A/A/A",     "base-deleted", NO_COPY_FROM},
+      {3, "E/A/A/A/A",   "base-deleted", NO_COPY_FROM},
+      {1, "D",           "normal",       2, "A/A/A/A", MOVED_HERE},
+      {1, "D/A",         "normal",       2, "A/A/A/A/A", MOVED_HERE},
+      {1, "D/A/A",       "normal",       2, "A/A/A/A/A/A", MOVED_HERE},
+      {3, "D/A/A",       "base-deleted", NO_COPY_FROM, "C"},
+      {1, "C",           "normal",       2, "A/A/A/A/A/A", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_in_delete(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_in_delete", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/D/E"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM, "C2"},
+      {1, "C2",      "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_wc_conflict_choose_merged));
+  SVN_ERR(sbox_wc_resolve(&b, "A/B/C", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       2, ""},
+      {0, "A",       "normal",       2, "A"},
+      {0, "A/B",     "normal",       2, "A/B"},
+      {0, "A/B/C",   "normal",       2, "A/B/C"},
+      {0, "A/B/C/D", "normal",       2, "A/B/C/D"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM, "C2"},
+      {2, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+      {1, "C2",      "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "C2/D",    "normal",       2, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+switch_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "switch_move", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/D/E"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/B/D/E/F"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_switch(&b, "/A"));
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+
+  SVN_ERR(sbox_wc_move(&b, "B/C", "C2"));
+  SVN_ERR(sbox_wc_move(&b, "B/D", "D2"));
+  SVN_ERR(sbox_wc_move(&b, "D2/E", "D2/E2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       2, "A"},
+      {0, "B",     "normal",       2, "A/B"},
+      {0, "B/C",   "normal",       2, "A/B/C"},
+      {0, "B/D",   "normal",       2, "A/B/D"},
+      {0, "B/D/E", "normal",       2, "A/B/D/E"},
+      {2, "B/C",   "base-deleted", NO_COPY_FROM, "C2"},
+      {2, "B/D",   "base-deleted", NO_COPY_FROM, "D2"},
+      {2, "B/D/E", "base-deleted", NO_COPY_FROM},
+      {1, "C2",    "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "D2",    "normal",       2, "A/B/D", MOVED_HERE},
+      {1, "D2/E",  "normal",       2, "A/B/D/E", MOVED_HERE},
+      {2, "D2/E",  "base-deleted", NO_COPY_FROM, "D2/E2"},
+      {2, "D2/E2", "normal",       2, "A/B/D/E", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Switch "bumps" revisions and paths and raises conflicts just like
+     update. */
+  SVN_ERR(sbox_wc_switch(&b, "/X"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       3, "X"},
+      {0, "B",       "normal",       3, "X/B"},
+      {0, "B/C",     "normal",       3, "X/B/C"},
+      {0, "B/D",     "normal",       3, "X/B/D"},
+      {0, "B/D/E",   "normal",       3, "X/B/D/E"},
+      {0, "B/D/E/F", "normal",       3, "X/B/D/E/F"},
+      {2, "B/C",     "base-deleted", NO_COPY_FROM, "C2"},
+      {2, "B/D",     "base-deleted", NO_COPY_FROM, "D2"},
+      {2, "B/D/E",   "base-deleted", NO_COPY_FROM},
+      {2, "B/D/E/F", "base-deleted", NO_COPY_FROM},
+      {1, "C2",      "normal",       3, "X/B/C", MOVED_HERE},
+      {1, "D2",      "normal",       2, "A/B/D", MOVED_HERE},
+      {1, "D2/E",    "normal",       2, "A/B/D/E", MOVED_HERE},
+      {2, "D2/E",    "base-deleted", NO_COPY_FROM, "D2/E2"},
+      {2, "D2/E2",   "normal",       2, "A/B/D/E", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Conflicts from switch are resolved just like those from update. */
+  SVN_ERR(sbox_wc_resolve(&b, "B/D", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       3, "X"},
+      {0, "B",       "normal",       3, "X/B"},
+      {0, "B/C",     "normal",       3, "X/B/C"},
+      {0, "B/D",     "normal",       3, "X/B/D"},
+      {0, "B/D/E",   "normal",       3, "X/B/D/E"},
+      {0, "B/D/E/F", "normal",       3, "X/B/D/E/F"},
+      {2, "B/C",     "base-deleted", NO_COPY_FROM, "C2"},
+      {2, "B/D",     "base-deleted", NO_COPY_FROM, "D2"},
+      {2, "B/D/E",   "base-deleted", NO_COPY_FROM},
+      {2, "B/D/E/F", "base-deleted", NO_COPY_FROM},
+      {1, "C2",      "normal",       3, "X/B/C", MOVED_HERE},
+      {1, "D2",      "normal",       3, "X/B/D", MOVED_HERE},
+      {1, "D2/E",    "normal",       3, "X/B/D/E", MOVED_HERE},
+      {1, "D2/E/F",  "normal",       3, "X/B/D/E/F", MOVED_HERE},
+      {2, "D2/E",    "base-deleted", NO_COPY_FROM, "D2/E2"},
+      {2, "D2/E/F",  "base-deleted", NO_COPY_FROM},
+      {2, "D2/E2",   "normal",       2, "A/B/D/E", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_resolve(&b, "D2/E", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       3, "X"},
+      {0, "B",       "normal",       3, "X/B"},
+      {0, "B/C",     "normal",       3, "X/B/C"},
+      {0, "B/D",     "normal",       3, "X/B/D"},
+      {0, "B/D/E",   "normal",       3, "X/B/D/E"},
+      {0, "B/D/E/F", "normal",       3, "X/B/D/E/F"},
+      {2, "B/C",     "base-deleted", NO_COPY_FROM, "C2"},
+      {2, "B/D",     "base-deleted", NO_COPY_FROM, "D2"},
+      {2, "B/D/E",   "base-deleted", NO_COPY_FROM},
+      {2, "B/D/E/F", "base-deleted", NO_COPY_FROM},
+      {1, "C2",      "normal",       3, "X/B/C", MOVED_HERE},
+      {1, "D2",      "normal",       3, "X/B/D", MOVED_HERE},
+      {1, "D2/E",    "normal",       3, "X/B/D/E", MOVED_HERE},
+      {1, "D2/E/F",  "normal",       3, "X/B/D/E/F", MOVED_HERE},
+      {2, "D2/E",    "base-deleted", NO_COPY_FROM, "D2/E2"},
+      {2, "D2/E/F",  "base-deleted", NO_COPY_FROM},
+      {2, "D2/E2",   "normal",       3, "X/B/D/E", MOVED_HERE},
+      {2, "D2/E2/F", "normal",       3, "X/B/D/E/F", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_replace(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_replace", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "B/X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A", "X"));
+  SVN_ERR(sbox_wc_move(&b, "B", "A"));
+  SVN_ERR(sbox_wc_move(&b, "X", "B"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",  "normal",       1, ""},
+      {0, "A", "normal",       1, "A"},
+      {0, "B", "normal",       1, "B"},
+      {1, "A", "normal",       1, "B", FALSE, "B", TRUE},
+      {1, "B", "normal",       1, "A", FALSE, "A", TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       2, ""},
+      {0, "A",   "normal",       2, "A"},
+      {0, "B",   "normal",       2, "B"},
+      {0, "B/X", "normal",       2, "B/X"},
+      {1, "A",   "normal",       1, "B", FALSE, "B", TRUE},
+      {1, "B",   "normal",       2, "A", FALSE, "A", TRUE},
+      {1, "B/X", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_resolve(&b, "B", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       2, ""},
+      {0, "A",   "normal",       2, "A"},
+      {0, "B",   "normal",       2, "B"},
+      {0, "B/X", "normal",       2, "B/X"},
+      {1, "A",   "normal",       2, "B", FALSE, "B", TRUE},
+      {1, "A/X", "normal",       2, "B/X", MOVED_HERE},
+      {1, "B",   "normal",       2, "A", FALSE, "A", TRUE},
+      {1, "B/X", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+layered_moved_to(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "layered_moved_to", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "B/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_propset(&b, "property", "value", "A/B/C"));
+  SVN_ERR(sbox_wc_propset(&b, "property", "value", "B/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A", "X"));
+  SVN_ERR(sbox_wc_move(&b, "X/B/C", "C2"));
+  SVN_ERR(sbox_wc_delete(&b, "X/B"));
+  SVN_ERR(sbox_wc_move(&b, "B", "X/B"));
+  SVN_ERR(sbox_wc_move(&b, "X/B/C", "C3"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {0, "B",       "normal",       1, "B"},
+      {0, "B/C",     "normal",       1, "B/C"},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "X"},
+      {1, "A/B",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "B",       "base-deleted", NO_COPY_FROM, "X/B"},
+      {1, "B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "X",       "normal",       1, "A", MOVED_HERE},
+      {1, "X/B",     "normal",       1, "A/B", MOVED_HERE},
+      {1, "X/B/C",   "normal",       1, "A/B/C", MOVED_HERE},
+      {2, "X/B",     "normal",       1, "B", MOVED_HERE},
+      {2, "X/B/C",   "normal",       1, "B/C", FALSE, "C2", TRUE},
+      {3, "X/B/C",   "base-deleted", NO_COPY_FROM, "C3"},
+      {1, "C2",      "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "C3",      "normal",       1, "B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  SVN_ERR(sbox_wc_resolve(&b, "X/B", svn_wc_conflict_choose_merged));
+  SVN_ERR(sbox_wc_resolve(&b, "X/B/C", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       2, "A"},
+      {0, "A/B",     "normal",       2, "A/B"},
+      {0, "A/B/C",   "normal",       2, "A/B/C"},
+      {0, "B",       "normal",       1, "B"},
+      {0, "B/C",     "normal",       1, "B/C"},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "X"},
+      {1, "A/B",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "B",       "base-deleted", NO_COPY_FROM, "X/B"},
+      {1, "B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "X",       "normal",       2, "A", MOVED_HERE},
+      {1, "X/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "X/B/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {2, "X/B",     "normal",       1, "B", MOVED_HERE},
+      {2, "X/B/C",   "normal",       1, "B/C", FALSE, "C2", TRUE},
+      {3, "X/B/C",   "base-deleted", NO_COPY_FROM, "C3"},
+      {1, "C2",      "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "C3",      "normal",       1, "B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
 
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
@@ -4894,7 +6195,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move_on_move2"),
     SVN_TEST_OPTS_PASS(move_added,
                        "move_added"),
-    SVN_TEST_OPTS_XFAIL(move_update,
+    SVN_TEST_OPTS_PASS(move_update,
                        "move_update"),
     SVN_TEST_OPTS_PASS(test_scan_delete,
                        "scan_delete"),
@@ -4902,5 +6203,27 @@ struct svn_test_descriptor_t test_funcs[
                        "follow_moved_to"),
     SVN_TEST_OPTS_PASS(mixed_rev_move,
                        "mixed_rev_move"),
+    SVN_TEST_OPTS_PASS(update_prop_mod_into_moved,
+                       "update_prop_mod_into_moved"),
+    SVN_TEST_OPTS_PASS(nested_move_update,
+                       "nested_move_update"),
+    SVN_TEST_OPTS_XFAIL(nested_move_commit,
+                       "nested_move_commit"),
+    SVN_TEST_OPTS_PASS(nested_move_update2,
+                       "nested_move_update2"),
+    SVN_TEST_OPTS_PASS(move_update_conflicts,
+                       "move_update_conflicts"),
+    SVN_TEST_OPTS_PASS(move_update_delete_mods,
+                       "move_update_delete_mods"),
+    SVN_TEST_OPTS_PASS(nested_moves2,
+                       "nested_moves2"),
+    SVN_TEST_OPTS_PASS(move_in_delete,
+                       "move_in_delete (issue 4303)"),
+    SVN_TEST_OPTS_PASS(switch_move,
+                       "switch_move"),
+    SVN_TEST_OPTS_PASS(move_replace,
+                       "move_replace"),
+    SVN_TEST_OPTS_XFAIL(layered_moved_to,
+                       "layered_moved_to"),
     SVN_TEST_NULL
   };



Mime
View raw message