Thu, 31 Jan 2019 14:47:34 -0800 commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 14:47:34 -0800] rev 41560
commit: if interactive, look elsewhere for whitespace settings (BC) Previously, when doing `commit -i`, we respected `diff.ignorews` and other whitespace-related settings, which is probably unexpected. The primary reason for this is to support hgext.record's commandline options, it's probably accidental that the `[diff]` settings were also considered. See comments on issue6042 and D5490. This can cause problems (issue5839, issue6042). It is assumed by the author that the `[diff]` section is primarily for *viewing* diffs, and that it is unlikely what people intend when attempting to commit or revert. With this change, if a user wants the behavior, they can clone their `[diff]` settings to `commands.commit.interactive.<setting>`. This is thus a mild BC change, but one I suspect is not going to be relied on by anyone. Note: while doing a partial commit/revert, we do not know what command the user is actually running. This means that the split extension, which ends up calling into this code, will respect the `commands.commit.interactive.<setting>` settings, and not a hypothetical `commands.split.interactive.<setting>`. This *also* means that setting `commands.commit.interactive.ignoreblanklines`, for example, will still cause issue5839. Considering the highly unlikely chance that a user actually sets `commands.commit.interactive.<setting>`, the author deems this risk acceptable. Differential Revision: https://phab.mercurial-scm.org/D5834
Thu, 31 Jan 2019 14:29:24 -0800 diff: when looking for diff configs, support a configurable prefix
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 14:29:24 -0800] rev 41559
diff: when looking for diff configs, support a configurable prefix In a future commit, I want to make it possible to have the diff options pulled from (as an example) `commands.commit.interactive.ignorews`; previously we only supported this for customizable sections (so this would have needed a `commit-interactive` section and been named `commit-interactive.ignorews`, which felt a bit weird. Differential Revision: https://phab.mercurial-scm.org/D5833
Thu, 31 Jan 2019 14:27:25 -0800 config: extract diff-related coreconfigitem()s to a helper method
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 14:27:25 -0800] rev 41558
config: extract diff-related coreconfigitem()s to a helper method We already have 'annotate' and 'diff' that use the same set of options, and I want to add more in a followup commit, so I'm attempting to reduce maintenance burden and duplication by making it possible to register all of them at once. Differential Revision: https://phab.mercurial-scm.org/D5832
Mon, 28 Jan 2019 18:05:05 -0800 commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com> [Mon, 28 Jan 2019 18:05:05 -0800] rev 41557
commit: ignore diff whitespace settings when doing `commit -i` (issue5839) Previously, we respected options like `diff.ignoreblanklines` and `diff.ignorews`. This can cause problems when the user is attempting to actually commit the blank line change. Specifically, the split extension can get into an infinite loop because it detects that the working copy is not clean, but when we get the diff we don't see the changes, so it just skips popping up the chunk selection flow, saying there's no changes to record. These options are primarily meant for viewing diffs; it is highly unlikely that someone is actually intending to add extraneous whitespace and have it ignored if they attempt to interactively commit (but *not* ignored if they non-interactively commit). Differential Revision: https://phab.mercurial-scm.org/D5744
Mon, 04 Feb 2019 14:43:26 -0800 tests: add syntax warnings on Python 3.8 in python-zstandard
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:43:26 -0800] rev 41556
tests: add syntax warnings on Python 3.8 in python-zstandard These are warnings from upstream test code. Let's just acknowledge them for now. These should go away in a future python-zstandard release :) Differential Revision: https://phab.mercurial-scm.org/D5846
Mon, 04 Feb 2019 14:38:23 -0800 check-py3-compat: manually format and print warnings
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:38:23 -0800] rev 41555
check-py3-compat: manually format and print warnings The warnings mechanism may print to stderr on Python 3. Independent buffering of stdout and stderr can lead to warnings output not being printed properly. This commit traps warnings when executing individual files and prints warnings to stdout so output is deterministic. Differential Revision: https://phab.mercurial-scm.org/D5845
Mon, 04 Feb 2019 14:25:00 -0800 check-py3-compat: provide filename to ast.parse()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:25:00 -0800] rev 41554
check-py3-compat: provide filename to ast.parse() This ensures any warning/error messages print a valid filename instead of potentially '<unknown>'. Differential Revision: https://phab.mercurial-scm.org/D5844
Mon, 04 Feb 2019 14:22:50 -0800 doc: escape backslash
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:22:50 -0800] rev 41553
doc: escape backslash This avoids a SyntaxWarning on Python 3.8 due to invalid \ escape. Differential Revision: https://phab.mercurial-scm.org/D5843
Mon, 04 Feb 2019 14:16:52 -0800 testparseutil: escape backslash in docstring
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:16:52 -0800] rev 41552
testparseutil: escape backslash in docstring This is funky. This inline Python code is part of a docstring, which means the string is interpreted first. So any backslashes need double escaping. So even though this is already a br'', we still need to escape. Differential Revision: https://phab.mercurial-scm.org/D5842
Mon, 04 Feb 2019 14:14:25 -0800 tests: use raw strings in test-help.t
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:14:25 -0800] rev 41551
tests: use raw strings in test-help.t This avoids SyntaxWarning on Python 3.8 due to invalid \ escapes. Differential Revision: https://phab.mercurial-scm.org/D5841
Mon, 04 Feb 2019 14:10:10 -0800 tests: escape backslash in makepatch.py inline file
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:10:10 -0800] rev 41550
tests: escape backslash in makepatch.py inline file This avoids some SyntaxWarning on Python 3.8 due to unescaped \. Differential Revision: https://phab.mercurial-scm.org/D5840
Mon, 04 Feb 2019 14:05:26 -0800 tests: use raw strings in test-cbor.py
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:05:26 -0800] rev 41549
tests: use raw strings in test-cbor.py To avoid SyntaxWarning on Python 3.8 due to invalid \ escape. Differential Revision: https://phab.mercurial-scm.org/D5839
Mon, 04 Feb 2019 14:03:15 -0800 showstack: use raw docstring
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:03:15 -0800] rev 41548
showstack: use raw docstring Avoids a SyntaxWarning on Python 3.8 due to invalid \ escape. Differential Revision: https://phab.mercurial-scm.org/D5838
Mon, 04 Feb 2019 14:00:57 -0800 tests: use raw string in test-check-code.t
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:00:57 -0800] rev 41547
tests: use raw string in test-check-code.t To avoid a SyntaxWarning on Python 3.8 due to invalid \ escape. Differential Revision: https://phab.mercurial-scm.org/D5837
Mon, 04 Feb 2019 09:47:13 -0800 run-tests: set attributes in sorted order
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:47:13 -0800] rev 41546
run-tests: set attributes in sorted order Python 3.8 preserves insertion order in serialized output (https://bugs.python.org/issue34160). Older Pythons serialized in sorted order. Let's make insertion order sorted so behavior is consistent across Python versions. Differential Revision: https://phab.mercurial-scm.org/D5831
Mon, 04 Feb 2019 09:41:10 -0800 revetbenchmarks: use raw string for regular expression with escapes
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:41:10 -0800] rev 41545
revetbenchmarks: use raw string for regular expression with escapes This avoids a SyntaxWarning on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5830
Mon, 04 Feb 2019 09:38:33 -0800 check-code: use raw string
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:38:33 -0800] rev 41544
check-code: use raw string This avoids a SyntaxWarning in Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5829
Mon, 04 Feb 2019 09:37:09 -0800 tests: use raw strings for regular expressions with escapes
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:37:09 -0800] rev 41543
tests: use raw strings for regular expressions with escapes Avoids SyntaxWarning on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5828
Mon, 04 Feb 2019 09:35:55 -0800 drawdag: use raw strings for docstrings
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:35:55 -0800] rev 41542
drawdag: use raw strings for docstrings Avoids SyntaxWarning for invalid \ escape on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5827
Mon, 04 Feb 2019 09:34:11 -0800 check-config: use raw strings for regular expressions
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:34:11 -0800] rev 41541
check-config: use raw strings for regular expressions This avoids SyntaxWarning on Python 3.8 for invalid \ escapes. Differential Revision: https://phab.mercurial-scm.org/D5826
Mon, 04 Feb 2019 09:32:30 -0800 run-tests: use raw strings for regular expressions
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:32:30 -0800] rev 41540
run-tests: use raw strings for regular expressions Avoids SyntaxWarning due to invalid \ escape on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5825
Mon, 04 Feb 2019 09:31:19 -0800 check-commit: use raw string for regular expression
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:31:19 -0800] rev 41539
check-commit: use raw string for regular expression Avoids SyntaxWarning on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5824
Mon, 04 Feb 2019 09:13:05 -0800 configitems: use raw strings for hidden-{command,topic} items
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:13:05 -0800] rev 41538
configitems: use raw strings for hidden-{command,topic} items These strings are regular expressions. The "\." needs to be string escaped. We use raw strings to avoid doing that and the SyntaxWarning we'd receive otherwise on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5822
Mon, 04 Feb 2019 09:03:10 -0800 convert: use raw string for regular expressions
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:03:10 -0800] rev 41537
convert: use raw string for regular expressions This avoids a SyntaxWarning on Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5821
Mon, 04 Feb 2019 09:01:49 -0800 graphmod: use raw string
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:01:49 -0800] rev 41536
graphmod: use raw string Needed to avoid a SyntaxWarning due to unescaped \ in Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5820
Mon, 04 Feb 2019 09:00:52 -0800 crecord: use raw string for regular expression
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:00:52 -0800] rev 41535
crecord: use raw string for regular expression \s emits a SyntaxWarning in Python 3.8. Use a raw string to avoid escaping the \. Differential Revision: https://phab.mercurial-scm.org/D5819
Mon, 04 Feb 2019 08:59:11 -0800 patch: properly escape \ in string literals
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 08:59:11 -0800] rev 41534
patch: properly escape \ in string literals Python 3.8 will emit a SyntaxWarning for str/bytes with invalid escapes. This commit addresses 4 occurrences where we had a bare \ in a str/bytes. Differential Revision: https://phab.mercurial-scm.org/D5818
Mon, 04 Feb 2019 09:07:00 -0800 global: make some docstrings raw strings
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:07:00 -0800] rev 41533
global: make some docstrings raw strings Python 3.8 emits a SyntaxWarning when a str/bytes contains invalid \ escapes. Various docstrings in our code base contain invalid \ escapes. This commit turns those docstrings into raw strings. Differential Revision: https://phab.mercurial-scm.org/D5816
Mon, 04 Feb 2019 08:54:30 -0800 global: use raw strings for regular expressions with escapes
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 08:54:30 -0800] rev 41532
global: use raw strings for regular expressions with escapes Escape sequences like \w, \s, and \d are technically invalid in str/bytes. This became a deprecation warning in Python 3.6 (https://bugs.python.org/issue27364). Python 3.8 bumps it to a SyntaxWarning (https://bugs.python.org/issue32912), which is non-silent by default. This commit changes a number of regular expressions to use br'' so regular expression special sequences don't need \\ literals. This fixes roughly half of the SyntaxWarning we see in the code base with Python 3.8. Differential Revision: https://phab.mercurial-scm.org/D5815
Mon, 04 Feb 2019 09:29:25 -0800 tests: add optional Python 2.7 deprecation output
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:29:25 -0800] rev 41531
tests: add optional Python 2.7 deprecation output pip 19 will emit a Python 2.7 deprecation warning when used with Python 2.7. Let's add that as optional output to our pip test. Differential Revision: https://phab.mercurial-scm.org/D5823
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip