Mercurial > public > mercurial-scm > hg
diff mercurial/byterange.py @ 35584:6f62a1c3e11d
py3: make regular expressions bytes by prepending b''
Regexes start with r'' and hence transformer skips adding b'' there.
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D1794
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 29 Dec 2017 05:28:05 +0530 |
parents | 1232f7fa00c3 |
children |
line wrap: on
line diff
--- a/mercurial/byterange.py Fri Dec 29 05:27:00 2017 +0530 +++ b/mercurial/byterange.py Fri Dec 29 05:28:05 2017 +0530 @@ -416,7 +416,7 @@ if range_header is None: return None if _rangere is None: - _rangere = re.compile(r'^bytes=(\d{1,})-(\d*)') + _rangere = re.compile(br'^bytes=(\d{1,})-(\d*)') match = _rangere.match(range_header) if match: tup = range_tuple_normalize(match.group(1, 2))