slitaz-dev-tools view slitaz-mercurial-style/hgweb.cgi @ rev 277

slitaz-mercurial-style: more work and first stage finished (testing localy)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 01 19:12:07 2017 +0100 (2017-03-01)
parents c3dc62cce4a7
children
line source
1 #!/usr/bin/env python
2 #
3 # An example hgweb CGI script, edit as necessary
4 # See also https://mercurial-scm.org/wiki/PublishingRepositories
6 # Path to repo or hgweb config to serve (see 'hg help hgweb')
7 config = "hgweb.config"
8 #config = "/home/pankso/Projects/sup"
10 # Uncomment and adjust if Mercurial is not installed system-wide
11 # (consult "installed modules" path from 'hg debuginstall'):
12 #import sys; sys.path.insert(0, "/path/to/python/lib")
14 # Uncomment to send python tracebacks to the browser if an error occurs:
15 #import cgitb; cgitb.enable()
17 from mercurial import demandimport; demandimport.enable()
18 from mercurial.hgweb import hgweb, wsgicgi
19 application = hgweb(config)
20 wsgicgi.launch(application)