view contrib/hgweb.fcgi @ 45218:3ea3b85df03f

fix: update documentation to reflect preference for --source over --rev I should have updated the documentation in 5205b46bd887 (fix: add a -s option to format a revision and its descendants, 2020-03-13) and/or a6ef1e8e2f6d (fix: mark -r as advanced, 2020-03-13)... Differential Revision: https://phab.mercurial-scm.org/D8808
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 24 Jul 2020 08:38:19 -0700
parents 99e231afc29c
children d58a205d0672
line wrap: on
line source

#!/usr/bin/env python
#
# An example FastCGI script for use with flup, edit as necessary

# 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
from flup.server.fcgi import WSGIServer

application = hgweb(config)
WSGIServer(application).run()