contrib/hgwebdir.fcgi
changeset 5995 b913d3aacddc
parent 5244 79279b5583c6
child 6085 e1f11b8a1e9e
child 6141 90e5c82a3859
--- a/contrib/hgwebdir.fcgi	Fri Feb 01 10:31:15 2008 +0100
+++ b/contrib/hgwebdir.fcgi	Fri Feb 01 13:09:45 2008 -0800
@@ -23,6 +23,7 @@
 
 from mercurial.hgweb.hgwebdir_mod import hgwebdir
 from mercurial.hgweb.request import wsgiapplication
+from mercurial import dispatch, ui
 from flup.server.fcgi import WSGIServer
 
 # The config file looks like this.  You can have paths to individual
@@ -44,7 +45,8 @@
 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples
 # or use a dictionary with entries like 'virtual/path': '/real/path'
 
-def make_web_app():
-    return hgwebdir("hgweb.config")
+def web_app(ui):
+    return lambda: hgwebdir("hgweb.config", ui)
 
-WSGIServer(wsgiapplication(make_web_app)).run()
+u = ui.ui(report_untrusted=False, interactive=False)
+dispatch.profiled(u, lambda: WSGIServer(wsgiapplication(web_app(u))).run())