4
votes

My Quick Question is this: Everything seems to be working, except that Trac tickets don't get status updates upon commit. Change-set notes are appended to the ticket, but the tickets themselves are not being resolved


I've just done this setup:

  • Windows 7 x64
  • IIS 7.5
  • isapi-wsgi 0.4.2
  • Python27 32
  • Mercurial 1.8
  • Trac 0.12

I've got Trac running and linked up with the repo (I can view the changesets, browse etc)
I'm using AD for auth, so all my usernames are in this format: MYDOMAIN\bbarker

Setup the CommitTicketUpdater following the instructions here.

When I commit new code, and link to a ticket:

$ hg commit -m "[fixes #1] - blah blah blah..."
$ hg push

Trac appends a change-set to the ticket:

Changed 5 seconds ago by MYDOMAIN\bbarker
In [29283792837498273948729374]:
[fixes #1] - blah blah blah...

(The #1, above, is a link to the ticket)
But the ticket status is never updated, no matter what I try.
Is there anything additional I need to be doing to get this to work?

below are snippets of my settings


trac.ini

[components]
tracext.hg.* = enabled
tracopt.ticket.commit_updater.* = enabled
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled

[hg]
node_format = short
show_rev = yes

[ticket]
...
commit_ticket_update_envelope = []
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true

[trac] ... repository_dir = C:\repositories\project
repository_sync_per_request = default
repository_type = hg

.hg/hgrc

[hooks]
; If mercurial-plugin is installed in a Trac plugins directory
commit = python:C:\Trac\hooks.py:add_changesets
changegroup = python:C:\Trac\hooks.py:add_changesets

[trac]
env = C:\Trac\tracproject
trac-admin = C:\Python27\Scripts\trac-admin.exe

1
After struggling with Trac for a whole month a few years back, I found that the best way to get Trac working properly is to use Redmine instead. ;)WCWedin

1 Answers

4
votes

Phew! Got it...

Following, to the 'T', the directions from the Trac site was my error.
Well kind of, I guess.

I had, basically, copied this from the above site into my trac.ini file:

commit_ticket_update_envelope = []
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs =
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true

Reading the below I just assumed that leaving the commit_ticket_update_commands.close to an empty value would assume defaults.
This actually overwrites the defaults to an empty value, which explains why none of the commands worked, yet my commit messages were still being appended to the corresponding tickets.

So simply removing, or commenting out, that line in the .ini resolved my problem
(or, didn't override the defaults)

commit_ticket_update_envelope = []
;commit_ticket_update_commands.close =
commit_ticket_update_commands.refs =
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true

So after some debugging, testing, web scouring, I really just needed to re-look at the instructions provided by Trac. It's pretty obvious looking back on it now :)