Background
I'm trying to implement a number of commit hooks for Subversion. I have done a lot of research to try and get a simple test hook to work, however I have had no luck.
For reference I have looked through, followed and then tried to combine methods from the following links:
1. Subversion manual for directory configuration
2. Tortoisevn manual for server side hook scripts
3. An explanation on server side hooks that contains a link to the Subversion manual
4. The wordaligned tutorial for pre-commit hooks
5. A serverfault answer for problems with commit-hooks
There are also a number of other sites that I have referenced and used, but I still cannot get commit hooks to work.
My Environment
My machine is running RHEL6 (Cent OS).
The subversion is located on a remote machine that I cannot access directly without permission from my supervisor.
The remote machine is running Subversion 1.6.
This is the current structure for my repository:
test-for-svn-hooks
|-branches
|-hooks
| +-pre-commit
|-tags
+-trunk
The file pre-commit temporarily has it permissions set to 777
. All directories have their permissions set to 775
.
This is the sample script that I created to test the commit hook:
#!/usr/bin/env bash
echo "THOU SHALL NOT PASS" 1>&2
exit 1
I have checked and tested about all that I can to make sure that my pre-commit hook is working appropriately. I don't know what else I need to check to make sure that it works. I'm able to commit whatever I like, and I get no messages output to my screen.
Questions
1. Is there anything that I have missed or overlooked in implementing hooks?
2. If I implement a hook in this fashion do I have to worry about implementing the same hook again in Tortoisesvn?
Any feedback and/or suggestions are greatly appreciated.