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

Re: locking files question

From: Andy Levy <andy.levy_at_gmail.com>
Date: 2006-11-08 18:18:25 CET

On 11/8/06, Garrett McGrath <gmcgrath@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
Received on Wed Nov 8 18:20:44 2006

This is an archived mail posted to the Subversion Users mailing list.