abort: pretxncommit.indigo hook is invalid (import of "indigo.hooks.precommit" failed)

Stodge stodge at gmail.com
Tue Nov 17 09:50:06 CST 2009


I'm writing a Mercurial pretxncommit hook on Windows. My repository's
hgrc file contains:

[hooks]
pretxncommit.indigo = python:indigo.hooks.precommit.pretxncommit_hook

And my hook is in: C:\Python26\Lib\site-packages\indigo\hooks
\precommit.py

When I commit changes, I get the error:

C:\data\hg\test1>hg commit -v --debug -m "fixes #1"
test.py
calling hook pretxncommit.indigo:
indigo.hooks.precommit.pretxncommit_hook
transaction abort!
rollback completed
abort: pretxncommit.indigo hook is invalid (import of
"indigo.hooks.precommit" failed)

This should work. I can start a Python shell and this works;

 from indigo.hooks import precommit

Any ideas what I'm missing?

Thanks


More information about the Mercurial mailing list