equal
deleted
inserted
replaced
15 from mercurial.hgweb import ( |
15 from mercurial.hgweb import ( |
16 common as hgwebcommon, |
16 common as hgwebcommon, |
17 ) |
17 ) |
18 |
18 |
19 from mercurial import ( |
19 from mercurial import ( |
|
20 exthelper, |
20 pycompat, |
21 pycompat, |
21 util, |
22 util, |
|
23 wireprotoserver, |
22 ) |
24 ) |
23 |
25 |
24 from . import blobstore |
26 from . import blobstore |
25 |
27 |
26 HTTP_OK = hgwebcommon.HTTP_OK |
28 HTTP_OK = hgwebcommon.HTTP_OK |
29 HTTP_NOT_FOUND = hgwebcommon.HTTP_NOT_FOUND |
31 HTTP_NOT_FOUND = hgwebcommon.HTTP_NOT_FOUND |
30 HTTP_METHOD_NOT_ALLOWED = hgwebcommon.HTTP_METHOD_NOT_ALLOWED |
32 HTTP_METHOD_NOT_ALLOWED = hgwebcommon.HTTP_METHOD_NOT_ALLOWED |
31 HTTP_NOT_ACCEPTABLE = hgwebcommon.HTTP_NOT_ACCEPTABLE |
33 HTTP_NOT_ACCEPTABLE = hgwebcommon.HTTP_NOT_ACCEPTABLE |
32 HTTP_UNSUPPORTED_MEDIA_TYPE = hgwebcommon.HTTP_UNSUPPORTED_MEDIA_TYPE |
34 HTTP_UNSUPPORTED_MEDIA_TYPE = hgwebcommon.HTTP_UNSUPPORTED_MEDIA_TYPE |
33 |
35 |
|
36 eh = exthelper.exthelper() |
|
37 |
|
38 @eh.wrapfunction(wireprotoserver, 'handlewsgirequest') |
34 def handlewsgirequest(orig, rctx, req, res, checkperm): |
39 def handlewsgirequest(orig, rctx, req, res, checkperm): |
35 """Wrap wireprotoserver.handlewsgirequest() to possibly process an LFS |
40 """Wrap wireprotoserver.handlewsgirequest() to possibly process an LFS |
36 request if it is left unprocessed by the wrapped method. |
41 request if it is left unprocessed by the wrapped method. |
37 """ |
42 """ |
38 if orig(rctx, req, res, checkperm): |
43 if orig(rctx, req, res, checkperm): |