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/15 09:44:05 UTC

svn commit: r997216 [2/6] - in /subversion/branches/javahl-ra: ./ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_diff/ subversion/libsvn_fs_base/util/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_neon/ subv...

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/utf.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/utf.c Wed Sep 15 07:44:02 2010
@@ -530,9 +530,9 @@ check_non_ascii(const char *data, apr_si
 
   for (; len > 0; --len, data++)
     {
-      if ((! apr_isascii(*data))
-          || ((! apr_isspace(*data))
-              && apr_iscntrl(*data)))
+      if ((! svn_ctype_isascii(*data))
+          || ((! svn_ctype_isspace(*data))
+              && svn_ctype_iscntrl(*data)))
         {
           /* Show the printable part of the data, followed by the
              decimal code of the questionable character.  Because if a

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/validate.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/validate.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/validate.c Wed Sep 15 07:44:02 2010
@@ -27,11 +27,11 @@
 
 /*** Includes. ***/
 
-#include <apr_lib.h>
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
 #include "svn_error.h"
+#include "svn_ctype.h"
 #include "svn_private_config.h"
 
 
@@ -63,9 +63,9 @@ svn_mime_type_validate(const char *mime_
   for (i = 0; i < len; i++)
     {
       if (&mime_type[i] != slash_pos
-        && (! apr_isascii(mime_type[i])
-            || apr_iscntrl(mime_type[i])
-            || apr_isspace(mime_type[i])
+         && (! svn_ctype_isascii(mime_type[i])
+            || svn_ctype_iscntrl(mime_type[i])
+            || svn_ctype_isspace(mime_type[i])
             || (strchr(tspecials, mime_type[i]) != NULL)))
         return svn_error_createf
           (SVN_ERR_BAD_MIME_TYPE, NULL,

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_crawler.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_crawler.c Wed Sep 15 07:44:02 2010
@@ -137,11 +137,6 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
       case svn_wc__db_status_not_present:
       case svn_wc__db_status_absent:
       case svn_wc__db_status_excluded:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed:
-      case svn_wc__db_status_obstructed_add:
-      case svn_wc__db_status_obstructed_delete:
-#endif
         return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
                                  _("The node '%s' can not be restored."),
                                  svn_dirent_local_style(local_abspath,
@@ -154,14 +149,7 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
     SVN_ERR(restore_file(wc_ctx->db, local_abspath, use_commit_times, FALSE,
                          scratch_pool));
   else
-#ifdef SVN_WC__SINGLE_DB
     SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
-#else
-     return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                                 _("The node '%s' can not be restored."),
-                                 svn_dirent_local_style(local_abspath,
-                                                        scratch_pool));
-#endif
 
   return SVN_NO_ERROR;
 }
@@ -171,14 +159,10 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
    If USE_COMMIT_TIMES is set, then set working file's timestamp to
    last-commit-time.
 
-   Set RESTORED to TRUE if the node is successfull restored. RESTORED will
-   be FALSE if restoring this node is not supported.
-
    This function does all temporary allocations in SCRATCH_POOL
  */
 static svn_error_t *
-restore_node(svn_boolean_t *restored,
-             svn_wc__db_t *db,
+restore_node(svn_wc__db_t *db,
              const char *local_abspath,
              svn_wc__db_kind_t kind,
              svn_boolean_t use_commit_times,
@@ -186,37 +170,26 @@ restore_node(svn_boolean_t *restored,
              void *notify_baton,
              apr_pool_t *scratch_pool)
 {
-  *restored = FALSE;
-
   if (kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_symlink)
     {
       /* Recreate file from text-base */
       SVN_ERR(restore_file(db, local_abspath, use_commit_times, TRUE,
                            scratch_pool));
-
-      *restored = TRUE;
     }
-#ifdef SVN_WC__SINGLE_DB
   else if (kind == svn_wc__db_kind_dir)
     {
       /* Recreating a directory is just a mkdir */
       SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
-      *restored = TRUE;
     }
-#endif
 
-  if (*restored)
+  /* ... report the restoration to the caller.  */
+  if (notify_func != NULL)
     {
-      /* ... report the restoration to the caller.  */
-      if (notify_func != NULL)
-        {
-          svn_wc_notify_t *notify = svn_wc_create_notify(
-                                            local_abspath,
-                                            svn_wc_notify_restore,
-                                            scratch_pool);
-          notify->kind = svn_node_file;
-          (*notify_func)(notify_baton, notify, scratch_pool);
-        }
+      svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath,
+                                                     svn_wc_notify_restore,
+                                                     scratch_pool);
+      notify->kind = svn_node_file;
+      (*notify_func)(notify_baton, notify, scratch_pool);
     }
 
   return SVN_NO_ERROR;
@@ -384,45 +357,13 @@ report_revisions_and_depths(svn_wc__db_t
       this_path = svn_dirent_join(dir_path, child, iterpool);
       this_abspath = svn_dirent_join(dir_abspath, child, iterpool);
 
-      err = svn_wc__db_base_get_info(&this_status, &this_kind, &this_rev,
-                                     &this_repos_relpath, &this_repos_root_url,
-                                     NULL, NULL, NULL, NULL, NULL, &this_depth,
-                                     NULL, NULL, NULL, &this_lock,
-                                     db, this_abspath, iterpool, iterpool);
-      if (err)
-        {
-          if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-            return svn_error_return(err);
-
-          /* THIS_ABSPATH was listed as a BASE child of DIR_ABSPATH. Yet,
-             we just got an error trying to read it. What gives? :-P
-
-             This happens when THIS_ABSPATH is a subdirectory that is
-             marked in the parent stub as "not-present". The subdir is
-             then removed. Later, an addition is scheduled, putting the
-             subdirectory back, but ONLY containing WORKING nodes.
-
-             Thus, the BASE fetch comes out of the subdir, and fails.
-
-             For this case, we go ahead and treat this as a simple
-             not-present, and ignore whatever is in the subdirectory.  */
-          svn_error_clear(err);
-
-          this_status = svn_wc__db_status_not_present;
-
-          /* Note: the other THIS_* local variables pass to base_get_info
-             are NOT set at this point. But we don't need them...  */
-        }
-
-      /* Note: some older code would attempt to check the parent stub
-         of subdirectories for the not-present state. That check was
-         redundant since a not-present directory has no BASE nodes
-         within it which may report another status.
-
-         There might be NO BASE node (per the condition above), but the
-         typical case is that base_get_info() reads the parent stub
-         because there is no subdir (with administrative data). Thus, we
-         already have all the information we need. No further testing.  */
+      SVN_ERR(svn_wc__db_base_get_info(&this_status, &this_kind, &this_rev,
+                                       &this_repos_relpath,
+                                       &this_repos_root_url,
+                                       NULL, NULL, NULL, NULL, NULL,
+                                       &this_depth,
+                                       NULL, NULL, NULL, &this_lock,
+                                       db, this_abspath, iterpool, iterpool));
 
       /* First check for exclusion */
       if (this_status == svn_wc__db_status_excluded)
@@ -477,7 +418,6 @@ report_revisions_and_depths(svn_wc__db_t
       /* Is the entry NOT on the disk? We may be able to restore it.  */
       if (apr_hash_get(dirents, child, APR_HASH_KEY_STRING) == NULL)
         {
-          svn_boolean_t missing = FALSE;
           svn_wc__db_status_t wrk_status;
           svn_wc__db_kind_t wrk_kind;
 
@@ -494,13 +434,6 @@ report_revisions_and_depths(svn_wc__db_t
                                              db, this_abspath,
                                              iterpool, iterpool));
 
-#ifndef SVN_WC__SINGLE_DB
-          if (wrk_status == svn_wc__db_status_obstructed
-              || wrk_status == svn_wc__db_status_obstructed_add
-              || wrk_status == svn_wc__db_status_obstructed_delete)
-            missing = TRUE;
-          else
-#endif
           if (restore_files
               && wrk_status != svn_wc__db_status_added
               && wrk_status != svn_wc__db_status_deleted
@@ -518,33 +451,11 @@ report_revisions_and_depths(svn_wc__db_t
 
               if (dirent_kind == svn_node_none)
                 {
-                  svn_boolean_t restored;
-
-                  SVN_ERR(restore_node(&restored, db, this_abspath, wrk_kind,
+                  SVN_ERR(restore_node(db, this_abspath, wrk_kind,
                                        use_commit_times, notify_func,
                                        notify_baton, iterpool));
-                  if (!restored)
-                    missing = TRUE;
                 }
             }
-#ifndef SVN_WC__SINGLE_DB
-          /* If a node is still missing from disk here, we have no way to
-             recreate it locally, so report as missing and move along.
-             Again, don't bother if we're reporting everything, because the
-             dir is already missing on the server. */
-          if (missing && wrk_kind == svn_wc__db_kind_dir
-               && (depth > svn_depth_files || depth == svn_depth_unknown))
-            {
-              if (! report_everything)
-                SVN_ERR(reporter->delete_path(report_baton, this_path,
-                                              iterpool));
-              continue;
-            }
-#else
-          /* With single-db, we always know about all children, so
-             never tell the server that we don't know, but want to know
-             about the missing child. */
-#endif
         }
 
       /* And finally prepare for reporting */
@@ -640,23 +551,6 @@ report_revisions_and_depths(svn_wc__db_t
           svn_boolean_t is_incomplete;
           svn_boolean_t start_empty;
 
-          /* If the subdir and its administrative area are not present,
-             then do NOT bother to report this node, much less recurse
-             into the thing.
-
-             Note: if the there is nothing on the disk, then we may have
-             reported it missing further above.
-
-             ### hmm. but what if we have a *file* obstructing the dir?
-             ### the code above will not report it, and we'll simply
-             ### skip it right here. I guess with an obstruction, we
-             ### can't really do anything with info the server might
-             ### send, so maybe this is just fine.  */
-#ifdef SVN_WC__DB_SINGLE_DB
-          if (this_status == svn_wc__db_status_obstructed)
-            continue;
-#endif
-
           is_incomplete = (this_status == svn_wc__db_status_incomplete);
           start_empty = is_incomplete;
 
@@ -833,7 +727,6 @@ svn_wc_crawl_revisions5(svn_wc_context_t
   svn_wc__db_t *db = wc_ctx->db;
   svn_error_t *fserr, *err;
   svn_revnum_t target_rev = SVN_INVALID_REVNUM;
-  svn_boolean_t missing = FALSE;
   svn_boolean_t start_empty;
   svn_wc__db_status_t status;
   svn_wc__db_kind_t target_kind = svn_wc__db_kind_unknown;
@@ -996,13 +889,6 @@ svn_wc_crawl_revisions5(svn_wc_context_t
                                          db, local_abspath,
                                          scratch_pool, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-      if (wrk_status == svn_wc__db_status_obstructed
-          || wrk_status == svn_wc__db_status_obstructed_add
-          || wrk_status == svn_wc__db_status_obstructed_delete)
-        missing = TRUE;
-      else
-#endif
       if (restore_files
           && wrk_status != svn_wc__db_status_added
           && wrk_status != svn_wc__db_status_deleted
@@ -1010,15 +896,10 @@ svn_wc_crawl_revisions5(svn_wc_context_t
           && wrk_status != svn_wc__db_status_not_present
           && wrk_status != svn_wc__db_status_absent)
         {
-          svn_boolean_t restored;
-
-          SVN_ERR(restore_node(&restored, wc_ctx->db, local_abspath,
+          SVN_ERR(restore_node(wc_ctx->db, local_abspath,
                                target_kind, use_commit_times,
                                notify_func, notify_baton,
                                scratch_pool));
-
-          if (!restored)
-            missing = TRUE;
         }
     }
 
@@ -1030,17 +911,6 @@ svn_wc_crawl_revisions5(svn_wc_context_t
 
   if (target_kind == svn_wc__db_kind_dir)
     {
-#ifndef SVN_WC__SINGLE_DB
-      if (missing)
-        {
-          /* Report missing directories as deleted to retrieve them
-             from the repository. */
-          err = reporter->delete_path(report_baton, "", scratch_pool);
-          if (err)
-            goto abort_report;
-        }
-      else
-#endif
       if (depth != svn_depth_empty)
         {
           /* Recursively crawl ROOT_DIRECTORY and report differing

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c Wed Sep 15 07:44:02 2010
@@ -357,15 +357,6 @@ svn_wc__get_pristine_contents(svn_stream
                                "because it has an unexpected status"),
                              svn_dirent_local_style(local_abspath,
                                                     scratch_pool));
-#ifndef SVN_WC__SINGLE_DB
-  else
-    /* We know that it is a file, so we can't hit the _obstructed stati.
-       Also, we should never see _base_deleted here. */
-    SVN_ERR_ASSERT(status != svn_wc__db_status_obstructed
-                   && status != svn_wc__db_status_obstructed_add
-                   && status != svn_wc__db_status_obstructed_delete);
-#endif
-
   if (sha1_checksum)
     SVN_ERR(svn_wc__db_pristine_read(contents, db, local_abspath,
                                      sha1_checksum,
@@ -639,11 +630,7 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
    * arbitrary revision and the URL may differ if the add is
    * being driven from a merge which will have a different URL. */
   if (status != svn_wc__db_status_deleted
-      && status != svn_wc__db_status_not_present
-#ifndef SVN_WC__SINGLE_DB
-      && status != svn_wc__db_status_obstructed_delete
-#endif
-      )
+      && status != svn_wc__db_status_not_present)
     {
       /* ### Should we match copyfrom_revision? */
       if (db_revision != revision)
@@ -735,29 +722,21 @@ svn_wc__adm_destroy(svn_wc__db_t *db,
 
   SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
 
-#ifdef SVN_WC__SINGLE_DB
   SVN_ERR(svn_wc__db_get_wcroot(&adm_abspath, db, dir_abspath,
                                 scratch_pool, scratch_pool));
-#endif
-
 
   /* Well, the coast is clear for blowing away the administrative
      directory, which also removes the lock */
   SVN_ERR(svn_wc__db_temp_forget_directory(db, dir_abspath, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  adm_abspath = svn_wc__adm_child(dir_abspath, NULL, scratch_pool);
-  SVN_ERR(svn_io_remove_dir2(adm_abspath, FALSE, NULL, NULL, scratch_pool));
-#else
-  /* ### We should check if we are the only user of this DB!!! */
-
+  /* ### We should check if we are the only user of this DB, or
+         perhaps call svn_wc__db_drop_root? */
   if (strcmp(adm_abspath, dir_abspath) == 0)
     SVN_ERR(svn_io_remove_dir2(svn_wc__adm_child(adm_abspath, NULL,
                                                  scratch_pool),
                                FALSE,
                                cancel_func, cancel_baton,
                                scratch_pool));
-#endif
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c Wed Sep 15 07:44:02 2010
@@ -150,11 +150,7 @@ process_committed_leaf(svn_wc__db_t *db,
     adm_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
   SVN_ERR(svn_wc__write_check(db, adm_abspath, scratch_pool));
 
-  if (status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-      || status == svn_wc__db_status_obstructed_delete
-#endif
-      )
+  if (status == svn_wc__db_status_deleted)
     {
       return svn_error_return(svn_wc__wq_add_deletion_postcommit(
                                 db, local_abspath, new_revnum, no_unlock,
@@ -311,11 +307,7 @@ svn_wc__process_committed_internal(svn_w
                  those entries will already have been removed (as a result
                  of running the log for the replaced directory that was
                  created at the start of this function). */
-              if (status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-                  || status == svn_wc__db_status_obstructed_delete
-#endif
-                  )
+              if (status == svn_wc__db_status_deleted)
                 {
                   svn_boolean_t replaced;
 
@@ -586,139 +578,6 @@ erase_unversioned_from_wc(const char *pa
   return SVN_NO_ERROR;
 }
 
-#ifndef SVN_WC__SINGLE_DB
-/* Remove/erase LOCAL_ABSPATH from the working copy. For files this involves
- * deletion from the physical filesystem.  For directories it involves the
- * deletion from the filesystem of all unversioned children, and all
- * versioned children that are files. By the time we get here, added but
- * not committed items will have been scheduled for deletion which means
- * they have become unversioned.
- *
- * The result is that all that remains are versioned directories, each with
- * its .svn directory and .svn contents.
- *
- * If CANCEL_FUNC is non-null, invoke it with CANCEL_BATON at various
- * points, return any error immediately.
- *
- * KIND is the node kind appropriate for PATH
- */
-static svn_error_t *
-erase_from_wc(svn_wc__db_t *db,
-              const char *local_abspath,
-              svn_wc__db_kind_t kind,
-              svn_cancel_func_t cancel_func,
-              void *cancel_baton,
-              apr_pool_t *scratch_pool)
-{
-  if (cancel_func)
-    SVN_ERR(cancel_func(cancel_baton));
-
-  if (kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_symlink)
-    {
-      SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
-    }
-  else if (kind == svn_wc__db_kind_dir)
-    /* This must be a directory or absent */
-    {
-      const apr_array_header_t *children;
-      svn_wc__db_kind_t db_kind;
-      apr_pool_t *iterpool;
-      apr_hash_t *versioned_dirs = apr_hash_make(scratch_pool);
-      apr_hash_t *unversioned;
-      apr_hash_index_t *hi;
-      svn_error_t *err;
-      int i;
-
-      SVN_ERR(svn_wc__db_read_kind(&db_kind, db, local_abspath, TRUE,
-                                   scratch_pool));
-      if (db_kind != svn_wc__db_kind_dir)
-        return SVN_NO_ERROR;
-
-      iterpool = svn_pool_create(scratch_pool);
-
-      SVN_ERR(svn_wc__db_read_children(&children, db, local_abspath,
-                                       scratch_pool, iterpool));
-      for (i = 0; i < children->nelts; i++)
-        {
-          const char *name = APR_ARRAY_IDX(children, i, const char *);
-          svn_wc__db_status_t status;
-          const char *node_abspath;
-
-          svn_pool_clear(iterpool);
-
-          node_abspath = svn_dirent_join(local_abspath, name, iterpool);
-
-          SVN_ERR(svn_wc__db_read_info(&status, &db_kind, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       NULL,
-                                       db, node_abspath, iterpool, iterpool));
-
-          if (status == svn_wc__db_status_absent ||
-              status == svn_wc__db_status_not_present ||
-              status == svn_wc__db_status_obstructed ||
-              status == svn_wc__db_status_obstructed_add ||
-              status == svn_wc__db_status_obstructed_delete ||
-              status == svn_wc__db_status_excluded)
-            continue; /* Not here */
-
-          /* ### We don't have to record dirs once we have a single database */
-          if (db_kind == svn_wc__db_kind_dir)
-            apr_hash_set(versioned_dirs, name, APR_HASH_KEY_STRING, name);
-
-          SVN_ERR(erase_from_wc(db, node_abspath, db_kind,
-                                cancel_func, cancel_baton,
-                                iterpool));
-        }
-
-      /* Now handle any remaining unversioned items */
-      err = svn_io_get_dirents3(&unversioned, local_abspath, TRUE,
-                                scratch_pool, scratch_pool);
-      if (err)
-        {
-          svn_pool_destroy(iterpool);
-
-          if (APR_STATUS_IS_ENOENT(err->apr_err) ||
-              SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))
-            {
-              svn_error_clear(err);
-              return SVN_NO_ERROR;
-            }
-
-          return svn_error_return(err);
-        }
-
-      for (hi = apr_hash_first(scratch_pool, unversioned);
-           hi;
-           hi = apr_hash_next(hi))
-        {
-          const char *name = svn__apr_hash_index_key(hi);
-
-          svn_pool_clear(iterpool);
-
-          /* The admin directory will show up, we don't want to delete it */
-          if (svn_wc_is_adm_dir(name, iterpool))
-            continue;
-
-          /* Versioned directories will show up, don't delete those either */
-          if (apr_hash_get(versioned_dirs, name, APR_HASH_KEY_STRING))
-            continue;
-
-          SVN_ERR(erase_unversioned_from_wc(svn_dirent_join(local_abspath,
-                                                            name, iterpool),
-                                            FALSE,
-                                            cancel_func, cancel_baton,
-                                            iterpool));
-        }
-
-      svn_pool_destroy(iterpool);
-    }
-
-  return SVN_NO_ERROR;
-}
-#endif
-
 svn_error_t *
 svn_wc_delete4(svn_wc_context_t *wc_ctx,
                const char *local_abspath,
@@ -842,10 +701,6 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
              Luckily most of this is for free once properties and pristine
              are handled in the WC-NG way. */
       SVN_ERR(svn_wc__db_temp_op_delete(wc_ctx->db, local_abspath, pool));
-#ifndef SVN_WC__SINGLE_DB
-      if (keep_local)
-        SVN_ERR(svn_wc__db_temp_set_keep_local(db, local_abspath, TRUE, pool));
-#endif
     }
 
   /* Report the deletion to the caller. */
@@ -872,12 +727,6 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
      become unversioned */
   if (!keep_local)
     {
-#ifndef SVN_WC__SINGLE_DB
-      if (!was_add)
-        SVN_ERR(erase_from_wc(wc_ctx->db, local_abspath, kind,
-                              cancel_func, cancel_baton, pool));
-      else
-#endif
         SVN_ERR(erase_unversioned_from_wc(local_abspath, TRUE,
                                           cancel_func, cancel_baton,
                                           pool));
@@ -902,10 +751,8 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
   const char *base_name;
   const char *parent_repos_relpath;
   const char *repos_root_url, *repos_uuid;
-  svn_boolean_t is_replace = FALSE;
   svn_boolean_t is_wc_root = FALSE;
   svn_node_kind_t kind;
-  svn_boolean_t node_exists;
   svn_wc__db_t *db = wc_ctx->db;
   svn_error_t *err;
   svn_wc__db_status_t status;
@@ -956,26 +803,18 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
       svn_error_clear(err);
       exists = FALSE;
       is_wc_root = FALSE;
-      node_exists = FALSE;
     }
   else
     {
       is_wc_root = FALSE;
       exists = TRUE;
-      node_exists = TRUE;
       switch (status)
         {
           case svn_wc__db_status_not_present:
-            node_exists = FALSE;
             break;
           case svn_wc__db_status_deleted:
-#ifndef SVN_WC__SINGLE_DB
-          case svn_wc__db_status_obstructed_delete:
-#endif
             /* A working copy root should never have a WORKING_NODE */
             SVN_ERR_ASSERT(!is_wc_root);
-            node_exists = FALSE;
-            is_replace = TRUE;
             break;
           case svn_wc__db_status_normal:
             if (copyfrom_url)
@@ -998,19 +837,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
         }
     } /* err */
 
-#ifndef SINGLE_DB
-    if (exists 
-        && ((kind == svn_node_dir && db_kind != svn_wc__db_kind_dir)
-            || (kind == svn_node_file && db_kind != svn_wc__db_kind_file)))
-      return svn_error_createf(
-                 SVN_ERR_WC_NODE_KIND_CHANGE, NULL,
-                 _("Can't replace '%s' with a node of a differing type; "
-                   "the deletion must be committed and the parent updated "
-                   "before adding '%s'"),
-                 svn_dirent_local_style(local_abspath, scratch_pool),
-                 svn_dirent_local_style(local_abspath, scratch_pool));
-#endif
-
   SVN_ERR(svn_wc__write_check(db, parent_abspath, scratch_pool));
 
   {
@@ -1027,12 +853,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
     if (err
         || parent_status == svn_wc__db_status_not_present
         || parent_status == svn_wc__db_status_excluded
-        || parent_status == svn_wc__db_status_absent
-#ifndef SVN_WC__SINGLE_DB
-        || parent_status == svn_wc__db_status_obstructed
-        || parent_status == svn_wc__db_status_obstructed_add
-#endif
-        )
+        || parent_status == svn_wc__db_status_absent)
       {
         return
           svn_error_createf(SVN_ERR_ENTRY_NOT_FOUND, err,
@@ -1041,11 +862,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                             svn_dirent_local_style(local_abspath,
                                                    scratch_pool));
       }
-    else if (parent_status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-             || parent_status == svn_wc__db_status_obstructed_delete
-#endif
-             )
+    else if (parent_status == svn_wc__db_status_deleted)
       {
         return
           svn_error_createf(SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
@@ -1125,70 +942,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                                                         scratch_pool),
                                  copyfrom_url, inner_url);
     }
-#ifndef SINGLE_DB
-  else if (kind == svn_node_dir && !node_exists && !is_replace)
-    {
-      svn_wc__db_status_t absent_status;
-      svn_wc__db_kind_t absent_kind;
-      const char *absent_repos_relpath, *absent_repos_root_url;
-      const char *absent_repos_uuid;
-      svn_revnum_t absent_revision;
-
-      /* Read the not present status from the parent working copy,
-         to reinsert it after hooking up the child working copy */
-
-      err = svn_wc__db_base_get_info(&absent_status,
-                                     &absent_kind,
-                                     &absent_revision,
-                                     &absent_repos_relpath,
-                                     &absent_repos_root_url,
-                                     &absent_repos_uuid,
-                                     NULL, NULL, NULL, NULL, NULL,
-                                     NULL, NULL, NULL, NULL,
-                                     db, local_abspath,
-                                     scratch_pool, scratch_pool);
-
-      if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-        return svn_error_return(err);
-      else
-        svn_error_clear(err);
-
-      /* Make sure this new directory has an admistrative subdirectory
-         created inside of it.
-
-         This creates a BASE_NODE for an added directory, really
-         it should create a WORKING_NODE.  We just remove the
-         node directly (without touching a possible not-present
-         node in the parent stub) */
-      SVN_ERR(svn_wc__internal_ensure_adm(db, local_abspath,
-                                          repos_root_url, repos_root_url,
-                                          repos_uuid, 0,
-                                          depth, scratch_pool));
-
-      if (!err && absent_status == svn_wc__db_status_not_present)
-        SVN_ERR(svn_wc__db_base_add_absent_node(db, local_abspath,
-                                                absent_repos_relpath,
-                                                absent_repos_root_url,
-                                                absent_repos_uuid,
-                                                absent_revision,
-                                                absent_kind,
-                                                absent_status,
-                                                NULL,
-                                                NULL,
-                                                scratch_pool));
-      else
-        SVN_ERR(svn_wc__db_base_remove(db, local_abspath, scratch_pool));
-    }
-#endif
-
-#ifndef SVN_WC__SINGLE_DB
-  if (kind == svn_node_dir && !exists)
-    {
-      /* Lock on parent needs to be propogated into the child db. */
-      SVN_ERR(svn_wc__db_wclock_obtain(db, local_abspath, 0, FALSE,
-                                       scratch_pool));
-    }
-#endif
 
   if (kind == svn_node_file)
     {
@@ -1216,7 +969,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
     {
       SVN_ERR(svn_wc__db_op_add_directory(db, local_abspath, NULL,
                                           scratch_pool));
-#ifdef SVN_WC__SINGLE_DB
       if (!exists)
         {
           /* If using the legacy 1.6 interface the parent lock may not
@@ -1231,7 +983,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
             SVN_ERR(svn_wc__db_wclock_obtain(db, local_abspath, 0, FALSE,
                                              scratch_pool));
         }
-#endif
     }
   else if (!is_wc_root)
     SVN_ERR(svn_wc__db_op_copy_dir(db,
@@ -1255,56 +1006,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
   else
     {
       svn_boolean_t owns_lock;
-#ifndef SVN_WC__SINGLE_DB
-      svn_wc__db_status_t absent_status;
-      svn_wc__db_kind_t absent_kind;
-      const char *absent_repos_relpath, *absent_repos_root_url;
-      const char *absent_repos_uuid;
-      svn_revnum_t absent_revision;
-
-      /* Read the not present status from the parent working copy,
-         to reinsert it after hooking up the child working copy */
-
-      err = svn_wc__db_base_get_info_from_parent(&absent_status,
-                                                 &absent_kind,
-                                                 &absent_revision,
-                                                 &absent_repos_relpath,
-                                                 &absent_repos_root_url,
-                                                 &absent_repos_uuid,
-                                                 db, local_abspath,
-                                                 scratch_pool, scratch_pool);
-
-      if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-        return svn_error_return(err);
-      else
-        svn_error_clear(err);
-
-      /* ### Temporary hack: Hook the inner working copy to the parent
-             working copy to work around that temp_op_make_copy() doesn't
-             add a working_node stub for its root if there is no base_node
-             stub. */
-      SVN_ERR(svn_wc__db_temp_set_parent_stub_to_normal(db, local_abspath,
-                                                        FALSE, scratch_pool));
-
-      /* Transfer all nodes below LOCAL_ABSPATH from BASE_NODE to
-         WORKING_NODE */
-      SVN_ERR(svn_wc__db_temp_op_make_copy(db, local_abspath, TRUE,
-                                           scratch_pool));
-
-      if (!err && absent_status == svn_wc__db_status_not_present)
-        SVN_ERR(svn_wc__db_base_add_absent_node(db, local_abspath,
-                                                absent_repos_relpath,
-                                                absent_repos_root_url,
-                                                absent_repos_uuid,
-                                                absent_revision,
-                                                absent_kind,
-                                                absent_status,
-                                                NULL,
-                                                NULL,
-                                                scratch_pool));
-      else
-        SVN_ERR(svn_wc__db_base_remove(db, local_abspath, scratch_pool));
-#else
       const char *tmpdir_abspath, *moved_abspath, *moved_adm_abspath;
       const char *adm_abspath = svn_wc__adm_child(local_abspath, "",
                                                   scratch_pool);
@@ -1332,7 +1033,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
       SVN_ERR(svn_wc__db_drop_root(db, moved_abspath, scratch_pool));
       SVN_ERR(svn_io_remove_dir2(moved_abspath, FALSE, NULL, NULL,
                                  scratch_pool));
-#endif
 
       /* The subdir is now part of our parent working copy. Our caller assumes
          that we return the new node locked, so obtain a lock if we didn't
@@ -1511,12 +1211,7 @@ revert_entry(svn_depth_t *depth,
       is_add_root = (strcmp(op_root_abspath, local_abspath) == 0);
     }
   else
-#ifdef SVN_WC__SINGLE_DB
     is_add_root = FALSE;
-#else
-    /* HACK: svn_wc__db_scan_addition doesn't allow this status! */
-    is_add_root = (status == svn_wc__db_status_obstructed_add);
-#endif
 
   /* Additions. */
   if (!replaced
@@ -1565,31 +1260,14 @@ revert_entry(svn_depth_t *depth,
         }
       else if (kind == svn_wc__db_kind_dir)
         {
-#ifndef SVN_WC__SINGLE_DB
           /* Before single-db we didn't have to perform a recursive delete
              here. With single-db we really must delete missing nodes */
-          if (disk_kind == svn_node_none
-              || status == svn_wc__db_status_obstructed_add)
-            {
-              /* Schedule add but missing, just remove the entry
-                 or it's missing an adm area in which case
-                 svn_wc_adm_probe_retrieve() returned the parent's
-                 adm_access, for which we definitely can't use the 'else'
-                 code path (as it will remove the parent from version
-                 control... (See issue 2425) */
-              SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath,
-                                                      pool));
-            }
-          else
-#endif
-            {
-              SVN_ERR(svn_wc__internal_remove_from_revision_control(
-                                           db,
-                                           local_abspath,
-                                           FALSE, FALSE,
-                                           cancel_func, cancel_baton,
-                                           pool));
-            }
+          SVN_ERR(svn_wc__internal_remove_from_revision_control(db,
+                                                                local_abspath,
+                                                                FALSE, FALSE,
+                                                                cancel_func,
+                                                                cancel_baton,
+                                                                pool));
         }
       else  /* Else it's `none', or something exotic like a symlink... */
         {
@@ -1778,13 +1456,7 @@ revert_internal(svn_wc__db_t *db,
   SVN_ERR(svn_io_check_path(local_abspath, &disk_kind, pool));
   if (!unversioned && (db_kind == svn_wc__db_kind_dir))
     {
-#ifndef SVN_WC__SINGLE_DB
-      if ((disk_kind != svn_node_dir)
-          && (status != svn_wc__db_status_added)
-          && (status != svn_wc__db_status_obstructed_add))
-#else
       if (disk_kind == svn_node_file)
-#endif
         {
           /* When the directory itself is missing, we can't revert without
              hitting the network.  Someday a '--force' option will
@@ -2170,18 +1842,6 @@ svn_wc__internal_remove_from_revision_co
         }
 
     }  /* done with file case */
-#ifndef SVN_WC__SINGLE_DB
-  else if (status == svn_wc__db_status_obstructed
-           || status == svn_wc__db_status_obstructed_add
-           || status == svn_wc__db_status_obstructed_delete)
-    {
-      /* The directory is missing  so don't try to recurse, in
-         not existing administrative data, just delete the
-         entry in the parent directory. */
-      SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath,
-                                              scratch_pool));
-    }
-#endif
   else /* looking at THIS_DIR */
     {
       apr_pool_t *iterpool = svn_pool_create(scratch_pool);

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c Wed Sep 15 07:44:02 2010
@@ -77,12 +77,7 @@ cleanup_internal(svn_wc__db_t *db,
                  apr_pool_t *scratch_pool)
 {
   int wc_format;
-#ifdef SVN_WC__SINGLE_DB
   const char *cleanup_abspath;
-#else
-  const apr_array_header_t *children;
-  int i;
-#endif
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
 
   /* Check cancellation; note that this catches recursive calls too. */
@@ -92,14 +87,9 @@ cleanup_internal(svn_wc__db_t *db,
   /* Can we even work with this directory?  */
   SVN_ERR(can_be_cleaned(&wc_format, db, adm_abspath, iterpool));
 
-#ifdef SVN_WC__SINGLE_DB
   /* ### This fails if ADM_ABSPATH is locked indirectly via a
      ### recursive lock on an ancestor. */
   SVN_ERR(svn_wc__db_wclock_obtain(db, adm_abspath, -1, TRUE, iterpool));
-#else
-  /* Lock this working copy directory, or steal an existing lock */
-  SVN_ERR(svn_wc__db_wclock_obtain(db, adm_abspath, 0, TRUE, iterpool));
-#endif
 
   /* Run our changes before the subdirectories. We may not have to recurse
      if we blow away a subdir.  */
@@ -107,39 +97,6 @@ cleanup_internal(svn_wc__db_t *db,
     SVN_ERR(svn_wc__wq_run(db, adm_abspath, cancel_func, cancel_baton,
                            iterpool));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Recurse on versioned, existing subdirectories.  */
-  SVN_ERR(svn_wc__db_read_children(&children, db, adm_abspath,
-                                   scratch_pool, iterpool));
-  for (i = 0; i < children->nelts; i++)
-    {
-      const char *name = APR_ARRAY_IDX(children, i, const char *);
-      const char *entry_abspath;
-      svn_wc__db_kind_t kind;
-
-      svn_pool_clear(iterpool);
-      entry_abspath = svn_dirent_join(adm_abspath, name, iterpool);
-
-      SVN_ERR(svn_wc__db_read_kind(&kind, db, entry_abspath, FALSE, iterpool));
-
-      if (kind == svn_wc__db_kind_dir)
-        {
-          svn_node_kind_t disk_kind;
-
-          SVN_ERR(svn_io_check_path(entry_abspath, &disk_kind, iterpool));
-          if (disk_kind == svn_node_dir)
-            SVN_ERR(cleanup_internal(db, entry_abspath,
-                                     cancel_func, cancel_baton,
-                                     iterpool));
-        }
-    }
-#endif
-
-#ifndef SVN_WC__SINGLE_DB
-  /* Purge the DAV props at and under ADM_ABSPATH. */
-  /* ### in single-db mode, we need do this purge at the top-level only. */
-  SVN_ERR(svn_wc__db_base_clear_dav_cache_recursive(db, adm_abspath, iterpool));
-#else
   SVN_ERR(svn_wc__db_get_wcroot(&cleanup_abspath, db, adm_abspath,
                                 iterpool, iterpool));
 
@@ -150,8 +107,6 @@ cleanup_internal(svn_wc__db_t *db,
    */
   if (strcmp(cleanup_abspath, adm_abspath) == 0)
     {
-#endif
-
     /* Cleanup the tmp area of the admin subdir, if running the log has not
        removed it!  The logs have been run, so anything left here has no hope
        of being useful. */
@@ -159,9 +114,7 @@ cleanup_internal(svn_wc__db_t *db,
 
       /* Remove unreferenced pristine texts */
       SVN_ERR(svn_wc__db_pristine_cleanup(db, adm_abspath, iterpool));
-#ifdef SVN_WC__SINGLE_DB
     }
-#endif
 
   /* All done, toss the lock */
   SVN_ERR(svn_wc__db_wclock_release(db, adm_abspath, iterpool));
@@ -195,12 +148,10 @@ svn_wc_cleanup3(svn_wc_context_t *wc_ctx
   SVN_ERR(cleanup_internal(db, local_abspath, cancel_func, cancel_baton,
                            scratch_pool));
 
-#ifdef SINGLE_DB
-  /* Purge the DAV props at and under LOCAL_ABSPATH. */
-  /* ### in single-db mode, we need do this purge at the top-level only. */
+  /* The DAV cache suffers from flakiness from time to time, and the
+     pre-1.7 prescribed workarounds aren't as user-friendly in WC-NG. */
   SVN_ERR(svn_wc__db_base_clear_dav_cache_recursive(db, local_abspath,
                                                     scratch_pool));
-#endif
 
   /* We're done with this DB, so proactively close it.  */
   SVN_ERR(svn_wc__db_close(db));

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c Wed Sep 15 07:44:02 2010
@@ -263,120 +263,6 @@ copy_versioned_dir(svn_wc__db_t *db,
                                              tmp_dst_abspath, dst_abspath,
                                              scratch_pool, scratch_pool));
           work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
-
-#ifndef SVN_WC__SINGLE_DB
-          if (kind == svn_node_dir)
-            {
-              /* Create the per-directory db in the copied directory.  The
-                 copy is not yet connected to the parent so we don't need
-                 to use a workqueue.  This will be removed when we
-                 centralise. */
-              const char *dst_parent_abspath, *name;
-              const char *repos_root_url, *repos_uuid;
-              svn_revnum_t revision;
-              svn_depth_t depth;
-              svn_wc__db_status_t status;
-              svn_boolean_t have_base;
-
-              svn_dirent_split(&dst_parent_abspath, &name, dst_abspath,
-                               scratch_pool);
-
-              SVN_ERR(svn_wc__db_read_info(&status,
-                                           NULL, /* kind */
-                                           &revision,
-                                           NULL, /* repos_relpath */
-                                           &repos_root_url,
-                                           &repos_uuid,
-                                           NULL, /* changed_rev */
-                                           NULL, /* changed_date */
-                                           NULL, /* changed_author */
-                                           NULL, /* last_mod_time */
-                                           &depth,
-                                           NULL, /* checksum */
-                                           NULL, /* translated_size */
-                                           NULL, /* target */
-                                           NULL, /* changelist */
-                                           NULL, /* original_repos_relpath */
-                                           NULL, /* original_root_url */
-                                           NULL, /* original_uuid */
-                                           NULL, /* original_revision */
-                                           NULL, /* props_mod */
-                                           &have_base,
-                                           NULL, /* have_work */
-                                           NULL, /* conflicted */
-                                           NULL, /* lock */
-                                           db, src_abspath,
-                                           scratch_pool, scratch_pool));
-
-              if (!repos_root_url)
-                {
-                  if (status == svn_wc__db_status_deleted)
-                    {
-                      const char *work_del_abspath;
-
-                      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, NULL,
-                                                       &work_del_abspath,
-                                                       db, src_abspath,
-                                                       scratch_pool,
-                                                       scratch_pool));
-                      if (work_del_abspath)
-                        {
-                          const char *parent_del_abspath
-                            = svn_dirent_dirname(work_del_abspath,
-                                                 scratch_pool);
-
-                          SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL,
-                                                           &repos_root_url,
-                                                           &repos_uuid,
-                                                           NULL, NULL, NULL,
-                                                           NULL,
-                                                           db,
-                                                           parent_del_abspath,
-                                                           scratch_pool,
-                                                           scratch_pool));
-                        }
-                      else
-                        SVN_ERR(svn_wc__db_scan_base_repos(NULL,
-                                                           &repos_root_url,
-                                                           &repos_uuid,
-                                                           db, src_abspath,
-                                                           scratch_pool,
-                                                           scratch_pool));
-                    }
-                  else if (status == svn_wc__db_status_added || !have_base)
-                    SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL,
-                                                     &repos_root_url,
-                                                     &repos_uuid,
-                                                     NULL, NULL, NULL, NULL,
-                                                     db, src_abspath,
-                                                     scratch_pool,
-                                                     scratch_pool));
-                  else
-                    SVN_ERR(svn_wc__db_scan_base_repos(NULL, &repos_root_url,
-                                                       &repos_uuid,
-                                                       db, src_abspath,
-                                                       scratch_pool,
-                                                       scratch_pool));
-                }
-
-              /* Use the repos_root as root node url, because we are going to
-                 remove the node directly anyway. */
-              SVN_ERR(svn_wc__internal_ensure_adm(db, tmp_dst_abspath,
-                                                  repos_root_url,
-                                                  repos_root_url,
-                                                  repos_uuid, revision, depth,
-                                                  scratch_pool));
-
-              /* That creates a base node which we do not want so delete it. */
-              SVN_ERR(svn_wc__db_base_remove(db, tmp_dst_abspath,
-                                             scratch_pool));
-
-              /* ### Need to close the database so that Windows can move
-                 ### the directory. */
-              SVN_ERR(svn_wc__db_temp_forget_directory(db, tmp_dst_abspath,
-                                                       scratch_pool));
-            }
-#endif
         }
     }
 
@@ -385,17 +271,6 @@ copy_versioned_dir(svn_wc__db_t *db,
   SVN_ERR(svn_wc__wq_run(db, dir_abspath,
                          cancel_func, cancel_baton, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  if (kind == svn_node_dir)
-    {
-      /* The first copy only does the parent stub, this second copy
-         does the full node but can only happen after the workqueue
-         has moved the destination into place. */
-      SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath,
-                                 NULL, scratch_pool));
-    }
-#endif
-
   if (notify_func)
     {
       svn_wc_notify_t *notify
@@ -642,9 +517,6 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
                      svn_dirent_local_style(dst_abspath, scratch_pool));
 
           case svn_wc__db_status_deleted:
-#ifndef SVN_WC__SINGLE_DB
-          case svn_wc__db_status_obstructed_delete:
-#endif
           case svn_wc__db_status_not_present:
             break; /* OK to add */
 
@@ -658,14 +530,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
 
   SVN_ERR(svn_io_check_path(src_abspath, &src_kind, scratch_pool));
 
-#ifndef SINGLE_DB
-  if (src_kind == svn_node_file ||
-      (src_kind == svn_node_none
-        && (src_db_kind == svn_wc__db_kind_file
-            || src_db_kind == svn_wc__db_kind_symlink)))
-#else
   if (!metadata_only)
-#endif
     {
       svn_node_kind_t dst_kind;
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c Wed Sep 15 07:44:02 2010
@@ -251,9 +251,6 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
         SVN_ERR_MALFUNCTION();
 
       case svn_wc__db_status_added:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed_add:
-#endif
         /* Would have to check parents if we want to allow this */
         return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                                  _("Cannot exclude '%s': it is to be added "
@@ -261,9 +258,6 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
                                  svn_dirent_local_style(local_abspath,
                                                         scratch_pool));
       case svn_wc__db_status_deleted:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed_delete:
-#endif
         /* Would have to check parents if we want to allow this */
         return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                                  _("Cannot exclude '%s': it is to be deleted "
@@ -273,9 +267,6 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
 
       case svn_wc__db_status_normal:
       case svn_wc__db_status_incomplete:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed:
-#endif
       default:
         break; /* Ok to exclude */
     }
@@ -363,22 +354,14 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
                                svn_dirent_local_style(local_abspath,
                                                       scratch_pool));
 
-    if (status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-        || status == svn_wc__db_status_obstructed_delete
-#endif
-        )
+    if (status == svn_wc__db_status_deleted)
       return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                                _("Cannot crop '%s': it is going to be removed "
                                  "from repository. Try commit instead"),
                                svn_dirent_local_style(local_abspath,
                                                       scratch_pool));
 
-    if (status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-        || status == svn_wc__db_status_obstructed_add
-#endif
-        )
+    if (status == svn_wc__db_status_added)
       return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                                _("Cannot crop '%s': it is to be added "
                                  "to the repository. Try commit instead"),

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c Wed Sep 15 07:44:02 2010
@@ -1128,7 +1128,7 @@ svn_wc_get_ancestry(char **url,
 
   SVN_ERR(svn_wc__get_entry(&entry, svn_wc__adm_get_db(adm_access),
                             local_abspath, FALSE,
-                            svn_node_unknown, FALSE,
+                            svn_node_unknown,
                             pool, pool));
 
   if (url)
@@ -2047,27 +2047,11 @@ svn_wc_mark_missing_deleted(const char *
                             svn_wc_adm_access_t *parent,
                             apr_pool_t *pool)
 {
-#ifdef SINGLE_DB
   /* With a single DB a node will never be missing */
   return svn_error_createf(SVN_ERR_WC_PATH_FOUND, NULL,
                            _("Unexpectedly found '%s': "
                              "path is marked 'missing'"),
                            svn_dirent_local_style(path, pool));
-#else
-  const char *local_abspath;
-  svn_wc_context_t *wc_ctx;
-
-  SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
-                                         svn_wc__adm_get_db(parent), pool));
-
-  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
-
-  SVN_ERR(svn_wc__temp_mark_missing_not_present(local_abspath, wc_ctx, pool));
-
-  SVN_ERR(svn_wc_context_destroy(wc_ctx));
-
-  return SVN_NO_ERROR;
-#endif
 }
 
 
@@ -3927,7 +3911,6 @@ svn_wc__entry_versioned_internal(const s
   SVN_ERR(svn_wc__get_entry_versioned(entry, svn_wc__adm_get_db(adm_access),
                                       local_abspath, svn_node_unknown,
                                       show_hidden,
-                                      FALSE, /* NEED_PARENT_STUB */
                                       pool, pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c Wed Sep 15 07:44:02 2010
@@ -271,11 +271,7 @@ get_base_info_for_deleted(svn_wc_entry_t
                                    NULL, NULL, NULL, NULL, NULL, NULL,
                                    db, parent_abspath,
                                    scratch_pool, scratch_pool));
-      if (parent_status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-          || parent_status == svn_wc__db_status_obstructed_add
-#endif
-          )
+      if (parent_status == svn_wc__db_status_added)
         SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
                                          &parent_repos_relpath,
                                          &entry->repos,
@@ -407,11 +403,7 @@ get_base_info_for_deleted(svn_wc_entry_t
                                        NULL, NULL, NULL, NULL, NULL, NULL,
                                        db, parent_abspath,
                                        scratch_pool, scratch_pool));
-          if (parent_status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-              || parent_status == svn_wc__db_status_obstructed_add
-#endif
-              )
+          if (parent_status == svn_wc__db_status_added)
             SVN_ERR(svn_wc__db_scan_addition(&parent_status,
                                              NULL,
                                              NULL, NULL, NULL,
@@ -654,38 +646,12 @@ read_one_entry(const svn_wc_entry_t **ne
           entry->incomplete = (status == svn_wc__db_status_incomplete);
         }
     }
-  else if (status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-           || status == svn_wc__db_status_obstructed_delete
-#endif
-           )
+  else if (status == svn_wc__db_status_deleted)
     {
-#ifdef SVN_WC__SINGLE_DB
       svn_node_kind_t path_kind;
-#endif
       /* ### we don't have to worry about moves, so this is a delete. */
       entry->schedule = svn_wc_schedule_delete;
 
-      /* ### keep_local ... ugh. hacky.  */
-      /* We only read keep_local in the directory itself, because we
-         can't rely on the actual record being available in the parent
-         stub when the directory is recorded as deleted in the directory
-         itself. (This last value is the status that brought us in this
-         if block).
-
-         This is safe because we will only write this flag in the
-         directory itself (see mark_deleted() in adm_ops.c), and also
-         because we will never use keep_local in the final version of
-         WC-NG. With a central db and central pristine store we can
-         remove working copy directories directly. So any left over
-         directories after the delete operation are always kept locally.
-      */
-#ifndef SVN_WC__SINGLE_DB
-      if (*entry->name == '\0')
-        SVN_ERR(svn_wc__db_temp_determine_keep_local(&entry->keep_local,
-                                                     db, entry_abspath,
-                                                     scratch_pool));
-#else
       /* If there is still a directory on-disk we keep it, if not it is
          already deleted. Simple, isn't it? 
          
@@ -696,13 +662,8 @@ read_one_entry(const svn_wc_entry_t **ne
        */
       SVN_ERR(svn_io_check_path(entry_abspath, &path_kind, scratch_pool));
       entry->keep_local = (path_kind == svn_node_dir);
-#endif
     }
-  else if (status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-           || status == svn_wc__db_status_obstructed_add
-#endif
-           )
+  else if (status == svn_wc__db_status_added)
     {
       svn_wc__db_status_t work_status;
       const char *op_root_abspath;
@@ -784,18 +745,7 @@ read_one_entry(const svn_wc_entry_t **ne
                   && !SVN_IS_VALID_REVNUM(entry->cmt_rev))
                 entry->revision = 0;
 
-#ifndef SVN_WC__SINGLE_DB
-              if (status == svn_wc__db_status_obstructed_add)
-                entry->revision = SVN_INVALID_REVNUM;
-
-              /* ### when we're reading a directory that is not present,
-                 ### then it must be "normal" rather than "add".  */
-              if (*entry->name == '\0'
-                  && status == svn_wc__db_status_obstructed_add)
-                entry->schedule = svn_wc_schedule_normal;
-              else
-#endif
-                entry->schedule = svn_wc_schedule_add;
+              entry->schedule = svn_wc_schedule_add;
             }
         }
 
@@ -803,15 +753,6 @@ read_one_entry(const svn_wc_entry_t **ne
          then we cannot begin a scan for data. The original node may
          have important data. Set up stuff to kill that idea off,
          and finish up this entry.  */
-#ifndef SVN_WC__SINGLE_DB
-      if (status == svn_wc__db_status_obstructed_add)
-        {
-          entry->cmt_rev = SVN_INVALID_REVNUM;
-          work_status = svn_wc__db_status_normal;
-          scanned_original_relpath = NULL;
-        }
-      else
-#endif
         {
           SVN_ERR(svn_wc__db_scan_addition(&work_status,
                                            &op_root_abspath,
@@ -1009,14 +950,6 @@ read_one_entry(const svn_wc_entry_t **ne
       entry->schedule = svn_wc_schedule_normal;
       entry->deleted = TRUE;
     }
-#ifndef SVN_WC__SINGLE_DB
-  else if (status == svn_wc__db_status_obstructed)
-    {
-      /* ### set some values that should (hopefully) let this directory
-         ### be usable.  */
-      entry->revision = SVN_INVALID_REVNUM;
-    }
-#endif
   else if (status == svn_wc__db_status_absent)
     {
       entry->absent = TRUE;
@@ -1067,24 +1000,11 @@ read_one_entry(const svn_wc_entry_t **ne
 
      ### the last three should probably have an "implied" REPOS_RELPATH
   */
-#ifdef SVN_WC__SINGLE_DB
-  SVN_ERR_ASSERT(repos_relpath != NULL
-                 || entry->schedule == svn_wc_schedule_delete
-                 || status == svn_wc__db_status_not_present
-                 || status == svn_wc__db_status_absent
-                 || status == svn_wc__db_status_excluded
-                 );
-#else
   SVN_ERR_ASSERT(repos_relpath != NULL
                  || entry->schedule == svn_wc_schedule_delete
-                 || status == svn_wc__db_status_obstructed
-                 || status == svn_wc__db_status_obstructed_add
-                 || status == svn_wc__db_status_obstructed_delete
                  || status == svn_wc__db_status_not_present
                  || status == svn_wc__db_status_absent
-                 || status == svn_wc__db_status_excluded
-                 );
-#endif
+                 || status == svn_wc__db_status_excluded);
   if (repos_relpath)
     entry->url = svn_path_url_add_component2(entry->repos,
                                              repos_relpath,
@@ -1334,7 +1254,7 @@ read_entries(apr_hash_t **entries,
    which the entry information is located, and *ENTRY_NAME to the entry name
    to access that entry.
 
-   KIND and NEED_PARENT_STUB are as in svn_wc__get_entry().
+   KIND is as in svn_wc__get_entry().
 
    Return the results in RESULT_POOL and use SCRATCH_POOL for temporary
    allocations. */
@@ -1344,16 +1264,12 @@ get_entry_access_info(const char **adm_a
                       svn_wc__db_t *db,
                       const char *local_abspath,
                       svn_node_kind_t kind,
-                      svn_boolean_t need_parent_stub,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
 {
   svn_wc_adm_access_t *adm_access;
   svn_boolean_t read_from_subdir = FALSE;
 
-  /* Can't ask for the parent stub if the node is a file.  */
-  SVN_ERR_ASSERT(!need_parent_stub || kind != svn_node_file);
-
   /* If the caller didn't know the node kind, then stat the path. Maybe
      it is really there, and we can speed up the steps below.  */
   if (kind == svn_node_unknown)
@@ -1397,10 +1313,10 @@ get_entry_access_info(const char **adm_a
         {
           /* We found a directory for this UNKNOWN node. Determine whether
              we need to read inside it.  */
-          read_from_subdir = !need_parent_stub;
+          read_from_subdir = TRUE;
         }
     }
-  else if (kind == svn_node_dir && !need_parent_stub)
+  else if (kind == svn_node_dir)
     {
       read_from_subdir = TRUE;
     }
@@ -1430,19 +1346,14 @@ svn_wc__get_entry(const svn_wc_entry_t *
                   const char *local_abspath,
                   svn_boolean_t allow_unversioned,
                   svn_node_kind_t kind,
-                  svn_boolean_t need_parent_stub,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
   const char *dir_abspath;
   const char *entry_name;
 
-  /* Can't ask for the parent stub if the node is a file.  */
-  SVN_ERR_ASSERT(!need_parent_stub || kind != svn_node_file);
-
   SVN_ERR(get_entry_access_info(&dir_abspath, &entry_name, db, local_abspath,
-                                kind, need_parent_stub, scratch_pool,
-                                scratch_pool));
+                                kind, scratch_pool, scratch_pool));
 
     {
       const svn_wc_entry_t *parent_entry;
@@ -1491,8 +1402,7 @@ svn_wc__get_entry(const svn_wc_entry_t *
              Redo the fetch, but "insist" we are trying to find a file.
              This will read from the parent directory of the "file".  */
           err = svn_wc__get_entry(entry, db, local_abspath, allow_unversioned,
-                                  svn_node_file, FALSE,
-                                  result_pool, scratch_pool);
+                                  svn_node_file, result_pool, scratch_pool);
           if (err == SVN_NO_ERROR)
             return SVN_NO_ERROR;
           if (err->apr_err != SVN_ERR_NODE_UNEXPECTED_KIND)
@@ -1530,25 +1440,6 @@ svn_wc__get_entry(const svn_wc_entry_t *
                              svn_dirent_local_style(local_abspath,
                                                     scratch_pool));
 
-  if (kind == svn_node_unknown)
-    {
-      /* They wanted a (directory) stub, but this isn't a directory.  */
-      if (need_parent_stub && (*entry)->kind != svn_node_dir)
-        return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
-                                 _("'%s' is not of the right kind"),
-                                 svn_dirent_local_style(local_abspath,
-                                                        scratch_pool));
-
-      /* The actual (directory) information was wanted, but we got a stub.  */
-      if (!need_parent_stub
-          && (*entry)->kind == svn_node_dir
-          && *(*entry)->name != '\0')
-        return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
-                                 _("'%s' is not of the right kind"),
-                                 svn_dirent_local_style(local_abspath,
-                                                        scratch_pool));
-    }
-
   return SVN_NO_ERROR;
 }
 
@@ -1650,6 +1541,7 @@ insert_base_node(svn_sqlite__db_t *sdb,
 {
   svn_sqlite__stmt_t *stmt;
 
+#ifndef SVN_WC__NODES_ONLY
   /* ### NODE_DATA when switching to NODE_DATA, replace the
      query below with STMT_INSERT_BASE_NODE_DATA_FOR_ENTRY_1
      and adjust the parameters bound. Can't do that yet. */
@@ -1681,14 +1573,6 @@ insert_base_node(svn_sqlite__db_t *sdb,
 
   SVN_ERR(svn_sqlite__bind_int64(stmt, 7, base_node->revision));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* ### in per-subdir operation, if we're about to write a directory and
-     ### it is *not* "this dir", then we're writing a row in the parent
-     ### directory about the child. note that in the kind.  */
-  if (base_node->kind == svn_node_dir && *base_node->local_relpath != '\0')
-    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "subdir"));
-  else
-#endif
   /* ### kind might be "symlink" or "unknown" */
   if (base_node->kind == svn_node_none)
     SVN_ERR(svn_sqlite__bind_text(stmt, 5, "unknown"));
@@ -1722,61 +1606,61 @@ insert_base_node(svn_sqlite__db_t *sdb,
   /* Execute and reset the insert clause. */
   SVN_ERR(svn_sqlite__insert(NULL, stmt));
 
-#ifdef SVN_WC__NODE_DATA
+#endif
+#ifdef SVN_WC__NODES
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                    STMT_INSERT_BASE_NODE_DATA_FOR_ENTRY_2));
+                                    STMT_INSERT_BASE_NODE_FOR_ENTRY_1));
 
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 1, base_node->wc_id));
-  SVN_ERR(svn_sqlite__bind_text(stmt, 2, base_node->local_relpath));
-
-  if (base_node->parent_relpath)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 3, base_node->parent_relpath));
+  SVN_ERR(svn_sqlite__bindf(stmt, "issisr",
+                            base_node->wc_id,
+                            base_node->local_relpath,
+                            base_node->parent_relpath,
+                            base_node->repos_id,
+                            base_node->repos_relpath,
+                            base_node->revision));
 
   if (base_node->presence == svn_wc__db_status_not_present)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 4, "not-present"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 7, "not-present"));
   else if (base_node->presence == svn_wc__db_status_normal)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 4, "normal"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 7, "normal"));
   else if (base_node->presence == svn_wc__db_status_absent)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 4, "absent"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 7, "absent"));
   else if (base_node->presence == svn_wc__db_status_incomplete)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 4, "incomplete"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 7, "incomplete"));
   else if (base_node->presence == svn_wc__db_status_excluded)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 4, "excluded"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 7, "excluded"));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* ### in per-subdir operation, if we're about to write a directory and
-     ### it is *not* "this dir", then we're writing a row in the parent
-     ### directory about the child. note that in the kind.  */
-  if (base_node->kind == svn_node_dir && *base_node->local_relpath != '\0')
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "subdir"));
-  else
-#endif
   /* ### kind might be "symlink" or "unknown" */
   if (base_node->kind == svn_node_none)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "unknown"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "unknown"));
   else
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5,
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8,
                                   svn_node_kind_to_word(base_node->kind)));
 
   if (base_node->checksum)
-    SVN_ERR(svn_sqlite__bind_checksum(stmt, 6, base_node->checksum,
+    SVN_ERR(svn_sqlite__bind_checksum(stmt, 9, base_node->checksum,
                                       scratch_pool));
 
   /* ### strictly speaking, changed_rev should be valid for present nodes. */
   if (SVN_IS_VALID_REVNUM(base_node->changed_rev))
-    SVN_ERR(svn_sqlite__bind_int64(stmt, 7, base_node->changed_rev));
+    SVN_ERR(svn_sqlite__bind_int64(stmt, 10, base_node->changed_rev));
   if (base_node->changed_date)
-    SVN_ERR(svn_sqlite__bind_int64(stmt, 8, base_node->changed_date));
+    SVN_ERR(svn_sqlite__bind_int64(stmt, 11, base_node->changed_date));
   if (base_node->changed_author)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 9, base_node->changed_author));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 12, base_node->changed_author));
 
-  SVN_ERR(svn_sqlite__bind_text(stmt, 10, svn_depth_to_word(base_node->depth)));
+  SVN_ERR(svn_sqlite__bind_text(stmt, 13, svn_depth_to_word(base_node->depth)));
 
   if (base_node->properties)
-    SVN_ERR(svn_sqlite__bind_properties(stmt, 11, base_node->properties,
+    SVN_ERR(svn_sqlite__bind_properties(stmt, 14, base_node->properties,
                                         scratch_pool));
 
+  if (base_node->translated_size != SVN_INVALID_FILESIZE)
+    SVN_ERR(svn_sqlite__bind_int64(stmt, 15, base_node->translated_size));
+
+  SVN_ERR(svn_sqlite__bind_int64(stmt, 16, base_node->last_mod_time));
+
   /* Execute and reset the insert clause. */
   SVN_ERR(svn_sqlite__insert(NULL, stmt));
 
@@ -1814,15 +1698,6 @@ insert_working_node(svn_sqlite__db_t *sd
   else if (working_node->presence == svn_wc__db_status_excluded)
     SVN_ERR(svn_sqlite__bind_text(stmt, 4, "excluded"));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* ### in per-subdir operation, if we're about to write a directory and
-     ### it is *not* "this dir", then we're writing a row in the parent
-     ### directory about the child. note that in the kind.  */
-  if (working_node->kind == svn_node_dir
-      && *working_node->local_relpath != '\0')
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "subdir"));
-  else
-#endif
   if (working_node->kind == svn_node_none)
     SVN_ERR(svn_sqlite__bind_text(stmt, 5, "unknown"));
   else
@@ -1897,15 +1772,6 @@ insert_working_node(svn_sqlite__db_t *sd
   else if (working_node->presence == svn_wc__db_status_excluded)
     SVN_ERR(svn_sqlite__bind_text(stmt, 5, "excluded"));
 
-#ifndef SVN_WC__SINGLE_DB
-  /* ### in per-subdir operation, if we're about to write a directory and
-     ### it is *not* "this dir", then we're writing a row in the parent
-     ### directory about the child. note that in the kind.  */
-  if (working_node->kind == svn_node_dir
-      && *working_node->local_relpath != '\0')
-    SVN_ERR(svn_sqlite__bind_text(stmt, 6, "subdir"));
-  else
-#endif
   if (working_node->kind == svn_node_none)
     SVN_ERR(svn_sqlite__bind_text(stmt, 6, "unknown"));
   else
@@ -2208,7 +2074,6 @@ write_entry(svn_wc__db_t *db,
         {
           base_node->kind = entry->kind;
 
-#ifdef SVN_WC__SINGLE_DB
           /* All subdirs are initially incomplete, they stop being
              incomplete when the entries file in the subdir is
              upgraded and remain incomplete if that doesn't happen. */
@@ -2218,7 +2083,6 @@ write_entry(svn_wc__db_t *db,
               base_node->presence = svn_wc__db_status_incomplete;
             }
           else
-#endif
             {
 
               if (entry->incomplete)
@@ -2344,7 +2208,6 @@ write_entry(svn_wc__db_t *db,
                                        svn_checksum_md5,
                                        entry->checksum, scratch_pool));
 
-#ifdef SVN_WC__SINGLE_DB
       /* All subdirs start of incomplete, and stop being incomplete
          when the entries file in the subdir is upgraded. */
       if (entry->kind == svn_node_dir
@@ -2353,9 +2216,7 @@ write_entry(svn_wc__db_t *db,
           working_node->presence = svn_wc__db_status_incomplete;
           working_node->kind = svn_node_dir;
         }
-      else
-#endif
-      if (entry->schedule == svn_wc_schedule_delete)
+      else if (entry->schedule == svn_wc_schedule_delete)
         {
           if (entry->incomplete)
             {
@@ -2802,7 +2663,7 @@ svn_wc_walk_entries3(const char *path,
         }
 
       SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, FALSE,
-                                svn_node_file, FALSE, pool, pool));
+                                svn_node_file, pool, pool));
 
       err = walk_callbacks->found_entry(path, entry, walk_baton, pool);
       if (err)
@@ -2822,54 +2683,3 @@ svn_wc_walk_entries3(const char *path,
                                svn_dirent_local_style(local_abspath, pool)),
        walk_baton, pool);
 }
-
-#ifndef SVN_WC__SINGLE_DB
-svn_error_t *
-svn_wc__temp_mark_missing_not_present(const char *local_abspath,
-                                      svn_wc_context_t *wc_ctx,
-                                      apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
-  const char *repos_relpath, *repos_root_url, *repos_uuid;
-  svn_revnum_t revision;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-  SVN_ERR(svn_wc__db_read_info(&status, &kind, &revision, &repos_relpath,
-                               &repos_root_url, &repos_uuid, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL,
-                               wc_ctx->db, local_abspath,
-                               scratch_pool, scratch_pool));
-  if (kind == svn_wc__db_kind_dir
-      && status == svn_wc__db_status_obstructed_delete)
-    {
-      if (!repos_relpath)
-        SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
-                                           &repos_uuid,
-                                           wc_ctx->db, local_abspath,
-                                           scratch_pool, scratch_pool));
-
-      SVN_ERR(svn_wc__db_temp_op_remove_entry(wc_ctx->db, local_abspath,
-                                              scratch_pool));
-
-      if (!SVN_IS_VALID_REVNUM(revision))
-        revision = 0; /* Just make one up */
-
-      SVN_ERR(svn_wc__db_base_add_absent_node(wc_ctx->db, local_abspath,
-                                              repos_relpath, repos_root_url,
-                                              repos_uuid, revision,
-                                              svn_wc__db_kind_dir,
-                                              svn_wc__db_status_not_present,
-                                              NULL, NULL, scratch_pool));
-
-      return SVN_NO_ERROR;
-    }
-
-  return svn_error_createf(SVN_ERR_WC_PATH_FOUND, NULL,
-                           _("Unexpectedly found '%s': "
-                             "path is marked 'missing'"),
-                           svn_dirent_local_style(local_abspath, scratch_pool));
-}
-#endif

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/entries.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/entries.h?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/entries.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/entries.h Wed Sep 15 07:44:02 2010
@@ -52,19 +52,9 @@ extern "C" {
  * If you specify FILE/DIR, and the entry is *something else*, then
  * SVN_ERR_NODE_UNEXPECTED_KIND will be returned.
  *
- * For directory nodes, sometimes the caller may want the "stub" from the
- * parent directory. This is usually to examine the DELETED flag. When
- * this is desired, pass TRUE for NEED_PARENT_STUB. It is illegal to pass
- * TRUE if KIND == FILE.
- *
  * If KIND == UNKNOWN, and you request the parent stub, and the node turns
  * out to NOT be a directory, then SVN_ERR_NODE_UNEXPECTED_KIND is returned.
  *
- * If KIND == UNKNOWN, and you request the actual file/dir data (by setting
- * NEED_PARENT_STUB to FALSE), and the node turns out to be a DIR (as
- * specified by the parent), but the subdirectory is NOT present (obstructed
- * or missing), then SVN_ERR_NODE_UNEXPECTED_KIND is returned.
- *
  * NOTE: if SVN_ERR_NODE_UNEXPECTED_KIND is returned, then the ENTRY *IS*
  * valid and may be examined. For any other error, ENTRY *IS NOT* valid.
  *
@@ -81,7 +71,6 @@ svn_wc__get_entry(const svn_wc_entry_t *
                   const char *local_abspath,
                   svn_boolean_t allow_unversioned,
                   svn_node_kind_t kind,
-                  svn_boolean_t need_parent_stub,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool);