Mercurial > public > mercurial-scm > hg
comparison mercurial/bundle2.py @ 30915:aa25989b0658 stable
bundle2: fix assertion that 'compression' hasn't been set
`n.lower()` will return `compression`, not `Compression`.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 13 Feb 2017 11:43:12 -0800 |
parents | 511a4bf52754 |
children | f01df5d2fe49 |
comparison
equal
deleted
inserted
replaced
30914:f3807a135e43 | 30915:aa25989b0658 |
---|---|
516 | 516 |
517 def setcompression(self, alg, compopts=None): | 517 def setcompression(self, alg, compopts=None): |
518 """setup core part compression to <alg>""" | 518 """setup core part compression to <alg>""" |
519 if alg in (None, 'UN'): | 519 if alg in (None, 'UN'): |
520 return | 520 return |
521 assert not any(n.lower() == 'Compression' for n, v in self._params) | 521 assert not any(n.lower() == 'compression' for n, v in self._params) |
522 self.addparam('Compression', alg) | 522 self.addparam('Compression', alg) |
523 self._compengine = util.compengines.forbundletype(alg) | 523 self._compengine = util.compengines.forbundletype(alg) |
524 self._compopts = compopts | 524 self._compopts = compopts |
525 | 525 |
526 @property | 526 @property |