Hello
I believe r2504 is incorrect, if we do not find the expected lock at
the start of post-commit processing then there is a bug somewhere. In
that circumstance it is wrong to do as r2504 does and try and acquire
the lock. There is an unexpected condition, we should not continue
and modify the working copy, that may do more harm then good. It may
also hide other bugs.
* subversion/libsvn_client/commit.c (svn_client_commit): Revert
r2504, just return an error instead.
Index: ../svn/subversion/libsvn_client/commit.c
===================================================================
--- ../svn/subversion/libsvn_client/commit.c
+++ ../svn/subversion/libsvn_client/commit.c Sat Jul 13 21:26:18 2002
@@ -919,15 +919,12 @@
svn_path_split_nts (item->path, &adm_access_path, NULL, pool);
adm_access = apr_hash_get (locked_dirs, adm_access_path,
APR_HASH_KEY_STRING);
-
- if ( ! adm_access )
- {
- SVN_ERR (svn_wc_adm_open (&adm_access, adm_access_path, TRUE,
- pool));
- apr_hash_set (locked_dirs, apr_pstrdup(pool, adm_access_path),
- APR_HASH_KEY_STRING, adm_access);
- }
-
+ if (! adm_access)
+ /* This should *never* happen */
+ return svn_error_createf(SVN_ERR_GENERAL, 0, NULL, pool,
+ "BUG: no lock for %s",
+ item->path);
+
if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
&& (item->kind == svn_node_dir)
&& (item->copyfrom_url))
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 13 22:47:37 2002