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