view hgweb.cgi @ 17553:5ab863922e0f

perf: add perffncacheencode Examples (all done with somewhat dated clones I found on my disk): Netbeans (~120k entries in fncache): $ hg perffncacheencode ! wall 4.338000 comb 4.336828 user 4.336828 sys 0.000000 (best of 3) Openoffice (~77k entries in fncache)): $ hg perffncacheencode ! wall 1.533000 comb 1.528810 user 1.528810 sys 0.000000 (best of 7) Xen (~10k entries in fncache): $ hg perffncacheencode ! wall 0.198000 comb 0.187201 user 0.187201 sys 0.000000 (best of 51) Done on Windows 7 x64.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 14 Sep 2012 13:02:31 +0200
parents 85cba926cb59
children 4b0fc75f9403
line wrap: on
line source

#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also http://mercurial.selenic.com/wiki/PublishingRepositories

# 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, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)