Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 17:07:18 -0500] rev 36689
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
# skip-blame just b prefixes
Differential Revision: https://phab.mercurial-scm.org/D2610
Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 16:38:17 -0500] rev 36688
hghave: fix up clang-libfuzzer regex to be bytes
Fixes this check on Python 3.
# skip-blame just a b prefix
Differential Revision: https://phab.mercurial-scm.org/D2607
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 15:41:12 -0500] rev 36687
py3: accept both unicode and byte strings as filename carried by IOError
Follows up 77f98867538f. We could assume there's no bytes filename in our
codebase, but it's probably better to not raise UnicodeError because of
a unicode filename.
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 15:33:52 -0500] rev 36686
py3: back out c77c925987d7 to store bytes filename in IOError
Appears that this is how Python 3 works.
Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 14:57:23 -0500] rev 36685
largefiles: headers and values need to be sysstrs, add r prefixes
# skip-blame just some r prefixes
Differential Revision: https://phab.mercurial-scm.org/D2606
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Mar 2018 11:26:30 -0500] rev 36684
cext: accept arguments as Py_buffer
The s*/y* value formatters receive a Py_buffer instead of a char *.
This value format is more flexible in the types that it allows.
We change bdiff() to accept any object that conforms to the buffer
protocol. We validate the buffers are contiguous and have a single
dimension.
This allows memoryview instances to be handled by the function, so
we revert a recent change to cast arguments to bytes before calling
this function.
Differential Revision: https://phab.mercurial-scm.org/D2587
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Mar 2018 11:19:43 -0500] rev 36683
cext: refactor cleanup code in bdiff()
A future commit will need to introduce additional cleanup code.
We refactor the cleanup code to check NULL before calling free().
We also initialize these variables as NULL.
We set the out of memory exception explicitly, so we can just return
result.
Differential Revision: https://phab.mercurial-scm.org/D2586
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Mar 2018 07:13:33 +0530] rev 36682
py3: use pycompat.bytestr() to convert error messages to bytes
Differential Revision: https://phab.mercurial-scm.org/D2535
Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 14:28:51 -0500] rev 36681
url: more bytes/unicodes fussing in url.py around auth handling
Once again, these methods are a little annoying to handle because they
can get unicodes or bytes depending on who's calling. I think we can
probably clean this up a TON once we can run something like pytype and
do typechecking of our Python, but until then this is going to be the
easy way out. This fixes test-http-bundle1.t.
Differential Revision: https://phab.mercurial-scm.org/D2599
Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 14:24:21 -0500] rev 36680
httpconnection: convert url to bytes in readauthforuri
This method is sometimes called by the stdlib, so we just need to
accept both bytes and unicodes here. Awesome.
Differential Revision: https://phab.mercurial-scm.org/D2598
Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 14:44:41 -0500] rev 36679
tests: prevent enormous output spew in test-lfs-largefiles.t
This test currently fails on Python 3, but in a super-slow way. Adding
this `head` invocation costs us nothing, but will prevent failures in
this area from being super expensive.
Differential Revision: https://phab.mercurial-scm.org/D2600
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 12:23:03 -0500] rev 36678
py3: fix formatting of path-auditing errors
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 12:36:05 -0500] rev 36677
py3: make os.curdir a bytes
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 12:34:35 -0500] rev 36676
py3: make os.pardir a bytes