On Tue, Dec 30, 2008 at 7:05 AM, SVNUser <anild_at_vertexcs.com> wrote:
> We are using Tortoise SVN Client;
> We have a concern in SVN Usage:
> For example-
> 1. User A obtains a Lock on a file in a SVN Repository by using Get Lock
> 2. From Repo-Browser, User B can break the lock on the same file in SVN
> Repository - make any modifications and do commits.
> Is there an option to prevent User B from breaking the lock?
You can use the pre-lock and pre-unlock hook scripts  to check that
the user is the owner of any existing lock, and if not reject the lock
break request. In fact the example pre-lock and pre-unlock scripts
that subversion drops into your hooks directory does just that. To
turn this "feature" on simply rename the pre-lock.tmpl file in your
repository "hooks" directory to 'pre-lock' and make it executable.
Similarly rename 'pre-unlock.tmpl' to 'pre-unlock' and make it
executable. Users should no longer be able to break other people's
The other thing to think about is why you need this. User B has to
take an explicit action to break User A's lock, which means you likely
have a communication issue. As in, when User B finds that a file that
he wants to commit is locked by User A, he should talk to User A so
that they can sort it out. Indeed the idea behind locks in subversion
is really to just be informational . Also, now if User B really
does need to break the lock but User A is not around, a repository
administrator will have to get involved. Maybe that is what you want,
but you should definitely think about it.
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-28 04:38:55 CET