Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 28630:bf35644b9f3a
templater: relax unquotestring() to fall back to bare string
This is convenient for our use case where quotes are optional except in
a map file.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Mar 2016 18:12:12 +0900 |
parents | ed1d90f6e921 |
children | 44319097e7b9 |
comparison
equal
deleted
inserted
replaced
28629:d6f8a1535224 | 28630:bf35644b9f3a |
---|---|
1540 | 1540 |
1541 # ui settings | 1541 # ui settings |
1542 if not tmpl and not style: # template are stronger than style | 1542 if not tmpl and not style: # template are stronger than style |
1543 tmpl = ui.config('ui', 'logtemplate') | 1543 tmpl = ui.config('ui', 'logtemplate') |
1544 if tmpl: | 1544 if tmpl: |
1545 try: | 1545 return templater.unquotestring(tmpl), None |
1546 tmpl = templater.unquotestring(tmpl) | |
1547 except SyntaxError: | |
1548 pass | |
1549 return tmpl, None | |
1550 else: | 1546 else: |
1551 style = util.expandpath(ui.config('ui', 'style', '')) | 1547 style = util.expandpath(ui.config('ui', 'style', '')) |
1552 | 1548 |
1553 if not tmpl and style: | 1549 if not tmpl and style: |
1554 mapfile = style | 1550 mapfile = style |