Mercurial > hg
diff mercurial/util.py @ 31484:afb335353d28
util: wrap s.decode('string_escape') calls for future py3 compatibility
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 17 Mar 2017 23:42:46 +0900 |
parents | da83f12d7a88 |
children | cad95575dc46 |
line wrap: on
line diff
--- a/mercurial/util.py Sat Mar 18 12:27:52 2017 -0400 +++ b/mercurial/util.py Fri Mar 17 23:42:46 2017 +0900 @@ -2137,6 +2137,9 @@ # Python 3 compatibility return codecs.escape_encode(s)[0] +def unescapestr(s): + return s.decode('string_escape') + def uirepr(s): # Avoid double backslash in Windows path repr() return repr(s).replace('\\\\', '\\')