Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 17:07:07 -0400] rev 37592
tests: glob away fqdn wherever we print it
These localhost instances are actually from a getfqdn call, which
means on some of my test systems it comes out as localhost.localdomain
or
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. I'm
tired of this, so let's glob it away.
Differential Revision: https://phab.mercurial-scm.org/D3251
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 16:26:40 -0400] rev 37591
hgweb: use native strings when interfacing with stdlib headers
We're still parsing the stdlib-provided headers here, so we need to
tread carefully and use native strings. Yuck.
Differential Revision: https://phab.mercurial-scm.org/D3250
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 16:10:02 -0400] rev 37590
wireprotoserver: headers are bytes for us internally, use bytes
This re-fixes test-pull-http.t on Python 3. Probably many others as well.
Differential Revision: https://phab.mercurial-scm.org/D3249
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 16:09:23 -0400] rev 37589
hgweb: put response headers back into str for Python 3
This fixes a lot of hanging tests on Python 3, because
"Content-Length" was getting sent as "b'Content-Length'" (yes, really)
and then clients would expect a close-is-end body instead of counting
off a certain number of bytes.
Differential Revision: https://phab.mercurial-scm.org/D3248
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 14:57:11 -0400] rev 37588
tests: load showstack in test-pull-http.t so network hangs are easier to find
This also gives us some minimal "it loads" coverage on showstack,
which I rather like. showstack doesn't work on Windows per mbarbison,
so it's disabled there.
I added this in service of debugging a hang introduced on Python 3 by
revision
a88d68dc3ee8. I'm still not sure what the problem there is,
but this at least gives us a little bit of a chance to figure out
what's going on.
Differential Revision: https://phab.mercurial-scm.org/D3247
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 14:39:49 -0400] rev 37587
keepalive: rewrite readinto() to not use read()
It turns out http.client on Python 3 sometimes uses readinto() in the
implementation of read(). Unfortunately, Python 2 doesn't have a
readinto() in httplib's client, so we have to support both codepaths.
Subclassing is bad, folks.
Differential Revision: https://phab.mercurial-scm.org/D3246
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 17:22:59 +0530] rev 37586
py3: use bytes() instead of str() on util.url()
We internally deal with bytes and anything as string breaks things.
Differential Revision: https://phab.mercurial-scm.org/D3285
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 17:21:56 +0530] rev 37585
py3: use stringutil.forcebytestr() to convert error messages to bytes
Differential Revision: https://phab.mercurial-scm.org/D3284
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 08:06:39 -0700] rev 37584
py3: suppress the return value of write() in tests/test-subrepo-missing.t
write() on Python 3 returns a value whereas does not return anything on Python 2.
So we need to supress the value.
Differential Revision: https://phab.mercurial-scm.org/D3283
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 16:52:32 +0530] rev 37583
py3: add b'' prefixes in tests/test-linerange.py
This makes the test pass on Python 3.
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D3282
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 15:23:36 +0530] rev 37582
py3: add b'' prefix to make the regex bytes
# skip-blame because just b'' prefix
Differential Revision: https://phab.mercurial-scm.org/D3281
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 15:22:56 +0530] rev 37581
py3: use b'%d' to convert int to bytes instead of str()
Differential Revision: https://phab.mercurial-scm.org/D3280
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 15:03:15 +0530] rev 37580
py3: use print as a function in test-convert-git.t
Differential Revision: https://phab.mercurial-scm.org/D3278
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 14:30:37 +0530] rev 37579
py3: use '%d' for integers instead of '%s'
Differential Revision: https://phab.mercurial-scm.org/D3277
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 14:28:08 +0530] rev 37578
py3: prevent transformer from adding b'' by adding r'' prefix
These are cases where we need to use str, therefore we add r'' prefix.
# skip-blame because just r'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D3276
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 12 Apr 2018 14:26:31 +0530] rev 37577
py3: use pycompat.{strkwargs|byteskwargs} in infinitepush
Differential Revision: https://phab.mercurial-scm.org/D3275
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 11 Apr 2018 22:36:16 +0530] rev 37576
py3: make sure we open file in bytes mode
Differential Revision: https://phab.mercurial-scm.org/D3274
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 01:37:25 +0900] rev 37575
diffhelpers: be more tolerant for stripped empty lines of CRLF ending
Exchange. It appears to trim lines containing only whitespace as well as
converting LF to CRLF.
Yuya Nishihara <yuya@tcha.org> [Mon, 09 Apr 2018 21:08:52 +0900] rev 37574
diffhelpers: make return value of testhunk() more Pythonic
It's no longer C.
Yuya Nishihara <yuya@tcha.org> [Mon, 09 Apr 2018 21:06:46 +0900] rev 37573
patch: error out if reached to EOF while reading hunk
This was where out-of-bounds read occurred in old C extension.
Yuya Nishihara <yuya@tcha.org> [Mon, 09 Apr 2018 20:55:05 +0900] rev 37572
diffhelpers: remove unused return value from fixnewline() and addlines()
Yuya Nishihara <yuya@tcha.org> [Mon, 09 Apr 2018 20:54:00 +0900] rev 37571
diffhelpers: move out of pure package
Yuya Nishihara <yuya@tcha.org> [Mon, 09 Apr 2018 20:52:54 +0900] rev 37570
diffhelpers: naming and whitespace cleanup
Yuya Nishihara <yuya@tcha.org> [Mon, 09 Apr 2018 20:51:23 +0900] rev 37569
diffhelpers: remove C implementation in favor of pure Python version