templater: add "diff" template function
"diff" allows to embed changes in the target revision into template
output, even if the command itself doesn't take "--patch" option
Combination of "[committemplate]" configuration and "diff" template
function can achieve the feature like
issue231 ("option to have diff
displayed in commit editor buffer")
http://bz.selenic.com/show_bug.cgi?id=231
For example, templating below can be used to add each "diff" output
lines "HG: " prefix::
{splitlines(diff) % 'HG: {line}\n'}
This patch implements "diff" not as "a template keyword" but as "a
template function" to take include/exclude patterns at runtime.
It allows to specify target files of command (by -I/-X command line
options) and "diff" separately.
formatter: add pickle format
This gives convenient Python2 output. Python 3 users will need encoding=bytes.
commands: add hidden -T option for files/manifest/status/tags
These commands have generic formatting support but no way to enable it
yet. When this feature is more fully developed, this flag will be unhidden.
cmdutil: add json style to log-like commands
Sadly, this can't be done with the normal templater like we do with
XML due to JSON's inter-record comma rules.
encoding: add json escaping filter
This ends up here because it needs to be somewhat encoding aware.
filelog: parsemeta stops returning unused key list
Currently, only the returned meta dictionary is used. An upcoming change will
use the returned text offset.