Idiots guide to subversion hooks please



I am a complete newbie when it comes to using anything *nix. I am having trouble getting myself started on writing hooks for my svn. I can shell in and do some basic commands and have followed instructions I have found in this forum and on the internet but seem to be missing the basic go point.

If a kind person with some experience could answer my questions it would be much appreciated.

How do I create a post-commit hook? I open the post-commit.tmpl I edit it to match something like this

/usr/bin/svn update /home/[account]/labs

and then save it as what? post-commit???
After I have saved it as post-commit??? do I need to do another step? For example compile it? If so could you please tell me the commands.

Thank you for your help.


shell scripts don’t get compiled. it should be enough to save it as post-commit and then make sure it’s executable (you can use chmod 755 for that).

i have a post-commit script that calls a cgi script using wget in order to automatically update the website whenever changes are committed – it’s the only way i could get it to run svn update as the correct user.

track7 - my dream-hosted site