| 1 | = Updating Trac Tickets Automatically from SVN Commit Messages = |
| 2 | |
| 3 | A special '''post-commit''' hook in SVN searches commit messages for text in the form of: |
| 4 | |
| 5 | * command #1 |
| 6 | * command #1, #2 |
| 7 | * command #1 & #2 |
| 8 | * command #1 and #2 |
| 9 | |
| 10 | Instead of the short-hand syntax "#1", "ticket:1" can be used as well, e.g.: |
| 11 | * command ticket:1 |
| 12 | * command ticket:1, ticket:2 |
| 13 | * command ticket:1 & ticket:2 |
| 14 | * command ticket:1 and ticket:2 |
| 15 | |
| 16 | In addition, the ':' character can be omitted and issue or bug can be used |
| 17 | instead of ticket. |
| 18 | |
| 19 | You can have more then one command in a message. The following commands |
| 20 | are supported. There is more then one spelling for each command, to make |
| 21 | this as user-friendly as possible. |
| 22 | |
| 23 | close, closed, closes, fix, fixed, fixes:: |
| 24 | The specified issue numbers are closed with the contents of this |
| 25 | commit message being added to it. |
| 26 | references, refs, addresses, re, see:: |
| 27 | The specified issue numbers are left in their current status, but |
| 28 | the contents of this commit message are added to their notes. |
| 29 | |
| 30 | A fairly complicated example of what you can do is with a commit message |
| 31 | of: |
| 32 | |
| 33 | Changed blah and foo to do this or that. Fixes #10 and #12, and refs #12. |
| 34 | |
| 35 | This will close #10 and #12, and add a note to #12. |