> -----Original Message----- > From: phi...@apache.org [mailto:phi...@apache.org] > Sent: dinsdag 24 november 2009 3:00 > To: comm...@subversion.apache.org > Subject: svn commit: r883696 - in /subversion/trunk/subversion: > include/private/svn_wc_private.h libsvn_client/add.c > libsvn_client/revert.c libsvn_wc/adm_files.c libsvn_wc/adm_files.h > libsvn_wc/adm_ops.c libsvn_wc/lock.c > > Author: philip > Date: Tue Nov 24 13:59:45 2009 > New Revision: 883696 > > URL: http://svn.apache.org/viewvc?rev=883696&view=rev > Log: > A better fix for the SEGV fixed in r881265: replace another use > of access batons. This no longer leaves .svn directories around. > > * subversion/libsvn_wc/adm_files.h > (svn_wc__adm_destroy): Pass svn_wc__db_t and abspath rather than > svn_wc_adm_access_t. > > * subversion/libsvn_wc/adm_files.c > (svn_wc__adm_destroy): Use svn_wc__db_t directly. > > * subversion/libsvn_wc/adm_ops.c > (svn_wc__internal_remove_from_revision_control): Revert r881265: no > need to check for null access baton. > > * subversion/include/private/svn_wc_private.h > (svn_wc_acquire_write_lock): Add anchor_abspath parameter. > > * subversion/libsvn_wc/lock.c > (svn_wc_acquire_write_lock): Add anchor_abspath parameter and code. > > * subversion/libsvn_client/revert.c > (revert): Acquire and release locks on the anchor. > > * subversion/libsvn_client/add.c > (svn_client_add4): Update svn_wc_acquire_write_lock call. > > Modified: > subversion/trunk/subversion/include/private/svn_wc_private.h > subversion/trunk/subversion/libsvn_client/add.c > subversion/trunk/subversion/libsvn_client/revert.c > subversion/trunk/subversion/libsvn_wc/adm_files.c > subversion/trunk/subversion/libsvn_wc/adm_files.h > subversion/trunk/subversion/libsvn_wc/adm_ops.c > subversion/trunk/subversion/libsvn_wc/lock.c > > Modified: subversion/trunk/subversion/include/private/svn_wc_private.h > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/include/privat > e/svn_wc_private.h?rev=883696&r1=883695&r2=883696&view=diff > ======================================================================= > ======= > --- subversion/trunk/subversion/include/private/svn_wc_private.h > (original) > +++ subversion/trunk/subversion/include/private/svn_wc_private.h Tue > Nov 24 13:59:45 2009 > @@ -516,12 +516,17 @@ > > > /** > - * Recursively acquire write locks for @a local_abspath, using @a > wc_ctx > + * Recursively acquire write locks for @a local_abspath if > + * @a anchor_abspath is NULL. If @a anchor_abspath is not NULL then > + * recursively acquire write locks for the anchor of @a local_abspath > + * and return the anchor path in @a *anchor_abspath. Use @a wc_ctx > * for working copy access. > */ > svn_error_t * > -svn_wc__acquire_write_lock(svn_wc_context_t *wc_ctx, > +svn_wc__acquire_write_lock(const char **anchor_abspath, > + svn_wc_context_t *wc_ctx, > const char *local_abspath, > + apr_pool_t *result_pool, > apr_pool_t *scratch_pool);
Please add a note that the anchor_abspath argument should be removed after we move to a single database. In the single database there is no information on a path stored in its parent, so you never have to lock an anchor for updating/deleting/adding a child. I didn't review this issue, but maybe this code relying on a lock of the parent should just lock the parent instead of requiring all the callers of this new functions to think about an ancestor. (Stop thinking about locking ancestors is most likely the reason for introducing this function. Hyrum?) Bert