I have a Subversion system running. It always does an post-commit update on /var/www
by the following code:
/usr/bin/svn update /var/www/
. But, this is OK when I am working on an other server. I do a commit, and it updates the /var/www/
directory on the main server. But, when I am working on the main server, the post-commit hook will fail, because I am modifying files in /var/www/
. How can I prevent this?
Regards, Kevin
Not sure I understand well, bu it looks like you are doing this on same server (srv1) It fails when you add same hook while on a different server (srv2).
If you have same hook on srv2 and want update to update srv 1 you can use ssh command to execute cnv update remotely
but for this to work without asking for password you need to setup keys for a user that can run svn (avoid root)