Changes between Version 88 and Version 89 of GitPlugin


Ignore:
Timestamp:
Jan 10, 2013, 4:21:03 PM (11 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GitPlugin

    v88 v89  
    142142[attachment:trac-post-receive-hook-0.12-new-commits-from-all-branches.py] - example that adds to Trac all commits, ensuring that every commit is added only once.
    143143
    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 not tested it with other repositories different to the default one. I suggest that to use one of the two post-receive files, take in consideration the user's brand of exec (I suggest in debian use the user git that belongs to the group www-data):
     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 not tested it with other repositories different to the default one. I suggest that to use one of the two post-receive files, take in consideration the user's permission for exec (I suggest in debian use the user git that belongs to the group www-data):
    145145
    146146To test post-receive
     
    148148{{{
    149149#!sh
    150 /srv/git/myrepo.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &>> /tmp/tracgitplugin.log
     150/srv/git/myrepo/.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &>> /tmp/tracgitplugin.log
    151151}}}
    152152
     
    155155{{{
    156156#!sh
    157 /srv/git/myrepo.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &> /dev/null
    158 }}}
    159 
    160 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.
     157/srv/git/myrepo/.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &> /dev/null
     158}}}
     159
     160Its 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 permission also, and the directory as well.
    161161
    162162If you are using Gitorious, there is a [https://github.com/wallunit/trac-gitorious-web-hook CGI script], you can configure as !WebHook.