[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: Branko Čibej <brane_at_xbc.nu>
Date: 2004-11-12 06:57:36 CET

Greg Hudson wrote:

>On Fri, 2004-11-12 at 00:34, Branko ÄŒibej wrote:
>
>
>> A/B/ (a dir, note the trailing slash)
>> A/B/lambda (a file)
>> A/D/G/ (a dir)
>>
>>1) Delete A/B/kappa
>>A greater-or-equal search for A/B/kappa will return the key A/B/lambda.
>>By checking the returned key, you notice that this file isn't locked,
>>but that's not enough. Because the returned key doesn't match the
>>search, and you're looking for a file, you move the cursor to the
>>previous record, which yields A/B/. That's A/B/, which kappa's immediate
>>parent, so the delete must fail if you don't own the lock on A/B.
>>
>>
>
>And what if there's a lock on A/B/beta? If you want to check for parent
>directory locks, I think you need to look them up explicitly.
>
>
Ah, yes. I should've followed by own advice -- use exact matches for
files, partial matches for directories. So here's a better recipe:

    Do an exact match on A/B/kappa. It's not there. but,
    Do a >= search for A/B/

>(We aren't doing directory locks yet anyway.)
>
>
Yes, I only included them in the example to show that this scheme works
with dir locks, too. Until we do have directory locks, we can skip the
partial match in this case.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 12 06:57:22 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.