Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:36:51 -0800] rev 41489
remotefilelog: cast division result to an int
Otherwise mid is a float and this confuses __slice__ on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5760
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:34:47 -0800] rev 41488
tests: cast division result to int
Otherwise it is a float on Python 3 and code later compares about
casting a float to an int.
Differential Revision: https://phab.mercurial-scm.org/D5759
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:30:01 -0800] rev 41487
tests: various Python 3 ports for test-remotefilelog-datapack.py
Use bytes I/O. Use byteschr(). Convert temporary path to bytes.
Differential Revision: https://phab.mercurial-scm.org/D5758
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:22:42 -0800] rev 41486
tests: use items() in test-remotefilelog-datapack.py
Performance doesn't matter in tests. iteritems() doesn't exist
in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5757
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:21:43 -0800] rev 41485
tests: use bytes and %d formatting in test-remotefilelog-datapack.py
There were numerous failures on Python 3 due to str/bytes mismatch
and '%s' not working for ints.
Differential Revision: https://phab.mercurial-scm.org/D5756
Boris Feld <boris.feld@octobus.net> [Mon, 28 Jan 2019 03:41:33 -0500] rev 41484
perf: add a --[no-]clear-caches option to `perfnodemap`
The option is useful to look at pure lookup performance on a warm data
structure.
Boris Feld <boris.feld@octobus.net> [Fri, 25 Jan 2019 18:55:45 -0500] rev 41483
perf: add a perfnodemap command
The command focus on timing of the nodemap object itself.
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:07:20 -0800] rev 41482
wireprotov1server: use binascii.unhexlify
The "hex" codec doesn't exist in Python 3. We could use
`codecs.decode(h, 'hex_codec')`. But `binascii.unhexlify()`
exists and should work the same on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D5755
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 12:55:44 -0800] rev 41481
tests: conditionalize test-http-bad-server.t for Python 3.5
It appears that Python 3 introduced output buffering in the HTTP
response stack. And Python 3.6 switched from sock.makefile().write()
to sock.sendall().
So, we need to conditionalize test-http-bad-server.t to account
for the difference in behavior between Python 3.5 and 3.6.
Differential Revision: https://phab.mercurial-scm.org/D5754
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 12:12:25 -0800] rev 41480
tests: log sendall() operations and port test-http-bad-server.t
Python 3's HTTP server layer buffers output and uses sendall()
instead of write(). In order to make test-http-bad-server.t pass
on Python 3, we needed to teach our socket proxy to log sendall()
events and to abort future sends if we reached our send limit.
The tests using `tail` were difficult to port with inline output
conditionals since the number of lines varied. So we now use
`#if py3` for these tests.
test-http-bad-server.t now passes on Python 3.6 and 3.7 on at
least Linux. However, it does not yet pass on Python 3.5 because
of low-level differences to how the HTTP server is implemented.
Differential Revision: https://phab.mercurial-scm.org/D5753