Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 18:47:19 -0800] rev 36118
py3: cast decode() argument to system string
The actual types here may be mixed due to string literals
and variables from other modules. So a cast is necessary.
Differential Revision: https://phab.mercurial-scm.org/D2166
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:56:29 -0800] rev 36117
py3: avoid changing dictionary during iteration
dict.items() and friends are iterators/views in Python 3. You
aren't allowed to mutate the underlying dictionary when iterating
on these views. So iterate over a copy of things.
Differential Revision: https://phab.mercurial-scm.org/D2164
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:54:56 -0800] rev 36116
py3: use raw string for key in **kwargs
Otherwise Python 3 is unhappy. We only set a single key here.
So I don't think pycompat.strkwargs() is necessary.
Differential Revision: https://phab.mercurial-scm.org/D2163
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:50:45 -0800] rev 36115
py3: preserve chunks as an iterable of bytes
patch.diffstat() returns a bytes. util.chunkbuffer() expects an
iterable of bytes. Feeding it a single bytes instance on Python 3
will iterate the characters as integers. This blows up
util.chunkbuffer.
Differential Revision: https://phab.mercurial-scm.org/D2162
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:40:02 -0800] rev 36114
py3: use b'' for changegroup version literals
Test extensions aren't currently loaded with our custom module
importer.
# skip-blame b prefix
Differential Revision: https://phab.mercurial-scm.org/D2161
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:30:44 -0800] rev 36113
py3: use b'' in inline extension
# skip-blame b prefix
Differential Revision: https://phab.mercurial-scm.org/D2160
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:29:35 -0800] rev 36112
py3: use hex(hasher.digest())
.hexdigest() returns a system str. .digest() consistently returns
bytes.
Differential Revision: https://phab.mercurial-scm.org/D2159