Differences in functionality in inprocess hooks for CLI and API
Chris Scott
Chris.Scott at mmodal.com
Mon Oct 31 17:22:10 UTC 2011
> If you want to use Python as a portable shell, that's totally doable by
> simply setting your hook like so:
>
> [hooks]
> pretxnchangegroup = python myhook.py
>
> ..which will invoke the aforementioned magic properly.
This is what we may wind up doing, but the idea was to be able to run hooks without needing a full python installation locally. Presumably hg can launch it without a full python installed. It would be nice if there was some syntax in the hook command to indicate that your hook was a python script to be run in a new-process but in launched via hg's own python26.dll. Admittedly, this is only a headache on the Windows distributions, which is the only major operating system not to come bundled with standard scripting tools.
Then all hooks could take advantage of the pretxn hg magic that hg does.
~Chris
More information about the Mercurial
mailing list