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 2011/05/31 15:25:59 UTC

svn commit: r1129662 - in /subversion/trunk/subversion: libsvn_wc/status.c libsvn_wc/upgrade.c libsvn_wc/util.c libsvn_wc/wc.h libsvn_wc/wc_db_pristine.c tests/libsvn_wc/db-test.c

Author: philip
Date: Tue May 31 13:25:59 2011
New Revision: 1129662

URL: http://svn.apache.org/viewvc?rev=1129662&view=rev
Log:
Remove all the conditional code for pre-EXTERNALS table support.

* subversion/libsvn_wc/wc.h
  (SVN_WC__HAS_EXTERNALS_STORE): Remove

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Remove conditional code.

* subversion/libsvn_wc/status.c
  (handle_externals): Remove.
  (get_dir_status, svn_wc_get_status_editor5,
   svn_wc__internal_walk_status): Remove conditional code.

* subversion/libsvn_wc/upgrade.c
  (svn_wc__upgrade_sdb): Remove conditional.

* subversion/libsvn_wc/wc_db_pristine.c
  (get_pristine_fname): Remove conditional.

* subversion/tests/libsvn_wc/db-test.c
  (test_externals_store): Remove conditional code.

Modified:
    subversion/trunk/subversion/libsvn_wc/status.c
    subversion/trunk/subversion/libsvn_wc/upgrade.c
    subversion/trunk/subversion/libsvn_wc/util.c
    subversion/trunk/subversion/libsvn_wc/wc.h
    subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
    subversion/trunk/subversion/tests/libsvn_wc/db-test.c

Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1129662&r1=1129661&r2=1129662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Tue May 31 13:25:59 2011
@@ -960,51 +960,6 @@ send_unversioned_item(const struct walk_
   return SVN_NO_ERROR;
 }
 
-#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
-/* Helper for get_dir_status. If LOCAL_ABSPATH has "svn:externals" property
-   set on it, send the name and value to WB->external_func, along with
-   this directory's depth, but skip this step if LOCAL_ABSPATH is the anchor
-   of a specific target.  (Also, we want to track the externals internally
-   so we can report status more accurately.) */
-static svn_error_t *
-handle_externals(const struct walk_status_baton *wb,
-                 const char *local_abspath,
-                 svn_depth_t depth,
-                 apr_pool_t *scratch_pool)
-{
-  const svn_string_t *prop_val;
-
-  SVN_ERR(svn_wc__internal_propget(&prop_val, wb->db, local_abspath,
-                                   SVN_PROP_EXTERNALS, scratch_pool,
-                                   scratch_pool));
-  if (prop_val)
-    {
-      apr_pool_t *hash_pool = apr_hash_pool_get(wb->externals);
-      apr_array_header_t *ext_items;
-      int i;
-
-      /* Now, parse the thing, and copy the parsed results into
-         our "global" externals hash. */
-      SVN_ERR(svn_wc_parse_externals_description3(&ext_items, local_abspath,
-                                                  prop_val->data, FALSE,
-                                                  scratch_pool));
-      for (i = 0; ext_items && i < ext_items->nelts; i++)
-        {
-          const svn_wc_external_item2_t *item;
-
-          item = APR_ARRAY_IDX(ext_items, i, const svn_wc_external_item2_t *);
-          apr_hash_set(wb->externals, svn_dirent_join(local_abspath,
-                                                      item->target_dir,
-                                                      hash_pool),
-                       APR_HASH_KEY_STRING, "");
-        }
-    }
-
-  return SVN_NO_ERROR;
-}
-#endif
-
-
 /* Send svn_wc_status3_t * structures for the directory LOCAL_ABSPATH and
    for all its entries through STATUS_FUNC/STATUS_BATON, or, if SELECTED
    is non-NULL, only for that directory entry.
@@ -1129,15 +1084,6 @@ get_dir_status(const struct walk_status_
       apr_hash_set(all_children, selected, APR_HASH_KEY_STRING, selected);
     }
 
-#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
-  /* If "this dir" has "svn:externals" property set on it, send the name and
-     value to wc->external_func along with this directory's depth. (Also,
-     we want to track the externals internally so we can report status more
-     accurately.) */
-  if (dir_info->had_props)
-    SVN_ERR(handle_externals(wb, local_abspath, dir_info->depth, iterpool));
-#endif
-
   if (!selected)
     {
       /* Handle "this-dir" first. */
@@ -2247,13 +2193,9 @@ svn_wc_get_status_editor5(const svn_delt
   eb->wb.repos_locks      = NULL;
   eb->wb.repos_root       = NULL;
 
-#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
-  eb->wb.externals = apr_hash_make(result_pool);
-#else
   SVN_ERR(svn_wc__db_externals_defined_below(&eb->wb.externals,
                                              wc_ctx->db, eb->target_abspath,
                                              result_pool, scratch_pool));
-#endif
 
   /* Use the caller-provided ignore patterns if provided; the build-time
      configured defaults otherwise. */
@@ -2341,12 +2283,8 @@ svn_wc__internal_walk_status(svn_wc__db_
   wb.repos_root = NULL;
   wb.repos_locks = NULL;
 
-#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
-  wb.externals = apr_hash_make(scratch_pool);
-#else
   SVN_ERR(svn_wc__db_externals_defined_below(&wb.externals, db, local_abspath,
                                              scratch_pool, scratch_pool));
-#endif
 
   /* Use the caller-provided ignore patterns if provided; the build-time
      configured defaults otherwise. */

Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1129662&r1=1129661&r2=1129662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Tue May 31 13:25:59 2011
@@ -1641,13 +1641,11 @@ svn_wc__upgrade_sdb(int *result_format,
         *result_format = 28;
         /* FALLTHROUGH  */
 
-#if SVN_WC__VERSION >= SVN_WC__HAS_EXTERNALS_STORE
       case 28:
         SVN_ERR(svn_sqlite__with_transaction(sdb, bump_to_29, &bb,
                                              scratch_pool));
         *result_format = 29;
         /* FALLTHROUGH  */
-#endif
 
       /* ### future bumps go here.  */
 #if 0

Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1129662&r1=1129661&r2=1129662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Tue May 31 13:25:59 2011
@@ -448,13 +448,7 @@ svn_wc__status2_from_3(svn_wc_status2_t 
 
   (*status)->switched = old_status->switched;
 
-#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
-  if (old_status->versioned
-      && old_status->switched
-      && old_status->kind == svn_node_file)
-#else
   if (old_status->node_status == svn_wc_status_external)
-#endif
     {
       svn_node_kind_t external_kind;
 
@@ -465,12 +459,7 @@ svn_wc__status2_from_3(svn_wc_status2_t 
                                          scratch_pool, scratch_pool));
 
       if (external_kind == svn_node_file)
-        {
-#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
-          (*status)->switched = FALSE;
-#endif
-          (*status)->file_external = TRUE;
-        }
+        (*status)->file_external = TRUE;
     }
 
   (*status)->text_status = old_status->node_status;

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1129662&r1=1129661&r2=1129662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Tue May 31 13:25:59 2011
@@ -182,8 +182,6 @@ extern "C" {
 /* A version < this has no work queue (see workqueue.h).  */
 #define SVN_WC__HAS_WORK_QUEUE 13
 
-#define SVN_WC__HAS_EXTERNALS_STORE 29
-
 /* Return true iff error E indicates an "is not a working copy" type
    of error, either because something wasn't a working copy at all, or
    because it's a working copy from a previous version (in need of

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c?rev=1129662&r1=1129661&r2=1129662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c Tue May 31 13:25:59 2011
@@ -76,10 +76,8 @@ get_pristine_fname(const char **pristine
   subdir[1] = hexdigest[1];
   subdir[2] = '\0';
 
-#if SVN_WC__VERSION >= SVN_WC__HAS_EXTERNALS_STORE
   hexdigest = apr_pstrcat(scratch_pool, hexdigest, PRISTINE_STORAGE_EXT,
                           (char *)NULL);
-#endif
 
   /* The file is located at DIR/.svn/pristine/XX/XXYYZZ...svn-base */
   *pristine_abspath = svn_dirent_join_many(result_pool,

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=1129662&r1=1129661&r2=1129662&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/db-test.c Tue May 31 13:25:59 2011
@@ -1410,7 +1410,6 @@ test_externals_store(apr_pool_t *pool)
                                        NULL,
                                        pool));
 
-#if SVN_WC__VERSION >= SVN_WC__HAS_EXTERNALS_STORE
   SVN_ERR(svn_wc__db_external_add_dir(db,
                                       dir_external_path,
                                       local_abspath /* wri_abspath */,
@@ -1422,7 +1421,6 @@ test_externals_store(apr_pool_t *pool)
                                       32,
                                       NULL,
                                       pool));
-#endif
 
   {
     svn_wc__db_status_t status;
@@ -1446,11 +1444,7 @@ test_externals_store(apr_pool_t *pool)
     SVN_TEST_ASSERT(kind == svn_wc__db_kind_file);
     SVN_TEST_STRING_ASSERT(repos_root_url, "svn://some-repos/svn");
     SVN_TEST_STRING_ASSERT(repos_uuid, "not-a-uuid");
-#if SVN_WC__VERSION >= SVN_WC__HAS_EXTERNALS_STORE
     SVN_TEST_STRING_ASSERT(defining_abspath, subdir);
-#else
-    SVN_TEST_ASSERT(defining_abspath == NULL);
-#endif
     SVN_TEST_STRING_ASSERT(recorded_repos_relpath, "some/new-location");
     SVN_TEST_ASSERT(recorded_peg_revision == 90);
     SVN_TEST_ASSERT(recorded_revision == 12);
@@ -1469,7 +1463,6 @@ test_externals_store(apr_pool_t *pool)
       SVN_TEST_STRING_ASSERT(v->data, "value-data");
     }
 
-#if SVN_WC__VERSION >= SVN_WC__HAS_EXTERNALS_STORE
     SVN_ERR(svn_wc__db_external_read(&status, &kind, &defining_abspath,
                                      &repos_root_url, &repos_uuid,
                                      &recorded_repos_relpath,
@@ -1486,7 +1479,6 @@ test_externals_store(apr_pool_t *pool)
     SVN_TEST_STRING_ASSERT(recorded_repos_relpath, "some/other-location");
     SVN_TEST_ASSERT(recorded_peg_revision == 70);
     SVN_TEST_ASSERT(recorded_revision == 32);
-#endif
   }
 
   return SVN_NO_ERROR;