Trac is designed to closely integrate with Subversion. It already uses the Subversion permissions file and will mark commit messages from Subversion containing #[ticket number] with links to the ticket when the messages are viewed in Trac. For example, a commit message that says "Worked on #22" will create a link to Ticket 22 in the corresponding Trac project.
We have also added a post-commit hook for Trac that facilitates ticket management via commits. The full description, from the hook itself, is below:
It searches commit messages for text in the form of:
- command #1
- command #1, #2
- command #1 & #2
- command #1 and #2
Instead of the short-hand syntax "#1", "ticket:1" can be used as well, e.g.:
- command ticket:1
- command ticket:1, ticket:2
- command ticket:1 & ticket:2
- command ticket:1 and ticket:2
In addition, the ':' character can be omitted and issue or bug can be used instead of ticket.
You can have more then one command in a message. The following commands are supported. There is more then one spelling for each command, to make this as user-friendly as possible.
close, closed, closes, fix, fixed, fixes
references, refs, addresses, re, see
A fairly complicated example of what you can do is with a commit message of:
Changed blah and foo to do this or that. Fixes #10 and 12, and refs #12.