Fwd: how to install my own extension

Martin Geisler mg at daimi.au.dk
Tue Jun 10 04:14:35 CDT 2008


Georg <gwk.rko at googlemail.com> writes:

> I can't get it to work.  If I follow your suggestion and put:
>
> hgext.msc = /usr/local/lib/python2.5/site-packages/hgext/msc.py
>
> then I get:
>
> abort: pre-update.msc hook is invalid (import of "hgext.msc" failed)

Have you tried just

  msc = /usr/local/lib/python2.5/site-packages/hgext/msc.py

As I understand it, the idea is that you can do *one* of two things:

a) you can write "hgext.foo =" which will make Mercurial load the foo
   module from the standard location.

b) you can write "foo = /some/path/to/an/extension.py" which will make
   Mercurial load that very Python file.

You seem to have mixed those up... So I suggest that you put your
module somewhere else than site-packages/hgext (I would not put custom
stuff the same place where the Mercurial installer puts its stuff) and
load it using the second approach.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.



More information about the Mercurial mailing list