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

Re: [PATCH] allow pre-lock hook to specify token for locking

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 21 Jul 2008 14:36:44 -0400

Chia-liang Kao wrote:
> Attached is the updated patch.
>
> This is mainly cleanup. token uniqueness are mentioned in fs_fs layer
> lock unction as TODO:
>
> /* If the caller provided a TOKEN, we *really* need to see
> if a lock already exists with that token, and if so, verify that
> the lock's path matches PATH. Otherwise we run the risk of
> breaking the 1-to-1 mapping of lock tokens to locked paths. */
> /* ### TODO: actually do this check. This is tough, because the
> schema doesn't supply a lookup-by-token mechanism. */
>
> I think it's a bit overkilling for this feature to implement the check
> that is currently lacking underlying facilities. I am also wondering
> why do we need to lock-token to be globally unique? not just unique
> per-path?

I *think* we inherited this from the WebDAV specification's requirements for
locks. See http://www.webdav.org/specs/rfc2518.html#rfc.section.6.3

> Given the comment stating we don't do any lookup-by-token,
> I don't suppose lock would work across renamed nodes either? Or am i
> being naïve and missing something obvious here?

No, locks do not follow their paths if the paths are renamed.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-07-21 20:36:59 CEST

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.