Mon, 12 Feb 2018 23:50:58 -0500 convert: open all files in binary mode
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 23:50:58 -0500] rev 36170
convert: open all files in binary mode Differential Revision: https://phab.mercurial-scm.org/D2220
Mon, 12 Feb 2018 22:29:36 -0500 py3: whitelist another 11 passing tests
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 22:29:36 -0500] rev 36169
py3: whitelist another 11 passing tests Differential Revision: https://phab.mercurial-scm.org/D2213
Mon, 12 Feb 2018 20:44:06 -0500 util: convert traceback-related sysstrs to sysbytes in getstackframes
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:44:06 -0500] rev 36168
util: convert traceback-related sysstrs to sysbytes in getstackframes With this change, test-devel-warnings.t passes except for differences in how ProgrammingError is formatted and one mysterious traceback inside of transaction.__del__. Differential Revision: https://phab.mercurial-scm.org/D2212
Mon, 12 Feb 2018 20:43:33 -0500 util: format line number of stack trace using %d
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:43:33 -0500] rev 36167
util: format line number of stack trace using %d Required on Python 3, functional on Python 2. Differential Revision: https://phab.mercurial-scm.org/D2211
Mon, 12 Feb 2018 20:43:05 -0500 util: call warnings.warn() with a sysstr in nouideprecwarn
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:43:05 -0500] rev 36166
util: call warnings.warn() with a sysstr in nouideprecwarn This preserves nouideprecwarn wanting a bytes, which is consistent with the rest of hg. Differential Revision: https://phab.mercurial-scm.org/D2210
Mon, 12 Feb 2018 20:42:28 -0500 ui: convert stack traces to sysbytes before logging
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:42:28 -0500] rev 36165
ui: convert stack traces to sysbytes before logging They're coming back as unicodes, so sysbytes seems like the best we can do. This is like D2171 and D2172, but those fail on Python 2.7.5 (seriously!), so this is my version of the same change. I actually wrote this before reviewing those, then discarded it, then came back to it after finding out 2.7.5 is a silly place. Differential Revision: https://phab.mercurial-scm.org/D2209
Mon, 12 Feb 2018 20:41:47 -0500 ui: use pycompat.bytestr() to get a bytes-repr of config default
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:41:47 -0500] rev 36164
ui: use pycompat.bytestr() to get a bytes-repr of config default We don't know what type we'll get here, so we need something that'll behave like a repr without returning a unicode. Differential Revision: https://phab.mercurial-scm.org/D2208
Mon, 12 Feb 2018 20:39:48 -0500 tests: add tons of b prefixes in test-devel-warnings.t
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:39:48 -0500] rev 36163
tests: add tons of b prefixes in test-devel-warnings.t # skip-blame because it's just b prefixes Differential Revision: https://phab.mercurial-scm.org/D2207
Sun, 11 Feb 2018 19:43:43 -0800 py3: convert traceback representation to bytes when logging
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 19:43:43 -0800] rev 36162
py3: convert traceback representation to bytes when logging Python's APIs should return a system string. We want to use bytes for logging. So convert the traceback to bytes before sending it to the logger. Differential Revision: https://phab.mercurial-scm.org/D2176
Sun, 11 Feb 2018 19:26:53 -0800 py3: convert context to bytes instead of str
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 19:26:53 -0800] rev 36161
py3: convert context to bytes instead of str This yields identical behavior on Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D2174
Sun, 11 Feb 2018 19:24:27 -0800 py3: add missing b'' literal to sshprotoext.py
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 19:24:27 -0800] rev 36160
py3: add missing b'' literal to sshprotoext.py Everywhere else in this file uses b''. I must have missed a line when I wrote this code a few days ago. # skip-blame b prefix Differential Revision: https://phab.mercurial-scm.org/D2173
Sun, 11 Feb 2018 19:11:17 -0800 py3: make dummyssh compatible with Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 19:11:17 -0800] rev 36159
py3: make dummyssh compatible with Python 3 Required encoding a str to bytes and writing bytes to a file descriptor. Differential Revision: https://phab.mercurial-scm.org/D2170
Sun, 11 Feb 2018 18:58:45 -0800 mail: import email.utils not email.Utils
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 18:58:45 -0800] rev 36158
mail: import email.utils not email.Utils email.Utils was renamed to email.utils in Python 2.5. But it appears at some point before Python 2.7 (possibly 2.5) email.Utils was aliased to the new home. So email.utils should be safe for all versions of Python we support. Differential Revision: https://phab.mercurial-scm.org/D2168
Sun, 11 Feb 2018 18:50:24 -0800 py3: cast character set to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 18:50:24 -0800] rev 36157
py3: cast character set to bytes The returned value from this function is eventually fed into email.charset.Charset.__init__. However, the standard library appears to handle both string types in Python 2 and 3. So there shouldn't be any problem returning a bytes here. Differential Revision: https://phab.mercurial-scm.org/D2167
Sun, 11 Feb 2018 18:47:19 -0800 py3: cast decode() argument to system string
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 18:47:19 -0800] rev 36156
py3: cast decode() argument to system string The actual types here may be mixed due to string literals and variables from other modules. So a cast is necessary. Differential Revision: https://phab.mercurial-scm.org/D2166
Sun, 11 Feb 2018 16:56:29 -0800 py3: avoid changing dictionary during iteration
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 16:56:29 -0800] rev 36155
py3: avoid changing dictionary during iteration dict.items() and friends are iterators/views in Python 3. You aren't allowed to mutate the underlying dictionary when iterating on these views. So iterate over a copy of things. Differential Revision: https://phab.mercurial-scm.org/D2164
(0) -30000 -10000 -3000 -1000 -300 -100 -16 +16 +100 +300 +1000 +3000 +10000 tip