equal
deleted
inserted
replaced
4 |
4 |
5 from mercurial.thirdparty import ( |
5 from mercurial.thirdparty import ( |
6 cbor, |
6 cbor, |
7 ) |
7 ) |
8 from mercurial import ( |
8 from mercurial import ( |
|
9 ui as uimod, |
9 util, |
10 util, |
10 wireprotoframing as framing, |
11 wireprotoframing as framing, |
11 ) |
12 ) |
12 from mercurial.utils import ( |
13 from mercurial.utils import ( |
13 cborutil, |
14 cborutil, |
16 ffs = framing.makeframefromhumanstring |
17 ffs = framing.makeframefromhumanstring |
17 |
18 |
18 OK = cbor.dumps({b'status': b'ok'}) |
19 OK = cbor.dumps({b'status': b'ok'}) |
19 |
20 |
20 def makereactor(deferoutput=False): |
21 def makereactor(deferoutput=False): |
21 return framing.serverreactor(deferoutput=deferoutput) |
22 ui = uimod.ui() |
|
23 return framing.serverreactor(ui, deferoutput=deferoutput) |
22 |
24 |
23 def sendframes(reactor, gen): |
25 def sendframes(reactor, gen): |
24 """Send a generator of frame bytearray to a reactor. |
26 """Send a generator of frame bytearray to a reactor. |
25 |
27 |
26 Emits a generator of results from ``onframerecv()`` calls. |
28 Emits a generator of results from ``onframerecv()`` calls. |