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

svn commit: r995814 - in /subversion/trunk/subversion/libsvn_wc: node.c status.c

Author: philip
Date: Fri Sep 10 14:57:20 2010
New Revision: 995814

URL: http://svn.apache.org/viewvc?rev=995814&view=rev
Log:
Remove obsolete multi-db code.

* subversion/libsvn_wc/status.c
  (assemble_status, handle_dir_entry, make_dir_baton,
   handle_statii, internal_status): Remove conditional multi-db code.
  (get_dir_status): Remove conditional.
  
* subversion/libsvn_wc/node.c
  (svn_wc__node_get_repos_info, svn_wc__internal_node_get_url,
   svn_wc__node_get_repos_relpath, svn_wc__internal_get_copyfrom_info,
   svn_wc__node_is_status_deleted, svn_wc__node_is_added,
   svn_wc__internal_is_replaced, svn_wc__node_get_commit_base_rev,
   svn_wc__internal_node_get_schedule): Remove conditional multi-db code.
  (svn_wc__node_is_status_obstructed): Remove.

Modified:
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/libsvn_wc/status.c

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=995814&r1=995813&r2=995814&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Fri Sep 10 14:57:20 2010
@@ -134,12 +134,7 @@ svn_wc__node_get_repos_info(const char *
       return SVN_NO_ERROR;
     }
 
-  if (scan_added
-      && (status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-          || status == svn_wc__db_status_obstructed_add
-#endif
-          ))
+  if (scan_added && (status == svn_wc__db_status_added))
     {
       /* We have an addition. scan_addition() will find the intended
          repository location by scanning up the tree.  */
@@ -159,12 +154,7 @@ svn_wc__node_get_repos_info(const char *
           || status == svn_wc__db_status_absent
           || status == svn_wc__db_status_excluded
           || status == svn_wc__db_status_not_present
-          || (scan_deleted && (status == svn_wc__db_status_deleted))
-#ifndef SVN_WC__SINGLE_DB
-          || status == svn_wc__db_status_obstructed
-          || (scan_deleted && (status == svn_wc__db_status_obstructed_delete))
-#endif
-          ))
+          || (scan_deleted && (status == svn_wc__db_status_deleted))))
     {
       SVN_ERR(svn_wc__db_scan_base_repos(NULL, repos_root_url, repos_uuid,
                                          wc_ctx->db, local_abspath,
@@ -369,12 +359,7 @@ svn_wc__internal_node_get_url(const char
       else if (status == svn_wc__db_status_absent
                || status == svn_wc__db_status_excluded
                || status == svn_wc__db_status_not_present
-               || (!have_base
-                   && (status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-                       || status == svn_wc__db_status_obstructed_delete
-#endif
-                       )))
+               || (!have_base && (status == svn_wc__db_status_deleted)))
         {
           const char *parent_abspath;
 
@@ -453,12 +438,7 @@ svn_wc__node_get_repos_relpath(const cha
                                              result_pool, scratch_pool));
         }
       else if (status == svn_wc__db_status_excluded
-               || (!have_base
-                   && (status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-                       || status == svn_wc__db_status_obstructed_delete
-#endif
-                       )))
+               || (!have_base && (status == svn_wc__db_status_deleted)))
         {
           const char *parent_abspath, *name, *parent_relpath;
 
@@ -578,11 +558,7 @@ svn_wc__internal_get_copyfrom_info(const
             *is_copy_target = TRUE;
         }
     }
-  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)
            && (copyfrom_rev || copyfrom_url || copyfrom_root_url
                || copyfrom_repos_relpath))
     {
@@ -828,40 +804,11 @@ svn_wc__node_is_status_deleted(svn_boole
                                wc_ctx->db, local_abspath,
                                scratch_pool, scratch_pool));
 
-  *is_deleted = (status == svn_wc__db_status_deleted)
-#ifndef SVN_WC__SINGLE_DB
-                || (status == svn_wc__db_status_obstructed_delete)
-#endif
-                ;
+  *is_deleted = (status == svn_wc__db_status_deleted);
 
   return SVN_NO_ERROR;
 }
 
-#ifndef SVN_WC__SINGLE_DB
-svn_error_t *
-svn_wc__node_is_status_obstructed(svn_boolean_t *is_obstructed,
-                                  svn_wc_context_t *wc_ctx,
-                                  const char *local_abspath,
-                                  apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-
-  SVN_ERR(svn_wc__db_read_info(&status,
-                               NULL, NULL, NULL, NULL, NULL, 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));
-
-  *is_obstructed = (status == svn_wc__db_status_obstructed) ||
-                   (status == svn_wc__db_status_obstructed_add) ||
-                   (status == svn_wc__db_status_obstructed_delete);
-
-  return SVN_NO_ERROR;
-}
-#endif
-
 svn_error_t *
 svn_wc__node_is_status_absent(svn_boolean_t *is_absent,
                               svn_wc_context_t *wc_ctx,
@@ -917,11 +864,7 @@ svn_wc__node_is_added(svn_boolean_t *is_
                                NULL, NULL,
                                wc_ctx->db, local_abspath,
                                scratch_pool, scratch_pool));
-  *is_added = (status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-               || status == svn_wc__db_status_obstructed_add
-#endif
-               );
+  *is_added = (status == svn_wc__db_status_added);
 
   return SVN_NO_ERROR;
 }
@@ -956,11 +899,7 @@ svn_wc__internal_is_replaced(svn_boolean
                                      db, local_abspath,
                                      scratch_pool, scratch_pool));
 
-  *replaced = ((status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-                || status == svn_wc__db_status_obstructed_add
-#endif
-                )
+  *replaced = ((status == svn_wc__db_status_added)
                && have_base
                && base_status != svn_wc__db_status_not_present);
 
@@ -1154,12 +1093,7 @@ svn_wc__node_get_commit_base_rev(svn_rev
                                        wc_ctx->db, parent_abspath,
                                        scratch_pool, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-          SVN_ERR_ASSERT(parent_status == svn_wc__db_status_added
-                         || parent_status == svn_wc__db_status_obstructed_add);
-#else
           SVN_ERR_ASSERT(parent_status == svn_wc__db_status_added);
-#endif
 
           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL, NULL,
                                            NULL, NULL,
@@ -1308,15 +1242,9 @@ svn_wc__internal_node_get_schedule(svn_w
 
       case svn_wc__db_status_normal:
       case svn_wc__db_status_incomplete:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed:
-#endif
         break;
 
       case svn_wc__db_status_deleted:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed_delete:
-#endif
         {
           const char *work_del_abspath;
 
@@ -1345,9 +1273,6 @@ svn_wc__internal_node_get_schedule(svn_w
           break;
         }
       case svn_wc__db_status_added:
-#ifndef SVN_WC__SINGLE_DB
-      case svn_wc__db_status_obstructed_add:
-#endif
         {
           const char *op_root_abspath;
           const char *parent_abspath;

Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=995814&r1=995813&r2=995814&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Fri Sep 10 14:57:20 2010
@@ -362,26 +362,6 @@ assemble_status(svn_wc_status3_t **statu
                                                      db, local_abspath,
                                                      scratch_pool));
         }
-#ifndef SVN_WC__SINGLE_DB
-      else if (db_status == svn_wc__db_status_obstructed_delete)
-        {
-          /* Deleted directories are never reported as missing.  */
-          if (!dirent)
-            node_status = svn_wc_status_deleted;
-          else
-            node_status = svn_wc_status_obstructed;
-        }
-      else if (db_status == svn_wc__db_status_obstructed
-               || db_status == svn_wc__db_status_obstructed_add)
-        {
-          /* A present or added directory should be on disk, so it is
-             reported missing or obstructed.  */
-          if (!dirent)
-            node_status = svn_wc_status_missing;
-          else
-            node_status = svn_wc_status_obstructed;
-        }
-#else
       else if (!dirent || dirent->kind != svn_node_dir)
         {
           /* A present or added directory should be on disk, so it is
@@ -391,7 +371,6 @@ assemble_status(svn_wc_status3_t **statu
           else
             node_status = svn_wc_status_obstructed;
         }
-#endif
     }
   else
     {
@@ -972,11 +951,7 @@ handle_dir_entry(const struct walk_statu
      ### TODO: Should we recurse on obstructions anyway?
      ###       (Requires  changes to the test suite)
    */
-  if (db_kind == svn_wc__db_kind_dir
-#ifndef SVN_WC__SINGLE_DB
-      && dirent && dirent->kind == svn_node_dir
-#endif
-     )
+  if (db_kind == svn_wc__db_kind_dir)
     {
       /* Descend only if the subdirectory is a working copy directory (which
          we've discovered because we got a THIS_DIR entry. And only descend
@@ -984,13 +959,7 @@ handle_dir_entry(const struct walk_statu
 
       if ((depth == svn_depth_unknown
               || depth == svn_depth_immediates
-              || depth == svn_depth_infinity)
-#ifndef SVN_WC__SINGLE_DB
-          && status != svn_wc__db_status_obstructed
-          && status != svn_wc__db_status_obstructed_add
-          && status != svn_wc__db_status_obstructed_delete
-#endif
-          )
+              || depth == svn_depth_infinity))
         {
           SVN_ERR(get_dir_status(wb, local_abspath, NULL, FALSE,
                                  dir_repos_root_url, dir_repos_relpath,
@@ -1139,7 +1108,6 @@ get_dir_status(const struct walk_status_
   }
 
   err = svn_io_get_dirents3(&dirents, local_abspath, FALSE, subpool, subpool);
-#ifdef SVN_WC__SINGLE_DB
   if (err
       && (APR_STATUS_IS_ENOENT(err->apr_err)
          || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err)))
@@ -1148,7 +1116,6 @@ get_dir_status(const struct walk_status_
       dirents = apr_hash_make(subpool);
     }
   else
-#endif
     SVN_ERR(err);
 
   SVN_ERR(svn_wc__db_read_info(&dir_status, NULL, NULL, &dir_repos_relpath,
@@ -1609,10 +1576,6 @@ make_dir_baton(void **dir_baton,
      our purposes includes being an external or ignored item). */
   if (status_in_parent
       && (status_in_parent->node_status != svn_wc_status_unversioned)
-#ifndef SVN_WC__SINGLE_DB
-      && (status_in_parent->node_status != svn_wc_status_missing)
-      && (status_in_parent->node_status != svn_wc_status_obstructed)
-#endif
       && (status_in_parent->node_status != svn_wc_status_external)
       && (status_in_parent->node_status != svn_wc_status_ignored)
       && (status_in_parent->kind == svn_node_dir)
@@ -1796,10 +1759,6 @@ handle_statii(struct edit_baton *eb,
       /* Now, handle the status.  We don't recurse for svn_depth_immediates
          because we already have the subdirectories' statii. */
       if (status->versioned && status->kind == svn_node_dir
-#ifndef SVN_WC__SINGLE_DB
-          && status->node_status != svn_wc_status_obstructed
-          && status->node_status != svn_wc_status_missing
-#endif
           && (depth == svn_depth_unknown
               || depth == svn_depth_infinity))
         {
@@ -2537,13 +2496,7 @@ internal_status(svn_wc_status3_t **statu
   if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
       || node_status == svn_wc__db_status_not_present
       || node_status == svn_wc__db_status_absent
-      || node_status == svn_wc__db_status_excluded
-#ifndef SVN_WC__SINGLE_DB
-      || node_status == svn_wc__db_status_obstructed
-      || node_status == svn_wc__db_status_obstructed_add
-      || node_status == svn_wc__db_status_obstructed_delete
-#endif
-      )
+      || node_status == svn_wc__db_status_excluded)
     {
       svn_error_clear(err);
       node_kind = svn_wc__db_kind_unknown;