I'm looking for a way to display static HTML content using an Apache 2 webserver while also having a Mercurial repository under the same URL. E.g. under
http://www.myserver.org/projectname there should be the project HTML available if browsed with a normal web-browser, but it should be possible to clone the projects Mercurial repository using
hg clone http://www.myserver.org/projectname. It is basically what http://bitbucket.org has.
I think this might be possible to achieve by configuring Apache to use the
hgweb.cgi script only for Mercurial requests and not for normal HTML GET request. However, I don't now which requests Mercurial uses (hopefully not GET) and how to configure Apache accordantly.
A little bit more background:
In need this for multiple repositories / projects (currently ~2400). So far I tried
as explained in Publishing Repositories which works good for the web view of the repository but doesn't allow me to show any other information beside author, name and description (from
[web] section). The variable substitution in
hgweb is very limited and so it doesn't allow to provide arbitrary variables. I know I could simply have the static HTML pages and
hgweb under different URLs, but this is not meet the constrains given to me.