Submitter | phabricator |
---|---|
Date | Feb. 18, 2018, 8:46 p.m. |
Message ID | <dfea99124bf92fd276db8552e1f7ca98@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/28123/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -950,7 +950,7 @@ # preprocess the text, converting tabs to spaces text = text.expandtabs(4) # strip \n, and convert control characters to ^[char] representation - text = re.sub(r'[\x00-\x08\x0a-\x1f]', + text = re.sub(br'[\x00-\x08\x0a-\x1f]', lambda m:'^' + chr(ord(m.group()) + 64), text.strip('\n')) if pair is not None: