The Python Oracle

How to get Trac (CommitTicketUpdater) w/Mercurial to close|resolve tickets on commit?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Magic Ocean Looping

--

Chapters
00:00 How To Get Trac (Committicketupdater) W/Mercurial To Close|Resolve Tickets On Commit?
02:40 Accepted Answer Score 4
04:07 Thank you

--

Full question
https://stackoverflow.com/questions/6539...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #mercurial #trac

#avk47



ACCEPTED ANSWER

Score 4


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 :)