Reputation: 13
We have been using SVN for a few days and we want to do auto update before commit. I'd written a post-commit hook:
cd /home/user/www/release && /usr/bin/svn update
The release number was incremented In WebSVN, but the project files didn't update. If I run post-commit
in the console, then everything is alright.
Please, help us! And thank you.
Upvotes: 0
Views: 72
Reputation: 10419
There is an example in the FAQ:
http://subversion.apache.org/faq.html#website-auto-update
One thing to consider is that the environment is empty when the hook is called. So maybe you need to setup some envvars in the beginning of your script.
Finally, make sure your script is executable. You could try creating a file in /tmp as a way of seeing if the script is even being triggered.
Upvotes: 1
Reputation: 1769
More information about your setup would be helpful. I'll guess that you are running the SVN server in Apache under Linux. If that's the case, then a first guess might be that the user that is running Apache doesn't have permission to modify /home/user/www/release.
You might be able to debug it a bit by looking at the logs, e.g. /var/log/www.
Upvotes: 0