| 144 | [attachment:trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py] - the previous one, but with a little change in the REPO_NAME, and adding a log file to detect error. I have no test it with others repositories differents to the default one. I suggets that use one of the two post-receive files, take in consideration the use's grand of exec (I suggets in debian use an user git that belong to the group www-data): |
| 145 | |
| 146 | To test post-receive |
| 147 | |
| 148 | {{{ |
| 149 | #!/bin/sh |
| 150 | |
| 151 | /srv/git/myrepo.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &> /tmp/tracgitplugin.log |
| 152 | }}} |
| 153 | |
| 154 | Definitive post-receive |
| 155 | |
| 156 | {{{ |
| 157 | #!/bin/sh |
| 158 | |
| 159 | /srv/git/myrepo.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &> /dev/null |
| 160 | }}} |
| 161 | |
| 162 | Its is important that your git user have access to read the trac.ini and his directory, and also modify access to the trac.db file and his directory as well. This is made by adding the git to the apache2 group (in debian www-data group). If you use log file configured in your trac.ini, it is important that the user have the modify grand also, and the directory as well. |
| 163 | |