Fri, 10 Aug 2018 00:12:55 -0400 parser: replace bespoke _brepr with stringutil.pprint
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 00:12:55 -0400] rev 39087
parser: replace bespoke _brepr with stringutil.pprint Differential Revision: https://phab.mercurial-scm.org/D4242
Fri, 10 Aug 2018 02:06:46 -0400 mq: use stringutil.pprint instead of pycompat.byterepr
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:06:46 -0400] rev 39086
mq: use stringutil.pprint instead of pycompat.byterepr Resolves a few output changes on Python 3 in test-mq.t, and gets us two new passing tests. Differential Revision: https://phab.mercurial-scm.org/D4248
Thu, 09 Aug 2018 13:27:05 -0400 tests: remove expected output of test-parseindex2.py
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:27:05 -0400] rev 39085
tests: remove expected output of test-parseindex2.py Everything uses unittest idioms now, so this can go away. Differential Revision: https://phab.mercurial-scm.org/D4185
Thu, 09 Aug 2018 13:13:16 -0400 parsers: adjust pure-python version to mimic a3dacabd476b
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:13:16 -0400] rev 39084
parsers: adjust pure-python version to mimic a3dacabd476b This was caught by the tests, to my surprise. I'll also follow up with a test of the index[-1] behavior so we can be sure that remains consistent, as I think that currently has no coverage. Differential Revision: https://phab.mercurial-scm.org/D4183
Thu, 09 Aug 2018 13:34:33 -0400 tests: restore Python 3 compat in test-parseindex2.py
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:34:33 -0400] rev 39083
tests: restore Python 3 compat in test-parseindex2.py I think this was previously getting lucky in Python 3, and would have stacktraced if something failed. Now that failure messages are eagerly computed, this turned into a problem. Differential Revision: https://phab.mercurial-scm.org/D4182
Thu, 09 Aug 2018 13:26:28 -0400 tests: port remaining bits of test-parseindex2 to unittest asserts
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:26:28 -0400] rev 39082
tests: port remaining bits of test-parseindex2 to unittest asserts Differential Revision: https://phab.mercurial-scm.org/D4181
Thu, 09 Aug 2018 23:13:56 -0400 tests: allow more detailed error message from re.compile
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:13:56 -0400] rev 39081
tests: allow more detailed error message from re.compile test-grep.t now passes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4240
Thu, 09 Aug 2018 23:13:35 -0400 grep: include format string in columns list
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:13:35 -0400] rev 39080
grep: include format string in columns list This lets us correctly use %d as needed. Differential Revision: https://phab.mercurial-scm.org/D4239
Thu, 09 Aug 2018 23:13:01 -0400 grep: coerce username to bytestr, not str
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:13:01 -0400] rev 39079
grep: coerce username to bytestr, not str Differential Revision: https://phab.mercurial-scm.org/D4238
Thu, 09 Aug 2018 23:12:44 -0400 grep: difflib sequencematcher opcodes are native strs
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:12:44 -0400] rev 39078
grep: difflib sequencematcher opcodes are native strs Differential Revision: https://phab.mercurial-scm.org/D4237
Thu, 09 Aug 2018 21:59:32 -0400 tests: allow for a bonus newline in base64'd email payload
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:59:32 -0400] rev 39077
tests: allow for a bonus newline in base64'd email payload Python 3 adds this newline, which is harmless. test-patchbomb.t now passes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4234
Thu, 09 Aug 2018 21:58:43 -0400 mail: be more cautious about bytes vs str for py3 compat
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:58:43 -0400] rev 39076
mail: be more cautious about bytes vs str for py3 compat It's suboptimal that we get a bytes on 2 and a unicode on 3, but it's easy to work with and I'm disinclined to change anything unless we start using some sort of type inferencer. Differential Revision: https://phab.mercurial-scm.org/D4233
Thu, 09 Aug 2018 21:57:46 -0400 patchbomb: use native strings when determining attachment disposition
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:57:46 -0400] rev 39075
patchbomb: use native strings when determining attachment disposition Differential Revision: https://phab.mercurial-scm.org/D4232
Thu, 09 Aug 2018 21:04:15 -0400 mail: always fall back to iso-8859-1 if us-ascii won't work (BC)
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:04:15 -0400] rev 39074
mail: always fall back to iso-8859-1 if us-ascii won't work (BC) It looks like this was a well-intentioned backwards compat hack for previewing the output of `hg email` in a stable way. Unfortunately I think this hack's time has come, because Python 3 does a much better job of ensuring it actually emits *valid* email messages. In particular, Python 2 would blindly trust us that the bytes we handed it were valid for the encoding we claimed, but Python 3 has some more sniff-tests that we end up failing. As a result, if we're going to print an email to the terminal, try us-ascii first, but if that fails go straight to iso-8859-1 which should be reasonably readable for ascii-compatible patch bodies. This *will* be a breaking change for ascii-incompatible textual patch content, but I don't think that's avoidable if we want to continue using the email library from the stdlib. .. bc:: Emails from the patchbomb extension will always be printed as though they are iso-8859-1 if they're not valid us-ascii. Previously, previewed emails were always claimed to be us-ascii and might contain invalid byte sequences. Differential Revision: https://phab.mercurial-scm.org/D4231
Thu, 09 Aug 2018 20:57:27 -0400 tests: put some Python 3 polish on inline Python invocations
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 20:57:27 -0400] rev 39073
tests: put some Python 3 polish on inline Python invocations A couple of these became inline python sessions because they got more involved, and one of them is super-annoying and writes directly to sys.stdout.buffer because I just couldn't make it work any other way. Differential Revision: https://phab.mercurial-scm.org/D4230
Thu, 09 Aug 2018 19:39:33 -0400 patchbomb: don't unintentionally duplicate headers
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 19:39:33 -0400] rev 39072
patchbomb: don't unintentionally duplicate headers This dict-like of headers is only mostly dict-like: if you set a key that already exists, you it appends another value, rather than replacing the one that was already present. This fixes test-patchbomb-bookmark.t on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4229
(0) -30000 -10000 -3000 -1000 -300 -100 -16 +16 +100 +300 +1000 +3000 +10000 tip