hgbook.red-bean.com, hook-writing, and documentation

Ben Sizer bens at monumentalgames.com
Thu Apr 22 09:15:00 CDT 2010


Hello all,

I've been having problems submitting comments to hgbook.red-bean.com - is this site still in operation? I've been trying to use the documentation there to write in-process hooks for Python and found it a little frustrating due to some omissions, such as where I had to place the Python file so that it can be imported, and the arguments that get passed to each hook. As I discovered workarounds I tried to contribute my changes back to the site but the submission always ended up with the busy cursor spinning permanently.

The first problem I solved with the absolute file-name approach, as amending PYTHONPATH seems to get ignored by TortoiseHg. I guess this is a Py2Exe issue?

The second problem I solved by Googling for 'hooktype' after the documented argument list raised exceptions. This extra parameter doesn't appear to be mentioned in The Definitive Guide, and is only sporadically mentioned within the wiki (eg. http://mercurial.selenic.com/wiki/Hook has an example with it towards the bottom of the page, but http://mercurial.selenic.com/wiki/HookExamples does not.)

Does the Python hook API have any up-to-date documentation anywhere?



Ben Sizer
Software Engineer

[cid:image001.gif at 01CAE22D.ECEC1120]

E-mail: bens at monumentalgames.com

Price House, 37 Stoney Street, The Lace Market, Nottingham, NG1 1LS

Phone: +44 (0) 115 934 2330
Fax: +44 (0) 115 958 3179

Website: www.monumentalgames.com

Monumental Games Limited is a company limited by shares in the United Kingdom
Company Number 5559838
VAT No. 927 436 506

Information in this e-mail and any attachments hereto is confidential, is subject to copyright, is solely for the intended recipient(s) and may not be used or disclosed except for the purpose for which it has been sent. Unless otherwise stated you must not copy, print, distribute, or otherwise use, rely on or disclose to any third party this e-mail or any part thereof. If you have received this e-mail in error, please advise the sender immediately by return and delete this email and all copies along with any attachments from your workstations, networks and systems.

Monumental Games adopts anti-virus policies and best practice but in no way accepts any liability for any damage whatsoever and howsoever caused by any virus or similar program transmitted by this e-mail or any attachments hereto.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20100422/aa8fc3af/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2785 bytes
Desc: image001.gif
URL: <http://selenic.com/pipermail/mercurial/attachments/20100422/aa8fc3af/attachment.gif>


More information about the Mercurial mailing list