Mon, 12 Feb 2018 10:29:02 -0500 pathencode: allow clang-format oversight
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:29:02 -0500] rev 36056
pathencode: allow clang-format oversight Only had to add two trailing commas to make the file format acceptably! Differential Revision: https://phab.mercurial-scm.org/D2178
Mon, 12 Feb 2018 10:21:44 -0500 bdiff: add to clang-format oversight
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:21:44 -0500] rev 36055
bdiff: add to clang-format oversight This file didn't require any complex fixes, so we may as well enable clang-format while I'm editing it. Differential Revision: https://phab.mercurial-scm.org/D2177
Sun, 11 Feb 2018 20:59:35 -0500 test-merge-tools: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 20:59:35 -0500] rev 36054
test-merge-tools: stabilize for Windows This masks the Windows argument parsing insanity[1], so it needs a bit of explanation. (The security reference in the footnote is probably useful to keep in mind if we ever whitelist certain in-repo config settings.) 9037c29e9f53 introduced tests that were failing on Windows with an unbalanced double quote[2]. What ends up happening here is util.shellquote() is double quoting the file path, but the shell script is placing this ->": "<- right next to it. So cmd.exe gets launched with 'lb:base": ""c:\...\f~base.xyz"', which got interpreted as 'lb:base: "c:\...\f~base.xyz'. If the test is adjusted to quote like "lb:$labelbase: $base", then MSYS runs interference and strips the '\' characters. I was able to get the expected result by dropping the quotes from '": "', and changing the space to underscore. But since we need to glob away the C: part anyway, just glob away the quote and leave the test unchanged. [1] https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ [2] https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/441/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio
Sun, 11 Feb 2018 17:17:05 +0530 py3: replace file() with open() in test-convert-hg-source.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:17:05 +0530] rev 36053
py3: replace file() with open() in test-convert-hg-source.t file() is not present in Python 3. It also makes sure we read and write in bytes mode on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2132
Sun, 11 Feb 2018 17:15:45 +0530 py3: replace file() with open() in test-encoding-align.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:15:45 +0530] rev 36052
py3: replace file() with open() in test-encoding-align.t file() is not present in Python 3. This patch also makes sure we write bytes in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2131
Sun, 11 Feb 2018 17:14:59 +0530 py3: replace file() with open() in test-encoding.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:14:59 +0530] rev 36051
py3: replace file() with open() in test-encoding.t file() is not present in Python 3. This also makes sure we write things in bytes mode in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2130
Sun, 11 Feb 2018 16:17:17 +0530 py3: make sure we return str from __repr__
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 16:17:17 +0530] rev 36050
py3: make sure we return str from __repr__ Differential Revision: https://phab.mercurial-scm.org/D2109
Sun, 11 Feb 2018 14:30:44 -0800 py3: check for bytes instead of str in hg.share()
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:30:44 -0800] rev 36049
py3: check for bytes instead of str in hg.share() Differential Revision: https://phab.mercurial-scm.org/D2151
Sun, 11 Feb 2018 14:29:30 -0800 py3: port metaedit extension to Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:29:30 -0800] rev 36048
py3: port metaedit extension to Python 3 Without these changes, this extension is responsible for a test of test failures. Differential Revision: https://phab.mercurial-scm.org/D2150
Sun, 11 Feb 2018 14:25:10 -0800 py3: pass system string to email.message.Message.set_type()
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:25:10 -0800] rev 36047
py3: pass system string to email.message.Message.set_type() Python 3 insists the type is a str. Differential Revision: https://phab.mercurial-scm.org/D2149
Sun, 11 Feb 2018 14:18:27 -0800 py3: open temporary file in binary mode
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:18:27 -0800] rev 36046
py3: open temporary file in binary mode Otherwise things fail later when we write bytes to the handle. Differential Revision: https://phab.mercurial-scm.org/D2148
Sun, 11 Feb 2018 14:17:23 -0800 py3: use email parser that operates on bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:17:23 -0800] rev 36045
py3: use email parser that operates on bytes email.parser.Parser() operates on str in both Python 2 and 3. Python 3.2 introduced the email.parser.BytesParser(), which works like Parser except it accepts bytes. We implement the pycompat helper as a function so we lazily import the "email" module. Differential Revision: https://phab.mercurial-scm.org/D2147
Sun, 11 Feb 2018 13:32:18 -0800 py3: port ext-phase-report.py extension
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:32:18 -0800] rev 36044
py3: port ext-phase-report.py extension The custom module importer doesn't run on Python files in the tests directory. So we need the source to be compatible with both Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D2145
Sun, 11 Feb 2018 13:23:26 -0800 py3: more robustly cast UUID to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:23:26 -0800] rev 36043
py3: more robustly cast UUID to bytes The UUID type only has __str__ implemented. So we need to cast to bytes on Python 3. We need an actual bytes instance here (bytestr won't do) because the re.escape() later iterates over characters and characters need to behave like ints, not bytes instances of length 1. Differential Revision: https://phab.mercurial-scm.org/D2144
Sun, 11 Feb 2018 13:09:16 -0800 py3: use bytes() to cast context instances
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:09:16 -0800] rev 36042
py3: use bytes() to cast context instances __str__ and __bytes__ are both implemented on context types. However, __str__ behaves differently on Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D2143
Sun, 11 Feb 2018 13:06:01 -0800 py3: convert __doc__ to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:06:01 -0800] rev 36041
py3: convert __doc__ to bytes Differential Revision: https://phab.mercurial-scm.org/D2142
Sun, 11 Feb 2018 14:21:44 -0800 py3: cast repr() result to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:21:44 -0800] rev 36040
py3: cast repr() result to bytes Differential Revision: https://phab.mercurial-scm.org/D2141
Sun, 11 Feb 2018 13:00:00 -0800 py3: fix file i/o in test-status.t
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:00:00 -0800] rev 36039
py3: fix file i/o in test-status.t Use raw string literal for open() mode and pass the proper data type to write(). Differential Revision: https://phab.mercurial-scm.org/D2140
Sun, 11 Feb 2018 12:55:50 -0800 py3: pass system string to socket.getservbyname
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 12:55:50 -0800] rev 36038
py3: pass system string to socket.getservbyname Differential Revision: https://phab.mercurial-scm.org/D2139
Sun, 11 Feb 2018 12:42:10 -0800 run-tests: report tests that exception occurred in
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 12:42:10 -0800] rev 36037
run-tests: report tests that exception occurred in We now record the test that an exception occurred in. We put this information to use by aggregating the count of failures in each test. For each exception, the exception report now prints the total number of tests having that exception and the test with the least number of exceptions exhibiting that failure. The exception list is now sorted by (total count, tests impacted, count of failures in least failing test). This allows us to: * Assess how widespread a failure is. Some exceptions occur a lot in a few tests. Others occur over many tests. * Easily run a test exhibiting an exception without having to find a failure in test output. * Find and fix low hanging fruit (e.g. exceptions that are the only failure in a test). Here's an example of the new output: 199 (4 tests) /home/gps/src/hg/hgext/blackbox.py:191: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' (test-devel-warnings.t - 1 total) 142 (19 tests) /home/gps/src/hg/hgext/mq.py:655: list indices must be integers or slices, not bytes (test-hardlinks.t - 1 total) 140 (20 tests) /home/gps/src/hg/mercurial/patch.py:296: string argument expected, got 'bytes' (test-audit-subrepo.t - 1 total) 101 (15 tests) /home/gps/src/hg/hgext/convert/convcmd.py:60: encode() argument 1 must be str, not bytes (test-convert-clonebranches.t - 1 total) 90 (2 tests) /home/gps/src/hg/hgext/mq.py:456: can't concat str to bytes (test-mq-qqueue.t - 1 total) 87 (2 tests) /home/gps/src/hg/mercurial/branchmap.py:380: %b requires a bytes-like object, or an object that implements __bytes__, not 'FileNotFoundError' (test-branches.t - 2 total) 85 (22 tests) /home/gps/src/hg/mercurial/sshpeer.py:223: cannot convert 'UUID' object to bytes (test-bundle2-pushback.t - 1 total) 1 (1 tests) /home/gps/src/hg/mercurial/formatter.py:254: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' (test-debugextensions.t - 2 total) 1 (1 tests) /home/gps/src/hg/hgext/convert/convcmd.py:420: startswith first arg must be str or a tuple of str, not bytes (test-convert-authormap.t - 2 total) 1 (1 tests) /home/gps/src/hg/mercurial/revlog.py:797: '>=' not supported between instances of 'NoneType' and 'int' (test-unionrepo.t - 1 total) 1 (1 tests) /home/gps/src/hg/hgext/show.py:129: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' (test-show.t - 1 total) Differential Revision: https://phab.mercurial-scm.org/D2138
Sun, 11 Feb 2018 10:52:13 -0800 py3: use raw string for file open mode
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 10:52:13 -0800] rev 36036
py3: use raw string for file open mode Otherwise the module importer rewrites it to bytes on Python 3, which angers Python 3. Differential Revision: https://phab.mercurial-scm.org/D2137
Sun, 11 Feb 2018 10:49:00 -0800 py3: convert content-type to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 10:49:00 -0800] rev 36035
py3: convert content-type to bytes This fixes the exception: TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' On the line: ui.debug('Content-Type: %s\n' % content_type) And it prevents additional exceptions that use the content_type variable later. Differential Revision: https://phab.mercurial-scm.org/D2136
Sun, 11 Feb 2018 18:32:37 -0500 gpg: print unknown key IDs in their entirety
Josef 'Jeff' Sipek <jeffpc@josefsipek.net> [Sun, 11 Feb 2018 18:32:37 -0500] rev 36034
gpg: print unknown key IDs in their entirety Shortening the key is nice in theory but it results in ambiguity which can be exploited. Therefore, when encountering an unknown key ID we should print the whole ID returned by gpg. This may or may not be the whole key, however it will match the user preference set in gpg configuration. Furthermore, the key ID shortening had a couple of issues: (1) it truncated the key ID (dropping the last digit and outputting only 15 hex digits) making it very hard to find the correct key on a key server (2) since only 15 digits were fed into shortkey(), it always emitted the ui.debug() warning
Sun, 11 Feb 2018 14:35:35 +0100 tests: fix check for --graph option in test-log-linerange.t
Denis Laxalde <denis@laxalde.org> [Sun, 11 Feb 2018 14:35:35 +0100] rev 36033
tests: fix check for --graph option in test-log-linerange.t Previous test about incompatibility of --line-range and --graph options was problematic because, even without --graph option, the command would have failed because specified path (dir/baz) did not exist as it got dropped in previous test statements. New test statements should work without --graph. This prepares for making --line-range compatible with --graph option.
Sun, 11 Feb 2018 17:25:53 +0530 py3: use "%d" instead of "%s" for integers
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:25:53 +0530] rev 36032
py3: use "%d" instead of "%s" for integers Differential Revision: https://phab.mercurial-scm.org/D2135
Sun, 11 Feb 2018 17:19:07 +0530 py3: replace file() with open() in test-contrib.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:19:07 +0530] rev 36031
py3: replace file() with open() in test-contrib.t file() is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2134
Sun, 11 Feb 2018 17:14:00 +0530 py3: replace file() with open() in test-eol.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:14:00 +0530] rev 36030
py3: replace file() with open() in test-eol.t file() is not present in Python 3. This patch also adds a b'' prefix to make sure we write bytes in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2129
Sun, 11 Feb 2018 17:13:11 +0530 py3: replace file() with open() in test-extdiff.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:13:11 +0530] rev 36029
py3: replace file() with open() in test-extdiff.t file() is not present in Python 3. This patch also adds a b'' prefix to make sure we write bytes in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2128
Sun, 11 Feb 2018 17:12:28 +0530 py3: replace file() with open() in test-fileset.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:12:28 +0530] rev 36028
py3: replace file() with open() in test-fileset.t file() is not present in Python 3. This patch also adds a b'' prefix to make sure we write bytes in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2127
Sun, 11 Feb 2018 17:11:45 +0530 py3: replace file() with open() in test-import-bypass.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:11:45 +0530] rev 36027
py3: replace file() with open() in test-import-bypass.t file() is not present in Python 3. This patch also adds a b'' prefix to make sure we write bytes in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2126
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip