# HG changeset patch # User Yuya Nishihara # Date 1529138204 -32400 # Node ID aa9dd805234db54985950c32e2a3acc9e89251fa # Parent 62376d7b8859ecbc2fddd3a4f53ecfaa2ec79ee9 py3: fix loop over byte string in wireprotov1peer Before, it would always return [True]s on Python 3 because list(b"0") == [48]. diff -r 62376d7b8859 -r aa9dd805234d contrib/python3-whitelist --- a/contrib/python3-whitelist Sat Jun 16 17:04:03 2018 +0900 +++ b/contrib/python3-whitelist Sat Jun 16 17:36:44 2018 +0900 @@ -205,6 +205,7 @@ test-imports-checker.t test-incoming-outgoing.t test-inherit-mode.t +test-init.t test-issue1089.t test-issue1102.t test-issue1175.t @@ -227,6 +228,7 @@ test-journal-exists.t test-journal-share.t test-journal.t +test-known.t test-largefiles-cache.t test-largefiles-misc.t test-largefiles-small-disk.t @@ -450,9 +452,11 @@ test-sparse-verbose-json.t test-sparse.t test-split.t +test-ssh-bundle1.t test-ssh-clone-r.t test-ssh-proto-unbundle.t test-ssh-proto.t +test-ssh.t test-sshserver.py test-stack.t test-status-inprocess.py diff -r 62376d7b8859 -r aa9dd805234d mercurial/wireprotov1peer.py --- a/mercurial/wireprotov1peer.py Sat Jun 16 17:04:03 2018 +0900 +++ b/mercurial/wireprotov1peer.py Sat Jun 16 17:36:44 2018 +0900 @@ -355,7 +355,7 @@ yield {'nodes': wireprototypes.encodelist(nodes)}, f d = f.value try: - yield [bool(int(b)) for b in d] + yield [bool(int(b)) for b in pycompat.iterbytestr(d)] except ValueError: self._abort(error.ResponseError(_("unexpected response:"), d))