bundle2: fix assertion that 'compression' hasn't been set stable
authorSiddharth Agarwal <sid0@fb.com>
Mon, 13 Feb 2017 11:43:12 -0800
branchstable
changeset 30915 aa25989b0658
parent 30914 f3807a135e43
child 30965 f01df5d2fe49
child 31063 18fb3cf572b4
bundle2: fix assertion that 'compression' hasn't been set `n.lower()` will return `compression`, not `Compression`.
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Fri Feb 10 18:20:58 2017 +0100
+++ b/mercurial/bundle2.py	Mon Feb 13 11:43:12 2017 -0800
@@ -518,7 +518,7 @@
         """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