Linux – Subversion hooks no longer running

linuxsvn

I don't know when this started happening, but, for some reason, none of my Subversion hooks are running anymore. I am running Subversion 1.6.9 on a Gentoo Linux machine, which has had its hooks work in the past. I am running Subversion through the svn_dav module for Apache2.2.

I modified the hook scripts that I make use of to write into a file in the /tmp directory owned by apache:apache whenever they are executed, but after making a commit, there is nothing in the file that should be written to. The scripts are executable and owned by apache:apache, so I don't think that is the issue.

Here is one of my test scripts (post-commit.sh) that isn't getting executed:

#!/bin/sh

/bin/echo post-commit >> /tmp/z_test
exit 0

After running a commit, I expect both the pre-commit.sh and post-commit.sh hooks to be run, but neither of them appear to be writing into the desired file (/tmp/z_test).

What's going on?

Best Answer

For some reason, Subversion no longer seems to accept arbitrary extensions on hook scripts. I did have the hooks named like 'post-commit.sh', but Subversion no longer seems to look for these. After renaming the hook script to 'post-commit', Subversion ran it right away.

I'm not sure what revision to Subversion changed this behavior, and it is not mentioned in the CHANGES file for 1.6.11.