[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Don't lock whole WC in svn lock/unlock (was: Re: svn commit: r14736 - in trunk/subversion: tests/clients/cmdline)

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-05-19 00:01:15 CEST

"Peter N. Lundblad" <peter@famlundblad.se> writes:

> This simple fix will at least avoid locking the whole WC in many cases.
> Seems OK?

Looks like a good idea.

> --- subversion/libsvn_client/locking_commands.c (revision 14773)
> +++ subversion/libsvn_client/locking_commands.c (arbetskopia)
> @@ -203,10 +203,23 @@
> }
> else /* common parent is a local path */
> {
> + int max_depth = 0;
> +
> + /* Calculate the maximum number of components in the rel_targets, which
> + is the depth to which we need to lock the WC. */
> + for (i = 0; i < rel_targets->nelts; ++i)
> + {
> + const char *target = ((const char **) (rel_targets->elts))[i];
> + int n = svn_path_component_count (target);
> +
> + if (n > max_depth)
> + max_depth = n;

Given that we only lock files, does n-1 work?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 19 00:02:03 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.