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/12/08 18:53:45 UTC

svn commit: r1043551 - in /subversion/trunk/subversion: libsvn_wc/adm_crawler.c libsvn_wc/entries.c libsvn_wc/node.c libsvn_wc/wc_db.c libsvn_wc/wc_db.h tests/libsvn_wc/db-test.c

Author: philip
Date: Wed Dec  8 17:53:44 2010
New Revision: 1043551

URL: http://svn.apache.org/viewvc?rev=1043551&view=rev
Log:
Remove the BASE_REPLACED parameter from svn_wc__db_scan_deletion, it was
no longer used and (probably) wasn't set correctly for SVN_WC__OP_DEPTH.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_scan_deletion): Remove base_replaced parameter.

* subversion/libsvn_wc/wc_db.c
  (scan_deletion, svn_wc__db_scan_deletion): Remove base_replaced parameter.

* subversion/libsvn_wc/node.c
  (svn_wc__node_get_working_rev_info, svn_wc__node_get_commit_base_rev,
   svn_wc__internal_node_get_schedule): Adjust svn_wc__db_scan_deletion call.

* subversion/libsvn_wc/entries.c
  (get_base_info_for_deleted, read_one_entry): Adjust svn_wc__db_scan_deletion
   call.

* subversion/libsvn_wc/adm_crawler.c
  (find_base_rev): Adjust svn_wc__db_scan_deletion call.

* subversion/tests/libsvn_wc/db-test.c
  (test_scan_deletion): Adjust svn_wc__db_scan_deletion call.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_crawler.c
    subversion/trunk/subversion/libsvn_wc/entries.c
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/tests/libsvn_wc/db-test.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=1043551&r1=1043550&r2=1043551&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Wed Dec  8 17:53:44 2010
@@ -709,7 +709,7 @@ find_base_rev(svn_revnum_t *base_rev,
   else 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,
+       SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, &work_del_abspath,
                                        db, local_abspath, pool, pool));
 
       if (work_del_abspath != NULL)

Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1043551&r1=1043550&r2=1043551&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Wed Dec  8 17:53:44 2010
@@ -254,7 +254,6 @@ get_base_info_for_deleted(svn_wc_entry_t
 
       SVN_ERR(svn_wc__db_scan_deletion(NULL,
                                        NULL,
-                                       NULL,
                                        &work_del_abspath,
                                        db, entry_abspath,
                                        scratch_pool, scratch_pool));
@@ -534,7 +533,7 @@ read_one_entry(const svn_wc_entry_t **ne
       /* ### we don't have to worry about moves, so this is a delete. */
       entry->schedule = svn_wc_schedule_delete;
 
-      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, NULL,
+      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
                                        &work_del_abspath,
                                        db, entry_abspath,
                                        scratch_pool, scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1043551&r1=1043550&r2=1043551&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Wed Dec  8 17:53:44 2010
@@ -984,7 +984,7 @@ svn_wc__node_get_working_rev_info(svn_re
       const char *base_del_abspath;
 
       SVN_ERR(svn_wc__db_scan_deletion(&base_del_abspath, NULL,
-                                       NULL, &work_del_abspath, wc_ctx->db,
+                                       &work_del_abspath, wc_ctx->db,
                                        local_abspath, scratch_pool,
                                        scratch_pool));
       if (work_del_abspath)
@@ -1075,7 +1075,7 @@ svn_wc__node_get_commit_base_rev(svn_rev
       const char *parent_abspath;
       svn_wc__db_status_t parent_status;
 
-      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, NULL,
+      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
                                        &work_del_abspath,
                                        wc_ctx->db, local_abspath,
                                        scratch_pool, scratch_pool));
@@ -1263,9 +1263,7 @@ svn_wc__internal_node_get_schedule(svn_w
             break;
 
           /* Find out details of our deletion.  */
-          SVN_ERR(svn_wc__db_scan_deletion(NULL,
-                                           NULL,
-                                           NULL,
+          SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
                                            &work_del_abspath,
                                            db, local_abspath,
                                            scratch_pool, scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1043551&r1=1043550&r2=1043551&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Dec  8 17:53:44 2010
@@ -299,7 +299,6 @@ scan_addition(svn_wc__db_status_t *statu
 
 static svn_error_t *
 scan_deletion(const char **base_del_relpath,
-              svn_boolean_t *base_replaced,
               const char **moved_to_relpath,
               const char **work_del_relpath,
               svn_wc__db_pdh_t *pdh,
@@ -2942,7 +2941,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
     {
       const char *base_del_relpath, *work_del_relpath;
 
-      SVN_ERR(scan_deletion(&base_del_relpath, NULL, NULL, &work_del_relpath,
+      SVN_ERR(scan_deletion(&base_del_relpath, NULL, &work_del_relpath,
                             pdh, local_relpath, scratch_pool, scratch_pool));
       if (work_del_relpath)
         {
@@ -5917,7 +5916,7 @@ svn_wc__db_global_relocate(svn_wc__db_t 
       if (status == svn_wc__db_status_deleted)
         {
           const char *work_del_relpath;
-          SVN_ERR(scan_deletion(NULL, NULL, NULL, &work_del_relpath,
+          SVN_ERR(scan_deletion(NULL, NULL, &work_del_relpath,
                                 pdh, local_dir_relpath,
                                 scratch_pool, scratch_pool));
           if (work_del_relpath)
@@ -7019,7 +7018,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
  * DB+LOCAL_ABSPATH, and outputting relpaths instead of abspaths. */
 static svn_error_t *
 scan_deletion(const char **base_del_relpath,
-              svn_boolean_t *base_replaced,
               const char **moved_to_relpath,
               const char **work_del_relpath,
               svn_wc__db_pdh_t *pdh,
@@ -7040,8 +7038,6 @@ scan_deletion(const char **base_del_relp
   /* Initialize all the OUT parameters.  */
   if (base_del_relpath != NULL)
     *base_del_relpath = NULL;
-  if (base_replaced != NULL)
-    *base_replaced = FALSE;  /* becomes TRUE when we know for sure.  */
   if (moved_to_relpath != NULL)
     *moved_to_relpath = NULL;
   if (work_del_relpath != NULL)
@@ -7164,16 +7160,6 @@ scan_deletion(const char **base_del_relp
           /* If a BASE node is marked as not-present, then we'll ignore
              it within this function. That status is simply a bookkeeping
              gimmick, not a real node that may have been deleted.  */
-
-          /* If we're looking at a present BASE node, *and* there is a
-             WORKING node (present or deleted), then a replacement has
-             occurred here or in an ancestor.  */
-          if (base_replaced != NULL
-              && base_presence == svn_wc__db_status_normal
-              && work_presence != svn_wc__db_status_base_deleted)
-            {
-              *base_replaced = TRUE;
-            }
         }
 
       /* Only grab the nearest ancestor.  */
@@ -7236,7 +7222,6 @@ scan_deletion(const char **base_del_relp
 
 svn_error_t *
 svn_wc__db_scan_deletion(const char **base_del_abspath,
-                         svn_boolean_t *base_replaced,
                          const char **moved_to_abspath,
                          const char **work_del_abspath,
                          svn_wc__db_t *db,
@@ -7255,7 +7240,7 @@ svn_wc__db_scan_deletion(const char **ba
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-  SVN_ERR(scan_deletion(&base_del_relpath, base_replaced, &moved_to_relpath,
+  SVN_ERR(scan_deletion(&base_del_relpath, &moved_to_relpath,
                         &work_del_relpath,
                         pdh, local_relpath, result_pool, scratch_pool));
 

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1043551&r1=1043550&r2=1043551&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Wed Dec  8 17:53:44 2010
@@ -1943,8 +1943,7 @@ svn_wc__db_scan_addition(svn_wc__db_stat
    the deleted node.
 
    In this example, BASE_DEL_ABSPATH will bet set to B/W. That is the root of
-   the BASE tree (implicitly) deleted by the replacement. BASE_REPLACED will
-   be set to TRUE since B/W replaces the BASE node at B/W. WORK_DEL_ABSPATH
+   the BASE tree (implicitly) deleted by the replacement. WORK_DEL_ABSPATH
    will be set to the subtree deleted within the replacement; in this case,
    B/W/D. No move-away took place, so MOVED_TO_ABSPATH is set to NULL.
 
@@ -1954,14 +1953,12 @@ svn_wc__db_scan_addition(svn_wc__db_stat
    post-move, but that is not known or reported by this function.
 
    If BASE does not have a B/W, then the WORKING B/W is not a replacement,
-   but a simple add/copy/move-here. BASE_DEL_ABSPATH will be set to NULL,
-   and BASE_REPLACED will be set to FALSE.
+   but a simple add/copy/move-here. BASE_DEL_ABSPATH will be set to NULL.
 
    If B/W/D does not exist in the WORKING tree (we're only talking about a
    deletion of nodes of the BASE tree), then deleting B/W/D would have marked
    the subtree for deletion. BASE_DEL_ABSPATH will refer to B/W/D,
-   BASE_REPLACED will be FALSE, MOVED_TO_ABSPATH will be NULL, and
-   WORK_DEL_ABSPATH will be NULL.
+   MOVED_TO_ABSPATH will be NULL, and WORK_DEL_ABSPATH will be NULL.
 
    If the BASE node B/W/D was moved instead of deleted, then MOVED_TO_ABSPATH
    would indicate the target location (and other OUT values as above).
@@ -2009,11 +2006,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
    BASE_DEL_ABSPATH will specify the nearest ancestor of the explicit or
    implicit deletion (if any) that applies to the BASE tree.
 
-   BASE_REPLACED will specify whether the node at BASE_DEL_ABSPATH has
-   been replaced (shadowed) by nodes in the WORKING tree. If no BASE
-   deletion has occurred (BASE_DEL_ABSPATH is NULL, meaning the deletion
-   is confined to the WORKING TREE), then BASE_REPLACED will be FALSE.
-
    MOVED_TO_ABSPATH will specify the nearest ancestor that has moved-away,
    if any. If no ancestors have been moved-away, then this is set to NULL.
 
@@ -2033,7 +2025,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
 */
 svn_error_t *
 svn_wc__db_scan_deletion(const char **base_del_abspath,
-                         svn_boolean_t *base_replaced,
                          const char **moved_to_abspath,
                          const char **work_del_abspath,
                          svn_wc__db_t *db,

Modified: subversion/trunk/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/db-test.c?rev=1043551&r1=1043550&r2=1043551&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/db-test.c Wed Dec  8 17:53:44 2010
@@ -1032,7 +1032,6 @@ test_scan_deletion(apr_pool_t *pool)
   const char *local_abspath;
   svn_wc__db_t *db;
   const char *base_del_abspath;
-  svn_boolean_t base_replaced;
   const char *work_del_abspath;
   const char *moved_to_abspath;
 
@@ -1043,14 +1042,12 @@ test_scan_deletion(apr_pool_t *pool)
   /* Node was moved elsewhere. */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "J/J-e", pool),
             pool, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(base_replaced);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place",
                                    moved_to_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
@@ -1059,14 +1056,12 @@ test_scan_deletion(apr_pool_t *pool)
   /* Node was moved elsewhere (child of operation root). */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "J/J-e/J-e-a", pool),
             pool, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(base_replaced);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place",
                                    moved_to_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
@@ -1075,7 +1070,6 @@ test_scan_deletion(apr_pool_t *pool)
   /* Root of delete. Parent is a WORKING node. */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "J/J-c", pool),
@@ -1083,7 +1077,6 @@ test_scan_deletion(apr_pool_t *pool)
   /* Implicit delete of "J" (via replacement).  */
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-c",
                                    work_del_abspath, pool));
@@ -1091,7 +1084,6 @@ test_scan_deletion(apr_pool_t *pool)
   /* Child of a deleted root. */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "J/J-c/J-c-a", pool),
@@ -1099,7 +1091,6 @@ test_scan_deletion(apr_pool_t *pool)
   /* Implicit delete of "J" (via replacement).  */
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-c",
                                    work_del_abspath, pool));
@@ -1107,14 +1098,12 @@ test_scan_deletion(apr_pool_t *pool)
   /* Base-deleted tree extending past deleted WORKING subtree.  */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "J/J-e/J-e-b/Jeba", pool),
             pool, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(base_replaced);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place",
                                    moved_to_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
@@ -1123,7 +1112,6 @@ test_scan_deletion(apr_pool_t *pool)
   /* Base-deleted tree extending past added WORKING tree.  */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "J/J-f/J-f-a", pool),
@@ -1131,49 +1119,42 @@ test_scan_deletion(apr_pool_t *pool)
   /* Implicit delete of "J" (via replacement).  */
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "J",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(work_del_abspath == NULL);
 
   /* Root of delete. Parent is a BASE node. */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "K", pool),
             pool, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "K",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(!base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(work_del_abspath == NULL);
 
   /* Base-deleted tree. Start below root.  */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "K/K-a", pool),
             pool, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "K",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(!base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(work_del_abspath == NULL);
 
   /* Base-deleted tree via move.  */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "K/K-b", pool),
             pool, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "K/K-b",
                                    base_del_abspath, pool));
-  SVN_TEST_ASSERT(!base_replaced);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "moved/away",
                                    moved_to_abspath, pool));
   SVN_TEST_ASSERT(work_del_abspath == NULL);
@@ -1181,13 +1162,11 @@ test_scan_deletion(apr_pool_t *pool)
   /* Subtree deletion of added tree. Start at child.  */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "L/L-a/L-a-a", pool),
             pool, pool));
   SVN_TEST_ASSERT(base_del_abspath == NULL);
-  SVN_TEST_ASSERT(!base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "L/L-a",
                                    work_del_abspath, pool));
@@ -1195,13 +1174,11 @@ test_scan_deletion(apr_pool_t *pool)
   /* Subtree deletion of added tree. Start at root.  */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "L/L-a", pool),
             pool, pool));
   SVN_TEST_ASSERT(base_del_abspath == NULL);
-  SVN_TEST_ASSERT(!base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "L/L-a",
                                    work_del_abspath, pool));
@@ -1209,13 +1186,11 @@ test_scan_deletion(apr_pool_t *pool)
   /* Root of delete, parent converted to BASE during post-commit. */
   SVN_ERR(svn_wc__db_scan_deletion(
             &base_del_abspath,
-            &base_replaced,
             &moved_to_abspath,
             &work_del_abspath,
             db, svn_dirent_join(local_abspath, "M/M-a", pool),
             pool, pool));
   SVN_TEST_ASSERT(base_del_abspath == NULL);
-  SVN_TEST_ASSERT(!base_replaced);
   SVN_TEST_ASSERT(moved_to_abspath == NULL);
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "M/M-a",
                                    work_del_abspath, pool));