hgweb.cgi
author Raphaël Gomès <rgomes@octobus.net>
Mon, 03 Jul 2023 15:28:17 +0200
branchstable
changeset 50738 2eaa883778f7
parent 50734 d5cd1fd690f3
permissions -rwxr-xr-x
heptapod-ci: (hopefully) fix the pipeline savings system There is no easy way for me to test this outside of the actual repo since it would require setting up `heptapod-runner` locally, making a Git repo with the right changes, etc. It's not worth my time at this point. If this fails, I'll try to ask for help from Georges, the maintainer of Heptapod.

#!/usr/bin/env python3
#
# 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 = b"/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")

from mercurial import demandimport

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

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