Patchwork D2564: lfs: add missing b prefixes on some regular expressions

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 10:20 p.m.
Message ID <60478bd4722cde1276518624e6e9f48a@localhost.localdomain>
Download mbox | patch
Permalink /patch/28732/
State Not Applicable
Headers show

Comments

phabricator - March 2, 2018, 10:20 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG95bd9e396774: lfs: add missing b prefixes on some regular expressions (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2564?vs=6387&id=6393

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

AFFECTED FILES
  hgext/lfs/pointer.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/hgext/lfs/pointer.py b/hgext/lfs/pointer.py
--- a/hgext/lfs/pointer.py
+++ b/hgext/lfs/pointer.py
@@ -45,12 +45,12 @@ 
 
     # regular expressions used by _validate
     # see https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md
-    _keyre = re.compile(r'\A[a-z0-9.-]+\Z')
-    _valuere = re.compile(r'\A[^\n]*\Z')
+    _keyre = re.compile(br'\A[a-z0-9.-]+\Z')
+    _valuere = re.compile(br'\A[^\n]*\Z')
     _requiredre = {
-        'size': re.compile(r'\A[0-9]+\Z'),
-        'oid': re.compile(r'\Asha256:[0-9a-f]{64}\Z'),
-        'version': re.compile(r'\A%s\Z' % re.escape(VERSION)),
+        'size': re.compile(br'\A[0-9]+\Z'),
+        'oid': re.compile(br'\Asha256:[0-9a-f]{64}\Z'),
+        'version': re.compile(br'\A%s\Z' % re.escape(VERSION)),
     }
 
     def validate(self):