Author: julianfoad
Date: Thu Sep  2 10:59:27 2010
New Revision: 991887

URL: http://svn.apache.org/viewvc?rev=991887&view=rev
Log:
To make it easier to do a multi-DB build, define SVN_WC__SINGLE_DB in the WC
private header so the client code can see it, and replace "#if 0" with
"#ifndef SVN_WC__SINGLE_DB" in the client code.

* subversion/include/private/svn_wc_private.h
  Define SVN_WC__SINGLE_DB, unconditionally.  Add a comment that it's also
  defined in "wc.h".  Replace "#if 0" with "#ifndef SVN_WC__SINGLE_DB".

* subversion/libsvn_client/merge.c
  subversion/libsvn_client/commit_util.c,
  subversion/libsvn_client/commit.c
    Replace "#if 0" with "#ifndef SVN_WC__SINGLE_DB".

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/commit.c
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/libsvn_client/merge.c

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=991887&r1=991886&r2=991887&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Sep  2 
10:59:27 2010
@@ -44,6 +44,11 @@ extern "C" {
 #endif /* __cplusplus */
 
 
+/* ### Temporary.  Also defined in subversion/libsvn_wc/wc.h.  To build
+ *     multi-DB mode, undefine this in both places. */
+#define SVN_WC__SINGLE_DB
+
+
 /** Given a @a local_abspath with a @a wc_ctx, set @a *switched to
  * TRUE if @a local_abspath is switched, otherwise set @a *switched to FALSE.
  * All temporary allocations are done in * @a scratch_pool.
@@ -394,7 +399,7 @@ svn_wc__node_is_status_deleted(svn_boole
                                const char *local_abspath,
                                apr_pool_t *scratch_pool);
 
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
 /**
  * Set @a *is_obstructed to whether @a local_abspath is obstructed, using
  * @a wc_ctx.  If @a local_abspath is not in the working copy, return
@@ -406,7 +411,7 @@ svn_wc__node_is_status_obstructed(svn_bo
                                   svn_wc_context_t *wc_ctx,
                                   const char *local_abspath,
                                   apr_pool_t *scratch_pool);
-#endif  /* not required with SINGLE_DB */
+#endif
 
 /**
  * Set @a *is_absent to whether @a local_abspath is absent, using
@@ -684,7 +689,7 @@ svn_wc__call_with_write_lock(svn_wc__wit
                              apr_pool_t *scratch_pool);
 
 
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
 /** Mark missing, deleted directory @a local_abspath as 'not-present'
  * in its parent's list of entries.
  *
@@ -695,7 +700,7 @@ svn_error_t *
 svn_wc__temp_mark_missing_not_present(const char *local_abspath,
                                       svn_wc_context_t *wc_ctx,
                                       apr_pool_t *scratch_pool);
-#endif  /* not required with SINGLE_DB */
+#endif
 
 /**
  * Register @a local_abspath as a new file external aimed at

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=991887&r1=991886&r2=991887&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Thu Sep  2 10:59:27 2010
@@ -929,7 +929,7 @@ post_process_commit_item(svn_wc_committe
   svn_boolean_t loop_recurse = FALSE;
   svn_boolean_t remove_lock;
 
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
   /* Is it a missing, deleted directory?
 
      ### Temporary: once we centralise this sort of node is just a
@@ -946,7 +946,7 @@ post_process_commit_item(svn_wc_committe
         return svn_wc__temp_mark_missing_not_present(item->path,
                                                      wc_ctx, scratch_pool);
     }
-#endif  /* not required with SINGLE_DB */
+#endif
 
   if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
       && (item->kind == svn_node_dir)

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=991887&r1=991886&r2=991887&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Thu Sep  2 10:59:27 
2010
@@ -859,7 +859,7 @@ harvest_committables(apr_hash_t *committ
                      and depth says not to go there. */
                   continue;
                 }
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
               else
                 {
                   svn_boolean_t obstructed;
@@ -898,7 +898,7 @@ harvest_committables(apr_hash_t *committ
                         }
                     }
                 }
-#endif  /* not required with SINGLE_DB */
+#endif
             }
 
           {

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=991887&r1=991886&r2=991887&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu Sep  2 10:59:27 2010
@@ -438,7 +438,7 @@ obstructed_or_missing(svn_wc_notify_stat
                                              pool));
       if (is_deleted)
         {
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
           /* ### While we are not at single-db: detect missing .svn dirs.
              ### Once we switch to single db expected kind should be always
              ### none, just like for files */
@@ -457,7 +457,7 @@ obstructed_or_missing(svn_wc_notify_stat
                 }
             }
           else
-#endif  /* not required with SINGLE_DB */
+#endif
             kind_expected = svn_node_none;
         }
     }
@@ -5353,9 +5353,9 @@ get_mergeinfo_walk_cb(const char *local_
   svn_boolean_t is_present;
   svn_boolean_t deleted;
   svn_boolean_t absent;
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
   svn_boolean_t obstructed;
-#endif  /* not required with SINGLE_DB */
+#endif
   svn_boolean_t immediate_child_dir;
 
   /* TODO(#2843) How to deal with a excluded item on merge? */
@@ -5367,20 +5367,20 @@ get_mergeinfo_walk_cb(const char *local_
   if (!is_present)
     return SVN_NO_ERROR;
 
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
   SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed, wb->ctx->wc_ctx,
                                             local_abspath, scratch_pool));
-#endif  /* not required with SINGLE_DB */
+#endif
   SVN_ERR(svn_wc__node_is_status_deleted(&deleted, wb->ctx->wc_ctx,
                                          local_abspath, scratch_pool));
   SVN_ERR(svn_wc__node_is_status_absent(&absent, wb->ctx->wc_ctx,
                                         local_abspath, scratch_pool));
 
-#if 0  /* not required with SINGLE_DB */
+#ifndef SVN_WC__SINGLE_DB
    if (obstructed || deleted || absent)
 #else
    if (deleted || absent)
-#endif  /* not required with SINGLE_DB */
+#endif
     {
       propval = NULL;
       switched = FALSE;


Reply via email to