Re: locking hook scripts help
From: John <jsparrow_at_ecclescollege.ac.uk>
Date: 2005-07-26 09:33:36 CEST
Phil <plabonte <at> gmail.com> writes:
> I read in the manual that we can make a hook script, from the current
Hi Phil, hows this? Uses Perl bindings. The allowbreak array is a list of people
I'm a perl novice, so others may have improvements to suggest.
Then I but the following in pre-lock.cmd and pre-unlock.cmd:
@echo off
cd \Repos
:ERROR
==============================
# this is check-lock.pl
use strict;
use File::Basename;
use SVN::Core;
my @allowbreak = ("John","Jane");
my $paramrepo;
&usage unless @ARGV == 3;
$paramrepo = shift;
unless (-e $paramrepo)
foreach my $breakuser (@allowbreak)
my $repo = SVN::Repos::open($paramrepo);
if ($lock)
# no lock, so allow it
sub usage
---------------------------------------------------------------------
|
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.