Eric Himmelreich wrote:
> I’m having some trouble here implementing a pre-lock hook.  I’m trying 
> to prevent locks from being broken (the subversion book casually 
> mentions that this is possible with a pre-lock hook, but provides no 
> information as to how to implement).  My ideal situation would allow 
> only 1 user (the administrator) to break/steal locks, all other users 
> would receive an error message “cannot break lock… see admin” or 
> something.  I’ve setup subversion using svnserve (running on a separate 
> windows box).  I’m trying to write my script in python, but a solution 
> in any language would be appreciated (provided it can work on windows xp).
> 
>  
Have you looked at the pre-lock.tmpl found in the hooks directory of 
your repository?
It is a well documented template for a script written for a Unix /bin/sh 
interpreter. You will need to turn this into something windows 
compatible (a batch file would do).
Of course, you can use Python to implement the logic but you will need 
to make the pre-lock.bat file act as a wrapper and explicitly call your 
python script and pass in the 3 arguments.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-11 00:43:44 CEST