You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/06/16 17:06:02 UTC
svn commit: r955253 - /subversion/trunk/subversion/libsvn_client/add.c
Author: rhuijben
Date: Wed Jun 16 15:06:01 2010
New Revision: 955253
URL: http://svn.apache.org/viewvc?rev=955253&view=rev
Log:
* subversion/libsvn_client/add.c
(add_parent_dirs): Fix locking code to actually perform a lock and unlock.
Modified:
subversion/trunk/subversion/libsvn_client/add.c
Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=955253&r1=955252&r2=955253&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Wed Jun 16 15:06:01 2010
@@ -565,15 +565,21 @@ add_parent_dirs(svn_client_ctx_t *ctx,
parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
SVN_ERR(add_parent_dirs(ctx, parent_abspath, scratch_pool));
+
+ /* ### New dir gets added with its own per-directory lock which we
+ must release. To do this we first lock the parent directory.
+ This code might be redundant when we move to a single db and
+ can get the locking strategy worked out for adding nodes. *
+ SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, parent_abspath,
+ scratch_pool, scratch_pool));
+
SVN_ERR(svn_wc_add4(ctx->wc_ctx, local_abspath, svn_depth_infinity,
NULL, SVN_INVALID_REVNUM,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
- /* ### New dir gets added with its own per-directory lock which we
- must release. This code should be redundant when we move to a
- single db. */
- SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, local_abspath, scratch_pool));
+ /* Releases lock for parent directory and new subdir */
+ SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, parent_abspath, scratch_pool));
return SVN_NO_ERROR;
}