John Siirola has customized the subversion post-commit script to automatically annotate Trac tickets with information from subversion commit messages.
The script looks for strings that match "(?:#|(?:ticket|issue|bug)[: ]?)\d+". For example:
#123 ticket 123 ticket:123 issue 123 issue:123 bug 123 bug:123
When this regular expression is matched, the associated Trac ticket will be automatically updated to include the commit message to the ticket discussion.