On Thursday, August 15, 2013 9:00:03 PM UTC-7, Sowmya Dass wrote:

>    
>   
> I have a Trac and SVN setup done on my server. I have integrated SVN-Trac 
> using post commit hook and post-revprop-change hook. itsWhen I perform a 
> commit, *I can see the timeline on trac getting updated but the 
> corresponding ticket does not get updated with any comments or change state
> *. I have tried looking around on google as well as stackoverflow for 
> such issues but then almost all of them had permission issues at directory 
> level on linux/unix environments which most likely is not my case. 
> Apparently I do not have any permission issues in my windows environment as 
> I am running trac and svn using my login. 
>
> Please find the setup details mentioned below:
>
> *Server OS : Windows 2008 R2*
>
> *- Wandisco SVN server installed using :WANdiscoSubversion_1.7.8-2.exe*
>
> *- Python 2.7.5 (32 bit)*
>
> *- Trac 1.0.1* 
>
> I need to have SVN-Trac integrated so that the SVN commits update trac 
> ticket status and comments with the traclink.
>
> To achieve this, I have setup post commit hooks in SVN as mentioned in the 
> Trac documentation at :*
> http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync*<http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync>and
>  
> *http://trac.edgewall.org/wiki/CommitTicketUpdater*<http://trac.edgewall.org/wiki/CommitTicketUpdater>
> .
>
> I have done the following changes : 
>
>    1. 
>    
>    *Enabled the commit ticket updater* via the trac web interface -> 
>    admin -> plugins. 
>    2. 
>    
>    As per the documentation for CommitTicketUpdater on trac as mentioned 
>    above, I've added the following lines additionally in trac.ini present 
>    under trac_env/conf/trac.ini at the [components] section 
>    tracopt.ticket.commit_updater.committicketreferencemacro = enabled 
>    tracopt.ticket.commit_updater.committicketupdater = enabled
>    3. 
>    
>    *Configured commit updater plugin* by adding the following to the 
>    [ticket] section of the trac.ini file
>    
>    [ticket] commit_ticket_update_envelope = []
>    
>    commit_ticket_update_commands.close = close closed closes fix fixed 
>    fixes 
>    
>    commit_ticket_update_commands.refs = addresses re references refs see
>    
>    commit_ticket_update_check_perms = true
>    
>    commit_ticket_update_notify = true
>    
>     
>    
> I have also *created post-commit.bat and post-revprop-change.bat* and 
> added it to the hooks folder in my svn repository. Please find the script 
> code below :
>
> post-commit.bat
>
> @echo off
> ::
> :: Trac-SVN post commit hook for explicit synchronisation
> ::
>
> setlocal
>
> set REPOS=%1
> set REV=%2
>
> C:\Python27\Scripts\trac-admin.exe C:\apps\new changeset added "%REPOS%" 
> "%REV%"
>
> post-revprop-change.bat 
>
> @echo off
> ::
> :: Trac-SVN post revprop change hook
> ::
>
> setlocal
>
> set REPOS=%1
> set REV=%2
>
> C:\Python27\Scripts\trac-admin.exe C:\apps\new changeset modified "%REPOS%" 
> "%REV%"
>
> I have also tried checking trac.log (set at Debug level) but there is 
> nothing relevant logged in there.
>
> I have also printed the values from the post commit hook and they seem to 
> be fine. 
>
> Can anyone please help me fix the above mentioned issue ?
>
> Thanks ! 
>
> Regards
>
> Sowmya Dass
>

You've said you setup explicit synchronization, but could you confirm that 
you've set:
[trac]
repository_sync_per_request =

It could be that your post-commit hook is not even being called, and you 
see the events on the timeline due to the implicit synchronization.

You could also try running "changeset added" and "changeset modified" from 
the command line.

If those suggestions fail to yield a solution, we need to know if 
changeset_added and changeset_modified are being called. Perhaps some 
logging could be added to those methods.
http://trac.edgewall.org/browser/tags/trac-1.0.1/tracopt/ticket/commit_updater.py?marks=153,161#L151
 

Is this a single or multirepository setup?

Other suggestions:

You could try manually inserting the macro call to a ticket, just to be 
sure it is really enabled. It needs to be of the form (with variables 
substituted by you):
In [changeset:"%s"]:
{{{
#!CommitTicketReference repository="%s" revision="%s"
%s
}}}

Try setting
[ticket]
commit_ticket_update_check_perms = false

What does the body of your commit message look like? 
commit_ticket_update_envelope = [] means that it needs to be of the form: 
[refs #1]

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to