[PATCH] Allow "Closes: nnn" syntax in commit_updater
|Reported by:||Owned by:||Remy Blank|
The commit_updater, which is responsible for adding comments and closing tickets in response to repository commits, uses a regular expression for finding commands in commit messages. Currently, the
Currently, trac's commit_updater uses a regex that allows only one character between the command and the ticket number. This means that "Closes:#123" and "Closes #123" are both valid commands, but "Closes: #123" is not. I find the latter a lot more aesthetically pleasing (especially when used on a separate line at the end of the message, in RFC822 header style).
- ticket_command = ('(?P<action>[A-Za-z]*).?' + ticket_command = ('(?P<action>[A-Za-z]*).?.?'
Note that I haven't tested this using trac 0.12, only using 0.11 and the old-style svn post-commit hook. However, the regexes are identical and the code is similar, so I don't expect any problems here.