Patchwork D3281: py3: add b'' prefix to make the regex bytes

login
register
mail settings
Submitter phabricator
Date April 12, 2018, 3:08 p.m.
Message ID <1ac8452b98df8711838d14d75254dad4@localhost.localdomain>
Download mbox | patch
Permalink /patch/30792/
State Not Applicable
Headers show

Comments

phabricator - April 12, 2018, 3:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG39ced3ef586d: py3: add b&#039;&#039; prefix to make the regex bytes (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3281?vs=8048&id=8060

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

AFFECTED FILES
  hgext/convert/common.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/convert/common.py b/hgext/convert/common.py
--- a/hgext/convert/common.py
+++ b/hgext/convert/common.py
@@ -144,7 +144,7 @@ 
         """ fails if revstr is not a 40 byte hex. mercurial and git both uses
             such format for their revision numbering
         """
-        if not re.match(r'[0-9a-fA-F]{40,40}$', revstr):
+        if not re.match(br'[0-9a-fA-F]{40,40}$', revstr):
             raise error.Abort(_('%s entry %s is not a valid revision'
                                ' identifier') % (mapname, revstr))