mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
8098f7c792
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hgweb: pull cgitb into CGI script example, where it can easily be disabled This also eliminates cgitb dumps in the logging output of hg serve manifest hash: a0aa07a706c2c388c0b49505e2960197f716920c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsv9DywK+sNU5EO8RAieFAJwOjdfkz7pILNVUTvpMkRa6/OIhIQCgo2TP I2E4hxQ0N7mTtl45pXEFLsk= =tG0v -----END PGP SIGNATURE-----
13 lines
283 B
Python
13 lines
283 B
Python
#!/usr/bin/env python
|
|
#
|
|
# An example CGI script to use hgweb, edit as necessary
|
|
|
|
import cgitb, os, sys
|
|
cgitb.enable()
|
|
|
|
# sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install
|
|
from mercurial import hgweb
|
|
|
|
h = hgweb.hgweb("/path/to/repo", "repository name")
|
|
h.run()
|