Mercurial > hg
diff tests/wireprotohelpers.sh @ 40133:762ef19a07e3
wireprotov2: send protocol settings frame from client
Now that we have client and server reactor support for protocol
settings and encoding frames, we can start to send them out over
the wire!
This commit teaches the client reactor to send out a protocol
settings frame when needed. The httpv2 peer has been taught to
gather a list of supported content encoders and to advertise them
through the client reactor.
Because the client is now sending new frame types by default, this
constitutes a compatibility break in the framing protocol. The
media type version has been bumped accordingly. This will ensure
existing clients won't attempt to send the new frames to old
servers not supporting this explicit media type. I'm not bothering
with the BC annotation because everything wireprotov2 is highly
experimental and nobody should be running a server yet.
Differential Revision: https://phab.mercurial-scm.org/D4922
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 17:00:16 -0700 |
parents | a732d70253b0 |
children | 41263df08109 |
line wrap: on
line diff
--- a/tests/wireprotohelpers.sh Mon Oct 08 17:10:59 2018 -0700 +++ b/tests/wireprotohelpers.sh Mon Oct 08 17:00:16 2018 -0700 @@ -1,20 +1,20 @@ HTTPV2=exp-http-v2-0002 -MEDIATYPE=application/mercurial-exp-framing-0005 +MEDIATYPE=application/mercurial-exp-framing-0006 sendhttpraw() { hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/ } sendhttpv2peer() { - hg debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ + hg --config experimental.httppeer.v2-encoder-order=identity debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ } sendhttpv2peerverbose() { - hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ + hg --config experimental.httppeer.v2-encoder-order=identity --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ } sendhttpv2peerhandshake() { - hg --verbose debugwireproto --peer http2 http://$LOCALIP:$HGPORT/ + hg --config experimental.httppeer.v2-encoder-order=identity --verbose debugwireproto --peer http2 http://$LOCALIP:$HGPORT/ } cat > dummycommands.py << EOF @@ -65,5 +65,8 @@ cat >> $HGRCPATH << EOF [experimental] httppeer.advertise-v2 = true +# So tests are in plain text. Also, zstd isn't available in all installs, +# which would make tests non-deterministic. +httppeer.v2-encoder-order = identity EOF }