Patchwork D2651: py3: make sure regular expressions are bytes

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 5:28 p.m.
Message ID <differential-rev-PHID-DREV-rcmfnaiaymuawumj2oxu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28939/
State Superseded
Headers show

Comments

phabricator - March 4, 2018, 5:28 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame because just b'' prefix

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2651

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -53,7 +53,7 @@ 
 
 propertycache = util.propertycache
 
-nonascii = re.compile(r'[^\x21-\x7f]').search
+nonascii = re.compile(br'[^\x21-\x7f]').search
 
 class basectx(object):
     """A basectx object represents the common logic for its children: