Boris Feld <boris.feld@octobus.net> [Fri, 25 Jan 2019 14:53:19 -0500] rev 41436
perf: move cache clearing in the `setup` step of `perfheads`
The cache clearing is pretty fast, but this seems more "correct".
Boris Feld <boris.feld@octobus.net> [Fri, 25 Jan 2019 18:22:02 -0500] rev 41435
revlog: document cext oddities in terms of object/caches
This clarify why we just call clearcaches on a single object.
Boris Feld <boris.feld@octobus.net> [Fri, 25 Jan 2019 14:52:31 -0500] rev 41434
perf: document perfheads
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 22:32:09 -0500] rev 41433
py3: stabilize the output of lfs commandserver tests
The print() statements were being output at the very end, so write to the same
stdout sink as runcommand, and explicitly flush.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 20:58:18 -0500] rev 41432
py3: conditionalize some LFS test output
I'm not sure why the one stackframe is py2 only, but that seems harmless. The
remaining failure is LfsCorruptionError printing the fully qualified name, as
well as b'' around its message.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 20:50:52 -0500] rev 41431
lfs: strip the response headers from the Batch API before printing
For reasons unknown, py3 is adding an extra '\n' before the headers print out.
This makes the output the same as py2.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 18:34:17 -0500] rev 41430
py3: force hgweb.server error log to internally write unicode
Otherwise, there's a lot of py2/py3 divergence in the LFS tests because of the
"HG error" lines picking up a b'' prefix. wsgicgi.py uses procutil.stderr, so I
assume the input was meant to be bytes.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 17:48:15 -0500] rev 41429
py3: byteify the decoded JSON responses upon receipt in the LFS blobstore
It got too confusing juggling r'' vs b'' across several functions.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 18:05:17 -0500] rev 41428
hgweb: ensure Content-Length and Content-Type are not promoted to HTTP_ on py3
In stabilizing test-lfs-serve-access.t for py3, the server started asserting on
blob upload:
Environment should not have the key: HTTP_CONTENT_LENGTH (use CONTENT_LENGTH instead)
It could be avoided by explicitly setting the Content-Length header on the
client side. I didn't go back to py2, but printing the original header here in
py37 revealed 'Content-length' when sent to the error log.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 15:42:55 -0500] rev 41427
py3: raw stringify various JSON and HTTP headers in the LFS blobstore module
This is (almost?) entirely from Augie's work. I'm a bit surprised that the JSON
data is being encoded with ASCII via `pycompat.bytesurl()`- I would have thought
UTF-8.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 15:19:28 -0500] rev 41426
py3: byteify the LFS blobstore module
This is almost entirely b'' prefixing, with a couple of exceptions forced to
bytes. Much of this is also borrowed from Augie's code. There's an
HTTPError.read() that I flagged that I assume needs to be converted to bytes,
but I can't find confirmation.
Handling the deserialized JSON object over several functions made r'' vs b''
accesses confusing, so this assumes that the JSON object will be converted to
bytes immediately. That will be done in the following commits, so it's not
buried in these trivial changes.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 00:50:39 -0500] rev 41425
py3: raw stringify various things in the LFS server module
Some of this is based on code written by Augie. I'm slightly unsure if these
are the correct pycompat bytes <-> str conversion methods.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 00:36:56 -0500] rev 41424
py3: add b'' prefixes to the LFS server module
There are a ton of these changes in the blobstore, as well as r'' prefixing. So
separating these out hopefully makes review easier.
# skip-blame for b'' prefixing
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Jan 2019 00:26:17 -0500] rev 41423
py3: add b'' and r'' prefixes to LFS tests
Augie Fackler <augie@google.com> [Sun, 27 Jan 2019 20:22:07 -0500] rev 41422
py3: more tests from the ratchet
Differential Revision: https://phab.mercurial-scm.org/D5730
Yuya Nishihara <yuya@tcha.org> [Sat, 26 Jan 2019 17:53:03 +0900] rev 41421
dispatch: unify handler of IOError and OSError
These exceptions were merged in Python 3.
Yuya Nishihara <yuya@tcha.org> [Sat, 26 Jan 2019 17:51:55 +0900] rev 41420
dispatch: quote filename in IOError as well
It's explicitly added for OSError at
720308f741cb "dispatch: show empty
filename in OSError aborts". Let's do the same for IOError.
Yuya Nishihara <yuya@tcha.org> [Sat, 26 Jan 2019 17:44:07 +0900] rev 41419
dispatch: add inline comment about possible IOError subtypes
It's hard to tell which "if" would handle which exception.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 16:53:17 -0800] rev 41418
convert: print exception message directly
Otherwise the default repr() implementation will b'' prefix the
returned str on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5729
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 16:45:25 -0800] rev 41417
crecord: always return a str from uihunk.__repr__
Otherwise Python 3 complains about it returning bytes.
Differential Revision: https://phab.mercurial-scm.org/D5728
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 15:52:37 -0800] rev 41416
tests: handles bytes/str mismatch in test-commit-interface-curses.t
This fixes various test failures on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5727
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 14:16:34 -0800] rev 41415
githelp: format with %d if an integer
Python 3 doesn't allow us to format an int with %s like Python 2
did. So handle that.
Differential Revision: https://phab.mercurial-scm.org/D5726
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 14:14:44 -0800] rev 41414
githelp: make argument parsing more compatible with Python 3
There were various mixing of str and bytes in here. This change
fixes most of the failures in test-githelp.t.
Differential Revision: https://phab.mercurial-scm.org/D5725
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 14:08:35 -0800] rev 41413
tests: add b'' prefixes to flagprocessorext.py
Otherwise a part of test-flavprocessor.t fails due to not
setting the proper key.
Differential Revision: https://phab.mercurial-scm.org/D5724