mercurial/templater.py
branchstable
changeset 24948 db7463aa080f
parent 24903 09124cce913f
child 24949 890845af1ac2
--- a/mercurial/templater.py	Tue May 05 11:15:17 2015 -0700
+++ b/mercurial/templater.py	Mon May 04 09:54:01 2015 +0900
@@ -618,14 +618,13 @@
                     yield j
 
 def parsestring(s, quoted=True):
-    '''parse a string using simple c-like syntax.
-    string must be in quotes if quoted is True.'''
+    '''unwrap quotes if quoted is True'''
     if quoted:
         if len(s) < 2 or s[0] != s[-1]:
             raise SyntaxError(_('unmatched quotes'))
-        return s[1:-1].decode('string_escape')
+        return s[1:-1]
 
-    return s.decode('string_escape')
+    return s
 
 class engine(object):
     '''template expansion engine.