You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/07 15:59:43 UTC

svn commit: r993368 [3/4] - in /subversion/branches/javahl-ra: ./ notes/wc-ng/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_diff/ subversion/l...

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c Tue Sep  7 13:59:41 2010
@@ -202,9 +202,6 @@ static const svn_token_map_t kind_map[] 
   { "file", svn_wc__db_kind_file },
   { "dir", svn_wc__db_kind_dir },
   { "symlink", svn_wc__db_kind_symlink },
-#ifndef SVN_WC__SINGLE_DB
-  { "subdir", svn_wc__db_kind_subdir },
-#endif
   { "unknown", svn_wc__db_kind_unknown },
   { NULL }
 };
@@ -283,11 +280,11 @@ escape_sqlite_like(const char * const st
    to hold CHECKSUM's pristine file, relating to the pristine store
    configured for the working copy indicated by PDH. The returned path
    does not necessarily currently exist.
-#ifdef SVN_WC__SINGLE_DB
+
    Iff CREATE_SUBDIR is TRUE, then this function will make sure that the
    parent directory of PRISTINE_ABSPATH exists. This is only useful when
    about to create a new pristine.
-#endif
+
    Any other allocations are made in SCRATCH_POOL. */
 static svn_error_t *
 get_pristine_fname(const char **pristine_abspath,
@@ -299,9 +296,7 @@ get_pristine_fname(const char **pristine
 {
   const char *base_dir_abspath;
   const char *hexdigest = svn_checksum_to_cstring(sha1_checksum, scratch_pool);
-#ifdef SVN_WC__SINGLE_DB
   char subdir[3];
-#endif
 
   /* ### code is in transition. make sure we have the proper data.  */
   SVN_ERR_ASSERT(pristine_abspath != NULL);
@@ -321,7 +316,6 @@ get_pristine_fname(const char **pristine
   /* We should have a valid checksum and (thus) a valid digest. */
   SVN_ERR_ASSERT(hexdigest != NULL);
 
-#ifdef SVN_WC__SINGLE_DB
   /* Get the first two characters of the digest, for the subdir. */
   subdir[0] = hexdigest[0];
   subdir[1] = hexdigest[1];
@@ -341,14 +335,11 @@ get_pristine_fname(const char **pristine
          try to access the file within this (missing?) pristine subdir. */
       svn_error_clear(err);
     }
-#endif
 
   /* The file is located at DIR/.svn/pristine/XX/XXYYZZ... */
   *pristine_abspath = svn_dirent_join_many(result_pool,
                                            base_dir_abspath,
-#ifdef SVN_WC__SINGLE_DB
                                            subdir,
-#endif
                                            hexdigest,
                                            NULL);
   return SVN_NO_ERROR;
@@ -527,38 +518,13 @@ navigate_to_parent(svn_wc__db_pdh_t **pa
                    svn_boolean_t verify_parent_stub,
                    apr_pool_t *scratch_pool)
 {
-#ifndef SVN_WC__SINGLE_DB
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t got_row;
-#endif
-
   SVN_ERR(svn_wc__db_pdh_navigate_to_parent(parent_pdh,
                                             db,
                                             child_pdh,
                                             smode,
                                             scratch_pool));
 
-#ifdef SVN_WC__SINGLE_DB
   SVN_ERR_ASSERT(!verify_parent_stub);
-#else
-  if (!verify_parent_stub)
-    return SVN_NO_ERROR;
-
-  /* Check that the parent has an entry for the child */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, (*parent_pdh)->wcroot->sdb,
-                                    STMT_SELECT_SUBDIR));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", (*parent_pdh)->wcroot->wc_id,
-                            svn_dirent_basename(child_pdh->local_abspath,
-                                                NULL)));
-  SVN_ERR(svn_sqlite__step(&got_row, stmt));
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  if (!got_row)
-    return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
-                              _("'%s' does not have a parent."),
-                              svn_dirent_local_style(child_pdh->local_abspath,
-                                                     scratch_pool));
-#endif
 
   return SVN_NO_ERROR;
 }
@@ -623,7 +589,7 @@ insert_base_node(void *baton, svn_sqlite
 {
   const insert_base_baton_t *pibb = baton;
   svn_sqlite__stmt_t *stmt;
-#ifdef SVN_WC__NODE_DATA
+#ifdef SVN_WC__NODES
   svn_sqlite__stmt_t *stmt_node;
 #endif
   /* The directory at the WCROOT has a NULL parent_relpath. Otherwise,
@@ -635,6 +601,7 @@ insert_base_node(void *baton, svn_sqlite
   /* ### we can't handle this right now  */
   SVN_ERR_ASSERT(pibb->conflict == NULL);
 
+#ifndef SVN_WC__NODES_ONLY
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_INSERT_BASE_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "isisstti",
                             pibb->wc_id, pibb->local_relpath,
@@ -677,43 +644,36 @@ insert_base_node(void *baton, svn_sqlite
                                         scratch_pool));
 
   SVN_ERR(svn_sqlite__insert(NULL, stmt));
+#endif
 
-#ifdef SVN_WC__NODE_DATA
-  SVN_ERR(svn_sqlite__get_statement(&stmt_node, sdb, STMT_INSERT_NODE_DATA));
-  SVN_ERR(svn_sqlite__bindf(stmt_node, "isistt",
-                            pibb->wc_id, pibb->local_relpath,
+#ifdef SVN_WC__NODES
+  /* the 'r' binding below doesn't work yet...
+     no idea why; needs more investigation... */
+  SVN_ERR(svn_sqlite__get_statement(&stmt_node, sdb, STMT_INSERT_NODE));
+  { svn_revnum_t rev = pibb->changed_rev;
+  SVN_ERR(svn_sqlite__bindf(stmt_node, "isisnnn" /* No repos rev, id, path */
+                            "tstr"               /* 8 - 11 */
+                            "isnnnnns",          /* 12 - 19 */
+                            pibb->wc_id,         /* 1 */
+                            pibb->local_relpath, /* 2 */
                             (apr_int64_t)0, /* op_depth is 0 for base */
-                            parent_relpath,
-                            presence_map, pibb->status,
-                            kind_map, pibb->kind));
-
-  if (SVN_IS_VALID_REVNUM(pibb->changed_rev))
-    SVN_ERR(svn_sqlite__bind_int64(stmt_node, 7, pibb->changed_rev));
-  if (pibb->changed_date)
-    SVN_ERR(svn_sqlite__bind_int64(stmt_node, 8, pibb->changed_date));
-  if (pibb->changed_author)
-    SVN_ERR(svn_sqlite__bind_text(stmt_node, 9, pibb->changed_author));
-
-  if (pibb->kind == svn_wc__db_kind_dir)
-    {
-      SVN_ERR(svn_sqlite__bind_text(stmt_node, 10,
-                                    svn_depth_to_word(pibb->depth)));
-    }
-  else if (pibb->kind == svn_wc__db_kind_file)
-    {
-      SVN_ERR(svn_sqlite__bind_checksum(stmt_node, 11, pibb->checksum,
-                                        scratch_pool));
-    }
-  else if (pibb->kind == svn_wc__db_kind_symlink)
-    {
-      /* Note: incomplete nodes may have a NULL target.  */
-      if (pibb->target)
-        SVN_ERR(svn_sqlite__bind_text(stmt_node, 12, pibb->target));
-    }
+                            parent_relpath,      /* 4 */
+                            presence_map, pibb->status, /* 8 */
+                            (pibb->kind == svn_wc__db_kind_dir) ? /* 9 */
+                               svn_depth_to_word(pibb->depth) : NULL,
+                            kind_map, pibb->kind, /* 10 */
+                            rev,                  /* 11 */
+                            pibb->changed_date,   /* 12 */
+                            pibb->changed_author, /* 13 */
+                            (pibb->kind == svn_wc__db_kind_symlink) ?
+                                pibb->target : NULL)); /* 19 */
+  }
 
-  /* Don't bind original_repos_id, original_repos_path and original_revision */
+  if (pibb->kind == svn_wc__db_kind_file)
+    SVN_ERR(svn_sqlite__bind_checksum(stmt_node, 14, pibb->checksum,
+                                      scratch_pool));
 
-  SVN_ERR(svn_sqlite__bind_properties(stmt_node, 16, pibb->props,
+  SVN_ERR(svn_sqlite__bind_properties(stmt_node, 15, pibb->props,
                                       scratch_pool));
 
   SVN_ERR(svn_sqlite__insert(NULL, stmt_node));
@@ -723,17 +683,20 @@ insert_base_node(void *baton, svn_sqlite
     {
       int i;
 
+#ifndef SVN_WC__NODES_ONLY
       SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                         STMT_INSERT_BASE_NODE_INCOMPLETE));
-#ifdef SVN_WC__NODE_DATA
+#endif
+#ifdef SVN_WC__NODES
       SVN_ERR(svn_sqlite__get_statement(&stmt_node, sdb,
-                                        STMT_INSERT_NODE_DATA_INCOMPLETE));
+                                        STMT_INSERT_NODE));
 #endif
 
       for (i = pibb->children->nelts; i--; )
         {
           const char *name = APR_ARRAY_IDX(pibb->children, i, const char *);
 
+#ifndef SVN_WC__NODES_ONLY
           SVN_ERR(svn_sqlite__bindf(stmt, "issi",
                                     pibb->wc_id,
                                     svn_relpath_join(pibb->local_relpath,
@@ -742,15 +705,17 @@ insert_base_node(void *baton, svn_sqlite
                                     pibb->local_relpath,
                                     (apr_int64_t)pibb->revision));
           SVN_ERR(svn_sqlite__insert(NULL, stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__bindf(stmt_node, "isis",
+#endif
+#ifdef SVN_WC__NODES
+          SVN_ERR(svn_sqlite__bindf(stmt_node, "isisnnnsns",
                                     pibb->wc_id,
                                     svn_relpath_join(pibb->local_relpath,
                                                      name,
                                                      scratch_pool),
                                     (apr_int64_t)0 /* BASE */,
-                                    pibb->local_relpath));
+                                    pibb->local_relpath, /* parent_relpath */
+                                    "incomplete",
+                                    "unknown"));
           SVN_ERR(svn_sqlite__insert(NULL, stmt_node));
 #endif
         }
@@ -828,17 +793,21 @@ insert_incomplete_working_children(svn_s
                                    const apr_array_header_t *children,
                                    apr_pool_t *scratch_pool)
 {
+#ifndef SVN_WC__NODES_ONLY
   svn_sqlite__stmt_t *stmt;
-#ifdef SVN_WC__NODE_DATA
+#endif
+#ifdef SVN_WC__NODES
   svn_sqlite__stmt_t *stmt_node;
 #endif
   int i;
 
+#ifndef SVN_WC__NODES_ONLY
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                     STMT_INSERT_WORKING_NODE_INCOMPLETE));
-#ifdef SVN_WC__NODE_DATA
+#endif
+#ifdef SVN_WC__NODES
   SVN_ERR(svn_sqlite__get_statement(&stmt_node, sdb,
-                                    STMT_INSERT_NODE_DATA_INCOMPLETE));
+                                    STMT_INSERT_NODE));
 #endif
 
 
@@ -846,22 +815,25 @@ insert_incomplete_working_children(svn_s
     {
       const char *name = APR_ARRAY_IDX(children, i, const char *);
 
+#ifndef SVN_WC__NODES_ONLY
       SVN_ERR(svn_sqlite__bindf(stmt, "iss",
                                 wc_id,
                                 svn_relpath_join(local_relpath, name,
                                                  scratch_pool),
                                 local_relpath));
       SVN_ERR(svn_sqlite__insert(NULL, stmt));
-
-#ifdef SVN_WC__NODE_DATA
-      SVN_ERR(svn_sqlite__bindf(stmt_node, "isis",
+#endif
+#ifdef SVN_WC__NODES
+      SVN_ERR(svn_sqlite__bindf(stmt_node, "isisnnnsns",
                                 wc_id,
                                 svn_relpath_join(local_relpath, name,
                                                  scratch_pool),
-#ifndef SINGLE_DB
-                                (apr_int64_t) 2, /* non-THIS_DIR working */
-#endif
-                                local_relpath));
+                                (apr_int64_t) 2, /* ### op_depth
+                                                    non-THIS_DIR working */
+                                local_relpath,
+                                "incomplete", /* 8, presence */
+                                "unknown"));  /* 10, kind */
+
       SVN_ERR(svn_sqlite__insert(NULL, stmt_node));
 #endif
     }
@@ -885,9 +857,7 @@ insert_working_node(void *baton,
 
   /* We cannot insert a WORKING_NODE row at the wcroot.  */
   /* ### actually, with per-dir DB, we can... */
-#ifdef SVN_WC__SINGLE_DB
   SVN_ERR_ASSERT(*piwb->local_relpath != '\0');
-#endif
   if (*piwb->local_relpath == '\0')
     parent_relpath = NULL;
   else
@@ -950,10 +920,8 @@ insert_working_node(void *baton,
 
 
 #ifdef SVN_WC__NODE_DATA
-#ifndef SINGLE_DB
   op_depth = (parent_relpath == NULL) ? 1   /* THIS_DIR */
                                       : 2;  /* immediate children */
-#endif
   SVN_ERR(svn_sqlite__get_statement(&stmt_node, sdb, STMT_INSERT_NODE_DATA));
   SVN_ERR(svn_sqlite__bindf(stmt_node, "isistt",
                             piwb->wc_id, piwb->local_relpath,
@@ -1430,6 +1398,11 @@ create_db(svn_sqlite__db_t **sdb,
   SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_NODE_DATA));
 #endif
 
+#ifdef SVN_WC__NODES
+  /* Create the NODES table for the experimental schema */
+  SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_NODES));
+#endif
+
   /* Insert the repository. */
   SVN_ERR(create_repos_id(repos_id, repos_root_url, repos_uuid, *sdb,
                           scratch_pool));
@@ -1583,6 +1556,58 @@ svn_wc__db_get_wcroot(const char **wcroo
   return SVN_NO_ERROR;
 }
 
+struct with_sqlite_lock_baton
+{
+  svn_wc__db_t *db;
+  svn_wc__db_sqlite_lock_cb lock_cb;
+  void *lock_baton;
+};
+
+static svn_error_t *
+call_sqlite_lock_cb(void *baton,
+                    svn_sqlite__db_t *sdb,
+                    apr_pool_t *scratch_pool)
+{
+  struct with_sqlite_lock_baton *lb = baton;
+
+  return svn_error_return(lb->lock_cb(lb->db, lb->lock_baton, scratch_pool));
+}
+
+svn_error_t *
+svn_wc__db_with_sqlite_lock(svn_wc__db_t *db,
+                            const char *wri_abspath,
+                            svn_wc__db_sqlite_lock_cb lock_cb,
+                            void *cb_baton,
+                            apr_pool_t *scratch_pool)
+{
+  svn_wc__db_pdh_t *pdh;
+  const char *unused_relpath;
+  struct with_sqlite_lock_baton baton;
+
+  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &unused_relpath, db,
+                              wri_abspath, svn_sqlite__mode_readonly,
+                              scratch_pool, scratch_pool));
+
+  /* Can't use VERIFY_USABLE_PDH, as this should be usable to detect
+     where call upgrade */
+
+  if (pdh->wcroot == NULL || !pdh->wcroot->sdb)
+    return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
+                             _("The node '%s' is not in a workingcopy."),
+                             svn_dirent_local_style(wri_abspath,
+                                                    scratch_pool));
+
+  baton.db = db;
+  baton.lock_cb = lock_cb;
+  baton.lock_baton = cb_baton;
+
+  return svn_error_return(
+            svn_sqlite__with_lock(pdh->wcroot->sdb,
+                                  call_sqlite_lock_cb,
+                                  &baton,
+                                  scratch_pool));
+}
+
 svn_error_t *
 svn_wc__db_base_add_directory(svn_wc__db_t *db,
                               const char *local_abspath,
@@ -1874,34 +1899,6 @@ svn_wc__db_base_add_absent_node(svn_wc__
 
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Add a parent stub.  */
-  if (*local_relpath == '\0')
-    {
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 FALSE, scratch_pool));
-
-      VERIFY_USABLE_PDH(pdh);
-
-      SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
-                          pdh->wcroot->sdb, scratch_pool));
-
-      blank_ibb(&ibb);
-      
-      ibb.status = status;
-      ibb.kind = svn_wc__db_kind_subdir;
-      ibb.wc_id = pdh->wcroot->wc_id;
-      ibb.local_relpath = svn_dirent_basename(local_abspath, scratch_pool);
-      ibb.repos_id = repos_id;
-      ibb.repos_relpath = repos_relpath;
-      ibb.revision = revision;
-
-      SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb,
-                                           insert_base_node, &ibb,
-                                           scratch_pool));
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -1938,40 +1935,6 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
 
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SINGLE_DB
-  if (*local_relpath == '\0')
-    {
-      svn_error_t *err;
-      err = navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                               TRUE, scratch_pool);
-
-      if (!err)
-        {
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_BASE_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id,
-                                    svn_dirent_basename(local_abspath,
-                                                        scratch_pool)));
-
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_NODE_DATA_BASE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id,
-                                    svn_dirent_basename(local_abspath,
-                                                        scratch_pool)));
-
-          SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-        }
-      else if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
-        svn_error_clear(err);
-      else
-        SVN_ERR(err);
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -2023,28 +1986,11 @@ svn_wc__db_base_get_info(svn_wc__db_stat
 
       if (kind)
         {
-#ifndef SVN_WC__SINGLE_DB
-          if (node_kind == svn_wc__db_kind_subdir)
-            *kind = svn_wc__db_kind_dir;
-          else
-#endif
-            *kind = node_kind;
+          *kind = node_kind;
         }
       if (status)
         {
           *status = svn_sqlite__column_token(stmt, 2, presence_map);
-
-#ifndef SVN_WC__SINGLE_DB
-          if (node_kind == svn_wc__db_kind_subdir
-              && *status == svn_wc__db_status_normal)
-            {
-              /* We're looking at the subdir record in the *parent* directory,
-                 which implies per-dir .svn subdirs. We should be looking
-                 at the subdir itself; therefore, it is missing or obstructed
-                 in some way. Inform the caller.  */
-              *status = svn_wc__db_status_obstructed;
-            }
-#endif
         }
       if (revision)
         {
@@ -2210,28 +2156,11 @@ svn_wc__db_base_get_info_from_parent(svn
 
       if (kind)
         {
-#ifndef SVN_WC__SINGLE_DB
-          if (node_kind == svn_wc__db_kind_subdir)
-            *kind = svn_wc__db_kind_dir;
-          else
-#endif
-            *kind = node_kind;
+          *kind = node_kind;
         }
       if (status)
         {
           *status = svn_sqlite__column_token(stmt, 2, presence_map);
-
-#ifndef SVN_WC__SINGLE_DB
-          if (node_kind == svn_wc__db_kind_subdir
-              && *status == svn_wc__db_status_normal)
-            {
-              /* We're looking at the subdir record in the *parent* directory,
-                 which implies per-dir .svn subdirs. We should be looking
-                 at the subdir itself; therefore, it is missing or obstructed
-                 in some way. Inform the caller.  */
-              *status = svn_wc__db_status_obstructed;
-            }
-#endif
         }
       if (revision)
         {
@@ -2952,16 +2881,9 @@ temp_cross_db_copy(svn_wc__db_t *db,
   svn_boolean_t have_row;
   svn_depth_t depth;
 
-#ifdef SVN_WC__SINGLE_DB
-  SVN_ERR_ASSERT(kind == svn_wc__db_kind_file
-                 || kind == svn_wc__db_kind_dir
-                 );
-#else
   SVN_ERR_ASSERT(kind == svn_wc__db_kind_file
                  || kind == svn_wc__db_kind_dir
-                 || kind == svn_wc__db_kind_subdir
                  );
-#endif
 
   SVN_ERR(svn_wc__db_read_info(NULL /* status */,
                                NULL /* kind */,
@@ -3281,26 +3203,6 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
                                                       scratch_pool));
     }
 
-
-#ifndef SVN_WC__SINGLE_DB
-  /* When copying a directory the destination may not exist, if so we
-     only copy the parent stub */
-  if (kind == svn_wc__db_kind_dir && !*src_relpath && *dst_relpath)
-    {
-      /* ### copy_tests.py 69 copies from the root of one wc to
-         ### another wc, that means the source doesn't have a
-         ### versioned parent and so there is no parent stub to
-         ### copy. We could generate a parent stub but it becomes
-         ### unnecessary when we centralise so for the moment we just
-         ### fail. */
-      SVN_ERR(navigate_to_parent(&src_pdh, db, src_pdh,
-                                 svn_sqlite__mode_readwrite, TRUE,
-                                 scratch_pool));
-      src_relpath = svn_dirent_basename(src_abspath, NULL);
-      kind = svn_wc__db_kind_subdir;
-    }
-#endif
-
   /* Get the children for a directory if this is not the parent stub */
   if (kind == svn_wc__db_kind_dir)
     SVN_ERR(gather_children(&children, FALSE, db, src_abspath,
@@ -3477,27 +3379,6 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
                                        scratch_pool));
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Add a parent stub.  */
-  if (*local_relpath == '\0')
-    {
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 FALSE, scratch_pool));
-
-      VERIFY_USABLE_PDH(pdh);
-
-      blank_iwb(&iwb);
-
-      iwb.presence = svn_wc__db_status_normal;
-      iwb.kind = svn_wc__db_kind_subdir;
-      iwb.wc_id = pdh->wcroot->wc_id;
-      iwb.local_relpath = svn_dirent_basename(local_abspath, scratch_pool);
-
-      /* No children or work items, so a txn is not needed.  */
-      SVN_ERR(insert_working_node(&iwb, pdh->wcroot->sdb, scratch_pool));
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -3671,27 +3552,6 @@ svn_wc__db_op_add_directory(svn_wc__db_t
                                        scratch_pool));
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Add a parent stub.  */
-  if (*local_relpath == '\0')
-    {
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 FALSE, scratch_pool));
-
-      VERIFY_USABLE_PDH(pdh);
-
-      blank_iwb(&iwb);
-
-      iwb.presence = svn_wc__db_status_normal;
-      iwb.kind = svn_wc__db_kind_subdir;
-      iwb.wc_id = pdh->wcroot->wc_id;
-      iwb.local_relpath = svn_dirent_basename(local_abspath, scratch_pool);
-
-      /* No children or work items, so a txn is not needed.  */
-      SVN_ERR(insert_working_node(&iwb, pdh->wcroot->sdb, scratch_pool));
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4354,42 +4214,6 @@ svn_wc__db_temp_op_remove_entry(svn_wc__
 
   SVN_ERR(svn_sqlite__step_done(stmt));
 
-#ifndef SINGLE_DB
-  /* Check if we should also remove it from the parent db */
-  if (*local_relpath == '\0')
-    {
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 TRUE, scratch_pool));
-      VERIFY_USABLE_PDH(pdh);
-
-      local_relpath = svn_dirent_basename(local_abspath, NULL);
-
-      sdb = pdh->wcroot->sdb;
-      wc_id = pdh->wcroot->wc_id;
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_DELETE_BASE_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_DELETE_WORKING_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-      SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                        STMT_DELETE_NODE_DATA_LAYERS));
-      SVN_ERR(svn_sqlite__bindf(stmt, "isi",
-                                wc_id, local_relpath, (apr_int64_t)0));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_DELETE_ACTUAL_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
-
-      SVN_ERR(svn_sqlite__step_done(stmt));
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4424,30 +4248,6 @@ svn_wc__db_temp_op_remove_working(svn_wc
   SVN_ERR(svn_sqlite__step_done(stmt));
 #endif
 
-#ifndef SINGLE_DB
-  /* Check if we should remove it from the parent db as well. */
-  if (*local_relpath == '\0')
-    {
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 TRUE, scratch_pool));
-      VERIFY_USABLE_PDH(pdh);
-
-      local_relpath = svn_dirent_basename(local_abspath, NULL);
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_DELETE_WORKING_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_DELETE_NODE_DATA_WORKING));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4466,12 +4266,6 @@ update_depth_values(svn_wc__db_t *db,
   /* Flush any entries before we start monkeying the database.  */
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Parent stubs have only two depth options: excluded, or infinity.  */
-  if (*local_relpath != '\0' && !excluded)
-    depth = svn_depth_infinity;
-#endif
-
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
                                     excluded
                                       ? STMT_UPDATE_BASE_EXCLUDED
@@ -4539,31 +4333,6 @@ svn_wc__db_temp_op_set_dir_depth(svn_wc_
   SVN_ERR(update_depth_values(db, local_abspath, pdh, local_relpath, depth,
                               scratch_pool));
 
-#ifndef SINGLE_DB
-  /* If we're in the subdir, then navigate to the parent to set its
-     depth value.  */
-  if (*local_relpath == '\0')
-    {
-      svn_error_t *err;
-
-      err = navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                               TRUE, scratch_pool);
-      if (err)
-        {
-          if (! SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
-            return svn_error_return(err);
-
-          /* No parent to update */
-          svn_error_clear(err);
-          return SVN_NO_ERROR;
-        }
-
-      /* Get the stub name, and update the depth.  */
-      local_relpath = svn_dirent_basename(local_abspath, scratch_pool);
-      SVN_ERR(update_depth_values(pdh, local_relpath, depth));
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4599,32 +4368,6 @@ db_working_update_presence(svn_wc__db_st
   SVN_ERR(svn_sqlite__step_done(stmt));
 #endif
 
-#ifndef SINGLE_DB
-  if (*local_relpath == '\0')
-    {
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 TRUE, scratch_pool));
-
-      VERIFY_USABLE_PDH(pdh);
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_UPDATE_WORKING_PRESENCE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "ist", pdh->wcroot->wc_id,
-                                svn_dirent_basename(local_abspath, NULL),
-                                presence_map, status));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_UPDATE_NODE_WORKING_PRESENCE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "ist", pdh->wcroot->wc_id,
-                                svn_dirent_basename(local_abspath, NULL),
-                                presence_map, status));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4665,31 +4408,6 @@ db_working_actual_remove(svn_wc__db_t *d
 
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SINGLE_DB
-  if (*local_relpath == '\0')
-    {
-      /* ### Delete parent stub. Remove when db is centralised. */
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 TRUE, scratch_pool));
-      local_relpath = svn_dirent_basename(local_abspath, NULL);
-      VERIFY_USABLE_PDH(pdh);
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_DELETE_WORKING_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                pdh->wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_DELETE_NODE_DATA_WORKING));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                pdh->wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4729,29 +4447,6 @@ db_working_insert(svn_wc__db_status_t st
 
   SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
 
-#ifndef SINGLE_DB
-  if (*local_relpath == '\0')
-    {
-      /* ### Insert parent stub. Remove when db is centralised. */
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
-                                 TRUE, scratch_pool));
-      local_relpath = svn_dirent_basename(local_abspath, NULL);
-      VERIFY_USABLE_PDH(pdh);
-
-      /* ### Should the parent stub have a full row like this? */
-      blank_iwb(&iwb);
-
-      iwb.wc_id = pdh->wcroot->wc_id;
-      iwb.local_relpath = local_relpath;
-      iwb.presence = status;
-      iwb.op_depth = 2; /* the stub is a child */
-
-      SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb,
-                                           copy_working_from_base, &iwb,
-                                           scratch_pool));
-    }
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -4874,8 +4569,7 @@ svn_wc__db_temp_op_delete(svn_wc__db_t *
                                NULL, NULL, NULL, &have_work, NULL, NULL,
                                db, local_abspath,
                                scratch_pool, scratch_pool));
-  if (working_status == svn_wc__db_status_deleted
-      || working_status == svn_wc__db_status_obstructed_delete)
+  if (working_status == svn_wc__db_status_deleted)
     {
       /* The node is already deleted.  */
       /* ### return an error? callers should know better.  */
@@ -4888,8 +4582,7 @@ svn_wc__db_temp_op_delete(svn_wc__db_t *
   new_working_status = working_status;
 
   if (working_status == svn_wc__db_status_normal
-      || working_status == svn_wc__db_status_not_present
-      || working_status == svn_wc__db_status_obstructed)
+      || working_status == svn_wc__db_status_not_present)
     {
       /* No structural changes (ie. no WORKING node). Mark the BASE node
          as deleted.  */
@@ -4899,29 +4592,6 @@ svn_wc__db_temp_op_delete(svn_wc__db_t *
       new_working_none = FALSE;
       new_working_status = svn_wc__db_status_base_deleted;
     }
-  else if (working_status == svn_wc__db_status_obstructed_add)
-    {
-      /* There is a parent stub for some kind of addition.
-
-         ### we cannot tell if this is a local-add or a copied/moved-here.
-         ### when the latter case, if this node is the root of that
-         ### copy/move, then we just "revert" it. otherwise, we're deleting
-         ### a child of that copy/move and marked it as delete. and the
-         ### second proble: we also cannot tell whether this is the root
-         ### or not.
-         ###
-         ### return WC_MISSING here. we need that working copy metadata
-         ###
-         ### when we get to single-db, there are no "obstructed" status
-         ### codes, so this will magically work...  */
-      SVN_ERR_ASSERT(!working_none);
-
-      return svn_error_createf(SVN_ERR_WC_MISSING, NULL,
-                               _("The directory '%s' is missing and cannot "
-                                 "be marked for deletion."),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
-    }
   /* ### remaining states: added, absent, excluded, incomplete
      ### the last three have debatable schedule-delete semantics,
      ### and this code may need to change further, but I'm not
@@ -4931,7 +4601,6 @@ svn_wc__db_temp_op_delete(svn_wc__db_t *
     {
       /* No structural changes  */
       if (base_status == svn_wc__db_status_normal
-          || base_status == svn_wc__db_status_obstructed
           || base_status == svn_wc__db_status_incomplete
           || base_status == svn_wc__db_status_excluded)
         {
@@ -5093,19 +4762,6 @@ svn_wc__db_read_info(svn_wc__db_status_t
                               && *status != svn_wc__db_status_excluded
                               /* && *status != svn_wc__db_status_incomplete */)
                              || !*have_work);
-
-#ifndef SVN_WC__SINGLE_DB
-              if (node_kind == svn_wc__db_kind_subdir
-                  && *status == svn_wc__db_status_normal)
-                {
-                  /* We should have read a row from the subdir wc.db. It
-                     must be obstructed in some way.
-
-                     It is also possible that a WORKING node will override
-                     this value with a proper status.  */
-                  *status = svn_wc__db_status_obstructed;
-                }
-#endif
             }
 
           if (*have_work)
@@ -5137,42 +4793,20 @@ svn_wc__db_read_info(svn_wc__db_status_t
                      deletion could be of the BASE tree, or a child of
                      something that has been copied/moved here. */
 
-#ifndef SVN_WC__SINGLE_DB
-                  /* If we're looking at the data in the parent, then
-                     something has obstructed the child data. Inform
-                     the caller.  */
-                  if (node_kind == svn_wc__db_kind_subdir)
-                    *status = svn_wc__db_status_obstructed_delete;
-                  else
-#endif
-                    *status = svn_wc__db_status_deleted;
+                  *status = svn_wc__db_status_deleted;
                 }
               else /* normal */
                 {
                   /* The caller should scan upwards to detect whether this
                      addition has occurred because of a simple addition,
                      a copy, or is the destination of a move. */
-
-#ifndef SVN_WC__SINGLE_DB
-                  /* If we're looking at the data in the parent, then
-                     something has obstructed the child data. Inform
-                     the caller.  */
-                  if (node_kind == svn_wc__db_kind_subdir)
-                    *status = svn_wc__db_status_obstructed_add;
-                  else
-#endif
-                    *status = svn_wc__db_status_added;
+                  *status = svn_wc__db_status_added;
                 }
             }
         }
       if (kind)
         {
-#ifndef SVN_WC__SINGLE_DB
-          if (node_kind == svn_wc__db_kind_subdir)
-            *kind = svn_wc__db_kind_dir;
-          else
-#endif
-            *kind = node_kind;
+          *kind = node_kind;
         }
       if (revision)
         {
@@ -5248,11 +4882,7 @@ svn_wc__db_read_info(svn_wc__db_status_t
         }
       if (depth)
         {
-          if (node_kind != svn_wc__db_kind_dir
-#ifndef SVN_WC__SINGLE_DB
-                && node_kind != svn_wc__db_kind_subdir
-#endif
-              )
+          if (node_kind != svn_wc__db_kind_dir)
             {
               *depth = svn_depth_unknown;
             }
@@ -5665,7 +5295,6 @@ svn_error_t *
 svn_wc__db_global_relocate(svn_wc__db_t *db,
                            const char *local_dir_abspath,
                            const char *repos_root_url,
-                           svn_boolean_t single_db,  /* ### */
                            apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -5740,8 +5369,7 @@ svn_wc__db_global_relocate(svn_wc__db_t 
             }
         }
 
-      if (status == svn_wc__db_status_added
-          || status == svn_wc__db_status_obstructed_add)
+      if (status == svn_wc__db_status_added)
         {
           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
                                            &rb.repos_relpath,
@@ -5780,45 +5408,6 @@ svn_wc__db_global_relocate(svn_wc__db_t 
   SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb, relocate_txn, &rb,
                                        scratch_pool));
 
-  if (!single_db)
-    {
-      /* ### Now, a bit of a dance because we don't yet have a centralized
-             metadata store.  We need to update the repos_id in the databases
-             of subdirectories. */
-      apr_pool_t *iterpool;
-      const apr_array_header_t *children;
-      int i;
-
-      iterpool = svn_pool_create(scratch_pool);
-      SVN_ERR(svn_wc__db_read_children(&children, db, local_dir_abspath,
-                                       scratch_pool, iterpool));
-
-      for (i = 0; i < children->nelts; i++)
-        {
-          const char *child = APR_ARRAY_IDX(children, i, const char *);
-          const char *child_abspath;
-          svn_wc__db_kind_t kind;
-
-          svn_pool_clear(iterpool);
-
-          child_abspath = svn_dirent_join(local_dir_abspath, child, iterpool);
-          SVN_ERR(svn_wc__db_read_info(NULL, &kind, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       db, child_abspath,
-                                       iterpool, iterpool));
-          if (kind != svn_wc__db_kind_dir)
-            continue;
-
-          /* Recurse on the child directory */
-          SVN_ERR(svn_wc__db_global_relocate(db, child_abspath, repos_root_url,
-                                             single_db, iterpool));
-        }
-
-      svn_pool_destroy(iterpool);
-    }
-
   return SVN_NO_ERROR;
 }
 
@@ -5941,13 +5530,6 @@ commit_node(void *baton, svn_sqlite__db_
   SVN_ERR(svn_sqlite__reset(stmt_work));
   SVN_ERR(svn_sqlite__reset(stmt_act));
 
-#ifndef SINGLE_DB
-  /* We're committing a file/symlink, or we're committing a dir at "". We
-     never commit child directories (parent stubs).  */
-  SVN_ERR_ASSERT(new_kind != svn_wc__db_kind_dir
-                 || *cb->local_relpath == '\0');
-#endif
-
   /* Update the BASE_NODE row with all the new information.  */
 
   if (*cb->local_relpath == '\0')
@@ -5988,6 +5570,33 @@ commit_node(void *baton, svn_sqlite__db_
 
   SVN_ERR(svn_sqlite__step_done(stmt));
 
+#ifdef SVN_WC__NODE_DATA
+
+  SVN_ERR(svn_sqlite__get_statement(&stmt, cb->pdh->wcroot->sdb,
+                                    STMT_APPLY_CHANGES_TO_BASE_NODE_DATA));
+  SVN_ERR(svn_sqlite__bindf(stmt, "issttisb",
+                            cb->pdh->wcroot->wc_id, cb->local_relpath,
+                            parent_relpath,
+                            presence_map, new_presence,
+                            kind_map, new_kind,
+                            (apr_int64_t)cb->changed_rev,
+                            cb->changed_author,
+                            prop_blob.data, prop_blob.len));
+
+  SVN_ERR(svn_sqlite__bind_checksum(stmt, 9, cb->new_checksum,
+                                    scratch_pool));
+  if (cb->changed_date > 0)
+    SVN_ERR(svn_sqlite__bind_int64(stmt, 10, cb->changed_date));
+  SVN_ERR(svn_sqlite__bind_text(stmt, 11, new_depth_str));
+  /* ### 12. target.  */
+  SVN_ERR(svn_sqlite__bind_properties(stmt, 12, cb->new_dav_cache,
+                                      scratch_pool));
+
+  SVN_ERR(svn_sqlite__step_done(stmt));
+
+#endif
+
+
   if (have_work)
     {
       /* Get rid of the WORKING_NODE row.  */
@@ -6101,28 +5710,9 @@ determine_repos_info(apr_int64_t *repos_
 
   SVN_ERR(svn_sqlite__reset(stmt));
 
-  /* The parent MUST have a BASE node (otherwise, THIS node cannot be
-     processed for a commit). Move up and re-query.   */
-
-#ifndef SVN_WC__SINGLE_DB
-  if (*local_relpath == '\0')
-    {
-      /* There is no entry for "" in the BASE_NODE table, so this directory
-         is just now being added. Therefore, the stub in the parent dir
-         does not exist either. We want to jump to the logical parent node,
-         which means one PDH up, and stick to local_relpath == "".  */
-      SVN_ERR(navigate_to_parent(&pdh, db, pdh,
-                                 svn_sqlite__mode_readonly,
-                                 TRUE, scratch_pool));
-      local_relpath = "";
-    }
-  else
-#endif
-    {
-      /* This was a child node within this wcroot. We want to look at the
-         BASE node of the directory.  */
-      local_relpath = svn_relpath_dirname(local_relpath, scratch_pool);
-    }
+  /* This was a child node within this wcroot. We want to look at the
+     BASE node of the directory.  */
+  local_relpath = svn_relpath_dirname(local_relpath, scratch_pool);
 
   /* The REPOS_ID will be the same (### until we support mixed-repos)  */
   SVN_ERR(scan_upwards_for_repos(repos_id, &repos_parent_relpath,
@@ -6599,20 +6189,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
                                      svn_dirent_local_style(local_abspath,
                                                             scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-          /* ### in per-dir operation, it is possible that we just fetched
-             ### the parent stub. examine the KIND field.
-             ###
-             ### scan_addition is NOT allowed for an obstructed_add status
-             ### from read_info. there may be key information in the
-             ### subdir record (eg. copyfrom_*).  */
-          {
-            svn_wc__db_kind_t kind = svn_sqlite__column_token(stmt, 1,
-                                                              kind_map);
-            SVN_ERR_ASSERT(kind != svn_wc__db_kind_subdir);
-          }
-#endif
-
           /* Provide the default status; we'll override as appropriate. */
           if (status)
             *status = svn_wc__db_status_added;
@@ -7170,26 +6746,6 @@ svn_wc__db_wq_add(svn_wc__db_t *db,
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-#ifndef SINGLE_DB
-  if (*local_relpath != '\0')
-    {
-      svn_wc__db_kind_t kind;
-
-      SVN_ERR(svn_wc__db_read_kind(&kind, db, wri_abspath, TRUE,
-                                   scratch_pool));
-      if (kind == svn_wc__db_kind_dir)
-        {
-          /* This node is a directory which is not on disk (since
-             LOCAL_RELPATH is specifying the stub). Therefore, the
-             work queue does not exist.  */
-          return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                                   _("There is no work queue for '%s'."),
-                                   svn_dirent_local_style(wri_abspath,
-                                                          scratch_pool));
-        }
-    }
-#endif
-
   /* Add the work item(s) to the WORK_QUEUE.  */
   return svn_error_return(add_work_items(pdh->wcroot->sdb,
                                          work_item,
@@ -7219,25 +6775,6 @@ svn_wc__db_wq_fetch(apr_uint64_t *id,
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-#ifndef SINGLE_DB
-  if (*local_relpath != '\0')
-    {
-      svn_wc__db_kind_t kind;
-
-      SVN_ERR(svn_wc__db_read_kind(&kind, db, wri_abspath, TRUE,
-                                   scratch_pool));
-      if (kind == svn_wc__db_kind_dir)
-        {
-          /* This node is a directory which is not on disk (since
-             LOCAL_RELPATH is specifying the stub). Therefore, it
-             has no items in the work queue.  */
-          *id = 0;
-          *work_item = NULL;
-          return SVN_NO_ERROR;
-        }
-    }
-#endif
-
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
                                     STMT_SELECT_WORK_ITEM));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -7281,24 +6818,6 @@ svn_wc__db_wq_completed(svn_wc__db_t *db
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-#ifndef SINGLE_DB
-  if (*local_relpath != '\0')
-    {
-      svn_wc__db_kind_t kind;
-
-      SVN_ERR(svn_wc__db_read_kind(&kind, db, wri_abspath, TRUE,
-                                   scratch_pool));
-      if (kind == svn_wc__db_kind_dir)
-        {
-          /* This node is a directory which is not on disk (since
-             LOCAL_RELPATH is specifying the stub). Therefore, the
-             work queue does not exist, and this work item has been
-             (implicitly) removed/completed.  */
-          return SVN_NO_ERROR;
-        }
-    }
-#endif
-
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
                                     STMT_DELETE_WORK_ITEM));
   SVN_ERR(svn_sqlite__bind_int64(stmt, 1, id));
@@ -7321,18 +6840,6 @@ svn_wc__db_temp_get_format(int *format,
   pdh = svn_wc__db_pdh_get_or_create(db, local_dir_abspath, FALSE,
                                      scratch_pool);
 
-#ifndef SINGLE_DB
-  /* ### for per-dir layouts, the wcroot should be this directory. under
-     ### wc-ng, the wcroot may have become set for this missing subdir.  */
-  if (pdh != NULL && pdh->wcroot != NULL
-      && strcmp(local_dir_abspath, pdh->wcroot->abspath) != 0)
-    {
-      /* Forget the WCROOT. The subdir may have been missing when this
-         got set, but has since been constructed.  */
-      pdh->wcroot = NULL;
-    }
-#endif
-
   /* If the PDH isn't present, or have wcroot information, then do a full
      upward traversal to find the wcroot.  */
   if (pdh == NULL || pdh->wcroot == NULL)
@@ -7350,11 +6857,7 @@ svn_wc__db_temp_get_format(int *format,
       /* ### for per-dir layouts, the wcroot should be this directory,
          ### so bail if the PDH is a parent (and, thus, local_relpath is
          ### something besides "").  */
-      if (err
-#ifndef SVN_WC__SINGLE_DB
-          || *local_relpath != '\0'
-#endif
-          )
+      if (err)
         {
           if (err && err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
             return svn_error_return(err);
@@ -7365,10 +6868,7 @@ svn_wc__db_temp_get_format(int *format,
              hanging off a parent though.
              Don't clear the wcroot of a parent if we just found a
              relative path here or we get multiple wcroot issues. */
-#ifndef SVN_WC__SINGLE_DB
-          if (err)
-#endif
-            pdh->wcroot = NULL;
+          pdh->wcroot = NULL;
 
           /* Remap the returned error.  */
           *format = 0;
@@ -7448,25 +6948,16 @@ svn_wc__db_temp_forget_directory(svn_wc_
       if (!svn_dirent_is_ancestor(local_dir_abspath, pdh->local_abspath))
         continue;
 
-#ifndef SVN_WC__SINGLE_DB
-      if (pdh->locked)
-#endif
+      err = svn_wc__db_wclock_release(db, pdh->local_abspath,
+                                      scratch_pool);
+      if (err
+          && (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
+              || err->apr_err == SVN_ERR_WC_NOT_LOCKED))
         {
-          err = svn_wc__db_wclock_release(db, pdh->local_abspath,
-                                          scratch_pool);
-          if (err
-              && (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
-                  || err->apr_err == SVN_ERR_WC_NOT_LOCKED))
-            {
-              svn_error_clear(err);
-            }
-          else
-            SVN_ERR(err);
+          svn_error_clear(err);
         }
-
-#ifndef SVN_WC__SINGLE_DB
-      SVN_ERR_ASSERT(!pdh->locked);
-#endif
+      else
+        SVN_ERR(err);
 
       apr_hash_set(db->dir_data, key, klen, NULL);
 
@@ -7620,13 +7111,6 @@ svn_wc__db_temp_borrow_sdb(svn_sqlite__d
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-#ifndef SVN_WC__SINGLE_DB
-  /* We better be looking at the proper wcroot for this directory.
-     If we ended up with a stub, then the subdirectory (and its SDB!)
-     are missing.  */
-  SVN_ERR_ASSERT(*local_relpath == '\0');
-#endif
-
   *sdb = pdh->wcroot->sdb;
 
   return SVN_NO_ERROR;
@@ -7684,55 +7168,6 @@ svn_wc__db_temp_is_dir_deleted(svn_boole
   return svn_error_return(svn_sqlite__reset(stmt));
 }
 
-#ifndef SVN_WC__SINGLE_DB
-svn_error_t *
-svn_wc__db_temp_determine_keep_local(svn_boolean_t *keep_local,
-                                     svn_wc__db_t *db,
-                                     const char *local_abspath,
-                                     apr_pool_t *scratch_pool)
-{
-  svn_sqlite__stmt_t *stmt;
-
-  /* ### This will fail for nodes that don't have a WORKING_NODE record,
-         but this is not an issue for this function, as this call is only
-         valid for deleted nodes anyway. */
-  SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
-                                 STMT_SELECT_KEEP_LOCAL_FLAG, scratch_pool));
-  SVN_ERR(svn_sqlite__step_row(stmt));
-
-  *keep_local = svn_sqlite__column_boolean(stmt, 0);
-
-  return svn_error_return(svn_sqlite__reset(stmt));
-}
-
-svn_error_t *
-svn_wc__db_temp_set_keep_local(svn_wc__db_t *db,
-                               const char *local_abspath,
-                               svn_boolean_t keep_local,
-                               apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_sqlite__stmt_t *stmt;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  /* First flush the entries */
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              local_abspath, svn_sqlite__mode_readwrite,
-                              scratch_pool, scratch_pool));
-  SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
-
-  /* Then update the database */
-  SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
-                                 STMT_UPDATE_KEEP_LOCAL_FLAG, scratch_pool));
-
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 3, keep_local ? 1 : 0));
-
-  return svn_error_return(svn_sqlite__step_done(stmt));
-}
-#endif
-
 svn_error_t *
 svn_wc__db_read_conflict_victims(const apr_array_header_t **victims,
                                  svn_wc__db_t *db,
@@ -8016,27 +7451,6 @@ svn_wc__db_is_wcroot(svn_boolean_t *is_r
       return SVN_NO_ERROR;
     }
 
-#ifndef SINGLE_DB
-  if (!svn_dirent_is_root(local_abspath, strlen(local_abspath)))
-    {
-      svn_error_t *err = navigate_to_parent(&pdh, db, pdh,
-                                            svn_sqlite__mode_readwrite,
-                                            TRUE, scratch_pool);
-
-      if (err && SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
-        {
-          svn_error_clear(err);
-          *is_root = TRUE;
-          return SVN_NO_ERROR;
-        }
-      SVN_ERR(err);
-
-      VERIFY_USABLE_PDH(pdh);
-
-      *is_root = FALSE;
-      return SVN_NO_ERROR;
-    }  
-#endif
    *is_root = TRUE;
 
    return SVN_NO_ERROR;
@@ -8111,7 +7525,6 @@ wclock_obtain_cb(void *baton,
   svn_boolean_t got_row;
   const char *filter;
 
-#ifdef SVN_WC__SINGLE_DB
   svn_wc__db_wclock_t lock;
 
   /* Upgrade locks the root before the node exists.  Apart from that
@@ -8132,13 +7545,6 @@ wclock_obtain_cb(void *baton,
                                  svn_dirent_local_style(bt->local_abspath,
                                                         scratch_pool));
     }
-#else
-  /* ### Can only lock this directory in the per-dir layout.  This is
-     ### a temporary restriction until metadata gets centralised.
-     ### Perhaps this should be a runtime error, rather than an
-     ### assert?  Perhaps check the path is versioned? */
-  SVN_ERR_ASSERT(*bt->local_relpath == '\0');
-#endif
 
   if (*bt->local_relpath == '\0')
     filter = "%";
@@ -8271,14 +7677,10 @@ wclock_obtain_cb(void *baton,
                                                     scratch_pool));
 
   /* And finally store that we obtained the lock */
-#ifdef SVN_WC__SINGLE_DB
   lock.local_relpath = apr_pstrdup(wcroot->owned_locks->pool,
                                    bt->local_relpath);
   lock.levels = bt->levels_to_lock;
   APR_ARRAY_PUSH(wcroot->owned_locks, svn_wc__db_wclock_t) = lock;
-#else
-  bt->pdh->locked = TRUE;
-#endif
 
   return SVN_NO_ERROR;
 }
@@ -8302,15 +7704,6 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
   VERIFY_USABLE_PDH(baton.pdh);
 
   if (!steal_lock)
-#ifndef SVN_WC__SINGLE_DB
-    {
-      if (baton.pdh->locked)
-        return svn_error_createf(SVN_ERR_WC_LOCKED, NULL,
-                                 _("'%s' is already locked."),
-                                 svn_dirent_local_style(local_abspath,
-                                                        scratch_pool));
-    }
-#else
     {
       int i;
       svn_wc__db_wcroot_t *wcroot = baton.pdh->wcroot;
@@ -8340,7 +7733,6 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
             }
         }
     }
-#endif
 
   baton.db = db;
   baton.local_abspath = local_abspath;
@@ -8425,10 +7817,8 @@ svn_wc__db_wclock_release(svn_wc__db_t *
   svn_sqlite__stmt_t *stmt;
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
-#ifdef SVN_WC__SINGLE_DB
   int i;
   apr_array_header_t *owned_locks;
-#endif
 
   SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
                               local_abspath, svn_sqlite__mode_readwrite,
@@ -8438,44 +7828,6 @@ svn_wc__db_wclock_release(svn_wc__db_t *
 
   /* First check and remove the owns-lock information as failure in
      removing the db record implies that we have to steal the lock later. */
-#ifndef SVN_WC__SINGLE_DB
-  if (*local_relpath != '\0')
-    {
-      svn_wc__db_status_t status;
-      svn_wc__db_kind_t kind;
-      SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL,
-                                   db, local_abspath,
-                                   scratch_pool, scratch_pool));
-
-      if (kind == svn_wc__db_kind_dir)
-        switch (status)
-          {
-            case svn_wc__db_status_not_present:
-            case svn_wc__db_status_absent:
-            case svn_wc__db_status_excluded:
-              return SVN_NO_ERROR; /* These directories don't have an
-                                      administrative area */
-            case svn_wc__db_status_obstructed:
-            case svn_wc__db_status_obstructed_add:
-            case svn_wc__db_status_obstructed_delete:
-              return SVN_NO_ERROR; /* Administrative area missing
-                                      -> Lock gone */
-            default:
-              break;
-          }
-      SVN_ERR_ASSERT(*local_relpath == '\0');
-    }
-
-  if (!pdh->locked)
-    return svn_error_createf(SVN_ERR_WC_NOT_LOCKED, NULL,
-                             _("Working copy not locked at '%s'."),
-                             svn_dirent_local_style(local_abspath,
-                                                    scratch_pool));
-  pdh->locked = FALSE;
-#else
   owned_locks = pdh->wcroot->owned_locks;
   for (i = 0; i < owned_locks->nelts; i++)
     {
@@ -8501,7 +7853,6 @@ svn_wc__db_wclock_release(svn_wc__db_t *
         APR_ARRAY_IDX(owned_locks, i, svn_wc__db_wclock_t) =
            APR_ARRAY_IDX(owned_locks, owned_locks->nelts, svn_wc__db_wclock_t);
     }
-#endif
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
                                     STMT_DELETE_WC_LOCK));
@@ -8522,10 +7873,8 @@ svn_wc__db_wclock_owns_lock(svn_boolean_
 {
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
-#ifdef SVN_WC__SINGLE_DB
   apr_array_header_t *owned_locks;
   int lock_level, i;
-#endif
 
   SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
                               local_abspath, svn_sqlite__mode_readwrite,
@@ -8539,11 +7888,6 @@ svn_wc__db_wclock_owns_lock(svn_boolean_
 
   VERIFY_USABLE_PDH(pdh);
   *own_lock = FALSE;
-#ifndef SVN_WC__SINGLE_DB
-  /* In !SINGLE_DB mode we only allow locking the directories */
-  if (*local_relpath == '\0')
-    *own_lock = (pdh != NULL && pdh->locked);
-#else
   owned_locks = pdh->wcroot->owned_locks;
   lock_level = relpath_op_depth(local_relpath);
 
@@ -8574,7 +7918,6 @@ svn_wc__db_wclock_owns_lock(svn_boolean_
             return SVN_NO_ERROR;
           }
       }
-#endif
 
   return SVN_NO_ERROR;
 }
@@ -8976,162 +8319,6 @@ make_copy_txn(void *baton,
       SVN_ERR(svn_sqlite__step_done(stmt));
     }
 
-#ifndef SINGLE_DB
-  /* ### And now, do the same for the parent stub */
-  if (*mcb->local_relpath == '\0')
-    {
-      if (remove_working)
-        {
-          const char *local_relpath;
-          svn_wc__db_pdh_t *pdh;
-
-          /* Remove WORKING_NODE stub */
-          SVN_ERR(navigate_to_parent(&pdh, mcb->db, mcb->pdh,
-                                     svn_sqlite__mode_readwrite,
-                                     FALSE, iterpool));
-          local_relpath = svn_dirent_basename(mcb->local_abspath, NULL);
-          VERIFY_USABLE_PDH(pdh);
-
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_WORKING_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_NODE_DATA_WORKING));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-        }
-
-      if (add_working_normal)
-        {
-          const char *local_relpath;
-          svn_wc__db_pdh_t *pdh;
-
-          /* Add a copy of the BASE_NODE to WORKING_NODE for the stub */
-          SVN_ERR(navigate_to_parent(&pdh, mcb->db, mcb->pdh,
-                                     svn_sqlite__mode_readwrite,
-                                     FALSE, iterpool));
-          local_relpath = svn_dirent_basename(mcb->local_abspath, NULL);
-          VERIFY_USABLE_PDH(pdh);
-
-          /* Remove old data */
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_WORKING_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_NODE_DATA_WORKING));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-
-          /* And insert the right data */
-          SVN_ERR(svn_sqlite__get_statement(
-                        &stmt, pdh->wcroot->sdb,
-                        STMT_INSERT_WORKING_NODE_NORMAL_FROM_BASE_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__get_statement(
-                        &stmt, sdb,
-                        STMT_INSERT_WORKING_NODE_DATA_NORMAL_FROM_BASE_NODE_1));
-
-          SVN_ERR(svn_sqlite__bindf(stmt, "isi",
-                                    pdh->wcroot->wc_id, local_relpath,
-                                    (apr_int64_t)2));
-
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#if 0
-      /* ### NODE_DATA  we can't enable the bit below until we stop
-         running STMT_INSERT_WORKING_NODE_NORMAL_FROM_BASE_NODE above */
-          SVN_ERR(svn_sqlite__get_statement(
-                       &stmt, sdb,
-                       STMT_INSERT_WORKING_NODE_DATA_NORMAL_FROM_BASE_NODE_2));
-
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-
-          SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-#endif
-
-        }
-      else if (add_working_not_present)
-        {
-          const char *local_relpath;
-          svn_wc__db_pdh_t *pdh;
-
-          /* Add a not present WORKING_NODE stub */
-          SVN_ERR(navigate_to_parent(&pdh, mcb->db, mcb->pdh,
-                                     svn_sqlite__mode_readwrite,
-                                     FALSE, iterpool));
-          local_relpath = svn_dirent_basename(mcb->local_abspath, NULL);
-          VERIFY_USABLE_PDH(pdh);
-
-          /* Remove old data */
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_WORKING_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_NODE_DATA_WORKING));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-
-          /* And insert the right data */
-          SVN_ERR(svn_sqlite__get_statement(
-                        &stmt, pdh->wcroot->sdb,
-                        STMT_INSERT_WORKING_NODE_NOT_PRESENT_FROM_BASE_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-
-          SVN_ERR(svn_sqlite__get_statement(
-                  &stmt, pdh->wcroot->sdb,
-                  STMT_INSERT_WORKING_NODE_DATA_NOT_PRESENT_FROM_BASE_NODE_1));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath,
-                                    (apr_int64_t)2));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#if 0
-      /* ### NODE_DATA  we can't enable the bit below until we stop
-         running STMT_INSERT_WORKING_NODE_DATA_NOT_PRESENT_FROM_BASE_NODE
-         above */
-
-          SVN_ERR(svn_sqlite__get_statement(
-                  &stmt, pdh->wcroot->sdb,
-                  STMT_INSERT_WORKING_NODE_DATA_NOT_PRESENT_FROM_BASE_NODE_2));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#endif
-#endif
-
-        }
-    }
-#endif
-
   /* Remove the BASE_NODE if the caller asked us to do that */
   if (mcb->remove_base)
     {
@@ -9150,35 +8337,6 @@ make_copy_txn(void *baton,
                                 mcb->local_relpath));
       SVN_ERR(svn_sqlite__step_done(stmt));
 #endif
-
-#ifndef SINGLE_DB
-      /* Remove BASE_NODE_STUB */
-      if (*mcb->local_relpath == '\0')
-        {
-          const char *local_relpath;
-          svn_wc__db_pdh_t *pdh;
-
-          SVN_ERR(navigate_to_parent(&pdh, mcb->db, mcb->pdh,
-                                     svn_sqlite__mode_readwrite,
-                                     FALSE, iterpool));
-          local_relpath = svn_dirent_basename(mcb->local_abspath, NULL);
-          VERIFY_USABLE_PDH(pdh);
-
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_BASE_NODE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-          SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                            STMT_DELETE_NODE_DATA_BASE));
-          SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                    pdh->wcroot->wc_id, local_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-        }
-#endif
     }
 
   SVN_ERR(flush_entries(mcb->db, mcb->pdh, mcb->local_abspath, iterpool));
@@ -9405,47 +8563,6 @@ svn_wc__db_temp_get_file_external(const 
   return svn_error_return(svn_sqlite__reset(stmt));
 }
 
-
-#ifndef SVN_WC__SINGLE_DB
-svn_error_t *
-svn_wc__db_temp_remove_subdir_record(svn_wc__db_t *db,
-                                     const char *local_abspath,
-                                     apr_pool_t *scratch_pool)
-{
-  const char *parent_abspath;
-  const char *name;
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_sqlite__stmt_t *stmt;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  svn_dirent_split(&parent_abspath, &name, local_abspath, scratch_pool);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              local_abspath, svn_sqlite__mode_readwrite,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-  
-  SVN_ERR_ASSERT(*local_relpath == '\0');
-
-  /* Delete the NAME row from BASE_NODE.  */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_DELETE_BASE_NODE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, name));
-  SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef SVN_WC__NODE_DATA
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_DELETE_NODE_DATA_BASE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, name));
-  SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-
-  return SVN_NO_ERROR;
-}
-#endif
-
 svn_error_t *
 svn_wc__db_temp_op_set_file_external(svn_wc__db_t *db,
                                      const char *local_abspath,
@@ -9492,6 +8609,7 @@ svn_wc__db_temp_op_set_file_external(svn
       SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
                               pdh->wcroot->sdb, scratch_pool));
 
+#ifndef SVN_WC__NODES_ONLY
       /* ### Insert a switched not present base node. Luckily this hack
              is not as ugly as the original file externals hack. */
       SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
@@ -9508,6 +8626,25 @@ svn_wc__db_temp_op_set_file_external(svn
                                 kind_map, svn_wc__db_kind_file));
 
       SVN_ERR(svn_sqlite__insert(NULL, stmt));
+#endif
+
+#ifdef SVN_WC__NODES
+
+      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                        STMT_INSERT_NODE));
+
+      SVN_ERR(svn_sqlite__bindf(stmt, "isisnnntnt",
+                                pdh->wcroot->wc_id,
+                                local_relpath,
+                                (apr_int64_t)0, /* op_depth == BASE */
+                                svn_relpath_dirname(local_relpath,
+                                                    scratch_pool),
+                                presence_map, svn_wc__db_status_not_present,
+                                kind_map, svn_wc__db_kind_file));
+
+      SVN_ERR(svn_sqlite__insert(NULL, stmt));
+
+#endif
     }
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
@@ -9651,89 +8788,6 @@ svn_wc__db_temp_op_set_property_conflict
   return svn_error_return(svn_sqlite__step_done(stmt));
 }
 
-#ifndef SVN_WC__SINGLE_DB
-svn_error_t *
-svn_wc__db_temp_set_parent_stub_to_normal(svn_wc__db_t *db,
-                                          const char *local_abspath,
-                                          svn_boolean_t delete_working,
-                                          apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  const char *parent_abspath, *base;
-  svn_sqlite__stmt_t *stmt;
-  int affected_rows;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath)
-                 && !svn_dirent_is_root(local_abspath, strlen(local_abspath)));
-
-  svn_dirent_split(&parent_abspath, &base, local_abspath, scratch_pool);
-
-  SVN_ERR_ASSERT(*base != '\0');
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                                             parent_abspath,
-                                             svn_sqlite__mode_readwrite,
-                                             scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* This should be handled in a transaction, but we can assume a db lock
-     and this code won't survive until 1.7 */
-
-  if (delete_working)
-    {
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                       STMT_DELETE_WORKING_NODE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, base));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-
-#ifdef NODE_DATA
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                       STMT_DELETE_NODE_DATA_WORKING));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, base));
-      SVN_ERR(svn_sqlite__step_done(stmt));
-#endif
-    }
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_UPDATE_BASE_PRESENCE_KIND));
-  SVN_ERR(svn_sqlite__bindf(stmt, "istt", pdh->wcroot->wc_id, base,
-                            presence_map, svn_wc__db_status_normal,
-                            kind_map, svn_wc__db_kind_subdir));
-#ifdef NODE_DATA
-  /* When activating this bit, I get test failures;
-     working copies seem to get disconnected from their parents...
-     Need to investigate */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_UPDATE_NODE_BASE_PRESENCE_KIND));
-  SVN_ERR(svn_sqlite__bindf(stmt, "istt", pdh->wcroot->wc_id, base,
-                            presence_map, svn_wc__db_status_normal,
-                            kind_map, svn_wc__db_kind_subdir));
-#endif
-
-
-  SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
-
-  if (affected_rows == 0)
-    {
-      /* Worst case: We have to create a new parent stub */
-      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                        STMT_INSERT_BASE_NODE));
-
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, base));
-      SVN_ERR(svn_sqlite__bind_text(stmt, 5, ""));
-      SVN_ERR(svn_sqlite__bind_token(stmt, 6, presence_map,
-                                     svn_wc__db_status_normal));
-      SVN_ERR(svn_sqlite__bind_token(stmt, 7, kind_map,
-                                     svn_wc__db_kind_subdir));
-
-      SVN_ERR(svn_sqlite__step_done(stmt));
-    }
-  SVN_ERR(flush_entries(db, pdh, local_abspath, scratch_pool));
-  return SVN_NO_ERROR;
-}
-#endif
-
 /* Baton for set_rev_relpath_txn */
 struct set_rev_relpath_baton
 {
@@ -9819,23 +8873,7 @@ svn_wc__db_temp_op_set_rev_and_repos_rel
 
   SVN_ERR(flush_entries(db, baton.pdh, local_abspath, scratch_pool));
 
-#ifdef SINGLE_DB
   SVN_ERR_ASSERT(!update_stub);
-#else
-  if (update_stub)
-    {
-      if (*baton.local_relpath != '\0')
-        return SVN_NO_ERROR; /* There is no stub */
-
-      SVN_ERR(navigate_to_parent(&baton.pdh, db, baton.pdh,
-                                 svn_sqlite__mode_readwrite, TRUE,
-                                 scratch_pool));
-
-      VERIFY_USABLE_PDH(baton.pdh);
-
-      baton.local_relpath = svn_dirent_basename(local_abspath, NULL);
-    }
-#endif
 
   SVN_ERR(svn_sqlite__with_transaction(baton.pdh->wcroot->sdb,
                                        set_rev_relpath_txn,
@@ -9856,9 +8894,9 @@ struct set_new_dir_to_incomplete_baton
 };
 
 static svn_error_t *
-set_new_dir_to_incomplete_baton_txn(void *baton,
-                                    svn_sqlite__db_t *sdb,
-                                    apr_pool_t *scratch_pool)
+set_new_dir_to_incomplete_txn(void *baton,
+                              svn_sqlite__db_t *sdb,
+                              apr_pool_t *scratch_pool)
 {
   struct set_new_dir_to_incomplete_baton *dtb = baton;
   svn_sqlite__stmt_t *stmt;
@@ -9895,7 +8933,7 @@ set_new_dir_to_incomplete_baton_txn(void
   SVN_ERR(svn_sqlite__step_done(stmt));
 #endif
 
-
+#ifndef SVN_WC__NODES_ONLY
   /* Insert the incomplete base node */
   SVN_ERR(svn_sqlite__get_statement(&stmt, dtb->pdh->wcroot->sdb,
                                     STMT_INSERT_BASE_NODE_INCOMPLETE_DIR));
@@ -9912,6 +8950,33 @@ set_new_dir_to_incomplete_baton_txn(void
     SVN_ERR(svn_sqlite__bind_text(stmt, 7, svn_depth_to_word(dtb->depth)));
 
   SVN_ERR(svn_sqlite__step_done(stmt));
+#endif
+
+
+#ifdef SVN_WC__NODES
+
+  /* Insert the incomplete base node */
+  SVN_ERR(svn_sqlite__get_statement(&stmt, dtb->pdh->wcroot->sdb,
+                                    STMT_INSERT_NODE));
+
+  SVN_ERR(svn_sqlite__bindf(stmt, "isis" /* 1 - 4 */
+                            "nnn" "sns", /* 5 - 7(n), 8, 9(n), 10 */
+                            dtb->pdh->wcroot->wc_id, /* 1 */
+                            dtb->local_relpath,      /* 2 */
+                            (apr_int64_t)0, /* op_depth == 0; BASE */
+                            parent_relpath,          /* 4 */
+                            "incomplete",            /* 8, presence */
+                            "dir"));                 /* 10, kind */
+
+  /* If depth is not unknown: record depth */
+  if (dtb->depth >= svn_depth_empty && dtb->depth <= svn_depth_infinity)
+    SVN_ERR(svn_sqlite__bind_text(stmt, 9, svn_depth_to_word(dtb->depth)));
+
+  SVN_ERR(svn_sqlite__step_done(stmt));
+
+#endif
+
+
 
   return SVN_NO_ERROR;
 }
@@ -9948,7 +9013,7 @@ svn_wc__db_temp_op_set_new_dir_to_incomp
   SVN_ERR(flush_entries(db, baton.pdh, local_abspath, scratch_pool));
 
   SVN_ERR(svn_sqlite__with_transaction(baton.pdh->wcroot->sdb,
-                                       set_new_dir_to_incomplete_baton_txn,
+                                       set_new_dir_to_incomplete_txn,
                                        &baton, scratch_pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h Tue Sep  7 13:59:41 2010
@@ -126,7 +126,7 @@ typedef struct svn_wc__db_t svn_wc__db_t
 
 
 /* Enumerated constants for how to open a WC datastore.  */
-typedef enum {
+typedef enum svn_wc__db_openmode_t {
   svn_wc__db_openmode_default,    /* Open in the default mode (r/w now). */
   svn_wc__db_openmode_readonly,   /* Changes will definitely NOT be made. */
   svn_wc__db_openmode_readwrite   /* Changes will definitely be made. */
@@ -148,7 +148,7 @@ typedef enum {
    ###   cannot simply be added. it would surprise too much code.
    ###   (we could probably create svn_node_kind2_t though)
 */
-typedef enum {
+typedef enum svn_wc__db_kind_t {
     /* The node is a directory. */
     svn_wc__db_kind_dir,
 
@@ -162,22 +162,11 @@ typedef enum {
        deletion, or incomplete status. */
     svn_wc__db_kind_unknown,
 
-#ifndef SVN_WC__SINGLE_DB
-    /* This directory node is a placeholder; the actual information is
-       held within the subdirectory.
-
-       Note: users of this API shouldn't see this kind. It will be
-       handled internally to wc_db.
-
-       ### only used with per-dir .svn subdirectories.  */
-    svn_wc__db_kind_subdir
-#endif
-
 } svn_wc__db_kind_t;
 
 
 /* Enumerated values describing the state of a node. */
-typedef enum {
+typedef enum svn_wc__db_status_t {
     /* The node is present and has no known modifications applied to it. */
     svn_wc__db_status_normal,
 
@@ -204,32 +193,6 @@ typedef enum {
        will be present. */
     svn_wc__db_status_deleted,
 
-    /* The information for this directory node is obstructed by something
-       in the local filesystem. Full details are not available.
-
-       This is only returned by an unshadowed BASE node. If a WORKING node
-       is present, then obstructed_delete or obstructed_add is returned as
-       appropriate.
-
-       ### only used with per-dir .svn subdirectories.  */
-    svn_wc__db_status_obstructed,
-
-    /* The information for this directory node is obstructed by something
-       in the local filesystem. Full details are not available.
-
-       The directory has been marked for deletion.
-
-       ### only used with per-dir .svn subdirectories.  */
-    svn_wc__db_status_obstructed_delete,
-
-    /* The information for this directory node is obstructed by something
-       in the local filesystem. Full details are not available.
-
-       The directory has been marked for addition.
-
-       ### only used with per-dir .svn subdirectories.  */
-    svn_wc__db_status_obstructed_add,
-
     /* This node was named by the server, but no information was provided. */
     svn_wc__db_status_absent,
 
@@ -261,7 +224,7 @@ typedef enum {
 
 /* Lock information.  We write/read it all as one, so let's use a struct
    for convenience.  */
-typedef struct {
+typedef struct svn_wc__db_lock_t {
   /* The lock token */
   const char *token;
 
@@ -428,6 +391,25 @@ svn_wc__db_get_wcroot(const char **wcroo
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool);
 
+typedef svn_error_t * (*svn_wc__db_sqlite_lock_cb)(svn_wc__db_t *db,
+                                                   void *baton,
+                                                   apr_pool_t *scratch_pool);
+
+/* Obtain a sqlite lock to efficiently use the working copy database for
+   WRI_ABSPATH and call LOCK_CB with CB_BATON while this lock exist.
+
+   On returning from this function all operations will be committed, but
+   operations might have been committed before returning from this function.
+
+   ### See svn_sqlite__with_lock() for more details.
+ */
+svn_error_t *
+svn_wc__db_with_sqlite_lock(svn_wc__db_t *db,
+                            const char *wri_abspath,
+                            svn_wc__db_sqlite_lock_cb lock_cb,
+                            void *cb_baton,
+                            apr_pool_t *scratch_pool);
+
 /* @} */
 
 /* Different kinds of trees
@@ -1680,15 +1662,11 @@ svn_wc__db_is_wcroot(svn_boolean_t *is_r
 
    ### Assuming the future ability to copy across repositories, should we
    ### refrain from resetting the copyfrom information in this operation?
-
-   ### SINGLE_DB is a temp argument, and should be TRUE if using compressed
-   ### metadata.  When *all* metadata gets compressed, it should disappear.
 */
 svn_error_t *
 svn_wc__db_global_relocate(svn_wc__db_t *db,
                            const char *local_dir_abspath,
                            const char *repos_root_url,
-                           svn_boolean_t single_db,
                            apr_pool_t *scratch_pool);
 
 
@@ -2445,6 +2423,8 @@ svn_wc__db_temp_set_parent_stub_to_norma
    LOCAL_ABSPATH's rev (REV) is valid, set is revision and if SET_REPOS_RELPATH
    is TRUE set its repository relative path to REPOS_RELPATH (and make sure its
    REPOS_ROOT_URL and REPOS_ROOT_UUID are still valid).
+
+   ### TODO(SINGLE_DB): Remove the 'update_stub' argument.
  */
 svn_error_t *
 svn_wc__db_temp_op_set_rev_and_repos_relpath(svn_wc__db_t *db,
@@ -2484,17 +2464,6 @@ svn_wc__db_drop_root(svn_wc__db_t *db,
                      const char *local_abspath,
                      apr_pool_t *scratch_pool);
 
-/* Internal version of svn_wc__node_get_copyfrom_info */
-svn_error_t *
-svn_wc__internal_get_copyfrom_info(const char **copyfrom_root_url,
-                                   const char **copyfrom_repos_relpath,
-                                   const char **copyfrom_url,
-                                   svn_revnum_t *copyfrom_rev,
-                                   svn_boolean_t *is_copy_target,
-                                   svn_wc__db_t *db,
-                                   const char *local_abspath,
-                                   apr_pool_t *result_pool,
-                                   apr_pool_t *scratch_pool);
 /* @} */
 
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c Tue Sep  7 13:59:41 2010
@@ -733,7 +733,9 @@ remove_base_node(svn_wc__db_t *db,
 
   if (base_status == svn_wc__db_status_normal
       && wrk_status != svn_wc__db_status_added
+#ifndef SVN_WC__SINGLE_DB
       && wrk_status != svn_wc__db_status_obstructed_add
+#endif
       && wrk_status != svn_wc__db_status_excluded)
     {
 #ifndef SVN_WC__SINGLE_DB
@@ -770,7 +772,9 @@ remove_base_node(svn_wc__db_t *db,
       SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
     }
   else if (wrk_status == svn_wc__db_status_added
+#ifndef SVN_WC__SINGLE_DB
            || wrk_status == svn_wc__db_status_obstructed_add
+#endif
            || (have_work && wrk_status == svn_wc__db_status_excluded))
     /* ### deletes of working additions should fall in this case, but
        ### we can't express these without the 4th tree */
@@ -1293,7 +1297,10 @@ log_do_committed(svn_wc__db_t *db,
 
           /* Committing a deletion should remove the local nodes.  */
           if (child_status == svn_wc__db_status_deleted
-              || child_status == svn_wc__db_status_obstructed_delete)
+#ifndef SVN_WC__SINGLE_DB
+              || child_status == svn_wc__db_status_obstructed_delete
+#endif
+              )
             {
               SVN_ERR(svn_wc__internal_remove_from_revision_control(
                         db, child_abspath,

Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/log.c?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/log.c Tue Sep  7 13:59:41 2010
@@ -311,7 +311,17 @@ dav_svn__log_report(const dav_resource *
       else if (strcmp(child->name, "end-revision") == 0)
         end = SVN_STR_TO_REV(dav_xml_get_cdata(child, resource->pool, 1));
       else if (strcmp(child->name, "limit") == 0)
-        limit = atoi(dav_xml_get_cdata(child, resource->pool, 1));
+        {
+          serr = svn_cstring_atoi(&limit,
+                                  dav_xml_get_cdata(child, resource->pool, 1));
+          if (serr)
+            {
+              derr = dav_svn__convert_err(serr, HTTP_BAD_REQUEST,
+                                          "Malformed CDATA in element "
+                                          "\"limit\"", resource->pool);
+              goto cleanup;
+            }
+        }
       else if (strcmp(child->name, "discover-changed-paths") == 0)
         discover_changed_paths = TRUE; /* presence indicates positivity */
       else if (strcmp(child->name, "strict-node-history") == 0)

Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/replay.c?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/replay.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/replay.c Tue Sep  7 13:59:41 2010
@@ -466,10 +466,18 @@ dav_svn__replay_report(const dav_resourc
             }
           else if (strcmp(child->name, "send-deltas") == 0)
             {
+              apr_int64_t parsed_val;
+
               cdata = dav_xml_get_cdata(child, resource->pool, 1);
               if (! cdata)
                 return malformed_element_error("send-deltas", resource->pool);
-              send_deltas = atoi(cdata);
+              err = svn_cstring_strtoi64(&parsed_val, cdata, 0, 1, 10);
+              if (err)
+                {
+                  svn_error_clear(err);
+                  return malformed_element_error("send-deltas", resource->pool);
+                }
+              send_deltas = parsed_val ? TRUE : FALSE;
             }
         }
     }

Modified: subversion/branches/javahl-ra/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnrdump/svnrdump.c?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/javahl-ra/subversion/svnrdump/svnrdump.c Tue Sep  7 13:59:41 2010
@@ -58,8 +58,7 @@ static const svn_opt_subcommand_desc2_t 
       N_("usage: svnrdump dump URL [-r LOWER[:UPPER]]\n\n"
          "Dump revisions LOWER to UPPER of repository at remote URL "
          "to stdout in a 'dumpfile' portable format.\n"
-         "If omitted, LOWER defaults to zero and UPPER to the latest "
-         "latest revision.\n"),
+         "If only LOWER is given, dump that one revision.\n"),
       { 0 } },
     { "load", load_cmd, { 0 },
       N_("usage: svnrdump load URL\n\n"
@@ -75,7 +74,7 @@ static const svn_opt_subcommand_desc2_t 
 
 static const apr_getopt_option_t svnrdump__options[] =
   {
-    {"revision",     'r', 1, N_("REV1[:REV2] range of revisions to dump")},
+    {"revision",     'r', 1, N_("specify revision number ARG (or X:Y range)")},
     {"quiet",         'q', 0, N_("no progress (only errors) to stderr")},
     {"config-dir",    opt_config_dir, 1, N_("read user configuration files from"
                                             " directory ARG") },
@@ -471,7 +470,10 @@ main(int argc, const char **argv)
                                                                 NULL, 10);
               }
             else
-              opt_baton->start_revision = (svn_revnum_t)strtoul(opt_arg, NULL, 10);
+              {
+                opt_baton->start_revision = (svn_revnum_t)strtoul(opt_arg, NULL, 10);
+                opt_baton->end_revision = opt_baton->start_revision;
+              }
           }
           break;
         case 'q':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/diff_tests.py?rev=993368&r1=993367&r2=993368&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/diff_tests.py Tue Sep  7 13:59:41 2010
@@ -3409,7 +3409,9 @@ def diff_git_format_wc_wc(sbox):
     "+Changed 'iota'.\n",
   ]
 
-  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', 
+  expected = svntest.verify.UnorderedOutput(expected_output)
+
+  svntest.actions.run_and_verify_svn(None, expected, [], 'diff', 
                                      '--git', wc_dir)
 
 def diff_git_format_url_wc(sbox):
@@ -3445,7 +3447,9 @@ def diff_git_format_url_wc(sbox):
     "+Changed 'iota'.\n",
   ]
 
-  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', 
+  expected = svntest.verify.UnorderedOutput(expected_output)
+
+  svntest.actions.run_and_verify_svn(None, expected, [], 'diff', 
                                      '--git',
                                      '--old', repo_url + '@1', '--new',
                                      wc_dir)
@@ -3485,7 +3489,9 @@ def diff_git_format_url_url(sbox):
     "+Changed 'iota'.\n",
   ]
 
-  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', 
+  expected = svntest.verify.UnorderedOutput(expected_output)
+
+  svntest.actions.run_and_verify_svn(None, expected, [], 'diff', 
                                      '--git', 
                                      '--old', repo_url + '@1', '--new',
                                      repo_url + '@2')