3 ms·
I'm very excited about this release. I would like to promote my own small and insignificant contribution to it. I made a few improvements to the template engin
by jordigh 11y ago
I'm very excited about this release. I would like to promote my own small and insignificant contribution to it.
I made a few improvements to the template engine to make it easier to write your own templates. An example is the new built-in `hg log --template=status` or `hg log -T status` for short. For each commit it displays file additions, removals, and modifications using the same style as `hg status`. Copies are displayed if you pass the --copies/-C flag, just like `hg status` too. You can see this template in the map-cmdline.status file in the installed Mercurial templates directory:
https://selenic.com/hg/file/tip/mercurial/templates/map-cmdline.status https://selenic.com/hg/file/tip/mercurial/templates/map-cmdl...
I especially like this example because it exhibits Mercurial's extensibility and overall philosophy very well. Rather than cluttering the CLI with a bunch of extra obscure options (such as a hypothetical --status option), we provide a generic mechanism where more advanced users can hook their own customisations into. We do not complicate the UI for the uncommon case.