Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotoframing.py @ 40130:293835e0fff7
wireprotov2: pass ui into clientreactor and serverreactor
This will allow us to use config options to influence compression
settings.
Differential Revision: https://phab.mercurial-scm.org/D4919
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 04 Oct 2018 17:17:57 -0700 |
parents | 57782791b7e9 |
children | 5d44c4d1d516 |
line wrap: on
line diff
--- a/mercurial/wireprotoframing.py Thu Oct 04 16:44:21 2018 -0700 +++ b/mercurial/wireprotoframing.py Thu Oct 04 17:17:57 2018 -0700 @@ -750,7 +750,7 @@ between who responds to what. """ - def __init__(self, deferoutput=False): + def __init__(self, ui, deferoutput=False): """Construct a new server reactor. ``deferoutput`` can be used to indicate that no output frames should be @@ -760,6 +760,7 @@ send those frames. This is useful for half-duplex transports where the sender cannot receive until all data has been transmitted. """ + self._ui = ui self._deferoutput = deferoutput self._state = 'initial' self._nextoutgoingstreamid = 2 @@ -1351,7 +1352,7 @@ is expected to follow or we're at the end of the response stream, respectively. """ - def __init__(self, hasmultiplesend=False, buffersends=True): + def __init__(self, ui, hasmultiplesend=False, buffersends=True): """Create a new instance. ``hasmultiplesend`` indicates whether multiple sends are supported @@ -1362,6 +1363,7 @@ ``buffercommands`` indicates whether sends should be buffered until the last request has been issued. """ + self._ui = ui self._hasmultiplesend = hasmultiplesend self._buffersends = buffersends