diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1443,7 +1443,7 @@ def gettemplate(ui, tmpl, style): tmpl = ui.config('ui', 'logtemplate') if tmpl: try: - tmpl = templater.parsestring(tmpl) + tmpl = templater.unquotestring(tmpl) except SyntaxError: pass return tmpl, None @@ -1477,7 +1477,7 @@ def gettemplate(ui, tmpl, style): t = ui.config('templates', tmpl) if t: try: - tmpl = templater.parsestring(t) + tmpl = templater.unquotestring(t) except SyntaxError: tmpl = t return tmpl, None diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -618,7 +618,7 @@ def _flatten(thing): for j in _flatten(i): yield j -def parsestring(s): +def unquotestring(s): '''unwrap quotes''' if len(s) < 2 or s[0] != s[-1]: raise SyntaxError(_('unmatched quotes')) @@ -728,7 +728,7 @@ class templater(object): raise SyntaxError(_('%s: missing value') % conf.source('', key)) if val[0] in "'\"": try: - self.cache[key] = parsestring(val) + self.cache[key] = unquotestring(val) except SyntaxError, inst: raise SyntaxError('%s: %s' % (conf.source('', key), inst.args[0]))