| 242 | === Setting up post-commit hooks === |
| 243 | For [milestone:0.12] and later: |
| 244 | |
| 245 | If you want to enable post-commit hook functionality on your repository, add the following to your repository's `.hg/hgrc` file: |
| 246 | {{{ |
| 247 | [hooks] |
| 248 | commit = trac-admin /path/to/env changeset added repo_name $HG_NODE |
| 249 | changegroup = hg log -r $HG_NODE: --template "{node} " | xargs trac-admin /path/to/env changeset added repo_name |
| 250 | }}} |
| 251 | |
| 252 | Remember to change `/path/to/env` and `repo_name` on ''both'' lines to reflect your environment. |
| 253 | |
| 254 | You must also enable the CommitTicketUpdater functionality in your `trac.ini` by adding |
| 255 | |
| 256 | {{{ |
| 257 | tracopt.ticket.commit_updater.* = enabled |
| 258 | }}} |
| 259 | |
| 260 | to the `[components]` section. |