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

Re: Setting "tags" to read only ?

From: David Weintraub <qazwart_at_gmail.com>
Date: Mon, 4 Oct 2010 22:54:18 -0400

On Mon, Oct 4, 2010 at 10:04 PM, Tech Geek <techgeek12345_at_gmail.com> wrote:
>>$SVNLOOK changed -t $2 $1 | grep "/tags/" && /bin/echo "Cannot commit to
>> tags" 1>&2 && exit 1
> I had a question regarding the above command. How do we know what value is
> going to be passed in $2 i.e. the name of the transaction so that we can
> test/debug our script. Can we somehow simulate the above command without
> actually trying to run it during svn commit?

One of the things I have my pre-commit hooks do is take either a -t
for the transaction or a
-r for the revision. This way, I can run them with '-r $revision" and
see what they do.

I also load my pre-commit hooks up with print statements while I'm
testing them. If they print to STDOUT, no one will ever see the output
if running as a hook script, but you will see them if you run them on
their own.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-10-05 04:54:55 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.