hgweb.cgi
author Bryan O'Sullivan <bos@serpentine.com>
Tue, 19 Jul 2005 07:15:59 -0800
changeset 726 809a870a0e73
parent 391 5f65a108a559
child 2506 d0db3462d568
permissions -rw-r--r--
Add a source designator to the walk methods. If the source is 'f' (the filesystem), the file definitely exists in the filesystem. If 'm' (a rev or dirstate manifest), the file may not still exist with the given name.

#!/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()