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()