Submitter | phabricator |
---|---|
Date | March 3, 2018, 3:22 p.m. |
Message ID | <cc694266b9136a9df4e50d2674f29ec5@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/28783/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -702,6 +702,9 @@ DATA_ESCAPE_RE = remod.compile(br'[\x00-\x08\x0a-\x1f\\\x7f-\xff]') def escapedata(s): + if isinstance(s, bytearray): + s = bytes(s) + return DATA_ESCAPE_RE.sub(lambda m: DATA_ESCAPE_MAP[m.group(0)], s) class fileobjectobserver(object):