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 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 and http://trac.edgewall.org/wiki/CommitTicketUpdater.
I have done the following changes :
Enabled the commit ticket updater via the trac web interface -> admin -> plugins.
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
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
[trac] commit_ticket_update_check_perms = false
, but see my reply on trac-users mailing list for more specific details. – RjOllos