Idiots guide to subversion hooks please

Idiots guide to subversion hooks please

Posted by: Jandal
Posted on: 2007-03-22 14:19:00

Hello,

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

#!/bin/sh
/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.


Re: Idiots guide to subversion hooks please

Posted by: misterhaan
Posted on: 2007-03-23 07:05:00

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

Tags: svnhooksusr binplease helloi createsubversionnewbienixshellshappreciatedmatch