Mercurial > hg
comparison tests/test-template-map.t @ 43102:829088e87032
log: populate keywords if specified in custom -Tjson(...) or -Tcbor(...)
To make things simple, early return for ui.quiet is disabled if the formatter
is templated and provides some datahint().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 06 Oct 2019 14:58:41 -0400 |
parents | 1d12ae5096d1 |
children | 4c1b4805db57 |
comparison
equal
deleted
inserted
replaced
43101:1d12ae5096d1 | 43102:829088e87032 |
---|---|
1117 [ | 1117 [ |
1118 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8}, | 1118 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8}, |
1119 {"parents": ["0000000000000000000000000000000000000000"], "rev": 7} | 1119 {"parents": ["0000000000000000000000000000000000000000"], "rev": 7} |
1120 ] | 1120 ] |
1121 | 1121 |
1122 $ hg log -qr. -T'json(rev, parents)' | |
1123 [ | |
1124 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8} | |
1125 ] | |
1126 | |
1127 $ hg log -r. -T'json(diff)' | |
1128 [ | |
1129 {"diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n"} | |
1130 ] | |
1131 | |
1132 $ hg log -r. -T'json(diffstat)' | |
1133 [ | |
1134 {"diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n"} | |
1135 ] | |
1136 | |
1137 $ hg log -r. -T'json(manifest)' | |
1138 [ | |
1139 {"manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64"} | |
1140 ] | |
1141 | |
1142 $ hg log -r. -T'json(extra)' | |
1143 [ | |
1144 {"extra": {"branch": "default"}} | |
1145 ] | |
1146 | |
1147 $ hg log -r3 -T'json(modified)' | |
1148 [ | |
1149 {"modified": ["c"]} | |
1150 ] | |
1151 | |
1152 $ hg log -r. -T'json(added)' | |
1153 [ | |
1154 {"added": ["fourth", "third"]} | |
1155 ] | |
1156 | |
1157 $ hg log -r. -T'json(removed)' | |
1158 [ | |
1159 {"removed": ["second"]} | |
1160 ] | |
1161 | |
1162 $ hg log -r. -T'json(files)' | |
1163 [ | |
1164 {"files": ["fourth", "second", "third"]} | |
1165 ] | |
1166 | |
1167 --copies is the exception. copies dict is built only when --copies switch | |
1168 is on: | |
1169 | |
1170 $ hg log -r'.^:' -T'json(copies)' --copies | |
1171 [ | |
1172 {"copies": {}}, | |
1173 {"copies": {"fourth": "second"}} | |
1174 ] | |
1175 | |
1122 $ hg log -r. -T'json()' | 1176 $ hg log -r. -T'json()' |
1123 [ | 1177 [ |
1124 {} | 1178 {} |
1125 ] | 1179 ] |
1126 | 1180 |