Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 41689:f63ba0b9d06f
revlog: use iterbytestr()
Otherwise we iterate over integers in Python 3 and the
character compare fails.
Differential Revision: https://phab.mercurial-scm.org/D5947
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 12 Feb 2019 11:27:27 -0800 |
parents | 13a6dd952ffe |
children | 6843379bf99e |
comparison
equal
deleted
inserted
replaced
41688:ec7bba81ebf4 | 41689:f63ba0b9d06f |
---|---|
1338 if node is None: | 1338 if node is None: |
1339 raise error.LookupError(node, self.indexfile, _('no node')) | 1339 raise error.LookupError(node, self.indexfile, _('no node')) |
1340 return True | 1340 return True |
1341 | 1341 |
1342 def maybewdir(prefix): | 1342 def maybewdir(prefix): |
1343 return all(c == 'f' for c in prefix) | 1343 return all(c == 'f' for c in pycompat.iterbytestr(prefix)) |
1344 | 1344 |
1345 hexnode = hex(node) | 1345 hexnode = hex(node) |
1346 | 1346 |
1347 def disambiguate(hexnode, minlength): | 1347 def disambiguate(hexnode, minlength): |
1348 """Disambiguate against wdirid.""" | 1348 """Disambiguate against wdirid.""" |