How to force Trac (CommitTicketUpdater) with Mercurial to close | allow fix tickets?

My quick question is: Everything works, except that Trac tickets do not receive status updates upon fixation. Notes with changes are added to the tickets, but the tickets themselves are not permitted.


I just made this setup:

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

I have a Trac running and related to a repo (I can view changes, view, etc.)
I use AD for auth, so all my usernames are in this format: MYDOMAIN \ bbarker

Install CommitTicketUpdater as instructed here .

When I commit the new code and refer to the ticket:

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

Trac adds changes to the ticket:

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

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

below are fragments of my settings


trac.ini

[Components]
tracext.hg. * = enabled
tracopt.ticket.commit_updater. * = included
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

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

.hg / hgrc

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

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

+4
source share
1 answer

Phew! Got it ...

Following the β€œT”, directions from Trac were my fault.
Probably kind of.

I basically copied this from the above site to the 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

Looking below, I just assumed that leaving commit_ticket_update_commands.close empty would take default values.
This actually overwrites the default values ​​with a null value, which explains why none of the commands worked, but my commit messages were still added to the corresponding tickets.

Thus, simply deleting or commenting, this line in .ini solved my problem
(or does not 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, cleaning up the web pages, I just needed to review the instructions provided by Trac. It's pretty obvious looking back at it now :)

+4
source

All Articles