Mercurial > hg
comparison hgweb.cgi @ 5995:b913d3aacddc
profiling: allow CGI and FastCGI to be profiled
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 01 Feb 2008 13:09:45 -0800 |
parents | d74fc8dec2b4 |
children | 4baad19c4801 90e5c82a3859 |
comparison
equal
deleted
inserted
replaced
5994:a445388aa554 | 5995:b913d3aacddc |
---|---|
20 # | 20 # |
21 #import os | 21 #import os |
22 #os.environ["HGENCODING"] = "UTF-8" | 22 #os.environ["HGENCODING"] = "UTF-8" |
23 | 23 |
24 from mercurial.hgweb.hgweb_mod import hgweb | 24 from mercurial.hgweb.hgweb_mod import hgweb |
25 from mercurial import dispatch, ui | |
25 import mercurial.hgweb.wsgicgi as wsgicgi | 26 import mercurial.hgweb.wsgicgi as wsgicgi |
26 | 27 |
27 application = hgweb("/path/to/repo", "repository name") | 28 u = ui.ui(report_untrusted=False, interactive=False) |
28 wsgicgi.launch(application) | 29 dispatch.profiled(u, lambda: wsgicgi.launch(hgweb("/path/to/repo", |
30 "repository name", u))) |