You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/09/01 19:44:41 UTC
svn commit: r991619 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/commit.c
libsvn_client/commit_util.c libsvn_client/merge.c libsvn_wc/entries.c
libsvn_wc/node.c
Author: julianfoad
Date: Wed Sep 1 17:44:41 2010
New Revision: 991619
URL: http://svn.apache.org/viewvc?rev=991619&view=rev
Log:
Stop using svn_wc__node_is_status_obstructed(), as this kind of obstruction
can no longer occur in single-DB mode.
* subversion/libsvn_client/commit.c
(post_process_commit_item): Don't handle an obstructed admin dir.
* subversion/libsvn_client/commit_util.c
(harvest_committables): Don't handle an obstructed admin dir.
* subversion/libsvn_client/merge.c
(obstructed_or_missing, get_mergeinfo_walk_cb): Don't handle an obstructed
admin dir.
* subversion/libsvn_wc/entries.c
(svn_wc__temp_mark_missing_not_present): Remove.
* subversion/libsvn_wc/node.c
(svn_wc__node_is_status_obstructed): Remove.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_is_status_obstructed): Remove.
(svn_wc__temp_mark_missing_not_present): Remove.
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
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/node.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=991619&r1=991618&r2=991619&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed Sep 1 17:44:41 2010
@@ -394,6 +394,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 */
/**
* 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
@@ -405,6 +406,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 */
/**
* Set @a *is_absent to whether @a local_abspath is absent, using
@@ -682,6 +684,7 @@ svn_wc__call_with_write_lock(svn_wc__wit
apr_pool_t *scratch_pool);
+#if 0 /* not required with SINGLE_DB */
/** Mark missing, deleted directory @a local_abspath as 'not-present'
* in its parent's list of entries.
*
@@ -692,6 +695,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 */
/**
* 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=991619&r1=991618&r2=991619&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Wed Sep 1 17:44:41 2010
@@ -929,6 +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 */
/* Is it a missing, deleted directory?
### Temporary: once we centralise this sort of node is just a
@@ -945,6 +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 */
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=991619&r1=991618&r2=991619&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Wed Sep 1 17:44:41 2010
@@ -859,6 +859,7 @@ harvest_committables(apr_hash_t *committ
and depth says not to go there. */
continue;
}
+#if 0 /* not required with SINGLE_DB */
else
{
svn_boolean_t obstructed;
@@ -897,6 +898,7 @@ harvest_committables(apr_hash_t *committ
}
}
}
+#endif /* not required with SINGLE_DB */
}
{
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=991619&r1=991618&r2=991619&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Sep 1 17:44:41 2010
@@ -438,6 +438,7 @@ obstructed_or_missing(svn_wc_notify_stat
pool));
if (is_deleted)
{
+#if 0 /* not required with 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 */
@@ -456,6 +457,7 @@ obstructed_or_missing(svn_wc_notify_stat
}
}
else
+#endif /* not required with SINGLE_DB */
kind_expected = svn_node_none;
}
}
@@ -5351,7 +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 */
svn_boolean_t obstructed;
+#endif /* not required with SINGLE_DB */
svn_boolean_t immediate_child_dir;
/* TODO(#2843) How to deal with a excluded item on merge? */
@@ -5363,14 +5367,20 @@ get_mergeinfo_walk_cb(const char *local_
if (!is_present)
return SVN_NO_ERROR;
+#if 0 /* not required with 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 */
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 */
if (obstructed || deleted || absent)
+#else
+ if (deleted || absent)
+#endif /* not required with SINGLE_DB */
{
propval = NULL;
switched = FALSE;
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=991619&r1=991618&r2=991619&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Wed Sep 1 17:44:41 2010
@@ -2796,6 +2796,7 @@ svn_wc_walk_entries3(const char *path,
walk_baton, pool);
}
+#ifndef SVN_WC__SINGLE_DB
svn_error_t *
svn_wc__temp_mark_missing_not_present(const char *local_abspath,
svn_wc_context_t *wc_ctx,
@@ -2844,3 +2845,4 @@ svn_wc__temp_mark_missing_not_present(co
"path is marked 'missing'"),
svn_dirent_local_style(local_abspath, scratch_pool));
}
+#endif
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=991619&r1=991618&r2=991619&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Wed Sep 1 17:44:41 2010
@@ -819,6 +819,7 @@ svn_wc__node_is_status_deleted(svn_boole
return SVN_NO_ERROR;
}
+#ifndef SVN_WC__SINGLE_DB
svn_error_t *
svn_wc__node_is_status_obstructed(svn_boolean_t *is_obstructed,
svn_wc_context_t *wc_ctx,
@@ -841,6 +842,7 @@ svn_wc__node_is_status_obstructed(svn_bo
return SVN_NO_ERROR;
}
+#endif
svn_error_t *
svn_wc__node_is_status_absent(svn_boolean_t *is_absent,
RE: svn commit: r991619 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/commit.c
libsvn_client/commit_util.c libsvn_client/merge.c libsvn_wc/entries.c
libsvn_wc/node.c
Posted by Julian Foad <ju...@wandisco.com>.
Bert Huijben wrote:
> From: Greg Stein:
> > On Wed, Sep 1, 2010 at 13:44, <ju...@apache.org> wrote:
> > > +#if 0 /* not required with SINGLE_DB */
> >
> > Shouldn't this be #ifdef SVN_WC__SINGLE_DB ? I thought the idea was
> > to keep using that define for a while so that developers can compile
> > multi-db for testing purposes.
> >
> > Now... I recognize that symbol is not available to libsvn_client which
> > then means that multi-db isn't possible any more? Maybe a more
OK, first things first. To improve this, I added a duplicate #define of
SVN_WC__SINGLE_DB in svn_wc_private.h so it can be used here and in the
client code. A multi-DB build now requires commenting out that define
in only those two places rather than changing the "#if 0" in multiple
places.
r991887. A bit ugly but one step better.
I considered moving the #define to some single place from where it would
be available everywhere - either in "include/svn_wc.h" or in the
configuration script (controlled by "configure --disable-single-db") -
but neither seems worth the effort.
> > appropriate approach would be to just leave the functions as stubs?
> > And then some ### markers to fully remove them when we strip out all
> > the multi-db code? (in a couple weeks?)
Not really, as I want the whole block of client code that uses these
functions to be disabled rather than just the functionality of the
functions themselves.
> Julian:
> Any constructs like this break the shared library build on Windows.
Oops.
> We have a python script somewhere in the tree (extractor.py if I remember
> correctly) that scans all the header files defined in build.conf to generate
> .def files for the Windows DLLs. And these functions will be made public for
> library users.
>
> But in this case the scripts finds functions that aren't defined, but makes
> them part of the public interface anyway. (Resulting in a linker error)
>
> For a few specific cases (like mac only function) we applied some exceptions
> to the extractor, but in this case I think we should just start removing
> multi-db support.
I suppose deleting or commenting out just the function prototypes from
the header file is a possible intermediate solution. Do you think so?
- Julian
RE: svn commit: r991619 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/commit.c libsvn_client/commit_util.c libsvn_client/merge.c libsvn_wc/entries.c libsvn_wc/node.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Greg Stein [mailto:gstein@gmail.com]
> Sent: donderdag 2 september 2010 2:16
> To: dev@subversion.apache.org
> Subject: Re: svn commit: r991619 - in /subversion/trunk/subversion:
> include/private/svn_wc_private.h libsvn_client/commit.c
> libsvn_client/commit_util.c libsvn_client/merge.c libsvn_wc/entries.c
> libsvn_wc/node.c
>
> On Wed, Sep 1, 2010 at 13:44, <ju...@apache.org> wrote:
> >...
> > +++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed
> Sep 1 17:44:41 2010
> > @@ -394,6 +394,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 */
>
> Shouldn't this be #ifdef SVN_WC__SINGLE_DB ? I thought the idea was
> to keep using that define for a while so that developers can compile
> multi-db for testing purposes.
>
> Now... I recognize that symbol is not available to libsvn_client which
> then means that multi-db isn't possible any more? Maybe a more
> appropriate approach would be to just leave the functions as stubs?
> And then some ### markers to fully remove them when we strip out all
> the multi-db code? (in a couple weeks?)
Julian:
Any constructs like this break the shared library build on Windows.
We have a python script somewhere in the tree (extractor.py if I remember
correctly) that scans all the header files defined in build.conf to generate
.def files for the Windows DLLs. And these functions will be made public for
library users.
But in this case the scripts finds functions that aren't defined, but makes
them part of the public interface anyway. (Resulting in a linker error)
For a few specific cases (like mac only function) we applied some exceptions
to the extractor, but in this case I think we should just start removing
multi-db support.
Bert
Re: svn commit: r991619 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/commit.c libsvn_client/commit_util.c
libsvn_client/merge.c libsvn_wc/entries.c libsvn_wc/node.c
Posted by Greg Stein <gs...@gmail.com>.
On Wed, Sep 1, 2010 at 13:44, <ju...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed Sep 1 17:44:41 2010
> @@ -394,6 +394,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 */
Shouldn't this be #ifdef SVN_WC__SINGLE_DB ? I thought the idea was
to keep using that define for a while so that developers can compile
multi-db for testing purposes.
Now... I recognize that symbol is not available to libsvn_client which
then means that multi-db isn't possible any more? Maybe a more
appropriate approach would be to just leave the functions as stubs?
And then some ### markers to fully remove them when we strip out all
the multi-db code? (in a couple weeks?)
>...
Cheers,
-g