[PATCH 2 of 4] py3: call codecs.escape_decode() directly
Yuya Nishihara
yuya at tcha.org
Fri Mar 17 11:25:48 EDT 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# 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()
More information about the Mercurial-devel
mailing list