24 Jan 19:57
[Trac] turning on trac post-commit script in trac v12.1, RHEL6
Hi, I attempted to e-mail this message earlier, but it was apparently from the wrong address, so I'm posting via the web interface instead. Apologies if this ends up producing a duplicate message. I've installed the version (v12) of Trac maintained by EPEL (Extra Packages for Enterprise Linux) for RHEL6. This is an upgrade for us, we've been using Trac for years, and this upgrade is from v11, also installed on RHEL (v5) via EPEL. A smooth upgrade from v11, for the most part, with the exception of the required changes to the post-commit configuration. I see from the wiki that I need to enable the CommitTicketUpdater plugin, and that this plugin is part of the standard installation of Trac, but must be enabled. I can confirm the commit_updater.py code is present on the system: locate commit_updater.py /usr/lib/python2.6/site-packages/tracopt/ticket/commit_updater.py /usr/lib/python2.6/site-packages/tracopt/ticket/commit_updater.pyc /usr/lib/python2.6/site-packages/tracopt/ticket/commit_updater.pyo I have added the following lines to our trac.ini file: ... [components] ... tracopt.ticket.commit_updater.committicketreferencemacro = enabled tracopt.ticket.commit_updater.committicketupdater = enabled ... [ticket] commit_ticket_update_check_perms = true commit_ticket_update_commands.close = commit_ticket_update_commands.refs = <ALL> commit_ticket_update_envelope = [] commit_ticket_update_notify = true ... And I've upgraded the post-commit hook script in the svn repository, so that it reads: #REPOS="$1" REPOS="/svr/svn/our_repository_name" REV="$2" # e-mail a message detailing this commit /usr/local/path/bin/commit-email.pl "$REPOS" "$REV" --from admin@... -s "commit: " ourdevmaillist@... # call the trac-post-commit-hook LOG=`/usr/bin/svnlook log -r $REV $REPOS` AUTHOR=`/usr/bin/svnlook author -r $REV $REPOS` TRAC_ENV='/svr/trac/ourrepository/' TRAC_URL='https://oururl/ourrepository' $REPOS/hooks/bin/trac-svn-hook\ "$REPOS" \ "$REV" \ "$AUTHOR" The $REPOS/hooks/bin/trac-svn-hook script was copied directly from /usr/share/doc/trac-0.12.1/contrib/trac-svn-hook First, the symptoms: * Commits are working as expected: messages are sent from the post- commit hook to ourdevmaillist * Commands in commit messages no longer update tickets in Trac. This used to work with our v11 installation of Trac. * The admin interface of our Trac site does not indicate that the plugin tracopt.ticket.commit_updater.committicketreferencemacro is enabled, nor that it's even an available plugin. So, I'm wondering if anyone else has successfully made a similar upgrade in a RHEL environment, and if so, would you be able to share the secrets of your success with me? Or, even if you're not working in this environment, if you have any tips for me, they'd be appreciated. Thanks! -- -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@... To unsubscribe from this group, send email to trac-users+unsubscribe@... For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
RSS Feed