We have an svn server here with multiple paths. What I'm looking for and I might not have looked hard enough is a post-commit script that whenever something is checked into a specific path, it does an ssh to another server and runs a bash script. Any ideas on a quick and easy way to do this or a post-commit script already out there?
+1
A:
REPOS="$1"
REV="$2"
svnlook changed $REPOS -r $REV | grep "YourFilePattern" 1>/dev/null
if [ "$?" == "0" ] ; then
ssh [email protected] foo.bash
fi
Lance Rushing
2009-10-01 16:39:03
Did this work for you?
Lance Rushing
2009-10-01 18:24:39
This looks like it would work, but I'm being thrown an error about a missing arguement or -r. I'll double checking my file now
2009-10-01 18:51:42
Ok, I think got it all except for that I'm always trying to check against HEAD and its looking for a number, do I have to convert head to a number prior to running this or is there a way to specify HEAD
2009-10-01 19:50:36