merge: coerce nodes to bytes, not str
Differential Revision: https://phab.mercurial-scm.org/D2250
py3: whitelist more passing tests
I had some good success tonight with histedit
tests. test-histedit-fold.t is now low-hanging fruit: it is only
failing because the logic for setting environment variables in hook.py
is slightly busted. Specifically, hook.py line 142 should be making
sure it puts strings in the env dict, not bytes, to avoid b'' goo in
environment variables.
Differential Revision: https://phab.mercurial-scm.org/D2249
histedit: binascii.unhexlify (aka node.bin) throws new exception type on py3
Lucky for us, the exception type exists on 2.7, so we can include it
in the except block without any extra work.
Differential Revision: https://phab.mercurial-scm.org/D2244
treemanifest: add an optimized __nonzero__()
We use bool(manifest) in at least some places:
localrepo.py:1730
hgweb/webcommands.py:524
Since the treemanifest class doesn't define __nonzero__() (before this
patch), bool(manifest) will instead call __len__(), which can be slow
for treemanifests. This patch may make a noticeable difference in the
localrepo case above, but that only happens when committing a merge
and I haven't timed it.
Note that Durham already added a __nonzero__ implementation to
manifestdict in
b19291e5d506 (manifest: add __nonzero__ method,
2016-11-03).
Differential Revision: https://phab.mercurial-scm.org/D2232
tests: port fakemergerecord to python3
Differential Revision: https://phab.mercurial-scm.org/D2248
tests: add some b-prefixes on local script in test-histedit-arguments
# skip-blame its just more b prefixes and a file in binary mode
Differential Revision: https://phab.mercurial-scm.org/D2247
tests: add bytes prefixes to test-histedit-fold.t's local extension
# skip-blame b prefixes
Differential Revision: https://phab.mercurial-scm.org/D2246
histedit: fix silly bug that was unpacking a bytestr before writing it
I have this foggy notion that popbuffer() might have returned a list
in the past, but it doesn't anymore, and this was breaking on Python
3. As a bonus, it's probably a ton faster on Python 2 now.
Differential Revision: https://phab.mercurial-scm.org/D2243
py3: whitelist another 8 passing tests
Differential Revision: https://phab.mercurial-scm.org/D2242
histedit: modernize write of histedit-last-edit file
Differential Revision: https://phab.mercurial-scm.org/D2241