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

Re: pre-lock hook in a windows environment

From: eg <egoots_at_gmail.com>
Date: Wed, 10 Sep 2008 15:43:11 -0700

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

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.