Submitter | phabricator |
---|---|
Date | Dec. 29, 2017, 12:49 a.m. |
Message ID | <differential-rev-PHID-DREV-wv55iklzmgt4ppa4avme-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/26490/ |
State | Superseded |
Headers | show |
Comments
durin42 added a comment. For patches like this that are just adding bytes prefixes, let's go ahead and do a '# skip-blame' as in https://phab.mercurial-scm.org/rHGd92dc725223bbde09963fc431e57d32a40c4167d (aka https://phab.mercurial-scm.org/D1170) so that blame is cleaner in the future. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1794 To: pulkit, #hg-reviewers Cc: durin42, mercurial-devel
Patch
diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py --- a/mercurial/mdiff.py +++ b/mercurial/mdiff.py @@ -100,7 +100,7 @@ if blank and opts.ignoreblanklines: text = re.sub('\n+', '\n', text).strip('\n') if opts.ignorewseol: - text = re.sub(r'[ \t\r\f]+\n', r'\n', text) + text = re.sub(br'[ \t\r\f]+\n', r'\n', text) return text def splitblock(base1, lines1, base2, lines2, opts): diff --git a/mercurial/byterange.py b/mercurial/byterange.py --- a/mercurial/byterange.py +++ b/mercurial/byterange.py @@ -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))