I'm trying to setup the post-commit hook of my subversion to update after every commit our development servers web folder. I have been following this instructions SVN SSH post-commit checkout hook (is in German, but the codes are commented in English) but unfortunately doesn't seems to work. After the commits the log file is initialized but the update won't be executed.
Asked
Active
Viewed 166 times
1 Answers
0
Can you try to modify this line of the script:
/srv/svn/repos/st38/hooks/bin/svn-update /usr/bin/svn /srv/www/st38
to write the output of the svn-update command also to the logfile
/srv/svn/repos/st38/hooks/bin/svn-update /usr/bin/svn /srv/www/st38 2>&1 >> /srv/www/st38/post-commit.log
also try to manually execute that line.

wimh
- 15,072
- 6
- 47
- 98
-
Hi! If I'm executing manually the bash post-commit, the web folder is going to be updated. I think is a permission problem but I don't really find the source of it. – lgt Nov 07 '11 at 11:41
-
@lgt is there an error message in the logfile (after you changed the script)? – wimh Nov 07 '11 at 16:01
-
no everything looks okay. Is going to output the revision number. But only if I'm calling the script manually. – lgt Nov 07 '11 at 16:06
-
so I'm sure now that the problem is coming from permissions set up. If I'm executing the bash command with a user who is member of the svn group than the permission is denied. – lgt Nov 07 '11 at 20:36
-
you can try to modify the rights of the svn-update command the following way: find a user/group which can execute the svn command, for example your own account, execute `chown user:group path/to/svn-update` and `chmod 6777 path/to/svn-update`, but this would allow everybody to execute the svn-update command. – wimh Nov 07 '11 at 20:57