# HG changeset patch # User Yuya Nishihara # Date 2017-09-03 08:28:47 # Node ID b4abc438a8c92dc2ed2401d90efe082249604589 # Parent 7e3f078b6f3181382635443b3babc25e68cede6a py3: iterate bytes as a byte string in store.lowerencode() diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -164,7 +164,7 @@ def _buildlowerencodefun(): for x in range(ord("A"), ord("Z") + 1): cmap[xchr(x)] = xchr(x).lower() def lowerencode(s): - return "".join([cmap[c] for c in s]) + return "".join([cmap[c] for c in pycompat.iterbytestr(s)]) return lowerencode lowerencode = getattr(parsers, 'lowerencode', None) or _buildlowerencodefun() diff --git a/tests/test-doctest.py b/tests/test-doctest.py --- a/tests/test-doctest.py +++ b/tests/test-doctest.py @@ -63,7 +63,7 @@ testmod('mercurial.parser') testmod('mercurial.pycompat') testmod('mercurial.revsetlang') testmod('mercurial.smartset') -testmod('mercurial.store', py3=False) # py3: bytes[n] +testmod('mercurial.store') testmod('mercurial.subrepo') testmod('mercurial.templatefilters') testmod('mercurial.templater')