Edgewall Software

Changes between Version 84 and Version 85 of TracMercurial


Ignore:
Timestamp:
Jun 21, 2011, 12:13:36 AM (11 years ago)
Author:
Remy Blank
Comment:

Changed instructions about hooks according to #10225.

Legend:

Unmodified
Added
Removed
Modified
  • TracMercurial

    v84 v85  
    243243For [milestone:0.12] and later:
    244244
    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 incoming = trac-admin /path/to/env changeset added repo_name $HG_NODE
    250 }}}
    251 
    252 On Windows change $HG_NODE to %HG_NODE%.
    253 
    254 Remember to change `/path/to/env` and `repo_name` on ''both'' lines to reflect your environment.
     245If you want to enable post-commit hook functionality on your repository, add the following to your repository's `.hg/hgrc` file (since [10728]):
     246{{{#!ini
     247[hooks]
     248; If mercurial-plugin is installed globally
     249commit = python:tracext.hg.hooks:add_changesets
     250changegroup = python:tracext.hg.hooks:add_changesets
     251
     252; If mercurial-plugin is installed in a Trac plugins directory
     253commit = python:/path/to/hooks.py:add_changesets
     254changegroup = python:/path/to/hooks.py:add_changesets
     255
     256[trac]
     257env = /path/to/env
     258trac-admin = /path/to/trac-admin
     259}}}
     260
     261Remember to change `/path/to/env` and `/path/to/trac-admin` to reflect your environment. If TracMercurial is installed in a Trac `plugins` directory, you will also have to download [source:plugins/0.13/mercurial-plugin/tracext/hg/hooks.py hooks.py] and place it somewhere accessible.
    255262
    256263You must also enable the CommitTicketUpdater functionality in your `trac.ini` by adding