Internal state could be observed by template keywords: [quark@x1c hg]$ ./hg log -r . -T '{ui}\n' <mercurial.ui.ui object at 0x7f55008cedd0> "{ctx}", "{repo}", "{templ}", "{revcache}" are probably also unwanted. It seems we use a single map to store both keyword functions and raw data. It'd be nice if we can separate data from keyword functions.
It's one of the templater mess.
Fixed by https://mercurial-scm.org/repo/hg/rev/d6cfa722b044 Yuya Nishihara <yuya@tcha.org> templater: look up mapping table through template engine These functions are stub for symbol/resource separation. This series is intended to address the following problems: a) internal data may be exposed to user (issue5699) b) defaults['repo'] (a repository name) will conflict with mapping['repo'] (a repo object) in hgweb (please test the fix)
Fixed by https://mercurial-scm.org/repo/hg/rev/a33be093ec62 Yuya Nishihara <yuya@tcha.org> 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. (please test the fix)
Bug was set to TESTING for 7 days, resolving