You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/14 16:40:15 UTC

svn commit: r1092294 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/status.c libsvn_wc/adm_ops.c libsvn_wc/node.c libsvn_wc/wc.h

Author: rhuijben
Date: Thu Apr 14 14:40:14 2011
New Revision: 1092294

URL: http://svn.apache.org/viewvc?rev=1092294&view=rev
Log:
Remove a few entry-like is_replaced helpers. These functions were used for
the transition away from nodes while we still had a revert base, but they
can't survive in a world with more than two layers.

* subversion/include/private/svn_wc_private.h
  (svn_wc__node_is_replaced): Remove function.

* subversion/libsvn_client/status.c
  (svn_client_status5): When we have a local addition or copy, everything
    below is deleted... Keep it simple.

* subversion/libsvn_wc/adm_ops.c
  (svn_wc__process_committed_internal): These problems are gone since we moved
    to single-db.

* subversion/libsvn_wc/node.c
  (svn_wc__internal_is_replaced,
   svn_wc__node_is_replaced): Remove these functions.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_is_replaced): Remove function.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/status.c
    subversion/trunk/subversion/libsvn_wc/adm_ops.c
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/libsvn_wc/wc.h

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1092294&r1=1092293&r2=1092294&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Apr 14 14:40:14 2011
@@ -482,20 +482,6 @@ svn_wc__node_is_added(svn_boolean_t *is_
                       apr_pool_t *scratch_pool);
 
 /**
- * Set @a *is_replaced to whether @a local_abspath is replaced, using
- * @a wc_ctx.  If @a local_abspath is not in the working copy, return
- * @c SVN_ERR_WC_PATH_NOT_FOUND.  Use @a scratch_pool for all temporary
- * allocations.
- *
- * NOTE: This corresponds directly to svn_wc_schedule_replace.
- */
-svn_error_t *
-svn_wc__node_is_replaced(svn_boolean_t *is_replaced,
-                         svn_wc_context_t *wc_ctx,
-                         const char *local_abspath,
-                         apr_pool_t *scratch_pool);
-
-/**
  * Get the base revision of @a local_abspath using @a wc_ctx.  If
  * @a local_abspath is not in the working copy, return
  * @c SVN_ERR_WC_PATH_NOT_FOUND.

Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1092294&r1=1092293&r2=1092294&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Thu Apr 14 14:40:14 2011
@@ -420,20 +420,6 @@ svn_client_status5(svn_revnum_t *result_
              repository.  (Note that "locally replaced" doesn't count
              as "added" in this case.)  */
 
-          /* ### FIXME:  WC-1 code here was just (! added).  Not sure
-             ### if this WC-NG approach matches semantically.  */
-          SVN_ERR(svn_wc__node_is_added(&added, ctx->wc_ctx,
-                                        dir_abspath, pool));
-          if (added)
-            {
-              svn_boolean_t replaced;
-
-              SVN_ERR(svn_wc__node_is_replaced(&replaced, ctx->wc_ctx,
-                                               dir_abspath, pool));
-              if (replaced)
-                added = FALSE;
-            }
-
           if (! added)
             sb.deleted_in_repos = TRUE;
 

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1092294&r1=1092293&r2=1092294&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Thu Apr 14 14:40:14 2011
@@ -297,22 +297,6 @@ svn_wc__process_committed_internal(svn_w
           sha1_checksum = NULL;
           if (kind != svn_wc__db_kind_dir)
             {
-              /* Suppress log creation for deleted entries in a replaced
-                 directory.  By the time any log we create here is run,
-                 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)
-                {
-                  svn_boolean_t replaced;
-
-                  SVN_ERR(svn_wc__internal_is_replaced(&replaced,
-                                                       db, local_abspath,
-                                                       iterpool));
-                  if (replaced)
-                    continue;
-                }
-
               if (queue != NULL)
                 {
                   const committed_queue_item_t *cqi

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1092294&r1=1092293&r2=1092294&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Apr 14 14:40:14 2011
@@ -883,56 +883,6 @@ svn_wc__node_is_added(svn_boolean_t *is_
   return SVN_NO_ERROR;
 }
 
-
-/* Equivalent to the old notion of "entry->schedule == schedule_replace"  */
-svn_error_t *
-svn_wc__internal_is_replaced(svn_boolean_t *replaced,
-                             svn_wc__db_t *db,
-                             const char *local_abspath,
-                             apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-  svn_boolean_t have_base;
-  svn_wc__db_status_t base_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, &have_base, NULL,
-            NULL, NULL,
-            db, local_abspath,
-            scratch_pool, scratch_pool));
-  if (have_base)
-    SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, NULL,
-                                     NULL, NULL, NULL,
-                                     NULL, NULL, NULL,
-                                     NULL, NULL, NULL,
-                                     NULL, NULL, NULL, NULL,
-                                     db, local_abspath,
-                                     scratch_pool, scratch_pool));
-
-  *replaced = ((status == svn_wc__db_status_added)
-               && have_base
-               && base_status != svn_wc__db_status_not_present);
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__node_is_replaced(svn_boolean_t *replaced,
-                         svn_wc_context_t *wc_ctx,
-                         const char *local_abspath,
-                         apr_pool_t *scratch_pool)
-{
-  return svn_error_return(svn_wc__internal_is_replaced(replaced, wc_ctx->db,
-                                                       local_abspath,
-                                                       scratch_pool));
-}
-
-
 svn_error_t *
 svn_wc__node_get_base_rev(svn_revnum_t *base_revision,
                           svn_wc_context_t *wc_ctx,

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1092294&r1=1092293&r2=1092294&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Thu Apr 14 14:40:14 2011
@@ -592,13 +592,6 @@ svn_wc__internal_remove_from_revision_co
                                               apr_pool_t *scratch_pool);
 
 
-/* Library-internal version of svn_wc__node_is_replaced(). */
-svn_error_t *
-svn_wc__internal_is_replaced(svn_boolean_t *replaced,
-                             svn_wc__db_t *db,
-                             const char *local_abspath,
-                             apr_pool_t *scratch_pool);
-
 /* Library-internal version of svn_wc__node_is_file_external(). */
 svn_error_t *
 svn_wc__internal_is_file_external(svn_boolean_t *file_external,