Mercurial > hg
comparison tests/test-http.t @ 35792:1d118f9f4f57
bundle2: always advertise client support for stream parts
Previously, enabling of stream clone over bundle2 was a server-side
only change. And clients would only advertise bundle2 support for
stream clones if an experimental config option was set.
This situation wasn't forward compatible because in the future
(when the feature is enabled on servers by default), an old client
would send a request to the server but it wouldn't send its own
bundle2 capability support for stream parts. Servers would have to
infer that clients not sending this capability were old Mercurial
clients that only sent the capability if the feature was
explicitly enabled. Implicit and inferred behavior makes implementing
servers hard. It's much better to be explicit about client features.
We should either make the config option for bundle2 stream clones
disable the feature client-side as well (so a server doesn't see
a request from a client not advertising stream support). Or we
should always advertise stream support if a client is willing
to accept stream parts.
Since I anticipating stabilizing stream clone support in bundle2
quickly, I think it's safe to always advertise client support
in the bundle2 capabilities. So this commit changes things to
do that.
Because capabilities now vary between client and server, we had
to create variations of the variable substitutions for those
strings.
Differential Revision: https://phab.mercurial-scm.org/D1931
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 22 Jan 2018 12:23:47 -0800 |
parents | 0c4b23ccf1a5 |
children | e3c228b4510d |
comparison
equal
deleted
inserted
replaced
35791:9adae6a20e1f | 35792:1d118f9f4f57 |
---|---|
302 received listkey for "bookmarks": 0 bytes | 302 received listkey for "bookmarks": 0 bytes |
303 1 changesets found | 303 1 changesets found |
304 list of changesets: | 304 list of changesets: |
305 7f4e523d01f2cc3765ac8934da3d14db775ff872 | 305 7f4e523d01f2cc3765ac8934da3d14db775ff872 |
306 bundle2-output-bundle: "HG20", 5 parts total | 306 bundle2-output-bundle: "HG20", 5 parts total |
307 bundle2-output-part: "replycaps" 178 bytes payload | 307 bundle2-output-part: "replycaps" 188 bytes payload |
308 bundle2-output-part: "check:phases" 24 bytes payload | 308 bundle2-output-part: "check:phases" 24 bytes payload |
309 bundle2-output-part: "check:heads" streamed payload | 309 bundle2-output-part: "check:heads" streamed payload |
310 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | 310 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
311 bundle2-output-part: "phase-heads" 24 bytes payload | 311 bundle2-output-part: "phase-heads" 24 bytes payload |
312 sending unbundle command | 312 sending unbundle command |
313 sending 986 bytes | 313 sending 996 bytes |
314 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle | 314 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle |
315 devel-peer-request: Content-length 986 | 315 devel-peer-request: Content-length 996 |
316 devel-peer-request: Content-type application/mercurial-0.1 | 316 devel-peer-request: Content-type application/mercurial-0.1 |
317 devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | 317 devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
318 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | 318 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
319 devel-peer-request: 16 bytes of commands arguments in headers | 319 devel-peer-request: 16 bytes of commands arguments in headers |
320 devel-peer-request: 986 bytes of data | 320 devel-peer-request: 996 bytes of data |
321 devel-peer-request: finished in *.???? seconds (200) (glob) | 321 devel-peer-request: finished in *.???? seconds (200) (glob) |
322 bundle2-input-bundle: no-transaction | 322 bundle2-input-bundle: no-transaction |
323 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | 323 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
324 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported | 324 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported |
325 bundle2-input-part: total payload size 100 | 325 bundle2-input-part: total payload size 100 |