hgweb.cgi
author Manuel Jacob <me@manueljacob.de>
Tue, 21 Jul 2020 01:04:19 +0200
branchstable
changeset 45191 fc54f52779dd
parent 43731 47ef023d0165
child 45213 d58a205d0672
permissions -rwxr-xr-x
relnotes: add release notes for relevant changes I did since the 5.4 release After having written the notes, I realized that the added points contain changes that were part of the 5.4.2 release. These were never included in any release notes. I asked on IRC whether they should be added to this file or not, but didn’t get an answer to this question. If they should not be added here, I can remove them. Differential Revision: https://phab.mercurial-scm.org/D8770

#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also https://mercurial-scm.org/wiki/PublishingRepositories

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"

# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
# import sys; sys.path.insert(0, "/path/to/python/lib")

# Uncomment to send python tracebacks to the browser if an error occurs:
# import cgitb; cgitb.enable()

from mercurial import demandimport

demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi

application = hgweb(config)
wsgicgi.launch(application)