[PATCH 5 of 8 V2] wireproto: advertise supported compression formats in capabilities

Augie Fackler raf at durin42.com
Fri Dec 2 16:36:12 EST 2016


On Mon, Nov 28, 2016 at 10:58:22PM -0800, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1480395590 28800
> #      Mon Nov 28 20:59:50 2016 -0800
> # Node ID 36c296adbfabc1f7301dd6f94b5f4515e6a61b81
> # Parent  52cbc32c11454f5a72ea233ea49fed41eaec6407
> wireproto: advertise supported compression formats in capabilities
>
> This commit introduces support for advertising a server capability
> listing available compression formats.
>

[...]

> diff --git a/tests/test-http-protocol.t b/tests/test-http-protocol.t
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-http-protocol.t
> @@ -0,0 +1,44 @@
> +  $ cat >> $HGRCPATH << EOF
> +  > [web]
> +  > push_ssl = false
> +  > allow_push = *
> +  > EOF
> +
> +  $ hg init server
> +  $ cd server
> +  $ touch a
> +  $ hg -q commit -A -m initial
> +  $ cd ..
> +
> +  $ hg -R server serve -p $HGPORT -d --pid-file hg.pid
> +  $ cat hg.pid >> $DAEMON_PIDS
> +
> +compression formats are advertised in compression capability
> +
> +#if zstd
> +  $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep compression
> +  compression=zstd,zlib
> +#else
> +  $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep compression
> +  compression=ZL
> +#endif

I'm guessing this ZL is a remnant from the previous cycle and it should be zlib?

> +
> +  $ killdaemons.py
> +


More information about the Mercurial-devel mailing list