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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Apr 12 12:07:22 UTC 2018


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/D3281

AFFECTED FILES
  hgext/convert/common.py

CHANGE DETAILS

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))
 



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


More information about the Mercurial-devel mailing list