You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/27 05:03:55 UTC

svn commit: r1426116 [14/16] - in /subversion/branches/javahl-ra: ./ build/ build/ac-macros/ build/generator/ build/win32/ contrib/server-side/svncutter/ notes/ subversion/bindings/cxxhl/ subversion/bindings/swig/ subversion/bindings/swig/perl/native/ ...

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c?rev=1426116&r1=1426115&r2=1426116&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c Thu Dec 27 04:03:49 2012
@@ -35,6 +35,7 @@
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_hash.h"
+#include "svn_sorts.h"
 
 #include "utils.h"
 
@@ -86,248 +87,6 @@ open_wc_db(svn_sqlite__db_t **sdb,
 
 
 /* ---------------------------------------------------------------------- */
-/* Functions for easy manipulation of a WC. Paths given to these functions
- * can be relative to the WC root as stored in the WC baton. */
-
-/* Return the abspath of PATH which is absolute or relative to the WC in B. */
-#define wc_path(b, path) (svn_dirent_join((b)->wc_abspath, (path), (b)->pool))
-
-/* Create a file on disk at PATH, with TEXT as its content. */
-static void
-file_write(svn_test__sandbox_t *b, const char *path, const char *text)
-{
-  FILE *f = fopen(wc_path(b, path), "w");
-  fputs(text, f);
-  fclose(f);
-}
-
-/* Schedule for addition the single node that exists on disk at PATH,
- * non-recursively. */
-static svn_error_t *
-wc_add(svn_test__sandbox_t *b, const char *path)
-{
-  const char *parent_abspath;
-  path = wc_path(b, path);
-  parent_abspath = svn_dirent_dirname(path, b->pool);
-  SVN_ERR(svn_wc__acquire_write_lock(NULL, b->wc_ctx, parent_abspath, FALSE,
-                                     b->pool, b->pool));
-  SVN_ERR(svn_wc_add_from_disk(b->wc_ctx, path, NULL, NULL, b->pool));
-  SVN_ERR(svn_wc__release_write_lock(b->wc_ctx, parent_abspath, b->pool));
-  return SVN_NO_ERROR;
-}
-
-/* Create a single directory on disk. */
-static svn_error_t *
-disk_mkdir(svn_test__sandbox_t *b, const char *path)
-{
-  path = wc_path(b, path);
-  SVN_ERR(svn_io_dir_make(path, APR_FPROT_OS_DEFAULT, b->pool));
-  return SVN_NO_ERROR;
-}
-
-/* Create a single directory on disk and schedule it for addition. */
-static svn_error_t *
-wc_mkdir(svn_test__sandbox_t *b, const char *path)
-{
-  SVN_ERR(disk_mkdir(b, path));
-  SVN_ERR(wc_add(b, path));
-  return SVN_NO_ERROR;
-}
-
-#if 0 /* not used */
-/* Copy the file or directory tree FROM_PATH to TO_PATH which must not exist
- * beforehand. */
-static svn_error_t *
-disk_copy(svn_test__sandbox_t *b, const char *from_path, const char *to_path)
-{
-  const char *to_dir, *to_name;
-  from_path = wc_path(b, from_path);
-  to_path = wc_path(b, to_path);
-  svn_dirent_split(&to_dir, &to_name, to_path, b->pool);
-  return svn_io_copy_dir_recursively(from_path, to_dir, to_name,
-                                     FALSE, NULL, NULL, b->pool);
-}
-#endif
-
-/* Copy the WC file or directory tree FROM_PATH to TO_PATH which must not
- * exist beforehand. */
-static svn_error_t *
-wc_copy(svn_test__sandbox_t *b, const char *from_path, const char *to_path)
-{
-  from_path = wc_path(b, from_path);
-  to_path = wc_path(b, to_path);
-  return svn_wc_copy3(b->wc_ctx, from_path, to_path, FALSE,
-                      NULL, NULL, NULL, NULL, b->pool);
-}
-
-/* Revert a WC file or directory tree at PATH */
-static svn_error_t *
-wc_revert(svn_test__sandbox_t *b, const char *path, svn_depth_t depth)
-{
-  const char *abspath = wc_path(b, path);
-  const char *dir_abspath;
-  const char *lock_root_abspath;
-
-  if (strcmp(abspath, b->wc_abspath))
-    dir_abspath = svn_dirent_dirname(abspath, b->pool);
-  else
-    dir_abspath = abspath;
-
-  SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
-                                     dir_abspath, FALSE /* lock_anchor */,
-                                     b->pool, b->pool));
-  SVN_ERR(svn_wc_revert4(b->wc_ctx, abspath, depth, FALSE, NULL,
-                         NULL, NULL, /* cancel baton + func */
-                         NULL, NULL, /* notify baton + func */
-                         b->pool));
-  SVN_ERR(svn_wc__release_write_lock(b->wc_ctx, lock_root_abspath, b->pool));
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-wc_delete(svn_test__sandbox_t *b, const char *path)
-{
-  const char *abspath = wc_path(b, path);
-  const char *dir_abspath = svn_dirent_dirname(abspath, b->pool);
-  const char *lock_root_abspath;
-
-  SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
-                                     dir_abspath, FALSE,
-                                     b->pool, b->pool));
-  SVN_ERR(svn_wc_delete4(b->wc_ctx, abspath, FALSE, TRUE,
-                         NULL, NULL, /* cancel baton + func */
-                         NULL, NULL, /* notify baton + func */
-                         b->pool));
-  SVN_ERR(svn_wc__release_write_lock(b->wc_ctx, lock_root_abspath, b->pool));
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-wc_exclude(svn_test__sandbox_t *b, const char *path)
-{
-  const char *abspath = wc_path(b, path);
-  const char *lock_root_abspath;
-
-  SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
-                                     abspath, TRUE,
-                                     b->pool, b->pool));
-  SVN_ERR(svn_wc_exclude(b->wc_ctx, abspath,
-                         NULL, NULL, /* cancel baton + func */
-                         NULL, NULL, /* notify baton + func */
-                         b->pool));
-  SVN_ERR(svn_wc__release_write_lock(b->wc_ctx, lock_root_abspath, b->pool));
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-wc_commit(svn_test__sandbox_t *b, const char *path)
-{
-  svn_client_ctx_t *ctx;
-  apr_array_header_t *targets = apr_array_make(b->pool, 1,
-                                               sizeof(const char *));
-
-  APR_ARRAY_PUSH(targets, const char *) = wc_path(b, path);
-  SVN_ERR(svn_client_create_context(&ctx, b->pool));
-  return svn_client_commit5(targets, svn_depth_infinity,
-                            FALSE, FALSE, TRUE, /* keep locks/cl's/use_ops*/
-                            NULL, NULL, NULL, NULL, ctx, b->pool);
-}
-
-static svn_error_t *
-wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum)
-{
-  svn_client_ctx_t *ctx;
-  apr_array_header_t *result_revs;
-  apr_array_header_t *paths = apr_array_make(b->pool, 1,
-                                             sizeof(const char *));
-  svn_opt_revision_t revision;
-
-  revision.kind = svn_opt_revision_number;
-  revision.value.number = revnum;
-
-  APR_ARRAY_PUSH(paths, const char *) = wc_path(b, path);
-  SVN_ERR(svn_client_create_context(&ctx, b->pool));
-  return svn_client_update4(&result_revs, paths, &revision, svn_depth_infinity,
-                            TRUE, FALSE, FALSE, FALSE, FALSE,
-                            ctx, b->pool);
-}
-
-static svn_error_t *
-wc_resolved(svn_test__sandbox_t *b, const char *path)
-{
-  svn_client_ctx_t *ctx;
-
-  SVN_ERR(svn_client_create_context(&ctx, b->pool));
-  return svn_client_resolved(wc_path(b, path), TRUE, ctx, b->pool);
-}
-
-static svn_error_t *
-wc_resolve(svn_test__sandbox_t *b, const char *path)
-{
-  svn_client_ctx_t *ctx;
-
-  SVN_ERR(svn_client_create_context(&ctx, b->pool));
-  return svn_client_resolve(wc_path(b, path), svn_depth_infinity,
-                            svn_wc_conflict_choose_mine_conflict,
-                            ctx, b->pool);
-}
-
-static svn_error_t *
-wc_move(svn_test__sandbox_t *b, const char *src, const char *dst)
-{
-  svn_client_ctx_t *ctx;
-  apr_array_header_t *paths = apr_array_make(b->pool, 1,
-                                             sizeof(const char *));
-
-  SVN_ERR(svn_client_create_context(&ctx, b->pool));
-  APR_ARRAY_PUSH(paths, const char *) = wc_path(b, src);
-  return svn_client_move6(paths, wc_path(b, dst),
-                          FALSE, FALSE, NULL, NULL, NULL, ctx, b->pool);
-}
-
-static svn_error_t *
-wc_propset(svn_test__sandbox_t *b,
-           const char *name,
-           const char *value,
-           const char *path)
-{
-  svn_client_ctx_t *ctx;
-  apr_array_header_t *paths = apr_array_make(b->pool, 1,
-                                             sizeof(const char *));
-
-  SVN_ERR(svn_client_create_context(&ctx, b->pool));
-  APR_ARRAY_PUSH(paths, const char *) = wc_path(b, path);
-  return svn_client_propset_local(name, svn_string_create(value, b->pool),
-                                  paths, svn_depth_empty, TRUE, NULL, ctx,
-                                  b->pool);
-}
-
-/* Create the Greek tree on disk in the WC, and commit it. */
-static svn_error_t *
-add_and_commit_greek_tree(svn_test__sandbox_t *b)
-{
-  const struct svn_test__tree_entry_t *node;
-
-  for (node = svn_test__greek_tree_nodes; node->path; node++)
-    {
-      if (node->contents)
-        {
-          file_write(b, node->path, node->contents);
-          SVN_ERR(wc_add(b, node->path));
-        }
-      else
-        {
-          SVN_ERR(wc_mkdir(b, node->path));
-        }
-    }
-
-  SVN_ERR(wc_commit(b, ""));
-
-  return SVN_NO_ERROR;
-}
-
-
-/* ---------------------------------------------------------------------- */
 /* Functions for comparing expected and found WC DB data. */
 
 /* Some of the fields from a NODES table row. */
@@ -340,19 +99,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)";
@@ -372,18 +161,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(). */
@@ -430,7 +224,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,
@@ -460,7 +256,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"
@@ -490,6 +287,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);
@@ -503,6 +301,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);
@@ -560,22 +361,22 @@ struct copy_subtest_t
 static svn_error_t *
 wc_wc_copies(svn_test__sandbox_t *b)
 {
-  SVN_ERR(add_and_commit_greek_tree(b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(b));
 
   /* Create the various kinds of source node which will be copied */
 
-  file_write(b, source_added_file, "New file");
-  SVN_ERR(wc_add(b, source_added_file));
-  SVN_ERR(wc_mkdir(b, source_added_dir));
-  SVN_ERR(wc_mkdir(b, source_added_dir2));
+  sbox_file_write(b, source_added_file, "New file");
+  SVN_ERR(sbox_wc_add(b, source_added_file));
+  SVN_ERR(sbox_wc_mkdir(b, source_added_dir));
+  SVN_ERR(sbox_wc_mkdir(b, source_added_dir2));
 
-  SVN_ERR(wc_copy(b, source_base_file, source_copied_file));
-  SVN_ERR(wc_copy(b, source_base_dir, source_copied_dir));
+  SVN_ERR(sbox_wc_copy(b, source_base_file, source_copied_file));
+  SVN_ERR(sbox_wc_copy(b, source_base_dir, source_copied_dir));
 
   /* Delete some nodes so that we can test copying onto these paths */
 
-  SVN_ERR(wc_delete(b, "A/D/gamma"));
-  SVN_ERR(wc_delete(b, "A/D/G"));
+  SVN_ERR(sbox_wc_delete(b, "A/D/gamma"));
+  SVN_ERR(sbox_wc_delete(b, "A/D/G"));
 
   /* Test copying various things */
 
@@ -673,11 +474,7 @@ wc_wc_copies(svn_test__sandbox_t *b)
     /* Perform each subtest in turn. */
     for (subtest = subtests; subtest->from_path; subtest++)
       {
-        SVN_ERR(svn_wc_copy3(b->wc_ctx,
-                             wc_path(b, subtest->from_path),
-                             wc_path(b, subtest->to_path),
-                             FALSE /* metadata_only */,
-                             NULL, NULL, NULL, NULL, b->pool));
+        SVN_ERR(sbox_wc_copy(b, subtest->from_path, subtest->to_path));
         SVN_ERR(check_db_rows(b, subtest->to_path, subtest->expected));
       }
   }
@@ -690,14 +487,14 @@ wc_wc_copies(svn_test__sandbox_t *b)
 static svn_error_t *
 repo_wc_copies(svn_test__sandbox_t *b)
 {
-  SVN_ERR(add_and_commit_greek_tree(b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(b));
 
   /* Delete some nodes so that we can test copying onto these paths */
 
-  SVN_ERR(wc_delete(b, "A/B/lambda"));
-  SVN_ERR(wc_delete(b, "A/D/gamma"));
-  SVN_ERR(wc_delete(b, "A/D/G"));
-  SVN_ERR(wc_delete(b, "A/D/H"));
+  SVN_ERR(sbox_wc_delete(b, "A/B/lambda"));
+  SVN_ERR(sbox_wc_delete(b, "A/D/gamma"));
+  SVN_ERR(sbox_wc_delete(b, "A/D/G"));
+  SVN_ERR(sbox_wc_delete(b, "A/D/H"));
 
   /* Test copying various things */
 
@@ -787,7 +584,7 @@ repo_wc_copies(svn_test__sandbox_t *b)
         source.peg_revision = &rev;
         APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = &source;
         SVN_ERR(svn_client_copy6(sources,
-                                 wc_path(b, subtest->to_path),
+                                 sbox_wc_path(b, subtest->to_path),
                                  FALSE, FALSE, FALSE,
                                  NULL, NULL, NULL, ctx, b->pool));
       }
@@ -827,7 +624,7 @@ test_reverts(const svn_test_opts_t *opts
     /* Implement revert tests below, now that we have a wc with lots of
      copy-changes */
 
-  SVN_ERR(wc_revert(&b, "A/B/D-added", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A/B/D-added", svn_depth_infinity));
   SVN_ERR(check_db_rows(&b, "A/B/D-added", no_node_rows_expected));
 
   return SVN_NO_ERROR;
@@ -839,10 +636,10 @@ test_deletes(const svn_test_opts_t *opts
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "deletes", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
 
-  file_write(&b,     "A/B/E/new-file", "New file");
-  SVN_ERR(wc_add(&b, "A/B/E/new-file"));
+  sbox_file_write(&b,     "A/B/E/new-file", "New file");
+  SVN_ERR(sbox_wc_add(&b, "A/B/E/new-file"));
   {
     nodes_row_t rows[] = {
       { 4, "A/B/E/new-file", "normal", NO_COPY_FROM },
@@ -851,7 +648,7 @@ test_deletes(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "A/B/E/new-file", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B/E/alpha"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/E/alpha"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/E/alpha", "normal",       1, "A/B/E/alpha" },
@@ -861,7 +658,7 @@ test_deletes(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "A/B/E/alpha", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B/F"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/F"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/F", "normal",       1, "A/B/F" },
@@ -871,7 +668,7 @@ test_deletes(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "A/B/F", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B",         "normal",       1, "A/B",        },
@@ -900,11 +697,11 @@ test_adds(const svn_test_opts_t *opts, a
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "adds", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
 
   /* add file */
-  file_write(&b, "new-file", "New file");
-  SVN_ERR(wc_add(&b, "new-file"));
+  sbox_file_write(&b, "new-file", "New file");
+  SVN_ERR(sbox_wc_add(&b, "new-file"));
   {
     nodes_row_t rows[] = {
       { 1, "new-file",    "normal",       NO_COPY_FROM     },
@@ -913,8 +710,8 @@ test_adds(const svn_test_opts_t *opts, a
   }
 
   /* add dir */
-  SVN_ERR(wc_mkdir(&b, "new-dir"));
-  SVN_ERR(wc_mkdir(&b, "new-dir/D2"));
+  SVN_ERR(sbox_wc_mkdir(&b, "new-dir"));
+  SVN_ERR(sbox_wc_mkdir(&b, "new-dir/D2"));
   {
     nodes_row_t rows[] = {
       { 1, "new-dir",     "normal",       NO_COPY_FROM     },
@@ -924,9 +721,9 @@ test_adds(const svn_test_opts_t *opts, a
   }
 
   /* replace file */
-  SVN_ERR(wc_delete(&b, "iota"));
-  file_write(&b, "iota", "New iota file");
-  SVN_ERR(wc_add(&b, "iota"));
+  SVN_ERR(sbox_wc_delete(&b, "iota"));
+  sbox_file_write(&b, "iota", "New iota file");
+  SVN_ERR(sbox_wc_add(&b, "iota"));
   {
     nodes_row_t rows[] = {
       { 0, "iota",        "normal",       1, "iota"        },
@@ -936,9 +733,9 @@ test_adds(const svn_test_opts_t *opts, a
   }
 
   /* replace dir */
-  SVN_ERR(wc_delete(&b, "A/B/E"));
-  SVN_ERR(wc_mkdir(&b, "A/B/E"));
-  SVN_ERR(wc_mkdir(&b, "A/B/E/D2"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/E"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/E"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/E/D2"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/E",       "normal",       1, "A/B/E"       },
@@ -961,12 +758,12 @@ test_adds_change_kind(const svn_test_opt
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "adds", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
 
   /* replace dir with file */
-  SVN_ERR(wc_delete(&b, "A/B/E"));
-  file_write(&b, "A/B/E", "New E file");
-  SVN_ERR(wc_add(&b, "A/B/E"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/E"));
+  sbox_file_write(&b, "A/B/E", "New E file");
+  SVN_ERR(sbox_wc_add(&b, "A/B/E"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/E",       "normal",       1, "A/B/E"       },
@@ -980,9 +777,9 @@ test_adds_change_kind(const svn_test_opt
   }
 
   /* replace file with dir */
-  SVN_ERR(wc_delete(&b, "iota"));
-  SVN_ERR(wc_mkdir(&b, "iota"));
-  SVN_ERR(wc_mkdir(&b, "iota/D2"));
+  SVN_ERR(sbox_wc_delete(&b, "iota"));
+  SVN_ERR(sbox_wc_mkdir(&b, "iota"));
+  SVN_ERR(sbox_wc_mkdir(&b, "iota/D2"));
   {
     nodes_row_t rows[] = {
       { 0, "iota",        "normal",       1, "iota"        },
@@ -1002,10 +799,10 @@ test_delete_of_copies(const svn_test_opt
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "deletes_of_copies", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
-  SVN_ERR(wc_copy(&b, "A/B", "A/B-copied"));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_wc_copy(&b, "A/B", "A/B-copied"));
 
-  SVN_ERR(wc_delete(&b, "A/B-copied/E"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B-copied/E"));
   {
     nodes_row_t rows[] = {
       { 2, "A/B-copied/E",       "normal",       1, "A/B/E" },
@@ -1019,7 +816,7 @@ test_delete_of_copies(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A/D/G", "A/B-copied/E"));
+  SVN_ERR(sbox_wc_copy(&b, "A/D/G", "A/B-copied/E"));
   {
     nodes_row_t rows[] = {
       { 2, "A/B-copied/E",       "normal",       1, "A/B/E" },
@@ -1036,7 +833,7 @@ test_delete_of_copies(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B-copied/E/rho"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B-copied/E/rho"));
   {
     nodes_row_t rows[] = {
       { 2, "A/B-copied/E",       "normal",       1, "A/B/E" },
@@ -1054,7 +851,7 @@ test_delete_of_copies(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B-copied/E"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B-copied/E"));
   {
     nodes_row_t rows[] = {
       { 2, "A/B-copied/E",       "normal",       1, "A/B/E" },
@@ -1068,9 +865,9 @@ test_delete_of_copies(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A/B", "A/B-copied/E"));
+  SVN_ERR(sbox_wc_copy(&b, "A/B", "A/B-copied/E"));
 
-  SVN_ERR(wc_delete(&b, "A/B-copied/E/F"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B-copied/E/F"));
   {
     nodes_row_t rows[] = {
       { 3, "A/B-copied/E/F", "normal",       1, "A/B/F" },
@@ -1080,7 +877,7 @@ test_delete_of_copies(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B-copied/E/F", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B-copied"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B-copied"));
   {
     nodes_row_t rows[] = { { 0 } };
     SVN_ERR(check_db_rows(&b, "A/B-copied", rows));
@@ -1096,11 +893,11 @@ test_delete_with_base(const svn_test_opt
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "deletes_with_base", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
-  SVN_ERR(wc_delete(&b, "A/B/E/beta"));
-  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/E/beta"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
-  SVN_ERR(wc_delete(&b, "A/B/E"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/E"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/E",       "normal",        1, "A/B/E"},
@@ -1113,9 +910,9 @@ test_delete_with_base(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B/E", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A/B/F", "A/B/E"));
-  SVN_ERR(wc_copy(&b, "A/mu",  "A/B/E/alpha"));
-  SVN_ERR(wc_copy(&b, "A/mu",  "A/B/E/beta"));
+  SVN_ERR(sbox_wc_copy(&b, "A/B/F", "A/B/E"));
+  SVN_ERR(sbox_wc_copy(&b, "A/mu",  "A/B/E/alpha"));
+  SVN_ERR(sbox_wc_copy(&b, "A/mu",  "A/B/E/beta"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/E",       "normal",        1, "A/B/E"},
@@ -1131,7 +928,7 @@ test_delete_with_base(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "A/B/E", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B/E"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/E"));
   {
     nodes_row_t rows[] = {
       { 0, "A/B/E",       "normal",        1, "A/B/E"},
@@ -1163,16 +960,16 @@ test_delete_with_update(const svn_test_o
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "delete_with_update", opts, pool));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-
-  SVN_ERR(wc_delete(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  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_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
   {
     nodes_row_t rows[] = {
       { 0, "A",       "normal",        1, "A"},
@@ -1182,7 +979,7 @@ test_delete_with_update(const svn_test_o
     };
     SVN_ERR(check_db_rows(&b, "A", rows));
   }
-  SVN_ERR(wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_update(&b, "", 2));
   {
     nodes_row_t rows[] = {
       { 0, "A",       "normal",        2, "A"},
@@ -1196,8 +993,8 @@ test_delete_with_update(const svn_test_o
     };
     SVN_ERR(check_db_rows(&b, "A", rows));
   }
-  SVN_ERR(wc_resolved(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_resolved(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
   {
     nodes_row_t rows[] = {
       { 0, "A",       "normal",        1, "A"},
@@ -1284,7 +1081,7 @@ base_dir_insert_remove(svn_test__sandbox
                        nodes_row_t *added)
 {
   nodes_row_t *after;
-  const char *dir_abspath = wc_path(b, local_relpath);
+  const char *dir_abspath = sbox_wc_path(b, local_relpath);
   int i;
   apr_int64_t num_before = count_rows(before), num_added = count_rows(added);
 
@@ -1728,13 +1525,13 @@ test_wc_move(const svn_test_opts_t *opts
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "wc_move", opts, pool));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  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_update(&b, "", 1));
 
-  SVN_ERR(wc_move(&b, "A/B/C", "A/B/C-move"));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "A/B/C-move"));
   {
     nodes_row_t rows[] = {
       { 0, "",           "normal",       1, "" },
@@ -1748,7 +1545,7 @@ test_wc_move(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_move(&b, "A/B", "A/B-move"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B-move"));
   {
     nodes_row_t rows[] = {
       { 0, "",                "normal",       1, "" },
@@ -1775,14 +1572,14 @@ test_mixed_rev_copy(const svn_test_opts_
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "mixed_rev_copy", opts, pool));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
-  SVN_ERR(wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
   {
     nodes_row_t rows[] = {
       { 1, "X",     "normal",       1, "A" },
@@ -1795,7 +1592,7 @@ test_mixed_rev_copy(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "X", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A/B", "X/Y"));
+  SVN_ERR(sbox_wc_copy(&b, "A/B", "X/Y"));
   {
     nodes_row_t rows[] = {
       { 1, "X",     "normal",       1, "A" },
@@ -1811,7 +1608,7 @@ test_mixed_rev_copy(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "X", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "X/B/C"));
+  SVN_ERR(sbox_wc_delete(&b, "X/B/C"));
   {
     nodes_row_t rows[] = {
       { 1, "X",     "normal",       1, "A" },
@@ -1826,8 +1623,8 @@ test_mixed_rev_copy(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "X", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "X"));
-  SVN_ERR(wc_update(&b, "A/B/C", 0));
+  SVN_ERR(sbox_wc_delete(&b, "X"));
+  SVN_ERR(sbox_wc_update(&b, "A/B/C", 0));
   {
     nodes_row_t rows[] = {
       { 0, "",      "normal",       0, "" },
@@ -1839,7 +1636,7 @@ test_mixed_rev_copy(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
   {
     nodes_row_t rows[] = {
       { 1, "X",     "normal",       1, "A" },
@@ -1860,23 +1657,23 @@ test_delete_of_replace(const svn_test_op
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "delete_of_replace", opts, pool));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C/F"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C/F/K"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C/G"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C/G/K"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-
-  SVN_ERR(wc_copy(&b, "A", "X"));
-  SVN_ERR(wc_move(&b, "X/B/C/F", "X/B/C/H"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 2));
+  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/C/F"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/F/K"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/G"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C/G/K"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_move(&b, "X/B/C/F", "X/B/C/H"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 2));
 
-  SVN_ERR(wc_delete(&b, "A/B"));
-  SVN_ERR(wc_copy(&b, "X/B", "A/B"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_copy(&b, "X/B", "A/B"));
   {
     nodes_row_t rows[] = {
       { 0, "A",         "normal",       2, "A" },
@@ -1899,7 +1696,7 @@ test_delete_of_replace(const svn_test_op
     SVN_ERR(check_db_rows(&b, "A", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
   {
     nodes_row_t rows[] = {
       { 0, "A",         "normal",       2, "A" },
@@ -1929,25 +1726,25 @@ test_del_replace_not_present(const svn_t
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "del_replace_not_present", opts, pool));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/X"));
-  SVN_ERR(wc_mkdir(&b, "A/B/Y"));
-  SVN_ERR(wc_mkdir(&b, "A/B/Z"));
-  SVN_ERR(wc_commit(&b, ""));
-
-  SVN_ERR(wc_copy(&b, "A", "X"));
-  SVN_ERR(wc_mkdir(&b, "X/B/W"));
-  SVN_ERR(wc_commit(&b, ""));
-
-  SVN_ERR(wc_update(&b, "", 2));
-  SVN_ERR(wc_update(&b, "A/B/X", 0));
-  SVN_ERR(wc_update(&b, "A/B/Y", 0));
-  SVN_ERR(wc_update(&b, "X/B/W", 0));
-  SVN_ERR(wc_update(&b, "X/B/Y", 0));
-  SVN_ERR(wc_update(&b, "X/B/Z", 0));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/Y"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/Z"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/B/W"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_update(&b, "A/B/X", 0));
+  SVN_ERR(sbox_wc_update(&b, "A/B/Y", 0));
+  SVN_ERR(sbox_wc_update(&b, "X/B/W", 0));
+  SVN_ERR(sbox_wc_update(&b, "X/B/Y", 0));
+  SVN_ERR(sbox_wc_update(&b, "X/B/Z", 0));
 
-  SVN_ERR(wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_delete(&b, "A"));
   {
     nodes_row_t rows[] = {
       { 0, "A",         "normal",       2, "A" },
@@ -1963,7 +1760,7 @@ test_del_replace_not_present(const svn_t
     SVN_ERR(check_db_rows(&b, "A", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "X", "A"));
+  SVN_ERR(sbox_wc_copy(&b, "X", "A"));
   {
     nodes_row_t rows[] = {
       { 0, "A",         "normal",       2, "A" },
@@ -1982,7 +1779,7 @@ test_del_replace_not_present(const svn_t
     SVN_ERR(check_db_rows(&b, "A", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_delete(&b, "A"));
   {
     nodes_row_t rows[] = {
       { 0, "A",         "normal",       2, "A" },
@@ -2121,7 +1918,7 @@ revert(svn_test__sandbox_t *b,
        actual_row_t *before_actual,
        actual_row_t *after_actual)
 {
-  const char *local_abspath = wc_path(b, local_relpath);
+  const char *local_abspath = sbox_wc_path(b, local_relpath);
   svn_error_t *err;
 
   if (!before_actual)
@@ -2781,27 +2578,27 @@ test_children_of_replaced_dir(const svn_
   A_abspath = svn_dirent_join(b.wc_abspath, "A", pool);
 
   /* Set up the base state as revision 1. */
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/F"));
-  SVN_ERR(wc_mkdir(&b, "A/G"));
-  SVN_ERR(wc_mkdir(&b, "A/H"));
-  SVN_ERR(wc_mkdir(&b, "A/L"));
-  SVN_ERR(wc_mkdir(&b, "X"));
-  SVN_ERR(wc_mkdir(&b, "X/G"));
-  SVN_ERR(wc_mkdir(&b, "X/H"));
-  SVN_ERR(wc_mkdir(&b, "X/I"));
-  SVN_ERR(wc_mkdir(&b, "X/K"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/F"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/G"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/H"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/L"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/G"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/H"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/I"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/K"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
 
   /* Replace A with a copy of X. */
-  SVN_ERR(wc_delete(&b, "A"));
-  SVN_ERR(wc_copy(&b, "X", "A"));
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_copy(&b, "X", "A"));
 
   /* Make other local mods. */
-  SVN_ERR(wc_delete(&b, "A/G"));
-  SVN_ERR(wc_mkdir(&b, "A/J"));
-  SVN_ERR(wc_mkdir(&b, "A/L"));
+  SVN_ERR(sbox_wc_delete(&b, "A/G"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/J"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/L"));
 
   /* Test several variants of "list the children of 'A'". */
 
@@ -2849,7 +2646,7 @@ do_delete(svn_test__sandbox_t *b,
           actual_row_t *actual_before,
           actual_row_t *actual_after)
 {
-  const char *local_abspath = wc_path(b, local_relpath);
+  const char *local_abspath = sbox_wc_path(b, local_relpath);
 
   SVN_ERR(insert_dirs(b, before));
   SVN_ERR(insert_actual(b, actual_before));
@@ -3101,13 +2898,13 @@ test_child_replace_with_same_origin(cons
   SVN_ERR(svn_test__sandbox_create(&b, "child_replace_with_same", opts, pool));
 
   /* Set up the base state as revision 1. */
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  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_update(&b, "", 1));
 
-  SVN_ERR(wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
 
   {
     nodes_row_t rows[] = {
@@ -3119,7 +2916,7 @@ test_child_replace_with_same_origin(cons
     SVN_ERR(check_db_rows(&b, "X", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "X/B"));
+  SVN_ERR(sbox_wc_delete(&b, "X/B"));
   {
     nodes_row_t rows[] = {
       {1, "X",       "normal",           1, "A"},
@@ -3134,7 +2931,7 @@ test_child_replace_with_same_origin(cons
     SVN_ERR(check_db_rows(&b, "X", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A/B", "X/B"));
+  SVN_ERR(sbox_wc_copy(&b, "A/B", "X/B"));
   {
     /* The revisions match what was here, so for an optimal commit
        this should have exactly the same behavior as reverting X/B.
@@ -3170,38 +2967,38 @@ test_shadowed_update(const svn_test_opts
   SVN_ERR(svn_test__sandbox_create(&b, "shadowed_update", opts, pool));
 
   /* Set up the base state as revision 1. */
-  file_write(&b, "iota", "This is iota");
-  SVN_ERR(wc_add(&b, "iota"));
-  SVN_ERR(wc_commit(&b, ""));
+  sbox_file_write(&b, "iota", "This is iota");
+  SVN_ERR(sbox_wc_add(&b, "iota"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
   /* And create two trees in r2 */
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-
-  SVN_ERR(wc_mkdir(&b, "K"));
-  SVN_ERR(wc_mkdir(&b, "K/L"));
-  SVN_ERR(wc_mkdir(&b, "K/L/M"));
-  SVN_ERR(wc_commit(&b, ""));
+  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, "K"));
+  SVN_ERR(sbox_wc_mkdir(&b, "K/L"));
+  SVN_ERR(sbox_wc_mkdir(&b, "K/L/M"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
   /* And change something in r3 */
-  file_write(&b, "iota", "This is a new iota");
-  SVN_ERR(wc_commit(&b, ""));
+  sbox_file_write(&b, "iota", "This is a new iota");
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
   /* And delete C & M */
-  SVN_ERR(wc_delete(&b, "A/B/C"));
-  SVN_ERR(wc_delete(&b, "K/L/M"));
-  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_delete(&b, "K/L/M"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
   /* And now create the shadowed situation */
-  SVN_ERR(wc_update(&b, "", 2));
-  SVN_ERR(wc_copy(&b, "A", "A_tmp"));
-  SVN_ERR(wc_update(&b, "", 1));
-  SVN_ERR(wc_move(&b, "A_tmp", "A"));
-
-  SVN_ERR(wc_mkdir(&b, "K"));
-  SVN_ERR(wc_mkdir(&b, "K/L"));
-  SVN_ERR(wc_mkdir(&b, "K/L/M"));
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_copy(&b, "A", "A_tmp"));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A_tmp", "A"));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "K"));
+  SVN_ERR(sbox_wc_mkdir(&b, "K/L"));
+  SVN_ERR(sbox_wc_mkdir(&b, "K/L/M"));
 
   /* Verify situation before update */
   {
@@ -3222,7 +3019,7 @@ test_shadowed_update(const svn_test_opts
   }
 
   /* And now bring in A and K below the local information */
-  SVN_ERR(wc_update(&b, "", 3));
+  SVN_ERR(sbox_wc_update(&b, "", 3));
 
   {
     nodes_row_t rows[] = {
@@ -3255,9 +3052,9 @@ test_shadowed_update(const svn_test_opts
   }
 
   /* Update again to remove C and M */
-  SVN_ERR(wc_resolved(&b, "A"));
-  SVN_ERR(wc_resolved(&b, "K"));
-  SVN_ERR(wc_update(&b, "", 4));
+  SVN_ERR(sbox_wc_resolved(&b, "A"));
+  SVN_ERR(sbox_wc_resolved(&b, "K"));
+  SVN_ERR(sbox_wc_update(&b, "", 4));
 
   {
     nodes_row_t rows[] = {
@@ -3287,11 +3084,11 @@ test_shadowed_update(const svn_test_opts
   }
 
   /* Update again to bring C and M back */
-  SVN_ERR(wc_resolved(&b, "A"));
-  SVN_ERR(wc_resolved(&b, "K"));
-  SVN_ERR(wc_update(&b, "", 3));
+  SVN_ERR(sbox_wc_resolved(&b, "A"));
+  SVN_ERR(sbox_wc_resolved(&b, "K"));
+  SVN_ERR(sbox_wc_update(&b, "", 3));
 
-  SVN_ERR(wc_delete(&b, "K/L/M"));
+  SVN_ERR(sbox_wc_delete(&b, "K/L/M"));
   {
     nodes_row_t rows[] = {
       {0, "",        "normal",           3, ""},
@@ -3321,13 +3118,13 @@ test_shadowed_update(const svn_test_opts
   }
 
   /* Resolve conflict on K and go back to r1 */
-  SVN_ERR(wc_revert(&b, "K", svn_depth_infinity));
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_revert(&b, "K", svn_depth_infinity));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
 
-  SVN_ERR(wc_mkdir(&b, "K"));
-  SVN_ERR(wc_mkdir(&b, "K/L"));
+  SVN_ERR(sbox_wc_mkdir(&b, "K"));
+  SVN_ERR(sbox_wc_mkdir(&b, "K/L"));
 
-  SVN_ERR(wc_update(&b, "", 3));
+  SVN_ERR(sbox_wc_update(&b, "", 3));
 
   {
     nodes_row_t rows[] = {
@@ -3348,10 +3145,10 @@ test_shadowed_update(const svn_test_opts
   }
 
   /* Update the shadowed K/L/M to r4 where they do not exit */
-  SVN_ERR(wc_resolved(&b, "K"));
-  SVN_ERR(wc_update(&b, "K/L/M", 4));
-  SVN_ERR(wc_resolved(&b, "A"));
-  SVN_ERR(wc_update(&b, "A/B/C", 4));
+  SVN_ERR(sbox_wc_resolved(&b, "K"));
+  SVN_ERR(sbox_wc_update(&b, "K/L/M", 4));
+  SVN_ERR(sbox_wc_resolved(&b, "A"));
+  SVN_ERR(sbox_wc_update(&b, "A/B/C", 4));
 
   {
     nodes_row_t rows[] = {
@@ -3393,24 +3190,24 @@ test_copy_of_deleted(const svn_test_opts
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "copy_of_deleted", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
 
   /* Recreate the test scenario from copy_tests.py copy_wc_url_with_server_excluded */
 
   /* Delete A/B */
-  SVN_ERR(wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
 
   /* A/no not-present but in HEAD */
-  SVN_ERR(wc_copy(&b, "A/mu", "A/no"));
-  SVN_ERR(wc_commit(&b, "A/no"));
-  SVN_ERR(wc_update(&b, "A/no", 1));
+  SVN_ERR(sbox_wc_copy(&b, "A/mu", "A/no"));
+  SVN_ERR(sbox_wc_commit(&b, "A/no"));
+  SVN_ERR(sbox_wc_update(&b, "A/no", 1));
 
   /* A/mu not-present and not in HEAD */
-  SVN_ERR(wc_delete(&b, "A/mu"));
-  SVN_ERR(wc_commit(&b, "A/mu"));
+  SVN_ERR(sbox_wc_delete(&b, "A/mu"));
+  SVN_ERR(sbox_wc_commit(&b, "A/mu"));
 
   /* A/D excluded */
-  SVN_ERR(wc_exclude(&b, "A/D"));
+  SVN_ERR(sbox_wc_exclude(&b, "A/D"));
 
   /* This should have created this structure */
   {
@@ -3440,7 +3237,7 @@ test_copy_of_deleted(const svn_test_opts
     SVN_ERR(check_db_rows(&b, "A", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A", "A_copied"));
+  SVN_ERR(sbox_wc_copy(&b, "A", "A_copied"));
 
   /* I would expect this behavior, as this copies all layers where possible
      instead of just constructing a top level layer with not-present nodes
@@ -3483,12 +3280,12 @@ test_case_rename(const svn_test_opts_t *
   apr_hash_t *dirents;
 
   SVN_ERR(svn_test__sandbox_create(&b, "case_rename", opts, pool));
-  SVN_ERR(add_and_commit_greek_tree(&b));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
 
-  SVN_ERR(wc_move(&b, "A", "a"));
-  SVN_ERR(wc_move(&b, "iota", "iotA"));
+  SVN_ERR(sbox_wc_move(&b, "A", "a"));
+  SVN_ERR(sbox_wc_move(&b, "iota", "iotA"));
 
-  SVN_ERR(svn_io_get_dirents3(&dirents, wc_path(&b, ""), TRUE, pool, pool));
+  SVN_ERR(svn_io_get_dirents3(&dirents, sbox_wc_path(&b, ""), TRUE, pool, pool));
 
   /* A shouldn't be there, but a should */
   SVN_TEST_ASSERT(apr_hash_get(dirents, "a", APR_HASH_KEY_STRING));
@@ -3506,14 +3303,14 @@ commit_file_external(const svn_test_opts
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "commit_file_external", opts, pool));
-  file_write(&b, "f", "this is f\n");
-  SVN_ERR(wc_add(&b, "f"));
-  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", ""));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-  file_write(&b, "g", "this is f\nmodified via g\n");
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 2));
+  sbox_file_write(&b, "f", "this is f\n");
+  SVN_ERR(sbox_wc_add(&b, "f"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f g", ""));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  sbox_file_write(&b, "g", "this is f\nmodified via g\n");
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 2));
 
   {
     nodes_row_t rows[] = {
@@ -3534,14 +3331,14 @@ revert_file_externals(const svn_test_opt
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "revert_file_externals", opts, pool));
-  file_write(&b, "f", "this is f\n");
-  SVN_ERR(wc_add(&b, "f"));
-  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", ""));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-  SVN_ERR(wc_propset(&b, "svn:externals", "^/f h", ""));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", "A"));
+  sbox_file_write(&b, "f", "this is f\n");
+  SVN_ERR(sbox_wc_add(&b, "f"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f g", ""));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f h", ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f g", "A"));
   {
     nodes_row_t rows[] = {
       { 0, "",    "normal", 1, "" },
@@ -3553,7 +3350,7 @@ revert_file_externals(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
   {
     nodes_row_t rows[] = {
       { 0, "",    "normal", 1, "" },
@@ -3566,7 +3363,7 @@ revert_file_externals(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
   {
     nodes_row_t rows[] = {
       { 0, "",    "normal", 1, "" },
@@ -3578,7 +3375,7 @@ revert_file_externals(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
   {
     nodes_row_t rows[] = {
       { 0, "",    "normal", 1, "" },
@@ -3598,14 +3395,14 @@ copy_file_externals(const svn_test_opts_
   svn_test__sandbox_t b;
 
   SVN_ERR(svn_test__sandbox_create(&b, "copy_file_externals", opts, pool));
-  file_write(&b, "f", "this is f\n");
-  SVN_ERR(wc_add(&b, "f"));
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", "A"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", "A/B"));
-  SVN_ERR(wc_update(&b, "", 1));
+  sbox_file_write(&b, "f", "this is f\n");
+  SVN_ERR(sbox_wc_add(&b, "f"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f g", "A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f g", "A/B"));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
   {
     nodes_row_t rows[] = {
       { 0, "",      "normal", 1, "" },
@@ -3619,7 +3416,7 @@ copy_file_externals(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
   {
     nodes_row_t rows[] = {
       { 0, "",      "normal", 1, "" },
@@ -3635,7 +3432,7 @@ copy_file_externals(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
   {
     nodes_row_t rows[] = {
       { 0, "",      "normal", 1, "" },
@@ -3653,7 +3450,7 @@ copy_file_externals(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_delete(&b, "X"));
+  SVN_ERR(sbox_wc_delete(&b, "X"));
   {
     nodes_row_t rows[] = {
       { 0, "",      "normal", 1, "" },
@@ -3667,7 +3464,7 @@ copy_file_externals(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
   {
     nodes_row_t rows[] = {
       { 0, "",      "normal", 1, "" },
@@ -3710,8 +3507,8 @@ copy_wc_wc_server_excluded(const svn_tes
   SVN_ERR(svn_test__sandbox_create(&b, "copy_wc_wc_server_excluded", opts, pool));
   SVN_ERR(insert_dirs(&b, before));
   SVN_ERR(check_db_rows(&b, "", before));
-  SVN_ERR(disk_mkdir(&b, "A"));
-  err = wc_copy(&b, "A", "X");
+  SVN_ERR(sbox_disk_mkdir(&b, "A"));
+  err = sbox_wc_copy(&b, "A", "X");
   SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS);
   svn_error_clear(err);
   SVN_ERR(check_db_rows(&b, "", after));
@@ -3727,17 +3524,17 @@ incomplete_switch(const svn_test_opts_t 
 
   SVN_ERR(svn_test__sandbox_create(&b, "incomplete_switch", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C/D"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_copy(&b, "A", "X"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_copy(&b, "A", "X/A"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_delete(&b, "X/A"));
-  SVN_ERR(wc_commit(&b, ""));
+  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/C/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_copy(&b, "A", "X/A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "X/A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
   {
     /* Interrupted switch from A@1 to X@3 */
@@ -3762,7 +3559,7 @@ incomplete_switch(const svn_test_opts_t 
 
     SVN_ERR(insert_dirs(&b, before));
     SVN_ERR(check_db_rows(&b, "", before));
-    SVN_ERR(wc_update(&b, "", 4));
+    SVN_ERR(sbox_wc_update(&b, "", 4));
     SVN_ERR(check_db_rows(&b, "", after_update));
   }
 
@@ -3776,11 +3573,11 @@ nested_moves_child_first(const svn_test_
 
   SVN_ERR(svn_test__sandbox_create(&b, "nested_moves_child_first", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  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_update(&b, "", 1));
 
   {
     nodes_row_t nodes[] = {
@@ -3792,7 +3589,7 @@ nested_moves_child_first(const svn_test_
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A/B/C", "A/B/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "A/B/C2"));
   {
     nodes_row_t nodes[] = {
       {0, "",       "normal",       1, ""},
@@ -3805,7 +3602,7 @@ nested_moves_child_first(const svn_test_
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B2"));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3822,7 +3619,7 @@ nested_moves_child_first(const svn_test_
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3847,8 +3644,8 @@ nested_moves_child_first(const svn_test_
   }
 
   /* Revert should leave the A to A2 move */
-  SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
-  SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B2", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B", svn_depth_infinity));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3876,11 +3673,11 @@ nested_moves_child_last(const svn_test_o
 
   SVN_ERR(svn_test__sandbox_create(&b, "nested_moves_child_last", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  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_update(&b, "", 1));
 
   {
     nodes_row_t nodes[] = {
@@ -3892,7 +3689,7 @@ nested_moves_child_last(const svn_test_o
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3909,7 +3706,7 @@ nested_moves_child_last(const svn_test_o
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B", "A2/B2"));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3930,7 +3727,7 @@ nested_moves_child_last(const svn_test_o
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B2/C", "A2/B2/C2"));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3955,8 +3752,8 @@ nested_moves_child_last(const svn_test_o
   }
 
   /* Revert should leave the A to A2 move */
-  SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
-  SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B2", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B", svn_depth_infinity));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -3984,11 +3781,11 @@ move_in_copy(const svn_test_opts_t *opts
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_in_copy", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-  SVN_ERR(wc_copy(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_copy(&b, "A", "A2"));
 
   {
     nodes_row_t nodes[] = {
@@ -4001,7 +3798,7 @@ move_in_copy(const svn_test_opts_t *opts
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B", "A2/B2"));
   {
     nodes_row_t nodes[] = {
       {0, "",      "normal",       1, ""},
@@ -4026,14 +3823,14 @@ move_in_replace(const svn_test_opts_t *o
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_in_replace", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "X"));
-  SVN_ERR(wc_mkdir(&b, "X/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-  SVN_ERR(wc_delete(&b, "A"));
-  SVN_ERR(wc_copy(&b, "X", "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_copy(&b, "X", "A"));
 
   {
     nodes_row_t nodes[] = {
@@ -4048,7 +3845,7 @@ move_in_replace(const svn_test_opts_t *o
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B2"));
   {
     nodes_row_t nodes[] = {
       {0, "",     "normal",       1, ""},
@@ -4075,11 +3872,11 @@ copy_a_move(const svn_test_opts_t *opts,
 
   SVN_ERR(svn_test__sandbox_create(&b, "copy_a_move", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  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_update(&b, "", 1));
 
   {
     nodes_row_t nodes[] = {
@@ -4091,7 +3888,7 @@ copy_a_move(const svn_test_opts_t *opts,
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A/B/C", "A/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "A/C2"));
   {
     nodes_row_t nodes[] = {
       {0, "",      "normal",       1, ""},
@@ -4107,7 +3904,7 @@ copy_a_move(const svn_test_opts_t *opts,
   /* Copying a move doesn't copy any moved-to/here artifacts, which
      means that moving inside a copy is not the same as copying
      something that contains a move?  Is this behaviour correct? */
-  SVN_ERR(wc_copy(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_copy(&b, "A", "A2"));
   {
     nodes_row_t nodes[] = {
       {0, "",       "normal",       1, ""},
@@ -4136,15 +3933,15 @@ move_to_swap(const svn_test_opts_t *opts
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_to_swap", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "X"));
-  SVN_ERR(wc_mkdir(&b, "X/Y"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/Y"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
 
-  SVN_ERR(wc_move(&b, "A/B", "X/B"));
-  SVN_ERR(wc_move(&b, "X/Y", "A/Y"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "X/B"));
+  SVN_ERR(sbox_wc_move(&b, "X/Y", "A/Y"));
 
   {
     nodes_row_t nodes[] = {
@@ -4162,7 +3959,7 @@ move_to_swap(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
 
   {
     nodes_row_t nodes[] = {
@@ -4184,7 +3981,7 @@ move_to_swap(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "X", "A"));
+  SVN_ERR(sbox_wc_move(&b, "X", "A"));
 
   {
     nodes_row_t nodes[] = {
@@ -4209,7 +4006,7 @@ move_to_swap(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A2", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A2", "X"));
 
   {
     nodes_row_t nodes[] = {
@@ -4234,11 +4031,11 @@ move_to_swap(const svn_test_opts_t *opts
   }
 
   /* Revert and try in different order */
-  SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
 
-  SVN_ERR(wc_move(&b, "A", "A2"));
-  SVN_ERR(wc_move(&b, "X", "A"));
-  SVN_ERR(wc_move(&b, "A2", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "X", "A"));
+  SVN_ERR(sbox_wc_move(&b, "A2", "X"));
 
   {
     nodes_row_t nodes[] = {
@@ -4258,8 +4055,8 @@ move_to_swap(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A/Y", "X/Y"));
-  SVN_ERR(wc_move(&b, "X/B", "A/B"));
+  SVN_ERR(sbox_wc_move(&b, "A/Y", "X/Y"));
+  SVN_ERR(sbox_wc_move(&b, "X/B", "A/B"));
 
   {
     nodes_row_t nodes[] = {
@@ -4342,42 +4139,42 @@ revert_nested_move(const svn_test_opts_t
 
   SVN_ERR(svn_test__sandbox_create(&b, "revert_nested_move", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  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_update(&b, "", 1));
 
-  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
   SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
 
-  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B", "A2/B2"));
   SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
 
-  SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B2/C", "A2/B2/C2"));
   SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
 
-  SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
-  SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B2", svn_depth_infinity));
   SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
 
-  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
-  SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B", "A2/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B2/C", "A2/B2/C2"));
   SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
 
-  SVN_ERR(wc_revert(&b, "A2/B2/C", svn_depth_infinity));
-  SVN_ERR(wc_revert(&b, "A2/B2/C2", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B2/C", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B2/C2", svn_depth_infinity));
   SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
 
-  SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
-  SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B", svn_depth_infinity));
+  SVN_ERR(sbox_wc_revert(&b, "A2/B2", svn_depth_infinity));
   SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
 
   /* Check moves in reverse order */
-  SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
-  SVN_ERR(wc_move(&b, "A/B/C", "A/B/C2"));
-  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
-  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "A/B/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
   SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
 
   return SVN_NO_ERROR;
@@ -4390,16 +4187,16 @@ move_on_move(const svn_test_opts_t *opts
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_on_move", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "X"));
-  SVN_ERR(wc_mkdir(&b, "X/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-
-  SVN_ERR(wc_move(&b, "A/B", "B2"));
-  SVN_ERR(wc_delete(&b, "A"));
-  SVN_ERR(wc_copy(&b, "X", "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_copy(&b, "X", "A"));
 
   {
     nodes_row_t nodes[] = {
@@ -4416,7 +4213,7 @@ move_on_move(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A/B", "B3"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B3"));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
@@ -4444,16 +4241,16 @@ move_on_move2(const svn_test_opts_t *opt
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_on_move2", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "X"));
-  SVN_ERR(wc_mkdir(&b, "X/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-
-  SVN_ERR(wc_move(&b, "A", "A2"));
-  SVN_ERR(wc_delete(&b, "A"));
-  SVN_ERR(wc_copy(&b, "X", "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/B"));
+  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_delete(&b, "A"));
+  SVN_ERR(sbox_wc_copy(&b, "X", "A"));
 
   {
     nodes_row_t nodes[] = {
@@ -4471,7 +4268,7 @@ move_on_move2(const svn_test_opts_t *opt
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A/B", "B3"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B3"));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
@@ -4500,14 +4297,14 @@ move_added(const svn_test_opts_t *opts, 
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_added", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_move(&b, "A", "A2"));
-  SVN_ERR(wc_mkdir(&b, "A2/B/C2"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2/B/C2"));
 
   /* Both A2/B/C and A2/B/C2 are simple adds inside the move.  It
      doesn't seem right for A2/B/C to be marked moved_here. */
@@ -4530,6 +4327,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)
 {
@@ -4537,77 +4336,109 @@ move_update(const svn_test_opts_t *opts,
 
   SVN_ERR(svn_test__sandbox_create(&b, "move_update", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  file_write(&b, "A/B/f", "r1 content\n");
-  SVN_ERR(wc_add(&b, "A/B/f"));
-  SVN_ERR(wc_commit(&b, ""));
-  file_write(&b, "A/B/f", "r1 content\nr2 content\n");
-  SVN_ERR(wc_commit(&b, ""));
-  file_write(&b, "A/B/g", "r3 content\n");
-  SVN_ERR(wc_add(&b, "A/B/g"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  /* 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 */
-  SVN_ERR(wc_move(&b, "A", "A2"));
+  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"},
+      {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));
   }
 
   /* Update causes a tree-conflict on A due to incoming text-change. */
-  SVN_ERR(wc_update(&b, "", 2));
+  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"},
+      {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(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));
   }
 
   /* Update causes a tree-conflict on due to incoming add. */
-  SVN_ERR(wc_update(&b, "", 3));
+  SVN_ERR(sbox_wc_update(&b, "", 3));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       3, ""},
@@ -4622,13 +4453,13 @@ 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));
   }
 
-  /* Are we going to handle this case? */
-  SVN_ERR(wc_resolve(&b, "A"));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       3, ""},
@@ -4649,6 +4480,150 @@ move_update(const svn_test_opts_t *opts,
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
+  SVN_ERR(sbox_wc_delete(&b, "A2/B"));
+  {
+    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},
+      {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;
 }
 
@@ -4685,20 +4660,20 @@ test_scan_delete(const svn_test_opts_t *
 
   SVN_ERR(svn_test__sandbox_create(&b, "scan_delete", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_mkdir(&b, "A2"));
-  SVN_ERR(wc_mkdir(&b, "A2/B"));
-  SVN_ERR(wc_mkdir(&b, "C2"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
-
-  SVN_ERR(wc_move(&b, "A2", "X"));
-  SVN_ERR(wc_move(&b, "X/B", "Z"));
-  SVN_ERR(wc_move(&b, "A/B", "X/B"));
-  SVN_ERR(wc_move(&b, "X/B/C", "Y"));
-  SVN_ERR(wc_move(&b, "C2", "X/B/C"));
+  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, "A2"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "C2"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A2", "X"));
+  SVN_ERR(sbox_wc_move(&b, "X/B", "Z"));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "X/B"));
+  SVN_ERR(sbox_wc_move(&b, "X/B/C", "Y"));
+  SVN_ERR(sbox_wc_move(&b, "C2", "X/B/C"));
 
   {
     nodes_row_t nodes[] = {
@@ -4728,44 +4703,44 @@ test_scan_delete(const svn_test_opts_t *
 
   SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
                                    NULL, &moved_to_op_root_abspath,
-                                   b.wc_ctx->db, wc_path(&b, "C2"),
+                                   b.wc_ctx->db, sbox_wc_path(&b, "C2"),
                                    pool, pool));
-  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B/C"));
-  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B/C"));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, sbox_wc_path(&b, "X/B/C"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, sbox_wc_path(&b, "X/B/C"));
 
   SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
                                    NULL, &moved_to_op_root_abspath,
-                                   b.wc_ctx->db, wc_path(&b, "A/B"),
+                                   b.wc_ctx->db, sbox_wc_path(&b, "A/B"),
                                    pool, pool));
-  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B"));
-  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B"));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, sbox_wc_path(&b, "X/B"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, sbox_wc_path(&b, "X/B"));
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A/B/C"), pool, pool));
+                                     sbox_wc_path(&b, "A/B/C"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 2, "X/B/C"));
   SVN_ERR(check_moved_to(moved_tos, 1, 3, "Y"));
   SVN_TEST_ASSERT(moved_tos->nelts == 2);
 
   SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
                                    NULL, &moved_to_op_root_abspath,
-                                   b.wc_ctx->db, wc_path(&b, "A/B/C"),
+                                   b.wc_ctx->db, sbox_wc_path(&b, "A/B/C"),
                                    pool, pool));
-  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B/C"));
-  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B"));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, sbox_wc_path(&b, "X/B/C"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, sbox_wc_path(&b, "X/B"));
 
   SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
                                    NULL, &moved_to_op_root_abspath,
-                                   b.wc_ctx->db, wc_path(&b, "A2"),
+                                   b.wc_ctx->db, sbox_wc_path(&b, "A2"),
                                    pool, pool));
-  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X"));
-  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X"));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, sbox_wc_path(&b, "X"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, sbox_wc_path(&b, "X"));
 
   SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
                                    NULL, &moved_to_op_root_abspath,
-                                   b.wc_ctx->db, wc_path(&b, "A2/B"),
+                                   b.wc_ctx->db, sbox_wc_path(&b, "A2/B"),
                                    pool, pool));
-  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B"));
-  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X"));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, sbox_wc_path(&b, "X/B"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, sbox_wc_path(&b, "X"));
 
   return SVN_NO_ERROR;
 }
@@ -4778,23 +4753,23 @@ test_follow_moved_to(const svn_test_opts
 
   SVN_ERR(svn_test__sandbox_create(&b, "follow_moved_to", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A1"));
-  SVN_ERR(wc_mkdir(&b, "A1/B"));
-  SVN_ERR(wc_mkdir(&b, "A1/B/C"));
-  SVN_ERR(wc_mkdir(&b, "A1/B/C/D"));
-  SVN_ERR(wc_mkdir(&b, "A1/B/C/D/E"));
-  SVN_ERR(wc_mkdir(&b, "A2"));
-  SVN_ERR(wc_mkdir(&b, "A2/B"));
-  SVN_ERR(wc_mkdir(&b, "A2/B/C"));
-  SVN_ERR(wc_mkdir(&b, "A2/B/C/D"));
-  SVN_ERR(wc_mkdir(&b, "A2/B/C/D/E"));
-  SVN_ERR(wc_mkdir(&b, "A3"));
-  SVN_ERR(wc_mkdir(&b, "A3/B"));
-  SVN_ERR(wc_mkdir(&b, "A3/B/C"));
-  SVN_ERR(wc_mkdir(&b, "A3/B/C/D"));
-  SVN_ERR(wc_mkdir(&b, "A3/B/C/D/E"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_mkdir(&b, "A1"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A1/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A1/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A1/B/C/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A1/B/C/D/E"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2/B/C/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A2/B/C/D/E"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A3"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A3/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A3/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A3/B/C/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A3/B/C/D/E"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
 
   {
     nodes_row_t nodes[] = {
@@ -4819,22 +4794,22 @@ test_follow_moved_to(const svn_test_opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A1", "X"));
-  SVN_ERR(wc_move(&b, "A2", "A1"));
-  SVN_ERR(wc_move(&b, "A3", "A2"));
-  SVN_ERR(wc_move(&b, "X", "A3"));
-  SVN_ERR(wc_move(&b, "A1/B", "X"));
-  SVN_ERR(wc_move(&b, "A2/B", "A1/B"));
-  SVN_ERR(wc_move(&b, "A3/B", "A2/B"));
-  SVN_ERR(wc_move(&b, "X", "A3/B"));
-  SVN_ERR(wc_move(&b, "A1/B/C/D", "X"));
-  SVN_ERR(wc_move(&b, "A2/B/C/D", "A1/B/C/D"));
-  SVN_ERR(wc_move(&b, "A3/B/C/D", "A2/B/C/D"));
-  SVN_ERR(wc_move(&b, "X", "A3/B/C/D"));
-  SVN_ERR(wc_move(&b, "A1/B/C/D/E", "X"));
-  SVN_ERR(wc_move(&b, "A2/B/C/D/E", "A1/B/C/D/E"));
-  SVN_ERR(wc_move(&b, "A3/B/C/D/E", "A2/B/C/D/E"));
-  SVN_ERR(wc_move(&b, "X", "A3/B/C/D/E"));
+  SVN_ERR(sbox_wc_move(&b, "A1", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A2", "A1"));
+  SVN_ERR(sbox_wc_move(&b, "A3", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "X", "A3"));
+  SVN_ERR(sbox_wc_move(&b, "A1/B", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B", "A1/B"));
+  SVN_ERR(sbox_wc_move(&b, "A3/B", "A2/B"));
+  SVN_ERR(sbox_wc_move(&b, "X", "A3/B"));
+  SVN_ERR(sbox_wc_move(&b, "A1/B/C/D", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B/C/D", "A1/B/C/D"));
+  SVN_ERR(sbox_wc_move(&b, "A3/B/C/D", "A2/B/C/D"));
+  SVN_ERR(sbox_wc_move(&b, "X", "A3/B/C/D"));
+  SVN_ERR(sbox_wc_move(&b, "A1/B/C/D/E", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B/C/D/E", "A1/B/C/D/E"));
+  SVN_ERR(sbox_wc_move(&b, "A3/B/C/D/E", "A2/B/C/D/E"));
+  SVN_ERR(sbox_wc_move(&b, "X", "A3/B/C/D/E"));
 
   {
     nodes_row_t nodes[] = {
@@ -4907,40 +4882,40 @@ test_follow_moved_to(const svn_test_opts
 
   /* A1->A3, A3/B->A2/B, A2/B/C/D->A1/B/C/D, A1/B/C/D/E->A3/B/C/D/E */
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A1"), pool, pool));
+                                     sbox_wc_path(&b, "A1"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "A3"));
   SVN_TEST_ASSERT(moved_tos->nelts == 1);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A1/B"), pool, pool));
+                                     sbox_wc_path(&b, "A1/B"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "A3/B"));
   SVN_ERR(check_moved_to(moved_tos, 1, 2, "A2/B"));
   SVN_TEST_ASSERT(moved_tos->nelts == 2);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A1/B/C"), pool, pool));
+                                     sbox_wc_path(&b, "A1/B/C"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "A3/B/C"));
   SVN_ERR(check_moved_to(moved_tos, 1, 2, "A2/B/C"));
   SVN_TEST_ASSERT(moved_tos->nelts == 2);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A1/B/C/D"), pool, pool));
+                                     sbox_wc_path(&b, "A1/B/C/D"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "A3/B/C/D"));
   SVN_ERR(check_moved_to(moved_tos, 1, 2, "A2/B/C/D"));
   SVN_ERR(check_moved_to(moved_tos, 2, 4, "A1/B/C/D"));
   SVN_TEST_ASSERT(moved_tos->nelts == 3);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A1/B/C/D/E"), pool, pool));
+                                     sbox_wc_path(&b, "A1/B/C/D/E"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "A3/B/C/D/E"));
   SVN_ERR(check_moved_to(moved_tos, 1, 2, "A2/B/C/D/E"));
   SVN_ERR(check_moved_to(moved_tos, 2, 4, "A1/B/C/D/E"));
   SVN_ERR(check_moved_to(moved_tos, 3, 5, "A3/B/C/D/E"));
   SVN_TEST_ASSERT(moved_tos->nelts == 4);
 
-  SVN_ERR(wc_delete(&b, "A3/B/C/D/E"));
+  SVN_ERR(sbox_wc_delete(&b, "A3/B/C/D/E"));
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A1/B/C/D/E"), pool, pool));
+                                     sbox_wc_path(&b, "A1/B/C/D/E"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "A3/B/C/D/E"));
   SVN_ERR(check_moved_to(moved_tos, 1, 2, "A2/B/C/D/E"));
   SVN_ERR(check_moved_to(moved_tos, 2, 4, "A1/B/C/D/E"));
@@ -4957,12 +4932,12 @@ mixed_rev_move(const svn_test_opts_t *op
 
   SVN_ERR(svn_test__sandbox_create(&b, "mixed_rev_move", opts, pool));
 
-  SVN_ERR(wc_mkdir(&b, "A"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B"));
-  SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
-  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
 
   {
     nodes_row_t nodes[] = {
@@ -4975,7 +4950,7 @@ mixed_rev_move(const svn_test_opts_t *op
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  SVN_ERR(wc_move(&b, "A", "X"));
+  SVN_ERR(sbox_wc_move(&b, "A", "X"));
 
   {
     nodes_row_t nodes[] = {
@@ -4998,23 +4973,23 @@ mixed_rev_move(const svn_test_opts_t *op
 
   /* ### These values PASS but I'm not sure they are correct. */
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A/B/C"), pool, pool));
+                                     sbox_wc_path(&b, "A/B/C"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B/C"));
   SVN_TEST_ASSERT(moved_tos->nelts == 1);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A/B"), pool, pool));
+                                     sbox_wc_path(&b, "A/B"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "X/B"));
   SVN_TEST_ASSERT(moved_tos->nelts == 1);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A"), pool, pool));
+                                     sbox_wc_path(&b, "A"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "X"));
   SVN_TEST_ASSERT(moved_tos->nelts == 1);
 
 
   /* This move doesn't record moved-to */
-  SVN_ERR(wc_move(&b, "X/B", "X/Y"));
+  SVN_ERR(sbox_wc_move(&b, "X/B", "X/Y"));
 
   {
     nodes_row_t nodes[] = {
@@ -5036,21 +5011,221 @@ mixed_rev_move(const svn_test_opts_t *op
   }
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A/B/C"), pool, pool));
+                                     sbox_wc_path(&b, "A/B/C"), pool, pool));
   SVN_TEST_ASSERT(moved_tos->nelts == 0);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A/B"), pool, pool));
+                                     sbox_wc_path(&b, "A/B"), pool, pool));
   SVN_TEST_ASSERT(moved_tos->nelts == 0);
 
   SVN_ERR(svn_wc__db_follow_moved_to(&moved_tos, b.wc_ctx->db,
-                                     wc_path(&b, "A"), pool, pool));
+                                     sbox_wc_path(&b, "A"), pool, pool));
   SVN_ERR(check_moved_to(moved_tos, 0, 1, "X"));
   SVN_TEST_ASSERT(moved_tos->nelts == 1);
 
   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;
+

[... 216 lines stripped ...]