view hgweb.cgi @ 941:4cf418c2a013

Add a multi-repository server This merges a bunch of the ideas for a multi-repository CGI script and simplifies things a bit. It uses PATH_INFO so it generally wants paths of the form: http://host/hg.cgi/virtualpath This gets mapped via a simple config file to the real path. All info about the repo is read from the repo's hgrc.
date Fri, 19 Aug 2005 16:38:25 -0800
parents 5f65a108a559
line wrap: on
line source

#!/usr/bin/env python
# An example CGI script to use hgweb, edit as necessary

import cgitb, os, sys

# sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install
from mercurial import hgweb

h = hgweb.hgweb("/path/to/repo", "repository name")