annotate hgweb.py @ 0:be88a0c804e6

initial commit
author Robert McIntyre <rlm@mit.edu>
date Wed, 19 Oct 2011 22:15:44 -0700
parents
children dfc6cd448c24
rev   line source
rlm@0 1 #!/usr/bin/env python
rlm@0 2 #
rlm@0 3 # An example hgweb CGI script, edit as necessary
rlm@0 4 # See also http://mercurial.selenic.com/wiki/PublishingRepositories
rlm@0 5
rlm@0 6 # Path to repo or hgweb config to serve (see 'hg help hgweb')
rlm@0 7 config = "/home/r/proj/bortreb/hgweb.config"
rlm@0 8
rlm@0 9 # Uncomment and adjust if Mercurial is not installed system-wide:
rlm@0 10 #import sys; sys.path.insert(0, "/path/to/python/lib")
rlm@0 11
rlm@0 12 # Uncomment to send python tracebacks to the browser if an error occurs:
rlm@0 13 #import cgitb; cgitb.enable()
rlm@0 14
rlm@0 15 from mercurial import demandimport; demandimport.enable()
rlm@0 16 from mercurial.hgweb import hgweb, wsgicgi
rlm@0 17 application = hgweb(config)
rlm@0 18 wsgicgi.launch(application)