revlog: use iterbytestr()
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 12 Feb 2019 11:27:27 -0800
changeset 41689 f63ba0b9d06f
parent 41688 ec7bba81ebf4
child 41690 ea72da71ad69
revlog: use iterbytestr() Otherwise we iterate over integers in Python 3 and the character compare fails. Differential Revision: https://phab.mercurial-scm.org/D5947
mercurial/revlog.py
--- a/mercurial/revlog.py	Sun Feb 10 22:41:51 2019 -0800
+++ b/mercurial/revlog.py	Tue Feb 12 11:27:27 2019 -0800
@@ -1340,7 +1340,7 @@
             return True
 
         def maybewdir(prefix):
-            return all(c == 'f' for c in prefix)
+            return all(c == 'f' for c in pycompat.iterbytestr(prefix))
 
         hexnode = hex(node)