The identify command, for example, does not explicitly set {rev} on formatter, but does set {tags}. $ ../hg identify -r '4.2' -T '{revset("tagged() and rev(%d)::", rev) % "{rev}\n"}' 35618 36319 $ ../hg identify -r '4.2' -T '{revset("tagged() and rev(%d)::", rev) % "{tags % "{tag}"}\n"}' 4.2 4.2 If 'fm.data(tags=...)' is commented out, the correct result is given: $ ../hg identify -r '4.2' -T '{revset("tagged() and rev(%d)::", rev) % "{tags % "{tag}"}\n"}' 4.2 4.2.1
Bug was inactive for 150 days, archiving
Fixed by https://mercurial-scm.org/repo/hg/rev/7937850a523d Yuya Nishihara <yuya@tcha.org> hgweb: make templater mostly compatible with log templates Prepares for gradually switching templatekw.showsuccsandmarkers() to new API. This was a PoC showing how to reuse templatekw functions in hgweb. We could remove rev, node, author, etc. from the commonentry() table, but we'll have to carefully remove all corresponding symbols from webcommands.*(). Otherwise, we would face the issue5612. Still templatekw.keywords aren't exported. Otherwise some tests would fail because the atom template expects {files} to be empty in filelog, but templatekw.showfiles() provides the {files} implementation. (please test the fix)
Fixed by https://mercurial-scm.org/repo/hg/rev/46859b437697 Yuya Nishihara <yuya@tcha.org> templater: drop symbols which should be overridden by new 'ctx' (issue5612) This problem is caused by impedance mismatch between the templater and the formatter interface, which is that the template keywords are generally evaluated dynamically, but the formatter puts static values into a template mapping. This patch avoids the problem by removing conflicting values from a mapping dict when a 'ctx' is switched. (please test the fix)
Bug was set to TESTING for 8 days, resolving