You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/05/27 18:35:01 UTC

svn commit: r948899 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c props.c props.h upgrade.c wc.h workqueue.c

Author: hwright
Date: Thu May 27 16:35:01 2010
New Revision: 948899

URL: http://svn.apache.org/viewvc?rev=948899&view=rev
Log:
Given the fairly imminent move to in-db-props and format 17, replace the use
of the USE_DB_PROPS define with one dependent upon the current format number.

* subversion/libsvn_wc/props.c:
  Use (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB) instead of #ifndef USE_DB_PROPS.

* subversion/libsvn_wc/adm_ops.c:
  Same.

* subversion/libsvn_wc/workqueue.c:
  Same.

* subversion/libsvn_wc/props.h
  (USE_DB_PROPS): Remove.

* subversion/libsvn_wc/wc.h
  (SVN_WC__PROPS_IN_DB): New.

* subversion/libsvn_wc/upgrade.c
  (svn_wc__upgrade_sdb): Instead of excluding the format 17 upgrade clause,
    make it conditional upon the format number.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_ops.c
    subversion/trunk/subversion/libsvn_wc/props.c
    subversion/trunk/subversion/libsvn_wc/props.h
    subversion/trunk/subversion/libsvn_wc/upgrade.c
    subversion/trunk/subversion/libsvn_wc/wc.h
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=948899&r1=948898&r2=948899&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Thu May 27 16:35:01 2010
@@ -385,7 +385,7 @@ process_committed_leaf(svn_wc__db_t *db,
                                 scratch_pool));
     }
 
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
   /* Queue a removal of any "revert" properties now. These correspond to
      the BASE properties, but hidden by new pristine props in WORKING.
      Regardless, the commit will be installing new BASE props.  */
@@ -1577,7 +1577,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                                      &tmp_entry, modify_flags, pool));
     }
 
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
   /* If this is a replacement without history, we need to reset the
      properties for PATH. */
   /* ### this is totally bogus. we clear these cuz turds might have been
@@ -2421,7 +2421,7 @@ svn_wc__internal_remove_from_revision_co
                                      scratch_pool));
 #endif
 
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
       /* Remove prop/NAME, prop-base/NAME.svn-base. */
       SVN_ERR(svn_wc__props_delete(db, local_abspath, svn_wc__props_working,
                                    scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=948899&r1=948898&r2=948899&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Thu May 27 16:35:01 2010
@@ -73,7 +73,7 @@ message_from_skel(const svn_skel_t *skel
                   apr_pool_t *scratch_pool);
 
 
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
 
 /* Get PATH's properies of PROPS_KIND, and put them into *HASH.
    PATH should be of kind NODE_KIND. */
@@ -132,7 +132,7 @@ load_props(apr_hash_t **hash,
   return svn_stream_close(stream);
 }
 
-#endif /* USE_DB_PROPS  */
+#endif /* (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB) */
 
 
 static svn_error_t *
@@ -142,7 +142,7 @@ load_pristine_props(apr_hash_t **props,
                     apr_pool_t *result_pool,
                     apr_pool_t *scratch_pool)
 {
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
 
   SVN_ERR(svn_wc__db_read_pristine_props(props, db, local_abspath,
                                          result_pool, scratch_pool));
@@ -153,7 +153,7 @@ load_pristine_props(apr_hash_t **props,
   }
 #endif
 
-#else /* USE_DB_PROPS  */
+#else /* (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB) */
 
   /* NOTE: svn_wc__props_base really means "pristine" props, which may
      come from BASE or WORKING.  */
@@ -186,7 +186,7 @@ load_pristine_props(apr_hash_t **props,
       }
   }
 #endif /* TEST_DB_PROPS */
-#endif /* USE_DB_PROPS  */
+#endif /* (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB) */
 
   return SVN_NO_ERROR;
 }
@@ -199,7 +199,7 @@ load_actual_props(apr_hash_t **props,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
 
   SVN_ERR(svn_wc__db_read_props(props, db, local_abspath,
                                 result_pool, scratch_pool));
@@ -210,7 +210,7 @@ load_actual_props(apr_hash_t **props,
   }
 #endif
 
-#else /* USE_DB_PROPS  */
+#else /* (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB) */
   /* NOTE: svn_wc__props_working really means ACTUAL.  */
   SVN_ERR(load_props(props, db, local_abspath, svn_wc__props_working,
                      result_pool));
@@ -250,7 +250,7 @@ load_actual_props(apr_hash_t **props,
       }
   }
 #endif /* TEST_DB_PROPS  */
-#endif /* USE_DB_PROPS  */
+#endif /* (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB) */
 
   return SVN_NO_ERROR;
 }
@@ -339,7 +339,7 @@ svn_wc__get_revert_props(apr_hash_t **re
                                        scratch_pool));
   if (replaced)
     {
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
       SVN_ERR(svn_wc__db_base_get_props(revert_props_p, db, local_abspath,
                                         result_pool, scratch_pool));
 #else
@@ -355,7 +355,7 @@ svn_wc__get_revert_props(apr_hash_t **re
     apr_hash_t *other_props;
     apr_array_header_t *diffs;
 
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
     SVN_ERR(svn_wc__db_base_get_props(&other_props, db, local_abspath,
                                       scratch_pool, scratch_pool));
 #else
@@ -506,7 +506,7 @@ svn_wc__working_props_committed(svn_wc__
                                 const char *local_abspath,
                                 apr_pool_t *scratch_pool)
 {
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
   return SVN_NO_ERROR;
 #else
   svn_wc__db_kind_t kind;
@@ -538,7 +538,7 @@ svn_wc__props_delete(svn_wc__db_t *db,
                      svn_wc__props_kind_t props_kind,
                      apr_pool_t *pool)
 {
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
   return SVN_NO_ERROR;
 #else
   const char *props_file;
@@ -2718,7 +2718,8 @@ svn_wc__props_modified(svn_boolean_t *mo
                             scratch_pool, scratch_pool));
   SVN_ERR_ASSERT(localprops != NULL);
 
-  /* ### this should not apply nowadays. especially if USE_DB_PROPS.  */
+  /* ### this should not apply nowadays. especially if
+                            (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)  */
 #if 0
   {
     svn_boolean_t replaced;

Modified: subversion/trunk/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.h?rev=948899&r1=948898&r2=948899&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.h (original)
+++ subversion/trunk/subversion/libsvn_wc/props.h Thu May 27 16:35:01 2010
@@ -50,10 +50,6 @@ extern "C" {
 #undef SVN__SUPPORT_BASE_MERGE
 
 
-/* EXPERIMENTAL: use in-database props  */
-#undef USE_DB_PROPS
-
-
 typedef enum svn_wc__props_kind_t
 {
   svn_wc__props_base = 0,

Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=948899&r1=948898&r2=948899&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Thu May 27 16:35:01 2010
@@ -1290,7 +1290,7 @@ svn_wc__upgrade_sdb(int *result_format,
         *result_format = 16;
         /* FALLTHROUGH  */
 
-#if 0
+#if (SVN_WC__VERSION > 16)
       case 16:
         {
           struct bump_to_17_baton b17;

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=948899&r1=948898&r2=948899&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Thu May 27 16:35:01 2010
@@ -156,6 +156,9 @@ extern "C" {
    this format or later will only have wcprops in BASE_NODE.dav_cache.  */
 #define SVN_WC__USES_DAV_CACHE 13
 
+/* A version < this does not store properties in wc.db.  */
+#define SVN_WC__PROPS_IN_DB 17
+
 
 
 /*** Context handling ***/

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=948899&r1=948898&r2=948899&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Thu May 27 16:35:01 2010
@@ -236,7 +236,7 @@ run_revert(svn_wc__db_t *db,
             db, local_abspath,
             scratch_pool, scratch_pool));
 
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
   /* Move the "revert" props over/on the "base" props.  */
   if (replaced)
     {
@@ -263,7 +263,7 @@ run_revert(svn_wc__db_t *db,
 #endif
 
   /* The "working" props contain changes. Nuke 'em from orbit.  */
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
   SVN_ERR(svn_wc__prop_path(&working_props_path, local_abspath,
                             kind, svn_wc__props_working, scratch_pool));
   SVN_ERR(svn_io_remove_file2(working_props_path, TRUE, scratch_pool));
@@ -701,7 +701,7 @@ run_prepare_revert_files(svn_wc__db_t *d
 
   /* Set up the revert props.  */
 
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
   SVN_ERR(svn_wc__prop_path(&revert_prop_abspath, local_abspath, kind,
                             svn_wc__props_revert, scratch_pool));
   SVN_ERR(svn_wc__prop_path(&base_prop_abspath, local_abspath, kind,
@@ -1799,7 +1799,7 @@ run_delete(svn_wc__db_t *db,
 
   if (was_replaced && was_copied)
     {
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
       const char *props_base, *props_revert;
 
       SVN_ERR(svn_wc__prop_path(&props_base, local_abspath, kind,
@@ -1822,7 +1822,7 @@ run_delete(svn_wc__db_t *db,
         }
 #endif
     }
-#ifndef USE_DB_PROPS
+#if (SVN_WC__VERSION < SVN_WC__PROPS_IN_DB)
   if (was_added)
     {
       const char *props_base, *props_working;
@@ -2247,7 +2247,7 @@ svn_wc__wq_build_write_old_props(svn_ske
                                  apr_hash_t *props,
                                  apr_pool_t *result_pool)
 {
-#ifdef USE_DB_PROPS
+#if (SVN_WC__VERSION >= SVN_WC__PROPS_IN_DB)
   *work_item = NULL;
 #else
   *work_item = svn_skel__make_empty_list(result_pool);