Show More
@@ -1443,7 +1443,7 b' def gettemplate(ui, tmpl, style):' | |||||
1443 | tmpl = ui.config('ui', 'logtemplate') |
|
1443 | tmpl = ui.config('ui', 'logtemplate') | |
1444 | if tmpl: |
|
1444 | if tmpl: | |
1445 | try: |
|
1445 | try: | |
1446 |
tmpl = templater. |
|
1446 | tmpl = templater.unquotestring(tmpl) | |
1447 | except SyntaxError: |
|
1447 | except SyntaxError: | |
1448 | pass |
|
1448 | pass | |
1449 | return tmpl, None |
|
1449 | return tmpl, None | |
@@ -1477,7 +1477,7 b' def gettemplate(ui, tmpl, style):' | |||||
1477 | t = ui.config('templates', tmpl) |
|
1477 | t = ui.config('templates', tmpl) | |
1478 | if t: |
|
1478 | if t: | |
1479 | try: |
|
1479 | try: | |
1480 |
tmpl = templater. |
|
1480 | tmpl = templater.unquotestring(t) | |
1481 | except SyntaxError: |
|
1481 | except SyntaxError: | |
1482 | tmpl = t |
|
1482 | tmpl = t | |
1483 | return tmpl, None |
|
1483 | return tmpl, None |
@@ -618,7 +618,7 b' def _flatten(thing):' | |||||
618 | for j in _flatten(i): |
|
618 | for j in _flatten(i): | |
619 | yield j |
|
619 | yield j | |
620 |
|
620 | |||
621 |
def |
|
621 | def unquotestring(s): | |
622 | '''unwrap quotes''' |
|
622 | '''unwrap quotes''' | |
623 | if len(s) < 2 or s[0] != s[-1]: |
|
623 | if len(s) < 2 or s[0] != s[-1]: | |
624 | raise SyntaxError(_('unmatched quotes')) |
|
624 | raise SyntaxError(_('unmatched quotes')) | |
@@ -728,7 +728,7 b' class templater(object):' | |||||
728 | raise SyntaxError(_('%s: missing value') % conf.source('', key)) |
|
728 | raise SyntaxError(_('%s: missing value') % conf.source('', key)) | |
729 | if val[0] in "'\"": |
|
729 | if val[0] in "'\"": | |
730 | try: |
|
730 | try: | |
731 |
self.cache[key] = |
|
731 | self.cache[key] = unquotestring(val) | |
732 | except SyntaxError, inst: |
|
732 | except SyntaxError, inst: | |
733 | raise SyntaxError('%s: %s' % |
|
733 | raise SyntaxError('%s: %s' % | |
734 | (conf.source('', key), inst.args[0])) |
|
734 | (conf.source('', key), inst.args[0])) |
General Comments 0
You need to be logged in to leave comments.
Login now