equal
deleted
inserted
replaced
21 #import os |
21 #import os |
22 #os.environ["HGENCODING"] = "UTF-8" |
22 #os.environ["HGENCODING"] = "UTF-8" |
23 |
23 |
24 from mercurial.hgweb.hgwebdir_mod import hgwebdir |
24 from mercurial.hgweb.hgwebdir_mod import hgwebdir |
25 from mercurial.hgweb.request import wsgiapplication |
25 from mercurial.hgweb.request import wsgiapplication |
|
26 from mercurial import dispatch, ui |
26 from flup.server.fcgi import WSGIServer |
27 from flup.server.fcgi import WSGIServer |
27 |
28 |
28 # The config file looks like this. You can have paths to individual |
29 # The config file looks like this. You can have paths to individual |
29 # repos, collections of repos in a directory tree, or both. |
30 # repos, collections of repos in a directory tree, or both. |
30 # |
31 # |
42 # Then repos will list as bar and quux/baz. |
43 # Then repos will list as bar and quux/baz. |
43 # |
44 # |
44 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples |
45 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples |
45 # or use a dictionary with entries like 'virtual/path': '/real/path' |
46 # or use a dictionary with entries like 'virtual/path': '/real/path' |
46 |
47 |
47 def make_web_app(): |
48 def web_app(ui): |
48 return hgwebdir("hgweb.config") |
49 return lambda: hgwebdir("hgweb.config", ui) |
49 |
50 |
50 WSGIServer(wsgiapplication(make_web_app)).run() |
51 u = ui.ui(report_untrusted=False, interactive=False) |
|
52 dispatch.profiled(u, lambda: WSGIServer(wsgiapplication(web_app(u))).run()) |