D2336: py3: make sure regex is bytes in crecord.py
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Feb 18 20:46:28 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGab5a86416485: py3: make sure regex is bytes in crecord.py (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2336?vs=5890&id=5893
REVISION DETAIL
https://phab.mercurial-scm.org/D2336
AFFECTED FILES
mercurial/crecord.py
CHANGE DETAILS
diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -950,7 +950,7 @@
# preprocess the text, converting tabs to spaces
text = text.expandtabs(4)
# strip \n, and convert control characters to ^[char] representation
- text = re.sub(r'[\x00-\x08\x0a-\x1f]',
+ text = re.sub(br'[\x00-\x08\x0a-\x1f]',
lambda m:'^' + chr(ord(m.group()) + 64), text.strip('\n'))
if pair is not None:
To: pulkit, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list