Changes between Version 75 and Version 76 of GitPlugin


Ignore:
Timestamp:
Feb 18, 2012 4:16:18 PM (3 years ago)
Author:
juanf.jaramillo@…
Comment:

Adding some comments to the hook part

Legend:

Unmodified
Added
Removed
Modified
  • GitPlugin

    v75 v76  
    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 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 
     146To 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 
     154Definitive 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 
     162Its 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 
    144164You will also need to change your trac.ini file accordingly. 
    145165Thus repository_sync_per_request under the trac section is to be unset, and tracopt.ticket.commit_updater.* under component are to be set to enabled. 
     
    190210 
    191211'''Author:''' [wiki:hvr Herbert Valerio Riedel] [[BR]] 
    192 '''Contributors:''' Hans Petter Jansson 
     212'''Contributors:''' Hans Petter Jansson, Juan Fernando Jaramillo