PageRenderTime 37ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/hgweb.cgi

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