== HgTracHook == '''This hook is not distributed with Mercurial.''' ''Authors: '' Mads Sülau Jørgensen, Marcus Lindblom Repository: http://bitbucket.org/madssj/mercurial-trac-hook/ === Overview === This post-commit [[Hook | hook]] for [[http://trac.edgewall.org/ | Trac]] is inspired by [[http://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hook | Subversion's one]], and was originally proposed by Mads Sülau Jørgensen on [[http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/ | it's blog]]. It is suitable for Trac's releases prior to 0.12. === Configuration === Get hook by cloning repository: {{{ hg clone http://bitbucket.org/madssj/mercurial-trac-hook/ }}} and install the '{{{trachook.py}}}' module somewhere inside your PYTHONPATH. Then configure your [[.hgrc]] to enable the hook by adding the following lines: {{{ [hooks] changegroup = python:trachook.hook [trac-hook] root = /path/to/trac url = http://url/to/trac }}} ''Nota bene: '' if there are other changegroup hooks, ''[[Hook | just add a suffix to [each] ]]'', like: {{{changegroup.trac = python:trachook.hook}}}. === Other considerations === * [[http://trac.edgewall.org/ | Trac]]'s authors are working on integrating Mercurial into Core with [[http://trac.edgewall.org/milestone/0.12 | 0.12]] ([[http://trac.edgewall.org/wiki/MultipleRepositorySupport | MultiRepos]]), so this hook could not be necessary for future versions (Marcus Lindblom). * This hook is partially similar to [[HgTracExtension]]. ---- CategoryExtensionsByOthers