Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
22479:5d9e46d93c1d | 22480:dff638170c48 |
---|---|
48 | 48 |
49 annotate -cdnul | 49 annotate -cdnul |
50 | 50 |
51 $ hg annotate -cdnul a | 51 $ hg annotate -cdnul a |
52 nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a | 52 nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a |
53 | |
54 annotate (JSON) | |
55 | |
56 $ hg annotate -Tjson a | |
57 [ | |
58 { | |
59 "line": "a\n", | |
60 "rev": 0 | |
61 } | |
62 ] | |
63 | |
64 $ hg annotate -Tjson -cdfnul a | |
65 [ | |
66 { | |
67 "date": [1.0, 0], | |
68 "file": "a", | |
69 "line": "a\n", | |
70 "line_number": 1, | |
71 "node": "8435f90966e442695d2ded29fdade2bac5ad8065", | |
72 "rev": 0, | |
73 "user": "nobody" | |
74 } | |
75 ] | |
53 | 76 |
54 $ cat <<EOF >>a | 77 $ cat <<EOF >>a |
55 > a | 78 > a |
56 > a | 79 > a |
57 > EOF | 80 > EOF |