You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/09/10 19:33:25 UTC

svn commit: r995885 [1/3] - in /subversion/branches/atomic-revprop: ./ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_neon/ subversion/libsvn_ra_serf/ subversion/libsvn_repos/ subversion/libsvn_subr/...

Author: danielsh
Date: Fri Sep 10 17:33:24 2010
New Revision: 995885

URL: http://svn.apache.org/viewvc?rev=995885&view=rev
Log:
On the atomic-revprop branch, merge r995396 through r995842 from trunk.

Modified:
    subversion/branches/atomic-revprop/   (props changed)
    subversion/branches/atomic-revprop/subversion/include/private/svn_dep_compat.h
    subversion/branches/atomic-revprop/subversion/include/private/svn_skel.h
    subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/commit_util.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/merge.c
    subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/id.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c
    subversion/branches/atomic-revprop/subversion/libsvn_repos/load.c
    subversion/branches/atomic-revprop/subversion/libsvn_subr/skel.c
    subversion/branches/atomic-revprop/subversion/libsvn_subr/svn_string.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_files.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/cleanup.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/crop.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/entries.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/props.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/revision_status.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db_pdh.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c
    subversion/branches/atomic-revprop/subversion/svnserve/cyrus_auth.c
    subversion/branches/atomic-revprop/subversion/svnserve/main.c
    subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/update_tests.py
    subversion/branches/atomic-revprop/subversion/tests/libsvn_client/   (props changed)
    subversion/branches/atomic-revprop/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/atomic-revprop/subversion/tests/libsvn_wc/entries-compat.c

Propchange: subversion/branches/atomic-revprop/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 10 17:33:24 2010
@@ -37,4 +37,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:965046-995395,995801
+/subversion/trunk:965046-995842

Modified: subversion/branches/atomic-revprop/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/private/svn_dep_compat.h?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/private/svn_dep_compat.h Fri Sep 10 17:33:24 2010
@@ -63,6 +63,9 @@ extern "C" {
 #endif
 
 #if !APR_VERSION_AT_LEAST(1,3,0)
+#define APR_UINT16_MAX  0xFFFFU
+#define APR_INT16_MAX   0x7FFF
+#define APR_INT16_MIN   (-APR_INT16_MAX-1)
 #define APR_UINT32_MAX 0xFFFFFFFFU
 #define APR_INT32_MAX  0x7FFFFFFF
 #define APR_INT32_MIN (-APR_INT32_MAX-1)

Modified: subversion/branches/atomic-revprop/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/private/svn_skel.h?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/private/svn_skel.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/private/svn_skel.h Fri Sep 10 17:33:24 2010
@@ -163,11 +163,11 @@ void svn_skel__prepend_str(const char *v
                            apr_pool_t *result_pool);
 
 
-/* Parse SKEL as an integer. SCRATCH_POOL is used for temporary memory.
-   NOTE: this function assumes the input is valid -- there is no way to
-   return an error.  */
-apr_int64_t svn_skel__parse_int(const svn_skel_t *skel,
-                                apr_pool_t *scratch_pool);
+/* Parse SKEL as an integer and return the result in *N.
+ * SCRATCH_POOL is used for temporary memory.  */
+svn_error_t *
+svn_skel__parse_int(apr_int64_t *n, const svn_skel_t *skel,
+                    apr_pool_t *scratch_pool);
 
 
 /* Return a string whose contents are a concrete representation of

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c Fri Sep 10 17:33:24 2010
@@ -929,25 +929,6 @@ post_process_commit_item(svn_wc_committe
   svn_boolean_t loop_recurse = FALSE;
   svn_boolean_t remove_lock;
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Is it a missing, deleted directory?
-
-     ### Temporary: once we centralise this sort of node is just a
-     normal delete and will get handled by the post-commit queue. */
-  if (item->kind == svn_node_dir
-      && item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
-    {
-      svn_boolean_t obstructed;
-
-      SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed,
-                                                wc_ctx, item->path,
-                                                scratch_pool));
-      if (obstructed)
-        return svn_wc__temp_mark_missing_not_present(item->path,
-                                                     wc_ctx, scratch_pool);
-    }
-#endif
-
   if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
       && (item->kind == svn_node_dir)
       && (item->copyfrom_url))

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/commit_util.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/commit_util.c Fri Sep 10 17:33:24 2010
@@ -859,46 +859,6 @@ harvest_committables(apr_hash_t *committ
                      and depth says not to go there. */
                   continue;
                 }
-#ifndef SVN_WC__SINGLE_DB
-              else
-                {
-                  svn_boolean_t obstructed;
-
-                  SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed,
-                                                            ctx->wc_ctx,
-                                                            this_abspath,
-                                                            iterpool));
-
-                  if (obstructed)
-                    {
-                      /* A missing, schedule-delete child dir is
-                         allowable.  Just don't try to recurse. */
-                      svn_node_kind_t childkind;
-                      SVN_ERR(svn_io_check_path(this_abspath,
-                                                &childkind,
-                                                iterpool));
-                      if (childkind == svn_node_none && this_is_deleted)
-                        {
-                          if (svn_wc__changelist_match(ctx->wc_ctx,
-                                                       this_abspath,
-                                                       changelists,
-                                                       iterpool))
-                            {
-                              SVN_ERR(add_committable(
-                                            committables, this_abspath,
-                                            this_kind, 
-                                            repos_root_url, this_repos_relpath,
-                                            SVN_INVALID_REVNUM,
-                                            NULL,
-                                            SVN_INVALID_REVNUM,
-                                            SVN_CLIENT_COMMIT_ITEM_DELETE,
-                                            result_pool, iterpool));
-                              continue; /* don't recurse! */
-                            }
-                        }
-                    }
-                }
-#endif
             }
 
           {

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/merge.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/merge.c Fri Sep 10 17:33:24 2010
@@ -437,29 +437,7 @@ obstructed_or_missing(svn_wc_notify_stat
                                              local_abspath,
                                              pool));
       if (is_deleted)
-        {
-#ifndef SVN_WC__SINGLE_DB
-          /* ### While we are not at single-db: detect missing .svn dirs.
-             ### Once we switch to single db expected kind should be always
-             ### none, just like for files */
-          if (kind_expected == svn_node_dir)
-            {
-              if (kind_on_disk == svn_node_none)
-                {
-                  svn_boolean_t is_obstructed;
-                  
-                  SVN_ERR(svn_wc__node_is_status_obstructed(&is_obstructed,
-                                                            merge_b->ctx->wc_ctx,
-                                                            local_abspath,
-                                                            pool));
-                  if (!is_obstructed)
-                    kind_expected = svn_node_none; 
-                }
-            }
-          else
-#endif
-            kind_expected = svn_node_none;
-        }
+        kind_expected = svn_node_none;
     }
 
   if (kind_expected == kind_on_disk)
@@ -5467,9 +5445,6 @@ get_mergeinfo_walk_cb(const char *local_
   svn_boolean_t is_present;
   svn_boolean_t deleted;
   svn_boolean_t absent;
-#ifndef SVN_WC__SINGLE_DB
-  svn_boolean_t obstructed;
-#endif
   svn_boolean_t immediate_child_dir;
 
   /* TODO(#2843) How to deal with a excluded item on merge? */
@@ -5481,20 +5456,12 @@ get_mergeinfo_walk_cb(const char *local_
   if (!is_present)
     return SVN_NO_ERROR;
 
-#ifndef SVN_WC__SINGLE_DB
-  SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed, wb->ctx->wc_ctx,
-                                            local_abspath, scratch_pool));
-#endif
   SVN_ERR(svn_wc__node_is_status_deleted(&deleted, wb->ctx->wc_ctx,
                                          local_abspath, scratch_pool));
   SVN_ERR(svn_wc__node_is_status_absent(&absent, wb->ctx->wc_ctx,
                                         local_abspath, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-   if (obstructed || deleted || absent)
-#else
    if (deleted || absent)
-#endif
     {
       propval = NULL;
       switched = FALSE;
@@ -5525,11 +5492,7 @@ get_mergeinfo_walk_cb(const char *local_
                          && (strcmp(abs_parent_path,
                                     wb->merge_target_abspath) == 0));
   /* Make sure what the WC thinks is present on disk really is. */
-#ifndef SVN_WC__SINGLE_DB
-   if (!absent && !deleted && !obstructed)
-#else
    if (!absent && !deleted)
-#endif
     SVN_ERR(record_missing_subtree_roots(local_abspath, kind,
                                          wb->subtree_dirents,
                                          wb->missing_subtrees,

Modified: subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/fs_fs.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/fs_fs.c Fri Sep 10 17:33:24 2010
@@ -2553,9 +2553,8 @@ read_rep_line(struct rep_args **rep_args
   return SVN_NO_ERROR;
 
  error:
-  return svn_error_return(
-           svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Malformed representation header")));
+  return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                          _("Malformed representation header"));
 }
 
 /* Given a revision file REV_FILE, opened to REV in FS, find the Node-ID

Modified: subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/id.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/id.c Fri Sep 10 17:33:24 2010
@@ -275,6 +275,9 @@ svn_fs_fs__id_parse(const char *data,
 
   if (str[0] == 'r')
     {
+      apr_int64_t val;
+      svn_error_t *err;
+
       /* This is a revision type ID */
       pvt->txn_id = NULL;
 
@@ -286,7 +289,13 @@ svn_fs_fs__id_parse(const char *data,
       str = apr_strtok(NULL, "/", &last_str);
       if (str == NULL)
         return NULL;
-      pvt->offset = apr_atoi64(str);
+      err = svn_cstring_atoi64(&val, str);
+      if (err)
+        {
+          svn_error_clear(err);
+          return NULL;
+        }
+      pvt->offset = (apr_off_t)val;
     }
   else if (str[0] == 't')
     {

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c Fri Sep 10 17:33:24 2010
@@ -32,6 +32,7 @@
 #include "svn_ra.h"
 #include "../libsvn_ra/ra_loader.h"
 #include "svn_path.h"
+#include "svn_string.h"
 #include "svn_time.h"
 #include "svn_private_config.h"
 
@@ -209,8 +210,9 @@ lock_from_baton(svn_lock_t **lock,
         {
           if (strncmp("Second-", timeout_str, strlen("Second-")) == 0)
             {
-              int time_offset = atoi(&(timeout_str[7]));
-
+              int time_offset;
+              
+              SVN_ERR(svn_cstring_atoi(&time_offset, &(timeout_str[7])));
               lck->expiration_date = lck->creation_date
                 + apr_time_from_sec(time_offset);
             }

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c Fri Sep 10 17:33:24 2010
@@ -775,7 +775,18 @@ start_err_element(void *baton, int paren
                                  atts);
 
         if (errcode_str && *err)
-          (*err)->apr_err = atoi(errcode_str);
+          {
+            apr_int64_t val;
+            svn_error_t *err2;
+
+            err2 = svn_cstring_atoi64(&val, errcode_str);
+            if (err2)
+              {
+                svn_error_clear(err2);
+                break;
+              }
+            (*err)->apr_err = (apr_status_t)val;
+          }
 
         break;
       }

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c Fri Sep 10 17:33:24 2010
@@ -36,6 +36,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
 #include "svn_private_config.h"
+#include "svn_string.h"
 #include "svn_xml.h"
 #include "private/svn_dep_compat.h"
 
@@ -736,7 +737,10 @@ start_error(svn_ra_serf__xml_parser_t *p
       err_code = svn_xml_get_attr_value("errcode", attrs);
       if (err_code)
         {
-          ctx->error->apr_err = apr_atoi64(err_code);
+          apr_int64_t val;
+          
+          SVN_ERR(svn_cstring_atoi64(&val, err_code));
+          ctx->error->apr_err = (apr_status_t)val;
         }
       else
         {

Modified: subversion/branches/atomic-revprop/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_repos/load.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_repos/load.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_repos/load.c Fri Sep 10 17:33:24 2010
@@ -38,6 +38,7 @@
 
 #include <apr_lib.h>
 
+#include "private/svn_dep_compat.h"
 #include "private/svn_mergeinfo_private.h"
 
 /*----------------------------------------------------------------------*/
@@ -450,9 +451,11 @@ parse_property_block(svn_stream_t *strea
       else if ((buf[0] == 'K') && (buf[1] == ' '))
         {
           char *keybuf;
+          apr_uint64_t len;
 
+          SVN_ERR(svn_cstring_strtoui64(&len, buf + 2, 0, APR_SIZE_MAX, 10));
           SVN_ERR(read_key_or_val(&keybuf, actual_length,
-                                  stream, atoi(buf + 2), proppool));
+                                  stream, (apr_size_t)len, proppool));
 
           /* Read a val length line */
           SVN_ERR(svn_stream_readline(stream, &strbuf, "\n", &eof, proppool));
@@ -466,8 +469,10 @@ parse_property_block(svn_stream_t *strea
             {
               svn_string_t propstring;
               char *valbuf;
+              apr_int64_t val;
 
-              propstring.len = atoi(buf + 2);
+              SVN_ERR(svn_cstring_atoi64(&val, buf + 2));
+              propstring.len = (apr_size_t)val;
               SVN_ERR(read_key_or_val(&valbuf, actual_length,
                                       stream, propstring.len, proppool));
               propstring.data = valbuf;
@@ -524,9 +529,11 @@ parse_property_block(svn_stream_t *strea
       else if ((buf[0] == 'D') && (buf[1] == ' '))
         {
           char *keybuf;
+          apr_uint64_t len;
 
+          SVN_ERR(svn_cstring_strtoui64(&len, buf + 2, 0, APR_SIZE_MAX, 10));
           SVN_ERR(read_key_or_val(&keybuf, actual_length,
-                                  stream, atoi(buf + 2), proppool));
+                                  stream, (apr_size_t)len, proppool));
 
           /* We don't expect these in revision properties, and if we see
              one when we don't have a delete_node_property callback,
@@ -643,7 +650,7 @@ parse_format_version(const char *version
     return svn_error_create(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
                             _("Malformed dumpfile header"));
 
-  value = atoi(p+1);
+  SVN_ERR(svn_cstring_atoi(&value, p + 1));
 
   if (value > SVN_REPOS_DUMPFILE_FORMAT_VERSION)
     return svn_error_createf(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
@@ -785,7 +792,7 @@ svn_repos_parse_dumpstream2(svn_stream_t
                                      APR_HASH_KEY_STRING)))
         {
           /* ### someday, switch modes of operation here. */
-          version = atoi(value);
+          SVN_ERR(svn_cstring_atoi(&version, value));
         }
       /* Or is this bogosity?! */
       else

Modified: subversion/branches/atomic-revprop/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_subr/skel.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_subr/skel.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_subr/skel.c Fri Sep 10 17:33:24 2010
@@ -666,12 +666,16 @@ svn_skel__list_length(const svn_skel_t *
 
 /* Parsing and unparsing into high-level types. */
 
-apr_int64_t svn_skel__parse_int(const svn_skel_t *skel,
-                                apr_pool_t *scratch_pool)
+svn_error_t *
+svn_skel__parse_int(apr_int64_t *n, const svn_skel_t *skel,
+                    apr_pool_t *scratch_pool)
 {
+  const char *str;
+
   /* We need to duplicate the SKEL contents in order to get a NUL-terminated
      version of it. The SKEL may not have valid memory at DATA[LEN].  */
-  return apr_atoi64(apr_pstrmemdup(scratch_pool, skel->data, skel->len));
+  str = apr_pstrmemdup(scratch_pool, skel->data, skel->len);
+  return svn_error_return(svn_cstring_atoi64(n, str));
 }
 
 

Modified: subversion/branches/atomic-revprop/subversion/libsvn_subr/svn_string.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_subr/svn_string.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_subr/svn_string.c Fri Sep 10 17:33:24 2010
@@ -615,24 +615,25 @@ svn_cstring_strtoui64(apr_uint64_t *n, c
                       apr_uint64_t minval, apr_uint64_t maxval,
                       int base)
 {
-  apr_int64_t parsed;
+  apr_int64_t val;
+  char *endptr;
 
   /* We assume errno is thread-safe. */
   errno = 0; /* APR-0.9 doesn't always set errno */
 
   /* ### We're throwing away half the number range here.
    * ### Maybe implement our own number parser? */
-  parsed = apr_strtoi64(str, NULL, base);
-  if (errno != 0)
+  val = apr_strtoi64(str, &endptr, base);
+  if (errno != 0 || endptr == str)
     return svn_error_return(
              svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
                                _("Could not convert '%s' into a number"),
                                str));
-  if (parsed < 0 || parsed < minval || parsed > maxval)
+  if (val < 0 || (apr_uint64_t)val < minval || (apr_uint64_t)val > maxval)
     return svn_error_return(
              svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
                                _("Number '%s' is out of range"), str));
-  *n = parsed;
+  *n = val;
   return SVN_NO_ERROR;
 }
 
@@ -646,10 +647,10 @@ svn_cstring_atoui64(apr_uint64_t *n, con
 svn_error_t *
 svn_cstring_atoui(unsigned int *n, const char *str)
 {
-  apr_uint64_t parsed;
+  apr_uint64_t val;
 
-  SVN_ERR(svn_cstring_strtoui64(&parsed, str, 0, APR_UINT32_MAX, 10));
-  *n = (unsigned int)parsed;
+  SVN_ERR(svn_cstring_strtoui64(&val, str, 0, APR_UINT32_MAX, 10));
+  *n = (unsigned int)val;
   return SVN_NO_ERROR;
 }
 
@@ -658,22 +659,23 @@ svn_cstring_strtoi64(apr_int64_t *n, con
                      apr_int64_t minval, apr_int64_t maxval,
                      int base)
 {
-  apr_int64_t parsed;
+  apr_int64_t val;
+  char *endptr;
 
   /* We assume errno is thread-safe. */
   errno = 0; /* APR-0.9 doesn't always set errno */
 
-  parsed = apr_strtoi64(str, NULL, base);
-  if (errno != 0)
+  val = apr_strtoi64(str, &endptr, base);
+  if (errno != 0 || endptr == str)
     return svn_error_return(
              svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
                                _("Could not convert '%s' into a number"),
                                str));
-  if (parsed < minval || parsed > maxval)
+  if (val < minval || val > maxval)
     return svn_error_return(
              svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
                                _("Number '%s' is out of range"), str));
-  *n = parsed;
+  *n = val;
   return SVN_NO_ERROR;
 }
 
@@ -687,10 +689,9 @@ svn_cstring_atoi64(apr_int64_t *n, const
 svn_error_t *
 svn_cstring_atoi(int *n, const char *str)
 {
-  apr_int64_t parsed;
+  apr_int64_t val;
 
-  SVN_ERR(svn_cstring_strtoi64(&parsed, str, APR_INT32_MIN,
-                               APR_INT32_MAX, 10));
-  *n = (int)parsed;
+  SVN_ERR(svn_cstring_strtoi64(&val, str, APR_INT32_MIN, APR_INT32_MAX, 10));
+  *n = (int)val;
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c Fri Sep 10 17:33:24 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;
@@ -477,7 +450,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 +466,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 +483,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 +583,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 +759,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 +921,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 +928,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 +943,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/atomic-revprop/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_files.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_files.c Fri Sep 10 17:33:24 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/atomic-revprop/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c Fri Sep 10 17:33:24 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/atomic-revprop/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/cleanup.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/cleanup.c Fri Sep 10 17:33:24 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/atomic-revprop/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c Fri Sep 10 17:33:24 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/atomic-revprop/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/crop.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/crop.c Fri Sep 10 17:33:24 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/atomic-revprop/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c?rev=995885&r1=995884&r2=995885&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c Fri Sep 10 17:33:24 2010
@@ -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
 }