views:

79

answers:

1

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
Did this work for you?
Lance Rushing
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
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