rlm@0: #!/usr/bin/env python rlm@0: # rlm@0: # An example hgweb CGI script, edit as necessary rlm@0: # See also http://mercurial.selenic.com/wiki/PublishingRepositories rlm@0: rlm@0: # Path to repo or hgweb config to serve (see 'hg help hgweb') rlm@0: config = "/home/r/proj/bortreb/hgweb.config" rlm@0: rlm@0: # Uncomment and adjust if Mercurial is not installed system-wide: rlm@0: #import sys; sys.path.insert(0, "/path/to/python/lib") rlm@0: rlm@0: # Uncomment to send python tracebacks to the browser if an error occurs: rlm@0: #import cgitb; cgitb.enable() rlm@0: rlm@0: from mercurial import demandimport; demandimport.enable() rlm@0: from mercurial.hgweb import hgweb, wsgicgi rlm@0: application = hgweb(config) rlm@0: wsgicgi.launch(application)