[PATCH] bundle2: fix assertion that 'compression' hasn't been set

Augie Fackler raf at durin42.com
Mon Feb 13 17:26:25 EST 2017


On Mon, Feb 13, 2017 at 12:41:59PM -0800, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1487014992 28800
> #      Mon Feb 13 11:43:12 2017 -0800
> # Node ID 130eeba1cccdc63677da88a0f0dabe7fc39f963a
> # Parent  72f25e17af9d6a206ea374c30f229ae9513f3f23
> bundle2: fix assertion that 'compression' hasn't been set

Queued, thanks!

>
> `n.lower()` will return `compression`, not `Compression`.
>
> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
> --- a/mercurial/bundle2.py
> +++ b/mercurial/bundle2.py
> @@ -515,7 +515,7 @@ class bundle20(object):
>          """setup core part compression to <alg>"""
>          if alg in (None, 'UN'):
>              return
> -        assert not any(n.lower() == 'Compression' for n, v in self._params)
> +        assert not any(n.lower() == 'compression' for n, v in self._params)
>          self.addparam('Compression', alg)
>          self._compengine = util.compengines.forbundletype(alg)
>          self._compopts = compopts
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list