comparison mercurial/cmdutil.py @ 24987:fd7287f0b43c

templater: remove noop calls of parsestring(s, quoted=False) (API) Since db7463aa080f, parsestring(s, quoted=False) just returns s.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 04 May 2015 10:01:03 +0900
parents fb9b7b937b3e
children e8ff0b09acac
comparison
equal deleted inserted replaced
24986:fb9b7b937b3e 24987:fd7287f0b43c
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.parsestring(tmpl) 1446 tmpl = templater.parsestring(tmpl)
1447 except SyntaxError: 1447 except SyntaxError:
1448 tmpl = templater.parsestring(tmpl, quoted=False) 1448 pass
1449 return tmpl, None 1449 return tmpl, None
1450 else: 1450 else:
1451 style = util.expandpath(ui.config('ui', 'style', '')) 1451 style = util.expandpath(ui.config('ui', 'style', ''))
1452 1452
1453 if not tmpl and style: 1453 if not tmpl and 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.parsestring(t) 1480 tmpl = templater.parsestring(t)
1481 except SyntaxError: 1481 except SyntaxError:
1482 tmpl = templater.parsestring(t, quoted=False) 1482 tmpl = t
1483 return tmpl, None 1483 return tmpl, None
1484 1484
1485 if tmpl == 'list': 1485 if tmpl == 'list':
1486 ui.write(_("available styles: %s\n") % templater.stylelist()) 1486 ui.write(_("available styles: %s\n") % templater.stylelist())
1487 raise util.Abort(_("specify a template")) 1487 raise util.Abort(_("specify a template"))