This method looks a bit rusty though.
However, 'hg' is similar to cvs/svn/bzr/rsync and we can restrict to run in push/pull mode only (no repository creation since we want hooks to be controlled by us).
It's done through hgwebdir.wsgi
Since Mercurial 1.0, mod_wsgi shall be used for the web interface (older Mercurial versions crashed):
Old instructions for mod_python:
- http://www.newartisans.com/blog_files/mercurial.with.mod_python.php and http://www.selenic.com/pipermail/mercurial/2007-May/013226.html (mod_python)
- http://blog.sietch-tabr.com/index.php/post/2008/01/21/Mercurial-:-partage-de-depots-differents-en-http-et-https-push-par-https (CGI)