You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Garrett McGrath <gm...@Princeton.EDU> on 2006/11/08 15:20:20 UTC
locking files question
Hello all,
This is really mostly a mental exercise at this point, but is there some
way to set up file locks so that if one is locked and not unlocked within a
pre specified amount of time it will simply be force unlocked by the system
that controls the repository? Just curious, as I've read many locking
nightmares on this list involving admins going in and manually unlocking a
file because Worker A left the company without unlocking it.
-Garrett
Re: locking files question
Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Wednesday 08 November 2006 16:20, Garrett McGrath wrote:
> This is really mostly a mental exercise at this point, but is there
> some way to set up file locks so that if one is locked and not unlocked
> within a pre specified amount of time it will simply be force unlocked by
> the system that controls the repository? Just curious, as I've read many
> locking nightmares on this list involving admins going in and manually
> unlocking a file because Worker A left the company without unlocking it.
I think Subversion's locks are (or at least can be setup to be) just advisory.
That way, everybody can break the lock if the want to. As that, a lock is
nothing but a marker that you are working on a file, i.e. just a normal means
of team communication. In no case should a repository admin be required to
remove a stale lock.
Uli
**************************************************************************************
Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail und jede mit dieser E-Mail versandte Datei ist vertraulich und ausschließlich für die Nutzung durch den vorgesehenen Empfänger bestimmt. Sollten Sie nicht der vorgesehene Empfänger dieser E-Mail sein, informieren Sie bitte den Absender. Jeder unbefugte Zugriff oder unbefugte Weiterleitung, die Fertigung einer Kopie oder sonstige in diesem Zusammenhang stehende Handlung ist untersagt.
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please be so kind to inform the sender. Any other unauthorised access, unauthorised forwarding, copying or other action in this connection at all, is prohibited.
**************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: locking files question
Posted by Andy Levy <an...@gmail.com>.
On 11/8/06, Garrett McGrath <gm...@princeton.edu> wrote:
> Hello all,
> This is really mostly a mental exercise at this point, but is there some
> way to set up file locks so that if one is locked and not unlocked within a
> pre specified amount of time it will simply be force unlocked by the system
> that controls the repository?
Looking in my hooks directory, I see several lock-related tmpl files -
pre-lock, post-lock, pre-unlock, post-unlock.
I imagine one could use these hooks to write the lock activity out to
a file/database (maybe one line/row per lock, indicating what was
locked, by whom, and when, and when the file is unlocked remove the
line/row).
Then, on a scheduled basis, run a script to review this log you're
maintaining, and anything that's considered "stale" could be
force-unlocked by that script.
You could even have this script warn people that they've had a lock on
a file for X days, and remind them that after X+Y days their lock will
be forcibly removed. And also email people when the lock really is
removed.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org