##// END OF EJS Templates
tests: allow the true command to be provided by coreutils...
tests: allow the true command to be provided by coreutils The `true` command is sometimes provided as a symbolic link to the `coreutils` single binary. This is the case on NixOS, on which the test was failing because the symbolic link fully resolves to the latter name, equally valid but not previously accepted by the test's golden output. Differential Revision: https://phab.mercurial-scm.org/D11740

File last commit:

r46434:c102b704 default
r49134:bc04a761 stable
Show More
hgweb.fcgi
22 lines | 669 B | text/plain | TextLexer
Gregory Szorc
global: use python3 in shebangs...
r46434 #!/usr/bin/env python3
Matt Mackall
hgweb: synchronize fcgi and wsgi scripts
r11002 #
# An example FastCGI script for use with flup, edit as necessary
# Path to repo or hgweb config to serve (see 'hg help hgweb')
Harald Klimach
hgweb: compatibility of hgweb.cgi template with Python 3...
r45964 config = b"/path/to/repo/or/config"
Matt Mackall
hgweb: synchronize fcgi and wsgi scripts
r11002
Matt Mackall
hgweb: add hint about finding library path with debuginstall
r15475 # Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
Gregory Szorc
black: blacken scripts...
r44058 # import sys; sys.path.insert(0, "/path/to/python/lib")
Matt Mackall
hgweb: synchronize fcgi and wsgi scripts
r11002
# Uncomment to send python tracebacks to the browser if an error occurs:
Gregory Szorc
black: blacken scripts...
r44058 # import cgitb; cgitb.enable()
Matt Mackall
hgweb: synchronize fcgi and wsgi scripts
r11002
Gregory Szorc
black: blacken scripts...
r44058 from mercurial import demandimport
demandimport.enable()
Matt Mackall
hgweb: synchronize fcgi and wsgi scripts
r11002 from mercurial.hgweb import hgweb
from flup.server.fcgi import WSGIServer
Gregory Szorc
black: blacken scripts...
r44058
Matt Mackall
hgweb: synchronize fcgi and wsgi scripts
r11002 application = hgweb(config)
WSGIServer(application).run()