I have Mercurial hgweb set up on Windows 2008 64 bit and IIS. The location of the repositories is a network share.
I want to create a hook on the repository to issue an "hg update" command on a changeroup. I cannot use the external hook as this would start cmd.exe with the network share as the working directory (and cmd.exe does not support network shares).
Therefore, I'm looking to find an example of a python hook that calls a mercurial command. I notice that there is a mercurial.commands module, but I cannot find any examples on the webs and I'm not very experienced with Python.
Are there any examples to call a mercurial command using a Python hook - and is it possible to do this all in the hgrc, or do I need an external .py file?