Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 31927:2abc556dbe92
templater: find keyword name more thoroughly on filtering error
Before, it could spill an internal representation of compiled template such
as [(<function runsymbol at 0x....>, 'extras'), ...]. Show less cryptic
message if no symbol found.
New findsymbolicname() function will be also used by dict() constructor.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 08 Apr 2017 23:33:32 +0900 |
parents | 932241b8c644 |
children | 277b3e2d711b |
line wrap: on
line diff
--- a/tests/test-command-template.t Mon Apr 03 22:54:06 2017 +0900 +++ b/tests/test-command-template.t Sat Apr 08 23:33:32 2017 +0900 @@ -2684,6 +2684,14 @@ hg: parse error: date expects a date information [255] + $ hg tip -T '{author|email|shortdate}\n' + abort: template filter 'shortdate' is not compatible with keyword 'author' + [255] + + $ hg tip -T '{get(extras, "branch")|shortdate}\n' + abort: incompatible use of template filter 'shortdate' + [255] + Error in nested template: $ hg log -T '{"date'