[issue229] Hooks that use the python: syntax

Daniel Santa Cruz mercurial-bugs at selenic.com
Thu May 4 13:49:23 CDT 2006


New submission from Daniel Santa Cruz <byteshack at gmail.com>:

1. Is it really necessary to restrict the name of an extension (in [extensions]
to be the same as the name of the module implementing it?

2. If the above is implemented, then it would be nice to be able to refer to the
module in [hooks] by the alias.  Example:
--------
[extensions]
testAlias = /some/where/over/the/rainbow.py

[hooks]
incoming = python:testAlias.hook
--------

3. the python: syntax does not seem to work if the loaded extension is not on
the python path.  Example:
------
[extensions]
myext = '/cygdrive/c/Documents and Settings/dansan/My
Documents/cygwinHome/src/hg-addons/tools/myext.py'

[hooks]
incoming = python:myext.hook
----
This seems to always give:
abort: incoming hook is invalid (import of "myext" failed)

----------
assignedto: vadim
messages: 1153
nosy: byteshack, vadim
priority: wish
status: unread
title: Hooks that use the python: syntax

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue229>
____________________________________________________



More information about the Mercurial mailing list