I'm sorry, I have to correct myself:
hg up ok
hg commit ok
hgproc -c up fails
hgproc -c commit fails
hgtk up ok
hgtk commit fails
hg update from GUI fails
hg commit from GUI fails
Strange, isn't it? Can I run it in a debugger somehow? Can I see which
PYTHONPATH it wants to use?
2008/8/8 Georg <gwk.rko@...>
> There wasn't a duplicate library.zip on my system.
> "hg commit" from the command line worked (I reported that before, but
> didn't repeat
> in the follow ups). Only commands launched from the shell UI failed to
> find my custom
> hook code.
> Trying your suggestions below, hgtk commit fails, and hgproc -c commit
> It appears there are different python paths in effect depending on how a
> command is launched.
> 2008/8/8 TK Soh <teekaysoh@...>
> On Mon, Aug 4, 2008 at 4:48 PM, Georg <gwk.rko@...> wrote:
>> > It still doesn't work in rc4.
>> > Do you have any workaround for me? Maybe some information what the
>> > path of the Hg process would be when run from the GUI? I don't insist
>> > putting my hook into library.zip, I'm fine with any location that will
>> I've tried to simulate your problem with 0.4rc4 by following your
>> method to add a msc.py file into the hgext of library.zip, but I have
>> no problem in getting the hook to run. Here's the output on hgcmd
>> window during commit:
>> calling hook pre-commit.msc: hgext.msc.hook
>> I am msc.hook
>> calling hook precommit.username: hgconf.uname.hook
>> [command completed successfully]
>> my msc.hook simply prints a "I am msc.hook" message, as you can see in
>> the commit log.
>> With this, I can't really be sure what went wrong with your setup that
>> resulted in the msc.hook not getting picked up. Right now, I suspect
>> there might somehow be few copy of TortoiseHg/library.zip on your
>> system. Do you think you can search your system and get rid of all
>> TortoiseHg/library.zip installations, and start over again?
>> I'd also wonder what 'hg version' and About dialog tell us on the
>> version info. Another thing you can try is to start the commit window
>> by either 'hgtk commit' or 'hgproc -c commit' on the command, to see
>> if they behave differently. Naturally, you have to start them from
>> inside the repo you want to commit.
>> As far as workaround, is it absolutely necessary that the hooks have
>> to be python hooks? If not, maybe you can consider converting them to
>> regular python scripts and setup mercurial.ini accordingly. You will
>> have to install python for this, of course.
>> Let me know what you think.