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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Mar 2 17:20:49 EST 2018


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

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



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


More information about the Mercurial-devel mailing list