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

More help with hook scripts

From: Brian Erickson <erickson_at_BAUERCONTROLS.com>
Date: 2006-12-15 18:19:29 CET

Hi all,
 
With some help from all of you, my start-commit script is working fine
but it's a little to restrictive.
Here's part of the script:
 
\\Snidely\whiplash\SubVersion\bin\svnlook
<file://\\Snidely\whiplash\SubVersion\bin\svnlook> changed %1 -t %2 |
find /I "tags"
if errorlevel 1 goto commit_ok
echo Commits are not allowed to any of the branches in the 'tags'
folder. >&2
exit 1
 
:commit_ok
exit 0
 
I have two questions:
 
1) If the script truely runs with no environment (no path or anything) I
would expect the find command to fail as find.exe would not be found.
Why does this work?
 
2) It's a little to restrictive. I don't want to allow changes to be
commited to the tags folder but I want to allow new things to be added.
Specifically, copies from another area of the repository that we think
is ready for release. I don't see how to distinguish the operation
being performed. Is such a thing possible?
 
I'm using Windows XP...
 
Thanks,
Brian
 
Received on Fri Dec 15 18:20:17 2006

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.