Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:14:25 -0800] rev 41565
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:10:10 -0800] rev 41564
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:05:26 -0800] rev 41563
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:03:15 -0800] rev 41562
showstack: use raw docstring
Avoids a SyntaxWarning on Python 3.8 due to invalid \ escape.
Differential Revision: https://phab.mercurial-scm.org/D5838
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 14:00:57 -0800] rev 41561
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:47:13 -0800] rev 41560
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:41:10 -0800] rev 41559
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:38:33 -0800] rev 41558
check-code: use raw string
This avoids a SyntaxWarning in Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5829
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:37:09 -0800] rev 41557
tests: use raw strings for regular expressions with escapes
Avoids SyntaxWarning on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5828
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:35:55 -0800] rev 41556
drawdag: use raw strings for docstrings
Avoids SyntaxWarning for invalid \ escape on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5827
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:34:11 -0800] rev 41555
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:32:30 -0800] rev 41554
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:31:19 -0800] rev 41553
check-commit: use raw string for regular expression
Avoids SyntaxWarning on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5824
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:13:05 -0800] rev 41552
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:03:10 -0800] rev 41551
convert: use raw string for regular expressions
This avoids a SyntaxWarning on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5821
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:01:49 -0800] rev 41550
graphmod: use raw string
Needed to avoid a SyntaxWarning due to unescaped \ in Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5820
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:00:52 -0800] rev 41549
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 08:59:11 -0800] rev 41548
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:07:00 -0800] rev 41547
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 08:54:30 -0800] rev 41546
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
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:29:25 -0800] rev 41545
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
Augie Fackler <augie@google.com> [Mon, 04 Feb 2019 17:06:22 -0500] rev 41544
tests: fix test-match.py on Python3
# skip-blame just b prefixes
Differential Revision: https://phab.mercurial-scm.org/D5835
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 04 Feb 2019 20:35:21 +0300] rev 41543
merge with stable
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 04 Feb 2019 18:14:03 +0300] rev 41542
match: teach diffmatcher.visitdir() to return 'all' if possible
This patch teaches differencematcher.visitdir() to return 'all' when
m1.visitdir() returns 'all' and m2 does not matches.
Before this patch, from a differencematcher.visitdir(), we always returned
either True or False. We never returned 'all' even when we can. This causes
problem when m1 and m2 of a differencematcher are themselves differencematcher.
In that case, we try to check:
`if self._m2_.visitdir(dir) == 'all'`
which will never be 'all' even though it can be.
This leads to iterating over a lot of sub-directory manifest, even though we
don't want to while extending a narrow clone. I am yet to measure the impact of
this but calculating manifest was taking ~50-60 seconds, so this should
definitely save some of time there.
Differential Revision: https://phab.mercurial-scm.org/D5814
Boris Feld <boris.feld@octobus.net> [Sun, 03 Feb 2019 10:01:43 +0100] rev 41541
py3: use integer division instead of `int(...)` call
Changeset 38a82e0333c9 and 7f853549823b introduced explicit conversion to
integer to work around the division behavior change from python2 to python3.
Using the integer division operator is a simpler and clearer way to achieve
this.
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 03 Feb 2019 17:15:11 +0530] rev 41540
py3: add some b'' prefixes in test-notify.t
# skip-blame as just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5811
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 03 Feb 2019 17:05:47 +0530] rev 41539
py3: use pycompat.long in hgext/convert/monotone.py
Differential Revision: https://phab.mercurial-scm.org/D5810
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 03 Feb 2019 16:59:46 +0530] rev 41538
py3: add three new passing tests found by buildbot
Differential Revision: https://phab.mercurial-scm.org/D5809
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 03 Feb 2019 16:38:47 +0530] rev 41537
py3: do a fsdecode(), fsencode() dance in posix.py
We have to use `fsdecode()` instead of sysstr() because they are abusing
`PyUnicode_EncodeFSDefault()` to get back bytes.
Differential Revision: https://phab.mercurial-scm.org/D5808
Taapas Agrawal <taapas2897@gmail.com> [Sun, 03 Feb 2019 01:02:24 +0530] rev 41536
revert: add prompt before undeleting a file in -i (issue6008)
This adds a prompt that asks whether or not a removed file is to be undeleted
in `hg revert -i`.
Differential Revision: https://phab.mercurial-scm.org/D5803