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

Re: Pressing need for exclusive locking

From: SLOGEN <jensen_at_slog.dk>
Date: 2003-09-03 19:57:29 CEST

Ronald Cannes wrote:

[concerning timed locking proposal ...]

How about just making an advisory lock? which can be broken. This solves
the timing problems, and lets people move on when there are dangling lokcs.

Implemented as an attribute, like: "svn:locked-by = user", svn could set
all vc'ed files below a "svn:locked-by" path readonly (except for user
foo), and "svn lock" would:

   - steal the lock if present, setting svn:locked-by to the current
user and commit'ing that change
   - make files R/W

Now, svn commit would remove any "svn:locked-by" properties on commited
path's.

Alternately, you could implement all of it as a pre-commit check, where
commits to paths below an svn:locked-by path are only allowed by the
svn:locked-by owners. This could not give the user the feedback of "hey
this file is read-only, i wonder why", but it would work.

Obviously a pre- or post-commit script could e-mail about stolen locks,
etc...

BTW: I have a setup where i enforce write-acl's that's implemented in
pre-commit checks and acl:write properties, very similar (almost
equivalen) to what i suggested above.

-- 
Helge
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 3 20:02:56 2003

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.