PageRenderTime 40ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/contrib/hgweb.fcgi

https://bitbucket.org/mirror/mercurial/
Python | 19 lines | 6 code | 4 blank | 9 comment | 0 complexity | d371e3c115617516bab31b57807c856a MD5 | raw file
Possible License(s): GPL-2.0
  1. #!/usr/bin/env python
  2. #
  3. # An example FastCGI script for use with flup, edit as necessary
  4. # Path to repo or hgweb config to serve (see 'hg help hgweb')
  5. config = "/path/to/repo/or/config"
  6. # Uncomment and adjust if Mercurial is not installed system-wide
  7. # (consult "installed modules" path from 'hg debuginstall'):
  8. #import sys; sys.path.insert(0, "/path/to/python/lib")
  9. # Uncomment to send python tracebacks to the browser if an error occurs:
  10. #import cgitb; cgitb.enable()
  11. from mercurial import demandimport; demandimport.enable()
  12. from mercurial.hgweb import hgweb
  13. from flup.server.fcgi import WSGIServer
  14. application = hgweb(config)
  15. WSGIServer(application).run()