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

Re: svn commit: r11847 - in branches/locking/subversion/libsvn_fs_base: bdb notes

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-11-12 05:26:00 CET

On Thu, 2004-11-11 at 16:49, sussman@tigris.org wrote:
> +To test if a path is locked, simply check if the path is a key in the
> +`locks-nodes' table. To see if a certain directory has any locked
> +children below, we ask BerkeleyDB to do a "greater or equal match" on
> +the directory path, and see if any results come back. If they do,
> +then at least one of the directory's children is locked, and thus the
> +directory cannot be deleted without further investigation.

I don't think it's *quite* that simple; you do need to check that the
match you got back is a child of the directory you're testing.

(You may have misinterpreted "greater or equal". What brane meant is
that btree won't give you the closest match; it gives you the closest
match which is greater than or equal to the key you asked for. That
might or might not be a child of the directory you're searching for.)

(Hm, also, I think you need to be careful to search for the directory
with a trailing slash, or you might get a lock entry for
"<dirname><char>" where <char> is lexically less than '/', in which case
you wouldn't be sure whether any descendants are locked.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 12 05:26:12 2004

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.