hgweb.cgi
author Thomas Arendsen Hein <thomas@intevation.de>
Tue, 11 Apr 2006 07:08:16 +0200
changeset 2056 1f6d520557ec
parent 391 5f65a108a559
child 2506 d0db3462d568
permissions -rw-r--r--
Polished exception handling when importing extensions: - Warning about failed import is printed on one line. - For this warning the [extensions] section key is used, because the value doesn't have to be set. - Whan a --traceback is requested, exit immediately to not mix up problems when importing an extension with other problems.

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

import cgitb, os, sys
cgitb.enable()

# 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")
h.run()