slitaz-dev-tools annotate slitaz-mercurial-style/hgweb.cgi @ rev 297

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