Source

svn hooks / post-commit

Full commit
#!/bin/sh

REPOS="$1"
TXN="$2"
SVNLOOK=/usr/bin/svnlook

# get last commit message
COMMIT=`$SVNLOOK log "$REPOS" -r $TXN`
AUTHOR=`$SVNLOOK author "$REPOS" -r $TXN`
FILES=`$SVNLOOK changed "$REPOS" -r $TXN`

# call bot with arguments reposname, revison and commit message in one string
#/usr/bin/perl /usr/local/bin/svn_herold.pl "$REPOS $TXN $COMMIT"

#echo "Revision $TXN by $AUTHOR: $COMMIT" | python /usr/local/bin/toirc.py "#svn"
echo "Revision https://support.fourdigits.nl/trac/changeset/$TXN by $AUTHOR: $COMMIT" | python /usr/local/bin/toirc.py "#svn"
echo "$FILES" |sed 's/\(.\)\{1\}\(.\)\{3\}\(.*\)/\1\2http:\/\/support.fourdigits.nl\/svn\/fourdigits\/\3/g' | python /usr/local/bin/toirc.py "#svn" "r$TXN: "
echo "---" | python /usr/local/bin/toirc.py "#svn"

touch post_commit_last_run

exit 0