Mercurial > public > mercurial-scm > hg-stable
diff tests/test-annotate.t @ 22480:dff638170c48
annotate: port to generic templater enabled by hidden -T option
If the selected formatter is other than plainformatter, raw data are passed
to the formatter. In this case, it isn't necessary (and not possible) to
calculate column widths.
Field names are substituted to be the same as "log" command.
There are a few limitations:
- "binary file" message is not included in formatted output.
- no data structure for multiple files. all lines are packed to single list.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 17 Sep 2014 23:21:20 +0900 |
parents | 0fd0612dc855 |
children | c48924787eaa |
line wrap: on
line diff
--- a/tests/test-annotate.t Tue Sep 16 23:40:24 2014 +0900 +++ b/tests/test-annotate.t Wed Sep 17 23:21:20 2014 +0900 @@ -51,6 +51,29 @@ $ hg annotate -cdnul a nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a +annotate (JSON) + + $ hg annotate -Tjson a + [ + { + "line": "a\n", + "rev": 0 + } + ] + + $ hg annotate -Tjson -cdfnul a + [ + { + "date": [1.0, 0], + "file": "a", + "line": "a\n", + "line_number": 1, + "node": "8435f90966e442695d2ded29fdade2bac5ad8065", + "rev": 0, + "user": "nobody" + } + ] + $ cat <<EOF >>a > a > a