Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Possible duplicate: stackoverflow.com/q/12393283/462370 –  Hubert Kario Sep 24 '12 at 12:56
2  
Simple, don't make modifications on your production system. That is a very bad practice. –  Zoredache Sep 24 '12 at 17:13
    
Yeah, I know... Can you please tell my boss :p..? –  Kevin Sep 24 '12 at 19:16

1 Answer 1

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

ssh xxx.xxx.xxx.xxx /usr/bin/svn update /var/www/

but for this to work without asking for password you need to setup keys for a user that can run svn (avoid root)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.