formatter: populate ctx from repo and node value
This will basically replace the fm.contexthint() API. I originally thought this would be too complicated, and I wrote 8399438bc7ef "formatter: provide hint of context keys required by template" because of that. However, I had to add a similar mechanism for fctx templates, and the overall machinery became way simpler than my original patch. The test output slightly changed as {author} is no longer available in the {manifest} context, which isn't the point this test targeted on.
Showing
- mercurial/formatter.py 14 additions, 1 deletionmercurial/formatter.py
- mercurial/templatekw.py 0 additions, 2 deletionsmercurial/templatekw.py
- tests/test-template-keywords.t 5 additions, 0 deletionstests/test-template-keywords.t
- tests/test-template-map.t 1 addition, 1 deletiontests/test-template-map.t
Loading
Please register or sign in to comment