From patchwork Fri Mar 17 15:25:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,4] py3: call codecs.escape_decode() directly From: Yuya Nishihara X-Patchwork-Id: 19421 Message-Id: <49922515f01eae376dcc.1489764348@mimosa> To: mercurial-devel@mercurial-scm.org Date: Sat, 18 Mar 2017 00:25:48 +0900 # HG changeset patch # User Yuya Nishihara # Date 1489762102 -32400 # Fri Mar 17 23:48:22 2017 +0900 # Node ID 49922515f01eae376dcc9af7b04d450d301e4782 # Parent fa032607ed52a0ba605bb4c496426ffb01b09c54 py3: call codecs.escape_decode() directly The same rule as 3b7a6941a6ef applies. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -2138,7 +2138,7 @@ def escapestr(s): return codecs.escape_encode(s)[0] def unescapestr(s): - return s.decode('string_escape') + return codecs.escape_decode(s)[0] def uirepr(s): # Avoid double backslash in Windows path repr()