We are working on sending email notifications of SVN commits and we are following the steps oulined here: http://sandilands.info/sgordon/email-notifications-of-svn-commits
When testing, we get following errors:
Error: post-commit hook failed (exit code 127) with output:
Error: /repos/cle/hooks/post-commit: 50: commit-email.pl: not found
Error: /repos/cle/hooks/post-commit: 51: log-commit.py: not found
Anyone wish to share their experiences?
You might want to look at my SVN Watcher post-commit hook script. It will send out an email on commit, but will allow you to configure your watch to specify what files you're interested in. Plus, all users can create a watch list of files they're interested when a commit happens.
The error message is pretty straight forward: It can't find the the named scripts (and you probably only want to use the Perl version or the Python version, but not both. The error could be caused by multiple issues:
PATH
set. Subversion mucks with the environment and shell variables may not be set. This includesPATH
which might be set to a default value./usr/bin/perl
, but your first line is#! /usr/local/bin/perl
).If
post-commit
is a shell script, addset -xv
andexport PS4="\$LINENO:
on the top. This will print out debugging information, so you can see what's going on in your script. This will only print out if the shell script fails.