Oops, should have gone to the list.
---------- Forwarded message ----------
From: Georg <[EMAIL PROTECTED]>
Date: 2008/7/29
Subject: Re: [Tortoisehg-discuss] my Python hook is not found any more in
0.4rc3, GUI
To: TK Soh <[EMAIL PROTECTED]>
Yes, I copied it into library.zip/hgext. That was the only way I found to
add something to the Python path of Mercurial on Windows. I posted another
question on the "proper way" to add an extension (well, it's not really an
extension, just a hook) a while ago, but didn't get other advice.
Adding into library.zip is really easy using Windows explorer, just drag and
drop. The drawback is I have to do this again after every reinstall/upgrade
of TortoiseHg.
The hook is enabled like this in Mercurial.ini:
[hooks]
# create symlinks after hg update
update.msc = python:hgext.msc.hook
# remove old symlinks before hg update
pre-update.msc = python:hgext.msc.hook
# enforce MSC branch name policy before commit
pre-commit.msc = python:hgext.msc.hook
--
Regards,
Georg.
2008/7/29 TK Soh <[EMAIL PROTECTED]>
On Tue, Jul 29, 2008 at 8:16 AM, Georg <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I wrote a Python hook function that I used to deploy into
> library.zip/hgext
> > as file msc.py. That worked with TortoiseHg 0.4rc2.
>
> I am confused. Do you mean you somehow stuffed msc.py into library.zip
> file of TortoiseHg's installation?
>
> What kind of hook is that? How do you enable the hook?
>
> > Now in 0.4rc3, the hook still works *but only on the command line*.
> >
> > Whenever I try something in the GUI, calling from the Windows Explorer
> > context menu, it tells me it cannot find the hook (import hgext.msc not
> > found).
> >
> > Does the GUI have a different Python path than the command line? How can
> I
> > install a custom Python extension so that it is found both from the hg
> > command line and from the GUI?
> >
> > --
> > Regards,
> > Georg.
> >
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Tortoisehg-discuss mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss
> >
> >
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss