py3: use mail.parsebytes() in gnuarch catlog parser
We drop 'catlogparser' attribute now unused.
tests: handle Message-Id line wrapping in test-notify-changegroup.t
This fixes this test on Python 3 with a long hostname. See changeset
4128ffba4431 for details.
py3: define and use json.loads polyfill
Python 3.5's json.loads() requires a str. Only Python 3.6+
supports passing a bytes or bytearray.
This commit implements a json.loads() polyfill on Python 3.5
so that we can use bytes. The added function to detect encodings
comes verbatim from Python 3.7.
contrib: require Python 3.6 for byteify-strings.py
This script makes use of `token.COMMENT`, which apparently
isn't present until Python 3.6. So make the script and its
test conditional on Python 3.6.
demandimportpy3: only use lazy extension loader on Python 3.6+
There was an inline comment denoting a bug in the lazy extension
loader on Python 3.5 which prevents it from working there. But the
code was not conditional on the Python version.
The result of this was a myriad of failures on Python 3.5 due to
getattr() and friends not working on lazy extension modules.
By making extension modules non-lazy on Python 3.5, we reduce the
number of test failures from 48 to 22 on that Python version.
ui: flush before prompting for input with readline
I was using `hg absorb` with Python 3 and noticed that the
prompt was appearing without any output about what would be
done. After I answered the prompt, the output was printed
to stdout.
This appears to be a buffering difference between Python 2
and Python 3.
To work around it, this commit adds an explicit flush() before
calling the raw input function when readline is used.
histedit: restore hex nodeids to be 12 digits long
I accidentally switched from 12 digits to 40 digits while making the
code py3-compatible. Thanks to Yuya for noticing.
Differential Revision: https://phab.mercurial-scm.org/D7200