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

Start-commit hook script

From: Brian Erickson <erickson_at_BAUERCONTROLS.com>
Date: 2006-12-14 15:57:40 CET

Hi all,
 
I'm a new SubVersion user and am having a problem with hooks...I'm using
Windows XP...
 
Right now, I'm trying to set it up so that no commits can happen to the
tags branch of the respository. From what I've been able to figure out,
what I need to do is use the svnlook command to see if anything is
change in the tags folder. Is that the best way?
 
So far, my batch file looks like this:
 
@echo off
Rem Start-commit hook
Rem Make sure that commits are not done in tags...
Rem %1 = repository path, %2 = User trying the commit
 
set APRI_ICONV_PATH=D:\SubVersion\iconv
set path=d:\SubVersion\bin
 
echo %path% >&2
echo '%1' '%2' '%3' '%4' '%5' '%6' '%7' '%8' '%9' >&2
d:\SubVersion\bin\svnlook changed d:\svn\pcs >&2
 
exit 1
 
 
Commits always fail, so I know the script is running.
 
The attempt to commit always produces the following:
 
svn: Commit failed (details follow):
svn: 'start-commit' hook failed with error output:
d:\SubVersion\bin
'//snidely/svn/pcs' 'erickson' '' '' '' '' '' '' ''
The system cannot find the path specified.
 
Notice, I'm not using any of the parameters to the script. I've got the
path to the repository hard baked.
 
If I manually clear out the environment and run the batch file by hand,
it works fine.
 
Can someone point me in the right direction?
 
Thanks,
Brian
 
Received on Thu Dec 14 15:58:35 2006

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