简体   繁体   中英

How can I get SVN auto-update working?

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.

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.

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, eg /var/log/www.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM