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

Siddharth Agarwal sid0 at fb.com
Mon Feb 13 20:41:59 UTC 2017


# 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

`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


More information about the Mercurial-devel mailing list