equal
deleted
inserted
replaced
13 from mercurial import templatefilters |
13 from mercurial import templatefilters |
14 from common import ErrorResponse, permhooks, caching |
14 from common import ErrorResponse, permhooks, caching |
15 from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST |
15 from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST |
16 from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
16 from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
17 from request import wsgirequest |
17 from request import wsgirequest |
18 import webcommands, protocol, webutil |
18 import webcommands, protocol, webutil, wsgicgi |
19 |
19 |
20 perms = { |
20 perms = { |
21 'changegroup': 'pull', |
21 'changegroup': 'pull', |
22 'changegroupsubset': 'pull', |
22 'changegroupsubset': 'pull', |
23 'getbundle': 'pull', |
23 'getbundle': 'pull', |
259 method, if possible. |
259 method, if possible. |
260 """ |
260 """ |
261 if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): |
261 if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): |
262 raise RuntimeError("This function is only intended to be " |
262 raise RuntimeError("This function is only intended to be " |
263 "called while running as a CGI script.") |
263 "called while running as a CGI script.") |
264 import mercurial.hgweb.wsgicgi as wsgicgi |
|
265 wsgicgi.launch(self) |
264 wsgicgi.launch(self) |
266 |
265 |
267 def __call__(self, env, respond): |
266 def __call__(self, env, respond): |
268 """Run the WSGI application. |
267 """Run the WSGI application. |
269 |
268 |