There doesn't seem to be any reason we need a full recursive lock when a
non-recursive property operation is performed. It is automatically
dropped to a non-recursive lock when the target is not a directory, but
for directories a full recursive lock is done. Does anyone know of a
reason that should be?
This patch makes non-recursive property operations on a directory use a
depth of zero. It passes ra_local tests and manual testing and
significantly improves performance in those cases. If it passes the
rest of the tests and there are no objections, I'll commit it in a day
or two.
Log:
Don't do recursive locking when the property operation
is not recursive.
* subversion/libsvn_client/prop_commands.c
(svn_client_propset, svn_client_propget,
svn_client_proplist): If the operation is not recursive
then use a lock depth of 0.
Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c (revision 9123)
+++ subversion/libsvn_client/prop_commands.c (working copy)
@@ -162,7 +162,7 @@
"Bad property name: '%s'", propname);
SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target, TRUE,
- -1, pool));
+ recurse ? -1 : 0, pool));
SVN_ERR (svn_wc_entry (&node, target, adm_access, FALSE, pool));
if (!node)
return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
@@ -562,7 +562,7 @@
svn_boolean_t pristine;
SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target,
- FALSE, -1, pool));
+ FALSE, recurse ? -1 : 0, pool));
SVN_ERR (svn_wc_entry (&node, target, adm_access, FALSE, pool));
if (! node)
return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
@@ -919,7 +919,7 @@
svn_boolean_t pristine;
SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target,
- FALSE, -1, pool));
+ FALSE, recurse ? -1 : 0, pool));
SVN_ERR (svn_wc_entry (&node, target, adm_access, FALSE, pool));
if (! node)
return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 19 06:01:43 2004