# HG changeset patch # User Yuya Nishihara # Date 2017-09-03 06:32:45 # Node ID dfd009e5f9f20b8190206efe422bd85fd0a6072e # Parent a48ad118c5583fa3a637139d9d63c804b43b6b28 py3: iterate bytes as a byte string in dagparser.py diff --git a/mercurial/dagparser.py b/mercurial/dagparser.py --- a/mercurial/dagparser.py +++ b/mercurial/dagparser.py @@ -181,7 +181,7 @@ def parsedag(desc): else: return labels[ref] - chiter = (c for c in desc) + chiter = pycompat.iterbytestr(desc) def nextch(): return next(chiter, '\0') diff --git a/tests/test-doctest.py b/tests/test-doctest.py --- a/tests/test-doctest.py +++ b/tests/test-doctest.py @@ -48,8 +48,7 @@ testmod('mercurial.changelog') testmod('mercurial.color') testmod('mercurial.config') testmod('mercurial.context') -testmod('mercurial.dagparser', optionflags=doctest.NORMALIZE_WHITESPACE, - py3=False) # py3: use of str() +testmod('mercurial.dagparser', optionflags=doctest.NORMALIZE_WHITESPACE) testmod('mercurial.dispatch') testmod('mercurial.encoding', py3=False) # py3: multiple encoding issues testmod('mercurial.formatter', py3=False) # py3: write bytes to stdout