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

Re: Do lock tokens need to be unique?

From: Chia-liang Kao <clkao_at_clkao.org>
Date: Wed, 23 Jul 2008 04:51:54 +0000 (UTC)

Justin Erenkrantz <justin <at> erenkrantz.com> writes:
> On Tue, Jul 22, 2008 at 3:39 PM, Karl Fogel <kfogel <at> red-bean.com> wrote:
> > The point is that Subversion would be handing off the responsibility to
> > the hook -- and the hook can do whatever it wants. We should document
> > the WebDAV uniqueness thing in the hook documentation, but beyond that,
> > the hook is out of our hands.
>
> As I told clkao last night, if the admin installs a hook that violates
> the constraint, it's their own fault. =)
>
> > I'm +1 on allowing it now, FWIW.
>
> It does make sense that there are cases where the admin might want to
> control the UUID generation, so sure... -- justin

I took a little closer look at the current code. in the svn_fs_access_t context
we have a has
keyed by the token (the path are not passed in at all), so duplicated tokens
will cause collision
here. However, the tokens in svn_fs_access_t are never actually used.

While talking to Karl today I explained that I intend to make the tokens
available for the pre-commit
hook, presumably via STDIN. So I will change the svn_fs_access_add_lock_token
to take path along
with token, and add an accessor function to get the path/token pairs out for
pre-commit hook to
use. Does this make sense?

Cheers,
CLK

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-23 06:52:28 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.