subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prabh...@apache.org
Subject svn commit: r1457684 [21/22] - in /subversion/branches/verify-keep-going: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subv...
Date Mon, 18 Mar 2013 09:35:29 GMT
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/op-depth-test.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/op-depth-test.c Mon Mar 18 09:35:24 2013
@@ -168,12 +168,12 @@ print_row(const nodes_row_t *row,
     props = "";
 
   if (row->repo_revnum == SVN_INVALID_REVNUM)
-    return apr_psprintf(result_pool, "%d, %s, %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, props);
   else
-    return apr_psprintf(result_pool, "%d, %s, %s, %s ^/%s@%d%s%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,
@@ -4073,6 +4073,48 @@ move_to_swap(const svn_test_opts_t *opts
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
+  /* And move this last bit back and check if the db state is restored */
+  SVN_ERR(sbox_wc_move(&b, "A/B", "X/B"));
+  SVN_ERR(sbox_wc_move(&b, "X/Y", "A/Y"));
+
+  {
+    /* Exact the same as before the initial moves */
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "X",   "normal",       1, "X"},
+      {0, "X/Y", "normal",       1, "X/Y"},
+      {1, "A",   "normal",       1, "X",   FALSE, "X", TRUE},
+      {1, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {1, "A/B", "base-deleted", NO_COPY_FROM},
+      {1, "X",   "normal",       1, "A",   FALSE, "A", TRUE},
+      {1, "X/B", "normal",       1, "A/B", MOVED_HERE},
+      {1, "X/Y", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And try to undo the rest */
+  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[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "X",   "normal",       1, "X"},
+      {0, "X/Y", "normal",       1, "X/Y"},
+
+      {0}
+    };
+
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
   return SVN_NO_ERROR;
 }
 
@@ -4995,6 +5037,12 @@ mixed_rev_move(const svn_test_opts_t *op
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
+  /* We don't allow mixed-rev move in 1.8 and the command line client
+     will return an error, but for compatibility with 1.7 move has an
+     allow_mixed_revisions=TRUE flag which is being used here so the
+     move transforms automatically into copy+delete.  This test was
+     written before that transforming was implemented so still expects
+     some move information. */
   SVN_ERR(sbox_wc_move(&b, "A", "X"));
 
   {
@@ -5338,10 +5386,9 @@ nested_move_commit(const svn_test_opts_t
   {
     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));
+    SVN_ERR(svn_wc__db_scan_moved(&moved_from, NULL, NULL, NULL,
+                                  b.wc_ctx->db, sbox_wc_path(&b, "C2"),
+                                  pool, pool));
 
     expected_from = sbox_wc_path(&b, "A/B/C");
 
@@ -5383,8 +5430,19 @@ nested_move_commit(const svn_test_opts_t
                                      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" */);
+    /* A/B/C is part of the A->A2 move. */
+    expected_to = sbox_wc_path(&b, "A2");
+    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);
+
+    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));
 
+    /* A2/B/C is the A2/B/C->C2 move. */
+    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",
@@ -5393,14 +5451,12 @@ nested_move_commit(const svn_test_opts_t
   {
     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" */);
+    SVN_ERR(svn_wc__db_scan_moved(&moved_from, NULL, NULL, NULL,
+                                  b.wc_ctx->db, sbox_wc_path(&b, "C2"),
+                                  pool, pool));
 
+    /* C2 is the A2/B/C->C2 move. */
+    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",
@@ -5453,10 +5509,9 @@ nested_move_commit(const svn_test_opts_t
   {
     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));
+    SVN_ERR(svn_wc__db_scan_moved(&moved_from, NULL, NULL, NULL,
+                                  b.wc_ctx->db, sbox_wc_path(&b, "C2"),
+                                  pool, pool));
 
     expected_from = sbox_wc_path(&b, "A2/B/C");
 
@@ -5598,7 +5653,7 @@ move_update_conflicts(const svn_test_opt
   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_switch(&b, "", "/X", svn_depth_infinity));
   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"));
@@ -5864,7 +5919,7 @@ move_in_delete(const svn_test_opts_t *op
 
   SVN_ERR(sbox_wc_update(&b, "", 2));
   SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
-                          svn_wc_conflict_choose_merged));
+                          svn_wc_conflict_choose_mine_conflict));
   SVN_ERR(sbox_wc_resolve(&b, "A/B/C", svn_depth_empty,
                           svn_wc_conflict_choose_mine_conflict));
   {
@@ -5946,7 +6001,7 @@ switch_move(const svn_test_opts_t *opts,
   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_switch(&b, "", "/A", svn_depth_infinity));
   SVN_ERR(sbox_wc_update(&b, "", 2));
 
   SVN_ERR(sbox_wc_move(&b, "B/C", "C2"));
@@ -5974,7 +6029,7 @@ switch_move(const svn_test_opts_t *opts,
 
   /* Switch "bumps" revisions and paths and raises conflicts just like
      update. */
-  SVN_ERR(sbox_wc_switch(&b, "/X"));
+  SVN_ERR(sbox_wc_switch(&b, "", "/X", svn_depth_infinity));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       3, "X"},
@@ -6190,7 +6245,7 @@ layered_moved_to(const svn_test_opts_t *
   SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
                           svn_wc_conflict_choose_mine_conflict));
   SVN_ERR(sbox_wc_resolve(&b, "X/B/C", svn_depth_empty,
-                          svn_wc_conflict_choose_merged));
+                          svn_wc_conflict_choose_mine_conflict));
   SVN_ERR(sbox_wc_resolve(&b, "X/B/C/D/E", svn_depth_empty,
                           svn_wc_conflict_choose_mine_conflict));
   {
@@ -6347,7 +6402,7 @@ layered_moved_to(const svn_test_opts_t *
   SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
                           svn_wc_conflict_choose_mine_conflict));
   SVN_ERR(sbox_wc_resolve(&b, "X/B/C", svn_depth_empty,
-                          svn_wc_conflict_choose_merged));
+                          svn_wc_conflict_choose_mine_conflict));
 
   /* Cannot resolve C */
   err = sbox_wc_resolve(&b, "C", svn_depth_empty,
@@ -6531,6 +6586,1341 @@ commit_moved_away_descendant(const svn_t
   /*return SVN_NO_ERROR;*/
 }
 
+static svn_error_t *
+finite_move_update_bump(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  svn_error_t *err;
+  SVN_ERR(svn_test__sandbox_create(&b, "finite_move_update_bump",
+                                   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, "P"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+  sbox_file_write(&b, "P/Q/f", "r1 content\n");
+  SVN_ERR(sbox_wc_add(&b, "P/Q/f"));
+  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", "B2"));
+  SVN_ERR(sbox_wc_update(&b, "A/B/C", 2));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
+  err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       2, "A/B/C"},
+      {0, "P",       "normal",       1, "P"},
+      {0, "P/Q",     "normal",       1, "P/Q"},
+      {0, "P/Q/f",   "normal",       1, "P/Q/f"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM, "B2"},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "B2",      "normal",       1, "A/B", MOVED_HERE},
+      {1, "B2/C",    "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+  SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_files, FALSE));
+  SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_files, FALSE));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
+  err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       2, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {0, "P",       "normal",       1, "P"},
+      {0, "P/Q",     "normal",       2, "P/Q"},
+      {0, "P/Q/f",   "normal",       2, "P/Q/f"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM, "B2"},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {2, "P/Q",     "base-deleted", NO_COPY_FROM, "Q2"},
+      {2, "P/Q/f",   "base-deleted", NO_COPY_FROM},
+      {1, "B2",      "normal",       1, "A/B", MOVED_HERE},
+      {1, "B2/C",    "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "Q2",      "normal",       2, "P/Q", MOVED_HERE},
+      {1, "Q2/f",    "normal",       2, "P/Q/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+  SVN_ERR(sbox_wc_move(&b, "P", "P2"));
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_immediates, FALSE));
+  SVN_ERR(sbox_wc_update_depth(&b, "P", 2, svn_depth_immediates, FALSE));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "P", NULL, NULL));
+  err = sbox_wc_resolve(&b, "P", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       2, "A/B"},
+      {0, "A/B/C",   "normal",       2, "A/B/C"},
+      {0, "P",       "normal",       2, "P"},
+      {0, "P/Q",     "normal",       2, "P/Q"},
+      {0, "P/Q/f",   "normal",       1, "P/Q/f"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM, "B2"},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "P",       "base-deleted", NO_COPY_FROM, "P2"},
+      {1, "P/Q",     "base-deleted", NO_COPY_FROM},
+      {1, "P/Q/f",   "base-deleted", NO_COPY_FROM},
+      {1, "B2",      "normal",       2, "A/B", MOVED_HERE},
+      {1, "B2/C",    "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "P2",      "normal",       1, "P", MOVED_HERE},
+      {1, "P2/Q",    "normal",       1, "P/Q", MOVED_HERE},
+      {1, "P2/Q/f",  "normal",       1, "P/Q/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+  SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B/C", 2, svn_depth_empty, FALSE));
+  SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_empty, FALSE));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", NULL, NULL));
+  err = sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       2, "A/B/C"},
+      {0, "P",       "normal",       1, "P"},
+      {0, "P/Q",     "normal",       2, "P/Q"},
+      {0, "P/Q/f",   "normal",       1, "P/Q/f"},
+      {3, "A/B/C",   "base-deleted", NO_COPY_FROM, "C2"},
+      {2, "P/Q",     "base-deleted", NO_COPY_FROM, "Q2"},
+      {2, "P/Q/f",   "base-deleted", NO_COPY_FROM},
+      {1, "C2",      "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {1, "Q2/f",    "normal",       1, "P/Q/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_away_delete_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  SVN_ERR(svn_test__sandbox_create(&b, "move_away_delete_update",
+                                   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, "P"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_delete(&b, "P/Q"));
+  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_move(&b, "P/Q", "Q2"));
+
+  /* Update to r2 removes the move sources and clears moved_here from
+     the move destinations. */
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",   "normal", 2, ""},
+      {0, "A",  "normal", 2, "A"},
+      {0, "P",  "normal", 2, "P"},
+      {1, "C2", "normal", 1, "A/B/C"},
+      {1, "Q2", "normal", 1, "P/Q"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_not_present_variants(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  SVN_ERR(svn_test__sandbox_create(&b, "move_not_present_variants",
+                                   opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "B/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "C/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "D/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_delete(&b, "B/B"));
+  SVN_ERR(sbox_wc_update(&b, "C/B", 0));
+  SVN_ERR(sbox_wc_exclude(&b, "D/B"));
+
+  SVN_ERR(sbox_wc_copy(&b, "A", "cA"));
+  SVN_ERR(sbox_wc_copy(&b, "B", "cB"));
+  SVN_ERR(sbox_wc_copy(&b, "C", "cC"));
+  SVN_ERR(sbox_wc_copy(&b, "D", "cD"));
+
+  SVN_ERR(sbox_wc_copy(&b, "cA", "ccA"));
+  SVN_ERR(sbox_wc_copy(&b, "cB", "ccB"));
+  SVN_ERR(sbox_wc_copy(&b, "cC", "ccC"));
+  SVN_ERR(sbox_wc_copy(&b, "cD", "ccD"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",           "normal",       1, ""},
+
+      /* Copy of a deleted + committed node */
+      {0, "A",          "normal",       1, "A"},
+      {0, "A/B",        "not-present",  2, "A/B"},
+
+      {1, "cA",         "normal",       1, "A"},
+      {1, "cA/B",       "not-present",  2, "A/B"},
+
+      {1, "ccA",        "normal",       1, "A"},
+      {1, "ccA/B",      "not-present",  2, "A/B"},
+
+      /* Copy of a local deleted node */
+      {0, "B",          "normal",       1, "B"},
+      {0, "B/B",        "normal",       1, "B/B"},
+      {2, "B/B",        "base-deleted", NO_COPY_FROM},
+
+      {1, "cB",         "normal",       1, "B",},
+      {1, "cB/B",       "normal",       1, "B/B"},
+      {2, "cB/B",       "base-deleted", NO_COPY_FROM},
+
+      {1, "ccB",        "normal",       1, "B"},
+      {1, "ccB/B",      "normal",       1, "B/B"},
+      {2, "ccB/B",      "base-deleted", NO_COPY_FROM},
+
+      /* Copy of a to r0 updated node */
+      {0, "C",          "normal",       1, "C"},
+      {0, "C/B",        "not-present",  0, "C/B"},
+
+      {1, "cC",         "normal",       1, "C"},
+      {1, "cC/B",       "not-present",  0, "C/B"},
+
+      {1, "ccC",        "normal",       1, "C"},
+      {1, "ccC/B",      "not-present",  0, "C/B"},
+
+      /* Copy of an excluded node */
+      {0, "D",          "normal",       1, "D"},
+      {0, "D/B",        "excluded",     1, "D/B"},
+
+      {1, "cD",         "normal",       1, "D"},
+      {1, "cD/B",       "excluded",     1, "D/B"},
+
+      {1, "ccD",        "normal",       1, "D"},
+      {1, "ccD/B",      "excluded",     1, "D/B"},
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(sbox_wc_delete(&b, "B/B"));
+
+  /* And now do the same thing with moves */
+
+  SVN_ERR(sbox_wc_move(&b, "A", "mA"));
+  SVN_ERR(sbox_wc_move(&b, "B", "mB"));
+  SVN_ERR(sbox_wc_move(&b, "C", "mC"));
+  SVN_ERR(sbox_wc_move(&b, "D", "mD"));
+
+  SVN_ERR(sbox_wc_move(&b, "mA", "mmA"));
+  SVN_ERR(sbox_wc_move(&b, "mB", "mmB"));
+  SVN_ERR(sbox_wc_move(&b, "mC", "mmC"));
+  SVN_ERR(sbox_wc_move(&b, "mD", "mmD"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",           "normal",       1, ""},
+
+      /* Move of a deleted + committed node */
+      {0, "A",          "normal",       1, "A"},
+      {0, "A/B",        "not-present",  2, "A/B"},
+      {1, "A",          "base-deleted", NO_COPY_FROM, "mmA"},
+
+      {1, "mmA",        "normal",       1, "A", MOVED_HERE},
+      {1, "mmA/B",      "not-present",  2, "A/B", MOVED_HERE},
+
+
+      /* Move of a local deleted node */
+      {0, "B",          "normal",       1, "B"},
+      {0, "B/B",        "normal",       1, "B/B"},
+      {1, "B",          "base-deleted", NO_COPY_FROM, "mmB"},
+      {1, "B/B",        "base-deleted", NO_COPY_FROM},
+
+      {1, "mmB",        "normal",       1, "B", MOVED_HERE},
+      {1, "mmB/B",      "normal",       1, "B/B", MOVED_HERE},
+      {2, "mmB/B",      "base-deleted", NO_COPY_FROM},
+
+      /* Move of a to r0 updated node */
+      {0, "C",          "normal",       1, "C"},
+      {0, "C/B",        "not-present",  0, "C/B"},
+      {1, "C",          "base-deleted", NO_COPY_FROM, "mmC"},
+
+      {1, "mmC",        "normal",       1, "C", MOVED_HERE},
+      {1, "mmC/B",      "not-present",  0, "C/B", MOVED_HERE},
+
+      /* Move of an excluded node */
+      {0, "D",          "normal",       1, "D",},
+      {0, "D/B",        "excluded",     1, "D/B", },
+      {1, "D",          "base-deleted", NO_COPY_FROM, "mmD"},
+
+      {1, "mmD",        "normal",       1, "D", MOVED_HERE},
+      {1, "mmD/B",      "excluded",     1, "D/B", MOVED_HERE},
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And move everything back */
+  SVN_ERR(sbox_wc_move(&b, "mmA", "A"));
+  SVN_ERR(sbox_wc_move(&b, "mmB", "B"));
+  SVN_ERR(sbox_wc_move(&b, "mmC", "C"));
+  SVN_ERR(sbox_wc_move(&b, "mmD", "D"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",           "normal",       1, ""},
+
+      /* deleted + committed node */
+      {0, "A",          "normal",       1, "A"},
+      {0, "A/B",        "not-present",  2, "A/B"},
+
+      /* local deleted node */
+      {0, "B",          "normal",       1, "B"},
+      {0, "B/B",        "normal",       1, "B/B"},
+      {2, "B/B",        "base-deleted", NO_COPY_FROM},
+
+      /* To r0 updated node */
+      {0, "C",          "normal",       1, "C"},
+      {0, "C/B",        "not-present",  0, "C/B"},
+
+      /* Move of an excluded node */
+      {0, "D",          "normal",       1, "D",},
+      {0, "D/B",        "excluded",     1, "D/B", },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+update_child_under_add(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  svn_error_t *err;
+  nodes_row_t nodes[] = {
+    {0, "",        "normal",      1, ""},
+    {0, "A",       "normal",      1, "A"},
+    {0, "A/B",     "not-present", 0, "A/B"},
+    {2, "A/B",     "normal",      NO_COPY_FROM},
+    {3, "A/B/C",   "normal",      NO_COPY_FROM},
+    {4, "A/B/C/D", "normal",      NO_COPY_FROM},
+    {0}
+  };
+
+  SVN_ERR(svn_test__sandbox_create(&b, "update_child_under_add",
+                                   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/C/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_update(&b, "A/B", 0));
+  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(check_db_rows(&b, "", nodes));
+
+  /* A/B/C/D is skipped as it has no base node parent */
+  SVN_ERR(sbox_wc_update(&b, "A/B/C/D", 1));
+  SVN_ERR(check_db_rows(&b, "", nodes));
+
+  /* A/B/C should be skipped as it has a not-present base node parent */
+  err = sbox_wc_update(&b, "A/B/C", 1);
+  svn_error_clear(err); /* Allow any error and always check NODES. */
+  SVN_ERR(check_db_rows(&b, "", nodes));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+delete_over_moved_away(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "delete_over_moved_away",
+                                   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_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B"));
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",         1, ""},
+
+      {0, "A",      "normal",         1, "A"},
+      {1, "A",      "base-deleted",   NO_COPY_FROM},
+      {0, "A/B",    "normal",         1, "A/B"},
+      {1, "A/B",    "base-deleted",   NO_COPY_FROM, "B"},
+      {0, "A/B/C",  "normal",         1, "A/B/C"},
+      {1, "A/B/C",  "base-deleted",   NO_COPY_FROM},
+
+      {1, "B",      "normal",         1, "A/B", MOVED_HERE},
+      {1, "B/C",    "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Now replace A with a similar tree */
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",         1, ""},
+
+      {0, "A",      "normal",         1, "A"},
+      {1, "A",      "normal",         NO_COPY_FROM},
+      {0, "A/B",    "normal",         1, "A/B"},
+      {1, "A/B",    "base-deleted",   NO_COPY_FROM, "B"},
+      {2, "A/B",    "normal",         NO_COPY_FROM},
+      {0, "A/B/C",  "normal",         1, "A/B/C"},
+      {1, "A/B/C",  "base-deleted",   NO_COPY_FROM},
+      {3, "A/B/C",  "normal",         NO_COPY_FROM},
+
+      {1, "B",      "normal",         1, "A/B", MOVED_HERE},
+      {1, "B/C",    "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And delete the new A */
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",         1, ""},
+
+      {0, "A",      "normal",         1, "A"},
+      {1, "A",      "base-deleted",   NO_COPY_FROM},
+      {0, "A/B",    "normal",         1, "A/B"},
+      /* And here the moved-to information is lost */
+      {1, "A/B",    "base-deleted",   NO_COPY_FROM, "B"},
+      {0, "A/B/C",  "normal",         1, "A/B/C"},
+      {1, "A/B/C",  "base-deleted",   NO_COPY_FROM},
+
+      /* But the moved-here is still there */
+      {1, "B",      "normal",         1, "A/B", MOVED_HERE},
+      {1, "B/C",    "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+movedto_opdepth(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "moved_to_op_depth",
+                                   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_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "C"));
+
+  {
+    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"},
+      {3, "A/B/C",  "base-deleted",   NO_COPY_FROM, "C"},
+
+      {1, "C",      "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And now the moved_to information has to switch op-depths */
+  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, "C"},
+
+      {1, "C",      "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And again */
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  {
+    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"},
+
+      {1, "A",      "base-deleted",   NO_COPY_FROM},
+      {1, "A/B",    "base-deleted",   NO_COPY_FROM},
+      {1, "A/B/C",  "base-deleted",   NO_COPY_FROM, "C"},
+
+      {1, "C",      "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And now stay at the depth of A */
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&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"},
+
+      {1, "A",      "normal",         NO_COPY_FROM},
+      {1, "A/B",    "base-deleted",   NO_COPY_FROM},
+      {1, "A/B/C",  "base-deleted",   NO_COPY_FROM, "C"},
+
+      {2, "A/B",    "normal",         NO_COPY_FROM},
+
+      {1, "C",      "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And see if it can jump back to B again? */
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  SVN_ERR(sbox_wc_revert(&b, "A", svn_depth_empty));
+
+  {
+    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, "C"},
+
+      {1, "C",      "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* And can we bump it back to C itself? */
+  SVN_ERR(sbox_wc_revert(&b, "A", svn_depth_immediates));
+  {
+    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"},
+
+      {3, "A/B/C",  "base-deleted",   NO_COPY_FROM, "C"},
+
+      {1, "C",      "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+new_basemove(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "new_basemove",
+                                   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_update(&b, "", 1));
+
+  /* We keep track of moved children of copies */
+  SVN_ERR(sbox_wc_copy(&b, "A", "Copy"));
+  SVN_ERR(sbox_wc_move(&b, "Copy/B/C", "C"));
+
+  {
+    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"},
+
+      {1, "Copy",     "normal",         1, "A"},
+      {1, "Copy/B",   "normal",         1, "A/B"},
+      {1, "Copy/B/C", "normal",         1, "A/B/C"},
+
+      {3, "Copy/B/C", "base-deleted",   NO_COPY_FROM, "C"},
+
+      /* C is a copy of A/B/C */
+      {1, "C",        "normal",         1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  {
+    apr_array_header_t *targets = apr_array_make(pool, 1, sizeof(char *));
+    APR_ARRAY_PUSH(targets, const char*) = sbox_wc_path(&b, "Copy");
+
+    SVN_ERR(sbox_wc_commit_ex(&b, targets, svn_depth_empty));
+  }
+
+  {
+    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, "Copy",     "normal",         2, "Copy"},
+      {0, "Copy/B",   "normal",         2, "Copy/B"},
+      {0, "Copy/B/C", "normal",         2, "Copy/B/C"},
+
+      {3, "Copy/B/C", "base-deleted",   NO_COPY_FROM, "C"},
+
+      /* And this node is now a copy of Copy/B/C at r2 */
+      {1, "C",        "normal",         2, "Copy/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_back(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_back", opts, pool));
+
+  /* X just so we don't always test with local_relpath == repos_path */
+  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/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/E"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_switch(&b, "", "/X", svn_depth_infinity));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B2"));
+  {
+    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/D",  "normal",       1, "X/A/B/D"},
+      {0, "E",      "normal",       1, "X/E"},
+      {2, "A/B",    "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",   "normal",       1, "X/A/B", MOVED_HERE},
+      {2, "A/B2/C", "normal",       1, "X/A/B/C", MOVED_HERE},
+      {2, "A/B2/D", "normal",       1, "X/A/B/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(sbox_wc_move(&b, "A/B2", "A/B"));
+  {
+    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/D",  "normal",       1, "X/A/B/D"},
+      {0, "E",      "normal",       1, "X/E"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B2/C", "A/B2/C2"));
+  SVN_ERR(sbox_wc_move(&b, "A/B2/D", "D2"));
+  SVN_ERR(sbox_wc_move(&b, "E", "A/B2/E2"));
+  {
+    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/D",   "normal",       1, "X/A/B/D"},
+      {0, "E",       "normal",       1, "X/E"},
+      {1, "D2",      "normal",       1, "X/A/B/D", MOVED_HERE},
+      {1, "E",       "base-deleted", NO_COPY_FROM, "A/B2/E2"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B/D",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",    "normal",       1, "X/A/B", MOVED_HERE},
+      {2, "A/B2/C",  "normal",       1, "X/A/B/C", MOVED_HERE},
+      {2, "A/B2/D",  "normal",       1, "X/A/B/D", MOVED_HERE},
+      {3, "A/B2/C",  "base-deleted", NO_COPY_FROM, "A/B2/C2"},
+      {3, "A/B2/D",  "base-deleted", NO_COPY_FROM, "D2"},
+      {3, "A/B2/C2", "normal",       1, "X/A/B/C", MOVED_HERE},
+      {3, "A/B2/E2", "normal",       1, "X/E", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(sbox_wc_move(&b, "A/B2", "A/B"));
+  {
+    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/D",  "normal",       1, "X/A/B/D"},
+      {0, "E",      "normal",       1, "X/E"},
+      {1, "D2",     "normal",       1, "X/A/B/D", MOVED_HERE},
+      {1, "E",      "base-deleted", NO_COPY_FROM, "A/B/E2"},
+      {3, "A/B/C",  "base-deleted", NO_COPY_FROM, "A/B/C2"},
+      {3, "A/B/D",  "base-deleted", NO_COPY_FROM, "D2"},
+      {3, "A/B/C2", "normal",       1, "X/A/B/C", MOVED_HERE},
+      {3, "A/B/E2", "normal",       1, "X/E", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_update_subtree(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  svn_error_t *err;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_update_subtree", 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, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 3));
+  SVN_ERR(sbox_wc_copy(&b, "A", "P"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  /* Subtree update is like an interrupted update, it leaves a
+     mixed-revision move source. */
+  SVN_ERR(sbox_wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(sbox_wc_update(&b, "A/B/C", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "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, "A/B2"},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",    "normal",       1, "A/B", MOVED_HERE},
+      {2, "A/B2/C",  "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Resolve fails because of the mixed-revision. */
+  err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+  /* Update to single-revision to allow resolve; this requires update
+     while the tree-conflict on A/B is present. */
+  SVN_ERR(sbox_wc_update(&b, "A/B", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "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, "A/B2"},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D", "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",    "normal",       1, "A/B", MOVED_HERE},
+      {2, "A/B2/C",  "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Now resolve is possible. */
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "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, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       2, "A/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       2, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Subtree update that only bumps. */
+  SVN_ERR(sbox_wc_update(&b, "A/B/C", 3));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/C",    "normal",       3, "A/B/C"},
+      {0, "A/B/C/D",  "normal",       3, "A/B/C/D"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       2, "A/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       2, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Resolve fails because of the mixed-revision. */
+  err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+  /* Update allowed while tree-conflict is present. */
+  SVN_ERR(sbox_wc_update(&b, "A/B", 3));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       3, "A/B"},
+      {0, "A/B/C",    "normal",       3, "A/B/C"},
+      {0, "A/B/C/D",  "normal",       3, "A/B/C/D"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       2, "A/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       2, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Now resolve works. */
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       3, "A/B"},
+      {0, "A/B/C",    "normal",       3, "A/B/C"},
+      {0, "A/B/C/D",  "normal",       3, "A/B/C/D"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       3, "A/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       3, "A/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       3, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Partial switch of source. */
+  SVN_ERR(sbox_wc_switch(&b, "A", "/P", svn_depth_immediates));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       4, "P"},
+      {0, "A/B",      "normal",       4, "P/B"},
+      {0, "A/B/C",    "normal",       3, "A/B/C"},
+      {0, "A/B/C/D",  "normal",       3, "A/B/C/D"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       3, "A/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       3, "A/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       3, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Resolve fails because of the subtree-switch. */
+  err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                        svn_wc_conflict_choose_mine_conflict);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+  /* Switch works while tree-conflict is present. */
+  SVN_ERR(sbox_wc_switch(&b, "A", "/P", svn_depth_infinity));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       4, "P"},
+      {0, "A/B",      "normal",       4, "P/B"},
+      {0, "A/B/C",    "normal",       4, "P/B/C"},
+      {0, "A/B/C/D",  "normal",       4, "P/B/C/D"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       3, "A/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       3, "A/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       3, "A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Now resolve works. */
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       4, "P"},
+      {0, "A/B",      "normal",       4, "P/B"},
+      {0, "A/B/C",    "normal",       4, "P/B/C"},
+      {0, "A/B/C/D",  "normal",       4, "P/B/C/D"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "A/B2"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",     "normal",       4, "P/B", MOVED_HERE},
+      {2, "A/B2/C",   "normal",       4, "P/B/C", MOVED_HERE},
+      {2, "A/B2/C/D", "normal",       4, "P/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_parent_into_child(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_parent_into_child", opts, pool));
+  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_move(&b, "A/B", "B2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "B2/A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",       1, ""},
+      {0, "A",      "normal",       1, "A"},
+      {0, "A/B",    "normal",       1, "A/B"},
+      {1, "A",      "base-deleted", NO_COPY_FROM, "B2/A"},
+      {1, "A/B",    "base-deleted", NO_COPY_FROM},
+      {1, "B2",     "normal",       1, "A/B", MOVED_HERE},
+      {2, "B2/A",   "normal",       1, "A", MOVED_HERE},
+      {2, "B2/A/B", "normal",       1, "A/B", MOVED_HERE},
+      {3, "B2/A/B", "base-deleted", NO_COPY_FROM, "B2"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_move(&b, "B2", "A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       1, ""},
+      {0, "A",     "normal",       1, "A"},
+      {0, "A/B",   "normal",       1, "A/B"},
+      {1, "A",     "normal",       1, "A/B", FALSE, "A/A", TRUE},
+      {1, "A/B",   "base-deleted", NO_COPY_FROM},
+      {2, "A/A",   "normal",       1, "A", MOVED_HERE},
+      {2, "A/A/B", "normal",       1, "A/B", MOVED_HERE},
+      {3, "A/A/B", "base-deleted", NO_COPY_FROM, "A"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_move(&b, "A/A", "A/B"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       1, ""},
+      {0, "A",     "normal",       1, "A"},
+      {0, "A/B",   "normal",       1, "A/B"},
+      {1, "A",     "normal",       1, "A/B", FALSE, "A/B", TRUE},
+      {1, "A/B",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B",   "normal",       1, "A", MOVED_HERE},
+      {2, "A/B/B", "normal",       1, "A/B", MOVED_HERE},
+      {3, "A/B/B", "base-deleted", NO_COPY_FROM, "A"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_depth_expand(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_depth_expand", 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/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 0));
+
+  SVN_ERR(sbox_wc_update_depth(&b, "", 1, svn_depth_immediates, TRUE));
+  SVN_ERR(sbox_wc_update_depth(&b, "A", 1, svn_depth_immediates, TRUE));
+  /* Make A/B not present */
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 0, svn_depth_immediates, TRUE));
+
+  SVN_ERR(sbox_wc_move(&b, "A", "C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "C/A/A")); /* Local addition obstruction */
+  SVN_ERR(sbox_wc_copy(&b, "C/A", "C/B")); /* Copied obstruction */
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",       1, "" },
+
+      {0, "A",      "normal",       1, "A" },
+      {1, "A",      "base-deleted", NO_COPY_FROM, "C" },
+      {0, "A/A",    "normal",       1, "A/A" },
+      {1, "A/A",    "base-deleted", NO_COPY_FROM },
+      {0, "A/B",    "not-present",  0, "A/B" },
+
+      {1, "C",      "normal",       1, "A", MOVED_HERE },
+
+      {1, "C/A",    "normal",       1, "A/A", MOVED_HERE },
+      {3, "C/A/A",  "normal",       NO_COPY_FROM },
+
+      {1, "C/B",    "not-present",  0, "A/B", MOVED_HERE},
+      {2, "C/B",    "normal",       1, "A/A" },
+      {3, "C/B/A",  "normal",       NO_COPY_FROM },
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update_depth(&b, "", 1, svn_depth_infinity, TRUE));
+
+  /* This used to cause a segfault. Then it asserted in a different place */
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  /* And now verify that there are no not-present nodes left and a
+     consistent working copy */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, "" },
+
+      {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/B",     "normal",       1, "A/B" },
+      {0, "A/B/A",   "normal",       1, "A/B/A" },
+      {0, "A/B/A/A", "normal",       1, "A/B/A/A" },
+
+      {1, "A",       "base-deleted", NO_COPY_FROM, "C" },
+      {1, "A/A",     "base-deleted", NO_COPY_FROM },
+      {1, "A/A/A",   "base-deleted", NO_COPY_FROM },
+      {1, "A/B",     "base-deleted", NO_COPY_FROM },
+      {1, "A/B/A",   "base-deleted", NO_COPY_FROM },
+      {1, "A/B/A/A", "base-deleted", NO_COPY_FROM },
+      {1, "A/A/A/A", "base-deleted", NO_COPY_FROM },
+
+
+      {1, "C",       "normal",       1, "A", MOVED_HERE },
+      {1, "C/A",     "normal",       1, "A/A", MOVED_HERE },
+      {1, "C/A/A",   "normal",       1, "A/A/A", MOVED_HERE },
+      {1, "C/A/A/A", "normal",       1, "A/A/A/A", MOVED_HERE },
+
+      {3, "C/A/A",   "normal",       NO_COPY_FROM },
+      {3, "C/A/A/A", "base-deleted", NO_COPY_FROM },
+
+      {1, "C/B",     "normal",       1, "A/B", MOVED_HERE },
+      {1, "C/B/A",   "normal",       1, "A/B/A", MOVED_HERE },
+      {1, "C/B/A/A", "normal",       1, "A/B/A/A", MOVED_HERE },
+
+      {2, "C/B",     "normal",       1, "A/A" },
+      {2, "C/B/A",   "base-deleted", NO_COPY_FROM },
+      {2, "C/B/A/A", "base-deleted", NO_COPY_FROM },
+
+      {3, "C/B/A",   "normal",       NO_COPY_FROM },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_retract(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_retract", 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/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/A/A/A"));
+  SVN_ERR(sbox_wc_delete(&b, "A/A/A/C"));
+  SVN_ERR(sbox_wc_delete(&b, "A/A/A/D"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/A/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B/A/D", "D"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_move(&b, "A/A", "A/B"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, "" },
+
+      {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/C", "normal",       1, "A/A/A/C" },
+      {0, "A/A/A/D", "normal",       1, "A/A/A/D" },
+
+      {2, "A/A",     "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A/A/A",   "base-deleted", NO_COPY_FROM },
+      {2, "A/A/A/A", "base-deleted", NO_COPY_FROM },
+      {2, "A/A/A/C", "base-deleted", NO_COPY_FROM },
+      {2, "A/A/A/D", "base-deleted", NO_COPY_FROM },
+
+      {0, "A/B",     "normal",       1, "A/B" },
+      {0, "A/B/A",   "normal",       1, "A/B/A" },
+      {0, "A/B/A/A", "normal",       1, "A/B/A/A" },
+      {0, "A/B/A/C", "normal",       1, "A/B/A/C" },
+      {0, "A/B/A/D", "normal",       1, "A/B/A/D" },
+
+      {2, "A/B",     "normal",       1, "A/A", MOVED_HERE },
+      {2, "A/B/A",   "normal",       1, "A/A/A", MOVED_HERE },
+      {2, "A/B/A/A", "normal",       1, "A/A/A/A", MOVED_HERE },
+      {2, "A/B/A/C", "normal",       1, "A/A/A/C", MOVED_HERE },
+      {2, "A/B/A/D", "normal",       1, "A/A/A/D", FALSE, "D", TRUE },
+
+      {1, "D",       "normal",       1, "A/B/A/D", MOVED_HERE },
+
+      {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, "A/A",     "normal",       2, "A/A" },
+      {0, "A/A/A",   "normal",       2, "A/A/A" },
+
+      {2, "A/A",     "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A/A/A",   "base-deleted", NO_COPY_FROM },
+
+      {0, "A/B",     "normal",       2, "A/B" },
+      {0, "A/B/A",   "normal",       2, "A/B/A" },
+      {0, "A/B/A/A", "normal",       2, "A/B/A/A" },
+      {0, "A/B/A/D", "normal",       2, "A/B/A/D" },
+
+      {2, "A/B",     "normal",       1, "A/A", MOVED_HERE },
+      {2, "A/B/A",   "normal",       1, "A/A/A", MOVED_HERE },
+      {2, "A/B/A/A", "normal",       1, "A/A/A/A", MOVED_HERE },
+      {2, "A/B/A/C", "normal",       1, "A/A/A/C", MOVED_HERE },
+      {2, "A/B/A/D", "normal",       1, "A/A/A/D", FALSE, "D", TRUE },
+
+      {1, "D",       "normal",       1, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+
+  SVN_ERR(sbox_wc_resolve(&b, "A/A", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       2, "" },
+
+      {0, "A",       "normal",       2, "A" },
+      {0, "A/A",     "normal",       2, "A/A" },
+      {0, "A/A/A",   "normal",       2, "A/A/A" },
+
+      {0, "A/B",     "normal",       2, "A/B" },
+      {0, "A/B/A",   "normal",       2, "A/B/A" },
+      {0, "A/B/A/A", "normal",       2, "A/B/A/A" },
+      {0, "A/B/A/D", "normal",       2, "A/B/A/D" },
+
+      {2, "A/A",     "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A/A/A",   "base-deleted", NO_COPY_FROM },
+
+      {2, "A/B",     "normal",       2, "A/A", MOVED_HERE },
+      {2, "A/B/A",   "normal",       2, "A/A/A", MOVED_HERE },
+      {2, "A/B/A/A", "base-deleted", NO_COPY_FROM }, /* ### MISSING! */
+      {2, "A/B/A/D", "base-deleted", NO_COPY_FROM, "D" }, /* ### MISSING! */
+
+      /* Still conflicted */
+      {1, "D",       "normal",       1, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* ### TODO: Resolve via which specific target? */
+  SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  {
+    nodes_row_t nodes[] = {
+
+      {1, "D",       "normal",       2, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "D", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
 
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
@@ -6626,14 +8016,15 @@ struct svn_test_descriptor_t test_funcs[
                        "scan_delete"),
     SVN_TEST_OPTS_PASS(test_follow_moved_to,
                        "follow_moved_to"),
-    SVN_TEST_OPTS_PASS(mixed_rev_move,
-                       "mixed_rev_move"),
+    SVN_TEST_OPTS_WIMP(mixed_rev_move,
+                       "mixed_rev_move",
+                       "needs different libsvn_wc entry point"),
     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_PASS(nested_move_commit,
-                       "nested_move_commit"),
+                       "nested_move_commit (issue 4291)"),
     SVN_TEST_OPTS_PASS(nested_move_update2,
                        "nested_move_update2"),
     SVN_TEST_OPTS_PASS(move_update_conflicts,
@@ -6652,9 +8043,33 @@ struct svn_test_descriptor_t test_funcs[
                        "layered_moved_to"),
     SVN_TEST_OPTS_PASS(update_within_move,
                        "update_within_move"),
-    SVN_TEST_OPTS_XFAIL(commit_moved_descendant,
-                        "commit_moved_descendant"),
+    SVN_TEST_OPTS_PASS(commit_moved_descendant,
+                       "commit_moved_descendant"),
     SVN_TEST_OPTS_XFAIL(commit_moved_away_descendant,
                         "commit_moved_away_descendant"),
+    SVN_TEST_OPTS_PASS(finite_move_update_bump,
+                       "finite_move_update_bump"),
+    SVN_TEST_OPTS_PASS(move_away_delete_update,
+                       "move_away_delete_update"),
+    SVN_TEST_OPTS_PASS(move_not_present_variants,
+                       "move_not_present_variants"),
+    SVN_TEST_OPTS_PASS(update_child_under_add,
+                       "update_child_under_add (issue 4111)"),
+    SVN_TEST_OPTS_PASS(delete_over_moved_away,
+                       "delete_over_moved_away"),
+    SVN_TEST_OPTS_PASS(movedto_opdepth,
+                       "moved_to op_depth"),
+    SVN_TEST_OPTS_PASS(new_basemove,
+                       "new_basemove"),
+    SVN_TEST_OPTS_PASS(move_back,
+                       "move_back (issue 4302)"),
+    SVN_TEST_OPTS_PASS(move_update_subtree,
+                       "move_update_subtree (issue 4232)"),
+    SVN_TEST_OPTS_PASS(move_parent_into_child,
+                       "move_parent_into_child (issue 4333)"),
+    SVN_TEST_OPTS_PASS(move_depth_expand,
+                       "move depth expansion"),
+    SVN_TEST_OPTS_PASS(move_retract,
+                       "move retract (issue 4336)"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.c Mon Mar 18 09:35:24 2013
@@ -314,7 +314,11 @@ sbox_wc_commit(svn_test__sandbox_t *b, c
 }
 
 svn_error_t *
-sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum)
+sbox_wc_update_depth(svn_test__sandbox_t *b,
+                     const char *path,
+                     svn_revnum_t revnum,
+                     svn_depth_t depth,
+                     svn_boolean_t sticky)
 {
   svn_client_ctx_t *ctx;
   apr_array_header_t *result_revs;
@@ -328,13 +332,23 @@ sbox_wc_update(svn_test__sandbox_t *b, c
   APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, path);
   SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
   ctx->wc_ctx = b->wc_ctx;
-  return svn_client_update4(&result_revs, paths, &revision, svn_depth_infinity,
-                            TRUE, FALSE, FALSE, FALSE, FALSE,
+  return svn_client_update4(&result_revs, paths, &revision, depth,
+                            sticky, FALSE, FALSE, FALSE, FALSE,
                             ctx, b->pool);
 }
 
 svn_error_t *
-sbox_wc_switch(svn_test__sandbox_t *b, const char *url)
+sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum)
+{
+  SVN_ERR(sbox_wc_update_depth(b, path, revnum, svn_depth_unknown, FALSE));
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+sbox_wc_switch(svn_test__sandbox_t *b,
+               const char *path,
+               const char *url,
+               svn_depth_t depth)
 {
   svn_client_ctx_t *ctx;
   svn_revnum_t result_rev;
@@ -343,8 +357,8 @@ sbox_wc_switch(svn_test__sandbox_t *b, c
   url = apr_pstrcat(b->pool, b->repos_url, url, (char*)NULL);
   SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
   ctx->wc_ctx = b->wc_ctx;
-  return svn_client_switch3(&result_rev, sbox_wc_path(b, ""), url,
-                            &head_rev, &head_rev, svn_depth_infinity,
+  return svn_client_switch3(&result_rev, sbox_wc_path(b, path), url,
+                            &head_rev, &head_rev, depth,
                             FALSE /* depth_is_sticky */,
                             TRUE /* ignore_externals */,
                             FALSE /* allow_unver_obstructions */,
@@ -363,17 +377,27 @@ svn_error_t *
 sbox_wc_resolve(svn_test__sandbox_t *b, const char *path, svn_depth_t depth,
                 svn_wc_conflict_choice_t conflict_choice)
 {
-  SVN_ERR(svn_wc__resolve_conflicts(b->wc_ctx, sbox_wc_path(b, path),
-                                    depth,
-                                    TRUE /* resolve_text */,
-                                    "" /* resolve_prop (ALL props) */,
-                                    TRUE /* resolve_tree */,
-                                    conflict_choice,
-                                    NULL, NULL, /* conflict func */
-                                    NULL, NULL, /* cancellation */
-                                    NULL, NULL, /* notification */
-                                    b->pool));
-  return SVN_NO_ERROR;
+  const char *lock_abspath;
+  svn_error_t *err;
+
+  SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, b->wc_ctx,
+                                                 sbox_wc_path(b, path),
+                                                 b->pool, b->pool));
+  err = svn_wc__resolve_conflicts(b->wc_ctx, sbox_wc_path(b, path),
+                                  depth,
+                                  TRUE /* resolve_text */,
+                                  "" /* resolve_prop (ALL props) */,
+                                  TRUE /* resolve_tree */,
+                                  conflict_choice,
+                                  NULL, NULL, /* conflict func */
+                                  NULL, NULL, /* cancellation */
+                                  NULL, NULL, /* notification */
+                                  b->pool);
+
+  err = svn_error_compose_create(err, svn_wc__release_write_lock(b->wc_ctx,
+                                                                 lock_abspath,
+                                                                 b->pool));
+  return err;
 }
 
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.h?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.h (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/utils.h Mon Mar 18 09:35:24 2013
@@ -131,7 +131,17 @@ svn_error_t *
 sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum);
 
 svn_error_t *
-sbox_wc_switch(svn_test__sandbox_t *b, const char *url);
+sbox_wc_update_depth(svn_test__sandbox_t *b,
+                     const char *path,
+                     svn_revnum_t revnum,
+                     svn_depth_t depth,
+                     svn_boolean_t sticky);
+
+svn_error_t *
+sbox_wc_switch(svn_test__sandbox_t *b,
+               const char *path,
+               const char *url,
+               svn_depth_t depth);
 
 /* */
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-queries-test.c Mon Mar 18 09:35:24 2013
@@ -82,8 +82,6 @@ static const int schema_statements[] =
 static const int slow_statements[] =
 {
   /* Operate on the entire WC */
-  STMT_HAS_SWITCHED_WCROOT,             /* wc scan op_depth 0 */
-  STMT_HAS_SWITCHED_WCROOT_REPOS_ROOT,  /* wc scan op_depth 0 */
   STMT_SELECT_ALL_NODES,                /* schema validation code */
 
   /* Is there a record? ### Can we somehow check for LIMIT 1? */

Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-test.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_wc/wc-test.c Mon Mar 18 09:35:24 2013
@@ -133,10 +133,12 @@ test_node_get_base(const svn_test_opts_t
         svn_revnum_t revision;
         const char *repos_relpath, *repos_root_url, *repos_uuid;
 
-        SVN_ERR(svn_wc__node_get_base(&revision, &repos_relpath,
+        SVN_ERR(svn_wc__node_get_base(NULL, &revision, &repos_relpath,
                                       &repos_root_url, &repos_uuid,
                                       NULL,
                                       b->wc_ctx, local_abspath,
+                                      TRUE /* ignore_enoent */,
+                                      FALSE /* show_hidden */,
                                       b->pool, b->pool));
         SVN_TEST_ASSERT(revision == subtest->base_rev);
         if (SVN_IS_VALID_REVNUM(subtest->base_rev))

Modified: subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c Mon Mar 18 09:35:24 2013
@@ -27,6 +27,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <setjmp.h>
+#ifdef WIN32
+#include <crtdbg.h>
+#endif
 
 #include <apr_pools.h>
 #include <apr_general.h>
@@ -395,6 +398,27 @@ main(int argc, const char *argv[])
         prog_name = argv[0];
     }
 
+#ifdef WIN32
+#if _MSC_VER >= 1400
+  /* ### This should work for VC++ 2002 (=1300) and later */
+  /* Show the abort message on STDERR instead of a dialog to allow
+     scripts (e.g. our testsuite) to continue after an abort without
+     user intervention. Allow overriding for easier debugging. */
+  if (!getenv("SVN_CMDLINE_USE_DIALOG_FOR_ABORT"))
+    {
+      /* In release mode: Redirect abort() errors to stderr */
+      _set_error_mode(_OUT_TO_STDERR);
+
+      /* In _DEBUG mode: Redirect all debug output (E.g. assert() to stderr.
+         (Ignored in releas builds) */
+      _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR);
+      _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+      _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+      _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+    }
+#endif /* _MSC_VER >= 1400 */
+#endif
+
   if (err)
     return svn_cmdline_handle_exit_error(err, pool, prog_name);
   while (1)

Modified: subversion/branches/verify-keep-going/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/client-side/bash_completion?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/client-side/bash_completion (original)
+++ subversion/branches/verify-keep-going/tools/client-side/bash_completion Mon Mar 18 09:35:24 2013
@@ -647,14 +647,6 @@ _svn()
 	    [[ ${COMPREPLY} ]] && return 0
 	fi
 
-	# force mandatory --accept option for 'resolve' command
-	if [[ $cmd = 'resolve' && ! $acceptOpt ]]
-	then
-	    COMPREPLY=( $( compgen -W '--accept' -- $cur ) )
-	    # force option now! others will be available on later completions
-	    return 0
-	fi
-
 	# maximum number of additional arguments expected in various forms
 	case $cmd in
 	    merge)
@@ -789,7 +781,7 @@ _svn()
 
 	# otherwise build possible options for the command
 	pOpts="--username --password --no-auth-cache --non-interactive \
-	       --trust-server-cert"
+	       --trust-server-cert --force-interactive"
 	mOpts="-m --message -F --file --encoding --force-log --with-revprop"
 	rOpts="-r --revision"
 	qOpts="-q --quiet"
@@ -826,7 +818,8 @@ _svn()
 		;;
 	commit|ci)
 		cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts \
-		         --no-unlock $cOpts --keep-changelists"
+		         --no-unlock $cOpts --keep-changelists \
+		         --include-externals"
 		;;
 	copy|cp)
 		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
@@ -840,7 +833,9 @@ _svn()
 		cmdOpts="$rOpts -x --extensions --diff-cmd --no-diff-deleted \
 		         $nOpts $pOpts --force --old --new --notice-ancestry \
 		         -c --change --summarize $cOpts --xml --git \
-		         --internal-diff --show-copies-as-adds"
+		         --internal-diff --show-copies-as-adds \
+		         --ignore-properties --properties-only --no-diff-added \
+		         --patch-compatible"
 		;;
 	export)
 		cmdOpts="$rOpts $qOpts $pOpts $nOpts --force --native-eol \
@@ -859,7 +854,7 @@ _svn()
 		;;
 	list|ls)
 		cmdOpts="$rOpts -v --verbose -R --recursive $pOpts \
-                         --incremental --xml --depth"
+                         --incremental --xml --depth --include-externals"
 		;;
 	lock)
 		cmdOpts="-m --message -F --file --encoding --force-log \
@@ -870,13 +865,13 @@ _svn()
 		         --incremental --xml $qOpts -l --limit -c --change \
                          $gOpts --with-all-revprops --with-revprop --depth \
 		         --diff --diff-cmd -x --extensions --internal-diff \
-		         --with-no-revprops"
+		         --with-no-revprops --search --search-and"
 		;;
 	merge)
 		cmdOpts="$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd \
 		         $pOpts --ignore-ancestry -c --change -x --extensions \
                          --record-only --accept --reintegrate \
-		         --allow-mixed-revisions"
+		         --allow-mixed-revisions -v --verbose"
 		;;
 	mergeinfo)
 	        cmdOpts="$rOpts $pOpts --depth --show-revs -R --recursive"
@@ -886,7 +881,7 @@ _svn()
 		;;
 	move|mv|rename|ren)
 		cmdOpts="$mOpts $rOpts $qOpts --force --editor-cmd $pOpts \
-                         --parents"
+                         --parents --allow-mixed-revisions"
 		;;
 	patch)
 		cmdOpts="$qOpts $pOpts --dry-run --ignore-whitespace \
@@ -903,13 +898,13 @@ _svn()
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		;;
 	propget|pget|pg)
-	        cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts $cOpts \
-                         --depth --xml"
+	        cmdOpts="-v --verbose -R --recursive $rOpts --strict \
+		         $pOpts $cOpts --depth --xml --show-inherited-props"
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
 	proplist|plist|pl)
 		cmdOpts="-v --verbose -R --recursive $rOpts --revprop $qOpts \
-		         $pOpts $cOpts --depth --xml"
+		         $pOpts $cOpts --depth --xml --show-inherited-props"
 		;;
 	propset|pset|ps)
 		cmdOpts="$qOpts --targets -R --recursive \
@@ -1035,9 +1030,9 @@ _svnadmin ()
 	cur=${COMP_WORDS[COMP_CWORD]}
 
 	# Possible expansions, without pure-prefix abbreviations such as "h".
-	cmds='crashtest create deltify dump help hotcopy list-dblogs \
-	      list-unused-dblogs load lslocks lstxns pack recover rmlocks \
-	      rmtxns setlog setrevprop setuuid upgrade verify --version'
+	cmds='crashtest create deltify dump freeze help hotcopy list-dblogs \
+	      list-unused-dblogs load lock lslocks lstxns pack recover rmlocks \
+	      rmtxns setlog setrevprop setuuid unlock upgrade verify --version'
 
 	if [[ $COMP_CWORD -eq 1 ]] ; then
 		COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
@@ -1046,7 +1041,8 @@ _svnadmin ()
 
 	# options that require a parameter
 	# note: continued lines must end '|' continuing lines must start '|'
-	optsParam="-r|--revision|--parent-dir|--fs-type"
+	optsParam="-r|--revision|--parent-dir|--fs-type|-M|--memory-cache-size"
+	optsParam="$optsParam|-F|--file"
 
 	# if not typing an option, or if the previous option required a
 	# parameter, then fallback on ordinary filename expansion
@@ -1061,13 +1057,18 @@ _svnadmin ()
 	case ${COMP_WORDS[1]} in
 	create)
 		cmdOpts="--bdb-txn-nosync --bdb-log-keep --config-dir \
-		         --fs-type --pre-1.4-compatible --pre-1.5-compatible"
+		         --fs-type --pre-1.4-compatible --pre-1.5-compatible \
+		         --pre-1.6-compatible --compatible-version"
 		;;
 	deltify)
 		cmdOpts="-r --revision -q --quiet"
 		;;
 	dump)
-		cmdOpts="-r --revision --incremental -q --quiet --deltas"
+		cmdOpts="-r --revision --incremental -q --quiet --deltas \
+		         -M --memory-cache-size"
+		;;
+	freeze)
+		cmdOpts="-F --file"
 		;;
 	help|h|\?)
 		cmdOpts="$cmds"
@@ -1077,7 +1078,11 @@ _svnadmin ()
 		;;
 	load)
 		cmdOpts="--ignore-uuid --force-uuid --parent-dir -q --quiet \
-		         --use-pre-commit-hook --use-post-commit-hook"
+		         --use-pre-commit-hook --use-post-commit-hook \
+		         --bypass-prop-validation -M --memory-cache-size"
+		;;
+	lock|unlock)
+		cmdOpts="--bypass-hooks"
 		;;
 	recover)
 		cmdOpts="--wait"
@@ -1121,6 +1126,10 @@ _svnadmin ()
 		--help)          cmdOpts=${cmdOpts/ -h / } ;;
 		-r)              cmdOpts=${cmdOpts/ --revision / } ;;
 		--revision)      cmdOpts=${cmdOpts/ -r / } ;;
+		-F)              cmdOpts=${cmdOpts/ --file / } ;;
+		--file)          cmdOpts=${cmdOpts/ -F / } ;;
+		-M)              cmdOpts=${cmdOpts/ --memory-cache-size / } ;;
+		--memory-cache-size) cmdOpts=${cmdOpts/ --M / } ;;
 		esac
 
 		# skip next option if this one requires a parameter

Modified: subversion/branches/verify-keep-going/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/dev/unix-build/Makefile.svn?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/verify-keep-going/tools/dev/unix-build/Makefile.svn Mon Mar 18 09:35:24 2013
@@ -71,7 +71,7 @@ GNU_ICONV_VER	= 1.14
 APR_UTIL_VER	= 1.4.1
 HTTPD_VER	= 2.2.22
 NEON_VER	= 0.29.6
-SERF_VER	= 1.1.0
+SERF_VER	= 1.2.0
 SERF_OLD_VER	= 0.3.1
 CYRUS_SASL_VER	= 2.1.25
 SQLITE_VER	= 3071201
@@ -1378,7 +1378,8 @@ HTTPD_START_CMD = $(HTTPD_CMD) -k start
 HTTPD_START_CMD_DEBUG = $(HTTPD_START_CMD) -X
 HTTPD_STOP_CMD = $(HTTPD_CMD) -k stop; sleep 3
 
-SVNSERVE_START_CMD = (ls $(PWD)/svnserve-*.pid | while read pidfile; do \
+SVNSERVE_START_CMD = (test -e $(PWD)/svnserve-*.pid && \
+			ls $(PWD)/svnserve-*.pid | while read pidfile; do \
 				kill `cat "$$pidfile"`; sleep 3; \
 				rm -f $$pidfile; \
 			done); \

Propchange: subversion/branches/verify-keep-going/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
  Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1445532-1457675

Modified: subversion/branches/verify-keep-going/tools/hook-scripts/mailer/mailer.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/hook-scripts/mailer/mailer.py?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/hook-scripts/mailer/mailer.py (original)
+++ subversion/branches/verify-keep-going/tools/hook-scripts/mailer/mailer.py Mon Mar 18 09:35:24 2013
@@ -99,7 +99,7 @@ def main(pool, cmd, config_fname, repos_
     revision = int(cmd_args[0])
     repos = Repository(repos_dir, revision, pool)
     cfg = Config(config_fname, repos,
-                 {'author': author,
+                 {'author': repos.author,
                   'repos_basename': os.path.basename(repos.repos_dir)
                  })
     messenger = Commit(pool, cfg, repos)
@@ -237,6 +237,7 @@ class MailedOutput(OutputBase):
       self.reply_to = self.reply_to[3:]
 
   def mail_headers(self, group, params):
+    from email import Utils
     subject = self.make_subject(group, params)
     try:
       subject.encode('ascii')
@@ -246,6 +247,8 @@ class MailedOutput(OutputBase):
     hdrs = 'From: %s\n'    \
            'To: %s\n'      \
            'Subject: %s\n' \
+           'Date: %s\n' \
+           'Message-ID: %s\n' \
            'MIME-Version: 1.0\n' \
            'Content-Type: text/plain; charset=UTF-8\n' \
            'Content-Transfer-Encoding: 8bit\n' \
@@ -253,8 +256,9 @@ class MailedOutput(OutputBase):
            'X-Svn-Commit-Author: %s\n' \
            'X-Svn-Commit-Revision: %d\n' \
            'X-Svn-Commit-Repository: %s\n' \
-           % (self.from_addr, ', '.join(self.to_addrs), subject,
-              group, self.repos.author or 'no_author', self.repos.rev,
+           % (self.from_addr, ', '.join(self.to_addrs), subject, 
+              Utils.formatdate(), Utils.make_msgid(), group,
+              self.repos.author or 'no_author', self.repos.rev,
               os.path.basename(self.repos.repos_dir))
     if self.reply_to:
       hdrs = '%sReply-To: %s\n' % (hdrs, self.reply_to)
@@ -352,7 +356,7 @@ class Commit(Messenger):
     editor = svn.repos.ChangeCollector(repos.fs_ptr, repos.root_this, \
                                        self.pool)
     e_ptr, e_baton = svn.delta.make_editor(editor, self.pool)
-    svn.repos.replay(repos.root_this, e_ptr, e_baton, self.pool)
+    svn.repos.replay2(repos.root_this, "", svn.core.SVN_INVALID_REVNUM, 1, e_ptr, e_baton, None, self.pool)
 
     self.changelist = sorted(editor.get_changes().items())
 

Modified: subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-init.sh
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-init.sh?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-init.sh (original)
+++ subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-init.sh Mon Mar 18 09:35:24 2013
@@ -52,7 +52,7 @@ svn commit -m "initial load"
 svn ps prop1 propval1 file1
 echo change C1 >> file2
 svn ps svn:keywords Id file2
-svn ps svn:new_svn_prop val file2
+svn ps --force svn:new_svn_prop val file2
 svn ps prop1 propval1 file2
 svn ps prop3 propval3 dir1
 echo change C2 >> dir2/file5
@@ -103,6 +103,7 @@ svn commit -m "copy dir, then make a cha
 # add a binary file and set property to binary value
 echo -e "\x00\x01\x02\x03\x04" > file11
 svn add file11
+svn ps svn:mime-type application/octect-stream file11
 svn ps prop2 -F file11 file9 
 svn commit -m "add binary file"
 

Modified: subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-t1.output
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-t1.output?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-t1.output (original)
+++ subversion/branches/verify-keep-going/tools/hook-scripts/mailer/tests/mailer-t1.output Mon Mar 18 09:35:24 2013
@@ -1,3 +1,30 @@
+Group: file
+Subject: r1 -  dir1 dir2
+
+Author: mailer test
+Date: Sun Sep  9 01:46:40 2001
+New Revision: 1
+
+Log:
+initial load
+
+Added:
+   file1
+   file2
+
+Added: file1
+==============================================================================
+--- /dev/null	00:00:00 1970	(empty, because file is newly added)
++++ file1	Sun Sep  9 01:46:40 2001	(r1)
+@@ -0,0 +1 @@
++file1
+
+Added: file2
+==============================================================================
+--- /dev/null	00:00:00 1970	(empty, because file is newly added)
++++ file2	Sun Sep  9 01:46:40 2001	(r1)
+@@ -0,0 +1 @@
++file2
 Group: file plus other areas
 Subject: r1 -  dir1 dir2
 
@@ -126,32 +153,26 @@ Added: file2
 @@ -0,0 +1 @@
 +file2
 Group: file
-Subject: r1 -  dir1 dir2
+Subject: r2 -  dir1 dir2
 
 Author: mailer test
-Date: Sun Sep  9 01:46:40 2001
-New Revision: 1
+Date: Sun Sep  9 04:33:20 2001
+New Revision: 2
 
 Log:
-initial load
-
-Added:
-   file1
-   file2
+two file changes.  Fixes Blah#123
 
-Added: file1
-==============================================================================
---- /dev/null	00:00:00 1970	(empty, because file is newly added)
-+++ file1	Sun Sep  9 01:46:40 2001	(r1)
-@@ -0,0 +1 @@
-+file1
+Modified:
+   file1   (props changed)
+   file2   (contents, props changed)
 
-Added: file2
+Modified: file2
 ==============================================================================
---- /dev/null	00:00:00 1970	(empty, because file is newly added)
-+++ file2	Sun Sep  9 01:46:40 2001	(r1)
-@@ -0,0 +1 @@
-+file2
+--- file2	Sun Sep  9 01:46:40 2001	(r1)
++++ file2	Sun Sep  9 04:33:20 2001	(r2)
+@@ -1 +1,2 @@
+ file2
++change C1
 Group: bugtracker
 Subject: Fix for Blah#123: r2 -  dir1 dir2
 
@@ -250,27 +271,6 @@ Modified: dir2/file5
 @@ -1 +1,2 @@
  file5
 +change C2
-Group: file
-Subject: r2 -  dir1 dir2
-
-Author: mailer test
-Date: Sun Sep  9 04:33:20 2001
-New Revision: 2
-
-Log:
-two file changes.  Fixes Blah#123
-
-Modified:
-   file1   (props changed)
-   file2   (contents, props changed)
-
-Modified: file2
-==============================================================================
---- file2	Sun Sep  9 01:46:40 2001	(r1)
-+++ file2	Sun Sep  9 04:33:20 2001	(r2)
-@@ -1 +1,2 @@
- file2
-+change C1
 Group: All
 Subject: r3 - dir2 dir3
 
@@ -314,7 +314,7 @@ Copied and modified: dir3/file8 (from r2
 @@ -1 +1,2 @@
  file1
 +change C3
-Group: file plus other areas
+Group: file
 Subject: r5 -  dir1 dir3
 
 Author: mailer test
@@ -326,12 +326,7 @@ changes and deletes of properties
 
 Modified:
    file2   (props changed)
-
-Changes in other areas also in this revision:
-Modified:
-   dir1/   (props changed)
-   dir3/   (props changed)
-Group: All
+Group: file plus other areas
 Subject: r5 -  dir1 dir3
 
 Author: mailer test
@@ -342,10 +337,13 @@ Log:
 changes and deletes of properties
 
 Modified:
+   file2   (props changed)
+
+Changes in other areas also in this revision:
+Modified:
    dir1/   (props changed)
    dir3/   (props changed)
-   file2   (props changed)
-Group: file
+Group: All
 Subject: r5 -  dir1 dir3
 
 Author: mailer test
@@ -356,6 +354,8 @@ Log:
 changes and deletes of properties
 
 Modified:
+   dir1/   (props changed)
+   dir3/   (props changed)
    file2   (props changed)
 Group: file
 Subject: r6 -  dir1 dir4
@@ -411,8 +411,8 @@ Modified: dir1/file3
 @@ -1 +1,2 @@
  file3
 +change C4
-Group: All
-Subject: r6 -  dir1 dir4
+Group: bugtracker
+Subject: Fix for Blaz#456: r6 -  dir1 dir4
 
 Author: mailer test
 Date: Sun Sep  9 15:40:00 2001
@@ -471,8 +471,8 @@ Added: file9
 +++ file9	Sun Sep  9 15:40:00 2001	(r6)
 @@ -0,0 +1 @@
 +file9
-Group: bugtracker
-Subject: Fix for Blaz#456: r6 -  dir1 dir4
+Group: All
+Subject: r6 -  dir1 dir4
 
 Author: mailer test
 Date: Sun Sep  9 15:40:00 2001
@@ -501,6 +501,26 @@ Added: file9
 +++ file9	Sun Sep  9 15:40:00 2001	(r6)
 @@ -0,0 +1 @@
 +file9
+Group: file
+Subject: r7 -  dir1 dir2 dir3 dir3/dir5
+
+Author: mailer test
+Date: Sun Sep  9 18:26:40 2001
+New Revision: 7
+
+Log:
+adds, deletes, and a change
+
+Deleted:
+   file2
+
+Deleted: file2
+==============================================================================
+--- file2	Sun Sep  9 18:26:40 2001	(r6)
++++ /dev/null	00:00:00 1970	(deleted)
+@@ -1,2 +0,0 @@
+-file2
+-change C1
 Group: file plus other areas
 Subject: r7 -  dir1 dir2 dir3 dir3/dir5
 
@@ -588,26 +608,6 @@ Deleted: file2
 @@ -1,2 +0,0 @@
 -file2
 -change C1
-Group: file
-Subject: r7 -  dir1 dir2 dir3 dir3/dir5
-
-Author: mailer test
-Date: Sun Sep  9 18:26:40 2001
-New Revision: 7
-
-Log:
-adds, deletes, and a change
-
-Deleted:
-   file2
-
-Deleted: file2
-==============================================================================
---- file2	Sun Sep  9 18:26:40 2001	(r6)
-+++ /dev/null	00:00:00 1970	(deleted)
-@@ -1,2 +0,0 @@
--file2
--change C1
 Group: All
 Subject: r8 - in dir6: . dir5
 
@@ -644,7 +644,7 @@ Modified: dir6/file4
 @@ -1 +1,2 @@
  file4
 +change C6
-Group: file plus other areas
+Group: file
 Subject: r9 - 
 
 Author: mailer test
@@ -662,7 +662,7 @@ Modified:
 Added: file11
 ==============================================================================
 Binary file. No diff available.
-Group: All
+Group: file plus other areas
 Subject: r9 - 
 
 Author: mailer test
@@ -680,7 +680,7 @@ Modified:
 Added: file11
 ==============================================================================
 Binary file. No diff available.
-Group: file
+Group: All
 Subject: r9 - 
 
 Author: mailer test
@@ -698,7 +698,7 @@ Modified:
 Added: file11
 ==============================================================================
 Binary file. No diff available.
-Group: file plus other areas
+Group: file
 Subject: r10 - 
 
 Author: mailer test
@@ -715,7 +715,7 @@ Modified:
 Modified: file11
 ==============================================================================
 Binary file (source and/or target). No diff available.
-Group: All
+Group: file plus other areas
 Subject: r10 - 
 
 Author: mailer test
@@ -732,7 +732,7 @@ Modified:
 Modified: file11
 ==============================================================================
 Binary file (source and/or target). No diff available.
-Group: file
+Group: All
 Subject: r10 - 
 
 Author: mailer test



Mime
View raw message