Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 35470:a33be093ec62
templater: look up symbols/resources as if they were separated (issue5699)
It wouldn't be easy to split the mapping dict into (symbols, resources). This
patch instead rejects invalid lookup taking resources.keys() as source of
truth.
The doctest is updated since mapping['repo'] is now reserved for a repo
object.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 21 Dec 2017 22:17:39 +0900 |
parents | f1c54d003327 |
children | 4c3a4bb31c0e |
line wrap: on
line diff
--- a/tests/test-command-template.t Thu Dec 21 22:05:30 2017 +0900 +++ b/tests/test-command-template.t Thu Dec 21 22:17:39 2017 +0900 @@ -206,7 +206,13 @@ Internal resources shouldn't be exposed (issue5699): - $ hg log -r. -T '{cache}{repo}{templ}{ui}' + $ hg log -r. -T '{cache}{ctx}{repo}{revcache}{templ}{ui}' + +Never crash on internal resource not available: + + $ hg --cwd .. debugtemplate '{"c0bebeef"|shortest}\n' + abort: template resource not available: ctx + [255] Quoting for ui.logtemplate