equal
deleted
inserted
replaced
9 import contextlib |
9 import contextlib |
10 |
10 |
11 from .i18n import _ |
11 from .i18n import _ |
12 from .thirdparty import ( |
12 from .thirdparty import ( |
13 cbor, |
13 cbor, |
14 ) |
|
15 from .thirdparty.zope import ( |
|
16 interface as zi, |
|
17 ) |
14 ) |
18 from . import ( |
15 from . import ( |
19 encoding, |
16 encoding, |
20 error, |
17 error, |
21 pycompat, |
18 pycompat, |
22 streamclone, |
19 streamclone, |
23 util, |
20 util, |
24 wireprotoframing, |
21 wireprotoframing, |
25 wireprototypes, |
22 wireprototypes, |
|
23 ) |
|
24 from .utils import ( |
|
25 interfaceutil, |
26 ) |
26 ) |
27 |
27 |
28 FRAMINGTYPE = b'application/mercurial-exp-framing-0005' |
28 FRAMINGTYPE = b'application/mercurial-exp-framing-0005' |
29 |
29 |
30 HTTP_WIREPROTO_V2 = wireprototypes.HTTP_WIREPROTO_V2 |
30 HTTP_WIREPROTO_V2 = wireprototypes.HTTP_WIREPROTO_V2 |
338 func, spec = COMMANDS[command] |
338 func, spec = COMMANDS[command] |
339 args = proto.getargs(spec) |
339 args = proto.getargs(spec) |
340 |
340 |
341 return func(repo, proto, **args) |
341 return func(repo, proto, **args) |
342 |
342 |
343 @zi.implementer(wireprototypes.baseprotocolhandler) |
343 @interfaceutil.implementer(wireprototypes.baseprotocolhandler) |
344 class httpv2protocolhandler(object): |
344 class httpv2protocolhandler(object): |
345 def __init__(self, req, ui, args=None): |
345 def __init__(self, req, ui, args=None): |
346 self._req = req |
346 self._req = req |
347 self._ui = ui |
347 self._ui = ui |
348 self._args = args |
348 self._args = args |