transaction: clear callback instances after usage
Prevents double usage and helps reduce reference cycles, which
were observed to occur in `hg convert` and other scenarios where
there are multiple transactions per process.
lock: clear postrelease hooks list after usage
Post release hooks should only be called once. Setting the
list to None after usage will prevent accidental usage after
they are used.
In addition, it is easy for reference cycles to sneak into hook
functions. Clearing the hooks after usage helps prevent these
cycles.
ui: drop template aliases by HGPLAIN
Otherwise, scripting output could be suffered from user aliases.
templater: load and expand aliases by template engine (API) (
issue4842)
Now template aliases are fully supported in log and formatter templates.
As I said before, aliases are not expanded in map files. This avoids possible
corruption of our stock styles and web templates. This behavior is undocumented
since no map file nor [templates] section are documented at all. Later on,
we might want to add [aliases] section to map files if it appears to be useful.
templater: inline compiletemplate() function into engine
This allows the template engine to modify parsed tree.
templater: factor out function that creates templater from string template
This function will host loading of template aliases. It is not defined at
templater, but at formatter, since formatter is the module handling ui stuff
in front of templater.