Show More
@@ -1,525 +1,526 b'' | |||||
1 | test-abort-checkin.t |
|
1 | test-abort-checkin.t | |
2 | test-add.t |
|
2 | test-add.t | |
3 | test-addremove-similar.t |
|
3 | test-addremove-similar.t | |
4 | test-addremove.t |
|
4 | test-addremove.t | |
5 | test-amend-subrepo.t |
|
5 | test-amend-subrepo.t | |
6 | test-amend.t |
|
6 | test-amend.t | |
7 | test-ancestor.py |
|
7 | test-ancestor.py | |
8 | test-annotate.py |
|
8 | test-annotate.py | |
9 | test-annotate.t |
|
9 | test-annotate.t | |
10 | test-archive-symlinks.t |
|
10 | test-archive-symlinks.t | |
11 | test-atomictempfile.py |
|
11 | test-atomictempfile.py | |
12 | test-audit-path.t |
|
12 | test-audit-path.t | |
13 | test-audit-subrepo.t |
|
13 | test-audit-subrepo.t | |
14 | test-automv.t |
|
14 | test-automv.t | |
15 | test-backout.t |
|
15 | test-backout.t | |
16 | test-backwards-remove.t |
|
16 | test-backwards-remove.t | |
17 | test-basic.t |
|
17 | test-basic.t | |
18 | test-bheads.t |
|
18 | test-bheads.t | |
19 | test-bisect.t |
|
19 | test-bisect.t | |
20 | test-bisect2.t |
|
20 | test-bisect2.t | |
21 | test-bisect3.t |
|
21 | test-bisect3.t | |
22 | test-blackbox.t |
|
22 | test-blackbox.t | |
23 | test-bookmarks-current.t |
|
23 | test-bookmarks-current.t | |
24 | test-bookmarks-merge.t |
|
24 | test-bookmarks-merge.t | |
25 | test-bookmarks-rebase.t |
|
25 | test-bookmarks-rebase.t | |
26 | test-bookmarks-strip.t |
|
26 | test-bookmarks-strip.t | |
27 | test-bookmarks.t |
|
27 | test-bookmarks.t | |
28 | test-branch-change.t |
|
28 | test-branch-change.t | |
29 | test-branch-option.t |
|
29 | test-branch-option.t | |
30 | test-branch-tag-confict.t |
|
30 | test-branch-tag-confict.t | |
31 | test-branches.t |
|
31 | test-branches.t | |
32 | test-bundle-phases.t |
|
32 | test-bundle-phases.t | |
33 | test-bundle-type.t |
|
33 | test-bundle-type.t | |
34 | test-bundle-vs-outgoing.t |
|
34 | test-bundle-vs-outgoing.t | |
35 | test-bundle2-multiple-changegroups.t |
|
35 | test-bundle2-multiple-changegroups.t | |
36 | test-cappedreader.py |
|
36 | test-cappedreader.py | |
37 | test-casecollision.t |
|
37 | test-casecollision.t | |
38 | test-cat.t |
|
38 | test-cat.t | |
39 | test-cbor.py |
|
39 | test-cbor.py | |
40 | test-censor.t |
|
40 | test-censor.t | |
41 | test-changelog-exec.t |
|
41 | test-changelog-exec.t | |
42 | test-check-commit.t |
|
42 | test-check-commit.t | |
43 | test-check-execute.t |
|
43 | test-check-execute.t | |
44 | test-check-interfaces.py |
|
44 | test-check-interfaces.py | |
45 | test-check-module-imports.t |
|
45 | test-check-module-imports.t | |
46 | test-check-pyflakes.t |
|
46 | test-check-pyflakes.t | |
47 | test-check-pylint.t |
|
47 | test-check-pylint.t | |
48 | test-check-shbang.t |
|
48 | test-check-shbang.t | |
49 | test-children.t |
|
49 | test-children.t | |
50 | test-clone-cgi.t |
|
50 | test-clone-cgi.t | |
51 | test-clone-pull-corruption.t |
|
51 | test-clone-pull-corruption.t | |
52 | test-clone-r.t |
|
52 | test-clone-r.t | |
53 | test-clone-update-order.t |
|
53 | test-clone-update-order.t | |
54 | test-command-template.t |
|
54 | test-command-template.t | |
55 | test-commit-amend.t |
|
55 | test-commit-amend.t | |
56 | test-commit-interactive.t |
|
56 | test-commit-interactive.t | |
57 | test-commit-multiple.t |
|
57 | test-commit-multiple.t | |
58 | test-commit-unresolved.t |
|
58 | test-commit-unresolved.t | |
59 | test-commit.t |
|
59 | test-commit.t | |
60 | test-committer.t |
|
60 | test-committer.t | |
61 | test-completion.t |
|
61 | test-completion.t | |
62 | test-config-env.py |
|
62 | test-config-env.py | |
63 | test-config.t |
|
63 | test-config.t | |
64 | test-conflict.t |
|
64 | test-conflict.t | |
65 | test-confused-revert.t |
|
65 | test-confused-revert.t | |
66 | test-context.py |
|
66 | test-context.py | |
67 | test-contrib-check-code.t |
|
67 | test-contrib-check-code.t | |
68 | test-contrib-check-commit.t |
|
68 | test-contrib-check-commit.t | |
69 | test-convert-authormap.t |
|
69 | test-convert-authormap.t | |
70 | test-convert-clonebranches.t |
|
70 | test-convert-clonebranches.t | |
71 | test-convert-cvs-branch.t |
|
71 | test-convert-cvs-branch.t | |
72 | test-convert-cvs-detectmerge.t |
|
72 | test-convert-cvs-detectmerge.t | |
73 | test-convert-cvs-synthetic.t |
|
73 | test-convert-cvs-synthetic.t | |
74 | test-convert-cvs.t |
|
74 | test-convert-cvs.t | |
75 | test-convert-cvsnt-mergepoints.t |
|
75 | test-convert-cvsnt-mergepoints.t | |
76 | test-convert-datesort.t |
|
76 | test-convert-datesort.t | |
77 | test-convert-filemap.t |
|
77 | test-convert-filemap.t | |
78 | test-convert-hg-sink.t |
|
78 | test-convert-hg-sink.t | |
79 | test-convert-hg-source.t |
|
79 | test-convert-hg-source.t | |
80 | test-convert-hg-startrev.t |
|
80 | test-convert-hg-startrev.t | |
81 | test-convert-splicemap.t |
|
81 | test-convert-splicemap.t | |
82 | test-convert-tagsbranch-topology.t |
|
82 | test-convert-tagsbranch-topology.t | |
83 | test-copy-move-merge.t |
|
83 | test-copy-move-merge.t | |
84 | test-copy.t |
|
84 | test-copy.t | |
85 | test-copytrace-heuristics.t |
|
85 | test-copytrace-heuristics.t | |
86 | test-debugbuilddag.t |
|
86 | test-debugbuilddag.t | |
87 | test-debugbundle.t |
|
87 | test-debugbundle.t | |
88 | test-debugextensions.t |
|
88 | test-debugextensions.t | |
89 | test-debugindexdot.t |
|
89 | test-debugindexdot.t | |
90 | test-debugrename.t |
|
90 | test-debugrename.t | |
91 | test-default-push.t |
|
91 | test-default-push.t | |
92 | test-diff-binary-file.t |
|
92 | test-diff-binary-file.t | |
93 | test-diff-change.t |
|
93 | test-diff-change.t | |
94 | test-diff-copy-depth.t |
|
94 | test-diff-copy-depth.t | |
95 | test-diff-hashes.t |
|
95 | test-diff-hashes.t | |
96 | test-diff-ignore-whitespace.t |
|
96 | test-diff-ignore-whitespace.t | |
97 | test-diff-indent-heuristic.t |
|
97 | test-diff-indent-heuristic.t | |
98 | test-diff-issue2761.t |
|
98 | test-diff-issue2761.t | |
99 | test-diff-newlines.t |
|
99 | test-diff-newlines.t | |
100 | test-diff-reverse.t |
|
100 | test-diff-reverse.t | |
101 | test-diff-subdir.t |
|
101 | test-diff-subdir.t | |
102 | test-diff-unified.t |
|
102 | test-diff-unified.t | |
103 | test-diff-upgrade.t |
|
103 | test-diff-upgrade.t | |
104 | test-diffdir.t |
|
104 | test-diffdir.t | |
105 | test-diffstat.t |
|
105 | test-diffstat.t | |
106 | test-directaccess.t |
|
106 | test-directaccess.t | |
107 | test-dirstate-backup.t |
|
107 | test-dirstate-backup.t | |
108 | test-dirstate-nonnormalset.t |
|
108 | test-dirstate-nonnormalset.t | |
109 | test-dirstate.t |
|
109 | test-dirstate.t | |
110 | test-dispatch.py |
|
110 | test-dispatch.py | |
111 | test-doctest.py |
|
111 | test-doctest.py | |
112 | test-double-merge.t |
|
112 | test-double-merge.t | |
113 | test-drawdag.t |
|
113 | test-drawdag.t | |
114 | test-duplicateoptions.py |
|
114 | test-duplicateoptions.py | |
115 | test-editor-filename.t |
|
115 | test-editor-filename.t | |
116 | test-empty-dir.t |
|
116 | test-empty-dir.t | |
117 | test-empty-file.t |
|
117 | test-empty-file.t | |
118 | test-empty-group.t |
|
118 | test-empty-group.t | |
119 | test-empty.t |
|
119 | test-empty.t | |
120 | test-encode.t |
|
120 | test-encode.t | |
121 | test-encoding-func.py |
|
121 | test-encoding-func.py | |
122 | test-encoding.t |
|
122 | test-encoding.t | |
123 | test-eol-add.t |
|
123 | test-eol-add.t | |
124 | test-eol-clone.t |
|
124 | test-eol-clone.t | |
125 | test-eol-hook.t |
|
125 | test-eol-hook.t | |
126 | test-eol-patch.t |
|
126 | test-eol-patch.t | |
127 | test-eol-tag.t |
|
127 | test-eol-tag.t | |
128 | test-eol-update.t |
|
128 | test-eol-update.t | |
129 | test-eol.t |
|
129 | test-eol.t | |
130 | test-eolfilename.t |
|
130 | test-eolfilename.t | |
131 | test-excessive-merge.t |
|
131 | test-excessive-merge.t | |
132 | test-exchange-obsmarkers-case-A1.t |
|
132 | test-exchange-obsmarkers-case-A1.t | |
133 | test-exchange-obsmarkers-case-A2.t |
|
133 | test-exchange-obsmarkers-case-A2.t | |
134 | test-exchange-obsmarkers-case-A3.t |
|
134 | test-exchange-obsmarkers-case-A3.t | |
135 | test-exchange-obsmarkers-case-A4.t |
|
135 | test-exchange-obsmarkers-case-A4.t | |
136 | test-exchange-obsmarkers-case-A5.t |
|
136 | test-exchange-obsmarkers-case-A5.t | |
137 | test-exchange-obsmarkers-case-A6.t |
|
137 | test-exchange-obsmarkers-case-A6.t | |
138 | test-exchange-obsmarkers-case-A7.t |
|
138 | test-exchange-obsmarkers-case-A7.t | |
139 | test-exchange-obsmarkers-case-B1.t |
|
139 | test-exchange-obsmarkers-case-B1.t | |
140 | test-exchange-obsmarkers-case-B2.t |
|
140 | test-exchange-obsmarkers-case-B2.t | |
141 | test-exchange-obsmarkers-case-B3.t |
|
141 | test-exchange-obsmarkers-case-B3.t | |
142 | test-exchange-obsmarkers-case-B4.t |
|
142 | test-exchange-obsmarkers-case-B4.t | |
143 | test-exchange-obsmarkers-case-B5.t |
|
143 | test-exchange-obsmarkers-case-B5.t | |
144 | test-exchange-obsmarkers-case-B6.t |
|
144 | test-exchange-obsmarkers-case-B6.t | |
145 | test-exchange-obsmarkers-case-B7.t |
|
145 | test-exchange-obsmarkers-case-B7.t | |
146 | test-exchange-obsmarkers-case-C1.t |
|
146 | test-exchange-obsmarkers-case-C1.t | |
147 | test-exchange-obsmarkers-case-C2.t |
|
147 | test-exchange-obsmarkers-case-C2.t | |
148 | test-exchange-obsmarkers-case-C3.t |
|
148 | test-exchange-obsmarkers-case-C3.t | |
149 | test-exchange-obsmarkers-case-C4.t |
|
149 | test-exchange-obsmarkers-case-C4.t | |
150 | test-exchange-obsmarkers-case-D1.t |
|
150 | test-exchange-obsmarkers-case-D1.t | |
151 | test-exchange-obsmarkers-case-D2.t |
|
151 | test-exchange-obsmarkers-case-D2.t | |
152 | test-exchange-obsmarkers-case-D3.t |
|
152 | test-exchange-obsmarkers-case-D3.t | |
153 | test-exchange-obsmarkers-case-D4.t |
|
153 | test-exchange-obsmarkers-case-D4.t | |
154 | test-execute-bit.t |
|
154 | test-execute-bit.t | |
155 | test-export.t |
|
155 | test-export.t | |
156 | test-extdata.t |
|
156 | test-extdata.t | |
157 | test-extdiff.t |
|
157 | test-extdiff.t | |
158 | test-extensions-afterloaded.t |
|
158 | test-extensions-afterloaded.t | |
159 | test-extensions-wrapfunction.py |
|
159 | test-extensions-wrapfunction.py | |
160 | test-extra-filelog-entry.t |
|
160 | test-extra-filelog-entry.t | |
161 | test-fetch.t |
|
161 | test-fetch.t | |
162 | test-filebranch.t |
|
162 | test-filebranch.t | |
163 | test-filecache.py |
|
163 | test-filecache.py | |
164 | test-filelog.py |
|
164 | test-filelog.py | |
165 | test-fileset-generated.t |
|
165 | test-fileset-generated.t | |
166 | test-fileset.t |
|
166 | test-fileset.t | |
167 | test-fix-topology.t |
|
167 | test-fix-topology.t | |
168 | test-flags.t |
|
168 | test-flags.t | |
169 | test-generaldelta.t |
|
169 | test-generaldelta.t | |
170 | test-getbundle.t |
|
170 | test-getbundle.t | |
171 | test-git-export.t |
|
171 | test-git-export.t | |
172 | test-glog-topological.t |
|
172 | test-glog-topological.t | |
173 | test-gpg.t |
|
173 | test-gpg.t | |
174 | test-graft.t |
|
174 | test-graft.t | |
175 | test-hg-parseurl.py |
|
175 | test-hg-parseurl.py | |
176 | test-hghave.t |
|
176 | test-hghave.t | |
177 | test-hgignore.t |
|
177 | test-hgignore.t | |
178 | test-hgk.t |
|
178 | test-hgk.t | |
179 | test-hgrc.t |
|
179 | test-hgrc.t | |
180 | test-hgweb-bundle.t |
|
180 | test-hgweb-bundle.t | |
181 | test-hgweb-descend-empties.t |
|
181 | test-hgweb-descend-empties.t | |
182 | test-hgweb-empty.t |
|
182 | test-hgweb-empty.t | |
183 | test-hgweb-removed.t |
|
183 | test-hgweb-removed.t | |
184 | test-hgwebdir-paths.py |
|
184 | test-hgwebdir-paths.py | |
185 | test-hgwebdirsym.t |
|
185 | test-hgwebdirsym.t | |
186 | test-histedit-arguments.t |
|
186 | test-histedit-arguments.t | |
187 | test-histedit-base.t |
|
187 | test-histedit-base.t | |
188 | test-histedit-bookmark-motion.t |
|
188 | test-histedit-bookmark-motion.t | |
189 | test-histedit-commute.t |
|
189 | test-histedit-commute.t | |
190 | test-histedit-drop.t |
|
190 | test-histedit-drop.t | |
191 | test-histedit-edit.t |
|
191 | test-histedit-edit.t | |
192 | test-histedit-fold-non-commute.t |
|
192 | test-histedit-fold-non-commute.t | |
193 | test-histedit-fold.t |
|
193 | test-histedit-fold.t | |
194 | test-histedit-no-change.t |
|
194 | test-histedit-no-change.t | |
195 | test-histedit-non-commute-abort.t |
|
195 | test-histedit-non-commute-abort.t | |
196 | test-histedit-non-commute.t |
|
196 | test-histedit-non-commute.t | |
197 | test-histedit-obsolete.t |
|
197 | test-histedit-obsolete.t | |
198 | test-histedit-outgoing.t |
|
198 | test-histedit-outgoing.t | |
199 | test-histedit-templates.t |
|
199 | test-histedit-templates.t | |
200 | test-http-branchmap.t |
|
200 | test-http-branchmap.t | |
201 | test-http-bundle1.t |
|
201 | test-http-bundle1.t | |
202 | test-http-clone-r.t |
|
202 | test-http-clone-r.t | |
203 | test-http.t |
|
203 | test-http.t | |
204 | test-hybridencode.py |
|
204 | test-hybridencode.py | |
205 | test-identify.t |
|
205 | test-identify.t | |
206 | test-impexp-branch.t |
|
206 | test-impexp-branch.t | |
207 | test-import-bypass.t |
|
207 | test-import-bypass.t | |
208 | test-import-eol.t |
|
208 | test-import-eol.t | |
209 | test-import-merge.t |
|
209 | test-import-merge.t | |
210 | test-import-unknown.t |
|
210 | test-import-unknown.t | |
211 | test-import.t |
|
211 | test-import.t | |
212 | test-imports-checker.t |
|
212 | test-imports-checker.t | |
213 | test-incoming-outgoing.t |
|
213 | test-incoming-outgoing.t | |
214 | test-inherit-mode.t |
|
214 | test-inherit-mode.t | |
215 | test-init.t |
|
215 | test-init.t | |
216 | test-issue1089.t |
|
216 | test-issue1089.t | |
217 | test-issue1102.t |
|
217 | test-issue1102.t | |
218 | test-issue1175.t |
|
218 | test-issue1175.t | |
219 | test-issue1306.t |
|
219 | test-issue1306.t | |
220 | test-issue1438.t |
|
220 | test-issue1438.t | |
221 | test-issue1502.t |
|
221 | test-issue1502.t | |
222 | test-issue1802.t |
|
222 | test-issue1802.t | |
223 | test-issue1877.t |
|
223 | test-issue1877.t | |
224 | test-issue1993.t |
|
224 | test-issue1993.t | |
225 | test-issue2137.t |
|
225 | test-issue2137.t | |
226 | test-issue3084.t |
|
226 | test-issue3084.t | |
227 | test-issue4074.t |
|
227 | test-issue4074.t | |
228 | test-issue522.t |
|
228 | test-issue522.t | |
229 | test-issue586.t |
|
229 | test-issue586.t | |
230 | test-issue612.t |
|
230 | test-issue612.t | |
231 | test-issue619.t |
|
231 | test-issue619.t | |
232 | test-issue660.t |
|
232 | test-issue660.t | |
233 | test-issue672.t |
|
233 | test-issue672.t | |
234 | test-issue842.t |
|
234 | test-issue842.t | |
235 | test-journal-exists.t |
|
235 | test-journal-exists.t | |
236 | test-journal-share.t |
|
236 | test-journal-share.t | |
237 | test-journal.t |
|
237 | test-journal.t | |
238 | test-known.t |
|
238 | test-known.t | |
239 | test-largefiles-cache.t |
|
239 | test-largefiles-cache.t | |
240 | test-largefiles-misc.t |
|
240 | test-largefiles-misc.t | |
241 | test-largefiles-small-disk.t |
|
241 | test-largefiles-small-disk.t | |
242 | test-largefiles-update.t |
|
242 | test-largefiles-update.t | |
243 | test-largefiles.t |
|
243 | test-largefiles.t | |
244 | test-lfs-largefiles.t |
|
244 | test-lfs-largefiles.t | |
245 | test-lfs-pointer.py |
|
245 | test-lfs-pointer.py | |
246 | test-linerange.py |
|
246 | test-linerange.py | |
247 | test-locate.t |
|
247 | test-locate.t | |
248 | test-lock-badness.t |
|
248 | test-lock-badness.t | |
249 | test-log-linerange.t |
|
249 | test-log-linerange.t | |
250 | test-log.t |
|
250 | test-log.t | |
251 | test-logexchange.t |
|
251 | test-logexchange.t | |
252 | test-lrucachedict.py |
|
252 | test-lrucachedict.py | |
253 | test-mactext.t |
|
253 | test-mactext.t | |
254 | test-mailmap.t |
|
254 | test-mailmap.t | |
255 | test-manifest-merging.t |
|
255 | test-manifest-merging.t | |
256 | test-manifest.py |
|
256 | test-manifest.py | |
257 | test-manifest.t |
|
257 | test-manifest.t | |
258 | test-match.py |
|
258 | test-match.py | |
259 | test-mdiff.py |
|
259 | test-mdiff.py | |
260 | test-merge-changedelete.t |
|
260 | test-merge-changedelete.t | |
261 | test-merge-closedheads.t |
|
261 | test-merge-closedheads.t | |
262 | test-merge-commit.t |
|
262 | test-merge-commit.t | |
263 | test-merge-criss-cross.t |
|
263 | test-merge-criss-cross.t | |
264 | test-merge-default.t |
|
264 | test-merge-default.t | |
265 | test-merge-force.t |
|
265 | test-merge-force.t | |
266 | test-merge-halt.t |
|
266 | test-merge-halt.t | |
267 | test-merge-internal-tools-pattern.t |
|
267 | test-merge-internal-tools-pattern.t | |
268 | test-merge-local.t |
|
268 | test-merge-local.t | |
269 | test-merge-remove.t |
|
269 | test-merge-remove.t | |
270 | test-merge-revert.t |
|
270 | test-merge-revert.t | |
271 | test-merge-revert2.t |
|
271 | test-merge-revert2.t | |
272 | test-merge-subrepos.t |
|
272 | test-merge-subrepos.t | |
273 | test-merge-symlinks.t |
|
273 | test-merge-symlinks.t | |
274 | test-merge-tools.t |
|
274 | test-merge-tools.t | |
275 | test-merge-types.t |
|
275 | test-merge-types.t | |
276 | test-merge1.t |
|
276 | test-merge1.t | |
277 | test-merge10.t |
|
277 | test-merge10.t | |
278 | test-merge2.t |
|
278 | test-merge2.t | |
279 | test-merge4.t |
|
279 | test-merge4.t | |
280 | test-merge5.t |
|
280 | test-merge5.t | |
281 | test-merge6.t |
|
281 | test-merge6.t | |
282 | test-merge7.t |
|
282 | test-merge7.t | |
283 | test-merge8.t |
|
283 | test-merge8.t | |
284 | test-merge9.t |
|
284 | test-merge9.t | |
285 | test-minifileset.py |
|
285 | test-minifileset.py | |
286 | test-minirst.py |
|
286 | test-minirst.py | |
287 | test-mq-git.t |
|
287 | test-mq-git.t | |
288 | test-mq-header-date.t |
|
288 | test-mq-header-date.t | |
289 | test-mq-header-from.t |
|
289 | test-mq-header-from.t | |
290 | test-mq-merge.t |
|
290 | test-mq-merge.t | |
291 | test-mq-pull-from-bundle.t |
|
291 | test-mq-pull-from-bundle.t | |
292 | test-mq-qclone-http.t |
|
292 | test-mq-qclone-http.t | |
293 | test-mq-qdelete.t |
|
293 | test-mq-qdelete.t | |
294 | test-mq-qdiff.t |
|
294 | test-mq-qdiff.t | |
295 | test-mq-qfold.t |
|
295 | test-mq-qfold.t | |
296 | test-mq-qgoto.t |
|
296 | test-mq-qgoto.t | |
297 | test-mq-qimport-fail-cleanup.t |
|
297 | test-mq-qimport-fail-cleanup.t | |
298 | test-mq-qnew.t |
|
298 | test-mq-qnew.t | |
299 | test-mq-qpush-exact.t |
|
299 | test-mq-qpush-exact.t | |
300 | test-mq-qqueue.t |
|
300 | test-mq-qqueue.t | |
301 | test-mq-qrefresh-interactive.t |
|
301 | test-mq-qrefresh-interactive.t | |
302 | test-mq-qrefresh-replace-log-message.t |
|
302 | test-mq-qrefresh-replace-log-message.t | |
303 | test-mq-qrefresh.t |
|
303 | test-mq-qrefresh.t | |
304 | test-mq-qrename.t |
|
304 | test-mq-qrename.t | |
305 | test-mq-qsave.t |
|
305 | test-mq-qsave.t | |
306 | test-mq-safety.t |
|
306 | test-mq-safety.t | |
307 | test-mq-subrepo.t |
|
307 | test-mq-subrepo.t | |
308 | test-mq-symlinks.t |
|
308 | test-mq-symlinks.t | |
309 | test-mv-cp-st-diff.t |
|
309 | test-mv-cp-st-diff.t | |
310 | test-narrow-archive.t |
|
310 | test-narrow-archive.t | |
311 | test-narrow-clone-no-ellipsis.t |
|
311 | test-narrow-clone-no-ellipsis.t | |
312 | test-narrow-clone-non-narrow-server.t |
|
312 | test-narrow-clone-non-narrow-server.t | |
313 | test-narrow-clone-nonlinear.t |
|
313 | test-narrow-clone-nonlinear.t | |
314 | test-narrow-clone.t |
|
314 | test-narrow-clone.t | |
315 | test-narrow-commit.t |
|
315 | test-narrow-commit.t | |
316 | test-narrow-copies.t |
|
316 | test-narrow-copies.t | |
317 | test-narrow-debugcommands.t |
|
317 | test-narrow-debugcommands.t | |
318 | test-narrow-debugrebuilddirstate.t |
|
318 | test-narrow-debugrebuilddirstate.t | |
319 | test-narrow-exchange-merges.t |
|
319 | test-narrow-exchange-merges.t | |
320 | test-narrow-exchange.t |
|
320 | test-narrow-exchange.t | |
321 | test-narrow-expanddirstate.t |
|
321 | test-narrow-expanddirstate.t | |
322 | test-narrow-merge.t |
|
322 | test-narrow-merge.t | |
323 | test-narrow-patch.t |
|
323 | test-narrow-patch.t | |
324 | test-narrow-patterns.t |
|
324 | test-narrow-patterns.t | |
325 | test-narrow-pull.t |
|
325 | test-narrow-pull.t | |
326 | test-narrow-rebase.t |
|
326 | test-narrow-rebase.t | |
327 | test-narrow-shallow-merges.t |
|
327 | test-narrow-shallow-merges.t | |
328 | test-narrow-shallow.t |
|
328 | test-narrow-shallow.t | |
329 | test-narrow-strip.t |
|
329 | test-narrow-strip.t | |
330 | test-narrow-update.t |
|
330 | test-narrow-update.t | |
331 | test-narrow-widen.t |
|
331 | test-narrow-widen.t | |
332 | test-narrow.t |
|
332 | test-narrow.t | |
333 | test-nested-repo.t |
|
333 | test-nested-repo.t | |
334 | test-newbranch.t |
|
334 | test-newbranch.t | |
335 | test-obshistory.t |
|
335 | test-obshistory.t | |
336 | test-obsmarker-template.t |
|
336 | test-obsmarker-template.t | |
337 | test-obsmarkers-effectflag.t |
|
337 | test-obsmarkers-effectflag.t | |
338 | test-obsolete-bundle-strip.t |
|
338 | test-obsolete-bundle-strip.t | |
339 | test-obsolete-changeset-exchange.t |
|
339 | test-obsolete-changeset-exchange.t | |
340 | test-obsolete-checkheads.t |
|
340 | test-obsolete-checkheads.t | |
341 | test-obsolete-distributed.t |
|
341 | test-obsolete-distributed.t | |
342 | test-obsolete-tag-cache.t |
|
342 | test-obsolete-tag-cache.t | |
343 | test-pager.t |
|
343 | test-pager.t | |
344 | test-parents.t |
|
344 | test-parents.t | |
345 | test-parseindex2.py |
|
345 | test-parseindex2.py | |
346 | test-patch-offset.t |
|
346 | test-patch-offset.t | |
347 | test-patch.t |
|
347 | test-patch.t | |
348 | test-pathconflicts-merge.t |
|
348 | test-pathconflicts-merge.t | |
349 | test-pathconflicts-update.t |
|
349 | test-pathconflicts-update.t | |
350 | test-pathencode.py |
|
350 | test-pathencode.py | |
351 | test-pending.t |
|
351 | test-pending.t | |
352 | test-permissions.t |
|
352 | test-permissions.t | |
353 | test-phases.t |
|
353 | test-phases.t | |
354 | test-pull-branch.t |
|
354 | test-pull-branch.t | |
355 | test-pull-http.t |
|
355 | test-pull-http.t | |
356 | test-pull-permission.t |
|
356 | test-pull-permission.t | |
357 | test-pull-pull-corruption.t |
|
357 | test-pull-pull-corruption.t | |
358 | test-pull-r.t |
|
358 | test-pull-r.t | |
359 | test-pull-update.t |
|
359 | test-pull-update.t | |
360 | test-pull.t |
|
360 | test-pull.t | |
361 | test-purge.t |
|
361 | test-purge.t | |
362 | test-push-checkheads-partial-C1.t |
|
362 | test-push-checkheads-partial-C1.t | |
363 | test-push-checkheads-partial-C2.t |
|
363 | test-push-checkheads-partial-C2.t | |
364 | test-push-checkheads-partial-C3.t |
|
364 | test-push-checkheads-partial-C3.t | |
365 | test-push-checkheads-partial-C4.t |
|
365 | test-push-checkheads-partial-C4.t | |
366 | test-push-checkheads-pruned-B1.t |
|
366 | test-push-checkheads-pruned-B1.t | |
367 | test-push-checkheads-pruned-B2.t |
|
367 | test-push-checkheads-pruned-B2.t | |
368 | test-push-checkheads-pruned-B3.t |
|
368 | test-push-checkheads-pruned-B3.t | |
369 | test-push-checkheads-pruned-B4.t |
|
369 | test-push-checkheads-pruned-B4.t | |
370 | test-push-checkheads-pruned-B5.t |
|
370 | test-push-checkheads-pruned-B5.t | |
371 | test-push-checkheads-pruned-B6.t |
|
371 | test-push-checkheads-pruned-B6.t | |
372 | test-push-checkheads-pruned-B7.t |
|
372 | test-push-checkheads-pruned-B7.t | |
373 | test-push-checkheads-pruned-B8.t |
|
373 | test-push-checkheads-pruned-B8.t | |
374 | test-push-checkheads-superceed-A1.t |
|
374 | test-push-checkheads-superceed-A1.t | |
375 | test-push-checkheads-superceed-A2.t |
|
375 | test-push-checkheads-superceed-A2.t | |
376 | test-push-checkheads-superceed-A3.t |
|
376 | test-push-checkheads-superceed-A3.t | |
377 | test-push-checkheads-superceed-A4.t |
|
377 | test-push-checkheads-superceed-A4.t | |
378 | test-push-checkheads-superceed-A5.t |
|
378 | test-push-checkheads-superceed-A5.t | |
379 | test-push-checkheads-superceed-A6.t |
|
379 | test-push-checkheads-superceed-A6.t | |
380 | test-push-checkheads-superceed-A7.t |
|
380 | test-push-checkheads-superceed-A7.t | |
381 | test-push-checkheads-superceed-A8.t |
|
381 | test-push-checkheads-superceed-A8.t | |
382 | test-push-checkheads-unpushed-D1.t |
|
382 | test-push-checkheads-unpushed-D1.t | |
383 | test-push-checkheads-unpushed-D2.t |
|
383 | test-push-checkheads-unpushed-D2.t | |
384 | test-push-checkheads-unpushed-D3.t |
|
384 | test-push-checkheads-unpushed-D3.t | |
385 | test-push-checkheads-unpushed-D4.t |
|
385 | test-push-checkheads-unpushed-D4.t | |
386 | test-push-checkheads-unpushed-D5.t |
|
386 | test-push-checkheads-unpushed-D5.t | |
387 | test-push-checkheads-unpushed-D6.t |
|
387 | test-push-checkheads-unpushed-D6.t | |
388 | test-push-checkheads-unpushed-D7.t |
|
388 | test-push-checkheads-unpushed-D7.t | |
389 | test-push-http.t |
|
389 | test-push-http.t | |
390 | test-push-warn.t |
|
390 | test-push-warn.t | |
391 | test-push.t |
|
391 | test-push.t | |
392 | test-pushvars.t |
|
392 | test-pushvars.t | |
393 | test-qrecord.t |
|
393 | test-qrecord.t | |
394 | test-rebase-abort.t |
|
394 | test-rebase-abort.t | |
395 | test-rebase-base-flag.t |
|
395 | test-rebase-base-flag.t | |
396 | test-rebase-bookmarks.t |
|
396 | test-rebase-bookmarks.t | |
397 | test-rebase-brute-force.t |
|
397 | test-rebase-brute-force.t | |
398 | test-rebase-cache.t |
|
398 | test-rebase-cache.t | |
399 | test-rebase-check-restore.t |
|
399 | test-rebase-check-restore.t | |
400 | test-rebase-collapse.t |
|
400 | test-rebase-collapse.t | |
401 | test-rebase-conflicts.t |
|
401 | test-rebase-conflicts.t | |
402 | test-rebase-dest.t |
|
402 | test-rebase-dest.t | |
403 | test-rebase-detach.t |
|
403 | test-rebase-detach.t | |
404 | test-rebase-emptycommit.t |
|
404 | test-rebase-emptycommit.t | |
405 | test-rebase-inmemory.t |
|
405 | test-rebase-inmemory.t | |
406 | test-rebase-interruptions.t |
|
406 | test-rebase-interruptions.t | |
407 | test-rebase-issue-noparam-single-rev.t |
|
407 | test-rebase-issue-noparam-single-rev.t | |
408 | test-rebase-legacy.t |
|
408 | test-rebase-legacy.t | |
409 | test-rebase-mq-skip.t |
|
409 | test-rebase-mq-skip.t | |
410 | test-rebase-mq.t |
|
410 | test-rebase-mq.t | |
411 | test-rebase-named-branches.t |
|
411 | test-rebase-named-branches.t | |
412 | test-rebase-newancestor.t |
|
412 | test-rebase-newancestor.t | |
413 | test-rebase-obsolete.t |
|
413 | test-rebase-obsolete.t | |
414 | test-rebase-parameters.t |
|
414 | test-rebase-parameters.t | |
415 | test-rebase-partial.t |
|
415 | test-rebase-partial.t | |
416 | test-rebase-pull.t |
|
416 | test-rebase-pull.t | |
417 | test-rebase-rename.t |
|
417 | test-rebase-rename.t | |
418 | test-rebase-scenario-global.t |
|
418 | test-rebase-scenario-global.t | |
419 | test-rebase-templates.t |
|
419 | test-rebase-templates.t | |
420 | test-rebase-transaction.t |
|
420 | test-rebase-transaction.t | |
421 | test-rebuildstate.t |
|
421 | test-rebuildstate.t | |
422 | test-record.t |
|
422 | test-record.t | |
423 | test-relink.t |
|
423 | test-relink.t | |
424 | test-remove.t |
|
424 | test-remove.t | |
425 | test-rename-after-merge.t |
|
425 | test-rename-after-merge.t | |
426 | test-rename-dir-merge.t |
|
426 | test-rename-dir-merge.t | |
427 | test-rename-merge1.t |
|
427 | test-rename-merge1.t | |
428 | test-rename.t |
|
428 | test-rename.t | |
429 | test-repair-strip.t |
|
429 | test-repair-strip.t | |
430 | test-repo-compengines.t |
|
430 | test-repo-compengines.t | |
431 | test-resolve.t |
|
431 | test-resolve.t | |
432 | test-revert-flags.t |
|
432 | test-revert-flags.t | |
433 | test-revert-interactive.t |
|
433 | test-revert-interactive.t | |
434 | test-revert-unknown.t |
|
434 | test-revert-unknown.t | |
435 | test-revlog-ancestry.py |
|
435 | test-revlog-ancestry.py | |
436 | test-revlog-group-emptyiter.t |
|
436 | test-revlog-group-emptyiter.t | |
437 | test-revlog-mmapindex.t |
|
437 | test-revlog-mmapindex.t | |
438 | test-revlog-packentry.t |
|
438 | test-revlog-packentry.t | |
439 | test-revlog-raw.py |
|
439 | test-revlog-raw.py | |
440 | test-revlog-v2.t |
|
440 | test-revlog-v2.t | |
441 | test-revset-dirstate-parents.t |
|
441 | test-revset-dirstate-parents.t | |
442 | test-revset-legacy-lookup.t |
|
442 | test-revset-legacy-lookup.t | |
443 | test-revset-outgoing.t |
|
443 | test-revset-outgoing.t | |
444 | test-rollback.t |
|
444 | test-rollback.t | |
445 | test-run-tests.py |
|
445 | test-run-tests.py | |
446 | test-run-tests.t |
|
446 | test-run-tests.t | |
447 | test-schemes.t |
|
447 | test-schemes.t | |
448 | test-serve.t |
|
448 | test-serve.t | |
449 | test-setdiscovery.t |
|
449 | test-setdiscovery.t | |
450 | test-share.t |
|
450 | test-share.t | |
451 | test-shelve.t |
|
451 | test-shelve.t | |
452 | test-show-stack.t |
|
452 | test-show-stack.t | |
453 | test-show-work.t |
|
453 | test-show-work.t | |
454 | test-show.t |
|
454 | test-show.t | |
455 | test-simple-update.t |
|
455 | test-simple-update.t | |
456 | test-simplekeyvaluefile.py |
|
456 | test-simplekeyvaluefile.py | |
457 | test-simplemerge.py |
|
457 | test-simplemerge.py | |
458 | test-single-head.t |
|
458 | test-single-head.t | |
459 | test-sparse-clear.t |
|
459 | test-sparse-clear.t | |
460 | test-sparse-clone.t |
|
460 | test-sparse-clone.t | |
461 | test-sparse-import.t |
|
461 | test-sparse-import.t | |
462 | test-sparse-merges.t |
|
462 | test-sparse-merges.t | |
463 | test-sparse-profiles.t |
|
463 | test-sparse-profiles.t | |
464 | test-sparse-requirement.t |
|
464 | test-sparse-requirement.t | |
465 | test-sparse-verbose-json.t |
|
465 | test-sparse-verbose-json.t | |
466 | test-sparse.t |
|
466 | test-sparse.t | |
467 | test-split.t |
|
467 | test-split.t | |
468 | test-ssh-bundle1.t |
|
468 | test-ssh-bundle1.t | |
469 | test-ssh-clone-r.t |
|
469 | test-ssh-clone-r.t | |
470 | test-ssh-proto-unbundle.t |
|
470 | test-ssh-proto-unbundle.t | |
471 | test-ssh-proto.t |
|
471 | test-ssh-proto.t | |
472 | test-ssh.t |
|
472 | test-ssh.t | |
473 | test-sshserver.py |
|
473 | test-sshserver.py | |
474 | test-stack.t |
|
474 | test-stack.t | |
475 | test-status-inprocess.py |
|
475 | test-status-inprocess.py | |
476 | test-status-rev.t |
|
476 | test-status-rev.t | |
477 | test-status-terse.t |
|
477 | test-status-terse.t | |
478 | test-strict.t |
|
478 | test-strict.t | |
479 | test-strip-cross.t |
|
479 | test-strip-cross.t | |
480 | test-strip.t |
|
480 | test-strip.t | |
481 | test-subrepo-deep-nested-change.t |
|
481 | test-subrepo-deep-nested-change.t | |
482 | test-subrepo-missing.t |
|
482 | test-subrepo-missing.t | |
483 | test-subrepo-paths.t |
|
483 | test-subrepo-paths.t | |
484 | test-subrepo-recursion.t |
|
484 | test-subrepo-recursion.t | |
485 | test-subrepo-relative-path.t |
|
485 | test-subrepo-relative-path.t | |
486 | test-subrepo.t |
|
486 | test-subrepo.t | |
487 | test-symlink-os-yes-fs-no.py |
|
487 | test-symlink-os-yes-fs-no.py | |
488 | test-symlink-placeholder.t |
|
488 | test-symlink-placeholder.t | |
489 | test-symlinks.t |
|
489 | test-symlinks.t | |
490 | test-tag.t |
|
490 | test-tag.t | |
491 | test-tags.t |
|
491 | test-tags.t | |
492 | test-template-filters.t |
|
492 | test-template-filters.t | |
|
493 | test-template-map.t | |||
493 | test-transplant.t |
|
494 | test-transplant.t | |
494 | test-treemanifest.t |
|
495 | test-treemanifest.t | |
495 | test-ui-color.py |
|
496 | test-ui-color.py | |
496 | test-ui-config.py |
|
497 | test-ui-config.py | |
497 | test-ui-verbosity.py |
|
498 | test-ui-verbosity.py | |
498 | test-unamend.t |
|
499 | test-unamend.t | |
499 | test-unbundlehash.t |
|
500 | test-unbundlehash.t | |
500 | test-uncommit.t |
|
501 | test-uncommit.t | |
501 | test-unified-test.t |
|
502 | test-unified-test.t | |
502 | test-unionrepo.t |
|
503 | test-unionrepo.t | |
503 | test-unrelated-pull.t |
|
504 | test-unrelated-pull.t | |
504 | test-up-local-change.t |
|
505 | test-up-local-change.t | |
505 | test-update-branches.t |
|
506 | test-update-branches.t | |
506 | test-update-dest.t |
|
507 | test-update-dest.t | |
507 | test-update-issue1456.t |
|
508 | test-update-issue1456.t | |
508 | test-update-names.t |
|
509 | test-update-names.t | |
509 | test-update-reverse.t |
|
510 | test-update-reverse.t | |
510 | test-upgrade-repo.t |
|
511 | test-upgrade-repo.t | |
511 | test-url-download.t |
|
512 | test-url-download.t | |
512 | test-url-rev.t |
|
513 | test-url-rev.t | |
513 | test-url.py |
|
514 | test-url.py | |
514 | test-username-newline.t |
|
515 | test-username-newline.t | |
515 | test-verify.t |
|
516 | test-verify.t | |
516 | test-walk.t |
|
517 | test-walk.t | |
517 | test-walkrepo.py |
|
518 | test-walkrepo.py | |
518 | test-websub.t |
|
519 | test-websub.t | |
519 | test-win32text.t |
|
520 | test-win32text.t | |
520 | test-wireproto-clientreactor.py |
|
521 | test-wireproto-clientreactor.py | |
521 | test-wireproto-framing.py |
|
522 | test-wireproto-framing.py | |
522 | test-wireproto-serverreactor.py |
|
523 | test-wireproto-serverreactor.py | |
523 | test-wireproto.py |
|
524 | test-wireproto.py | |
524 | test-wsgirequest.py |
|
525 | test-wsgirequest.py | |
525 | test-xdg.t |
|
526 | test-xdg.t |
This diff has been collapsed as it changes many lines, (1668 lines changed) Show them Hide them | |||||
@@ -1,5041 +1,3389 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg add a |
|
4 | $ hg add a | |
5 | $ echo line 1 > b |
|
5 | $ echo line 1 > b | |
6 | $ echo line 2 >> b |
|
6 | $ echo line 2 >> b | |
7 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' |
|
7 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' | |
8 |
|
8 | |||
9 | $ hg add b |
|
9 | $ hg add b | |
10 | $ echo other 1 > c |
|
10 | $ echo other 1 > c | |
11 | $ echo other 2 >> c |
|
11 | $ echo other 2 >> c | |
12 | $ echo >> c |
|
12 | $ echo >> c | |
13 | $ echo other 3 >> c |
|
13 | $ echo other 3 >> c | |
14 | $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>' |
|
14 | $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>' | |
15 |
|
15 | |||
16 | $ hg add c |
|
16 | $ hg add c | |
17 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' |
|
17 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' | |
18 | $ echo c >> c |
|
18 | $ echo c >> c | |
19 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' |
|
19 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' | |
20 |
|
20 | |||
21 | $ echo foo > .hg/branch |
|
21 | $ echo foo > .hg/branch | |
22 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' |
|
22 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' | |
23 |
|
23 | |||
24 | $ hg co -q 3 |
|
24 | $ hg co -q 3 | |
25 | $ echo other 4 >> d |
|
25 | $ echo other 4 >> d | |
26 | $ hg add d |
|
26 | $ hg add d | |
27 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' |
|
27 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' | |
28 |
|
28 | |||
29 | $ hg merge -q foo |
|
29 | $ hg merge -q foo | |
30 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' |
|
30 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' | |
31 |
|
31 | |||
32 | Test arithmetic operators have the right precedence: |
|
32 | Test arithmetic operators have the right precedence: | |
33 |
|
33 | |||
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' |
|
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' | |
35 | 2020 1964 |
|
35 | 2020 1964 | |
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' |
|
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' | |
37 | 9860 5908 |
|
37 | 9860 5908 | |
38 |
|
38 | |||
39 | Test division: |
|
39 | Test division: | |
40 |
|
40 | |||
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' |
|
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' | |
42 | (template |
|
42 | (template | |
43 | (/ |
|
43 | (/ | |
44 | (integer '5') |
|
44 | (integer '5') | |
45 | (integer '2')) |
|
45 | (integer '2')) | |
46 | (string ' ') |
|
46 | (string ' ') | |
47 | (func |
|
47 | (func | |
48 | (symbol 'mod') |
|
48 | (symbol 'mod') | |
49 | (list |
|
49 | (list | |
50 | (integer '5') |
|
50 | (integer '5') | |
51 | (integer '2'))) |
|
51 | (integer '2'))) | |
52 | (string '\n')) |
|
52 | (string '\n')) | |
53 | * keywords: |
|
53 | * keywords: | |
54 | * functions: mod |
|
54 | * functions: mod | |
55 | 2 1 |
|
55 | 2 1 | |
56 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' |
|
56 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' | |
57 | (template |
|
57 | (template | |
58 | (/ |
|
58 | (/ | |
59 | (integer '5') |
|
59 | (integer '5') | |
60 | (negate |
|
60 | (negate | |
61 | (integer '2'))) |
|
61 | (integer '2'))) | |
62 | (string ' ') |
|
62 | (string ' ') | |
63 | (func |
|
63 | (func | |
64 | (symbol 'mod') |
|
64 | (symbol 'mod') | |
65 | (list |
|
65 | (list | |
66 | (integer '5') |
|
66 | (integer '5') | |
67 | (negate |
|
67 | (negate | |
68 | (integer '2')))) |
|
68 | (integer '2')))) | |
69 | (string '\n')) |
|
69 | (string '\n')) | |
70 | * keywords: |
|
70 | * keywords: | |
71 | * functions: mod |
|
71 | * functions: mod | |
72 | -3 -1 |
|
72 | -3 -1 | |
73 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' |
|
73 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' | |
74 | (template |
|
74 | (template | |
75 | (/ |
|
75 | (/ | |
76 | (negate |
|
76 | (negate | |
77 | (integer '5')) |
|
77 | (integer '5')) | |
78 | (integer '2')) |
|
78 | (integer '2')) | |
79 | (string ' ') |
|
79 | (string ' ') | |
80 | (func |
|
80 | (func | |
81 | (symbol 'mod') |
|
81 | (symbol 'mod') | |
82 | (list |
|
82 | (list | |
83 | (negate |
|
83 | (negate | |
84 | (integer '5')) |
|
84 | (integer '5')) | |
85 | (integer '2'))) |
|
85 | (integer '2'))) | |
86 | (string '\n')) |
|
86 | (string '\n')) | |
87 | * keywords: |
|
87 | * keywords: | |
88 | * functions: mod |
|
88 | * functions: mod | |
89 | -3 1 |
|
89 | -3 1 | |
90 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' |
|
90 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' | |
91 | (template |
|
91 | (template | |
92 | (/ |
|
92 | (/ | |
93 | (negate |
|
93 | (negate | |
94 | (integer '5')) |
|
94 | (integer '5')) | |
95 | (negate |
|
95 | (negate | |
96 | (integer '2'))) |
|
96 | (integer '2'))) | |
97 | (string ' ') |
|
97 | (string ' ') | |
98 | (func |
|
98 | (func | |
99 | (symbol 'mod') |
|
99 | (symbol 'mod') | |
100 | (list |
|
100 | (list | |
101 | (negate |
|
101 | (negate | |
102 | (integer '5')) |
|
102 | (integer '5')) | |
103 | (negate |
|
103 | (negate | |
104 | (integer '2')))) |
|
104 | (integer '2')))) | |
105 | (string '\n')) |
|
105 | (string '\n')) | |
106 | * keywords: |
|
106 | * keywords: | |
107 | * functions: mod |
|
107 | * functions: mod | |
108 | 2 -1 |
|
108 | 2 -1 | |
109 |
|
109 | |||
110 | Filters bind closer than arithmetic: |
|
110 | Filters bind closer than arithmetic: | |
111 |
|
111 | |||
112 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' |
|
112 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' | |
113 | (template |
|
113 | (template | |
114 | (- |
|
114 | (- | |
115 | (| |
|
115 | (| | |
116 | (func |
|
116 | (func | |
117 | (symbol 'revset') |
|
117 | (symbol 'revset') | |
118 | (string '.')) |
|
118 | (string '.')) | |
119 | (symbol 'count')) |
|
119 | (symbol 'count')) | |
120 | (integer '1')) |
|
120 | (integer '1')) | |
121 | (string '\n')) |
|
121 | (string '\n')) | |
122 | * keywords: |
|
122 | * keywords: | |
123 | * functions: count, revset |
|
123 | * functions: count, revset | |
124 | 0 |
|
124 | 0 | |
125 |
|
125 | |||
126 | But negate binds closer still: |
|
126 | But negate binds closer still: | |
127 |
|
127 | |||
128 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' |
|
128 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' | |
129 | (template |
|
129 | (template | |
130 | (- |
|
130 | (- | |
131 | (integer '1') |
|
131 | (integer '1') | |
132 | (| |
|
132 | (| | |
133 | (integer '3') |
|
133 | (integer '3') | |
134 | (symbol 'stringify'))) |
|
134 | (symbol 'stringify'))) | |
135 | (string '\n')) |
|
135 | (string '\n')) | |
136 | * keywords: |
|
136 | * keywords: | |
137 | * functions: stringify |
|
137 | * functions: stringify | |
138 | hg: parse error: arithmetic only defined on integers |
|
138 | hg: parse error: arithmetic only defined on integers | |
139 | [255] |
|
139 | [255] | |
140 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' |
|
140 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' | |
141 | (template |
|
141 | (template | |
142 | (| |
|
142 | (| | |
143 | (negate |
|
143 | (negate | |
144 | (integer '3')) |
|
144 | (integer '3')) | |
145 | (symbol 'stringify')) |
|
145 | (symbol 'stringify')) | |
146 | (string '\n')) |
|
146 | (string '\n')) | |
147 | * keywords: |
|
147 | * keywords: | |
148 | * functions: stringify |
|
148 | * functions: stringify | |
149 | -3 |
|
149 | -3 | |
150 |
|
150 | |||
151 | Filters bind as close as map operator: |
|
151 | Filters bind as close as map operator: | |
152 |
|
152 | |||
153 | $ hg debugtemplate -r0 -v '{desc|splitlines % "{line}\n"}' |
|
153 | $ hg debugtemplate -r0 -v '{desc|splitlines % "{line}\n"}' | |
154 | (template |
|
154 | (template | |
155 | (% |
|
155 | (% | |
156 | (| |
|
156 | (| | |
157 | (symbol 'desc') |
|
157 | (symbol 'desc') | |
158 | (symbol 'splitlines')) |
|
158 | (symbol 'splitlines')) | |
159 | (template |
|
159 | (template | |
160 | (symbol 'line') |
|
160 | (symbol 'line') | |
161 | (string '\n')))) |
|
161 | (string '\n')))) | |
162 | * keywords: desc, line |
|
162 | * keywords: desc, line | |
163 | * functions: splitlines |
|
163 | * functions: splitlines | |
164 | line 1 |
|
164 | line 1 | |
165 | line 2 |
|
165 | line 2 | |
166 |
|
166 | |||
167 | Keyword arguments: |
|
167 | Keyword arguments: | |
168 |
|
168 | |||
169 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' |
|
169 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' | |
170 | (template |
|
170 | (template | |
171 | (keyvalue |
|
171 | (keyvalue | |
172 | (symbol 'foo') |
|
172 | (symbol 'foo') | |
173 | (| |
|
173 | (| | |
174 | (symbol 'bar') |
|
174 | (symbol 'bar') | |
175 | (symbol 'baz')))) |
|
175 | (symbol 'baz')))) | |
176 | * keywords: bar, foo |
|
176 | * keywords: bar, foo | |
177 | * functions: baz |
|
177 | * functions: baz | |
178 | hg: parse error: can't use a key-value pair in this context |
|
178 | hg: parse error: can't use a key-value pair in this context | |
179 | [255] |
|
179 | [255] | |
180 |
|
180 | |||
181 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' |
|
181 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' | |
182 | foo |
|
182 | foo | |
183 |
|
183 | |||
184 | Call function which takes named arguments by filter syntax: |
|
184 | Call function which takes named arguments by filter syntax: | |
185 |
|
185 | |||
186 | $ hg debugtemplate '{" "|separate}' |
|
186 | $ hg debugtemplate '{" "|separate}' | |
187 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' |
|
187 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' | |
188 | hg: parse error: unknown method 'list' |
|
188 | hg: parse error: unknown method 'list' | |
189 | [255] |
|
189 | [255] | |
190 |
|
190 | |||
191 | Second branch starting at nullrev: |
|
191 | Second branch starting at nullrev: | |
192 |
|
192 | |||
193 | $ hg update null |
|
193 | $ hg update null | |
194 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
194 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
195 | $ echo second > second |
|
195 | $ echo second > second | |
196 | $ hg add second |
|
196 | $ hg add second | |
197 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' |
|
197 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' | |
198 | created new head |
|
198 | created new head | |
199 |
|
199 | |||
200 | $ echo third > third |
|
200 | $ echo third > third | |
201 | $ hg add third |
|
201 | $ hg add third | |
202 | $ hg mv second fourth |
|
202 | $ hg mv second fourth | |
203 | $ hg commit -m third -d "2020-01-01 10:01" |
|
203 | $ hg commit -m third -d "2020-01-01 10:01" | |
204 |
|
204 | |||
205 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . |
|
205 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . | |
206 | fourth (second) |
|
206 | fourth (second) | |
207 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . |
|
207 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . | |
208 | second -> fourth |
|
208 | second -> fourth | |
209 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 |
|
209 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 | |
210 | 8 t |
|
210 | 8 t | |
211 | 7 f |
|
211 | 7 f | |
212 |
|
212 | |||
213 | Working-directory revision has special identifiers, though they are still |
|
213 | Working-directory revision has special identifiers, though they are still | |
214 | experimental: |
|
214 | experimental: | |
215 |
|
215 | |||
216 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' |
|
216 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' | |
217 | 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
217 | 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
218 |
|
218 | |||
219 | Some keywords are invalid for working-directory revision, but they should |
|
219 | Some keywords are invalid for working-directory revision, but they should | |
220 | never cause crash: |
|
220 | never cause crash: | |
221 |
|
221 | |||
222 | $ hg log -r 'wdir()' -T '{manifest}\n' |
|
222 | $ hg log -r 'wdir()' -T '{manifest}\n' | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | Internal resources shouldn't be exposed (issue5699): |
|
225 | Internal resources shouldn't be exposed (issue5699): | |
226 |
|
226 | |||
227 | $ hg log -r. -T '{cache}{ctx}{repo}{revcache}{templ}{ui}' |
|
227 | $ hg log -r. -T '{cache}{ctx}{repo}{revcache}{templ}{ui}' | |
228 |
|
228 | |||
229 | Never crash on internal resource not available: |
|
229 | Never crash on internal resource not available: | |
230 |
|
230 | |||
231 | $ hg --cwd .. debugtemplate '{"c0bebeef"|shortest}\n' |
|
231 | $ hg --cwd .. debugtemplate '{"c0bebeef"|shortest}\n' | |
232 | abort: template resource not available: repo |
|
232 | abort: template resource not available: repo | |
233 | [255] |
|
233 | [255] | |
234 |
|
234 | |||
235 | $ hg config -T '{author}' |
|
235 | $ hg config -T '{author}' | |
236 |
|
236 | |||
237 | Quoting for ui.logtemplate |
|
237 | Quoting for ui.logtemplate | |
238 |
|
238 | |||
239 | $ hg tip --config "ui.logtemplate={rev}\n" |
|
239 | $ hg tip --config "ui.logtemplate={rev}\n" | |
240 | 8 |
|
240 | 8 | |
241 | $ hg tip --config "ui.logtemplate='{rev}\n'" |
|
241 | $ hg tip --config "ui.logtemplate='{rev}\n'" | |
242 | 8 |
|
242 | 8 | |
243 | $ hg tip --config 'ui.logtemplate="{rev}\n"' |
|
243 | $ hg tip --config 'ui.logtemplate="{rev}\n"' | |
244 | 8 |
|
244 | 8 | |
245 | $ hg tip --config 'ui.logtemplate=n{rev}\n' |
|
245 | $ hg tip --config 'ui.logtemplate=n{rev}\n' | |
246 | n8 |
|
246 | n8 | |
247 |
|
247 | |||
248 | Make sure user/global hgrc does not affect tests |
|
|||
249 |
|
||||
250 | $ echo '[ui]' > .hg/hgrc |
|
|||
251 | $ echo 'logtemplate =' >> .hg/hgrc |
|
|||
252 | $ echo 'style =' >> .hg/hgrc |
|
|||
253 |
|
||||
254 | Add some simple styles to settings |
|
|||
255 |
|
||||
256 | $ cat <<'EOF' >> .hg/hgrc |
|
|||
257 | > [templates] |
|
|||
258 | > simple = "{rev}\n" |
|
|||
259 | > simple2 = {rev}\n |
|
|||
260 | > rev = "should not precede {rev} keyword\n" |
|
|||
261 | > EOF |
|
|||
262 |
|
||||
263 | $ hg log -l1 -Tsimple |
|
|||
264 | 8 |
|
|||
265 | $ hg log -l1 -Tsimple2 |
|
|||
266 | 8 |
|
|||
267 | $ hg log -l1 -Trev |
|
|||
268 | should not precede 8 keyword |
|
|||
269 | $ hg log -l1 -T '{simple}' |
|
|||
270 | 8 |
|
|||
271 |
|
||||
272 | Map file shouldn't see user templates: |
|
|||
273 |
|
||||
274 | $ cat <<EOF > tmpl |
|
|||
275 | > changeset = 'nothing expanded:{simple}\n' |
|
|||
276 | > EOF |
|
|||
277 | $ hg log -l1 --style ./tmpl |
|
|||
278 | nothing expanded: |
|
|||
279 |
|
||||
280 | Test templates and style maps in files: |
|
|||
281 |
|
||||
282 | $ echo "{rev}" > tmpl |
|
|||
283 | $ hg log -l1 -T./tmpl |
|
|||
284 | 8 |
|
|||
285 | $ hg log -l1 -Tblah/blah |
|
|||
286 | blah/blah (no-eol) |
|
|||
287 |
|
||||
288 | $ printf 'changeset = "{rev}\\n"\n' > map-simple |
|
|||
289 | $ hg log -l1 -T./map-simple |
|
|||
290 | 8 |
|
|||
291 |
|
||||
292 | a map file may have [templates] and [templatealias] sections: |
|
|||
293 |
|
||||
294 | $ cat <<'EOF' > map-simple |
|
|||
295 | > [templates] |
|
|||
296 | > changeset = "{a}\n" |
|
|||
297 | > [templatealias] |
|
|||
298 | > a = rev |
|
|||
299 | > EOF |
|
|||
300 | $ hg log -l1 -T./map-simple |
|
|||
301 | 8 |
|
|||
302 |
|
||||
303 | so it can be included in hgrc |
|
|||
304 |
|
||||
305 | $ cat <<EOF > myhgrc |
|
|||
306 | > %include $HGRCPATH |
|
|||
307 | > %include map-simple |
|
|||
308 | > [templates] |
|
|||
309 | > foo = "{changeset}" |
|
|||
310 | > EOF |
|
|||
311 | $ HGRCPATH=./myhgrc hg log -l1 -Tfoo |
|
|||
312 | 8 |
|
|||
313 | $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' |
|
|||
314 | 8 |
|
|||
315 |
|
||||
316 | Test template map inheritance |
|
|||
317 |
|
||||
318 | $ echo "__base__ = map-cmdline.default" > map-simple |
|
|||
319 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple |
|
|||
320 | $ hg log -l1 -T./map-simple |
|
|||
321 | changeset: ***8*** |
|
|||
322 | tag: tip |
|
|||
323 | user: test |
|
|||
324 | date: Wed Jan 01 10:01:00 2020 +0000 |
|
|||
325 | summary: third |
|
|||
326 |
|
||||
327 |
|
||||
328 | Test docheader, docfooter and separator in template map |
|
|||
329 |
|
||||
330 | $ cat <<'EOF' > map-myjson |
|
|||
331 | > docheader = '\{\n' |
|
|||
332 | > docfooter = '\n}\n' |
|
|||
333 | > separator = ',\n' |
|
|||
334 | > changeset = ' {dict(rev, node|short)|json}' |
|
|||
335 | > EOF |
|
|||
336 | $ hg log -l2 -T./map-myjson |
|
|||
337 | { |
|
|||
338 | {"node": "95c24699272e", "rev": 8}, |
|
|||
339 | {"node": "29114dbae42b", "rev": 7} |
|
|||
340 | } |
|
|||
341 |
|
||||
342 | Test docheader, docfooter and separator in [templates] section |
|
|||
343 |
|
||||
344 | $ cat <<'EOF' >> .hg/hgrc |
|
|||
345 | > [templates] |
|
|||
346 | > myjson = ' {dict(rev, node|short)|json}' |
|
|||
347 | > myjson:docheader = '\{\n' |
|
|||
348 | > myjson:docfooter = '\n}\n' |
|
|||
349 | > myjson:separator = ',\n' |
|
|||
350 | > :docheader = 'should not be selected as a docheader for literal templates\n' |
|
|||
351 | > EOF |
|
|||
352 | $ hg log -l2 -Tmyjson |
|
|||
353 | { |
|
|||
354 | {"node": "95c24699272e", "rev": 8}, |
|
|||
355 | {"node": "29114dbae42b", "rev": 7} |
|
|||
356 | } |
|
|||
357 | $ hg log -l1 -T'{rev}\n' |
|
|||
358 | 8 |
|
|||
359 |
|
||||
360 | Template should precede style option |
|
|||
361 |
|
||||
362 | $ hg log -l1 --style default -T '{rev}\n' |
|
|||
363 | 8 |
|
|||
364 |
|
||||
365 | Add a commit with empty description, to ensure that the templates |
|
|||
366 | below will omit the description line. |
|
|||
367 |
|
||||
368 | $ echo c >> c |
|
|||
369 | $ hg add c |
|
|||
370 | $ hg commit -qm ' ' |
|
|||
371 |
|
||||
372 | Default style is like normal output. Phases style should be the same |
|
|||
373 | as default style, except for extra phase lines. |
|
|||
374 |
|
||||
375 | $ hg log > log.out |
|
|||
376 | $ hg log --style default > style.out |
|
|||
377 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
378 | $ hg log -T phases > phases.out |
|
|||
379 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
|||
380 | +phase: draft |
|
|||
381 | +phase: draft |
|
|||
382 | +phase: draft |
|
|||
383 | +phase: draft |
|
|||
384 | +phase: draft |
|
|||
385 | +phase: draft |
|
|||
386 | +phase: draft |
|
|||
387 | +phase: draft |
|
|||
388 | +phase: draft |
|
|||
389 | +phase: draft |
|
|||
390 |
|
||||
391 | $ hg log -v > log.out |
|
|||
392 | $ hg log -v --style default > style.out |
|
|||
393 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
394 | $ hg log -v -T phases > phases.out |
|
|||
395 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
|||
396 | +phase: draft |
|
|||
397 | +phase: draft |
|
|||
398 | +phase: draft |
|
|||
399 | +phase: draft |
|
|||
400 | +phase: draft |
|
|||
401 | +phase: draft |
|
|||
402 | +phase: draft |
|
|||
403 | +phase: draft |
|
|||
404 | +phase: draft |
|
|||
405 | +phase: draft |
|
|||
406 |
|
||||
407 | $ hg log -q > log.out |
|
|||
408 | $ hg log -q --style default > style.out |
|
|||
409 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
410 | $ hg log -q -T phases > phases.out |
|
|||
411 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
|||
412 |
|
||||
413 | $ hg log --debug > log.out |
|
|||
414 | $ hg log --debug --style default > style.out |
|
|||
415 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
416 | $ hg log --debug -T phases > phases.out |
|
|||
417 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
|||
418 |
|
||||
419 | Default style of working-directory revision should also be the same (but |
|
|||
420 | date may change while running tests): |
|
|||
421 |
|
||||
422 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out |
|
|||
423 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out |
|
|||
424 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
425 |
|
||||
426 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out |
|
|||
427 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out |
|
|||
428 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
429 |
|
||||
430 | $ hg log -r 'wdir()' -q > log.out |
|
|||
431 | $ hg log -r 'wdir()' -q --style default > style.out |
|
|||
432 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
433 |
|
||||
434 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out |
|
|||
435 | $ hg log -r 'wdir()' --debug --style default \ |
|
|||
436 | > | sed 's|^date:.*|date:|' > style.out |
|
|||
437 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
438 |
|
||||
439 | Default style should also preserve color information (issue2866): |
|
|||
440 |
|
||||
441 | $ cp $HGRCPATH $HGRCPATH-bak |
|
|||
442 | $ cat <<EOF >> $HGRCPATH |
|
|||
443 | > [extensions] |
|
|||
444 | > color= |
|
|||
445 | > EOF |
|
|||
446 |
|
||||
447 | $ hg --color=debug log > log.out |
|
|||
448 | $ hg --color=debug log --style default > style.out |
|
|||
449 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
450 | $ hg --color=debug log -T phases > phases.out |
|
|||
451 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
|||
452 | +[log.phase|phase: draft] |
|
|||
453 | +[log.phase|phase: draft] |
|
|||
454 | +[log.phase|phase: draft] |
|
|||
455 | +[log.phase|phase: draft] |
|
|||
456 | +[log.phase|phase: draft] |
|
|||
457 | +[log.phase|phase: draft] |
|
|||
458 | +[log.phase|phase: draft] |
|
|||
459 | +[log.phase|phase: draft] |
|
|||
460 | +[log.phase|phase: draft] |
|
|||
461 | +[log.phase|phase: draft] |
|
|||
462 |
|
||||
463 | $ hg --color=debug -v log > log.out |
|
|||
464 | $ hg --color=debug -v log --style default > style.out |
|
|||
465 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
466 | $ hg --color=debug -v log -T phases > phases.out |
|
|||
467 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
|||
468 | +[log.phase|phase: draft] |
|
|||
469 | +[log.phase|phase: draft] |
|
|||
470 | +[log.phase|phase: draft] |
|
|||
471 | +[log.phase|phase: draft] |
|
|||
472 | +[log.phase|phase: draft] |
|
|||
473 | +[log.phase|phase: draft] |
|
|||
474 | +[log.phase|phase: draft] |
|
|||
475 | +[log.phase|phase: draft] |
|
|||
476 | +[log.phase|phase: draft] |
|
|||
477 | +[log.phase|phase: draft] |
|
|||
478 |
|
||||
479 | $ hg --color=debug -q log > log.out |
|
|||
480 | $ hg --color=debug -q log --style default > style.out |
|
|||
481 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
482 | $ hg --color=debug -q log -T phases > phases.out |
|
|||
483 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
|||
484 |
|
||||
485 | $ hg --color=debug --debug log > log.out |
|
|||
486 | $ hg --color=debug --debug log --style default > style.out |
|
|||
487 | $ cmp log.out style.out || diff -u log.out style.out |
|
|||
488 | $ hg --color=debug --debug log -T phases > phases.out |
|
|||
489 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
|||
490 |
|
||||
491 | $ mv $HGRCPATH-bak $HGRCPATH |
|
|||
492 |
|
||||
493 | Remove commit with empty commit message, so as to not pollute further |
|
|||
494 | tests. |
|
|||
495 |
|
||||
496 | $ hg --config extensions.strip= strip -q . |
|
|||
497 |
|
||||
498 | Revision with no copies (used to print a traceback): |
|
|||
499 |
|
||||
500 | $ hg tip -v --template '\n' |
|
|||
501 |
|
||||
502 |
|
||||
503 | Compact style works: |
|
|||
504 |
|
||||
505 | $ hg log -Tcompact |
|
|||
506 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
|||
507 | third |
|
|||
508 |
|
||||
509 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user |
|
|||
510 | second |
|
|||
511 |
|
||||
512 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
|||
513 | merge |
|
|||
514 |
|
||||
515 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
|||
516 | new head |
|
|||
517 |
|
||||
518 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
|||
519 | new branch |
|
|||
520 |
|
||||
521 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
|||
522 | no user, no domain |
|
|||
523 |
|
||||
524 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other |
|
|||
525 | no person |
|
|||
526 |
|
||||
527 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other |
|
|||
528 | other 1 |
|
|||
529 |
|
||||
530 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user |
|
|||
531 | line 1 |
|
|||
532 |
|
||||
533 |
|
||||
534 | $ hg log -v --style compact |
|
|||
535 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
|||
536 | third |
|
|||
537 |
|
||||
538 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
|||
539 | second |
|
|||
540 |
|
||||
541 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
|||
542 | merge |
|
|||
543 |
|
||||
544 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
|||
545 | new head |
|
|||
546 |
|
||||
547 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
|||
548 | new branch |
|
|||
549 |
|
||||
550 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
|||
551 | no user, no domain |
|
|||
552 |
|
||||
553 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
|||
554 | no person |
|
|||
555 |
|
||||
556 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
|||
557 | other 1 |
|
|||
558 | other 2 |
|
|||
559 |
|
||||
560 | other 3 |
|
|||
561 |
|
||||
562 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
|||
563 | line 1 |
|
|||
564 | line 2 |
|
|||
565 |
|
||||
566 |
|
||||
567 | $ hg log --debug --style compact |
|
|||
568 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test |
|
|||
569 | third |
|
|||
570 |
|
||||
571 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
|||
572 | second |
|
|||
573 |
|
||||
574 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
|||
575 | merge |
|
|||
576 |
|
||||
577 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
|||
578 | new head |
|
|||
579 |
|
||||
580 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
|||
581 | new branch |
|
|||
582 |
|
||||
583 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
|||
584 | no user, no domain |
|
|||
585 |
|
||||
586 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
|||
587 | no person |
|
|||
588 |
|
||||
589 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
|||
590 | other 1 |
|
|||
591 | other 2 |
|
|||
592 |
|
||||
593 | other 3 |
|
|||
594 |
|
||||
595 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
|||
596 | line 1 |
|
|||
597 | line 2 |
|
|||
598 |
|
||||
599 |
|
||||
600 | Test xml styles: |
|
|||
601 |
|
||||
602 | $ hg log --style xml -r 'not all()' |
|
|||
603 | <?xml version="1.0"?> |
|
|||
604 | <log> |
|
|||
605 | </log> |
|
|||
606 |
|
||||
607 | $ hg log --style xml |
|
|||
608 | <?xml version="1.0"?> |
|
|||
609 | <log> |
|
|||
610 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
|||
611 | <tag>tip</tag> |
|
|||
612 | <author email="test">test</author> |
|
|||
613 | <date>2020-01-01T10:01:00+00:00</date> |
|
|||
614 | <msg xml:space="preserve">third</msg> |
|
|||
615 | </logentry> |
|
|||
616 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
|||
617 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
618 | <author email="user@hostname">User Name</author> |
|
|||
619 | <date>1970-01-12T13:46:40+00:00</date> |
|
|||
620 | <msg xml:space="preserve">second</msg> |
|
|||
621 | </logentry> |
|
|||
622 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
|||
623 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
|||
624 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
|||
625 | <author email="person">person</author> |
|
|||
626 | <date>1970-01-18T08:40:01+00:00</date> |
|
|||
627 | <msg xml:space="preserve">merge</msg> |
|
|||
628 | </logentry> |
|
|||
629 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
|||
630 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
|||
631 | <author email="person">person</author> |
|
|||
632 | <date>1970-01-18T08:40:00+00:00</date> |
|
|||
633 | <msg xml:space="preserve">new head</msg> |
|
|||
634 | </logentry> |
|
|||
635 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
|||
636 | <branch>foo</branch> |
|
|||
637 | <author email="person">person</author> |
|
|||
638 | <date>1970-01-17T04:53:20+00:00</date> |
|
|||
639 | <msg xml:space="preserve">new branch</msg> |
|
|||
640 | </logentry> |
|
|||
641 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
|||
642 | <author email="person">person</author> |
|
|||
643 | <date>1970-01-16T01:06:40+00:00</date> |
|
|||
644 | <msg xml:space="preserve">no user, no domain</msg> |
|
|||
645 | </logentry> |
|
|||
646 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
|||
647 | <author email="other@place">other</author> |
|
|||
648 | <date>1970-01-14T21:20:00+00:00</date> |
|
|||
649 | <msg xml:space="preserve">no person</msg> |
|
|||
650 | </logentry> |
|
|||
651 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
|||
652 | <author email="other@place">A. N. Other</author> |
|
|||
653 | <date>1970-01-13T17:33:20+00:00</date> |
|
|||
654 | <msg xml:space="preserve">other 1 |
|
|||
655 | other 2 |
|
|||
656 |
|
||||
657 | other 3</msg> |
|
|||
658 | </logentry> |
|
|||
659 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
|||
660 | <author email="user@hostname">User Name</author> |
|
|||
661 | <date>1970-01-12T13:46:40+00:00</date> |
|
|||
662 | <msg xml:space="preserve">line 1 |
|
|||
663 | line 2</msg> |
|
|||
664 | </logentry> |
|
|||
665 | </log> |
|
|||
666 |
|
||||
667 | $ hg log -v --style xml |
|
|||
668 | <?xml version="1.0"?> |
|
|||
669 | <log> |
|
|||
670 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
|||
671 | <tag>tip</tag> |
|
|||
672 | <author email="test">test</author> |
|
|||
673 | <date>2020-01-01T10:01:00+00:00</date> |
|
|||
674 | <msg xml:space="preserve">third</msg> |
|
|||
675 | <paths> |
|
|||
676 | <path action="A">fourth</path> |
|
|||
677 | <path action="A">third</path> |
|
|||
678 | <path action="R">second</path> |
|
|||
679 | </paths> |
|
|||
680 | <copies> |
|
|||
681 | <copy source="second">fourth</copy> |
|
|||
682 | </copies> |
|
|||
683 | </logentry> |
|
|||
684 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
|||
685 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
686 | <author email="user@hostname">User Name</author> |
|
|||
687 | <date>1970-01-12T13:46:40+00:00</date> |
|
|||
688 | <msg xml:space="preserve">second</msg> |
|
|||
689 | <paths> |
|
|||
690 | <path action="A">second</path> |
|
|||
691 | </paths> |
|
|||
692 | </logentry> |
|
|||
693 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
|||
694 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
|||
695 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
|||
696 | <author email="person">person</author> |
|
|||
697 | <date>1970-01-18T08:40:01+00:00</date> |
|
|||
698 | <msg xml:space="preserve">merge</msg> |
|
|||
699 | <paths> |
|
|||
700 | </paths> |
|
|||
701 | </logentry> |
|
|||
702 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
|||
703 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
|||
704 | <author email="person">person</author> |
|
|||
705 | <date>1970-01-18T08:40:00+00:00</date> |
|
|||
706 | <msg xml:space="preserve">new head</msg> |
|
|||
707 | <paths> |
|
|||
708 | <path action="A">d</path> |
|
|||
709 | </paths> |
|
|||
710 | </logentry> |
|
|||
711 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
|||
712 | <branch>foo</branch> |
|
|||
713 | <author email="person">person</author> |
|
|||
714 | <date>1970-01-17T04:53:20+00:00</date> |
|
|||
715 | <msg xml:space="preserve">new branch</msg> |
|
|||
716 | <paths> |
|
|||
717 | </paths> |
|
|||
718 | </logentry> |
|
|||
719 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
|||
720 | <author email="person">person</author> |
|
|||
721 | <date>1970-01-16T01:06:40+00:00</date> |
|
|||
722 | <msg xml:space="preserve">no user, no domain</msg> |
|
|||
723 | <paths> |
|
|||
724 | <path action="M">c</path> |
|
|||
725 | </paths> |
|
|||
726 | </logentry> |
|
|||
727 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
|||
728 | <author email="other@place">other</author> |
|
|||
729 | <date>1970-01-14T21:20:00+00:00</date> |
|
|||
730 | <msg xml:space="preserve">no person</msg> |
|
|||
731 | <paths> |
|
|||
732 | <path action="A">c</path> |
|
|||
733 | </paths> |
|
|||
734 | </logentry> |
|
|||
735 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
|||
736 | <author email="other@place">A. N. Other</author> |
|
|||
737 | <date>1970-01-13T17:33:20+00:00</date> |
|
|||
738 | <msg xml:space="preserve">other 1 |
|
|||
739 | other 2 |
|
|||
740 |
|
||||
741 | other 3</msg> |
|
|||
742 | <paths> |
|
|||
743 | <path action="A">b</path> |
|
|||
744 | </paths> |
|
|||
745 | </logentry> |
|
|||
746 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
|||
747 | <author email="user@hostname">User Name</author> |
|
|||
748 | <date>1970-01-12T13:46:40+00:00</date> |
|
|||
749 | <msg xml:space="preserve">line 1 |
|
|||
750 | line 2</msg> |
|
|||
751 | <paths> |
|
|||
752 | <path action="A">a</path> |
|
|||
753 | </paths> |
|
|||
754 | </logentry> |
|
|||
755 | </log> |
|
|||
756 |
|
||||
757 | $ hg log --debug --style xml |
|
|||
758 | <?xml version="1.0"?> |
|
|||
759 | <log> |
|
|||
760 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
|||
761 | <tag>tip</tag> |
|
|||
762 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> |
|
|||
763 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
764 | <author email="test">test</author> |
|
|||
765 | <date>2020-01-01T10:01:00+00:00</date> |
|
|||
766 | <msg xml:space="preserve">third</msg> |
|
|||
767 | <paths> |
|
|||
768 | <path action="A">fourth</path> |
|
|||
769 | <path action="A">third</path> |
|
|||
770 | <path action="R">second</path> |
|
|||
771 | </paths> |
|
|||
772 | <copies> |
|
|||
773 | <copy source="second">fourth</copy> |
|
|||
774 | </copies> |
|
|||
775 | <extra key="branch">default</extra> |
|
|||
776 | </logentry> |
|
|||
777 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
|||
778 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
779 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
780 | <author email="user@hostname">User Name</author> |
|
|||
781 | <date>1970-01-12T13:46:40+00:00</date> |
|
|||
782 | <msg xml:space="preserve">second</msg> |
|
|||
783 | <paths> |
|
|||
784 | <path action="A">second</path> |
|
|||
785 | </paths> |
|
|||
786 | <extra key="branch">default</extra> |
|
|||
787 | </logentry> |
|
|||
788 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
|||
789 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
|||
790 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
|||
791 | <author email="person">person</author> |
|
|||
792 | <date>1970-01-18T08:40:01+00:00</date> |
|
|||
793 | <msg xml:space="preserve">merge</msg> |
|
|||
794 | <paths> |
|
|||
795 | </paths> |
|
|||
796 | <extra key="branch">default</extra> |
|
|||
797 | </logentry> |
|
|||
798 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
|||
799 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
|||
800 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
801 | <author email="person">person</author> |
|
|||
802 | <date>1970-01-18T08:40:00+00:00</date> |
|
|||
803 | <msg xml:space="preserve">new head</msg> |
|
|||
804 | <paths> |
|
|||
805 | <path action="A">d</path> |
|
|||
806 | </paths> |
|
|||
807 | <extra key="branch">default</extra> |
|
|||
808 | </logentry> |
|
|||
809 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
|||
810 | <branch>foo</branch> |
|
|||
811 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
|||
812 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
813 | <author email="person">person</author> |
|
|||
814 | <date>1970-01-17T04:53:20+00:00</date> |
|
|||
815 | <msg xml:space="preserve">new branch</msg> |
|
|||
816 | <paths> |
|
|||
817 | </paths> |
|
|||
818 | <extra key="branch">foo</extra> |
|
|||
819 | </logentry> |
|
|||
820 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
|||
821 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> |
|
|||
822 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
823 | <author email="person">person</author> |
|
|||
824 | <date>1970-01-16T01:06:40+00:00</date> |
|
|||
825 | <msg xml:space="preserve">no user, no domain</msg> |
|
|||
826 | <paths> |
|
|||
827 | <path action="M">c</path> |
|
|||
828 | </paths> |
|
|||
829 | <extra key="branch">default</extra> |
|
|||
830 | </logentry> |
|
|||
831 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
|||
832 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> |
|
|||
833 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
834 | <author email="other@place">other</author> |
|
|||
835 | <date>1970-01-14T21:20:00+00:00</date> |
|
|||
836 | <msg xml:space="preserve">no person</msg> |
|
|||
837 | <paths> |
|
|||
838 | <path action="A">c</path> |
|
|||
839 | </paths> |
|
|||
840 | <extra key="branch">default</extra> |
|
|||
841 | </logentry> |
|
|||
842 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
|||
843 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> |
|
|||
844 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
845 | <author email="other@place">A. N. Other</author> |
|
|||
846 | <date>1970-01-13T17:33:20+00:00</date> |
|
|||
847 | <msg xml:space="preserve">other 1 |
|
|||
848 | other 2 |
|
|||
849 |
|
||||
850 | other 3</msg> |
|
|||
851 | <paths> |
|
|||
852 | <path action="A">b</path> |
|
|||
853 | </paths> |
|
|||
854 | <extra key="branch">default</extra> |
|
|||
855 | </logentry> |
|
|||
856 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
|||
857 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
858 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
|||
859 | <author email="user@hostname">User Name</author> |
|
|||
860 | <date>1970-01-12T13:46:40+00:00</date> |
|
|||
861 | <msg xml:space="preserve">line 1 |
|
|||
862 | line 2</msg> |
|
|||
863 | <paths> |
|
|||
864 | <path action="A">a</path> |
|
|||
865 | </paths> |
|
|||
866 | <extra key="branch">default</extra> |
|
|||
867 | </logentry> |
|
|||
868 | </log> |
|
|||
869 |
|
||||
870 |
|
||||
871 | Test JSON style: |
|
|||
872 |
|
||||
873 | $ hg log -k nosuch -Tjson |
|
|||
874 | [ |
|
|||
875 | ] |
|
|||
876 |
|
||||
877 | $ hg log -qr . -Tjson |
|
|||
878 | [ |
|
|||
879 | { |
|
|||
880 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
|||
881 | "rev": 8 |
|
|||
882 | } |
|
|||
883 | ] |
|
|||
884 |
|
||||
885 | $ hg log -vpr . -Tjson --stat |
|
|||
886 | [ |
|
|||
887 | { |
|
|||
888 | "bookmarks": [], |
|
|||
889 | "branch": "default", |
|
|||
890 | "date": [1577872860, 0], |
|
|||
891 | "desc": "third", |
|
|||
892 | "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", |
|
|||
893 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", |
|
|||
894 | "files": ["fourth", "second", "third"], |
|
|||
895 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
|||
896 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
|||
897 | "phase": "draft", |
|
|||
898 | "rev": 8, |
|
|||
899 | "tags": ["tip"], |
|
|||
900 | "user": "test" |
|
|||
901 | } |
|
|||
902 | ] |
|
|||
903 |
|
||||
904 | honor --git but not format-breaking diffopts |
|
|||
905 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson |
|
|||
906 | [ |
|
|||
907 | { |
|
|||
908 | "bookmarks": [], |
|
|||
909 | "branch": "default", |
|
|||
910 | "date": [1577872860, 0], |
|
|||
911 | "desc": "third", |
|
|||
912 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n", |
|
|||
913 | "files": ["fourth", "second", "third"], |
|
|||
914 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
|||
915 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
|||
916 | "phase": "draft", |
|
|||
917 | "rev": 8, |
|
|||
918 | "tags": ["tip"], |
|
|||
919 | "user": "test" |
|
|||
920 | } |
|
|||
921 | ] |
|
|||
922 |
|
||||
923 | $ hg log -T json |
|
|||
924 | [ |
|
|||
925 | { |
|
|||
926 | "bookmarks": [], |
|
|||
927 | "branch": "default", |
|
|||
928 | "date": [1577872860, 0], |
|
|||
929 | "desc": "third", |
|
|||
930 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
|||
931 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
|||
932 | "phase": "draft", |
|
|||
933 | "rev": 8, |
|
|||
934 | "tags": ["tip"], |
|
|||
935 | "user": "test" |
|
|||
936 | }, |
|
|||
937 | { |
|
|||
938 | "bookmarks": [], |
|
|||
939 | "branch": "default", |
|
|||
940 | "date": [1000000, 0], |
|
|||
941 | "desc": "second", |
|
|||
942 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
|||
943 | "parents": ["0000000000000000000000000000000000000000"], |
|
|||
944 | "phase": "draft", |
|
|||
945 | "rev": 7, |
|
|||
946 | "tags": [], |
|
|||
947 | "user": "User Name <user@hostname>" |
|
|||
948 | }, |
|
|||
949 | { |
|
|||
950 | "bookmarks": [], |
|
|||
951 | "branch": "default", |
|
|||
952 | "date": [1500001, 0], |
|
|||
953 | "desc": "merge", |
|
|||
954 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
|||
955 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
|||
956 | "phase": "draft", |
|
|||
957 | "rev": 6, |
|
|||
958 | "tags": [], |
|
|||
959 | "user": "person" |
|
|||
960 | }, |
|
|||
961 | { |
|
|||
962 | "bookmarks": [], |
|
|||
963 | "branch": "default", |
|
|||
964 | "date": [1500000, 0], |
|
|||
965 | "desc": "new head", |
|
|||
966 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
|||
967 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
|||
968 | "phase": "draft", |
|
|||
969 | "rev": 5, |
|
|||
970 | "tags": [], |
|
|||
971 | "user": "person" |
|
|||
972 | }, |
|
|||
973 | { |
|
|||
974 | "bookmarks": [], |
|
|||
975 | "branch": "foo", |
|
|||
976 | "date": [1400000, 0], |
|
|||
977 | "desc": "new branch", |
|
|||
978 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
|||
979 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
|||
980 | "phase": "draft", |
|
|||
981 | "rev": 4, |
|
|||
982 | "tags": [], |
|
|||
983 | "user": "person" |
|
|||
984 | }, |
|
|||
985 | { |
|
|||
986 | "bookmarks": [], |
|
|||
987 | "branch": "default", |
|
|||
988 | "date": [1300000, 0], |
|
|||
989 | "desc": "no user, no domain", |
|
|||
990 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
|||
991 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
|||
992 | "phase": "draft", |
|
|||
993 | "rev": 3, |
|
|||
994 | "tags": [], |
|
|||
995 | "user": "person" |
|
|||
996 | }, |
|
|||
997 | { |
|
|||
998 | "bookmarks": [], |
|
|||
999 | "branch": "default", |
|
|||
1000 | "date": [1200000, 0], |
|
|||
1001 | "desc": "no person", |
|
|||
1002 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
|||
1003 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
|||
1004 | "phase": "draft", |
|
|||
1005 | "rev": 2, |
|
|||
1006 | "tags": [], |
|
|||
1007 | "user": "other@place" |
|
|||
1008 | }, |
|
|||
1009 | { |
|
|||
1010 | "bookmarks": [], |
|
|||
1011 | "branch": "default", |
|
|||
1012 | "date": [1100000, 0], |
|
|||
1013 | "desc": "other 1\nother 2\n\nother 3", |
|
|||
1014 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
|||
1015 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
|||
1016 | "phase": "draft", |
|
|||
1017 | "rev": 1, |
|
|||
1018 | "tags": [], |
|
|||
1019 | "user": "A. N. Other <other@place>" |
|
|||
1020 | }, |
|
|||
1021 | { |
|
|||
1022 | "bookmarks": [], |
|
|||
1023 | "branch": "default", |
|
|||
1024 | "date": [1000000, 0], |
|
|||
1025 | "desc": "line 1\nline 2", |
|
|||
1026 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
|||
1027 | "parents": ["0000000000000000000000000000000000000000"], |
|
|||
1028 | "phase": "draft", |
|
|||
1029 | "rev": 0, |
|
|||
1030 | "tags": [], |
|
|||
1031 | "user": "User Name <user@hostname>" |
|
|||
1032 | } |
|
|||
1033 | ] |
|
|||
1034 |
|
||||
1035 | $ hg heads -v -Tjson |
|
|||
1036 | [ |
|
|||
1037 | { |
|
|||
1038 | "bookmarks": [], |
|
|||
1039 | "branch": "default", |
|
|||
1040 | "date": [1577872860, 0], |
|
|||
1041 | "desc": "third", |
|
|||
1042 | "files": ["fourth", "second", "third"], |
|
|||
1043 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
|||
1044 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
|||
1045 | "phase": "draft", |
|
|||
1046 | "rev": 8, |
|
|||
1047 | "tags": ["tip"], |
|
|||
1048 | "user": "test" |
|
|||
1049 | }, |
|
|||
1050 | { |
|
|||
1051 | "bookmarks": [], |
|
|||
1052 | "branch": "default", |
|
|||
1053 | "date": [1500001, 0], |
|
|||
1054 | "desc": "merge", |
|
|||
1055 | "files": [], |
|
|||
1056 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
|||
1057 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
|||
1058 | "phase": "draft", |
|
|||
1059 | "rev": 6, |
|
|||
1060 | "tags": [], |
|
|||
1061 | "user": "person" |
|
|||
1062 | }, |
|
|||
1063 | { |
|
|||
1064 | "bookmarks": [], |
|
|||
1065 | "branch": "foo", |
|
|||
1066 | "date": [1400000, 0], |
|
|||
1067 | "desc": "new branch", |
|
|||
1068 | "files": [], |
|
|||
1069 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
|||
1070 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
|||
1071 | "phase": "draft", |
|
|||
1072 | "rev": 4, |
|
|||
1073 | "tags": [], |
|
|||
1074 | "user": "person" |
|
|||
1075 | } |
|
|||
1076 | ] |
|
|||
1077 |
|
||||
1078 | $ hg log --debug -Tjson |
|
|||
1079 | [ |
|
|||
1080 | { |
|
|||
1081 | "added": ["fourth", "third"], |
|
|||
1082 | "bookmarks": [], |
|
|||
1083 | "branch": "default", |
|
|||
1084 | "date": [1577872860, 0], |
|
|||
1085 | "desc": "third", |
|
|||
1086 | "extra": {"branch": "default"}, |
|
|||
1087 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", |
|
|||
1088 | "modified": [], |
|
|||
1089 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
|||
1090 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
|||
1091 | "phase": "draft", |
|
|||
1092 | "removed": ["second"], |
|
|||
1093 | "rev": 8, |
|
|||
1094 | "tags": ["tip"], |
|
|||
1095 | "user": "test" |
|
|||
1096 | }, |
|
|||
1097 | { |
|
|||
1098 | "added": ["second"], |
|
|||
1099 | "bookmarks": [], |
|
|||
1100 | "branch": "default", |
|
|||
1101 | "date": [1000000, 0], |
|
|||
1102 | "desc": "second", |
|
|||
1103 | "extra": {"branch": "default"}, |
|
|||
1104 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", |
|
|||
1105 | "modified": [], |
|
|||
1106 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
|||
1107 | "parents": ["0000000000000000000000000000000000000000"], |
|
|||
1108 | "phase": "draft", |
|
|||
1109 | "removed": [], |
|
|||
1110 | "rev": 7, |
|
|||
1111 | "tags": [], |
|
|||
1112 | "user": "User Name <user@hostname>" |
|
|||
1113 | }, |
|
|||
1114 | { |
|
|||
1115 | "added": [], |
|
|||
1116 | "bookmarks": [], |
|
|||
1117 | "branch": "default", |
|
|||
1118 | "date": [1500001, 0], |
|
|||
1119 | "desc": "merge", |
|
|||
1120 | "extra": {"branch": "default"}, |
|
|||
1121 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
|||
1122 | "modified": [], |
|
|||
1123 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
|||
1124 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
|||
1125 | "phase": "draft", |
|
|||
1126 | "removed": [], |
|
|||
1127 | "rev": 6, |
|
|||
1128 | "tags": [], |
|
|||
1129 | "user": "person" |
|
|||
1130 | }, |
|
|||
1131 | { |
|
|||
1132 | "added": ["d"], |
|
|||
1133 | "bookmarks": [], |
|
|||
1134 | "branch": "default", |
|
|||
1135 | "date": [1500000, 0], |
|
|||
1136 | "desc": "new head", |
|
|||
1137 | "extra": {"branch": "default"}, |
|
|||
1138 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
|||
1139 | "modified": [], |
|
|||
1140 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
|||
1141 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
|||
1142 | "phase": "draft", |
|
|||
1143 | "removed": [], |
|
|||
1144 | "rev": 5, |
|
|||
1145 | "tags": [], |
|
|||
1146 | "user": "person" |
|
|||
1147 | }, |
|
|||
1148 | { |
|
|||
1149 | "added": [], |
|
|||
1150 | "bookmarks": [], |
|
|||
1151 | "branch": "foo", |
|
|||
1152 | "date": [1400000, 0], |
|
|||
1153 | "desc": "new branch", |
|
|||
1154 | "extra": {"branch": "foo"}, |
|
|||
1155 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
|||
1156 | "modified": [], |
|
|||
1157 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
|||
1158 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
|||
1159 | "phase": "draft", |
|
|||
1160 | "removed": [], |
|
|||
1161 | "rev": 4, |
|
|||
1162 | "tags": [], |
|
|||
1163 | "user": "person" |
|
|||
1164 | }, |
|
|||
1165 | { |
|
|||
1166 | "added": [], |
|
|||
1167 | "bookmarks": [], |
|
|||
1168 | "branch": "default", |
|
|||
1169 | "date": [1300000, 0], |
|
|||
1170 | "desc": "no user, no domain", |
|
|||
1171 | "extra": {"branch": "default"}, |
|
|||
1172 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
|||
1173 | "modified": ["c"], |
|
|||
1174 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
|||
1175 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
|||
1176 | "phase": "draft", |
|
|||
1177 | "removed": [], |
|
|||
1178 | "rev": 3, |
|
|||
1179 | "tags": [], |
|
|||
1180 | "user": "person" |
|
|||
1181 | }, |
|
|||
1182 | { |
|
|||
1183 | "added": ["c"], |
|
|||
1184 | "bookmarks": [], |
|
|||
1185 | "branch": "default", |
|
|||
1186 | "date": [1200000, 0], |
|
|||
1187 | "desc": "no person", |
|
|||
1188 | "extra": {"branch": "default"}, |
|
|||
1189 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", |
|
|||
1190 | "modified": [], |
|
|||
1191 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
|||
1192 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
|||
1193 | "phase": "draft", |
|
|||
1194 | "removed": [], |
|
|||
1195 | "rev": 2, |
|
|||
1196 | "tags": [], |
|
|||
1197 | "user": "other@place" |
|
|||
1198 | }, |
|
|||
1199 | { |
|
|||
1200 | "added": ["b"], |
|
|||
1201 | "bookmarks": [], |
|
|||
1202 | "branch": "default", |
|
|||
1203 | "date": [1100000, 0], |
|
|||
1204 | "desc": "other 1\nother 2\n\nother 3", |
|
|||
1205 | "extra": {"branch": "default"}, |
|
|||
1206 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", |
|
|||
1207 | "modified": [], |
|
|||
1208 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
|||
1209 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
|||
1210 | "phase": "draft", |
|
|||
1211 | "removed": [], |
|
|||
1212 | "rev": 1, |
|
|||
1213 | "tags": [], |
|
|||
1214 | "user": "A. N. Other <other@place>" |
|
|||
1215 | }, |
|
|||
1216 | { |
|
|||
1217 | "added": ["a"], |
|
|||
1218 | "bookmarks": [], |
|
|||
1219 | "branch": "default", |
|
|||
1220 | "date": [1000000, 0], |
|
|||
1221 | "desc": "line 1\nline 2", |
|
|||
1222 | "extra": {"branch": "default"}, |
|
|||
1223 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", |
|
|||
1224 | "modified": [], |
|
|||
1225 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
|||
1226 | "parents": ["0000000000000000000000000000000000000000"], |
|
|||
1227 | "phase": "draft", |
|
|||
1228 | "removed": [], |
|
|||
1229 | "rev": 0, |
|
|||
1230 | "tags": [], |
|
|||
1231 | "user": "User Name <user@hostname>" |
|
|||
1232 | } |
|
|||
1233 | ] |
|
|||
1234 |
|
||||
1235 | Error if style not readable: |
|
|||
1236 |
|
||||
1237 | #if unix-permissions no-root |
|
|||
1238 | $ touch q |
|
|||
1239 | $ chmod 0 q |
|
|||
1240 | $ hg log --style ./q |
|
|||
1241 | abort: Permission denied: ./q |
|
|||
1242 | [255] |
|
|||
1243 | #endif |
|
|||
1244 |
|
||||
1245 | Error if no style: |
|
|||
1246 |
|
||||
1247 | $ hg log --style notexist |
|
|||
1248 | abort: style 'notexist' not found |
|
|||
1249 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
|||
1250 | [255] |
|
|||
1251 |
|
||||
1252 | $ hg log -T list |
|
|||
1253 | available styles: bisect, changelog, compact, default, phases, show, status, xml |
|
|||
1254 | abort: specify a template |
|
|||
1255 | [255] |
|
|||
1256 |
|
||||
1257 | Error if style missing key: |
|
|||
1258 |
|
||||
1259 | $ echo 'q = q' > t |
|
|||
1260 | $ hg log --style ./t |
|
|||
1261 | abort: "changeset" not in template map |
|
|||
1262 | [255] |
|
|||
1263 |
|
||||
1264 | Error if style missing value: |
|
|||
1265 |
|
||||
1266 | $ echo 'changeset =' > t |
|
|||
1267 | $ hg log --style t |
|
|||
1268 | hg: parse error at t:1: missing value |
|
|||
1269 | [255] |
|
|||
1270 |
|
||||
1271 | Error if include fails: |
|
|||
1272 |
|
||||
1273 | $ echo 'changeset = q' >> t |
|
|||
1274 | #if unix-permissions no-root |
|
|||
1275 | $ hg log --style ./t |
|
|||
1276 | abort: template file ./q: Permission denied |
|
|||
1277 | [255] |
|
|||
1278 | $ rm -f q |
|
|||
1279 | #endif |
|
|||
1280 |
|
||||
1281 | Include works: |
|
|||
1282 |
|
||||
1283 | $ echo '{rev}' > q |
|
|||
1284 | $ hg log --style ./t |
|
|||
1285 | 8 |
|
|||
1286 | 7 |
|
|||
1287 | 6 |
|
|||
1288 | 5 |
|
|||
1289 | 4 |
|
|||
1290 | 3 |
|
|||
1291 | 2 |
|
|||
1292 | 1 |
|
|||
1293 | 0 |
|
|||
1294 |
|
||||
1295 | Check that recursive reference does not fall into RuntimeError (issue4758): |
|
248 | Check that recursive reference does not fall into RuntimeError (issue4758): | |
1296 |
|
249 | |||
1297 | common mistake: |
|
250 | common mistake: | |
1298 |
|
251 | |||
1299 | $ cat << EOF > issue4758 |
|
252 | $ cat << EOF > issue4758 | |
1300 | > changeset = '{changeset}\n' |
|
253 | > changeset = '{changeset}\n' | |
1301 | > EOF |
|
254 | > EOF | |
1302 | $ hg log --style ./issue4758 |
|
255 | $ hg log --style ./issue4758 | |
1303 | abort: recursive reference 'changeset' in template |
|
256 | abort: recursive reference 'changeset' in template | |
1304 | [255] |
|
257 | [255] | |
1305 |
|
258 | |||
1306 | circular reference: |
|
259 | circular reference: | |
1307 |
|
260 | |||
1308 | $ cat << EOF > issue4758 |
|
261 | $ cat << EOF > issue4758 | |
1309 | > changeset = '{foo}' |
|
262 | > changeset = '{foo}' | |
1310 | > foo = '{changeset}' |
|
263 | > foo = '{changeset}' | |
1311 | > EOF |
|
264 | > EOF | |
1312 | $ hg log --style ./issue4758 |
|
265 | $ hg log --style ./issue4758 | |
1313 | abort: recursive reference 'foo' in template |
|
266 | abort: recursive reference 'foo' in template | |
1314 | [255] |
|
267 | [255] | |
1315 |
|
268 | |||
1316 | buildmap() -> gettemplate(), where no thunk was made: |
|
269 | buildmap() -> gettemplate(), where no thunk was made: | |
1317 |
|
270 | |||
1318 | $ cat << EOF > issue4758 |
|
271 | $ cat << EOF > issue4758 | |
1319 | > changeset = '{files % changeset}\n' |
|
272 | > changeset = '{files % changeset}\n' | |
1320 | > EOF |
|
273 | > EOF | |
1321 | $ hg log --style ./issue4758 |
|
274 | $ hg log --style ./issue4758 | |
1322 | abort: recursive reference 'changeset' in template |
|
275 | abort: recursive reference 'changeset' in template | |
1323 | [255] |
|
276 | [255] | |
1324 |
|
277 | |||
1325 | not a recursion if a keyword of the same name exists: |
|
278 | not a recursion if a keyword of the same name exists: | |
1326 |
|
279 | |||
1327 | $ cat << EOF > issue4758 |
|
280 | $ cat << EOF > issue4758 | |
1328 | > changeset = '{tags % rev}' |
|
281 | > changeset = '{tags % rev}' | |
1329 | > rev = '{rev} {tag}\n' |
|
282 | > rev = '{rev} {tag}\n' | |
1330 | > EOF |
|
283 | > EOF | |
1331 | $ hg log --style ./issue4758 -r tip |
|
284 | $ hg log --style ./issue4758 -r tip | |
1332 | 8 tip |
|
285 | 8 tip | |
1333 |
|
286 | |||
1334 | Check that {phase} works correctly on parents: |
|
287 | Check that {phase} works correctly on parents: | |
1335 |
|
288 | |||
1336 | $ cat << EOF > parentphase |
|
289 | $ cat << EOF > parentphase | |
1337 | > changeset_debug = '{rev} ({phase}):{parents}\n' |
|
290 | > changeset_debug = '{rev} ({phase}):{parents}\n' | |
1338 | > parent = ' {rev} ({phase})' |
|
291 | > parent = ' {rev} ({phase})' | |
1339 | > EOF |
|
292 | > EOF | |
1340 | $ hg phase -r 5 --public |
|
293 | $ hg phase -r 5 --public | |
1341 | $ hg phase -r 7 --secret --force |
|
294 | $ hg phase -r 7 --secret --force | |
1342 | $ hg log --debug -G --style ./parentphase |
|
295 | $ hg log --debug -G --style ./parentphase | |
1343 | @ 8 (secret): 7 (secret) -1 (public) |
|
296 | @ 8 (secret): 7 (secret) -1 (public) | |
1344 | | |
|
297 | | | |
1345 | o 7 (secret): -1 (public) -1 (public) |
|
298 | o 7 (secret): -1 (public) -1 (public) | |
1346 |
|
299 | |||
1347 | o 6 (draft): 5 (public) 4 (draft) |
|
300 | o 6 (draft): 5 (public) 4 (draft) | |
1348 | |\ |
|
301 | |\ | |
1349 | | o 5 (public): 3 (public) -1 (public) |
|
302 | | o 5 (public): 3 (public) -1 (public) | |
1350 | | | |
|
303 | | | | |
1351 | o | 4 (draft): 3 (public) -1 (public) |
|
304 | o | 4 (draft): 3 (public) -1 (public) | |
1352 | |/ |
|
305 | |/ | |
1353 | o 3 (public): 2 (public) -1 (public) |
|
306 | o 3 (public): 2 (public) -1 (public) | |
1354 | | |
|
307 | | | |
1355 | o 2 (public): 1 (public) -1 (public) |
|
308 | o 2 (public): 1 (public) -1 (public) | |
1356 | | |
|
309 | | | |
1357 | o 1 (public): 0 (public) -1 (public) |
|
310 | o 1 (public): 0 (public) -1 (public) | |
1358 | | |
|
311 | | | |
1359 | o 0 (public): -1 (public) -1 (public) |
|
312 | o 0 (public): -1 (public) -1 (public) | |
1360 |
|
313 | |||
1361 |
|
314 | |||
1362 | Missing non-standard names give no error (backward compatibility): |
|
|||
1363 |
|
||||
1364 | $ echo "changeset = '{c}'" > t |
|
|||
1365 | $ hg log --style ./t |
|
|||
1366 |
|
||||
1367 | Defining non-standard name works: |
|
|||
1368 |
|
||||
1369 | $ cat <<EOF > t |
|
|||
1370 | > changeset = '{c}' |
|
|||
1371 | > c = q |
|
|||
1372 | > EOF |
|
|||
1373 | $ hg log --style ./t |
|
|||
1374 | 8 |
|
|||
1375 | 7 |
|
|||
1376 | 6 |
|
|||
1377 | 5 |
|
|||
1378 | 4 |
|
|||
1379 | 3 |
|
|||
1380 | 2 |
|
|||
1381 | 1 |
|
|||
1382 | 0 |
|
|||
1383 |
|
||||
1384 | ui.style works: |
|
|||
1385 |
|
||||
1386 | $ echo '[ui]' > .hg/hgrc |
|
|||
1387 | $ echo 'style = t' >> .hg/hgrc |
|
|||
1388 | $ hg log |
|
|||
1389 | 8 |
|
|||
1390 | 7 |
|
|||
1391 | 6 |
|
|||
1392 | 5 |
|
|||
1393 | 4 |
|
|||
1394 | 3 |
|
|||
1395 | 2 |
|
|||
1396 | 1 |
|
|||
1397 | 0 |
|
|||
1398 |
|
||||
1399 |
|
||||
1400 | Issue338: |
|
|||
1401 |
|
||||
1402 | $ hg log --style=changelog > changelog |
|
|||
1403 |
|
||||
1404 | $ cat changelog |
|
|||
1405 | 2020-01-01 test <test> |
|
|||
1406 |
|
||||
1407 | * fourth, second, third: |
|
|||
1408 | third |
|
|||
1409 | [95c24699272e] [tip] |
|
|||
1410 |
|
||||
1411 | 1970-01-12 User Name <user@hostname> |
|
|||
1412 |
|
||||
1413 | * second: |
|
|||
1414 | second |
|
|||
1415 | [29114dbae42b] |
|
|||
1416 |
|
||||
1417 | 1970-01-18 person <person> |
|
|||
1418 |
|
||||
1419 | * merge |
|
|||
1420 | [d41e714fe50d] |
|
|||
1421 |
|
||||
1422 | * d: |
|
|||
1423 | new head |
|
|||
1424 | [13207e5a10d9] |
|
|||
1425 |
|
||||
1426 | 1970-01-17 person <person> |
|
|||
1427 |
|
||||
1428 | * new branch |
|
|||
1429 | [bbe44766e73d] <foo> |
|
|||
1430 |
|
||||
1431 | 1970-01-16 person <person> |
|
|||
1432 |
|
||||
1433 | * c: |
|
|||
1434 | no user, no domain |
|
|||
1435 | [10e46f2dcbf4] |
|
|||
1436 |
|
||||
1437 | 1970-01-14 other <other@place> |
|
|||
1438 |
|
||||
1439 | * c: |
|
|||
1440 | no person |
|
|||
1441 | [97054abb4ab8] |
|
|||
1442 |
|
||||
1443 | 1970-01-13 A. N. Other <other@place> |
|
|||
1444 |
|
||||
1445 | * b: |
|
|||
1446 | other 1 other 2 |
|
|||
1447 |
|
||||
1448 | other 3 |
|
|||
1449 | [b608e9d1a3f0] |
|
|||
1450 |
|
||||
1451 | 1970-01-12 User Name <user@hostname> |
|
|||
1452 |
|
||||
1453 | * a: |
|
|||
1454 | line 1 line 2 |
|
|||
1455 | [1e4e1b8f71e0] |
|
|||
1456 |
|
||||
1457 |
|
||||
1458 | Issue2130: xml output for 'hg heads' is malformed |
|
|||
1459 |
|
||||
1460 | $ hg heads --style changelog |
|
|||
1461 | 2020-01-01 test <test> |
|
|||
1462 |
|
||||
1463 | * fourth, second, third: |
|
|||
1464 | third |
|
|||
1465 | [95c24699272e] [tip] |
|
|||
1466 |
|
||||
1467 | 1970-01-18 person <person> |
|
|||
1468 |
|
||||
1469 | * merge |
|
|||
1470 | [d41e714fe50d] |
|
|||
1471 |
|
||||
1472 | 1970-01-17 person <person> |
|
|||
1473 |
|
||||
1474 | * new branch |
|
|||
1475 | [bbe44766e73d] <foo> |
|
|||
1476 |
|
||||
1477 |
|
||||
1478 | Keys work: |
|
315 | Keys work: | |
1479 |
|
316 | |||
1480 | $ for key in author branch branches date desc file_adds file_dels file_mods \ |
|
317 | $ for key in author branch branches date desc file_adds file_dels file_mods \ | |
1481 | > file_copies file_copies_switch files \ |
|
318 | > file_copies file_copies_switch files \ | |
1482 | > manifest node parents rev tags diffstat extras \ |
|
319 | > manifest node parents rev tags diffstat extras \ | |
1483 | > p1rev p2rev p1node p2node; do |
|
320 | > p1rev p2rev p1node p2node; do | |
1484 | > for mode in '' --verbose --debug; do |
|
321 | > for mode in '' --verbose --debug; do | |
1485 | > hg log $mode --template "$key$mode: {$key}\n" |
|
322 | > hg log $mode --template "$key$mode: {$key}\n" | |
1486 | > done |
|
323 | > done | |
1487 | > done |
|
324 | > done | |
1488 | author: test |
|
325 | author: test | |
1489 | author: User Name <user@hostname> |
|
326 | author: User Name <user@hostname> | |
1490 | author: person |
|
327 | author: person | |
1491 | author: person |
|
328 | author: person | |
1492 | author: person |
|
329 | author: person | |
1493 | author: person |
|
330 | author: person | |
1494 | author: other@place |
|
331 | author: other@place | |
1495 | author: A. N. Other <other@place> |
|
332 | author: A. N. Other <other@place> | |
1496 | author: User Name <user@hostname> |
|
333 | author: User Name <user@hostname> | |
1497 | author--verbose: test |
|
334 | author--verbose: test | |
1498 | author--verbose: User Name <user@hostname> |
|
335 | author--verbose: User Name <user@hostname> | |
1499 | author--verbose: person |
|
336 | author--verbose: person | |
1500 | author--verbose: person |
|
337 | author--verbose: person | |
1501 | author--verbose: person |
|
338 | author--verbose: person | |
1502 | author--verbose: person |
|
339 | author--verbose: person | |
1503 | author--verbose: other@place |
|
340 | author--verbose: other@place | |
1504 | author--verbose: A. N. Other <other@place> |
|
341 | author--verbose: A. N. Other <other@place> | |
1505 | author--verbose: User Name <user@hostname> |
|
342 | author--verbose: User Name <user@hostname> | |
1506 | author--debug: test |
|
343 | author--debug: test | |
1507 | author--debug: User Name <user@hostname> |
|
344 | author--debug: User Name <user@hostname> | |
1508 | author--debug: person |
|
345 | author--debug: person | |
1509 | author--debug: person |
|
346 | author--debug: person | |
1510 | author--debug: person |
|
347 | author--debug: person | |
1511 | author--debug: person |
|
348 | author--debug: person | |
1512 | author--debug: other@place |
|
349 | author--debug: other@place | |
1513 | author--debug: A. N. Other <other@place> |
|
350 | author--debug: A. N. Other <other@place> | |
1514 | author--debug: User Name <user@hostname> |
|
351 | author--debug: User Name <user@hostname> | |
1515 | branch: default |
|
352 | branch: default | |
1516 | branch: default |
|
353 | branch: default | |
1517 | branch: default |
|
354 | branch: default | |
1518 | branch: default |
|
355 | branch: default | |
1519 | branch: foo |
|
356 | branch: foo | |
1520 | branch: default |
|
357 | branch: default | |
1521 | branch: default |
|
358 | branch: default | |
1522 | branch: default |
|
359 | branch: default | |
1523 | branch: default |
|
360 | branch: default | |
1524 | branch--verbose: default |
|
361 | branch--verbose: default | |
1525 | branch--verbose: default |
|
362 | branch--verbose: default | |
1526 | branch--verbose: default |
|
363 | branch--verbose: default | |
1527 | branch--verbose: default |
|
364 | branch--verbose: default | |
1528 | branch--verbose: foo |
|
365 | branch--verbose: foo | |
1529 | branch--verbose: default |
|
366 | branch--verbose: default | |
1530 | branch--verbose: default |
|
367 | branch--verbose: default | |
1531 | branch--verbose: default |
|
368 | branch--verbose: default | |
1532 | branch--verbose: default |
|
369 | branch--verbose: default | |
1533 | branch--debug: default |
|
370 | branch--debug: default | |
1534 | branch--debug: default |
|
371 | branch--debug: default | |
1535 | branch--debug: default |
|
372 | branch--debug: default | |
1536 | branch--debug: default |
|
373 | branch--debug: default | |
1537 | branch--debug: foo |
|
374 | branch--debug: foo | |
1538 | branch--debug: default |
|
375 | branch--debug: default | |
1539 | branch--debug: default |
|
376 | branch--debug: default | |
1540 | branch--debug: default |
|
377 | branch--debug: default | |
1541 | branch--debug: default |
|
378 | branch--debug: default | |
1542 | branches: |
|
379 | branches: | |
1543 | branches: |
|
380 | branches: | |
1544 | branches: |
|
381 | branches: | |
1545 | branches: |
|
382 | branches: | |
1546 | branches: foo |
|
383 | branches: foo | |
1547 | branches: |
|
384 | branches: | |
1548 | branches: |
|
385 | branches: | |
1549 | branches: |
|
386 | branches: | |
1550 | branches: |
|
387 | branches: | |
1551 | branches--verbose: |
|
388 | branches--verbose: | |
1552 | branches--verbose: |
|
389 | branches--verbose: | |
1553 | branches--verbose: |
|
390 | branches--verbose: | |
1554 | branches--verbose: |
|
391 | branches--verbose: | |
1555 | branches--verbose: foo |
|
392 | branches--verbose: foo | |
1556 | branches--verbose: |
|
393 | branches--verbose: | |
1557 | branches--verbose: |
|
394 | branches--verbose: | |
1558 | branches--verbose: |
|
395 | branches--verbose: | |
1559 | branches--verbose: |
|
396 | branches--verbose: | |
1560 | branches--debug: |
|
397 | branches--debug: | |
1561 | branches--debug: |
|
398 | branches--debug: | |
1562 | branches--debug: |
|
399 | branches--debug: | |
1563 | branches--debug: |
|
400 | branches--debug: | |
1564 | branches--debug: foo |
|
401 | branches--debug: foo | |
1565 | branches--debug: |
|
402 | branches--debug: | |
1566 | branches--debug: |
|
403 | branches--debug: | |
1567 | branches--debug: |
|
404 | branches--debug: | |
1568 | branches--debug: |
|
405 | branches--debug: | |
1569 | date: 1577872860.00 |
|
406 | date: 1577872860.00 | |
1570 | date: 1000000.00 |
|
407 | date: 1000000.00 | |
1571 | date: 1500001.00 |
|
408 | date: 1500001.00 | |
1572 | date: 1500000.00 |
|
409 | date: 1500000.00 | |
1573 | date: 1400000.00 |
|
410 | date: 1400000.00 | |
1574 | date: 1300000.00 |
|
411 | date: 1300000.00 | |
1575 | date: 1200000.00 |
|
412 | date: 1200000.00 | |
1576 | date: 1100000.00 |
|
413 | date: 1100000.00 | |
1577 | date: 1000000.00 |
|
414 | date: 1000000.00 | |
1578 | date--verbose: 1577872860.00 |
|
415 | date--verbose: 1577872860.00 | |
1579 | date--verbose: 1000000.00 |
|
416 | date--verbose: 1000000.00 | |
1580 | date--verbose: 1500001.00 |
|
417 | date--verbose: 1500001.00 | |
1581 | date--verbose: 1500000.00 |
|
418 | date--verbose: 1500000.00 | |
1582 | date--verbose: 1400000.00 |
|
419 | date--verbose: 1400000.00 | |
1583 | date--verbose: 1300000.00 |
|
420 | date--verbose: 1300000.00 | |
1584 | date--verbose: 1200000.00 |
|
421 | date--verbose: 1200000.00 | |
1585 | date--verbose: 1100000.00 |
|
422 | date--verbose: 1100000.00 | |
1586 | date--verbose: 1000000.00 |
|
423 | date--verbose: 1000000.00 | |
1587 | date--debug: 1577872860.00 |
|
424 | date--debug: 1577872860.00 | |
1588 | date--debug: 1000000.00 |
|
425 | date--debug: 1000000.00 | |
1589 | date--debug: 1500001.00 |
|
426 | date--debug: 1500001.00 | |
1590 | date--debug: 1500000.00 |
|
427 | date--debug: 1500000.00 | |
1591 | date--debug: 1400000.00 |
|
428 | date--debug: 1400000.00 | |
1592 | date--debug: 1300000.00 |
|
429 | date--debug: 1300000.00 | |
1593 | date--debug: 1200000.00 |
|
430 | date--debug: 1200000.00 | |
1594 | date--debug: 1100000.00 |
|
431 | date--debug: 1100000.00 | |
1595 | date--debug: 1000000.00 |
|
432 | date--debug: 1000000.00 | |
1596 | desc: third |
|
433 | desc: third | |
1597 | desc: second |
|
434 | desc: second | |
1598 | desc: merge |
|
435 | desc: merge | |
1599 | desc: new head |
|
436 | desc: new head | |
1600 | desc: new branch |
|
437 | desc: new branch | |
1601 | desc: no user, no domain |
|
438 | desc: no user, no domain | |
1602 | desc: no person |
|
439 | desc: no person | |
1603 | desc: other 1 |
|
440 | desc: other 1 | |
1604 | other 2 |
|
441 | other 2 | |
1605 |
|
442 | |||
1606 | other 3 |
|
443 | other 3 | |
1607 | desc: line 1 |
|
444 | desc: line 1 | |
1608 | line 2 |
|
445 | line 2 | |
1609 | desc--verbose: third |
|
446 | desc--verbose: third | |
1610 | desc--verbose: second |
|
447 | desc--verbose: second | |
1611 | desc--verbose: merge |
|
448 | desc--verbose: merge | |
1612 | desc--verbose: new head |
|
449 | desc--verbose: new head | |
1613 | desc--verbose: new branch |
|
450 | desc--verbose: new branch | |
1614 | desc--verbose: no user, no domain |
|
451 | desc--verbose: no user, no domain | |
1615 | desc--verbose: no person |
|
452 | desc--verbose: no person | |
1616 | desc--verbose: other 1 |
|
453 | desc--verbose: other 1 | |
1617 | other 2 |
|
454 | other 2 | |
1618 |
|
455 | |||
1619 | other 3 |
|
456 | other 3 | |
1620 | desc--verbose: line 1 |
|
457 | desc--verbose: line 1 | |
1621 | line 2 |
|
458 | line 2 | |
1622 | desc--debug: third |
|
459 | desc--debug: third | |
1623 | desc--debug: second |
|
460 | desc--debug: second | |
1624 | desc--debug: merge |
|
461 | desc--debug: merge | |
1625 | desc--debug: new head |
|
462 | desc--debug: new head | |
1626 | desc--debug: new branch |
|
463 | desc--debug: new branch | |
1627 | desc--debug: no user, no domain |
|
464 | desc--debug: no user, no domain | |
1628 | desc--debug: no person |
|
465 | desc--debug: no person | |
1629 | desc--debug: other 1 |
|
466 | desc--debug: other 1 | |
1630 | other 2 |
|
467 | other 2 | |
1631 |
|
468 | |||
1632 | other 3 |
|
469 | other 3 | |
1633 | desc--debug: line 1 |
|
470 | desc--debug: line 1 | |
1634 | line 2 |
|
471 | line 2 | |
1635 | file_adds: fourth third |
|
472 | file_adds: fourth third | |
1636 | file_adds: second |
|
473 | file_adds: second | |
1637 | file_adds: |
|
474 | file_adds: | |
1638 | file_adds: d |
|
475 | file_adds: d | |
1639 | file_adds: |
|
476 | file_adds: | |
1640 | file_adds: |
|
477 | file_adds: | |
1641 | file_adds: c |
|
478 | file_adds: c | |
1642 | file_adds: b |
|
479 | file_adds: b | |
1643 | file_adds: a |
|
480 | file_adds: a | |
1644 | file_adds--verbose: fourth third |
|
481 | file_adds--verbose: fourth third | |
1645 | file_adds--verbose: second |
|
482 | file_adds--verbose: second | |
1646 | file_adds--verbose: |
|
483 | file_adds--verbose: | |
1647 | file_adds--verbose: d |
|
484 | file_adds--verbose: d | |
1648 | file_adds--verbose: |
|
485 | file_adds--verbose: | |
1649 | file_adds--verbose: |
|
486 | file_adds--verbose: | |
1650 | file_adds--verbose: c |
|
487 | file_adds--verbose: c | |
1651 | file_adds--verbose: b |
|
488 | file_adds--verbose: b | |
1652 | file_adds--verbose: a |
|
489 | file_adds--verbose: a | |
1653 | file_adds--debug: fourth third |
|
490 | file_adds--debug: fourth third | |
1654 | file_adds--debug: second |
|
491 | file_adds--debug: second | |
1655 | file_adds--debug: |
|
492 | file_adds--debug: | |
1656 | file_adds--debug: d |
|
493 | file_adds--debug: d | |
1657 | file_adds--debug: |
|
494 | file_adds--debug: | |
1658 | file_adds--debug: |
|
495 | file_adds--debug: | |
1659 | file_adds--debug: c |
|
496 | file_adds--debug: c | |
1660 | file_adds--debug: b |
|
497 | file_adds--debug: b | |
1661 | file_adds--debug: a |
|
498 | file_adds--debug: a | |
1662 | file_dels: second |
|
499 | file_dels: second | |
1663 | file_dels: |
|
500 | file_dels: | |
1664 | file_dels: |
|
501 | file_dels: | |
1665 | file_dels: |
|
502 | file_dels: | |
1666 | file_dels: |
|
503 | file_dels: | |
1667 | file_dels: |
|
504 | file_dels: | |
1668 | file_dels: |
|
505 | file_dels: | |
1669 | file_dels: |
|
506 | file_dels: | |
1670 | file_dels: |
|
507 | file_dels: | |
1671 | file_dels--verbose: second |
|
508 | file_dels--verbose: second | |
1672 | file_dels--verbose: |
|
509 | file_dels--verbose: | |
1673 | file_dels--verbose: |
|
510 | file_dels--verbose: | |
1674 | file_dels--verbose: |
|
511 | file_dels--verbose: | |
1675 | file_dels--verbose: |
|
512 | file_dels--verbose: | |
1676 | file_dels--verbose: |
|
513 | file_dels--verbose: | |
1677 | file_dels--verbose: |
|
514 | file_dels--verbose: | |
1678 | file_dels--verbose: |
|
515 | file_dels--verbose: | |
1679 | file_dels--verbose: |
|
516 | file_dels--verbose: | |
1680 | file_dels--debug: second |
|
517 | file_dels--debug: second | |
1681 | file_dels--debug: |
|
518 | file_dels--debug: | |
1682 | file_dels--debug: |
|
519 | file_dels--debug: | |
1683 | file_dels--debug: |
|
520 | file_dels--debug: | |
1684 | file_dels--debug: |
|
521 | file_dels--debug: | |
1685 | file_dels--debug: |
|
522 | file_dels--debug: | |
1686 | file_dels--debug: |
|
523 | file_dels--debug: | |
1687 | file_dels--debug: |
|
524 | file_dels--debug: | |
1688 | file_dels--debug: |
|
525 | file_dels--debug: | |
1689 | file_mods: |
|
526 | file_mods: | |
1690 | file_mods: |
|
527 | file_mods: | |
1691 | file_mods: |
|
528 | file_mods: | |
1692 | file_mods: |
|
529 | file_mods: | |
1693 | file_mods: |
|
530 | file_mods: | |
1694 | file_mods: c |
|
531 | file_mods: c | |
1695 | file_mods: |
|
532 | file_mods: | |
1696 | file_mods: |
|
533 | file_mods: | |
1697 | file_mods: |
|
534 | file_mods: | |
1698 | file_mods--verbose: |
|
535 | file_mods--verbose: | |
1699 | file_mods--verbose: |
|
536 | file_mods--verbose: | |
1700 | file_mods--verbose: |
|
537 | file_mods--verbose: | |
1701 | file_mods--verbose: |
|
538 | file_mods--verbose: | |
1702 | file_mods--verbose: |
|
539 | file_mods--verbose: | |
1703 | file_mods--verbose: c |
|
540 | file_mods--verbose: c | |
1704 | file_mods--verbose: |
|
541 | file_mods--verbose: | |
1705 | file_mods--verbose: |
|
542 | file_mods--verbose: | |
1706 | file_mods--verbose: |
|
543 | file_mods--verbose: | |
1707 | file_mods--debug: |
|
544 | file_mods--debug: | |
1708 | file_mods--debug: |
|
545 | file_mods--debug: | |
1709 | file_mods--debug: |
|
546 | file_mods--debug: | |
1710 | file_mods--debug: |
|
547 | file_mods--debug: | |
1711 | file_mods--debug: |
|
548 | file_mods--debug: | |
1712 | file_mods--debug: c |
|
549 | file_mods--debug: c | |
1713 | file_mods--debug: |
|
550 | file_mods--debug: | |
1714 | file_mods--debug: |
|
551 | file_mods--debug: | |
1715 | file_mods--debug: |
|
552 | file_mods--debug: | |
1716 | file_copies: fourth (second) |
|
553 | file_copies: fourth (second) | |
1717 | file_copies: |
|
554 | file_copies: | |
1718 | file_copies: |
|
555 | file_copies: | |
1719 | file_copies: |
|
556 | file_copies: | |
1720 | file_copies: |
|
557 | file_copies: | |
1721 | file_copies: |
|
558 | file_copies: | |
1722 | file_copies: |
|
559 | file_copies: | |
1723 | file_copies: |
|
560 | file_copies: | |
1724 | file_copies: |
|
561 | file_copies: | |
1725 | file_copies--verbose: fourth (second) |
|
562 | file_copies--verbose: fourth (second) | |
1726 | file_copies--verbose: |
|
563 | file_copies--verbose: | |
1727 | file_copies--verbose: |
|
564 | file_copies--verbose: | |
1728 | file_copies--verbose: |
|
565 | file_copies--verbose: | |
1729 | file_copies--verbose: |
|
566 | file_copies--verbose: | |
1730 | file_copies--verbose: |
|
567 | file_copies--verbose: | |
1731 | file_copies--verbose: |
|
568 | file_copies--verbose: | |
1732 | file_copies--verbose: |
|
569 | file_copies--verbose: | |
1733 | file_copies--verbose: |
|
570 | file_copies--verbose: | |
1734 | file_copies--debug: fourth (second) |
|
571 | file_copies--debug: fourth (second) | |
1735 | file_copies--debug: |
|
572 | file_copies--debug: | |
1736 | file_copies--debug: |
|
573 | file_copies--debug: | |
1737 | file_copies--debug: |
|
574 | file_copies--debug: | |
1738 | file_copies--debug: |
|
575 | file_copies--debug: | |
1739 | file_copies--debug: |
|
576 | file_copies--debug: | |
1740 | file_copies--debug: |
|
577 | file_copies--debug: | |
1741 | file_copies--debug: |
|
578 | file_copies--debug: | |
1742 | file_copies--debug: |
|
579 | file_copies--debug: | |
1743 | file_copies_switch: |
|
580 | file_copies_switch: | |
1744 | file_copies_switch: |
|
581 | file_copies_switch: | |
1745 | file_copies_switch: |
|
582 | file_copies_switch: | |
1746 | file_copies_switch: |
|
583 | file_copies_switch: | |
1747 | file_copies_switch: |
|
584 | file_copies_switch: | |
1748 | file_copies_switch: |
|
585 | file_copies_switch: | |
1749 | file_copies_switch: |
|
586 | file_copies_switch: | |
1750 | file_copies_switch: |
|
587 | file_copies_switch: | |
1751 | file_copies_switch: |
|
588 | file_copies_switch: | |
1752 | file_copies_switch--verbose: |
|
589 | file_copies_switch--verbose: | |
1753 | file_copies_switch--verbose: |
|
590 | file_copies_switch--verbose: | |
1754 | file_copies_switch--verbose: |
|
591 | file_copies_switch--verbose: | |
1755 | file_copies_switch--verbose: |
|
592 | file_copies_switch--verbose: | |
1756 | file_copies_switch--verbose: |
|
593 | file_copies_switch--verbose: | |
1757 | file_copies_switch--verbose: |
|
594 | file_copies_switch--verbose: | |
1758 | file_copies_switch--verbose: |
|
595 | file_copies_switch--verbose: | |
1759 | file_copies_switch--verbose: |
|
596 | file_copies_switch--verbose: | |
1760 | file_copies_switch--verbose: |
|
597 | file_copies_switch--verbose: | |
1761 | file_copies_switch--debug: |
|
598 | file_copies_switch--debug: | |
1762 | file_copies_switch--debug: |
|
599 | file_copies_switch--debug: | |
1763 | file_copies_switch--debug: |
|
600 | file_copies_switch--debug: | |
1764 | file_copies_switch--debug: |
|
601 | file_copies_switch--debug: | |
1765 | file_copies_switch--debug: |
|
602 | file_copies_switch--debug: | |
1766 | file_copies_switch--debug: |
|
603 | file_copies_switch--debug: | |
1767 | file_copies_switch--debug: |
|
604 | file_copies_switch--debug: | |
1768 | file_copies_switch--debug: |
|
605 | file_copies_switch--debug: | |
1769 | file_copies_switch--debug: |
|
606 | file_copies_switch--debug: | |
1770 | files: fourth second third |
|
607 | files: fourth second third | |
1771 | files: second |
|
608 | files: second | |
1772 | files: |
|
609 | files: | |
1773 | files: d |
|
610 | files: d | |
1774 | files: |
|
611 | files: | |
1775 | files: c |
|
612 | files: c | |
1776 | files: c |
|
613 | files: c | |
1777 | files: b |
|
614 | files: b | |
1778 | files: a |
|
615 | files: a | |
1779 | files--verbose: fourth second third |
|
616 | files--verbose: fourth second third | |
1780 | files--verbose: second |
|
617 | files--verbose: second | |
1781 | files--verbose: |
|
618 | files--verbose: | |
1782 | files--verbose: d |
|
619 | files--verbose: d | |
1783 | files--verbose: |
|
620 | files--verbose: | |
1784 | files--verbose: c |
|
621 | files--verbose: c | |
1785 | files--verbose: c |
|
622 | files--verbose: c | |
1786 | files--verbose: b |
|
623 | files--verbose: b | |
1787 | files--verbose: a |
|
624 | files--verbose: a | |
1788 | files--debug: fourth second third |
|
625 | files--debug: fourth second third | |
1789 | files--debug: second |
|
626 | files--debug: second | |
1790 | files--debug: |
|
627 | files--debug: | |
1791 | files--debug: d |
|
628 | files--debug: d | |
1792 | files--debug: |
|
629 | files--debug: | |
1793 | files--debug: c |
|
630 | files--debug: c | |
1794 | files--debug: c |
|
631 | files--debug: c | |
1795 | files--debug: b |
|
632 | files--debug: b | |
1796 | files--debug: a |
|
633 | files--debug: a | |
1797 | manifest: 6:94961b75a2da |
|
634 | manifest: 6:94961b75a2da | |
1798 | manifest: 5:f2dbc354b94e |
|
635 | manifest: 5:f2dbc354b94e | |
1799 | manifest: 4:4dc3def4f9b4 |
|
636 | manifest: 4:4dc3def4f9b4 | |
1800 | manifest: 4:4dc3def4f9b4 |
|
637 | manifest: 4:4dc3def4f9b4 | |
1801 | manifest: 3:cb5a1327723b |
|
638 | manifest: 3:cb5a1327723b | |
1802 | manifest: 3:cb5a1327723b |
|
639 | manifest: 3:cb5a1327723b | |
1803 | manifest: 2:6e0e82995c35 |
|
640 | manifest: 2:6e0e82995c35 | |
1804 | manifest: 1:4e8d705b1e53 |
|
641 | manifest: 1:4e8d705b1e53 | |
1805 | manifest: 0:a0c8bcbbb45c |
|
642 | manifest: 0:a0c8bcbbb45c | |
1806 | manifest--verbose: 6:94961b75a2da |
|
643 | manifest--verbose: 6:94961b75a2da | |
1807 | manifest--verbose: 5:f2dbc354b94e |
|
644 | manifest--verbose: 5:f2dbc354b94e | |
1808 | manifest--verbose: 4:4dc3def4f9b4 |
|
645 | manifest--verbose: 4:4dc3def4f9b4 | |
1809 | manifest--verbose: 4:4dc3def4f9b4 |
|
646 | manifest--verbose: 4:4dc3def4f9b4 | |
1810 | manifest--verbose: 3:cb5a1327723b |
|
647 | manifest--verbose: 3:cb5a1327723b | |
1811 | manifest--verbose: 3:cb5a1327723b |
|
648 | manifest--verbose: 3:cb5a1327723b | |
1812 | manifest--verbose: 2:6e0e82995c35 |
|
649 | manifest--verbose: 2:6e0e82995c35 | |
1813 | manifest--verbose: 1:4e8d705b1e53 |
|
650 | manifest--verbose: 1:4e8d705b1e53 | |
1814 | manifest--verbose: 0:a0c8bcbbb45c |
|
651 | manifest--verbose: 0:a0c8bcbbb45c | |
1815 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 |
|
652 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 | |
1816 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf |
|
653 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf | |
1817 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
654 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1818 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
655 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1819 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
656 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1820 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
657 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1821 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
658 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
1822 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
659 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
1823 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
660 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
1824 | node: 95c24699272ef57d062b8bccc32c878bf841784a |
|
661 | node: 95c24699272ef57d062b8bccc32c878bf841784a | |
1825 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
662 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1826 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
663 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1827 | node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
664 | node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1828 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
665 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1829 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
666 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1830 | node: 97054abb4ab824450e9164180baf491ae0078465 |
|
667 | node: 97054abb4ab824450e9164180baf491ae0078465 | |
1831 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
668 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1832 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
669 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1833 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a |
|
670 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a | |
1834 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
671 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1835 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
672 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1836 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
673 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1837 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
674 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1838 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
675 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1839 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
676 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
1840 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
677 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1841 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
678 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1842 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a |
|
679 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a | |
1843 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
680 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1844 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
681 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1845 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
682 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1846 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
683 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1847 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
684 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1848 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
685 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
1849 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
686 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1850 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
687 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1851 | parents: |
|
688 | parents: | |
1852 | parents: -1:000000000000 |
|
689 | parents: -1:000000000000 | |
1853 | parents: 5:13207e5a10d9 4:bbe44766e73d |
|
690 | parents: 5:13207e5a10d9 4:bbe44766e73d | |
1854 | parents: 3:10e46f2dcbf4 |
|
691 | parents: 3:10e46f2dcbf4 | |
1855 | parents: |
|
692 | parents: | |
1856 | parents: |
|
693 | parents: | |
1857 | parents: |
|
694 | parents: | |
1858 | parents: |
|
695 | parents: | |
1859 | parents: |
|
696 | parents: | |
1860 | parents--verbose: |
|
697 | parents--verbose: | |
1861 | parents--verbose: -1:000000000000 |
|
698 | parents--verbose: -1:000000000000 | |
1862 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d |
|
699 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d | |
1863 | parents--verbose: 3:10e46f2dcbf4 |
|
700 | parents--verbose: 3:10e46f2dcbf4 | |
1864 | parents--verbose: |
|
701 | parents--verbose: | |
1865 | parents--verbose: |
|
702 | parents--verbose: | |
1866 | parents--verbose: |
|
703 | parents--verbose: | |
1867 | parents--verbose: |
|
704 | parents--verbose: | |
1868 | parents--verbose: |
|
705 | parents--verbose: | |
1869 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 |
|
706 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 | |
1870 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
707 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1871 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
708 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1872 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
709 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1873 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
710 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1874 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 |
|
711 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 | |
1875 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 |
|
712 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 | |
1876 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 |
|
713 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 | |
1877 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
714 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1878 | rev: 8 |
|
715 | rev: 8 | |
1879 | rev: 7 |
|
716 | rev: 7 | |
1880 | rev: 6 |
|
717 | rev: 6 | |
1881 | rev: 5 |
|
718 | rev: 5 | |
1882 | rev: 4 |
|
719 | rev: 4 | |
1883 | rev: 3 |
|
720 | rev: 3 | |
1884 | rev: 2 |
|
721 | rev: 2 | |
1885 | rev: 1 |
|
722 | rev: 1 | |
1886 | rev: 0 |
|
723 | rev: 0 | |
1887 | rev--verbose: 8 |
|
724 | rev--verbose: 8 | |
1888 | rev--verbose: 7 |
|
725 | rev--verbose: 7 | |
1889 | rev--verbose: 6 |
|
726 | rev--verbose: 6 | |
1890 | rev--verbose: 5 |
|
727 | rev--verbose: 5 | |
1891 | rev--verbose: 4 |
|
728 | rev--verbose: 4 | |
1892 | rev--verbose: 3 |
|
729 | rev--verbose: 3 | |
1893 | rev--verbose: 2 |
|
730 | rev--verbose: 2 | |
1894 | rev--verbose: 1 |
|
731 | rev--verbose: 1 | |
1895 | rev--verbose: 0 |
|
732 | rev--verbose: 0 | |
1896 | rev--debug: 8 |
|
733 | rev--debug: 8 | |
1897 | rev--debug: 7 |
|
734 | rev--debug: 7 | |
1898 | rev--debug: 6 |
|
735 | rev--debug: 6 | |
1899 | rev--debug: 5 |
|
736 | rev--debug: 5 | |
1900 | rev--debug: 4 |
|
737 | rev--debug: 4 | |
1901 | rev--debug: 3 |
|
738 | rev--debug: 3 | |
1902 | rev--debug: 2 |
|
739 | rev--debug: 2 | |
1903 | rev--debug: 1 |
|
740 | rev--debug: 1 | |
1904 | rev--debug: 0 |
|
741 | rev--debug: 0 | |
1905 | tags: tip |
|
742 | tags: tip | |
1906 | tags: |
|
743 | tags: | |
1907 | tags: |
|
744 | tags: | |
1908 | tags: |
|
745 | tags: | |
1909 | tags: |
|
746 | tags: | |
1910 | tags: |
|
747 | tags: | |
1911 | tags: |
|
748 | tags: | |
1912 | tags: |
|
749 | tags: | |
1913 | tags: |
|
750 | tags: | |
1914 | tags--verbose: tip |
|
751 | tags--verbose: tip | |
1915 | tags--verbose: |
|
752 | tags--verbose: | |
1916 | tags--verbose: |
|
753 | tags--verbose: | |
1917 | tags--verbose: |
|
754 | tags--verbose: | |
1918 | tags--verbose: |
|
755 | tags--verbose: | |
1919 | tags--verbose: |
|
756 | tags--verbose: | |
1920 | tags--verbose: |
|
757 | tags--verbose: | |
1921 | tags--verbose: |
|
758 | tags--verbose: | |
1922 | tags--verbose: |
|
759 | tags--verbose: | |
1923 | tags--debug: tip |
|
760 | tags--debug: tip | |
1924 | tags--debug: |
|
761 | tags--debug: | |
1925 | tags--debug: |
|
762 | tags--debug: | |
1926 | tags--debug: |
|
763 | tags--debug: | |
1927 | tags--debug: |
|
764 | tags--debug: | |
1928 | tags--debug: |
|
765 | tags--debug: | |
1929 | tags--debug: |
|
766 | tags--debug: | |
1930 | tags--debug: |
|
767 | tags--debug: | |
1931 | tags--debug: |
|
768 | tags--debug: | |
1932 | diffstat: 3: +2/-1 |
|
769 | diffstat: 3: +2/-1 | |
1933 | diffstat: 1: +1/-0 |
|
770 | diffstat: 1: +1/-0 | |
1934 | diffstat: 0: +0/-0 |
|
771 | diffstat: 0: +0/-0 | |
1935 | diffstat: 1: +1/-0 |
|
772 | diffstat: 1: +1/-0 | |
1936 | diffstat: 0: +0/-0 |
|
773 | diffstat: 0: +0/-0 | |
1937 | diffstat: 1: +1/-0 |
|
774 | diffstat: 1: +1/-0 | |
1938 | diffstat: 1: +4/-0 |
|
775 | diffstat: 1: +4/-0 | |
1939 | diffstat: 1: +2/-0 |
|
776 | diffstat: 1: +2/-0 | |
1940 | diffstat: 1: +1/-0 |
|
777 | diffstat: 1: +1/-0 | |
1941 | diffstat--verbose: 3: +2/-1 |
|
778 | diffstat--verbose: 3: +2/-1 | |
1942 | diffstat--verbose: 1: +1/-0 |
|
779 | diffstat--verbose: 1: +1/-0 | |
1943 | diffstat--verbose: 0: +0/-0 |
|
780 | diffstat--verbose: 0: +0/-0 | |
1944 | diffstat--verbose: 1: +1/-0 |
|
781 | diffstat--verbose: 1: +1/-0 | |
1945 | diffstat--verbose: 0: +0/-0 |
|
782 | diffstat--verbose: 0: +0/-0 | |
1946 | diffstat--verbose: 1: +1/-0 |
|
783 | diffstat--verbose: 1: +1/-0 | |
1947 | diffstat--verbose: 1: +4/-0 |
|
784 | diffstat--verbose: 1: +4/-0 | |
1948 | diffstat--verbose: 1: +2/-0 |
|
785 | diffstat--verbose: 1: +2/-0 | |
1949 | diffstat--verbose: 1: +1/-0 |
|
786 | diffstat--verbose: 1: +1/-0 | |
1950 | diffstat--debug: 3: +2/-1 |
|
787 | diffstat--debug: 3: +2/-1 | |
1951 | diffstat--debug: 1: +1/-0 |
|
788 | diffstat--debug: 1: +1/-0 | |
1952 | diffstat--debug: 0: +0/-0 |
|
789 | diffstat--debug: 0: +0/-0 | |
1953 | diffstat--debug: 1: +1/-0 |
|
790 | diffstat--debug: 1: +1/-0 | |
1954 | diffstat--debug: 0: +0/-0 |
|
791 | diffstat--debug: 0: +0/-0 | |
1955 | diffstat--debug: 1: +1/-0 |
|
792 | diffstat--debug: 1: +1/-0 | |
1956 | diffstat--debug: 1: +4/-0 |
|
793 | diffstat--debug: 1: +4/-0 | |
1957 | diffstat--debug: 1: +2/-0 |
|
794 | diffstat--debug: 1: +2/-0 | |
1958 | diffstat--debug: 1: +1/-0 |
|
795 | diffstat--debug: 1: +1/-0 | |
1959 | extras: branch=default |
|
796 | extras: branch=default | |
1960 | extras: branch=default |
|
797 | extras: branch=default | |
1961 | extras: branch=default |
|
798 | extras: branch=default | |
1962 | extras: branch=default |
|
799 | extras: branch=default | |
1963 | extras: branch=foo |
|
800 | extras: branch=foo | |
1964 | extras: branch=default |
|
801 | extras: branch=default | |
1965 | extras: branch=default |
|
802 | extras: branch=default | |
1966 | extras: branch=default |
|
803 | extras: branch=default | |
1967 | extras: branch=default |
|
804 | extras: branch=default | |
1968 | extras--verbose: branch=default |
|
805 | extras--verbose: branch=default | |
1969 | extras--verbose: branch=default |
|
806 | extras--verbose: branch=default | |
1970 | extras--verbose: branch=default |
|
807 | extras--verbose: branch=default | |
1971 | extras--verbose: branch=default |
|
808 | extras--verbose: branch=default | |
1972 | extras--verbose: branch=foo |
|
809 | extras--verbose: branch=foo | |
1973 | extras--verbose: branch=default |
|
810 | extras--verbose: branch=default | |
1974 | extras--verbose: branch=default |
|
811 | extras--verbose: branch=default | |
1975 | extras--verbose: branch=default |
|
812 | extras--verbose: branch=default | |
1976 | extras--verbose: branch=default |
|
813 | extras--verbose: branch=default | |
1977 | extras--debug: branch=default |
|
814 | extras--debug: branch=default | |
1978 | extras--debug: branch=default |
|
815 | extras--debug: branch=default | |
1979 | extras--debug: branch=default |
|
816 | extras--debug: branch=default | |
1980 | extras--debug: branch=default |
|
817 | extras--debug: branch=default | |
1981 | extras--debug: branch=foo |
|
818 | extras--debug: branch=foo | |
1982 | extras--debug: branch=default |
|
819 | extras--debug: branch=default | |
1983 | extras--debug: branch=default |
|
820 | extras--debug: branch=default | |
1984 | extras--debug: branch=default |
|
821 | extras--debug: branch=default | |
1985 | extras--debug: branch=default |
|
822 | extras--debug: branch=default | |
1986 | p1rev: 7 |
|
823 | p1rev: 7 | |
1987 | p1rev: -1 |
|
824 | p1rev: -1 | |
1988 | p1rev: 5 |
|
825 | p1rev: 5 | |
1989 | p1rev: 3 |
|
826 | p1rev: 3 | |
1990 | p1rev: 3 |
|
827 | p1rev: 3 | |
1991 | p1rev: 2 |
|
828 | p1rev: 2 | |
1992 | p1rev: 1 |
|
829 | p1rev: 1 | |
1993 | p1rev: 0 |
|
830 | p1rev: 0 | |
1994 | p1rev: -1 |
|
831 | p1rev: -1 | |
1995 | p1rev--verbose: 7 |
|
832 | p1rev--verbose: 7 | |
1996 | p1rev--verbose: -1 |
|
833 | p1rev--verbose: -1 | |
1997 | p1rev--verbose: 5 |
|
834 | p1rev--verbose: 5 | |
1998 | p1rev--verbose: 3 |
|
835 | p1rev--verbose: 3 | |
1999 | p1rev--verbose: 3 |
|
836 | p1rev--verbose: 3 | |
2000 | p1rev--verbose: 2 |
|
837 | p1rev--verbose: 2 | |
2001 | p1rev--verbose: 1 |
|
838 | p1rev--verbose: 1 | |
2002 | p1rev--verbose: 0 |
|
839 | p1rev--verbose: 0 | |
2003 | p1rev--verbose: -1 |
|
840 | p1rev--verbose: -1 | |
2004 | p1rev--debug: 7 |
|
841 | p1rev--debug: 7 | |
2005 | p1rev--debug: -1 |
|
842 | p1rev--debug: -1 | |
2006 | p1rev--debug: 5 |
|
843 | p1rev--debug: 5 | |
2007 | p1rev--debug: 3 |
|
844 | p1rev--debug: 3 | |
2008 | p1rev--debug: 3 |
|
845 | p1rev--debug: 3 | |
2009 | p1rev--debug: 2 |
|
846 | p1rev--debug: 2 | |
2010 | p1rev--debug: 1 |
|
847 | p1rev--debug: 1 | |
2011 | p1rev--debug: 0 |
|
848 | p1rev--debug: 0 | |
2012 | p1rev--debug: -1 |
|
849 | p1rev--debug: -1 | |
2013 | p2rev: -1 |
|
850 | p2rev: -1 | |
2014 | p2rev: -1 |
|
851 | p2rev: -1 | |
2015 | p2rev: 4 |
|
852 | p2rev: 4 | |
2016 | p2rev: -1 |
|
853 | p2rev: -1 | |
2017 | p2rev: -1 |
|
854 | p2rev: -1 | |
2018 | p2rev: -1 |
|
855 | p2rev: -1 | |
2019 | p2rev: -1 |
|
856 | p2rev: -1 | |
2020 | p2rev: -1 |
|
857 | p2rev: -1 | |
2021 | p2rev: -1 |
|
858 | p2rev: -1 | |
2022 | p2rev--verbose: -1 |
|
859 | p2rev--verbose: -1 | |
2023 | p2rev--verbose: -1 |
|
860 | p2rev--verbose: -1 | |
2024 | p2rev--verbose: 4 |
|
861 | p2rev--verbose: 4 | |
2025 | p2rev--verbose: -1 |
|
862 | p2rev--verbose: -1 | |
2026 | p2rev--verbose: -1 |
|
863 | p2rev--verbose: -1 | |
2027 | p2rev--verbose: -1 |
|
864 | p2rev--verbose: -1 | |
2028 | p2rev--verbose: -1 |
|
865 | p2rev--verbose: -1 | |
2029 | p2rev--verbose: -1 |
|
866 | p2rev--verbose: -1 | |
2030 | p2rev--verbose: -1 |
|
867 | p2rev--verbose: -1 | |
2031 | p2rev--debug: -1 |
|
868 | p2rev--debug: -1 | |
2032 | p2rev--debug: -1 |
|
869 | p2rev--debug: -1 | |
2033 | p2rev--debug: 4 |
|
870 | p2rev--debug: 4 | |
2034 | p2rev--debug: -1 |
|
871 | p2rev--debug: -1 | |
2035 | p2rev--debug: -1 |
|
872 | p2rev--debug: -1 | |
2036 | p2rev--debug: -1 |
|
873 | p2rev--debug: -1 | |
2037 | p2rev--debug: -1 |
|
874 | p2rev--debug: -1 | |
2038 | p2rev--debug: -1 |
|
875 | p2rev--debug: -1 | |
2039 | p2rev--debug: -1 |
|
876 | p2rev--debug: -1 | |
2040 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
877 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
2041 | p1node: 0000000000000000000000000000000000000000 |
|
878 | p1node: 0000000000000000000000000000000000000000 | |
2042 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
879 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
2043 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
880 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2044 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
881 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2045 | p1node: 97054abb4ab824450e9164180baf491ae0078465 |
|
882 | p1node: 97054abb4ab824450e9164180baf491ae0078465 | |
2046 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
883 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2047 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
884 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2048 | p1node: 0000000000000000000000000000000000000000 |
|
885 | p1node: 0000000000000000000000000000000000000000 | |
2049 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
886 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
2050 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
887 | p1node--verbose: 0000000000000000000000000000000000000000 | |
2051 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
888 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
2052 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
889 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2053 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
890 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2054 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
891 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
2055 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
892 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2056 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
893 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2057 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
894 | p1node--verbose: 0000000000000000000000000000000000000000 | |
2058 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
895 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
2059 | p1node--debug: 0000000000000000000000000000000000000000 |
|
896 | p1node--debug: 0000000000000000000000000000000000000000 | |
2060 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
897 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
2061 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
898 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2062 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
899 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2063 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
900 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
2064 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
901 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2065 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
902 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2066 | p1node--debug: 0000000000000000000000000000000000000000 |
|
903 | p1node--debug: 0000000000000000000000000000000000000000 | |
2067 | p2node: 0000000000000000000000000000000000000000 |
|
904 | p2node: 0000000000000000000000000000000000000000 | |
2068 | p2node: 0000000000000000000000000000000000000000 |
|
905 | p2node: 0000000000000000000000000000000000000000 | |
2069 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
906 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2070 | p2node: 0000000000000000000000000000000000000000 |
|
907 | p2node: 0000000000000000000000000000000000000000 | |
2071 | p2node: 0000000000000000000000000000000000000000 |
|
908 | p2node: 0000000000000000000000000000000000000000 | |
2072 | p2node: 0000000000000000000000000000000000000000 |
|
909 | p2node: 0000000000000000000000000000000000000000 | |
2073 | p2node: 0000000000000000000000000000000000000000 |
|
910 | p2node: 0000000000000000000000000000000000000000 | |
2074 | p2node: 0000000000000000000000000000000000000000 |
|
911 | p2node: 0000000000000000000000000000000000000000 | |
2075 | p2node: 0000000000000000000000000000000000000000 |
|
912 | p2node: 0000000000000000000000000000000000000000 | |
2076 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
913 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2077 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
914 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2078 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
915 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2079 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
916 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2080 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
917 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2081 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
918 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2082 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
919 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2083 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
920 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2084 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
921 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2085 | p2node--debug: 0000000000000000000000000000000000000000 |
|
922 | p2node--debug: 0000000000000000000000000000000000000000 | |
2086 | p2node--debug: 0000000000000000000000000000000000000000 |
|
923 | p2node--debug: 0000000000000000000000000000000000000000 | |
2087 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
924 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2088 | p2node--debug: 0000000000000000000000000000000000000000 |
|
925 | p2node--debug: 0000000000000000000000000000000000000000 | |
2089 | p2node--debug: 0000000000000000000000000000000000000000 |
|
926 | p2node--debug: 0000000000000000000000000000000000000000 | |
2090 | p2node--debug: 0000000000000000000000000000000000000000 |
|
927 | p2node--debug: 0000000000000000000000000000000000000000 | |
2091 | p2node--debug: 0000000000000000000000000000000000000000 |
|
928 | p2node--debug: 0000000000000000000000000000000000000000 | |
2092 | p2node--debug: 0000000000000000000000000000000000000000 |
|
929 | p2node--debug: 0000000000000000000000000000000000000000 | |
2093 | p2node--debug: 0000000000000000000000000000000000000000 |
|
930 | p2node--debug: 0000000000000000000000000000000000000000 | |
2094 |
|
931 | |||
2095 | Filters work: |
|
932 | Filters work: | |
2096 |
|
933 | |||
2097 | $ hg log --template '{author|domain}\n' |
|
934 | $ hg log --template '{author|domain}\n' | |
2098 |
|
935 | |||
2099 | hostname |
|
936 | hostname | |
2100 |
|
937 | |||
2101 |
|
938 | |||
2102 |
|
939 | |||
2103 |
|
940 | |||
2104 | place |
|
941 | place | |
2105 | place |
|
942 | place | |
2106 | hostname |
|
943 | hostname | |
2107 |
|
944 | |||
2108 | $ hg log --template '{author|person}\n' |
|
945 | $ hg log --template '{author|person}\n' | |
2109 | test |
|
946 | test | |
2110 | User Name |
|
947 | User Name | |
2111 | person |
|
948 | person | |
2112 | person |
|
949 | person | |
2113 | person |
|
950 | person | |
2114 | person |
|
951 | person | |
2115 | other |
|
952 | other | |
2116 | A. N. Other |
|
953 | A. N. Other | |
2117 | User Name |
|
954 | User Name | |
2118 |
|
955 | |||
2119 | $ hg log --template '{author|user}\n' |
|
956 | $ hg log --template '{author|user}\n' | |
2120 | test |
|
957 | test | |
2121 | user |
|
958 | user | |
2122 | person |
|
959 | person | |
2123 | person |
|
960 | person | |
2124 | person |
|
961 | person | |
2125 | person |
|
962 | person | |
2126 | other |
|
963 | other | |
2127 | other |
|
964 | other | |
2128 | user |
|
965 | user | |
2129 |
|
966 | |||
2130 | $ hg log --template '{date|date}\n' |
|
967 | $ hg log --template '{date|date}\n' | |
2131 | Wed Jan 01 10:01:00 2020 +0000 |
|
968 | Wed Jan 01 10:01:00 2020 +0000 | |
2132 | Mon Jan 12 13:46:40 1970 +0000 |
|
969 | Mon Jan 12 13:46:40 1970 +0000 | |
2133 | Sun Jan 18 08:40:01 1970 +0000 |
|
970 | Sun Jan 18 08:40:01 1970 +0000 | |
2134 | Sun Jan 18 08:40:00 1970 +0000 |
|
971 | Sun Jan 18 08:40:00 1970 +0000 | |
2135 | Sat Jan 17 04:53:20 1970 +0000 |
|
972 | Sat Jan 17 04:53:20 1970 +0000 | |
2136 | Fri Jan 16 01:06:40 1970 +0000 |
|
973 | Fri Jan 16 01:06:40 1970 +0000 | |
2137 | Wed Jan 14 21:20:00 1970 +0000 |
|
974 | Wed Jan 14 21:20:00 1970 +0000 | |
2138 | Tue Jan 13 17:33:20 1970 +0000 |
|
975 | Tue Jan 13 17:33:20 1970 +0000 | |
2139 | Mon Jan 12 13:46:40 1970 +0000 |
|
976 | Mon Jan 12 13:46:40 1970 +0000 | |
2140 |
|
977 | |||
2141 | $ hg log --template '{date|isodate}\n' |
|
978 | $ hg log --template '{date|isodate}\n' | |
2142 | 2020-01-01 10:01 +0000 |
|
979 | 2020-01-01 10:01 +0000 | |
2143 | 1970-01-12 13:46 +0000 |
|
980 | 1970-01-12 13:46 +0000 | |
2144 | 1970-01-18 08:40 +0000 |
|
981 | 1970-01-18 08:40 +0000 | |
2145 | 1970-01-18 08:40 +0000 |
|
982 | 1970-01-18 08:40 +0000 | |
2146 | 1970-01-17 04:53 +0000 |
|
983 | 1970-01-17 04:53 +0000 | |
2147 | 1970-01-16 01:06 +0000 |
|
984 | 1970-01-16 01:06 +0000 | |
2148 | 1970-01-14 21:20 +0000 |
|
985 | 1970-01-14 21:20 +0000 | |
2149 | 1970-01-13 17:33 +0000 |
|
986 | 1970-01-13 17:33 +0000 | |
2150 | 1970-01-12 13:46 +0000 |
|
987 | 1970-01-12 13:46 +0000 | |
2151 |
|
988 | |||
2152 | $ hg log --template '{date|isodatesec}\n' |
|
989 | $ hg log --template '{date|isodatesec}\n' | |
2153 | 2020-01-01 10:01:00 +0000 |
|
990 | 2020-01-01 10:01:00 +0000 | |
2154 | 1970-01-12 13:46:40 +0000 |
|
991 | 1970-01-12 13:46:40 +0000 | |
2155 | 1970-01-18 08:40:01 +0000 |
|
992 | 1970-01-18 08:40:01 +0000 | |
2156 | 1970-01-18 08:40:00 +0000 |
|
993 | 1970-01-18 08:40:00 +0000 | |
2157 | 1970-01-17 04:53:20 +0000 |
|
994 | 1970-01-17 04:53:20 +0000 | |
2158 | 1970-01-16 01:06:40 +0000 |
|
995 | 1970-01-16 01:06:40 +0000 | |
2159 | 1970-01-14 21:20:00 +0000 |
|
996 | 1970-01-14 21:20:00 +0000 | |
2160 | 1970-01-13 17:33:20 +0000 |
|
997 | 1970-01-13 17:33:20 +0000 | |
2161 | 1970-01-12 13:46:40 +0000 |
|
998 | 1970-01-12 13:46:40 +0000 | |
2162 |
|
999 | |||
2163 | $ hg log --template '{date|rfc822date}\n' |
|
1000 | $ hg log --template '{date|rfc822date}\n' | |
2164 | Wed, 01 Jan 2020 10:01:00 +0000 |
|
1001 | Wed, 01 Jan 2020 10:01:00 +0000 | |
2165 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
1002 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2166 | Sun, 18 Jan 1970 08:40:01 +0000 |
|
1003 | Sun, 18 Jan 1970 08:40:01 +0000 | |
2167 | Sun, 18 Jan 1970 08:40:00 +0000 |
|
1004 | Sun, 18 Jan 1970 08:40:00 +0000 | |
2168 | Sat, 17 Jan 1970 04:53:20 +0000 |
|
1005 | Sat, 17 Jan 1970 04:53:20 +0000 | |
2169 | Fri, 16 Jan 1970 01:06:40 +0000 |
|
1006 | Fri, 16 Jan 1970 01:06:40 +0000 | |
2170 | Wed, 14 Jan 1970 21:20:00 +0000 |
|
1007 | Wed, 14 Jan 1970 21:20:00 +0000 | |
2171 | Tue, 13 Jan 1970 17:33:20 +0000 |
|
1008 | Tue, 13 Jan 1970 17:33:20 +0000 | |
2172 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
1009 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2173 |
|
1010 | |||
2174 | $ hg log --template '{desc|firstline}\n' |
|
1011 | $ hg log --template '{desc|firstline}\n' | |
2175 | third |
|
1012 | third | |
2176 | second |
|
1013 | second | |
2177 | merge |
|
1014 | merge | |
2178 | new head |
|
1015 | new head | |
2179 | new branch |
|
1016 | new branch | |
2180 | no user, no domain |
|
1017 | no user, no domain | |
2181 | no person |
|
1018 | no person | |
2182 | other 1 |
|
1019 | other 1 | |
2183 | line 1 |
|
1020 | line 1 | |
2184 |
|
1021 | |||
2185 | $ hg log --template '{node|short}\n' |
|
1022 | $ hg log --template '{node|short}\n' | |
2186 | 95c24699272e |
|
1023 | 95c24699272e | |
2187 | 29114dbae42b |
|
1024 | 29114dbae42b | |
2188 | d41e714fe50d |
|
1025 | d41e714fe50d | |
2189 | 13207e5a10d9 |
|
1026 | 13207e5a10d9 | |
2190 | bbe44766e73d |
|
1027 | bbe44766e73d | |
2191 | 10e46f2dcbf4 |
|
1028 | 10e46f2dcbf4 | |
2192 | 97054abb4ab8 |
|
1029 | 97054abb4ab8 | |
2193 | b608e9d1a3f0 |
|
1030 | b608e9d1a3f0 | |
2194 | 1e4e1b8f71e0 |
|
1031 | 1e4e1b8f71e0 | |
2195 |
|
1032 | |||
2196 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' |
|
1033 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' | |
2197 | <changeset author="test"/> |
|
1034 | <changeset author="test"/> | |
2198 | <changeset author="User Name <user@hostname>"/> |
|
1035 | <changeset author="User Name <user@hostname>"/> | |
2199 | <changeset author="person"/> |
|
1036 | <changeset author="person"/> | |
2200 | <changeset author="person"/> |
|
1037 | <changeset author="person"/> | |
2201 | <changeset author="person"/> |
|
1038 | <changeset author="person"/> | |
2202 | <changeset author="person"/> |
|
1039 | <changeset author="person"/> | |
2203 | <changeset author="other@place"/> |
|
1040 | <changeset author="other@place"/> | |
2204 | <changeset author="A. N. Other <other@place>"/> |
|
1041 | <changeset author="A. N. Other <other@place>"/> | |
2205 | <changeset author="User Name <user@hostname>"/> |
|
1042 | <changeset author="User Name <user@hostname>"/> | |
2206 |
|
1043 | |||
2207 | $ hg log --template '{rev}: {children}\n' |
|
1044 | $ hg log --template '{rev}: {children}\n' | |
2208 | 8: |
|
1045 | 8: | |
2209 | 7: 8:95c24699272e |
|
1046 | 7: 8:95c24699272e | |
2210 | 6: |
|
1047 | 6: | |
2211 | 5: 6:d41e714fe50d |
|
1048 | 5: 6:d41e714fe50d | |
2212 | 4: 6:d41e714fe50d |
|
1049 | 4: 6:d41e714fe50d | |
2213 | 3: 4:bbe44766e73d 5:13207e5a10d9 |
|
1050 | 3: 4:bbe44766e73d 5:13207e5a10d9 | |
2214 | 2: 3:10e46f2dcbf4 |
|
1051 | 2: 3:10e46f2dcbf4 | |
2215 | 1: 2:97054abb4ab8 |
|
1052 | 1: 2:97054abb4ab8 | |
2216 | 0: 1:b608e9d1a3f0 |
|
1053 | 0: 1:b608e9d1a3f0 | |
2217 |
|
1054 | |||
2218 | Formatnode filter works: |
|
1055 | Formatnode filter works: | |
2219 |
|
1056 | |||
2220 | $ hg -q log -r 0 --template '{node|formatnode}\n' |
|
1057 | $ hg -q log -r 0 --template '{node|formatnode}\n' | |
2221 | 1e4e1b8f71e0 |
|
1058 | 1e4e1b8f71e0 | |
2222 |
|
1059 | |||
2223 | $ hg log -r 0 --template '{node|formatnode}\n' |
|
1060 | $ hg log -r 0 --template '{node|formatnode}\n' | |
2224 | 1e4e1b8f71e0 |
|
1061 | 1e4e1b8f71e0 | |
2225 |
|
1062 | |||
2226 | $ hg -v log -r 0 --template '{node|formatnode}\n' |
|
1063 | $ hg -v log -r 0 --template '{node|formatnode}\n' | |
2227 | 1e4e1b8f71e0 |
|
1064 | 1e4e1b8f71e0 | |
2228 |
|
1065 | |||
2229 | $ hg --debug log -r 0 --template '{node|formatnode}\n' |
|
1066 | $ hg --debug log -r 0 --template '{node|formatnode}\n' | |
2230 | 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1067 | 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2231 |
|
1068 | |||
2232 | Age filter: |
|
1069 | Age filter: | |
2233 |
|
1070 | |||
2234 | $ hg init unstable-hash |
|
1071 | $ hg init unstable-hash | |
2235 | $ cd unstable-hash |
|
1072 | $ cd unstable-hash | |
2236 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 |
|
1073 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 | |
2237 |
|
1074 | |||
2238 | >>> from __future__ import absolute_import |
|
1075 | >>> from __future__ import absolute_import | |
2239 | >>> import datetime |
|
1076 | >>> import datetime | |
2240 | >>> fp = open('a', 'wb') |
|
1077 | >>> fp = open('a', 'wb') | |
2241 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) |
|
1078 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) | |
2242 | >>> fp.write(b'%d-%d-%d 00:00' % (n.year, n.month, n.day)) and None |
|
1079 | >>> fp.write(b'%d-%d-%d 00:00' % (n.year, n.month, n.day)) and None | |
2243 | >>> fp.close() |
|
1080 | >>> fp.close() | |
2244 | $ hg add a |
|
1081 | $ hg add a | |
2245 | $ hg commit -m future -d "`cat a`" |
|
1082 | $ hg commit -m future -d "`cat a`" | |
2246 |
|
1083 | |||
2247 | $ hg log -l1 --template '{date|age}\n' |
|
1084 | $ hg log -l1 --template '{date|age}\n' | |
2248 | 7 years from now |
|
1085 | 7 years from now | |
2249 |
|
1086 | |||
2250 | $ cd .. |
|
1087 | $ cd .. | |
2251 | $ rm -rf unstable-hash |
|
1088 | $ rm -rf unstable-hash | |
2252 |
|
1089 | |||
2253 | Filename filters: |
|
1090 | Filename filters: | |
2254 |
|
1091 | |||
2255 | $ hg debugtemplate '{"foo/bar"|basename}|{"foo/"|basename}|{"foo"|basename}|\n' |
|
1092 | $ hg debugtemplate '{"foo/bar"|basename}|{"foo/"|basename}|{"foo"|basename}|\n' | |
2256 | bar||foo| |
|
1093 | bar||foo| | |
2257 | $ hg debugtemplate '{"foo/bar"|dirname}|{"foo/"|dirname}|{"foo"|dirname}|\n' |
|
1094 | $ hg debugtemplate '{"foo/bar"|dirname}|{"foo/"|dirname}|{"foo"|dirname}|\n' | |
2258 | foo|foo|| |
|
1095 | foo|foo|| | |
2259 | $ hg debugtemplate '{"foo/bar"|stripdir}|{"foo/"|stripdir}|{"foo"|stripdir}|\n' |
|
1096 | $ hg debugtemplate '{"foo/bar"|stripdir}|{"foo/"|stripdir}|{"foo"|stripdir}|\n' | |
2260 | foo|foo|foo| |
|
1097 | foo|foo|foo| | |
2261 |
|
1098 | |||
2262 | Add a dummy commit to make up for the instability of the above: |
|
1099 | Add a dummy commit to make up for the instability of the above: | |
2263 |
|
1100 | |||
2264 | $ echo a > a |
|
1101 | $ echo a > a | |
2265 | $ hg add a |
|
1102 | $ hg add a | |
2266 | $ hg ci -m future |
|
1103 | $ hg ci -m future | |
2267 |
|
1104 | |||
2268 | Count filter: |
|
1105 | Count filter: | |
2269 |
|
1106 | |||
2270 | $ hg log -l1 --template '{node|count} {node|short|count}\n' |
|
1107 | $ hg log -l1 --template '{node|count} {node|short|count}\n' | |
2271 | 40 12 |
|
1108 | 40 12 | |
2272 |
|
1109 | |||
2273 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' |
|
1110 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' | |
2274 | 0 1 4 |
|
1111 | 0 1 4 | |
2275 |
|
1112 | |||
2276 | $ hg log -G --template '{rev}: children: {children|count}, \ |
|
1113 | $ hg log -G --template '{rev}: children: {children|count}, \ | |
2277 | > tags: {tags|count}, file_adds: {file_adds|count}, \ |
|
1114 | > tags: {tags|count}, file_adds: {file_adds|count}, \ | |
2278 | > ancestors: {revset("ancestors(%s)", rev)|count}' |
|
1115 | > ancestors: {revset("ancestors(%s)", rev)|count}' | |
2279 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 |
|
1116 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 | |
2280 | | |
|
1117 | | | |
2281 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 |
|
1118 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 | |
2282 | | |
|
1119 | | | |
2283 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
1120 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2284 |
|
1121 | |||
2285 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 |
|
1122 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 | |
2286 | |\ |
|
1123 | |\ | |
2287 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 |
|
1124 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 | |
2288 | | | |
|
1125 | | | | |
2289 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 |
|
1126 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 | |
2290 | |/ |
|
1127 | |/ | |
2291 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 |
|
1128 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 | |
2292 | | |
|
1129 | | | |
2293 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 |
|
1130 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 | |
2294 | | |
|
1131 | | | |
2295 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 |
|
1132 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 | |
2296 | | |
|
1133 | | | |
2297 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
1134 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2298 |
|
1135 | |||
2299 |
|
1136 | |||
2300 | $ hg log -l1 -T '{termwidth|count}\n' |
|
1137 | $ hg log -l1 -T '{termwidth|count}\n' | |
2301 | hg: parse error: not countable |
|
1138 | hg: parse error: not countable | |
2302 | (template filter 'count' is not compatible with keyword 'termwidth') |
|
1139 | (template filter 'count' is not compatible with keyword 'termwidth') | |
2303 | [255] |
|
1140 | [255] | |
2304 |
|
1141 | |||
2305 | Upper/lower filters: |
|
1142 | Upper/lower filters: | |
2306 |
|
1143 | |||
2307 | $ hg log -r0 --template '{branch|upper}\n' |
|
1144 | $ hg log -r0 --template '{branch|upper}\n' | |
2308 | DEFAULT |
|
1145 | DEFAULT | |
2309 | $ hg log -r0 --template '{author|lower}\n' |
|
1146 | $ hg log -r0 --template '{author|lower}\n' | |
2310 | user name <user@hostname> |
|
1147 | user name <user@hostname> | |
2311 | $ hg log -r0 --template '{date|upper}\n' |
|
1148 | $ hg log -r0 --template '{date|upper}\n' | |
2312 | 1000000.00 |
|
1149 | 1000000.00 | |
2313 |
|
1150 | |||
2314 | Add a commit that does all possible modifications at once |
|
1151 | Add a commit that does all possible modifications at once | |
2315 |
|
1152 | |||
2316 | $ echo modify >> third |
|
1153 | $ echo modify >> third | |
2317 | $ touch b |
|
1154 | $ touch b | |
2318 | $ hg add b |
|
1155 | $ hg add b | |
2319 | $ hg mv fourth fifth |
|
1156 | $ hg mv fourth fifth | |
2320 | $ hg rm a |
|
1157 | $ hg rm a | |
2321 | $ hg ci -m "Modify, add, remove, rename" |
|
1158 | $ hg ci -m "Modify, add, remove, rename" | |
2322 |
|
1159 | |||
2323 | Check the status template |
|
1160 | Error on syntax: | |
2324 |
|
1161 | |||
2325 |
$ cat <<EOF > |
|
1162 | $ cat <<EOF > t | |
2326 | > [extensions] |
|
1163 | > changeset = '{c}' | |
2327 |
> c |
|
1164 | > c = q | |
|
1165 | > x = "f | |||
2328 | > EOF |
|
1166 | > EOF | |
2329 |
|
1167 | $ echo '[ui]' > .hg/hgrc | ||
2330 | $ hg log -T status -r 10 |
|
1168 | $ echo 'style = t' >> .hg/hgrc | |
2331 | changeset: 10:0f9759ec227a |
|
|||
2332 | tag: tip |
|
|||
2333 | user: test |
|
|||
2334 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2335 | summary: Modify, add, remove, rename |
|
|||
2336 | files: |
|
|||
2337 | M third |
|
|||
2338 | A b |
|
|||
2339 | A fifth |
|
|||
2340 | R a |
|
|||
2341 | R fourth |
|
|||
2342 |
|
||||
2343 | $ hg log -T status -C -r 10 |
|
|||
2344 | changeset: 10:0f9759ec227a |
|
|||
2345 | tag: tip |
|
|||
2346 | user: test |
|
|||
2347 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2348 | summary: Modify, add, remove, rename |
|
|||
2349 | files: |
|
|||
2350 | M third |
|
|||
2351 | A b |
|
|||
2352 | A fifth |
|
|||
2353 | fourth |
|
|||
2354 | R a |
|
|||
2355 | R fourth |
|
|||
2356 |
|
||||
2357 | $ hg log -T status -C -r 10 -v |
|
|||
2358 | changeset: 10:0f9759ec227a |
|
|||
2359 | tag: tip |
|
|||
2360 | user: test |
|
|||
2361 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2362 | description: |
|
|||
2363 | Modify, add, remove, rename |
|
|||
2364 |
|
||||
2365 | files: |
|
|||
2366 | M third |
|
|||
2367 | A b |
|
|||
2368 | A fifth |
|
|||
2369 | fourth |
|
|||
2370 | R a |
|
|||
2371 | R fourth |
|
|||
2372 |
|
||||
2373 | $ hg log -T status -C -r 10 --debug |
|
|||
2374 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c |
|
|||
2375 | tag: tip |
|
|||
2376 | phase: secret |
|
|||
2377 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 |
|
|||
2378 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2379 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 |
|
|||
2380 | user: test |
|
|||
2381 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2382 | extra: branch=default |
|
|||
2383 | description: |
|
|||
2384 | Modify, add, remove, rename |
|
|||
2385 |
|
||||
2386 | files: |
|
|||
2387 | M third |
|
|||
2388 | A b |
|
|||
2389 | A fifth |
|
|||
2390 | fourth |
|
|||
2391 | R a |
|
|||
2392 | R fourth |
|
|||
2393 |
|
||||
2394 | $ hg log -T status -C -r 10 --quiet |
|
|||
2395 | 10:0f9759ec227a |
|
|||
2396 | $ hg --color=debug log -T status -r 10 |
|
|||
2397 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
|||
2398 | [log.tag|tag: tip] |
|
|||
2399 | [log.user|user: test] |
|
|||
2400 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
|||
2401 | [log.summary|summary: Modify, add, remove, rename] |
|
|||
2402 | [ui.note log.files|files:] |
|
|||
2403 | [status.modified|M third] |
|
|||
2404 | [status.added|A b] |
|
|||
2405 | [status.added|A fifth] |
|
|||
2406 | [status.removed|R a] |
|
|||
2407 | [status.removed|R fourth] |
|
|||
2408 |
|
||||
2409 | $ hg --color=debug log -T status -C -r 10 |
|
|||
2410 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
|||
2411 | [log.tag|tag: tip] |
|
|||
2412 | [log.user|user: test] |
|
|||
2413 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
|||
2414 | [log.summary|summary: Modify, add, remove, rename] |
|
|||
2415 | [ui.note log.files|files:] |
|
|||
2416 | [status.modified|M third] |
|
|||
2417 | [status.added|A b] |
|
|||
2418 | [status.added|A fifth] |
|
|||
2419 | [status.copied| fourth] |
|
|||
2420 | [status.removed|R a] |
|
|||
2421 | [status.removed|R fourth] |
|
|||
2422 |
|
||||
2423 | $ hg --color=debug log -T status -C -r 10 -v |
|
|||
2424 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
|||
2425 | [log.tag|tag: tip] |
|
|||
2426 | [log.user|user: test] |
|
|||
2427 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
|||
2428 | [ui.note log.description|description:] |
|
|||
2429 | [ui.note log.description|Modify, add, remove, rename] |
|
|||
2430 |
|
||||
2431 | [ui.note log.files|files:] |
|
|||
2432 | [status.modified|M third] |
|
|||
2433 | [status.added|A b] |
|
|||
2434 | [status.added|A fifth] |
|
|||
2435 | [status.copied| fourth] |
|
|||
2436 | [status.removed|R a] |
|
|||
2437 | [status.removed|R fourth] |
|
|||
2438 |
|
||||
2439 | $ hg --color=debug log -T status -C -r 10 --debug |
|
|||
2440 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] |
|
|||
2441 | [log.tag|tag: tip] |
|
|||
2442 | [log.phase|phase: secret] |
|
|||
2443 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] |
|
|||
2444 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2445 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] |
|
|||
2446 | [log.user|user: test] |
|
|||
2447 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
|||
2448 | [ui.debug log.extra|extra: branch=default] |
|
|||
2449 | [ui.note log.description|description:] |
|
|||
2450 | [ui.note log.description|Modify, add, remove, rename] |
|
|||
2451 |
|
||||
2452 | [ui.note log.files|files:] |
|
|||
2453 | [status.modified|M third] |
|
|||
2454 | [status.added|A b] |
|
|||
2455 | [status.added|A fifth] |
|
|||
2456 | [status.copied| fourth] |
|
|||
2457 | [status.removed|R a] |
|
|||
2458 | [status.removed|R fourth] |
|
|||
2459 |
|
||||
2460 | $ hg --color=debug log -T status -C -r 10 --quiet |
|
|||
2461 | [log.node|10:0f9759ec227a] |
|
|||
2462 |
|
||||
2463 | Check the bisect template |
|
|||
2464 |
|
||||
2465 | $ hg bisect -g 1 |
|
|||
2466 | $ hg bisect -b 3 --noupdate |
|
|||
2467 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) |
|
|||
2468 | $ hg log -T bisect -r 0:4 |
|
|||
2469 | changeset: 0:1e4e1b8f71e0 |
|
|||
2470 | bisect: good (implicit) |
|
|||
2471 | user: User Name <user@hostname> |
|
|||
2472 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2473 | summary: line 1 |
|
|||
2474 |
|
||||
2475 | changeset: 1:b608e9d1a3f0 |
|
|||
2476 | bisect: good |
|
|||
2477 | user: A. N. Other <other@place> |
|
|||
2478 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
|||
2479 | summary: other 1 |
|
|||
2480 |
|
||||
2481 | changeset: 2:97054abb4ab8 |
|
|||
2482 | bisect: untested |
|
|||
2483 | user: other@place |
|
|||
2484 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
|||
2485 | summary: no person |
|
|||
2486 |
|
||||
2487 | changeset: 3:10e46f2dcbf4 |
|
|||
2488 | bisect: bad |
|
|||
2489 | user: person |
|
|||
2490 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
|||
2491 | summary: no user, no domain |
|
|||
2492 |
|
||||
2493 | changeset: 4:bbe44766e73d |
|
|||
2494 | bisect: bad (implicit) |
|
|||
2495 | branch: foo |
|
|||
2496 | user: person |
|
|||
2497 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
|||
2498 | summary: new branch |
|
|||
2499 |
|
||||
2500 | $ hg log --debug -T bisect -r 0:4 |
|
|||
2501 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
2502 | bisect: good (implicit) |
|
|||
2503 | phase: public |
|
|||
2504 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2505 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2506 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
|||
2507 | user: User Name <user@hostname> |
|
|||
2508 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2509 | files+: a |
|
|||
2510 | extra: branch=default |
|
|||
2511 | description: |
|
|||
2512 | line 1 |
|
|||
2513 | line 2 |
|
|||
2514 |
|
||||
2515 |
|
||||
2516 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
2517 | bisect: good |
|
|||
2518 | phase: public |
|
|||
2519 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
2520 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2521 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
|||
2522 | user: A. N. Other <other@place> |
|
|||
2523 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
|||
2524 | files+: b |
|
|||
2525 | extra: branch=default |
|
|||
2526 | description: |
|
|||
2527 | other 1 |
|
|||
2528 | other 2 |
|
|||
2529 |
|
||||
2530 | other 3 |
|
|||
2531 |
|
||||
2532 |
|
||||
2533 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
|||
2534 | bisect: untested |
|
|||
2535 | phase: public |
|
|||
2536 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
2537 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2538 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
|||
2539 | user: other@place |
|
|||
2540 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
|||
2541 | files+: c |
|
|||
2542 | extra: branch=default |
|
|||
2543 | description: |
|
|||
2544 | no person |
|
|||
2545 |
|
||||
2546 |
|
||||
2547 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2548 | bisect: bad |
|
|||
2549 | phase: public |
|
|||
2550 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
|||
2551 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2552 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
|||
2553 | user: person |
|
|||
2554 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
|||
2555 | files: c |
|
|||
2556 | extra: branch=default |
|
|||
2557 | description: |
|
|||
2558 | no user, no domain |
|
|||
2559 |
|
||||
2560 |
|
||||
2561 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
2562 | bisect: bad (implicit) |
|
|||
2563 | branch: foo |
|
|||
2564 | phase: draft |
|
|||
2565 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2566 | parent: -1:0000000000000000000000000000000000000000 |
|
|||
2567 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
|||
2568 | user: person |
|
|||
2569 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
|||
2570 | extra: branch=foo |
|
|||
2571 | description: |
|
|||
2572 | new branch |
|
|||
2573 |
|
||||
2574 |
|
||||
2575 | $ hg log -v -T bisect -r 0:4 |
|
|||
2576 | changeset: 0:1e4e1b8f71e0 |
|
|||
2577 | bisect: good (implicit) |
|
|||
2578 | user: User Name <user@hostname> |
|
|||
2579 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2580 | files: a |
|
|||
2581 | description: |
|
|||
2582 | line 1 |
|
|||
2583 | line 2 |
|
|||
2584 |
|
||||
2585 |
|
||||
2586 | changeset: 1:b608e9d1a3f0 |
|
|||
2587 | bisect: good |
|
|||
2588 | user: A. N. Other <other@place> |
|
|||
2589 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
|||
2590 | files: b |
|
|||
2591 | description: |
|
|||
2592 | other 1 |
|
|||
2593 | other 2 |
|
|||
2594 |
|
||||
2595 | other 3 |
|
|||
2596 |
|
||||
2597 |
|
||||
2598 | changeset: 2:97054abb4ab8 |
|
|||
2599 | bisect: untested |
|
|||
2600 | user: other@place |
|
|||
2601 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
|||
2602 | files: c |
|
|||
2603 | description: |
|
|||
2604 | no person |
|
|||
2605 |
|
||||
2606 |
|
||||
2607 | changeset: 3:10e46f2dcbf4 |
|
|||
2608 | bisect: bad |
|
|||
2609 | user: person |
|
|||
2610 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
|||
2611 | files: c |
|
|||
2612 | description: |
|
|||
2613 | no user, no domain |
|
|||
2614 |
|
||||
2615 |
|
||||
2616 | changeset: 4:bbe44766e73d |
|
|||
2617 | bisect: bad (implicit) |
|
|||
2618 | branch: foo |
|
|||
2619 | user: person |
|
|||
2620 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
|||
2621 | description: |
|
|||
2622 | new branch |
|
|||
2623 |
|
||||
2624 |
|
||||
2625 | $ hg --color=debug log -T bisect -r 0:4 |
|
|||
2626 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
|||
2627 | [log.bisect bisect.good|bisect: good (implicit)] |
|
|||
2628 | [log.user|user: User Name <user@hostname>] |
|
|||
2629 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
|||
2630 | [log.summary|summary: line 1] |
|
|||
2631 |
|
||||
2632 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
|||
2633 | [log.bisect bisect.good|bisect: good] |
|
|||
2634 | [log.user|user: A. N. Other <other@place>] |
|
|||
2635 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
|||
2636 | [log.summary|summary: other 1] |
|
|||
2637 |
|
||||
2638 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
|||
2639 | [log.bisect bisect.untested|bisect: untested] |
|
|||
2640 | [log.user|user: other@place] |
|
|||
2641 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
|||
2642 | [log.summary|summary: no person] |
|
|||
2643 |
|
||||
2644 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
|||
2645 | [log.bisect bisect.bad|bisect: bad] |
|
|||
2646 | [log.user|user: person] |
|
|||
2647 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
|||
2648 | [log.summary|summary: no user, no domain] |
|
|||
2649 |
|
||||
2650 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
|||
2651 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
|||
2652 | [log.branch|branch: foo] |
|
|||
2653 | [log.user|user: person] |
|
|||
2654 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
|||
2655 | [log.summary|summary: new branch] |
|
|||
2656 |
|
||||
2657 | $ hg --color=debug log --debug -T bisect -r 0:4 |
|
|||
2658 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
|||
2659 | [log.bisect bisect.good|bisect: good (implicit)] |
|
|||
2660 | [log.phase|phase: public] |
|
|||
2661 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2662 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2663 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] |
|
|||
2664 | [log.user|user: User Name <user@hostname>] |
|
|||
2665 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
|||
2666 | [ui.debug log.files|files+: a] |
|
|||
2667 | [ui.debug log.extra|extra: branch=default] |
|
|||
2668 | [ui.note log.description|description:] |
|
|||
2669 | [ui.note log.description|line 1 |
|
|||
2670 | line 2] |
|
|||
2671 |
|
||||
2672 |
|
||||
2673 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
|||
2674 | [log.bisect bisect.good|bisect: good] |
|
|||
2675 | [log.phase|phase: public] |
|
|||
2676 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
|||
2677 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2678 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] |
|
|||
2679 | [log.user|user: A. N. Other <other@place>] |
|
|||
2680 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
|||
2681 | [ui.debug log.files|files+: b] |
|
|||
2682 | [ui.debug log.extra|extra: branch=default] |
|
|||
2683 | [ui.note log.description|description:] |
|
|||
2684 | [ui.note log.description|other 1 |
|
|||
2685 | other 2 |
|
|||
2686 |
|
||||
2687 | other 3] |
|
|||
2688 |
|
||||
2689 |
|
||||
2690 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
|||
2691 | [log.bisect bisect.untested|bisect: untested] |
|
|||
2692 | [log.phase|phase: public] |
|
|||
2693 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
|||
2694 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2695 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] |
|
|||
2696 | [log.user|user: other@place] |
|
|||
2697 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
|||
2698 | [ui.debug log.files|files+: c] |
|
|||
2699 | [ui.debug log.extra|extra: branch=default] |
|
|||
2700 | [ui.note log.description|description:] |
|
|||
2701 | [ui.note log.description|no person] |
|
|||
2702 |
|
||||
2703 |
|
||||
2704 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
|||
2705 | [log.bisect bisect.bad|bisect: bad] |
|
|||
2706 | [log.phase|phase: public] |
|
|||
2707 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
|||
2708 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2709 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
|||
2710 | [log.user|user: person] |
|
|||
2711 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
|||
2712 | [ui.debug log.files|files: c] |
|
|||
2713 | [ui.debug log.extra|extra: branch=default] |
|
|||
2714 | [ui.note log.description|description:] |
|
|||
2715 | [ui.note log.description|no user, no domain] |
|
|||
2716 |
|
||||
2717 |
|
||||
2718 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] |
|
|||
2719 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
|||
2720 | [log.branch|branch: foo] |
|
|||
2721 | [log.phase|phase: draft] |
|
|||
2722 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
|||
2723 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
|||
2724 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
|||
2725 | [log.user|user: person] |
|
|||
2726 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
|||
2727 | [ui.debug log.extra|extra: branch=foo] |
|
|||
2728 | [ui.note log.description|description:] |
|
|||
2729 | [ui.note log.description|new branch] |
|
|||
2730 |
|
||||
2731 |
|
||||
2732 | $ hg --color=debug log -v -T bisect -r 0:4 |
|
|||
2733 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
|||
2734 | [log.bisect bisect.good|bisect: good (implicit)] |
|
|||
2735 | [log.user|user: User Name <user@hostname>] |
|
|||
2736 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
|||
2737 | [ui.note log.files|files: a] |
|
|||
2738 | [ui.note log.description|description:] |
|
|||
2739 | [ui.note log.description|line 1 |
|
|||
2740 | line 2] |
|
|||
2741 |
|
||||
2742 |
|
||||
2743 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
|||
2744 | [log.bisect bisect.good|bisect: good] |
|
|||
2745 | [log.user|user: A. N. Other <other@place>] |
|
|||
2746 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
|||
2747 | [ui.note log.files|files: b] |
|
|||
2748 | [ui.note log.description|description:] |
|
|||
2749 | [ui.note log.description|other 1 |
|
|||
2750 | other 2 |
|
|||
2751 |
|
||||
2752 | other 3] |
|
|||
2753 |
|
||||
2754 |
|
||||
2755 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
|||
2756 | [log.bisect bisect.untested|bisect: untested] |
|
|||
2757 | [log.user|user: other@place] |
|
|||
2758 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
|||
2759 | [ui.note log.files|files: c] |
|
|||
2760 | [ui.note log.description|description:] |
|
|||
2761 | [ui.note log.description|no person] |
|
|||
2762 |
|
||||
2763 |
|
||||
2764 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
|||
2765 | [log.bisect bisect.bad|bisect: bad] |
|
|||
2766 | [log.user|user: person] |
|
|||
2767 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
|||
2768 | [ui.note log.files|files: c] |
|
|||
2769 | [ui.note log.description|description:] |
|
|||
2770 | [ui.note log.description|no user, no domain] |
|
|||
2771 |
|
||||
2772 |
|
||||
2773 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
|||
2774 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
|||
2775 | [log.branch|branch: foo] |
|
|||
2776 | [log.user|user: person] |
|
|||
2777 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
|||
2778 | [ui.note log.description|description:] |
|
|||
2779 | [ui.note log.description|new branch] |
|
|||
2780 |
|
||||
2781 |
|
||||
2782 | $ hg bisect --reset |
|
|||
2783 |
|
||||
2784 | Error on syntax: |
|
|||
2785 |
|
||||
2786 | $ echo 'x = "f' >> t |
|
|||
2787 | $ hg log |
|
1169 | $ hg log | |
2788 | hg: parse error at t:3: unmatched quotes |
|
1170 | hg: parse error at t:3: unmatched quotes | |
2789 | [255] |
|
1171 | [255] | |
2790 |
|
1172 | |||
2791 | $ hg log -T '{date' |
|
1173 | $ hg log -T '{date' | |
2792 | hg: parse error at 1: unterminated template expansion |
|
1174 | hg: parse error at 1: unterminated template expansion | |
2793 | ({date |
|
1175 | ({date | |
2794 | ^ here) |
|
1176 | ^ here) | |
2795 | [255] |
|
1177 | [255] | |
2796 |
$ hg log -T ' |
|
1178 | $ hg log -T '{date(}' | |
2797 | hg: parse error at 6: not a prefix: end |
|
1179 | hg: parse error at 6: not a prefix: end | |
2798 |
|
|
1180 | ({date(} | |
2799 | ^ here) |
|
1181 | ^ here) | |
2800 | [255] |
|
1182 | [255] | |
2801 |
$ hg log -T '{date)}' |
|
1183 | $ hg log -T '{date)}' | |
2802 | hg: parse error at 5: invalid token |
|
1184 | hg: parse error at 5: invalid token | |
2803 |
|
|
1185 | ({date)} | |
2804 | ^ here) |
|
1186 | ^ here) | |
2805 | [255] |
|
1187 | [255] | |
2806 |
$ hg log -T '{date date}' |
|
1188 | $ hg log -T '{date date}' | |
2807 | hg: parse error at 6: invalid token |
|
1189 | hg: parse error at 6: invalid token | |
2808 |
|
|
1190 | ({date date} | |
2809 | ^ here) |
|
1191 | ^ here) | |
2810 | [255] |
|
1192 | [255] | |
2811 |
|
1193 | |||
2812 |
$ hg log -T '{}' |
|
1194 | $ hg log -T '{}' | |
2813 | hg: parse error at 1: not a prefix: end |
|
1195 | hg: parse error at 1: not a prefix: end | |
2814 |
|
|
1196 | ({} | |
2815 | ^ here) |
|
1197 | ^ here) | |
2816 | [255] |
|
1198 | [255] | |
2817 |
$ hg debugtemplate -v '{()}' |
|
1199 | $ hg debugtemplate -v '{()}' | |
2818 | (template |
|
1200 | (template | |
2819 | (group |
|
1201 | (group | |
2820 | None)) |
|
1202 | None)) | |
2821 | * keywords: |
|
1203 | * keywords: | |
2822 | * functions: |
|
1204 | * functions: | |
2823 | hg: parse error: missing argument |
|
1205 | hg: parse error: missing argument | |
2824 | [255] |
|
1206 | [255] | |
2825 |
|
1207 | |||
2826 | Behind the scenes, this would throw TypeError without intype=bytes |
|
1208 | Behind the scenes, this would throw TypeError without intype=bytes | |
2827 |
|
1209 | |||
2828 |
$ hg log -l 3 --template '{date|obfuscate}\n' |
|
1210 | $ hg log -l 3 --template '{date|obfuscate}\n' | |
2829 |
|
|
1211 | 0.00 | |
2830 |
|
|
1212 | 0.00 | |
2831 |
|
|
1213 | 1577872860.00 | |
2832 |
|
1214 | |||
2833 | Behind the scenes, this will throw a ValueError |
|
1215 | Behind the scenes, this will throw a ValueError | |
2834 |
|
1216 | |||
2835 |
$ hg log -l 3 --template 'line: {desc|shortdate}\n' |
|
1217 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' | |
2836 | hg: parse error: invalid date: 'Modify, add, remove, rename' |
|
1218 | hg: parse error: invalid date: 'Modify, add, remove, rename' | |
2837 | (template filter 'shortdate' is not compatible with keyword 'desc') |
|
1219 | (template filter 'shortdate' is not compatible with keyword 'desc') | |
2838 | [255] |
|
1220 | [255] | |
2839 |
|
1221 | |||
2840 | Behind the scenes, this would throw AttributeError without intype=bytes |
|
1222 | Behind the scenes, this would throw AttributeError without intype=bytes | |
2841 |
|
1223 | |||
2842 |
$ hg log -l 3 --template 'line: {date|escape}\n' |
|
1224 | $ hg log -l 3 --template 'line: {date|escape}\n' | |
2843 | line: 0.00 |
|
1225 | line: 0.00 | |
2844 | line: 0.00 |
|
1226 | line: 0.00 | |
2845 | line: 1577872860.00 |
|
1227 | line: 1577872860.00 | |
2846 |
|
1228 | |||
2847 |
$ hg log -l 3 --template 'line: {extras|localdate}\n' |
|
1229 | $ hg log -l 3 --template 'line: {extras|localdate}\n' | |
2848 | hg: parse error: localdate expects a date information |
|
1230 | hg: parse error: localdate expects a date information | |
2849 | [255] |
|
1231 | [255] | |
2850 |
|
1232 | |||
2851 | Behind the scenes, this will throw ValueError |
|
1233 | Behind the scenes, this will throw ValueError | |
2852 |
|
1234 | |||
2853 |
$ hg tip --template '{author|email|date}\n' |
|
1235 | $ hg tip --template '{author|email|date}\n' | |
2854 | hg: parse error: date expects a date information |
|
1236 | hg: parse error: date expects a date information | |
2855 | [255] |
|
1237 | [255] | |
2856 |
|
1238 | |||
2857 |
$ hg tip -T '{author|email|shortdate}\n' |
|
1239 | $ hg tip -T '{author|email|shortdate}\n' | |
2858 | hg: parse error: invalid date: 'test' |
|
1240 | hg: parse error: invalid date: 'test' | |
2859 | (template filter 'shortdate' is not compatible with keyword 'author') |
|
1241 | (template filter 'shortdate' is not compatible with keyword 'author') | |
2860 | [255] |
|
1242 | [255] | |
2861 |
|
1243 | |||
2862 |
$ hg tip -T '{get(extras, "branch")|shortdate}\n' |
|
1244 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' | |
2863 | hg: parse error: invalid date: 'default' |
|
1245 | hg: parse error: invalid date: 'default' | |
2864 | (incompatible use of template filter 'shortdate') |
|
1246 | (incompatible use of template filter 'shortdate') | |
2865 | [255] |
|
1247 | [255] | |
2866 |
|
1248 | |||
2867 | Error in nested template: |
|
1249 | Error in nested template: | |
2868 |
|
1250 | |||
2869 | $ hg log -T '{"date' |
|
1251 | $ hg log -T '{"date' | |
2870 | hg: parse error at 2: unterminated string |
|
1252 | hg: parse error at 2: unterminated string | |
2871 | ({"date |
|
1253 | ({"date | |
2872 | ^ here) |
|
1254 | ^ here) | |
2873 | [255] |
|
1255 | [255] | |
2874 |
|
1256 | |||
2875 | $ hg log -T '{"foo{date|?}"}' |
|
1257 | $ hg log -T '{"foo{date|?}"}' | |
2876 | hg: parse error at 11: syntax error |
|
1258 | hg: parse error at 11: syntax error | |
2877 | ({"foo{date|?}"} |
|
1259 | ({"foo{date|?}"} | |
2878 | ^ here) |
|
1260 | ^ here) | |
2879 | [255] |
|
1261 | [255] | |
2880 |
|
1262 | |||
2881 | Thrown an error if a template function doesn't exist |
|
1263 | Thrown an error if a template function doesn't exist | |
2882 |
|
1264 | |||
2883 | $ hg tip --template '{foo()}\n' |
|
1265 | $ hg tip --template '{foo()}\n' | |
2884 | hg: parse error: unknown function 'foo' |
|
1266 | hg: parse error: unknown function 'foo' | |
2885 | [255] |
|
1267 | [255] | |
2886 |
|
1268 | |||
2887 | Pass generator object created by template function to filter |
|
1269 | Pass generator object created by template function to filter | |
2888 |
|
1270 | |||
2889 | $ hg log -l 1 --template '{if(author, author)|user}\n' |
|
1271 | $ hg log -l 1 --template '{if(author, author)|user}\n' | |
2890 | test |
|
1272 | test | |
2891 |
|
1273 | |||
2892 | Test index keyword: |
|
1274 | Test index keyword: | |
2893 |
|
1275 | |||
2894 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' |
|
1276 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' | |
2895 | 10 0:a 1:b 2:fifth 3:fourth 4:third |
|
1277 | 10 0:a 1:b 2:fifth 3:fourth 4:third | |
2896 | 11 0:a |
|
1278 | 11 0:a | |
2897 |
|
1279 | |||
2898 | $ hg branches -T '{index} {branch}\n' |
|
1280 | $ hg branches -T '{index} {branch}\n' | |
2899 | 0 default |
|
1281 | 0 default | |
2900 | 1 foo |
|
1282 | 1 foo | |
2901 |
|
1283 | |||
2902 | Test diff function: |
|
1284 | Test diff function: | |
2903 |
|
1285 | |||
2904 | $ hg diff -c 8 |
|
1286 | $ hg diff -c 8 | |
2905 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
1287 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2906 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1288 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2907 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
1289 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2908 | @@ -0,0 +1,1 @@ |
|
1290 | @@ -0,0 +1,1 @@ | |
2909 | +second |
|
1291 | +second | |
2910 | diff -r 29114dbae42b -r 95c24699272e second |
|
1292 | diff -r 29114dbae42b -r 95c24699272e second | |
2911 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
1293 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2912 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1294 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2913 | @@ -1,1 +0,0 @@ |
|
1295 | @@ -1,1 +0,0 @@ | |
2914 | -second |
|
1296 | -second | |
2915 | diff -r 29114dbae42b -r 95c24699272e third |
|
1297 | diff -r 29114dbae42b -r 95c24699272e third | |
2916 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1298 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2917 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
1299 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2918 | @@ -0,0 +1,1 @@ |
|
1300 | @@ -0,0 +1,1 @@ | |
2919 | +third |
|
1301 | +third | |
2920 |
|
1302 | |||
2921 | $ hg log -r 8 -T "{diff()}" |
|
1303 | $ hg log -r 8 -T "{diff()}" | |
2922 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
1304 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2923 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1305 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2924 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
1306 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2925 | @@ -0,0 +1,1 @@ |
|
1307 | @@ -0,0 +1,1 @@ | |
2926 | +second |
|
1308 | +second | |
2927 | diff -r 29114dbae42b -r 95c24699272e second |
|
1309 | diff -r 29114dbae42b -r 95c24699272e second | |
2928 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
1310 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2929 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1311 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2930 | @@ -1,1 +0,0 @@ |
|
1312 | @@ -1,1 +0,0 @@ | |
2931 | -second |
|
1313 | -second | |
2932 | diff -r 29114dbae42b -r 95c24699272e third |
|
1314 | diff -r 29114dbae42b -r 95c24699272e third | |
2933 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1315 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2934 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
1316 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2935 | @@ -0,0 +1,1 @@ |
|
1317 | @@ -0,0 +1,1 @@ | |
2936 | +third |
|
1318 | +third | |
2937 |
|
1319 | |||
2938 | $ hg log -r 8 -T "{diff('glob:f*')}" |
|
1320 | $ hg log -r 8 -T "{diff('glob:f*')}" | |
2939 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
1321 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2940 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1322 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2941 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
1323 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2942 | @@ -0,0 +1,1 @@ |
|
1324 | @@ -0,0 +1,1 @@ | |
2943 | +second |
|
1325 | +second | |
2944 |
|
1326 | |||
2945 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" |
|
1327 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" | |
2946 | diff -r 29114dbae42b -r 95c24699272e second |
|
1328 | diff -r 29114dbae42b -r 95c24699272e second | |
2947 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
1329 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2948 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1330 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2949 | @@ -1,1 +0,0 @@ |
|
1331 | @@ -1,1 +0,0 @@ | |
2950 | -second |
|
1332 | -second | |
2951 | diff -r 29114dbae42b -r 95c24699272e third |
|
1333 | diff -r 29114dbae42b -r 95c24699272e third | |
2952 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1334 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2953 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
1335 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2954 | @@ -0,0 +1,1 @@ |
|
1336 | @@ -0,0 +1,1 @@ | |
2955 | +third |
|
1337 | +third | |
2956 |
|
1338 | |||
2957 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" |
|
1339 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" | |
2958 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
1340 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2959 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1341 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2960 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
1342 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2961 | @@ -0,0 +1,1 @@ |
|
1343 | @@ -0,0 +1,1 @@ | |
2962 | +second |
|
1344 | +second | |
2963 |
|
1345 | |||
2964 | ui verbosity: |
|
1346 | ui verbosity: | |
2965 |
|
1347 | |||
2966 | $ hg log -l1 -T '{verbosity}\n' |
|
1348 | $ hg log -l1 -T '{verbosity}\n' | |
2967 |
|
1349 | |||
2968 | $ hg log -l1 -T '{verbosity}\n' --debug |
|
1350 | $ hg log -l1 -T '{verbosity}\n' --debug | |
2969 | debug |
|
1351 | debug | |
2970 | $ hg log -l1 -T '{verbosity}\n' --quiet |
|
1352 | $ hg log -l1 -T '{verbosity}\n' --quiet | |
2971 | quiet |
|
1353 | quiet | |
2972 | $ hg log -l1 -T '{verbosity}\n' --verbose |
|
1354 | $ hg log -l1 -T '{verbosity}\n' --verbose | |
2973 | verbose |
|
1355 | verbose | |
2974 |
|
1356 | |||
2975 | $ cd .. |
|
1357 | $ cd .. | |
2976 |
|
1358 | |||
2977 |
|
1359 | |||
2978 | latesttag: |
|
1360 | latesttag: | |
2979 |
|
1361 | |||
2980 | $ hg init latesttag |
|
1362 | $ hg init latesttag | |
2981 | $ cd latesttag |
|
1363 | $ cd latesttag | |
2982 |
|
1364 | |||
2983 | $ echo a > file |
|
1365 | $ echo a > file | |
2984 | $ hg ci -Am a -d '0 0' |
|
1366 | $ hg ci -Am a -d '0 0' | |
2985 | adding file |
|
1367 | adding file | |
2986 |
|
1368 | |||
2987 | $ echo b >> file |
|
1369 | $ echo b >> file | |
2988 | $ hg ci -m b -d '1 0' |
|
1370 | $ hg ci -m b -d '1 0' | |
2989 |
|
1371 | |||
2990 | $ echo c >> head1 |
|
1372 | $ echo c >> head1 | |
2991 | $ hg ci -Am h1c -d '2 0' |
|
1373 | $ hg ci -Am h1c -d '2 0' | |
2992 | adding head1 |
|
1374 | adding head1 | |
2993 |
|
1375 | |||
2994 | $ hg update -q 1 |
|
1376 | $ hg update -q 1 | |
2995 | $ echo d >> head2 |
|
1377 | $ echo d >> head2 | |
2996 | $ hg ci -Am h2d -d '3 0' |
|
1378 | $ hg ci -Am h2d -d '3 0' | |
2997 | adding head2 |
|
1379 | adding head2 | |
2998 | created new head |
|
1380 | created new head | |
2999 |
|
1381 | |||
3000 | $ echo e >> head2 |
|
1382 | $ echo e >> head2 | |
3001 | $ hg ci -m h2e -d '4 0' |
|
1383 | $ hg ci -m h2e -d '4 0' | |
3002 |
|
1384 | |||
3003 | $ hg merge -q |
|
1385 | $ hg merge -q | |
3004 | $ hg ci -m merge -d '5 -3600' |
|
1386 | $ hg ci -m merge -d '5 -3600' | |
3005 |
|
1387 | |||
3006 | No tag set: |
|
1388 | No tag set: | |
3007 |
|
1389 | |||
3008 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
1390 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
3009 | @ 5: null+5 |
|
1391 | @ 5: null+5 | |
3010 | |\ |
|
1392 | |\ | |
3011 |
|
|
1393 | | o 4: null+4 | |
3012 | | | |
|
1394 | | | | |
3013 | | o 3: null+3 |
|
1395 | | o 3: null+3 | |
3014 | | | |
|
1396 | | | | |
3015 | o | 2: null+3 |
|
1397 | o | 2: null+3 | |
3016 | |/ |
|
1398 | |/ | |
3017 | o 1: null+2 |
|
1399 | o 1: null+2 | |
3018 | | |
|
1400 | | | |
3019 | o 0: null+1 |
|
1401 | o 0: null+1 | |
3020 |
|
1402 | |||
3021 |
|
1403 | |||
3022 |
One common tag |
|
1404 | One common tag: longest path wins for {latesttagdistance}: | |
3023 |
|
1405 | |||
3024 | $ hg tag -r 1 -m t1 -d '6 0' t1 |
|
1406 | $ hg tag -r 1 -m t1 -d '6 0' t1 | |
3025 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
1407 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
3026 | @ 6: t1+4 |
|
1408 | @ 6: t1+4 | |
3027 | | |
|
1409 | | | |
3028 | o 5: t1+3 |
|
1410 | o 5: t1+3 | |
3029 | |\ |
|
1411 | |\ | |
3030 |
|
|
1412 | | o 4: t1+2 | |
3031 | | | |
|
1413 | | | | |
3032 | | o 3: t1+1 |
|
1414 | | o 3: t1+1 | |
3033 | | | |
|
1415 | | | | |
3034 | o | 2: t1+1 |
|
1416 | o | 2: t1+1 | |
3035 | |/ |
|
1417 | |/ | |
3036 | o 1: t1+0 |
|
1418 | o 1: t1+0 | |
3037 | | |
|
1419 | | | |
3038 | o 0: null+1 |
|
1420 | o 0: null+1 | |
3039 |
|
1421 | |||
3040 |
|
1422 | |||
3041 | One ancestor tag: closest wins: |
|
1423 | One ancestor tag: closest wins: | |
3042 |
|
1424 | |||
3043 | $ hg tag -r 2 -m t2 -d '7 0' t2 |
|
1425 | $ hg tag -r 2 -m t2 -d '7 0' t2 | |
3044 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
1426 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
3045 | @ 7: t2+3 |
|
1427 | @ 7: t2+3 | |
3046 | | |
|
1428 | | | |
3047 | o 6: t2+2 |
|
1429 | o 6: t2+2 | |
3048 | | |
|
1430 | | | |
3049 | o 5: t2+1 |
|
1431 | o 5: t2+1 | |
3050 | |\ |
|
1432 | |\ | |
3051 |
|
|
1433 | | o 4: t1+2 | |
3052 | | | |
|
1434 | | | | |
3053 | | o 3: t1+1 |
|
1435 | | o 3: t1+1 | |
3054 | | | |
|
1436 | | | | |
3055 | o | 2: t2+0 |
|
1437 | o | 2: t2+0 | |
3056 | |/ |
|
1438 | |/ | |
3057 | o 1: t1+0 |
|
1439 | o 1: t1+0 | |
3058 | | |
|
1440 | | | |
3059 | o 0: null+1 |
|
1441 | o 0: null+1 | |
3060 |
|
1442 | |||
3061 |
|
1443 | |||
3062 | Two branch tags: more recent wins if same number of changes: |
|
1444 | Two branch tags: more recent wins if same number of changes: | |
3063 |
|
1445 | |||
3064 | $ hg tag -r 3 -m t3 -d '8 0' t3 |
|
1446 | $ hg tag -r 3 -m t3 -d '8 0' t3 | |
3065 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
1447 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
3066 | @ 8: t3+5 |
|
1448 | @ 8: t3+5 | |
3067 | | |
|
1449 | | | |
3068 | o 7: t3+4 |
|
1450 | o 7: t3+4 | |
3069 | | |
|
1451 | | | |
3070 | o 6: t3+3 |
|
1452 | o 6: t3+3 | |
3071 | | |
|
1453 | | | |
3072 | o 5: t3+2 |
|
1454 | o 5: t3+2 | |
3073 | |\ |
|
1455 | |\ | |
3074 |
|
|
1456 | | o 4: t3+1 | |
3075 | | | |
|
1457 | | | | |
3076 | | o 3: t3+0 |
|
1458 | | o 3: t3+0 | |
3077 | | | |
|
1459 | | | | |
3078 | o | 2: t2+0 |
|
1460 | o | 2: t2+0 | |
3079 | |/ |
|
1461 | |/ | |
3080 | o 1: t1+0 |
|
1462 | o 1: t1+0 | |
3081 | | |
|
1463 | | | |
3082 | o 0: null+1 |
|
1464 | o 0: null+1 | |
3083 |
|
1465 | |||
3084 |
|
1466 | |||
3085 | Two branch tags: fewest changes wins: |
|
1467 | Two branch tags: fewest changes wins: | |
3086 |
|
1468 | |||
3087 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter |
|
1469 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter | |
3088 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
1470 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |
3089 | @ 9: t4+5,6 |
|
1471 | @ 9: t4+5,6 | |
3090 | | |
|
1472 | | | |
3091 | o 8: t4+4,5 |
|
1473 | o 8: t4+4,5 | |
3092 | | |
|
1474 | | | |
3093 | o 7: t4+3,4 |
|
1475 | o 7: t4+3,4 | |
3094 | | |
|
1476 | | | |
3095 | o 6: t4+2,3 |
|
1477 | o 6: t4+2,3 | |
3096 | | |
|
1478 | | | |
3097 | o 5: t4+1,2 |
|
1479 | o 5: t4+1,2 | |
3098 | |\ |
|
1480 | |\ | |
3099 |
|
|
1481 | | o 4: t4+0,0 | |
3100 | | | |
|
1482 | | | | |
3101 | | o 3: t3+0,0 |
|
1483 | | o 3: t3+0,0 | |
3102 | | | |
|
1484 | | | | |
3103 | o | 2: t2+0,0 |
|
1485 | o | 2: t2+0,0 | |
3104 | |/ |
|
1486 | |/ | |
3105 | o 1: t1+0,0 |
|
1487 | o 1: t1+0,0 | |
3106 | | |
|
1488 | | | |
3107 | o 0: null+1,1 |
|
1489 | o 0: null+1,1 | |
3108 |
|
1490 | |||
3109 |
|
1491 | |||
3110 | Merged tag overrides: |
|
1492 | Merged tag overrides: | |
3111 |
|
1493 | |||
3112 | $ hg tag -r 5 -m t5 -d '9 0' t5 |
|
1494 | $ hg tag -r 5 -m t5 -d '9 0' t5 | |
3113 | $ hg tag -r 3 -m at3 -d '10 0' at3 |
|
1495 | $ hg tag -r 3 -m at3 -d '10 0' at3 | |
3114 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
1496 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
3115 | @ 11: t5+6 |
|
1497 | @ 11: t5+6 | |
3116 | | |
|
1498 | | | |
3117 | o 10: t5+5 |
|
1499 | o 10: t5+5 | |
3118 | | |
|
1500 | | | |
3119 | o 9: t5+4 |
|
1501 | o 9: t5+4 | |
3120 | | |
|
1502 | | | |
3121 | o 8: t5+3 |
|
1503 | o 8: t5+3 | |
3122 | | |
|
1504 | | | |
3123 | o 7: t5+2 |
|
1505 | o 7: t5+2 | |
3124 | | |
|
1506 | | | |
3125 | o 6: t5+1 |
|
1507 | o 6: t5+1 | |
3126 | | |
|
1508 | | | |
3127 | o 5: t5+0 |
|
1509 | o 5: t5+0 | |
3128 | |\ |
|
1510 | |\ | |
3129 |
|
|
1511 | | o 4: t4+0 | |
3130 | | | |
|
1512 | | | | |
3131 | | o 3: at3:t3+0 |
|
1513 | | o 3: at3:t3+0 | |
3132 | | | |
|
1514 | | | | |
3133 | o | 2: t2+0 |
|
1515 | o | 2: t2+0 | |
3134 | |/ |
|
1516 | |/ | |
3135 | o 1: t1+0 |
|
1517 | o 1: t1+0 | |
3136 | | |
|
1518 | | | |
3137 | o 0: null+1 |
|
1519 | o 0: null+1 | |
3138 |
|
1520 | |||
3139 |
|
1521 | |||
3140 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
1522 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |
3141 | @ 11: t5+6,6 |
|
1523 | @ 11: t5+6,6 | |
3142 | | |
|
1524 | | | |
3143 | o 10: t5+5,5 |
|
1525 | o 10: t5+5,5 | |
3144 | | |
|
1526 | | | |
3145 | o 9: t5+4,4 |
|
1527 | o 9: t5+4,4 | |
3146 | | |
|
1528 | | | |
3147 | o 8: t5+3,3 |
|
1529 | o 8: t5+3,3 | |
3148 | | |
|
1530 | | | |
3149 | o 7: t5+2,2 |
|
1531 | o 7: t5+2,2 | |
3150 | | |
|
1532 | | | |
3151 | o 6: t5+1,1 |
|
1533 | o 6: t5+1,1 | |
3152 | | |
|
1534 | | | |
3153 | o 5: t5+0,0 |
|
1535 | o 5: t5+0,0 | |
3154 | |\ |
|
1536 | |\ | |
3155 |
|
|
1537 | | o 4: t4+0,0 | |
3156 | | | |
|
1538 | | | | |
3157 | | o 3: at3+0,0 t3+0,0 |
|
1539 | | o 3: at3+0,0 t3+0,0 | |
3158 | | | |
|
1540 | | | | |
3159 | o | 2: t2+0,0 |
|
1541 | o | 2: t2+0,0 | |
3160 | |/ |
|
1542 | |/ | |
3161 | o 1: t1+0,0 |
|
1543 | o 1: t1+0,0 | |
3162 | | |
|
1544 | | | |
3163 | o 0: null+1,1 |
|
1545 | o 0: null+1,1 | |
3164 |
|
1546 | |||
3165 |
|
1547 | |||
3166 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" |
|
1548 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" | |
3167 | @ 11: t3, C: 9, D: 8 |
|
1549 | @ 11: t3, C: 9, D: 8 | |
3168 | | |
|
1550 | | | |
3169 | o 10: t3, C: 8, D: 7 |
|
1551 | o 10: t3, C: 8, D: 7 | |
3170 | | |
|
1552 | | | |
3171 | o 9: t3, C: 7, D: 6 |
|
1553 | o 9: t3, C: 7, D: 6 | |
3172 | | |
|
1554 | | | |
3173 | o 8: t3, C: 6, D: 5 |
|
1555 | o 8: t3, C: 6, D: 5 | |
3174 | | |
|
1556 | | | |
3175 | o 7: t3, C: 5, D: 4 |
|
1557 | o 7: t3, C: 5, D: 4 | |
3176 | | |
|
1558 | | | |
3177 | o 6: t3, C: 4, D: 3 |
|
1559 | o 6: t3, C: 4, D: 3 | |
3178 | | |
|
1560 | | | |
3179 | o 5: t3, C: 3, D: 2 |
|
1561 | o 5: t3, C: 3, D: 2 | |
3180 | |\ |
|
1562 | |\ | |
3181 |
|
|
1563 | | o 4: t3, C: 1, D: 1 | |
3182 | | | |
|
1564 | | | | |
3183 | | o 3: t3, C: 0, D: 0 |
|
1565 | | o 3: t3, C: 0, D: 0 | |
3184 | | | |
|
1566 | | | | |
3185 | o | 2: t1, C: 1, D: 1 |
|
1567 | o | 2: t1, C: 1, D: 1 | |
3186 | |/ |
|
1568 | |/ | |
3187 | o 1: t1, C: 0, D: 0 |
|
1569 | o 1: t1, C: 0, D: 0 | |
3188 | | |
|
1570 | | | |
3189 | o 0: null, C: 1, D: 1 |
|
1571 | o 0: null, C: 1, D: 1 | |
3190 |
|
1572 | |||
3191 |
|
1573 | |||
3192 | $ cd .. |
|
1574 | $ cd .. | |
3193 |
|
1575 | |||
3194 |
|
||||
3195 | Style path expansion: issue1948 - ui.style option doesn't work on OSX |
|
|||
3196 | if it is a relative path |
|
|||
3197 |
|
||||
3198 | $ mkdir -p home/styles |
|
|||
3199 |
|
||||
3200 | $ cat > home/styles/teststyle <<EOF |
|
|||
3201 | > changeset = 'test {rev}:{node|short}\n' |
|
|||
3202 | > EOF |
|
|||
3203 |
|
||||
3204 | $ HOME=`pwd`/home; export HOME |
|
|||
3205 |
|
||||
3206 | $ cat > latesttag/.hg/hgrc <<EOF |
|
|||
3207 | > [ui] |
|
|||
3208 | > style = ~/styles/teststyle |
|
|||
3209 | > EOF |
|
|||
3210 |
|
||||
3211 | $ hg -R latesttag tip |
|
|||
3212 | test 11:97e5943b523a |
|
|||
3213 |
|
||||
3214 | Test recursive showlist template (issue1989): |
|
|||
3215 |
|
||||
3216 | $ cat > style1989 <<EOF |
|
|||
3217 | > changeset = '{file_mods}{manifest}{extras}' |
|
|||
3218 | > file_mod = 'M|{author|person}\n' |
|
|||
3219 | > manifest = '{rev},{author}\n' |
|
|||
3220 | > extra = '{key}: {author}\n' |
|
|||
3221 | > EOF |
|
|||
3222 |
|
||||
3223 | $ hg -R latesttag log -r tip --style=style1989 |
|
|||
3224 | M|test |
|
|||
3225 | 11,test |
|
|||
3226 | branch: test |
|
|||
3227 |
|
||||
3228 | Test new-style inline templating: |
|
1576 | Test new-style inline templating: | |
3229 |
|
1577 | |||
3230 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
|
1578 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' | |
3231 | modified files: .hgtags |
|
1579 | modified files: .hgtags | |
3232 |
|
1580 | |||
3233 |
|
1581 | |||
3234 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' |
|
1582 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' | |
3235 | hg: parse error: 11 is not iterable of mappings |
|
1583 | hg: parse error: 11 is not iterable of mappings | |
3236 | (keyword 'rev' does not support map operation) |
|
1584 | (keyword 'rev' does not support map operation) | |
3237 | [255] |
|
1585 | [255] | |
3238 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' |
|
1586 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' | |
3239 | hg: parse error: None is not iterable of mappings |
|
1587 | hg: parse error: None is not iterable of mappings | |
3240 | [255] |
|
1588 | [255] | |
3241 | $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}' |
|
1589 | $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}' | |
3242 | hg: parse error: list of strings is not mappable |
|
1590 | hg: parse error: list of strings is not mappable | |
3243 | [255] |
|
1591 | [255] | |
3244 |
|
1592 | |||
3245 | Test new-style inline templating of non-list/dict type: |
|
1593 | Test new-style inline templating of non-list/dict type: | |
3246 |
|
1594 | |||
3247 | $ hg log -R latesttag -r tip -T '{manifest}\n' |
|
1595 | $ hg log -R latesttag -r tip -T '{manifest}\n' | |
3248 | 11:2bc6e9006ce2 |
|
1596 | 11:2bc6e9006ce2 | |
3249 | $ hg log -R latesttag -r tip -T 'string length: {manifest|count}\n' |
|
1597 | $ hg log -R latesttag -r tip -T 'string length: {manifest|count}\n' | |
3250 | string length: 15 |
|
1598 | string length: 15 | |
3251 | $ hg log -R latesttag -r tip -T '{manifest % "{rev}:{node}"}\n' |
|
1599 | $ hg log -R latesttag -r tip -T '{manifest % "{rev}:{node}"}\n' | |
3252 | 11:2bc6e9006ce29882383a22d39fd1f4e66dd3e2fc |
|
1600 | 11:2bc6e9006ce29882383a22d39fd1f4e66dd3e2fc | |
3253 |
|
1601 | |||
3254 | $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}' |
|
1602 | $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}' | |
3255 | branch: default |
|
1603 | branch: default | |
3256 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' |
|
1604 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' | |
3257 | hg: parse error: None is not iterable of mappings |
|
1605 | hg: parse error: None is not iterable of mappings | |
3258 | [255] |
|
1606 | [255] | |
3259 | $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' |
|
1607 | $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' | |
3260 | branch: default |
|
1608 | branch: default | |
3261 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}' |
|
1609 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}' | |
3262 | 0:ce3cec86e6c2 |
|
1610 | 0:ce3cec86e6c2 | |
3263 | $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}' |
|
1611 | $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}' | |
3264 | 9:fbc7cd862e9c |
|
1612 | 9:fbc7cd862e9c | |
3265 |
|
1613 | |||
3266 | Test manifest/get() can be join()-ed as string, though it's silly: |
|
1614 | Test manifest/get() can be join()-ed as string, though it's silly: | |
3267 |
|
1615 | |||
3268 | $ hg log -R latesttag -r tip -T '{join(manifest, ".")}\n' |
|
1616 | $ hg log -R latesttag -r tip -T '{join(manifest, ".")}\n' | |
3269 | 1.1.:.2.b.c.6.e.9.0.0.6.c.e.2 |
|
1617 | 1.1.:.2.b.c.6.e.9.0.0.6.c.e.2 | |
3270 | $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), ".")}\n' |
|
1618 | $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), ".")}\n' | |
3271 | d.e.f.a.u.l.t |
|
1619 | d.e.f.a.u.l.t | |
3272 |
|
1620 | |||
3273 | Test join() over string |
|
1621 | Test join() over string | |
3274 |
|
1622 | |||
3275 | $ hg log -R latesttag -r tip -T '{join(rev|stringify, ".")}\n' |
|
1623 | $ hg log -R latesttag -r tip -T '{join(rev|stringify, ".")}\n' | |
3276 | 1.1 |
|
1624 | 1.1 | |
3277 |
|
1625 | |||
3278 | Test join() over uniterable |
|
1626 | Test join() over uniterable | |
3279 |
|
1627 | |||
3280 | $ hg log -R latesttag -r tip -T '{join(rev, "")}\n' |
|
1628 | $ hg log -R latesttag -r tip -T '{join(rev, "")}\n' | |
3281 | hg: parse error: 11 is not iterable |
|
1629 | hg: parse error: 11 is not iterable | |
3282 | [255] |
|
1630 | [255] | |
3283 |
|
1631 | |||
3284 | Test min/max of integers |
|
1632 | Test min/max of integers | |
3285 |
|
1633 | |||
3286 | $ hg log -R latesttag -l1 -T '{min(revset("9:10"))}\n' |
|
1634 | $ hg log -R latesttag -l1 -T '{min(revset("9:10"))}\n' | |
3287 | 9 |
|
1635 | 9 | |
3288 | $ hg log -R latesttag -l1 -T '{max(revset("9:10"))}\n' |
|
1636 | $ hg log -R latesttag -l1 -T '{max(revset("9:10"))}\n' | |
3289 | 10 |
|
1637 | 10 | |
3290 |
|
1638 | |||
3291 | Test min/max over map operation: |
|
1639 | Test min/max over map operation: | |
3292 |
|
1640 | |||
3293 | $ hg log -R latesttag -r3 -T '{min(tags % "{tag}")}\n' |
|
1641 | $ hg log -R latesttag -r3 -T '{min(tags % "{tag}")}\n' | |
3294 | at3 |
|
1642 | at3 | |
3295 | $ hg log -R latesttag -r3 -T '{max(tags % "{tag}")}\n' |
|
1643 | $ hg log -R latesttag -r3 -T '{max(tags % "{tag}")}\n' | |
3296 | t3 |
|
1644 | t3 | |
3297 |
|
1645 | |||
3298 | Test min/max of strings: |
|
1646 | Test min/max of strings: | |
3299 |
|
1647 | |||
3300 | $ hg log -R latesttag -l1 -T '{min(desc)}\n' |
|
1648 | $ hg log -R latesttag -l1 -T '{min(desc)}\n' | |
3301 | 3 |
|
1649 | 3 | |
3302 | $ hg log -R latesttag -l1 -T '{max(desc)}\n' |
|
1650 | $ hg log -R latesttag -l1 -T '{max(desc)}\n' | |
3303 | t |
|
1651 | t | |
3304 |
|
1652 | |||
3305 | Test min/max of non-iterable: |
|
1653 | Test min/max of non-iterable: | |
3306 |
|
1654 | |||
3307 | $ hg debugtemplate '{min(1)}' |
|
1655 | $ hg debugtemplate '{min(1)}' | |
3308 | hg: parse error: 1 is not iterable |
|
1656 | hg: parse error: 1 is not iterable | |
3309 | (min first argument should be an iterable) |
|
1657 | (min first argument should be an iterable) | |
3310 | [255] |
|
1658 | [255] | |
3311 | $ hg debugtemplate '{max(2)}' |
|
1659 | $ hg debugtemplate '{max(2)}' | |
3312 | hg: parse error: 2 is not iterable |
|
1660 | hg: parse error: 2 is not iterable | |
3313 | (max first argument should be an iterable) |
|
1661 | (max first argument should be an iterable) | |
3314 | [255] |
|
1662 | [255] | |
3315 |
|
1663 | |||
3316 | $ hg log -R latesttag -l1 -T '{min(date)}' |
|
1664 | $ hg log -R latesttag -l1 -T '{min(date)}' | |
3317 | hg: parse error: date is not iterable |
|
1665 | hg: parse error: date is not iterable | |
3318 | (min first argument should be an iterable) |
|
1666 | (min first argument should be an iterable) | |
3319 | [255] |
|
1667 | [255] | |
3320 | $ hg log -R latesttag -l1 -T '{max(date)}' |
|
1668 | $ hg log -R latesttag -l1 -T '{max(date)}' | |
3321 | hg: parse error: date is not iterable |
|
1669 | hg: parse error: date is not iterable | |
3322 | (max first argument should be an iterable) |
|
1670 | (max first argument should be an iterable) | |
3323 | [255] |
|
1671 | [255] | |
3324 |
|
1672 | |||
3325 | Test min/max of empty sequence: |
|
1673 | Test min/max of empty sequence: | |
3326 |
|
1674 | |||
3327 | $ hg debugtemplate '{min("")}' |
|
1675 | $ hg debugtemplate '{min("")}' | |
3328 | hg: parse error: empty string |
|
1676 | hg: parse error: empty string | |
3329 | (min first argument should be an iterable) |
|
1677 | (min first argument should be an iterable) | |
3330 | [255] |
|
1678 | [255] | |
3331 | $ hg debugtemplate '{max("")}' |
|
1679 | $ hg debugtemplate '{max("")}' | |
3332 | hg: parse error: empty string |
|
1680 | hg: parse error: empty string | |
3333 | (max first argument should be an iterable) |
|
1681 | (max first argument should be an iterable) | |
3334 | [255] |
|
1682 | [255] | |
3335 | $ hg debugtemplate '{min(dict())}' |
|
1683 | $ hg debugtemplate '{min(dict())}' | |
3336 | hg: parse error: empty sequence |
|
1684 | hg: parse error: empty sequence | |
3337 | (min first argument should be an iterable) |
|
1685 | (min first argument should be an iterable) | |
3338 | [255] |
|
1686 | [255] | |
3339 | $ hg debugtemplate '{max(dict())}' |
|
1687 | $ hg debugtemplate '{max(dict())}' | |
3340 | hg: parse error: empty sequence |
|
1688 | hg: parse error: empty sequence | |
3341 | (max first argument should be an iterable) |
|
1689 | (max first argument should be an iterable) | |
3342 | [255] |
|
1690 | [255] | |
3343 | $ hg debugtemplate '{min(dict() % "")}' |
|
1691 | $ hg debugtemplate '{min(dict() % "")}' | |
3344 | hg: parse error: empty sequence |
|
1692 | hg: parse error: empty sequence | |
3345 | (min first argument should be an iterable) |
|
1693 | (min first argument should be an iterable) | |
3346 | [255] |
|
1694 | [255] | |
3347 | $ hg debugtemplate '{max(dict() % "")}' |
|
1695 | $ hg debugtemplate '{max(dict() % "")}' | |
3348 | hg: parse error: empty sequence |
|
1696 | hg: parse error: empty sequence | |
3349 | (max first argument should be an iterable) |
|
1697 | (max first argument should be an iterable) | |
3350 | [255] |
|
1698 | [255] | |
3351 |
|
1699 | |||
3352 | Test min/max of if() result |
|
1700 | Test min/max of if() result | |
3353 |
|
1701 | |||
3354 | $ cd latesttag |
|
1702 | $ cd latesttag | |
3355 | $ hg log -l1 -T '{min(if(true, revset("9:10"), ""))}\n' |
|
1703 | $ hg log -l1 -T '{min(if(true, revset("9:10"), ""))}\n' | |
3356 | 9 |
|
1704 | 9 | |
3357 | $ hg log -l1 -T '{max(if(false, "", revset("9:10")))}\n' |
|
1705 | $ hg log -l1 -T '{max(if(false, "", revset("9:10")))}\n' | |
3358 | 10 |
|
1706 | 10 | |
3359 | $ hg log -l1 -T '{min(ifcontains("a", "aa", revset("9:10"), ""))}\n' |
|
1707 | $ hg log -l1 -T '{min(ifcontains("a", "aa", revset("9:10"), ""))}\n' | |
3360 | 9 |
|
1708 | 9 | |
3361 | $ hg log -l1 -T '{max(ifcontains("a", "bb", "", revset("9:10")))}\n' |
|
1709 | $ hg log -l1 -T '{max(ifcontains("a", "bb", "", revset("9:10")))}\n' | |
3362 | 10 |
|
1710 | 10 | |
3363 | $ hg log -l1 -T '{min(ifeq(0, 0, revset("9:10"), ""))}\n' |
|
1711 | $ hg log -l1 -T '{min(ifeq(0, 0, revset("9:10"), ""))}\n' | |
3364 | 9 |
|
1712 | 9 | |
3365 | $ hg log -l1 -T '{max(ifeq(0, 1, "", revset("9:10")))}\n' |
|
1713 | $ hg log -l1 -T '{max(ifeq(0, 1, "", revset("9:10")))}\n' | |
3366 | 10 |
|
1714 | 10 | |
3367 | $ cd .. |
|
1715 | $ cd .. | |
3368 |
|
1716 | |||
3369 | Test laziness of if() then/else clause |
|
1717 | Test laziness of if() then/else clause | |
3370 |
|
1718 | |||
3371 | $ hg debugtemplate '{count(0)}' |
|
1719 | $ hg debugtemplate '{count(0)}' | |
3372 | hg: parse error: not countable |
|
1720 | hg: parse error: not countable | |
3373 | (incompatible use of template filter 'count') |
|
1721 | (incompatible use of template filter 'count') | |
3374 | [255] |
|
1722 | [255] | |
3375 | $ hg debugtemplate '{if(true, "", count(0))}' |
|
1723 | $ hg debugtemplate '{if(true, "", count(0))}' | |
3376 | $ hg debugtemplate '{if(false, count(0), "")}' |
|
1724 | $ hg debugtemplate '{if(false, count(0), "")}' | |
3377 | $ hg debugtemplate '{ifcontains("a", "aa", "", count(0))}' |
|
1725 | $ hg debugtemplate '{ifcontains("a", "aa", "", count(0))}' | |
3378 | $ hg debugtemplate '{ifcontains("a", "bb", count(0), "")}' |
|
1726 | $ hg debugtemplate '{ifcontains("a", "bb", count(0), "")}' | |
3379 | $ hg debugtemplate '{ifeq(0, 0, "", count(0))}' |
|
1727 | $ hg debugtemplate '{ifeq(0, 0, "", count(0))}' | |
3380 | $ hg debugtemplate '{ifeq(0, 1, count(0), "")}' |
|
1728 | $ hg debugtemplate '{ifeq(0, 1, count(0), "")}' | |
3381 |
|
1729 | |||
3382 | Test dot operator precedence: |
|
1730 | Test dot operator precedence: | |
3383 |
|
1731 | |||
3384 | $ hg debugtemplate -R latesttag -r0 -v '{manifest.node|short}\n' |
|
1732 | $ hg debugtemplate -R latesttag -r0 -v '{manifest.node|short}\n' | |
3385 | (template |
|
1733 | (template | |
3386 | (| |
|
1734 | (| | |
3387 | (. |
|
1735 | (. | |
3388 | (symbol 'manifest') |
|
1736 | (symbol 'manifest') | |
3389 | (symbol 'node')) |
|
1737 | (symbol 'node')) | |
3390 | (symbol 'short')) |
|
1738 | (symbol 'short')) | |
3391 | (string '\n')) |
|
1739 | (string '\n')) | |
3392 | * keywords: manifest, node, rev |
|
1740 | * keywords: manifest, node, rev | |
3393 | * functions: formatnode, short |
|
1741 | * functions: formatnode, short | |
3394 | 89f4071fec70 |
|
1742 | 89f4071fec70 | |
3395 |
|
1743 | |||
3396 | (the following examples are invalid, but seem natural in parsing POV) |
|
1744 | (the following examples are invalid, but seem natural in parsing POV) | |
3397 |
|
1745 | |||
3398 | $ hg debugtemplate -R latesttag -r0 -v '{foo|bar.baz}\n' 2> /dev/null |
|
1746 | $ hg debugtemplate -R latesttag -r0 -v '{foo|bar.baz}\n' 2> /dev/null | |
3399 | (template |
|
1747 | (template | |
3400 | (| |
|
1748 | (| | |
3401 | (symbol 'foo') |
|
1749 | (symbol 'foo') | |
3402 | (. |
|
1750 | (. | |
3403 | (symbol 'bar') |
|
1751 | (symbol 'bar') | |
3404 | (symbol 'baz'))) |
|
1752 | (symbol 'baz'))) | |
3405 | (string '\n')) |
|
1753 | (string '\n')) | |
3406 | [255] |
|
1754 | [255] | |
3407 | $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null |
|
1755 | $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null | |
3408 | (template |
|
1756 | (template | |
3409 | (. |
|
1757 | (. | |
3410 | (symbol 'foo') |
|
1758 | (symbol 'foo') | |
3411 | (func |
|
1759 | (func | |
3412 | (symbol 'bar') |
|
1760 | (symbol 'bar') | |
3413 | None)) |
|
1761 | None)) | |
3414 | (string '\n')) |
|
1762 | (string '\n')) | |
3415 | * keywords: foo |
|
1763 | * keywords: foo | |
3416 | * functions: bar |
|
1764 | * functions: bar | |
3417 | [255] |
|
1765 | [255] | |
3418 |
|
1766 | |||
3419 | Test evaluation of dot operator: |
|
1767 | Test evaluation of dot operator: | |
3420 |
|
1768 | |||
3421 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")).node}\n' |
|
1769 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")).node}\n' | |
3422 | ce3cec86e6c26bd9bdfc590a6b92abc9680f1796 |
|
1770 | ce3cec86e6c26bd9bdfc590a6b92abc9680f1796 | |
3423 | $ hg log -R latesttag -r0 -T '{extras.branch}\n' |
|
1771 | $ hg log -R latesttag -r0 -T '{extras.branch}\n' | |
3424 | default |
|
1772 | default | |
3425 | $ hg log -R latesttag -r0 -T '{date.unixtime} {localdate(date, "+0200").tzoffset}\n' |
|
1773 | $ hg log -R latesttag -r0 -T '{date.unixtime} {localdate(date, "+0200").tzoffset}\n' | |
3426 | 0 -7200 |
|
1774 | 0 -7200 | |
3427 |
|
1775 | |||
3428 | $ hg log -R latesttag -l1 -T '{author.invalid}\n' |
|
1776 | $ hg log -R latesttag -l1 -T '{author.invalid}\n' | |
3429 | hg: parse error: 'test' is not a dictionary |
|
1777 | hg: parse error: 'test' is not a dictionary | |
3430 | (keyword 'author' does not support member operation) |
|
1778 | (keyword 'author' does not support member operation) | |
3431 | [255] |
|
1779 | [255] | |
3432 | $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n' |
|
1780 | $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n' | |
3433 | hg: parse error: 'a' is not a dictionary |
|
1781 | hg: parse error: 'a' is not a dictionary | |
3434 | [255] |
|
1782 | [255] | |
3435 |
|
1783 | |||
3436 | Test the sub function of templating for expansion: |
|
1784 | Test the sub function of templating for expansion: | |
3437 |
|
1785 | |||
3438 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' |
|
1786 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' | |
3439 | xx |
|
1787 | xx | |
3440 |
|
1788 | |||
3441 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' |
|
1789 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' | |
3442 | hg: parse error: sub got an invalid pattern: [ |
|
1790 | hg: parse error: sub got an invalid pattern: [ | |
3443 | [255] |
|
1791 | [255] | |
3444 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' |
|
1792 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' | |
3445 | hg: parse error: sub got an invalid replacement: \1 |
|
1793 | hg: parse error: sub got an invalid replacement: \1 | |
3446 | [255] |
|
1794 | [255] | |
3447 |
|
1795 | |||
3448 | Test the strip function with chars specified: |
|
1796 | Test the strip function with chars specified: | |
3449 |
|
1797 | |||
3450 | $ hg log -R latesttag --template '{desc}\n' |
|
1798 | $ hg log -R latesttag --template '{desc}\n' | |
3451 | at3 |
|
1799 | at3 | |
3452 | t5 |
|
1800 | t5 | |
3453 | t4 |
|
1801 | t4 | |
3454 | t3 |
|
1802 | t3 | |
3455 | t2 |
|
1803 | t2 | |
3456 | t1 |
|
1804 | t1 | |
3457 | merge |
|
1805 | merge | |
3458 | h2e |
|
1806 | h2e | |
3459 | h2d |
|
1807 | h2d | |
3460 | h1c |
|
1808 | h1c | |
3461 | b |
|
1809 | b | |
3462 | a |
|
1810 | a | |
3463 |
|
1811 | |||
3464 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' |
|
1812 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' | |
3465 | at3 |
|
1813 | at3 | |
3466 | 5 |
|
1814 | 5 | |
3467 | 4 |
|
1815 | 4 | |
3468 | 3 |
|
1816 | 3 | |
3469 | 2 |
|
1817 | 2 | |
3470 | 1 |
|
1818 | 1 | |
3471 | merg |
|
1819 | merg | |
3472 | h2 |
|
1820 | h2 | |
3473 | h2d |
|
1821 | h2d | |
3474 | h1c |
|
1822 | h1c | |
3475 | b |
|
1823 | b | |
3476 | a |
|
1824 | a | |
3477 |
|
1825 | |||
3478 | Test date format: |
|
1826 | Test date format: | |
3479 |
|
1827 | |||
3480 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' |
|
1828 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' | |
3481 | date: 70 01 01 10 +0000 |
|
1829 | date: 70 01 01 10 +0000 | |
3482 | date: 70 01 01 09 +0000 |
|
1830 | date: 70 01 01 09 +0000 | |
3483 | date: 70 01 01 04 +0000 |
|
1831 | date: 70 01 01 04 +0000 | |
3484 | date: 70 01 01 08 +0000 |
|
1832 | date: 70 01 01 08 +0000 | |
3485 | date: 70 01 01 07 +0000 |
|
1833 | date: 70 01 01 07 +0000 | |
3486 | date: 70 01 01 06 +0000 |
|
1834 | date: 70 01 01 06 +0000 | |
3487 | date: 70 01 01 05 +0100 |
|
1835 | date: 70 01 01 05 +0100 | |
3488 | date: 70 01 01 04 +0000 |
|
1836 | date: 70 01 01 04 +0000 | |
3489 | date: 70 01 01 03 +0000 |
|
1837 | date: 70 01 01 03 +0000 | |
3490 | date: 70 01 01 02 +0000 |
|
1838 | date: 70 01 01 02 +0000 | |
3491 | date: 70 01 01 01 +0000 |
|
1839 | date: 70 01 01 01 +0000 | |
3492 | date: 70 01 01 00 +0000 |
|
1840 | date: 70 01 01 00 +0000 | |
3493 |
|
1841 | |||
3494 | Test invalid date: |
|
1842 | Test invalid date: | |
3495 |
|
1843 | |||
3496 | $ hg log -R latesttag -T '{date(rev)}\n' |
|
1844 | $ hg log -R latesttag -T '{date(rev)}\n' | |
3497 | hg: parse error: date expects a date information |
|
1845 | hg: parse error: date expects a date information | |
3498 | [255] |
|
1846 | [255] | |
3499 |
|
1847 | |||
3500 | Test integer literal: |
|
1848 | Test integer literal: | |
3501 |
|
1849 | |||
3502 | $ hg debugtemplate -v '{(0)}\n' |
|
1850 | $ hg debugtemplate -v '{(0)}\n' | |
3503 | (template |
|
1851 | (template | |
3504 | (group |
|
1852 | (group | |
3505 | (integer '0')) |
|
1853 | (integer '0')) | |
3506 | (string '\n')) |
|
1854 | (string '\n')) | |
3507 | * keywords: |
|
1855 | * keywords: | |
3508 | * functions: |
|
1856 | * functions: | |
3509 | 0 |
|
1857 | 0 | |
3510 | $ hg debugtemplate -v '{(123)}\n' |
|
1858 | $ hg debugtemplate -v '{(123)}\n' | |
3511 | (template |
|
1859 | (template | |
3512 | (group |
|
1860 | (group | |
3513 | (integer '123')) |
|
1861 | (integer '123')) | |
3514 | (string '\n')) |
|
1862 | (string '\n')) | |
3515 | * keywords: |
|
1863 | * keywords: | |
3516 | * functions: |
|
1864 | * functions: | |
3517 | 123 |
|
1865 | 123 | |
3518 | $ hg debugtemplate -v '{(-4)}\n' |
|
1866 | $ hg debugtemplate -v '{(-4)}\n' | |
3519 | (template |
|
1867 | (template | |
3520 | (group |
|
1868 | (group | |
3521 | (negate |
|
1869 | (negate | |
3522 | (integer '4'))) |
|
1870 | (integer '4'))) | |
3523 | (string '\n')) |
|
1871 | (string '\n')) | |
3524 | * keywords: |
|
1872 | * keywords: | |
3525 | * functions: |
|
1873 | * functions: | |
3526 | -4 |
|
1874 | -4 | |
3527 | $ hg debugtemplate '{(-)}\n' |
|
1875 | $ hg debugtemplate '{(-)}\n' | |
3528 | hg: parse error at 3: not a prefix: ) |
|
1876 | hg: parse error at 3: not a prefix: ) | |
3529 | ({(-)}\n |
|
1877 | ({(-)}\n | |
3530 | ^ here) |
|
1878 | ^ here) | |
3531 | [255] |
|
1879 | [255] | |
3532 | $ hg debugtemplate '{(-a)}\n' |
|
1880 | $ hg debugtemplate '{(-a)}\n' | |
3533 | hg: parse error: negation needs an integer argument |
|
1881 | hg: parse error: negation needs an integer argument | |
3534 | [255] |
|
1882 | [255] | |
3535 |
|
1883 | |||
3536 | top-level integer literal is interpreted as symbol (i.e. variable name): |
|
1884 | top-level integer literal is interpreted as symbol (i.e. variable name): | |
3537 |
|
1885 | |||
3538 | $ hg debugtemplate -D 1=one -v '{1}\n' |
|
1886 | $ hg debugtemplate -D 1=one -v '{1}\n' | |
3539 | (template |
|
1887 | (template | |
3540 | (integer '1') |
|
1888 | (integer '1') | |
3541 | (string '\n')) |
|
1889 | (string '\n')) | |
3542 | * keywords: |
|
1890 | * keywords: | |
3543 | * functions: |
|
1891 | * functions: | |
3544 | one |
|
1892 | one | |
3545 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' |
|
1893 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' | |
3546 | (template |
|
1894 | (template | |
3547 | (func |
|
1895 | (func | |
3548 | (symbol 'if') |
|
1896 | (symbol 'if') | |
3549 | (list |
|
1897 | (list | |
3550 | (string 't') |
|
1898 | (string 't') | |
3551 | (template |
|
1899 | (template | |
3552 | (integer '1')))) |
|
1900 | (integer '1')))) | |
3553 | (string '\n')) |
|
1901 | (string '\n')) | |
3554 | * keywords: |
|
1902 | * keywords: | |
3555 | * functions: if |
|
1903 | * functions: if | |
3556 | one |
|
1904 | one | |
3557 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' |
|
1905 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' | |
3558 | (template |
|
1906 | (template | |
3559 | (| |
|
1907 | (| | |
3560 | (integer '1') |
|
1908 | (integer '1') | |
3561 | (symbol 'stringify')) |
|
1909 | (symbol 'stringify')) | |
3562 | (string '\n')) |
|
1910 | (string '\n')) | |
3563 | * keywords: |
|
1911 | * keywords: | |
3564 | * functions: stringify |
|
1912 | * functions: stringify | |
3565 | one |
|
1913 | one | |
3566 |
|
1914 | |||
3567 | unless explicit symbol is expected: |
|
1915 | unless explicit symbol is expected: | |
3568 |
|
1916 | |||
3569 | $ hg log -Ra -r0 -T '{desc|1}\n' |
|
1917 | $ hg log -Ra -r0 -T '{desc|1}\n' | |
3570 | hg: parse error: expected a symbol, got 'integer' |
|
1918 | hg: parse error: expected a symbol, got 'integer' | |
3571 | [255] |
|
1919 | [255] | |
3572 | $ hg log -Ra -r0 -T '{1()}\n' |
|
1920 | $ hg log -Ra -r0 -T '{1()}\n' | |
3573 | hg: parse error: expected a symbol, got 'integer' |
|
1921 | hg: parse error: expected a symbol, got 'integer' | |
3574 | [255] |
|
1922 | [255] | |
3575 |
|
1923 | |||
3576 | Test string literal: |
|
1924 | Test string literal: | |
3577 |
|
1925 | |||
3578 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' |
|
1926 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' | |
3579 | (template |
|
1927 | (template | |
3580 | (string 'string with no template fragment') |
|
1928 | (string 'string with no template fragment') | |
3581 | (string '\n')) |
|
1929 | (string '\n')) | |
3582 | * keywords: |
|
1930 | * keywords: | |
3583 | * functions: |
|
1931 | * functions: | |
3584 | string with no template fragment |
|
1932 | string with no template fragment | |
3585 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' |
|
1933 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' | |
3586 | (template |
|
1934 | (template | |
3587 | (template |
|
1935 | (template | |
3588 | (string 'template: ') |
|
1936 | (string 'template: ') | |
3589 | (symbol 'rev')) |
|
1937 | (symbol 'rev')) | |
3590 | (string '\n')) |
|
1938 | (string '\n')) | |
3591 | * keywords: rev |
|
1939 | * keywords: rev | |
3592 | * functions: |
|
1940 | * functions: | |
3593 | template: 0 |
|
1941 | template: 0 | |
3594 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' |
|
1942 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' | |
3595 | (template |
|
1943 | (template | |
3596 | (string 'rawstring: {rev}') |
|
1944 | (string 'rawstring: {rev}') | |
3597 | (string '\n')) |
|
1945 | (string '\n')) | |
3598 | * keywords: |
|
1946 | * keywords: | |
3599 | * functions: |
|
1947 | * functions: | |
3600 | rawstring: {rev} |
|
1948 | rawstring: {rev} | |
3601 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' |
|
1949 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' | |
3602 | (template |
|
1950 | (template | |
3603 | (% |
|
1951 | (% | |
3604 | (symbol 'files') |
|
1952 | (symbol 'files') | |
3605 | (string 'rawstring: {file}')) |
|
1953 | (string 'rawstring: {file}')) | |
3606 | (string '\n')) |
|
1954 | (string '\n')) | |
3607 | * keywords: files |
|
1955 | * keywords: files | |
3608 | * functions: |
|
1956 | * functions: | |
3609 | rawstring: {file} |
|
1957 | rawstring: {file} | |
3610 |
|
1958 | |||
3611 | Test string escaping: |
|
1959 | Test string escaping: | |
3612 |
|
1960 | |||
3613 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
1961 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3614 | > |
|
1962 | > | |
3615 | <>\n<[> |
|
1963 | <>\n<[> | |
3616 | <>\n<]> |
|
1964 | <>\n<]> | |
3617 | <>\n< |
|
1965 | <>\n< | |
3618 |
|
1966 | |||
3619 | $ hg log -R latesttag -r 0 \ |
|
1967 | $ hg log -R latesttag -r 0 \ | |
3620 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
1968 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3621 | > |
|
1969 | > | |
3622 | <>\n<[> |
|
1970 | <>\n<[> | |
3623 | <>\n<]> |
|
1971 | <>\n<]> | |
3624 | <>\n< |
|
1972 | <>\n< | |
3625 |
|
1973 | |||
3626 | $ hg log -R latesttag -r 0 -T esc \ |
|
1974 | $ hg log -R latesttag -r 0 -T esc \ | |
3627 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
1975 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3628 | > |
|
1976 | > | |
3629 | <>\n<[> |
|
1977 | <>\n<[> | |
3630 | <>\n<]> |
|
1978 | <>\n<]> | |
3631 | <>\n< |
|
1979 | <>\n< | |
3632 |
|
1980 | |||
3633 | $ cat <<'EOF' > esctmpl |
|
1981 | $ cat <<'EOF' > esctmpl | |
3634 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
1982 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3635 | > EOF |
|
1983 | > EOF | |
3636 | $ hg log -R latesttag -r 0 --style ./esctmpl |
|
1984 | $ hg log -R latesttag -r 0 --style ./esctmpl | |
3637 | > |
|
1985 | > | |
3638 | <>\n<[> |
|
1986 | <>\n<[> | |
3639 | <>\n<]> |
|
1987 | <>\n<]> | |
3640 | <>\n< |
|
1988 | <>\n< | |
3641 |
|
1989 | |||
3642 | Test string escaping of quotes: |
|
1990 | Test string escaping of quotes: | |
3643 |
|
1991 | |||
3644 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
1992 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3645 | " |
|
1993 | " | |
3646 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
1994 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3647 | \" |
|
1995 | \" | |
3648 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
1996 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3649 | \" |
|
1997 | \" | |
3650 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
1998 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3651 | \\\" |
|
1999 | \\\" | |
3652 |
|
2000 | |||
3653 |
|
2001 | |||
3654 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
2002 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3655 | " |
|
2003 | " | |
3656 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
2004 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3657 | \" |
|
2005 | \" | |
3658 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
2006 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3659 | \" |
|
2007 | \" | |
3660 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
2008 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3661 | \\\" |
|
2009 | \\\" | |
3662 |
|
2010 | |||
3663 | Test exception in quoted template. single backslash before quotation mark is |
|
2011 | Test exception in quoted template. single backslash before quotation mark is | |
3664 | stripped before parsing: |
|
2012 | stripped before parsing: | |
3665 |
|
2013 | |||
3666 | $ cat <<'EOF' > escquotetmpl |
|
2014 | $ cat <<'EOF' > escquotetmpl | |
3667 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" |
|
2015 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" | |
3668 | > EOF |
|
2016 | > EOF | |
3669 | $ cd latesttag |
|
2017 | $ cd latesttag | |
3670 | $ hg log -r 2 --style ../escquotetmpl |
|
2018 | $ hg log -r 2 --style ../escquotetmpl | |
3671 | " \" \" \\" head1 |
|
2019 | " \" \" \\" head1 | |
3672 |
|
2020 | |||
3673 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' |
|
2021 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' | |
3674 | valid |
|
2022 | valid | |
3675 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" |
|
2023 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" | |
3676 | valid |
|
2024 | valid | |
3677 |
|
2025 | |||
3678 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested |
|
2026 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested | |
3679 | _evalifliteral() templates (issue4733): |
|
2027 | _evalifliteral() templates (issue4733): | |
3680 |
|
2028 | |||
3681 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' |
|
2029 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' | |
3682 | "2 |
|
2030 | "2 | |
3683 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' |
|
2031 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' | |
3684 | "2 |
|
2032 | "2 | |
3685 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' |
|
2033 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' | |
3686 | "2 |
|
2034 | "2 | |
3687 |
|
2035 | |||
3688 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' |
|
2036 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' | |
3689 | \" |
|
2037 | \" | |
3690 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' |
|
2038 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' | |
3691 | \" |
|
2039 | \" | |
3692 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
2040 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3693 | \" |
|
2041 | \" | |
3694 |
|
2042 | |||
3695 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' |
|
2043 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' | |
3696 | \\\" |
|
2044 | \\\" | |
3697 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' |
|
2045 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' | |
3698 | \\\" |
|
2046 | \\\" | |
3699 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
2047 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3700 | \\\" |
|
2048 | \\\" | |
3701 |
|
2049 | |||
3702 | escaped single quotes and errors: |
|
2050 | escaped single quotes and errors: | |
3703 |
|
2051 | |||
3704 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' |
|
2052 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' | |
3705 | foo |
|
2053 | foo | |
3706 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' |
|
2054 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' | |
3707 | foo |
|
2055 | foo | |
3708 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' |
|
2056 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' | |
3709 | hg: parse error at 21: unterminated string |
|
2057 | hg: parse error at 21: unterminated string | |
3710 | ({if(rev, "{if(rev, \")}")}\n |
|
2058 | ({if(rev, "{if(rev, \")}")}\n | |
3711 | ^ here) |
|
2059 | ^ here) | |
3712 | [255] |
|
2060 | [255] | |
3713 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' |
|
2061 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' | |
3714 | hg: parse error: trailing \ in string |
|
2062 | hg: parse error: trailing \ in string | |
3715 | [255] |
|
2063 | [255] | |
3716 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' |
|
2064 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' | |
3717 | hg: parse error: trailing \ in string |
|
2065 | hg: parse error: trailing \ in string | |
3718 | [255] |
|
2066 | [255] | |
3719 |
|
2067 | |||
3720 | $ cd .. |
|
2068 | $ cd .. | |
3721 |
|
2069 | |||
3722 | Test leading backslashes: |
|
2070 | Test leading backslashes: | |
3723 |
|
2071 | |||
3724 | $ cd latesttag |
|
2072 | $ cd latesttag | |
3725 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' |
|
2073 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' | |
3726 | {rev} {file} |
|
2074 | {rev} {file} | |
3727 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' |
|
2075 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' | |
3728 | \2 \head1 |
|
2076 | \2 \head1 | |
3729 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' |
|
2077 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' | |
3730 | \{rev} \{file} |
|
2078 | \{rev} \{file} | |
3731 | $ cd .. |
|
2079 | $ cd .. | |
3732 |
|
2080 | |||
3733 | Test leading backslashes in "if" expression (issue4714): |
|
2081 | Test leading backslashes in "if" expression (issue4714): | |
3734 |
|
2082 | |||
3735 | $ cd latesttag |
|
2083 | $ cd latesttag | |
3736 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' |
|
2084 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' | |
3737 | {rev} \{rev} |
|
2085 | {rev} \{rev} | |
3738 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' |
|
2086 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' | |
3739 | \2 \\{rev} |
|
2087 | \2 \\{rev} | |
3740 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' |
|
2088 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' | |
3741 | \{rev} \\\{rev} |
|
2089 | \{rev} \\\{rev} | |
3742 | $ cd .. |
|
2090 | $ cd .. | |
3743 |
|
2091 | |||
3744 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) |
|
2092 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) | |
3745 |
|
2093 | |||
3746 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' |
|
2094 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' | |
3747 | \x6e |
|
2095 | \x6e | |
3748 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' |
|
2096 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' | |
3749 | \x5c\x786e |
|
2097 | \x5c\x786e | |
3750 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' |
|
2098 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' | |
3751 | \x6e |
|
2099 | \x6e | |
3752 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' |
|
2100 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' | |
3753 | \x5c\x786e |
|
2101 | \x5c\x786e | |
3754 |
|
2102 | |||
3755 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' |
|
2103 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' | |
3756 | \x6e |
|
2104 | \x6e | |
3757 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' |
|
2105 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' | |
3758 | \x5c\x786e |
|
2106 | \x5c\x786e | |
3759 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' |
|
2107 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' | |
3760 | \x6e |
|
2108 | \x6e | |
3761 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' |
|
2109 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' | |
3762 | \x5c\x786e |
|
2110 | \x5c\x786e | |
3763 |
|
2111 | |||
3764 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' |
|
2112 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' | |
3765 | fourth |
|
2113 | fourth | |
3766 | second |
|
2114 | second | |
3767 | third |
|
2115 | third | |
3768 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' |
|
2116 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' | |
3769 | fourth\nsecond\nthird |
|
2117 | fourth\nsecond\nthird | |
3770 |
|
2118 | |||
3771 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' |
|
2119 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' | |
3772 | <p> |
|
2120 | <p> | |
3773 | 1st |
|
2121 | 1st | |
3774 | </p> |
|
2122 | </p> | |
3775 | <p> |
|
2123 | <p> | |
3776 | 2nd |
|
2124 | 2nd | |
3777 | </p> |
|
2125 | </p> | |
3778 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' |
|
2126 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' | |
3779 | <p> |
|
2127 | <p> | |
3780 | 1st\n\n2nd |
|
2128 | 1st\n\n2nd | |
3781 | </p> |
|
2129 | </p> | |
3782 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' |
|
2130 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' | |
3783 | 1st |
|
2131 | 1st | |
3784 |
|
2132 | |||
3785 | 2nd |
|
2133 | 2nd | |
3786 |
|
2134 | |||
3787 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' |
|
2135 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' | |
3788 | o perso |
|
2136 | o perso | |
3789 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' |
|
2137 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' | |
3790 | no person |
|
2138 | no person | |
3791 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' |
|
2139 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' | |
3792 | o perso |
|
2140 | o perso | |
3793 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' |
|
2141 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' | |
3794 | no perso |
|
2142 | no perso | |
3795 |
|
2143 | |||
3796 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' |
|
2144 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' | |
3797 | -o perso- |
|
2145 | -o perso- | |
3798 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' |
|
2146 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' | |
3799 | no person |
|
2147 | no person | |
3800 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' |
|
2148 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' | |
3801 | \x2do perso\x2d |
|
2149 | \x2do perso\x2d | |
3802 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' |
|
2150 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' | |
3803 | -o perso- |
|
2151 | -o perso- | |
3804 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' |
|
2152 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' | |
3805 | \x2do perso\x6e |
|
2153 | \x2do perso\x6e | |
3806 |
|
2154 | |||
3807 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' |
|
2155 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' | |
3808 | fourth |
|
2156 | fourth | |
3809 | second |
|
2157 | second | |
3810 | third |
|
2158 | third | |
3811 |
|
2159 | |||
3812 | Test string escaping in nested expression: |
|
2160 | Test string escaping in nested expression: | |
3813 |
|
2161 | |||
3814 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' |
|
2162 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' | |
3815 | fourth\x6esecond\x6ethird |
|
2163 | fourth\x6esecond\x6ethird | |
3816 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' |
|
2164 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' | |
3817 | fourth\x6esecond\x6ethird |
|
2165 | fourth\x6esecond\x6ethird | |
3818 |
|
2166 | |||
3819 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' |
|
2167 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' | |
3820 | fourth\x6esecond\x6ethird |
|
2168 | fourth\x6esecond\x6ethird | |
3821 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' |
|
2169 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' | |
3822 | fourth\x5c\x786esecond\x5c\x786ethird |
|
2170 | fourth\x5c\x786esecond\x5c\x786ethird | |
3823 |
|
2171 | |||
3824 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' |
|
2172 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' | |
3825 | 3:\x6eo user, \x6eo domai\x6e |
|
2173 | 3:\x6eo user, \x6eo domai\x6e | |
3826 | 4:\x5c\x786eew bra\x5c\x786ech |
|
2174 | 4:\x5c\x786eew bra\x5c\x786ech | |
3827 |
|
2175 | |||
3828 | Test quotes in nested expression are evaluated just like a $(command) |
|
2176 | Test quotes in nested expression are evaluated just like a $(command) | |
3829 | substitution in POSIX shells: |
|
2177 | substitution in POSIX shells: | |
3830 |
|
2178 | |||
3831 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' |
|
2179 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' | |
3832 | 8:95c24699272e |
|
2180 | 8:95c24699272e | |
3833 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' |
|
2181 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' | |
3834 | {8} "95c24699272e" |
|
2182 | {8} "95c24699272e" | |
3835 |
|
2183 | |||
3836 | Test recursive evaluation: |
|
2184 | Test recursive evaluation: | |
3837 |
|
2185 | |||
3838 | $ hg init r |
|
2186 | $ hg init r | |
3839 | $ cd r |
|
2187 | $ cd r | |
3840 | $ echo a > a |
|
2188 | $ echo a > a | |
3841 | $ hg ci -Am '{rev}' |
|
2189 | $ hg ci -Am '{rev}' | |
3842 | adding a |
|
2190 | adding a | |
3843 | $ hg log -r 0 --template '{if(rev, desc)}\n' |
|
2191 | $ hg log -r 0 --template '{if(rev, desc)}\n' | |
3844 | {rev} |
|
2192 | {rev} | |
3845 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' |
|
2193 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' | |
3846 | test 0 |
|
2194 | test 0 | |
3847 |
|
2195 | |||
3848 | $ hg branch -q 'text.{rev}' |
|
2196 | $ hg branch -q 'text.{rev}' | |
3849 | $ echo aa >> aa |
|
2197 | $ echo aa >> aa | |
3850 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' |
|
2198 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' | |
3851 |
|
2199 | |||
3852 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' |
|
2200 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' | |
3853 | {node|short}desc to |
|
2201 | {node|short}desc to | |
3854 | text.{rev}be wrapped |
|
2202 | text.{rev}be wrapped | |
3855 | text.{rev}desc to be |
|
2203 | text.{rev}desc to be | |
3856 | text.{rev}wrapped (no-eol) |
|
2204 | text.{rev}wrapped (no-eol) | |
3857 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' |
|
2205 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' | |
3858 | bcc7ff960b8e:desc to |
|
2206 | bcc7ff960b8e:desc to | |
3859 | text.1:be wrapped |
|
2207 | text.1:be wrapped | |
3860 | text.1:desc to be |
|
2208 | text.1:desc to be | |
3861 | text.1:wrapped (no-eol) |
|
2209 | text.1:wrapped (no-eol) | |
3862 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' |
|
2210 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' | |
3863 | hg: parse error: fill expects an integer width |
|
2211 | hg: parse error: fill expects an integer width | |
3864 | [255] |
|
2212 | [255] | |
3865 |
|
2213 | |||
3866 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' |
|
2214 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' | |
3867 | bcc7ff960b8e:desc to be |
|
2215 | bcc7ff960b8e:desc to be | |
3868 | termwidth.1:wrapped desc |
|
2216 | termwidth.1:wrapped desc | |
3869 | termwidth.1:to be wrapped (no-eol) |
|
2217 | termwidth.1:to be wrapped (no-eol) | |
3870 |
|
2218 | |||
3871 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
2219 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' | |
3872 | {node|short} (no-eol) |
|
2220 | {node|short} (no-eol) | |
3873 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' |
|
2221 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' | |
3874 | bcc-ff---b-e (no-eol) |
|
2222 | bcc-ff---b-e (no-eol) | |
3875 |
|
2223 | |||
3876 | $ cat >> .hg/hgrc <<EOF |
|
2224 | $ cat >> .hg/hgrc <<EOF | |
3877 | > [extensions] |
|
2225 | > [extensions] | |
3878 | > color= |
|
2226 | > color= | |
3879 | > [color] |
|
2227 | > [color] | |
3880 | > mode=ansi |
|
2228 | > mode=ansi | |
3881 | > text.{rev} = red |
|
2229 | > text.{rev} = red | |
3882 | > text.1 = green |
|
2230 | > text.1 = green | |
3883 | > EOF |
|
2231 | > EOF | |
3884 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' |
|
2232 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' | |
3885 | \x1b[0;31mtext\x1b[0m (esc) |
|
2233 | \x1b[0;31mtext\x1b[0m (esc) | |
3886 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' |
|
2234 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' | |
3887 | \x1b[0;32mtext\x1b[0m (esc) |
|
2235 | \x1b[0;32mtext\x1b[0m (esc) | |
3888 |
|
2236 | |||
3889 | color effect can be specified without quoting: |
|
2237 | color effect can be specified without quoting: | |
3890 |
|
2238 | |||
3891 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' |
|
2239 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' | |
3892 | \x1b[0;31mtext\x1b[0m (esc) |
|
2240 | \x1b[0;31mtext\x1b[0m (esc) | |
3893 |
|
2241 | |||
3894 | color effects can be nested (issue5413) |
|
2242 | color effects can be nested (issue5413) | |
3895 |
|
2243 | |||
3896 | $ hg debugtemplate --color=always \ |
|
2244 | $ hg debugtemplate --color=always \ | |
3897 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' |
|
2245 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' | |
3898 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) |
|
2246 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) | |
3899 |
|
2247 | |||
3900 | pad() should interact well with color codes (issue5416) |
|
2248 | pad() should interact well with color codes (issue5416) | |
3901 |
|
2249 | |||
3902 | $ hg debugtemplate --color=always \ |
|
2250 | $ hg debugtemplate --color=always \ | |
3903 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' |
|
2251 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' | |
3904 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) |
|
2252 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) | |
3905 |
|
2253 | |||
3906 | label should be no-op if color is disabled: |
|
2254 | label should be no-op if color is disabled: | |
3907 |
|
2255 | |||
3908 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' |
|
2256 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' | |
3909 | text |
|
2257 | text | |
3910 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' |
|
2258 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' | |
3911 | text |
|
2259 | text | |
3912 |
|
2260 | |||
3913 | Test branches inside if statement: |
|
2261 | Test branches inside if statement: | |
3914 |
|
2262 | |||
3915 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' |
|
2263 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' | |
3916 | no |
|
2264 | no | |
3917 |
|
2265 | |||
3918 | Test dict constructor: |
|
2266 | Test dict constructor: | |
3919 |
|
2267 | |||
3920 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' |
|
2268 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' | |
3921 | y=f7769ec2ab97 x=0 |
|
2269 | y=f7769ec2ab97 x=0 | |
3922 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' |
|
2270 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' | |
3923 | x=0 |
|
2271 | x=0 | |
3924 | y=f7769ec2ab97 |
|
2272 | y=f7769ec2ab97 | |
3925 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' |
|
2273 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' | |
3926 | {"x": 0, "y": "f7769ec2ab97"} |
|
2274 | {"x": 0, "y": "f7769ec2ab97"} | |
3927 | $ hg log -r 0 -T '{dict()|json}\n' |
|
2275 | $ hg log -r 0 -T '{dict()|json}\n' | |
3928 | {} |
|
2276 | {} | |
3929 |
|
2277 | |||
3930 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' |
|
2278 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' | |
3931 | rev=0 node=f7769ec2ab97 |
|
2279 | rev=0 node=f7769ec2ab97 | |
3932 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' |
|
2280 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' | |
3933 | rev=0 node=f7769ec2ab97 |
|
2281 | rev=0 node=f7769ec2ab97 | |
3934 |
|
2282 | |||
3935 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' |
|
2283 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' | |
3936 | hg: parse error: duplicated dict key 'rev' inferred |
|
2284 | hg: parse error: duplicated dict key 'rev' inferred | |
3937 | [255] |
|
2285 | [255] | |
3938 | $ hg log -r 0 -T '{dict(node, node|short)}\n' |
|
2286 | $ hg log -r 0 -T '{dict(node, node|short)}\n' | |
3939 | hg: parse error: duplicated dict key 'node' inferred |
|
2287 | hg: parse error: duplicated dict key 'node' inferred | |
3940 | [255] |
|
2288 | [255] | |
3941 | $ hg log -r 0 -T '{dict(1 + 2)}' |
|
2289 | $ hg log -r 0 -T '{dict(1 + 2)}' | |
3942 | hg: parse error: dict key cannot be inferred |
|
2290 | hg: parse error: dict key cannot be inferred | |
3943 | [255] |
|
2291 | [255] | |
3944 |
|
2292 | |||
3945 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' |
|
2293 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' | |
3946 | hg: parse error: dict got multiple values for keyword argument 'x' |
|
2294 | hg: parse error: dict got multiple values for keyword argument 'x' | |
3947 | [255] |
|
2295 | [255] | |
3948 |
|
2296 | |||
3949 | Test get function: |
|
2297 | Test get function: | |
3950 |
|
2298 | |||
3951 | $ hg log -r 0 --template '{get(extras, "branch")}\n' |
|
2299 | $ hg log -r 0 --template '{get(extras, "branch")}\n' | |
3952 | default |
|
2300 | default | |
3953 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' |
|
2301 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' | |
3954 | default |
|
2302 | default | |
3955 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' |
|
2303 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' | |
3956 | hg: parse error: not a dictionary |
|
2304 | hg: parse error: not a dictionary | |
3957 | (get() expects a dict as first argument) |
|
2305 | (get() expects a dict as first argument) | |
3958 | [255] |
|
2306 | [255] | |
3959 |
|
2307 | |||
3960 | Test json filter applied to wrapped object: |
|
2308 | Test json filter applied to wrapped object: | |
3961 |
|
2309 | |||
3962 | $ hg log -r0 -T '{files|json}\n' |
|
2310 | $ hg log -r0 -T '{files|json}\n' | |
3963 | ["a"] |
|
2311 | ["a"] | |
3964 | $ hg log -r0 -T '{extras|json}\n' |
|
2312 | $ hg log -r0 -T '{extras|json}\n' | |
3965 | {"branch": "default"} |
|
2313 | {"branch": "default"} | |
3966 | $ hg log -r0 -T '{date|json}\n' |
|
2314 | $ hg log -r0 -T '{date|json}\n' | |
3967 | [0, 0] |
|
2315 | [0, 0] | |
3968 |
|
2316 | |||
3969 | Test json filter applied to map result: |
|
2317 | Test json filter applied to map result: | |
3970 |
|
2318 | |||
3971 | $ hg log -r0 -T '{json(extras % "{key}")}\n' |
|
2319 | $ hg log -r0 -T '{json(extras % "{key}")}\n' | |
3972 | ["branch"] |
|
2320 | ["branch"] | |
3973 |
|
2321 | |||
3974 | Test localdate(date, tz) function: |
|
2322 | Test localdate(date, tz) function: | |
3975 |
|
2323 | |||
3976 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' |
|
2324 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' | |
3977 | 1970-01-01 09:00 +0900 |
|
2325 | 1970-01-01 09:00 +0900 | |
3978 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' |
|
2326 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' | |
3979 | 1970-01-01 00:00 +0000 |
|
2327 | 1970-01-01 00:00 +0000 | |
3980 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' |
|
2328 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' | |
3981 | hg: parse error: localdate expects a timezone |
|
2329 | hg: parse error: localdate expects a timezone | |
3982 | [255] |
|
2330 | [255] | |
3983 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' |
|
2331 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' | |
3984 | 1970-01-01 02:00 +0200 |
|
2332 | 1970-01-01 02:00 +0200 | |
3985 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' |
|
2333 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' | |
3986 | 1970-01-01 00:00 +0000 |
|
2334 | 1970-01-01 00:00 +0000 | |
3987 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' |
|
2335 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' | |
3988 | 1970-01-01 00:00 +0000 |
|
2336 | 1970-01-01 00:00 +0000 | |
3989 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' |
|
2337 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' | |
3990 | hg: parse error: localdate expects a timezone |
|
2338 | hg: parse error: localdate expects a timezone | |
3991 | [255] |
|
2339 | [255] | |
3992 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' |
|
2340 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' | |
3993 | hg: parse error: localdate expects a timezone |
|
2341 | hg: parse error: localdate expects a timezone | |
3994 | [255] |
|
2342 | [255] | |
3995 |
|
2343 | |||
3996 | Test shortest(node) function: |
|
2344 | Test shortest(node) function: | |
3997 |
|
2345 | |||
3998 | $ echo b > b |
|
2346 | $ echo b > b | |
3999 | $ hg ci -qAm b |
|
2347 | $ hg ci -qAm b | |
4000 | $ hg log --template '{shortest(node)}\n' |
|
2348 | $ hg log --template '{shortest(node)}\n' | |
4001 | e777 |
|
2349 | e777 | |
4002 | bcc7 |
|
2350 | bcc7 | |
4003 | f776 |
|
2351 | f776 | |
4004 | $ hg log --template '{shortest(node, 10)}\n' |
|
2352 | $ hg log --template '{shortest(node, 10)}\n' | |
4005 | e777603221 |
|
2353 | e777603221 | |
4006 | bcc7ff960b |
|
2354 | bcc7ff960b | |
4007 | f7769ec2ab |
|
2355 | f7769ec2ab | |
4008 | $ hg log --template '{node|shortest}\n' -l1 |
|
2356 | $ hg log --template '{node|shortest}\n' -l1 | |
4009 | e777 |
|
2357 | e777 | |
4010 |
|
2358 | |||
4011 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' |
|
2359 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' | |
4012 | f7769ec2ab |
|
2360 | f7769ec2ab | |
4013 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' |
|
2361 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' | |
4014 | hg: parse error: shortest() expects an integer minlength |
|
2362 | hg: parse error: shortest() expects an integer minlength | |
4015 | [255] |
|
2363 | [255] | |
4016 |
|
2364 | |||
4017 | $ hg log -r 'wdir()' -T '{node|shortest}\n' |
|
2365 | $ hg log -r 'wdir()' -T '{node|shortest}\n' | |
4018 | ffff |
|
2366 | ffff | |
4019 |
|
2367 | |||
4020 | $ hg log --template '{shortest("f")}\n' -l1 |
|
2368 | $ hg log --template '{shortest("f")}\n' -l1 | |
4021 | f |
|
2369 | f | |
4022 |
|
2370 | |||
4023 | $ hg log --template '{shortest("0123456789012345678901234567890123456789")}\n' -l1 |
|
2371 | $ hg log --template '{shortest("0123456789012345678901234567890123456789")}\n' -l1 | |
4024 | 0123456789012345678901234567890123456789 |
|
2372 | 0123456789012345678901234567890123456789 | |
4025 |
|
2373 | |||
4026 | $ hg log --template '{shortest("01234567890123456789012345678901234567890123456789")}\n' -l1 |
|
2374 | $ hg log --template '{shortest("01234567890123456789012345678901234567890123456789")}\n' -l1 | |
4027 | 01234567890123456789012345678901234567890123456789 |
|
2375 | 01234567890123456789012345678901234567890123456789 | |
4028 |
|
2376 | |||
4029 | $ hg log --template '{shortest("not a hex string")}\n' -l1 |
|
2377 | $ hg log --template '{shortest("not a hex string")}\n' -l1 | |
4030 | not a hex string |
|
2378 | not a hex string | |
4031 |
|
2379 | |||
4032 | $ hg log --template '{shortest("not a hex string, but it'\''s 40 bytes long")}\n' -l1 |
|
2380 | $ hg log --template '{shortest("not a hex string, but it'\''s 40 bytes long")}\n' -l1 | |
4033 | not a hex string, but it's 40 bytes long |
|
2381 | not a hex string, but it's 40 bytes long | |
4034 |
|
2382 | |||
4035 | $ hg log --template '{shortest("ffffffffffffffffffffffffffffffffffffffff")}\n' -l1 |
|
2383 | $ hg log --template '{shortest("ffffffffffffffffffffffffffffffffffffffff")}\n' -l1 | |
4036 | ffff |
|
2384 | ffff | |
4037 |
|
2385 | |||
4038 | $ hg log --template '{shortest("fffffff")}\n' -l1 |
|
2386 | $ hg log --template '{shortest("fffffff")}\n' -l1 | |
4039 | ffff |
|
2387 | ffff | |
4040 |
|
2388 | |||
4041 | $ hg log --template '{shortest("ff")}\n' -l1 |
|
2389 | $ hg log --template '{shortest("ff")}\n' -l1 | |
4042 | ffff |
|
2390 | ffff | |
4043 |
|
2391 | |||
4044 | $ cd .. |
|
2392 | $ cd .. | |
4045 |
|
2393 | |||
4046 | Test shortest(node) with the repo having short hash collision: |
|
2394 | Test shortest(node) with the repo having short hash collision: | |
4047 |
|
2395 | |||
4048 | $ hg init hashcollision |
|
2396 | $ hg init hashcollision | |
4049 | $ cd hashcollision |
|
2397 | $ cd hashcollision | |
4050 | $ cat <<EOF >> .hg/hgrc |
|
2398 | $ cat <<EOF >> .hg/hgrc | |
4051 | > [experimental] |
|
2399 | > [experimental] | |
4052 | > evolution.createmarkers=True |
|
2400 | > evolution.createmarkers=True | |
4053 | > EOF |
|
2401 | > EOF | |
4054 | $ echo 0 > a |
|
2402 | $ echo 0 > a | |
4055 | $ hg ci -qAm 0 |
|
2403 | $ hg ci -qAm 0 | |
4056 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do |
|
2404 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do | |
4057 | > hg up -q 0 |
|
2405 | > hg up -q 0 | |
4058 | > echo $i > a |
|
2406 | > echo $i > a | |
4059 | > hg ci -qm $i |
|
2407 | > hg ci -qm $i | |
4060 | > done |
|
2408 | > done | |
4061 | $ hg up -q null |
|
2409 | $ hg up -q null | |
4062 | $ hg log -r0: -T '{rev}:{node}\n' |
|
2410 | $ hg log -r0: -T '{rev}:{node}\n' | |
4063 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a |
|
2411 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a | |
4064 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc |
|
2412 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc | |
4065 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 |
|
2413 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 | |
4066 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 |
|
2414 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 | |
4067 | 4:10776689e627b465361ad5c296a20a487e153ca4 |
|
2415 | 4:10776689e627b465361ad5c296a20a487e153ca4 | |
4068 | 5:a00be79088084cb3aff086ab799f8790e01a976b |
|
2416 | 5:a00be79088084cb3aff086ab799f8790e01a976b | |
4069 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 |
|
2417 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 | |
4070 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d |
|
2418 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d | |
4071 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a |
|
2419 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a | |
4072 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
2420 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
4073 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
2421 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f | |
4074 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b |
|
2422 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b | |
4075 | obsoleted 1 changesets |
|
2423 | obsoleted 1 changesets | |
4076 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
2424 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
4077 | obsoleted 1 changesets |
|
2425 | obsoleted 1 changesets | |
4078 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
2426 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f | |
4079 | obsoleted 1 changesets |
|
2427 | obsoleted 1 changesets | |
4080 |
|
2428 | |||
4081 | nodes starting with '11' (we don't have the revision number '11' though) |
|
2429 | nodes starting with '11' (we don't have the revision number '11' though) | |
4082 |
|
2430 | |||
4083 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' |
|
2431 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' | |
4084 | 1:1142 |
|
2432 | 1:1142 | |
4085 | 2:1140 |
|
2433 | 2:1140 | |
4086 | 3:11d |
|
2434 | 3:11d | |
4087 |
|
2435 | |||
4088 | '5:a00' is hidden, but still we have two nodes starting with 'a0' |
|
2436 | '5:a00' is hidden, but still we have two nodes starting with 'a0' | |
4089 |
|
2437 | |||
4090 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' |
|
2438 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' | |
4091 | 6:a0b |
|
2439 | 6:a0b | |
4092 | 7:a04 |
|
2440 | 7:a04 | |
4093 |
|
2441 | |||
4094 | node '10' conflicts with the revision number '10' even if it is hidden |
|
2442 | node '10' conflicts with the revision number '10' even if it is hidden | |
4095 | (we could exclude hidden revision numbers, but currently we don't) |
|
2443 | (we could exclude hidden revision numbers, but currently we don't) | |
4096 |
|
2444 | |||
4097 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' |
|
2445 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' | |
4098 | 4:107 |
|
2446 | 4:107 | |
4099 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden |
|
2447 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden | |
4100 | 4:107 |
|
2448 | 4:107 | |
4101 |
|
2449 | |||
4102 | node 'c562' should be unique if the other 'c562' nodes are hidden |
|
2450 | node 'c562' should be unique if the other 'c562' nodes are hidden | |
4103 | (but we don't try the slow path to filter out hidden nodes for now) |
|
2451 | (but we don't try the slow path to filter out hidden nodes for now) | |
4104 |
|
2452 | |||
4105 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' |
|
2453 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' | |
4106 | 8:c5625 |
|
2454 | 8:c5625 | |
4107 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden |
|
2455 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden | |
4108 | 8:c5625 |
|
2456 | 8:c5625 | |
4109 | 9:c5623 |
|
2457 | 9:c5623 | |
4110 | 10:c562d |
|
2458 | 10:c562d | |
4111 |
|
2459 | |||
4112 | $ cd .. |
|
2460 | $ cd .. | |
4113 |
|
2461 | |||
4114 | Test pad function |
|
2462 | Test pad function | |
4115 |
|
2463 | |||
4116 | $ cd r |
|
2464 | $ cd r | |
4117 |
|
2465 | |||
4118 | $ hg log --template '{pad(rev, 20)} {author|user}\n' |
|
2466 | $ hg log --template '{pad(rev, 20)} {author|user}\n' | |
4119 | 2 test |
|
2467 | 2 test | |
4120 | 1 {node|short} |
|
2468 | 1 {node|short} | |
4121 | 0 test |
|
2469 | 0 test | |
4122 |
|
2470 | |||
4123 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' |
|
2471 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' | |
4124 | 2 test |
|
2472 | 2 test | |
4125 | 1 {node|short} |
|
2473 | 1 {node|short} | |
4126 | 0 test |
|
2474 | 0 test | |
4127 |
|
2475 | |||
4128 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' |
|
2476 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' | |
4129 | 2------------------- test |
|
2477 | 2------------------- test | |
4130 | 1------------------- {node|short} |
|
2478 | 1------------------- {node|short} | |
4131 | 0------------------- test |
|
2479 | 0------------------- test | |
4132 |
|
2480 | |||
4133 | Test template string in pad function |
|
2481 | Test template string in pad function | |
4134 |
|
2482 | |||
4135 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' |
|
2483 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' | |
4136 | {0} test |
|
2484 | {0} test | |
4137 |
|
2485 | |||
4138 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' |
|
2486 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' | |
4139 | \{rev} test |
|
2487 | \{rev} test | |
4140 |
|
2488 | |||
4141 | Test width argument passed to pad function |
|
2489 | Test width argument passed to pad function | |
4142 |
|
2490 | |||
4143 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' |
|
2491 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' | |
4144 | 0 test |
|
2492 | 0 test | |
4145 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' |
|
2493 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' | |
4146 | hg: parse error: pad() expects an integer width |
|
2494 | hg: parse error: pad() expects an integer width | |
4147 | [255] |
|
2495 | [255] | |
4148 |
|
2496 | |||
4149 | Test invalid fillchar passed to pad function |
|
2497 | Test invalid fillchar passed to pad function | |
4150 |
|
2498 | |||
4151 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' |
|
2499 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' | |
4152 | hg: parse error: pad() expects a single fill character |
|
2500 | hg: parse error: pad() expects a single fill character | |
4153 | [255] |
|
2501 | [255] | |
4154 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' |
|
2502 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' | |
4155 | hg: parse error: pad() expects a single fill character |
|
2503 | hg: parse error: pad() expects a single fill character | |
4156 | [255] |
|
2504 | [255] | |
4157 |
|
2505 | |||
4158 | Test boolean argument passed to pad function |
|
2506 | Test boolean argument passed to pad function | |
4159 |
|
2507 | |||
4160 | no crash |
|
2508 | no crash | |
4161 |
|
2509 | |||
4162 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' |
|
2510 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' | |
4163 | ---------0 |
|
2511 | ---------0 | |
4164 |
|
2512 | |||
4165 | string/literal |
|
2513 | string/literal | |
4166 |
|
2514 | |||
4167 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' |
|
2515 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' | |
4168 | ---------0 |
|
2516 | ---------0 | |
4169 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' |
|
2517 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' | |
4170 | 0--------- |
|
2518 | 0--------- | |
4171 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' |
|
2519 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' | |
4172 | 0--------- |
|
2520 | 0--------- | |
4173 |
|
2521 | |||
4174 | unknown keyword is evaluated to '' |
|
2522 | unknown keyword is evaluated to '' | |
4175 |
|
2523 | |||
4176 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' |
|
2524 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' | |
4177 | 0--------- |
|
2525 | 0--------- | |
4178 |
|
2526 | |||
4179 | Test separate function |
|
2527 | Test separate function | |
4180 |
|
2528 | |||
4181 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' |
|
2529 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' | |
4182 | a-b-c |
|
2530 | a-b-c | |
4183 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' |
|
2531 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' | |
4184 | 0:f7769ec2ab97 test default |
|
2532 | 0:f7769ec2ab97 test default | |
4185 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' |
|
2533 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' | |
4186 | a \x1b[0;31mb\x1b[0m c d (esc) |
|
2534 | a \x1b[0;31mb\x1b[0m c d (esc) | |
4187 |
|
2535 | |||
4188 | Test boolean expression/literal passed to if function |
|
2536 | Test boolean expression/literal passed to if function | |
4189 |
|
2537 | |||
4190 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' |
|
2538 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' | |
4191 | rev 0 is True |
|
2539 | rev 0 is True | |
4192 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' |
|
2540 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' | |
4193 | literal 0 is True as well |
|
2541 | literal 0 is True as well | |
4194 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' |
|
2542 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' | |
4195 | empty string is False |
|
2543 | empty string is False | |
4196 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' |
|
2544 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' | |
4197 | empty list is False |
|
2545 | empty list is False | |
4198 | $ hg log -r 0 -T '{if(revset(r"0"), "non-empty list is True")}\n' |
|
2546 | $ hg log -r 0 -T '{if(revset(r"0"), "non-empty list is True")}\n' | |
4199 | non-empty list is True |
|
2547 | non-empty list is True | |
4200 | $ hg log -r 0 -T '{if(revset(r"0") % "", "list of empty strings is True")}\n' |
|
2548 | $ hg log -r 0 -T '{if(revset(r"0") % "", "list of empty strings is True")}\n' | |
4201 | list of empty strings is True |
|
2549 | list of empty strings is True | |
4202 | $ hg log -r 0 -T '{if(true, "true is True")}\n' |
|
2550 | $ hg log -r 0 -T '{if(true, "true is True")}\n' | |
4203 | true is True |
|
2551 | true is True | |
4204 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' |
|
2552 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' | |
4205 | false is False |
|
2553 | false is False | |
4206 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' |
|
2554 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' | |
4207 | non-empty string is True |
|
2555 | non-empty string is True | |
4208 |
|
2556 | |||
4209 | Test ifcontains function |
|
2557 | Test ifcontains function | |
4210 |
|
2558 | |||
4211 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' |
|
2559 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' | |
4212 | 2 is in the string |
|
2560 | 2 is in the string | |
4213 | 1 is not |
|
2561 | 1 is not | |
4214 | 0 is in the string |
|
2562 | 0 is in the string | |
4215 |
|
2563 | |||
4216 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' |
|
2564 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' | |
4217 | 2 is in the string |
|
2565 | 2 is in the string | |
4218 | 1 is not |
|
2566 | 1 is not | |
4219 | 0 is in the string |
|
2567 | 0 is in the string | |
4220 |
|
2568 | |||
4221 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' |
|
2569 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' | |
4222 | 2 did not add a |
|
2570 | 2 did not add a | |
4223 | 1 did not add a |
|
2571 | 1 did not add a | |
4224 | 0 added a |
|
2572 | 0 added a | |
4225 |
|
2573 | |||
4226 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' |
|
2574 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' | |
4227 | 2 is parent of 1 |
|
2575 | 2 is parent of 1 | |
4228 | 1 |
|
2576 | 1 | |
4229 | 0 |
|
2577 | 0 | |
4230 |
|
2578 | |||
4231 | $ hg log -l1 -T '{ifcontains("branch", extras, "t", "f")}\n' |
|
2579 | $ hg log -l1 -T '{ifcontains("branch", extras, "t", "f")}\n' | |
4232 | t |
|
2580 | t | |
4233 | $ hg log -l1 -T '{ifcontains("branch", extras % "{key}", "t", "f")}\n' |
|
2581 | $ hg log -l1 -T '{ifcontains("branch", extras % "{key}", "t", "f")}\n' | |
4234 | t |
|
2582 | t | |
4235 | $ hg log -l1 -T '{ifcontains("branc", extras % "{key}", "t", "f")}\n' |
|
2583 | $ hg log -l1 -T '{ifcontains("branc", extras % "{key}", "t", "f")}\n' | |
4236 | f |
|
2584 | f | |
4237 | $ hg log -l1 -T '{ifcontains("branc", stringify(extras % "{key}"), "t", "f")}\n' |
|
2585 | $ hg log -l1 -T '{ifcontains("branc", stringify(extras % "{key}"), "t", "f")}\n' | |
4238 | t |
|
2586 | t | |
4239 |
|
2587 | |||
4240 | Test revset function |
|
2588 | Test revset function | |
4241 |
|
2589 | |||
4242 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' |
|
2590 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' | |
4243 | 2 current rev |
|
2591 | 2 current rev | |
4244 | 1 not current rev |
|
2592 | 1 not current rev | |
4245 | 0 not current rev |
|
2593 | 0 not current rev | |
4246 |
|
2594 | |||
4247 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' |
|
2595 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' | |
4248 | 2 match rev |
|
2596 | 2 match rev | |
4249 | 1 match rev |
|
2597 | 1 match rev | |
4250 | 0 not match rev |
|
2598 | 0 not match rev | |
4251 |
|
2599 | |||
4252 | $ hg log -T '{ifcontains(desc, revset(":"), "", "type not match")}\n' -l1 |
|
2600 | $ hg log -T '{ifcontains(desc, revset(":"), "", "type not match")}\n' -l1 | |
4253 | type not match |
|
2601 | type not match | |
4254 |
|
2602 | |||
4255 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' |
|
2603 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' | |
4256 | 2 Parents: 1 |
|
2604 | 2 Parents: 1 | |
4257 | 1 Parents: 0 |
|
2605 | 1 Parents: 0 | |
4258 | 0 Parents: |
|
2606 | 0 Parents: | |
4259 |
|
2607 | |||
4260 | $ cat >> .hg/hgrc <<EOF |
|
2608 | $ cat >> .hg/hgrc <<EOF | |
4261 | > [revsetalias] |
|
2609 | > [revsetalias] | |
4262 | > myparents(\$1) = parents(\$1) |
|
2610 | > myparents(\$1) = parents(\$1) | |
4263 | > EOF |
|
2611 | > EOF | |
4264 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' |
|
2612 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' | |
4265 | 2 Parents: 1 |
|
2613 | 2 Parents: 1 | |
4266 | 1 Parents: 0 |
|
2614 | 1 Parents: 0 | |
4267 | 0 Parents: |
|
2615 | 0 Parents: | |
4268 |
|
2616 | |||
4269 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' |
|
2617 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' | |
4270 | Rev: 2 |
|
2618 | Rev: 2 | |
4271 | Ancestor: 0 |
|
2619 | Ancestor: 0 | |
4272 | Ancestor: 1 |
|
2620 | Ancestor: 1 | |
4273 | Ancestor: 2 |
|
2621 | Ancestor: 2 | |
4274 |
|
2622 | |||
4275 | Rev: 1 |
|
2623 | Rev: 1 | |
4276 | Ancestor: 0 |
|
2624 | Ancestor: 0 | |
4277 | Ancestor: 1 |
|
2625 | Ancestor: 1 | |
4278 |
|
2626 | |||
4279 | Rev: 0 |
|
2627 | Rev: 0 | |
4280 | Ancestor: 0 |
|
2628 | Ancestor: 0 | |
4281 |
|
2629 | |||
4282 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 |
|
2630 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 | |
4283 | 2 |
|
2631 | 2 | |
4284 |
|
2632 | |||
4285 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 |
|
2633 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 | |
4286 | 2 |
|
2634 | 2 | |
4287 |
|
2635 | |||
4288 | a list template is evaluated for each item of revset/parents |
|
2636 | a list template is evaluated for each item of revset/parents | |
4289 |
|
2637 | |||
4290 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' |
|
2638 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' | |
4291 | 2 p: 1:bcc7ff960b8e |
|
2639 | 2 p: 1:bcc7ff960b8e | |
4292 | 1 p: 0:f7769ec2ab97 |
|
2640 | 1 p: 0:f7769ec2ab97 | |
4293 | 0 p: |
|
2641 | 0 p: | |
4294 |
|
2642 | |||
4295 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' |
|
2643 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' | |
4296 | 2 p: 1:bcc7ff960b8e -1:000000000000 |
|
2644 | 2 p: 1:bcc7ff960b8e -1:000000000000 | |
4297 | 1 p: 0:f7769ec2ab97 -1:000000000000 |
|
2645 | 1 p: 0:f7769ec2ab97 -1:000000000000 | |
4298 | 0 p: -1:000000000000 -1:000000000000 |
|
2646 | 0 p: -1:000000000000 -1:000000000000 | |
4299 |
|
2647 | |||
4300 | therefore, 'revcache' should be recreated for each rev |
|
2648 | therefore, 'revcache' should be recreated for each rev | |
4301 |
|
2649 | |||
4302 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' |
|
2650 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' | |
4303 | 2 aa b |
|
2651 | 2 aa b | |
4304 | p |
|
2652 | p | |
4305 | 1 |
|
2653 | 1 | |
4306 | p a |
|
2654 | p a | |
4307 | 0 a |
|
2655 | 0 a | |
4308 | p |
|
2656 | p | |
4309 |
|
2657 | |||
4310 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' |
|
2658 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' | |
4311 | 2 aa b |
|
2659 | 2 aa b | |
4312 | p |
|
2660 | p | |
4313 | 1 |
|
2661 | 1 | |
4314 | p a |
|
2662 | p a | |
4315 | 0 a |
|
2663 | 0 a | |
4316 | p |
|
2664 | p | |
4317 |
|
2665 | |||
4318 | a revset item must be evaluated as an integer revision, not an offset from tip |
|
2666 | a revset item must be evaluated as an integer revision, not an offset from tip | |
4319 |
|
2667 | |||
4320 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' |
|
2668 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' | |
4321 | -1:000000000000 |
|
2669 | -1:000000000000 | |
4322 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' |
|
2670 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' | |
4323 | -1:000000000000 |
|
2671 | -1:000000000000 | |
4324 |
|
2672 | |||
4325 | join() should pick '{rev}' from revset items: |
|
2673 | join() should pick '{rev}' from revset items: | |
4326 |
|
2674 | |||
4327 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 |
|
2675 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 | |
4328 | 4, 5 |
|
2676 | 4, 5 | |
4329 |
|
2677 | |||
4330 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by |
|
2678 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by | |
4331 | default. join() should agree with the default formatting: |
|
2679 | default. join() should agree with the default formatting: | |
4332 |
|
2680 | |||
4333 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 |
|
2681 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 | |
4334 | 5:13207e5a10d9, 4:bbe44766e73d |
|
2682 | 5:13207e5a10d9, 4:bbe44766e73d | |
4335 |
|
2683 | |||
4336 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug |
|
2684 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug | |
4337 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, |
|
2685 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, | |
4338 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2686 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
4339 |
|
2687 | |||
4340 | Invalid arguments passed to revset() |
|
2688 | Invalid arguments passed to revset() | |
4341 |
|
2689 | |||
4342 | $ hg log -T '{revset("%whatever", 0)}\n' |
|
2690 | $ hg log -T '{revset("%whatever", 0)}\n' | |
4343 | hg: parse error: unexpected revspec format character w |
|
2691 | hg: parse error: unexpected revspec format character w | |
4344 | [255] |
|
2692 | [255] | |
4345 | $ hg log -T '{revset("%lwhatever", files)}\n' |
|
2693 | $ hg log -T '{revset("%lwhatever", files)}\n' | |
4346 | hg: parse error: unexpected revspec format character w |
|
2694 | hg: parse error: unexpected revspec format character w | |
4347 | [255] |
|
2695 | [255] | |
4348 | $ hg log -T '{revset("%s %s", 0)}\n' |
|
2696 | $ hg log -T '{revset("%s %s", 0)}\n' | |
4349 | hg: parse error: missing argument for revspec |
|
2697 | hg: parse error: missing argument for revspec | |
4350 | [255] |
|
2698 | [255] | |
4351 | $ hg log -T '{revset("", 0)}\n' |
|
2699 | $ hg log -T '{revset("", 0)}\n' | |
4352 | hg: parse error: too many revspec arguments specified |
|
2700 | hg: parse error: too many revspec arguments specified | |
4353 | [255] |
|
2701 | [255] | |
4354 | $ hg log -T '{revset("%s", 0, 1)}\n' |
|
2702 | $ hg log -T '{revset("%s", 0, 1)}\n' | |
4355 | hg: parse error: too many revspec arguments specified |
|
2703 | hg: parse error: too many revspec arguments specified | |
4356 | [255] |
|
2704 | [255] | |
4357 | $ hg log -T '{revset("%", 0)}\n' |
|
2705 | $ hg log -T '{revset("%", 0)}\n' | |
4358 | hg: parse error: incomplete revspec format character |
|
2706 | hg: parse error: incomplete revspec format character | |
4359 | [255] |
|
2707 | [255] | |
4360 | $ hg log -T '{revset("%l", 0)}\n' |
|
2708 | $ hg log -T '{revset("%l", 0)}\n' | |
4361 | hg: parse error: incomplete revspec format character |
|
2709 | hg: parse error: incomplete revspec format character | |
4362 | [255] |
|
2710 | [255] | |
4363 | $ hg log -T '{revset("%d", 'foo')}\n' |
|
2711 | $ hg log -T '{revset("%d", 'foo')}\n' | |
4364 | hg: parse error: invalid argument for revspec |
|
2712 | hg: parse error: invalid argument for revspec | |
4365 | [255] |
|
2713 | [255] | |
4366 | $ hg log -T '{revset("%ld", files)}\n' |
|
2714 | $ hg log -T '{revset("%ld", files)}\n' | |
4367 | hg: parse error: invalid argument for revspec |
|
2715 | hg: parse error: invalid argument for revspec | |
4368 | [255] |
|
2716 | [255] | |
4369 | $ hg log -T '{revset("%ls", 0)}\n' |
|
2717 | $ hg log -T '{revset("%ls", 0)}\n' | |
4370 | hg: parse error: invalid argument for revspec |
|
2718 | hg: parse error: invalid argument for revspec | |
4371 | [255] |
|
2719 | [255] | |
4372 | $ hg log -T '{revset("%b", 'foo')}\n' |
|
2720 | $ hg log -T '{revset("%b", 'foo')}\n' | |
4373 | hg: parse error: invalid argument for revspec |
|
2721 | hg: parse error: invalid argument for revspec | |
4374 | [255] |
|
2722 | [255] | |
4375 | $ hg log -T '{revset("%lb", files)}\n' |
|
2723 | $ hg log -T '{revset("%lb", files)}\n' | |
4376 | hg: parse error: invalid argument for revspec |
|
2724 | hg: parse error: invalid argument for revspec | |
4377 | [255] |
|
2725 | [255] | |
4378 | $ hg log -T '{revset("%r", 0)}\n' |
|
2726 | $ hg log -T '{revset("%r", 0)}\n' | |
4379 | hg: parse error: invalid argument for revspec |
|
2727 | hg: parse error: invalid argument for revspec | |
4380 | [255] |
|
2728 | [255] | |
4381 |
|
2729 | |||
4382 | Test 'originalnode' |
|
2730 | Test 'originalnode' | |
4383 |
|
2731 | |||
4384 | $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n' |
|
2732 | $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n' | |
4385 | 000000000000 bcc7ff960b8e |
|
2733 | 000000000000 bcc7ff960b8e | |
4386 | $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n' |
|
2734 | $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n' | |
4387 | a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1 |
|
2735 | a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1 | |
4388 |
|
2736 | |||
4389 | Test files function |
|
2737 | Test files function | |
4390 |
|
2738 | |||
4391 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" |
|
2739 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" | |
4392 | 2 |
|
2740 | 2 | |
4393 | a |
|
2741 | a | |
4394 | aa |
|
2742 | aa | |
4395 | b |
|
2743 | b | |
4396 | 1 |
|
2744 | 1 | |
4397 | a |
|
2745 | a | |
4398 | 0 |
|
2746 | 0 | |
4399 | a |
|
2747 | a | |
4400 |
|
2748 | |||
4401 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" |
|
2749 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" | |
4402 | 2 |
|
2750 | 2 | |
4403 | aa |
|
2751 | aa | |
4404 | 1 |
|
2752 | 1 | |
4405 |
|
2753 | |||
4406 | 0 |
|
2754 | 0 | |
4407 |
|
2755 | |||
4408 | $ hg rm a |
|
2756 | $ hg rm a | |
4409 | $ hg log -r "wdir()" -T "{rev}\n{join(files('*'), '\n')}\n" |
|
2757 | $ hg log -r "wdir()" -T "{rev}\n{join(files('*'), '\n')}\n" | |
4410 | 2147483647 |
|
2758 | 2147483647 | |
4411 | aa |
|
2759 | aa | |
4412 | b |
|
2760 | b | |
4413 | $ hg revert a |
|
2761 | $ hg revert a | |
4414 |
|
2762 | |||
4415 | Test relpath function |
|
2763 | Test relpath function | |
4416 |
|
2764 | |||
4417 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' |
|
2765 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' | |
4418 | a |
|
2766 | a | |
4419 | $ cd .. |
|
2767 | $ cd .. | |
4420 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' |
|
2768 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' | |
4421 | r/a |
|
2769 | r/a | |
4422 | $ cd r |
|
2770 | $ cd r | |
4423 |
|
2771 | |||
4424 | Test active bookmark templating |
|
2772 | Test active bookmark templating | |
4425 |
|
2773 | |||
4426 | $ hg book foo |
|
2774 | $ hg book foo | |
4427 | $ hg book bar |
|
2775 | $ hg book bar | |
4428 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" |
|
2776 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" | |
4429 | 2 bar* foo |
|
2777 | 2 bar* foo | |
4430 | 1 |
|
2778 | 1 | |
4431 | 0 |
|
2779 | 0 | |
4432 | $ hg log --template "{rev} {activebookmark}\n" |
|
2780 | $ hg log --template "{rev} {activebookmark}\n" | |
4433 | 2 bar |
|
2781 | 2 bar | |
4434 | 1 |
|
2782 | 1 | |
4435 | 0 |
|
2783 | 0 | |
4436 | $ hg bookmarks --inactive bar |
|
2784 | $ hg bookmarks --inactive bar | |
4437 | $ hg log --template "{rev} {activebookmark}\n" |
|
2785 | $ hg log --template "{rev} {activebookmark}\n" | |
4438 | 2 |
|
2786 | 2 | |
4439 | 1 |
|
2787 | 1 | |
4440 | 0 |
|
2788 | 0 | |
4441 | $ hg book -r1 baz |
|
2789 | $ hg book -r1 baz | |
4442 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" |
|
2790 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" | |
4443 | 2 bar foo |
|
2791 | 2 bar foo | |
4444 | 1 baz |
|
2792 | 1 baz | |
4445 | 0 |
|
2793 | 0 | |
4446 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" |
|
2794 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" | |
4447 | 2 t |
|
2795 | 2 t | |
4448 | 1 f |
|
2796 | 1 f | |
4449 | 0 f |
|
2797 | 0 f | |
4450 |
|
2798 | |||
4451 | Test namespaces dict |
|
2799 | Test namespaces dict | |
4452 |
|
2800 | |||
4453 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' |
|
2801 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' | |
4454 | 2 |
|
2802 | 2 | |
4455 | bookmarks color=bookmark builtin=True |
|
2803 | bookmarks color=bookmark builtin=True | |
4456 | bar,foo |
|
2804 | bar,foo | |
4457 | tags color=tag builtin=True |
|
2805 | tags color=tag builtin=True | |
4458 | tip |
|
2806 | tip | |
4459 | branches color=branch builtin=True |
|
2807 | branches color=branch builtin=True | |
4460 | text.{rev} |
|
2808 | text.{rev} | |
4461 | revnames color=revname builtin=False |
|
2809 | revnames color=revname builtin=False | |
4462 | r2 |
|
2810 | r2 | |
4463 |
|
2811 | |||
4464 | 1 |
|
2812 | 1 | |
4465 | bookmarks color=bookmark builtin=True |
|
2813 | bookmarks color=bookmark builtin=True | |
4466 | baz |
|
2814 | baz | |
4467 | tags color=tag builtin=True |
|
2815 | tags color=tag builtin=True | |
4468 |
|
2816 | |||
4469 | branches color=branch builtin=True |
|
2817 | branches color=branch builtin=True | |
4470 | text.{rev} |
|
2818 | text.{rev} | |
4471 | revnames color=revname builtin=False |
|
2819 | revnames color=revname builtin=False | |
4472 | r1 |
|
2820 | r1 | |
4473 |
|
2821 | |||
4474 | 0 |
|
2822 | 0 | |
4475 | bookmarks color=bookmark builtin=True |
|
2823 | bookmarks color=bookmark builtin=True | |
4476 |
|
2824 | |||
4477 | tags color=tag builtin=True |
|
2825 | tags color=tag builtin=True | |
4478 |
|
2826 | |||
4479 | branches color=branch builtin=True |
|
2827 | branches color=branch builtin=True | |
4480 | default |
|
2828 | default | |
4481 | revnames color=revname builtin=False |
|
2829 | revnames color=revname builtin=False | |
4482 | r0 |
|
2830 | r0 | |
4483 |
|
2831 | |||
4484 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' |
|
2832 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' | |
4485 | bookmarks: bar foo |
|
2833 | bookmarks: bar foo | |
4486 | tags: tip |
|
2834 | tags: tip | |
4487 | branches: text.{rev} |
|
2835 | branches: text.{rev} | |
4488 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' |
|
2836 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' | |
4489 | bookmarks: |
|
2837 | bookmarks: | |
4490 | bar |
|
2838 | bar | |
4491 | foo |
|
2839 | foo | |
4492 | tags: |
|
2840 | tags: | |
4493 | tip |
|
2841 | tip | |
4494 | branches: |
|
2842 | branches: | |
4495 | text.{rev} |
|
2843 | text.{rev} | |
4496 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' |
|
2844 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' | |
4497 | bar |
|
2845 | bar | |
4498 | foo |
|
2846 | foo | |
4499 | $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}' |
|
2847 | $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}' | |
4500 | bar |
|
2848 | bar | |
4501 | foo |
|
2849 | foo | |
4502 |
|
2850 | |||
4503 | Test stringify on sub expressions |
|
2851 | Test stringify on sub expressions | |
4504 |
|
2852 | |||
4505 | $ cd .. |
|
2853 | $ cd .. | |
4506 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' |
|
2854 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' | |
4507 | fourth, second, third |
|
2855 | fourth, second, third | |
4508 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' |
|
2856 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' | |
4509 | abc |
|
2857 | abc | |
4510 |
|
2858 | |||
4511 | Test splitlines |
|
2859 | Test splitlines | |
4512 |
|
2860 | |||
4513 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" |
|
2861 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" | |
4514 | @ foo Modify, add, remove, rename |
|
2862 | @ foo Modify, add, remove, rename | |
4515 | | |
|
2863 | | | |
4516 | o foo future |
|
2864 | o foo future | |
4517 | | |
|
2865 | | | |
4518 | o foo third |
|
2866 | o foo third | |
4519 | | |
|
2867 | | | |
4520 | o foo second |
|
2868 | o foo second | |
4521 |
|
2869 | |||
4522 | o foo merge |
|
2870 | o foo merge | |
4523 | |\ |
|
2871 | |\ | |
4524 | | o foo new head |
|
2872 | | o foo new head | |
4525 | | | |
|
2873 | | | | |
4526 | o | foo new branch |
|
2874 | o | foo new branch | |
4527 | |/ |
|
2875 | |/ | |
4528 | o foo no user, no domain |
|
2876 | o foo no user, no domain | |
4529 | | |
|
2877 | | | |
4530 | o foo no person |
|
2878 | o foo no person | |
4531 | | |
|
2879 | | | |
4532 | o foo other 1 |
|
2880 | o foo other 1 | |
4533 | | foo other 2 |
|
2881 | | foo other 2 | |
4534 | | foo |
|
2882 | | foo | |
4535 | | foo other 3 |
|
2883 | | foo other 3 | |
4536 | o foo line 1 |
|
2884 | o foo line 1 | |
4537 | foo line 2 |
|
2885 | foo line 2 | |
4538 |
|
2886 | |||
4539 | $ hg log -R a -r0 -T '{desc|splitlines}\n' |
|
2887 | $ hg log -R a -r0 -T '{desc|splitlines}\n' | |
4540 | line 1 line 2 |
|
2888 | line 1 line 2 | |
4541 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' |
|
2889 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' | |
4542 | line 1|line 2 |
|
2890 | line 1|line 2 | |
4543 |
|
2891 | |||
4544 | Test startswith |
|
2892 | Test startswith | |
4545 | $ hg log -Gv -R a --template "{startswith(desc)}" |
|
2893 | $ hg log -Gv -R a --template "{startswith(desc)}" | |
4546 | hg: parse error: startswith expects two arguments |
|
2894 | hg: parse error: startswith expects two arguments | |
4547 | [255] |
|
2895 | [255] | |
4548 |
|
2896 | |||
4549 | $ hg log -Gv -R a --template "{startswith('line', desc)}" |
|
2897 | $ hg log -Gv -R a --template "{startswith('line', desc)}" | |
4550 | @ |
|
2898 | @ | |
4551 | | |
|
2899 | | | |
4552 | o |
|
2900 | o | |
4553 | | |
|
2901 | | | |
4554 | o |
|
2902 | o | |
4555 | | |
|
2903 | | | |
4556 | o |
|
2904 | o | |
4557 |
|
2905 | |||
4558 | o |
|
2906 | o | |
4559 | |\ |
|
2907 | |\ | |
4560 | | o |
|
2908 | | o | |
4561 | | | |
|
2909 | | | | |
4562 | o | |
|
2910 | o | | |
4563 | |/ |
|
2911 | |/ | |
4564 | o |
|
2912 | o | |
4565 | | |
|
2913 | | | |
4566 | o |
|
2914 | o | |
4567 | | |
|
2915 | | | |
4568 | o |
|
2916 | o | |
4569 | | |
|
2917 | | | |
4570 | o line 1 |
|
2918 | o line 1 | |
4571 | line 2 |
|
2919 | line 2 | |
4572 |
|
2920 | |||
4573 | Test bad template with better error message |
|
2921 | Test bad template with better error message | |
4574 |
|
2922 | |||
4575 | $ hg log -Gv -R a --template '{desc|user()}' |
|
2923 | $ hg log -Gv -R a --template '{desc|user()}' | |
4576 | hg: parse error: expected a symbol, got 'func' |
|
2924 | hg: parse error: expected a symbol, got 'func' | |
4577 | [255] |
|
2925 | [255] | |
4578 |
|
2926 | |||
4579 | Test word function (including index out of bounds graceful failure) |
|
2927 | Test word function (including index out of bounds graceful failure) | |
4580 |
|
2928 | |||
4581 | $ hg log -Gv -R a --template "{word('1', desc)}" |
|
2929 | $ hg log -Gv -R a --template "{word('1', desc)}" | |
4582 | @ add, |
|
2930 | @ add, | |
4583 | | |
|
2931 | | | |
4584 | o |
|
2932 | o | |
4585 | | |
|
2933 | | | |
4586 | o |
|
2934 | o | |
4587 | | |
|
2935 | | | |
4588 | o |
|
2936 | o | |
4589 |
|
2937 | |||
4590 | o |
|
2938 | o | |
4591 | |\ |
|
2939 | |\ | |
4592 | | o head |
|
2940 | | o head | |
4593 | | | |
|
2941 | | | | |
4594 | o | branch |
|
2942 | o | branch | |
4595 | |/ |
|
2943 | |/ | |
4596 | o user, |
|
2944 | o user, | |
4597 | | |
|
2945 | | | |
4598 | o person |
|
2946 | o person | |
4599 | | |
|
2947 | | | |
4600 | o 1 |
|
2948 | o 1 | |
4601 | | |
|
2949 | | | |
4602 | o 1 |
|
2950 | o 1 | |
4603 |
|
2951 | |||
4604 |
|
2952 | |||
4605 | Test word third parameter used as splitter |
|
2953 | Test word third parameter used as splitter | |
4606 |
|
2954 | |||
4607 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" |
|
2955 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" | |
4608 | @ M |
|
2956 | @ M | |
4609 | | |
|
2957 | | | |
4610 | o future |
|
2958 | o future | |
4611 | | |
|
2959 | | | |
4612 | o third |
|
2960 | o third | |
4613 | | |
|
2961 | | | |
4614 | o sec |
|
2962 | o sec | |
4615 |
|
2963 | |||
4616 | o merge |
|
2964 | o merge | |
4617 | |\ |
|
2965 | |\ | |
4618 | | o new head |
|
2966 | | o new head | |
4619 | | | |
|
2967 | | | | |
4620 | o | new branch |
|
2968 | o | new branch | |
4621 | |/ |
|
2969 | |/ | |
4622 | o n |
|
2970 | o n | |
4623 | | |
|
2971 | | | |
4624 | o n |
|
2972 | o n | |
4625 | | |
|
2973 | | | |
4626 | o |
|
2974 | o | |
4627 | | |
|
2975 | | | |
4628 | o line 1 |
|
2976 | o line 1 | |
4629 | line 2 |
|
2977 | line 2 | |
4630 |
|
2978 | |||
4631 | Test word error messages for not enough and too many arguments |
|
2979 | Test word error messages for not enough and too many arguments | |
4632 |
|
2980 | |||
4633 | $ hg log -Gv -R a --template "{word('0')}" |
|
2981 | $ hg log -Gv -R a --template "{word('0')}" | |
4634 | hg: parse error: word expects two or three arguments, got 1 |
|
2982 | hg: parse error: word expects two or three arguments, got 1 | |
4635 | [255] |
|
2983 | [255] | |
4636 |
|
2984 | |||
4637 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" |
|
2985 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" | |
4638 | hg: parse error: word expects two or three arguments, got 7 |
|
2986 | hg: parse error: word expects two or three arguments, got 7 | |
4639 | [255] |
|
2987 | [255] | |
4640 |
|
2988 | |||
4641 | Test word for integer literal |
|
2989 | Test word for integer literal | |
4642 |
|
2990 | |||
4643 | $ hg log -R a --template "{word(2, desc)}\n" -r0 |
|
2991 | $ hg log -R a --template "{word(2, desc)}\n" -r0 | |
4644 | line |
|
2992 | line | |
4645 |
|
2993 | |||
4646 | Test word for invalid numbers |
|
2994 | Test word for invalid numbers | |
4647 |
|
2995 | |||
4648 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
2996 | $ hg log -Gv -R a --template "{word('a', desc)}" | |
4649 | hg: parse error: word expects an integer index |
|
2997 | hg: parse error: word expects an integer index | |
4650 | [255] |
|
2998 | [255] | |
4651 |
|
2999 | |||
4652 | Test word for out of range |
|
3000 | Test word for out of range | |
4653 |
|
3001 | |||
4654 | $ hg log -R a --template "{word(10000, desc)}" |
|
3002 | $ hg log -R a --template "{word(10000, desc)}" | |
4655 | $ hg log -R a --template "{word(-10000, desc)}" |
|
3003 | $ hg log -R a --template "{word(-10000, desc)}" | |
4656 |
|
3004 | |||
4657 | Test indent and not adding to empty lines |
|
3005 | Test indent and not adding to empty lines | |
4658 |
|
3006 | |||
4659 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a |
|
3007 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a | |
4660 | ----- |
|
3008 | ----- | |
4661 | > line 1 |
|
3009 | > line 1 | |
4662 | >> line 2 |
|
3010 | >> line 2 | |
4663 | ----- |
|
3011 | ----- | |
4664 | > other 1 |
|
3012 | > other 1 | |
4665 | >> other 2 |
|
3013 | >> other 2 | |
4666 |
|
3014 | |||
4667 | >> other 3 |
|
3015 | >> other 3 | |
4668 |
|
3016 | |||
4669 | Test with non-strings like dates |
|
3017 | Test with non-strings like dates | |
4670 |
|
3018 | |||
4671 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a |
|
3019 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a | |
4672 | 1200000.00 |
|
3020 | 1200000.00 | |
4673 | 1300000.00 |
|
3021 | 1300000.00 | |
4674 |
|
3022 | |||
4675 | Test broken string escapes: |
|
3023 | Test broken string escapes: | |
4676 |
|
3024 | |||
4677 | $ hg log -T "bogus\\" -R a |
|
3025 | $ hg log -T "bogus\\" -R a | |
4678 | hg: parse error: trailing \ in string |
|
3026 | hg: parse error: trailing \ in string | |
4679 | [255] |
|
3027 | [255] | |
4680 | $ hg log -T "\\xy" -R a |
|
3028 | $ hg log -T "\\xy" -R a | |
4681 | hg: parse error: invalid \x escape* (glob) |
|
3029 | hg: parse error: invalid \x escape* (glob) | |
4682 | [255] |
|
3030 | [255] | |
4683 |
|
3031 | |||
4684 | json filter should escape HTML tags so that the output can be embedded in hgweb: |
|
3032 | json filter should escape HTML tags so that the output can be embedded in hgweb: | |
4685 |
|
3033 | |||
4686 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 |
|
3034 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 | |
4687 | "\u003cfoo@example.org\u003e" |
|
3035 | "\u003cfoo@example.org\u003e" | |
4688 |
|
3036 | |||
4689 | Templater supports aliases of symbol and func() styles: |
|
3037 | Templater supports aliases of symbol and func() styles: | |
4690 |
|
3038 | |||
4691 | $ hg clone -q a aliases |
|
3039 | $ hg clone -q a aliases | |
4692 | $ cd aliases |
|
3040 | $ cd aliases | |
4693 | $ cat <<EOF >> .hg/hgrc |
|
3041 | $ cat <<EOF >> .hg/hgrc | |
4694 | > [templatealias] |
|
3042 | > [templatealias] | |
4695 | > r = rev |
|
3043 | > r = rev | |
4696 | > rn = "{r}:{node|short}" |
|
3044 | > rn = "{r}:{node|short}" | |
4697 | > status(c, files) = files % "{c} {file}\n" |
|
3045 | > status(c, files) = files % "{c} {file}\n" | |
4698 | > utcdate(d) = localdate(d, "UTC") |
|
3046 | > utcdate(d) = localdate(d, "UTC") | |
4699 | > EOF |
|
3047 | > EOF | |
4700 |
|
3048 | |||
4701 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' |
|
3049 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' | |
4702 | (template |
|
3050 | (template | |
4703 | (symbol 'rn') |
|
3051 | (symbol 'rn') | |
4704 | (string ' ') |
|
3052 | (string ' ') | |
4705 | (| |
|
3053 | (| | |
4706 | (func |
|
3054 | (func | |
4707 | (symbol 'utcdate') |
|
3055 | (symbol 'utcdate') | |
4708 | (symbol 'date')) |
|
3056 | (symbol 'date')) | |
4709 | (symbol 'isodate')) |
|
3057 | (symbol 'isodate')) | |
4710 | (string '\n')) |
|
3058 | (string '\n')) | |
4711 | * expanded: |
|
3059 | * expanded: | |
4712 | (template |
|
3060 | (template | |
4713 | (template |
|
3061 | (template | |
4714 | (symbol 'rev') |
|
3062 | (symbol 'rev') | |
4715 | (string ':') |
|
3063 | (string ':') | |
4716 | (| |
|
3064 | (| | |
4717 | (symbol 'node') |
|
3065 | (symbol 'node') | |
4718 | (symbol 'short'))) |
|
3066 | (symbol 'short'))) | |
4719 | (string ' ') |
|
3067 | (string ' ') | |
4720 | (| |
|
3068 | (| | |
4721 | (func |
|
3069 | (func | |
4722 | (symbol 'localdate') |
|
3070 | (symbol 'localdate') | |
4723 | (list |
|
3071 | (list | |
4724 | (symbol 'date') |
|
3072 | (symbol 'date') | |
4725 | (string 'UTC'))) |
|
3073 | (string 'UTC'))) | |
4726 | (symbol 'isodate')) |
|
3074 | (symbol 'isodate')) | |
4727 | (string '\n')) |
|
3075 | (string '\n')) | |
4728 | * keywords: date, node, rev |
|
3076 | * keywords: date, node, rev | |
4729 | * functions: isodate, localdate, short |
|
3077 | * functions: isodate, localdate, short | |
4730 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
3078 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4731 |
|
3079 | |||
4732 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' |
|
3080 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' | |
4733 | (template |
|
3081 | (template | |
4734 | (func |
|
3082 | (func | |
4735 | (symbol 'status') |
|
3083 | (symbol 'status') | |
4736 | (list |
|
3084 | (list | |
4737 | (string 'A') |
|
3085 | (string 'A') | |
4738 | (symbol 'file_adds')))) |
|
3086 | (symbol 'file_adds')))) | |
4739 | * expanded: |
|
3087 | * expanded: | |
4740 | (template |
|
3088 | (template | |
4741 | (% |
|
3089 | (% | |
4742 | (symbol 'file_adds') |
|
3090 | (symbol 'file_adds') | |
4743 | (template |
|
3091 | (template | |
4744 | (string 'A') |
|
3092 | (string 'A') | |
4745 | (string ' ') |
|
3093 | (string ' ') | |
4746 | (symbol 'file') |
|
3094 | (symbol 'file') | |
4747 | (string '\n')))) |
|
3095 | (string '\n')))) | |
4748 | * keywords: file, file_adds |
|
3096 | * keywords: file, file_adds | |
4749 | * functions: |
|
3097 | * functions: | |
4750 | A a |
|
3098 | A a | |
4751 |
|
3099 | |||
4752 | A unary function alias can be called as a filter: |
|
3100 | A unary function alias can be called as a filter: | |
4753 |
|
3101 | |||
4754 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' |
|
3102 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' | |
4755 | (template |
|
3103 | (template | |
4756 | (| |
|
3104 | (| | |
4757 | (| |
|
3105 | (| | |
4758 | (symbol 'date') |
|
3106 | (symbol 'date') | |
4759 | (symbol 'utcdate')) |
|
3107 | (symbol 'utcdate')) | |
4760 | (symbol 'isodate')) |
|
3108 | (symbol 'isodate')) | |
4761 | (string '\n')) |
|
3109 | (string '\n')) | |
4762 | * expanded: |
|
3110 | * expanded: | |
4763 | (template |
|
3111 | (template | |
4764 | (| |
|
3112 | (| | |
4765 | (func |
|
3113 | (func | |
4766 | (symbol 'localdate') |
|
3114 | (symbol 'localdate') | |
4767 | (list |
|
3115 | (list | |
4768 | (symbol 'date') |
|
3116 | (symbol 'date') | |
4769 | (string 'UTC'))) |
|
3117 | (string 'UTC'))) | |
4770 | (symbol 'isodate')) |
|
3118 | (symbol 'isodate')) | |
4771 | (string '\n')) |
|
3119 | (string '\n')) | |
4772 | * keywords: date |
|
3120 | * keywords: date | |
4773 | * functions: isodate, localdate |
|
3121 | * functions: isodate, localdate | |
4774 | 1970-01-12 13:46 +0000 |
|
3122 | 1970-01-12 13:46 +0000 | |
4775 |
|
3123 | |||
4776 | Aliases should be applied only to command arguments and templates in hgrc. |
|
3124 | Aliases should be applied only to command arguments and templates in hgrc. | |
4777 | Otherwise, our stock styles and web templates could be corrupted: |
|
3125 | Otherwise, our stock styles and web templates could be corrupted: | |
4778 |
|
3126 | |||
4779 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' |
|
3127 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' | |
4780 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
3128 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4781 |
|
3129 | |||
4782 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' |
|
3130 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' | |
4783 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
3131 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4784 |
|
3132 | |||
4785 | $ cat <<EOF > tmpl |
|
3133 | $ cat <<EOF > tmpl | |
4786 | > changeset = 'nothing expanded:{rn}\n' |
|
3134 | > changeset = 'nothing expanded:{rn}\n' | |
4787 | > EOF |
|
3135 | > EOF | |
4788 | $ hg log -r0 --style ./tmpl |
|
3136 | $ hg log -r0 --style ./tmpl | |
4789 | nothing expanded: |
|
3137 | nothing expanded: | |
4790 |
|
3138 | |||
4791 | Aliases in formatter: |
|
3139 | Aliases in formatter: | |
4792 |
|
3140 | |||
4793 | $ hg branches -T '{pad(branch, 7)} {rn}\n' |
|
3141 | $ hg branches -T '{pad(branch, 7)} {rn}\n' | |
4794 | default 6:d41e714fe50d |
|
3142 | default 6:d41e714fe50d | |
4795 | foo 4:bbe44766e73d |
|
3143 | foo 4:bbe44766e73d | |
4796 |
|
3144 | |||
4797 | Aliases should honor HGPLAIN: |
|
3145 | Aliases should honor HGPLAIN: | |
4798 |
|
3146 | |||
4799 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' |
|
3147 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' | |
4800 | nothing expanded: |
|
3148 | nothing expanded: | |
4801 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' |
|
3149 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' | |
4802 | 0:1e4e1b8f71e0 |
|
3150 | 0:1e4e1b8f71e0 | |
4803 |
|
3151 | |||
4804 | Unparsable alias: |
|
3152 | Unparsable alias: | |
4805 |
|
3153 | |||
4806 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' |
|
3154 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' | |
4807 | (template |
|
3155 | (template | |
4808 | (symbol 'bad')) |
|
3156 | (symbol 'bad')) | |
4809 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
3157 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4810 | [255] |
|
3158 | [255] | |
4811 | $ hg log --config templatealias.bad='x(' -T '{bad}' |
|
3159 | $ hg log --config templatealias.bad='x(' -T '{bad}' | |
4812 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
3160 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4813 | [255] |
|
3161 | [255] | |
4814 |
|
3162 | |||
4815 | $ cd .. |
|
3163 | $ cd .. | |
4816 |
|
3164 | |||
4817 | Set up repository for non-ascii encoding tests: |
|
3165 | Set up repository for non-ascii encoding tests: | |
4818 |
|
3166 | |||
4819 | $ hg init nonascii |
|
3167 | $ hg init nonascii | |
4820 | $ cd nonascii |
|
3168 | $ cd nonascii | |
4821 | $ $PYTHON <<EOF |
|
3169 | $ $PYTHON <<EOF | |
4822 | > open('latin1', 'wb').write(b'\xe9') |
|
3170 | > open('latin1', 'wb').write(b'\xe9') | |
4823 | > open('utf-8', 'wb').write(b'\xc3\xa9') |
|
3171 | > open('utf-8', 'wb').write(b'\xc3\xa9') | |
4824 | > EOF |
|
3172 | > EOF | |
4825 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
|
3173 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` | |
4826 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
|
3174 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 | |
4827 |
|
3175 | |||
4828 | json filter should try round-trip conversion to utf-8: |
|
3176 | json filter should try round-trip conversion to utf-8: | |
4829 |
|
3177 | |||
4830 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 |
|
3178 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 | |
4831 | "\u00e9" |
|
3179 | "\u00e9" | |
4832 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 |
|
3180 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 | |
4833 | "non-ascii branch: \u00e9" |
|
3181 | "non-ascii branch: \u00e9" | |
4834 |
|
3182 | |||
4835 | json filter should take input as utf-8 if it was converted from utf-8: |
|
3183 | json filter should take input as utf-8 if it was converted from utf-8: | |
4836 |
|
3184 | |||
4837 | $ HGENCODING=latin-1 hg log -T "{branch|json}\n" -r0 |
|
3185 | $ HGENCODING=latin-1 hg log -T "{branch|json}\n" -r0 | |
4838 | "\u00e9" |
|
3186 | "\u00e9" | |
4839 | $ HGENCODING=latin-1 hg log -T "{desc|json}\n" -r0 |
|
3187 | $ HGENCODING=latin-1 hg log -T "{desc|json}\n" -r0 | |
4840 | "non-ascii branch: \u00e9" |
|
3188 | "non-ascii branch: \u00e9" | |
4841 |
|
3189 | |||
4842 | json filter takes input as utf-8b: |
|
3190 | json filter takes input as utf-8b: | |
4843 |
|
3191 | |||
4844 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
|
3192 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 | |
4845 | "\u00e9" |
|
3193 | "\u00e9" | |
4846 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 |
|
3194 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 | |
4847 | "\udce9" |
|
3195 | "\udce9" | |
4848 |
|
3196 | |||
4849 | utf8 filter: |
|
3197 | utf8 filter: | |
4850 |
|
3198 | |||
4851 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 |
|
3199 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 | |
4852 | round-trip: c3a9 |
|
3200 | round-trip: c3a9 | |
4853 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
3201 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4854 | decoded: c3a9 |
|
3202 | decoded: c3a9 | |
4855 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
3203 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4856 | abort: decoding near * (glob) |
|
3204 | abort: decoding near * (glob) | |
4857 | [255] |
|
3205 | [255] | |
4858 | $ hg log -T "coerced to string: {rev|utf8}\n" -r0 |
|
3206 | $ hg log -T "coerced to string: {rev|utf8}\n" -r0 | |
4859 | coerced to string: 0 |
|
3207 | coerced to string: 0 | |
4860 |
|
3208 | |||
4861 | pad width: |
|
3209 | pad width: | |
4862 |
|
3210 | |||
4863 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" |
|
3211 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" | |
4864 | \xc3\xa9- (esc) |
|
3212 | \xc3\xa9- (esc) | |
4865 |
|
3213 | |||
4866 | $ cd .. |
|
3214 | $ cd .. | |
4867 |
|
3215 | |||
4868 | Test that template function in extension is registered as expected |
|
3216 | Test that template function in extension is registered as expected | |
4869 |
|
3217 | |||
4870 | $ cd a |
|
3218 | $ cd a | |
4871 |
|
3219 | |||
4872 | $ cat <<EOF > $TESTTMP/customfunc.py |
|
3220 | $ cat <<EOF > $TESTTMP/customfunc.py | |
4873 | > from mercurial import registrar |
|
3221 | > from mercurial import registrar | |
4874 | > |
|
3222 | > | |
4875 | > templatefunc = registrar.templatefunc() |
|
3223 | > templatefunc = registrar.templatefunc() | |
4876 | > |
|
3224 | > | |
4877 | > @templatefunc(b'custom()') |
|
3225 | > @templatefunc(b'custom()') | |
4878 | > def custom(context, mapping, args): |
|
3226 | > def custom(context, mapping, args): | |
4879 | > return b'custom' |
|
3227 | > return b'custom' | |
4880 | > EOF |
|
3228 | > EOF | |
4881 | $ cat <<EOF > .hg/hgrc |
|
3229 | $ cat <<EOF > .hg/hgrc | |
4882 | > [extensions] |
|
3230 | > [extensions] | |
4883 | > customfunc = $TESTTMP/customfunc.py |
|
3231 | > customfunc = $TESTTMP/customfunc.py | |
4884 | > EOF |
|
3232 | > EOF | |
4885 |
|
3233 | |||
4886 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true |
|
3234 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true | |
4887 | custom |
|
3235 | custom | |
4888 |
|
3236 | |||
4889 | $ cd .. |
|
3237 | $ cd .. | |
4890 |
|
3238 | |||
4891 | Test 'graphwidth' in 'hg log' on various topologies. The key here is that the |
|
3239 | Test 'graphwidth' in 'hg log' on various topologies. The key here is that the | |
4892 | printed graphwidths 3, 5, 7, etc. should all line up in their respective |
|
3240 | printed graphwidths 3, 5, 7, etc. should all line up in their respective | |
4893 | columns. We don't care about other aspects of the graph rendering here. |
|
3241 | columns. We don't care about other aspects of the graph rendering here. | |
4894 |
|
3242 | |||
4895 | $ hg init graphwidth |
|
3243 | $ hg init graphwidth | |
4896 | $ cd graphwidth |
|
3244 | $ cd graphwidth | |
4897 |
|
3245 | |||
4898 | $ wrappabletext="a a a a a a a a a a a a" |
|
3246 | $ wrappabletext="a a a a a a a a a a a a" | |
4899 |
|
3247 | |||
4900 | $ printf "first\n" > file |
|
3248 | $ printf "first\n" > file | |
4901 | $ hg add file |
|
3249 | $ hg add file | |
4902 | $ hg commit -m "$wrappabletext" |
|
3250 | $ hg commit -m "$wrappabletext" | |
4903 |
|
3251 | |||
4904 | $ printf "first\nsecond\n" > file |
|
3252 | $ printf "first\nsecond\n" > file | |
4905 | $ hg commit -m "$wrappabletext" |
|
3253 | $ hg commit -m "$wrappabletext" | |
4906 |
|
3254 | |||
4907 | $ hg checkout 0 |
|
3255 | $ hg checkout 0 | |
4908 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3256 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4909 | $ printf "third\nfirst\n" > file |
|
3257 | $ printf "third\nfirst\n" > file | |
4910 | $ hg commit -m "$wrappabletext" |
|
3258 | $ hg commit -m "$wrappabletext" | |
4911 | created new head |
|
3259 | created new head | |
4912 |
|
3260 | |||
4913 | $ hg merge |
|
3261 | $ hg merge | |
4914 | merging file |
|
3262 | merging file | |
4915 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
3263 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
4916 | (branch merge, don't forget to commit) |
|
3264 | (branch merge, don't forget to commit) | |
4917 |
|
3265 | |||
4918 | $ hg log --graph -T "{graphwidth}" |
|
3266 | $ hg log --graph -T "{graphwidth}" | |
4919 | @ 3 |
|
3267 | @ 3 | |
4920 | | |
|
3268 | | | |
4921 | | @ 5 |
|
3269 | | @ 5 | |
4922 | |/ |
|
3270 | |/ | |
4923 | o 3 |
|
3271 | o 3 | |
4924 |
|
3272 | |||
4925 | $ hg commit -m "$wrappabletext" |
|
3273 | $ hg commit -m "$wrappabletext" | |
4926 |
|
3274 | |||
4927 | $ hg log --graph -T "{graphwidth}" |
|
3275 | $ hg log --graph -T "{graphwidth}" | |
4928 | @ 5 |
|
3276 | @ 5 | |
4929 | |\ |
|
3277 | |\ | |
4930 | | o 5 |
|
3278 | | o 5 | |
4931 | | | |
|
3279 | | | | |
4932 | o | 5 |
|
3280 | o | 5 | |
4933 | |/ |
|
3281 | |/ | |
4934 | o 3 |
|
3282 | o 3 | |
4935 |
|
3283 | |||
4936 |
|
3284 | |||
4937 | $ hg checkout 0 |
|
3285 | $ hg checkout 0 | |
4938 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3286 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4939 | $ printf "third\nfirst\nsecond\n" > file |
|
3287 | $ printf "third\nfirst\nsecond\n" > file | |
4940 | $ hg commit -m "$wrappabletext" |
|
3288 | $ hg commit -m "$wrappabletext" | |
4941 | created new head |
|
3289 | created new head | |
4942 |
|
3290 | |||
4943 | $ hg log --graph -T "{graphwidth}" |
|
3291 | $ hg log --graph -T "{graphwidth}" | |
4944 | @ 3 |
|
3292 | @ 3 | |
4945 | | |
|
3293 | | | |
4946 | | o 7 |
|
3294 | | o 7 | |
4947 | | |\ |
|
3295 | | |\ | |
4948 | +---o 7 |
|
3296 | +---o 7 | |
4949 | | | |
|
3297 | | | | |
4950 | | o 5 |
|
3298 | | o 5 | |
4951 | |/ |
|
3299 | |/ | |
4952 | o 3 |
|
3300 | o 3 | |
4953 |
|
3301 | |||
4954 |
|
3302 | |||
4955 | $ hg log --graph -T "{graphwidth}" -r 3 |
|
3303 | $ hg log --graph -T "{graphwidth}" -r 3 | |
4956 | o 5 |
|
3304 | o 5 | |
4957 | |\ |
|
3305 | |\ | |
4958 | ~ ~ |
|
3306 | ~ ~ | |
4959 |
|
3307 | |||
4960 | $ hg log --graph -T "{graphwidth}" -r 1 |
|
3308 | $ hg log --graph -T "{graphwidth}" -r 1 | |
4961 | o 3 |
|
3309 | o 3 | |
4962 | | |
|
3310 | | | |
4963 | ~ |
|
3311 | ~ | |
4964 |
|
3312 | |||
4965 | $ hg merge |
|
3313 | $ hg merge | |
4966 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3314 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4967 | (branch merge, don't forget to commit) |
|
3315 | (branch merge, don't forget to commit) | |
4968 | $ hg commit -m "$wrappabletext" |
|
3316 | $ hg commit -m "$wrappabletext" | |
4969 |
|
3317 | |||
4970 | $ printf "seventh\n" >> file |
|
3318 | $ printf "seventh\n" >> file | |
4971 | $ hg commit -m "$wrappabletext" |
|
3319 | $ hg commit -m "$wrappabletext" | |
4972 |
|
3320 | |||
4973 | $ hg log --graph -T "{graphwidth}" |
|
3321 | $ hg log --graph -T "{graphwidth}" | |
4974 | @ 3 |
|
3322 | @ 3 | |
4975 | | |
|
3323 | | | |
4976 | o 5 |
|
3324 | o 5 | |
4977 | |\ |
|
3325 | |\ | |
4978 | | o 5 |
|
3326 | | o 5 | |
4979 | | | |
|
3327 | | | | |
4980 | o | 7 |
|
3328 | o | 7 | |
4981 | |\ \ |
|
3329 | |\ \ | |
4982 | | o | 7 |
|
3330 | | o | 7 | |
4983 | | |/ |
|
3331 | | |/ | |
4984 | o / 5 |
|
3332 | o / 5 | |
4985 | |/ |
|
3333 | |/ | |
4986 | o 3 |
|
3334 | o 3 | |
4987 |
|
3335 | |||
4988 |
|
3336 | |||
4989 | The point of graphwidth is to allow wrapping that accounts for the space taken |
|
3337 | The point of graphwidth is to allow wrapping that accounts for the space taken | |
4990 | by the graph. |
|
3338 | by the graph. | |
4991 |
|
3339 | |||
4992 | $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}" |
|
3340 | $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}" | |
4993 | @ a a a a |
|
3341 | @ a a a a | |
4994 | | a a a a |
|
3342 | | a a a a | |
4995 | | a a a a |
|
3343 | | a a a a | |
4996 | o a a a |
|
3344 | o a a a | |
4997 | |\ a a a |
|
3345 | |\ a a a | |
4998 | | | a a a |
|
3346 | | | a a a | |
4999 | | | a a a |
|
3347 | | | a a a | |
5000 | | o a a a |
|
3348 | | o a a a | |
5001 | | | a a a |
|
3349 | | | a a a | |
5002 | | | a a a |
|
3350 | | | a a a | |
5003 | | | a a a |
|
3351 | | | a a a | |
5004 | o | a a |
|
3352 | o | a a | |
5005 | |\ \ a a |
|
3353 | |\ \ a a | |
5006 | | | | a a |
|
3354 | | | | a a | |
5007 | | | | a a |
|
3355 | | | | a a | |
5008 | | | | a a |
|
3356 | | | | a a | |
5009 | | | | a a |
|
3357 | | | | a a | |
5010 | | o | a a |
|
3358 | | o | a a | |
5011 | | |/ a a |
|
3359 | | |/ a a | |
5012 | | | a a |
|
3360 | | | a a | |
5013 | | | a a |
|
3361 | | | a a | |
5014 | | | a a |
|
3362 | | | a a | |
5015 | | | a a |
|
3363 | | | a a | |
5016 | o | a a a |
|
3364 | o | a a a | |
5017 | |/ a a a |
|
3365 | |/ a a a | |
5018 | | a a a |
|
3366 | | a a a | |
5019 | | a a a |
|
3367 | | a a a | |
5020 | o a a a a |
|
3368 | o a a a a | |
5021 | a a a a |
|
3369 | a a a a | |
5022 | a a a a |
|
3370 | a a a a | |
5023 |
|
3371 | |||
5024 | Something tricky happens when there are elided nodes; the next drawn row of |
|
3372 | Something tricky happens when there are elided nodes; the next drawn row of | |
5025 | edges can be more than one column wider, but the graph width only increases by |
|
3373 | edges can be more than one column wider, but the graph width only increases by | |
5026 | one column. The remaining columns are added in between the nodes. |
|
3374 | one column. The remaining columns are added in between the nodes. | |
5027 |
|
3375 | |||
5028 | $ hg log --graph -T "{graphwidth}" -r "0|2|4|5" |
|
3376 | $ hg log --graph -T "{graphwidth}" -r "0|2|4|5" | |
5029 | o 5 |
|
3377 | o 5 | |
5030 | |\ |
|
3378 | |\ | |
5031 | | \ |
|
3379 | | \ | |
5032 | | :\ |
|
3380 | | :\ | |
5033 | o : : 7 |
|
3381 | o : : 7 | |
5034 | :/ / |
|
3382 | :/ / | |
5035 | : o 5 |
|
3383 | : o 5 | |
5036 | :/ |
|
3384 | :/ | |
5037 | o 3 |
|
3385 | o 3 | |
5038 |
|
3386 | |||
5039 |
|
3387 | |||
5040 | $ cd .. |
|
3388 | $ cd .. | |
5041 |
|
3389 |
This diff has been collapsed as it changes many lines, (3289 lines changed) Show them Hide them | |||||
@@ -1,5041 +1,1760 b'' | |||||
|
1 | Test template map files and styles | |||
|
2 | ================================== | |||
|
3 | ||||
1 |
$ |
|
4 | $ hg init a | |
2 | $ cd a |
|
5 | $ cd a | |
3 | $ echo a > a |
|
6 | $ echo a > a | |
4 | $ hg add a |
|
7 | $ hg add a | |
5 | $ echo line 1 > b |
|
8 | $ echo line 1 > b | |
6 |
$ |
|
9 | $ echo line 2 >> b | |
7 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' |
|
10 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' | |
8 |
|
11 | |||
9 |
$ |
|
12 | $ hg add b | |
10 | $ echo other 1 > c |
|
13 | $ echo other 1 > c | |
11 |
$ |
|
14 | $ echo other 2 >> c | |
12 | $ echo >> c |
|
15 | $ echo >> c | |
13 | $ echo other 3 >> c |
|
16 | $ echo other 3 >> c | |
14 |
$ |
|
17 | $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>' | |
15 |
|
18 | |||
16 |
$ |
|
19 | $ hg add c | |
17 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' |
|
20 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' | |
18 |
$ |
|
21 | $ echo c >> c | |
19 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' |
|
22 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' | |
20 |
|
23 | |||
21 |
$ |
|
24 | $ echo foo > .hg/branch | |
22 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' |
|
25 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' | |
23 |
|
26 | |||
24 |
$ |
|
27 | $ hg co -q 3 | |
25 |
$ |
|
28 | $ echo other 4 >> d | |
26 | $ hg add d |
|
29 | $ hg add d | |
27 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' |
|
30 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' | |
28 |
|
31 | |||
29 |
$ |
|
32 | $ hg merge -q foo | |
30 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' |
|
33 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' | |
31 |
|
34 | |||
32 | Test arithmetic operators have the right precedence: |
|
|||
33 |
|
||||
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' |
|
|||
35 | 2020 1964 |
|
|||
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' |
|
|||
37 | 9860 5908 |
|
|||
38 |
|
||||
39 | Test division: |
|
|||
40 |
|
||||
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' |
|
|||
42 | (template |
|
|||
43 | (/ |
|
|||
44 | (integer '5') |
|
|||
45 | (integer '2')) |
|
|||
46 | (string ' ') |
|
|||
47 | (func |
|
|||
48 | (symbol 'mod') |
|
|||
49 | (list |
|
|||
50 | (integer '5') |
|
|||
51 | (integer '2'))) |
|
|||
52 | (string '\n')) |
|
|||
53 | * keywords: |
|
|||
54 | * functions: mod |
|
|||
55 | 2 1 |
|
|||
56 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' |
|
|||
57 | (template |
|
|||
58 | (/ |
|
|||
59 | (integer '5') |
|
|||
60 | (negate |
|
|||
61 | (integer '2'))) |
|
|||
62 | (string ' ') |
|
|||
63 | (func |
|
|||
64 | (symbol 'mod') |
|
|||
65 | (list |
|
|||
66 | (integer '5') |
|
|||
67 | (negate |
|
|||
68 | (integer '2')))) |
|
|||
69 | (string '\n')) |
|
|||
70 | * keywords: |
|
|||
71 | * functions: mod |
|
|||
72 | -3 -1 |
|
|||
73 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' |
|
|||
74 | (template |
|
|||
75 | (/ |
|
|||
76 | (negate |
|
|||
77 | (integer '5')) |
|
|||
78 | (integer '2')) |
|
|||
79 | (string ' ') |
|
|||
80 | (func |
|
|||
81 | (symbol 'mod') |
|
|||
82 | (list |
|
|||
83 | (negate |
|
|||
84 | (integer '5')) |
|
|||
85 | (integer '2'))) |
|
|||
86 | (string '\n')) |
|
|||
87 | * keywords: |
|
|||
88 | * functions: mod |
|
|||
89 | -3 1 |
|
|||
90 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' |
|
|||
91 | (template |
|
|||
92 | (/ |
|
|||
93 | (negate |
|
|||
94 | (integer '5')) |
|
|||
95 | (negate |
|
|||
96 | (integer '2'))) |
|
|||
97 | (string ' ') |
|
|||
98 | (func |
|
|||
99 | (symbol 'mod') |
|
|||
100 | (list |
|
|||
101 | (negate |
|
|||
102 | (integer '5')) |
|
|||
103 | (negate |
|
|||
104 | (integer '2')))) |
|
|||
105 | (string '\n')) |
|
|||
106 | * keywords: |
|
|||
107 | * functions: mod |
|
|||
108 | 2 -1 |
|
|||
109 |
|
||||
110 | Filters bind closer than arithmetic: |
|
|||
111 |
|
||||
112 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' |
|
|||
113 | (template |
|
|||
114 | (- |
|
|||
115 | (| |
|
|||
116 | (func |
|
|||
117 | (symbol 'revset') |
|
|||
118 | (string '.')) |
|
|||
119 | (symbol 'count')) |
|
|||
120 | (integer '1')) |
|
|||
121 | (string '\n')) |
|
|||
122 | * keywords: |
|
|||
123 | * functions: count, revset |
|
|||
124 | 0 |
|
|||
125 |
|
||||
126 | But negate binds closer still: |
|
|||
127 |
|
||||
128 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' |
|
|||
129 | (template |
|
|||
130 | (- |
|
|||
131 | (integer '1') |
|
|||
132 | (| |
|
|||
133 | (integer '3') |
|
|||
134 | (symbol 'stringify'))) |
|
|||
135 | (string '\n')) |
|
|||
136 | * keywords: |
|
|||
137 | * functions: stringify |
|
|||
138 | hg: parse error: arithmetic only defined on integers |
|
|||
139 | [255] |
|
|||
140 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' |
|
|||
141 | (template |
|
|||
142 | (| |
|
|||
143 | (negate |
|
|||
144 | (integer '3')) |
|
|||
145 | (symbol 'stringify')) |
|
|||
146 | (string '\n')) |
|
|||
147 | * keywords: |
|
|||
148 | * functions: stringify |
|
|||
149 | -3 |
|
|||
150 |
|
||||
151 | Filters bind as close as map operator: |
|
|||
152 |
|
||||
153 | $ hg debugtemplate -r0 -v '{desc|splitlines % "{line}\n"}' |
|
|||
154 | (template |
|
|||
155 | (% |
|
|||
156 | (| |
|
|||
157 | (symbol 'desc') |
|
|||
158 | (symbol 'splitlines')) |
|
|||
159 | (template |
|
|||
160 | (symbol 'line') |
|
|||
161 | (string '\n')))) |
|
|||
162 | * keywords: desc, line |
|
|||
163 | * functions: splitlines |
|
|||
164 | line 1 |
|
|||
165 | line 2 |
|
|||
166 |
|
||||
167 | Keyword arguments: |
|
|||
168 |
|
||||
169 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' |
|
|||
170 | (template |
|
|||
171 | (keyvalue |
|
|||
172 | (symbol 'foo') |
|
|||
173 | (| |
|
|||
174 | (symbol 'bar') |
|
|||
175 | (symbol 'baz')))) |
|
|||
176 | * keywords: bar, foo |
|
|||
177 | * functions: baz |
|
|||
178 | hg: parse error: can't use a key-value pair in this context |
|
|||
179 | [255] |
|
|||
180 |
|
||||
181 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' |
|
|||
182 | foo |
|
|||
183 |
|
||||
184 | Call function which takes named arguments by filter syntax: |
|
|||
185 |
|
||||
186 | $ hg debugtemplate '{" "|separate}' |
|
|||
187 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' |
|
|||
188 | hg: parse error: unknown method 'list' |
|
|||
189 | [255] |
|
|||
190 |
|
||||
191 | Second branch starting at nullrev: |
|
35 | Second branch starting at nullrev: | |
192 |
|
36 | |||
193 | $ hg update null |
|
37 | $ hg update null | |
194 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
38 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
195 | $ echo second > second |
|
39 | $ echo second > second | |
196 | $ hg add second |
|
40 | $ hg add second | |
197 |
$ hg commit -m second -d '1000000 |
|
41 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' | |
198 | created new head |
|
42 | created new head | |
199 |
|
43 | |||
200 | $ echo third > third |
|
44 | $ echo third > third | |
201 | $ hg add third |
|
45 | $ hg add third | |
202 | $ hg mv second fourth |
|
46 | $ hg mv second fourth | |
203 | $ hg commit -m third -d "2020-01-01 10:01" |
|
47 | $ hg commit -m third -d "2020-01-01 10:01" | |
204 |
|
48 | |||
205 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . |
|
|||
206 | fourth (second) |
|
|||
207 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . |
|
|||
208 | second -> fourth |
|
|||
209 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 |
|
|||
210 | 8 t |
|
|||
211 | 7 f |
|
|||
212 |
|
||||
213 | Working-directory revision has special identifiers, though they are still |
|
|||
214 | experimental: |
|
|||
215 |
|
||||
216 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' |
|
|||
217 | 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
|||
218 |
|
||||
219 | Some keywords are invalid for working-directory revision, but they should |
|
|||
220 | never cause crash: |
|
|||
221 |
|
||||
222 | $ hg log -r 'wdir()' -T '{manifest}\n' |
|
|||
223 |
|
||||
224 |
|
||||
225 | Internal resources shouldn't be exposed (issue5699): |
|
|||
226 |
|
||||
227 | $ hg log -r. -T '{cache}{ctx}{repo}{revcache}{templ}{ui}' |
|
|||
228 |
|
||||
229 | Never crash on internal resource not available: |
|
|||
230 |
|
||||
231 | $ hg --cwd .. debugtemplate '{"c0bebeef"|shortest}\n' |
|
|||
232 | abort: template resource not available: repo |
|
|||
233 | [255] |
|
|||
234 |
|
||||
235 | $ hg config -T '{author}' |
|
|||
236 |
|
||||
237 | Quoting for ui.logtemplate |
|
|||
238 |
|
||||
239 | $ hg tip --config "ui.logtemplate={rev}\n" |
|
|||
240 | 8 |
|
|||
241 | $ hg tip --config "ui.logtemplate='{rev}\n'" |
|
|||
242 | 8 |
|
|||
243 | $ hg tip --config 'ui.logtemplate="{rev}\n"' |
|
|||
244 | 8 |
|
|||
245 | $ hg tip --config 'ui.logtemplate=n{rev}\n' |
|
|||
246 | n8 |
|
|||
247 |
|
||||
248 | Make sure user/global hgrc does not affect tests |
|
49 | Make sure user/global hgrc does not affect tests | |
249 |
|
50 | |||
250 | $ echo '[ui]' > .hg/hgrc |
|
51 | $ echo '[ui]' > .hg/hgrc | |
251 | $ echo 'logtemplate =' >> .hg/hgrc |
|
52 | $ echo 'logtemplate =' >> .hg/hgrc | |
252 | $ echo 'style =' >> .hg/hgrc |
|
53 | $ echo 'style =' >> .hg/hgrc | |
253 |
|
54 | |||
254 | Add some simple styles to settings |
|
55 | Add some simple styles to settings | |
255 |
|
56 | |||
256 | $ cat <<'EOF' >> .hg/hgrc |
|
57 | $ cat <<'EOF' >> .hg/hgrc | |
257 | > [templates] |
|
58 | > [templates] | |
258 | > simple = "{rev}\n" |
|
59 | > simple = "{rev}\n" | |
259 | > simple2 = {rev}\n |
|
60 | > simple2 = {rev}\n | |
260 | > rev = "should not precede {rev} keyword\n" |
|
61 | > rev = "should not precede {rev} keyword\n" | |
261 | > EOF |
|
62 | > EOF | |
262 |
|
63 | |||
263 | $ hg log -l1 -Tsimple |
|
64 | $ hg log -l1 -Tsimple | |
264 | 8 |
|
65 | 8 | |
265 | $ hg log -l1 -Tsimple2 |
|
66 | $ hg log -l1 -Tsimple2 | |
266 | 8 |
|
67 | 8 | |
267 | $ hg log -l1 -Trev |
|
68 | $ hg log -l1 -Trev | |
268 | should not precede 8 keyword |
|
69 | should not precede 8 keyword | |
269 | $ hg log -l1 -T '{simple}' |
|
70 | $ hg log -l1 -T '{simple}' | |
270 | 8 |
|
71 | 8 | |
271 |
|
72 | |||
272 | Map file shouldn't see user templates: |
|
73 | Map file shouldn't see user templates: | |
273 |
|
74 | |||
274 | $ cat <<EOF > tmpl |
|
75 | $ cat <<EOF > tmpl | |
275 | > changeset = 'nothing expanded:{simple}\n' |
|
76 | > changeset = 'nothing expanded:{simple}\n' | |
276 | > EOF |
|
77 | > EOF | |
277 | $ hg log -l1 --style ./tmpl |
|
78 | $ hg log -l1 --style ./tmpl | |
278 | nothing expanded: |
|
79 | nothing expanded: | |
279 |
|
80 | |||
280 | Test templates and style maps in files: |
|
81 | Test templates and style maps in files: | |
281 |
|
82 | |||
282 | $ echo "{rev}" > tmpl |
|
83 | $ echo "{rev}" > tmpl | |
283 | $ hg log -l1 -T./tmpl |
|
84 | $ hg log -l1 -T./tmpl | |
284 | 8 |
|
85 | 8 | |
285 | $ hg log -l1 -Tblah/blah |
|
86 | $ hg log -l1 -Tblah/blah | |
286 | blah/blah (no-eol) |
|
87 | blah/blah (no-eol) | |
287 |
|
88 | |||
288 | $ printf 'changeset = "{rev}\\n"\n' > map-simple |
|
89 | $ printf 'changeset = "{rev}\\n"\n' > map-simple | |
289 | $ hg log -l1 -T./map-simple |
|
90 | $ hg log -l1 -T./map-simple | |
290 | 8 |
|
91 | 8 | |
291 |
|
92 | |||
292 | a map file may have [templates] and [templatealias] sections: |
|
93 | a map file may have [templates] and [templatealias] sections: | |
293 |
|
94 | |||
294 | $ cat <<'EOF' > map-simple |
|
95 | $ cat <<'EOF' > map-simple | |
295 | > [templates] |
|
96 | > [templates] | |
296 | > changeset = "{a}\n" |
|
97 | > changeset = "{a}\n" | |
297 | > [templatealias] |
|
98 | > [templatealias] | |
298 | > a = rev |
|
99 | > a = rev | |
299 | > EOF |
|
100 | > EOF | |
300 | $ hg log -l1 -T./map-simple |
|
101 | $ hg log -l1 -T./map-simple | |
301 | 8 |
|
102 | 8 | |
302 |
|
103 | |||
303 | so it can be included in hgrc |
|
104 | so it can be included in hgrc | |
304 |
|
105 | |||
305 | $ cat <<EOF > myhgrc |
|
106 | $ cat <<EOF > myhgrc | |
306 | > %include $HGRCPATH |
|
107 | > %include $HGRCPATH | |
307 | > %include map-simple |
|
108 | > %include map-simple | |
308 | > [templates] |
|
109 | > [templates] | |
309 | > foo = "{changeset}" |
|
110 | > foo = "{changeset}" | |
310 | > EOF |
|
111 | > EOF | |
311 | $ HGRCPATH=./myhgrc hg log -l1 -Tfoo |
|
112 | $ HGRCPATH=./myhgrc hg log -l1 -Tfoo | |
312 | 8 |
|
113 | 8 | |
313 | $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' |
|
114 | $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' | |
314 | 8 |
|
115 | 8 | |
315 |
|
116 | |||
316 | Test template map inheritance |
|
117 | Test template map inheritance | |
317 |
|
118 | |||
318 | $ echo "__base__ = map-cmdline.default" > map-simple |
|
119 | $ echo "__base__ = map-cmdline.default" > map-simple | |
319 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple |
|
120 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple | |
320 | $ hg log -l1 -T./map-simple |
|
121 | $ hg log -l1 -T./map-simple | |
321 | changeset: ***8*** |
|
122 | changeset: ***8*** | |
322 | tag: tip |
|
123 | tag: tip | |
323 | user: test |
|
124 | user: test | |
324 | date: Wed Jan 01 10:01:00 2020 +0000 |
|
125 | date: Wed Jan 01 10:01:00 2020 +0000 | |
325 | summary: third |
|
126 | summary: third | |
326 |
|
127 | |||
327 |
|
128 | |||
328 | Test docheader, docfooter and separator in template map |
|
129 | Test docheader, docfooter and separator in template map | |
329 |
|
130 | |||
330 | $ cat <<'EOF' > map-myjson |
|
131 | $ cat <<'EOF' > map-myjson | |
331 | > docheader = '\{\n' |
|
132 | > docheader = '\{\n' | |
332 | > docfooter = '\n}\n' |
|
133 | > docfooter = '\n}\n' | |
333 | > separator = ',\n' |
|
134 | > separator = ',\n' | |
334 | > changeset = ' {dict(rev, node|short)|json}' |
|
135 | > changeset = ' {dict(rev, node|short)|json}' | |
335 | > EOF |
|
136 | > EOF | |
336 | $ hg log -l2 -T./map-myjson |
|
137 | $ hg log -l2 -T./map-myjson | |
337 | { |
|
138 | { | |
338 | {"node": "95c24699272e", "rev": 8}, |
|
139 | {"node": "95c24699272e", "rev": 8}, | |
339 | {"node": "29114dbae42b", "rev": 7} |
|
140 | {"node": "29114dbae42b", "rev": 7} | |
340 | } |
|
141 | } | |
341 |
|
142 | |||
342 | Test docheader, docfooter and separator in [templates] section |
|
143 | Test docheader, docfooter and separator in [templates] section | |
343 |
|
144 | |||
344 | $ cat <<'EOF' >> .hg/hgrc |
|
145 | $ cat <<'EOF' >> .hg/hgrc | |
345 | > [templates] |
|
146 | > [templates] | |
346 | > myjson = ' {dict(rev, node|short)|json}' |
|
147 | > myjson = ' {dict(rev, node|short)|json}' | |
347 | > myjson:docheader = '\{\n' |
|
148 | > myjson:docheader = '\{\n' | |
348 | > myjson:docfooter = '\n}\n' |
|
149 | > myjson:docfooter = '\n}\n' | |
349 | > myjson:separator = ',\n' |
|
150 | > myjson:separator = ',\n' | |
350 | > :docheader = 'should not be selected as a docheader for literal templates\n' |
|
151 | > :docheader = 'should not be selected as a docheader for literal templates\n' | |
351 | > EOF |
|
152 | > EOF | |
352 | $ hg log -l2 -Tmyjson |
|
153 | $ hg log -l2 -Tmyjson | |
353 | { |
|
154 | { | |
354 | {"node": "95c24699272e", "rev": 8}, |
|
155 | {"node": "95c24699272e", "rev": 8}, | |
355 | {"node": "29114dbae42b", "rev": 7} |
|
156 | {"node": "29114dbae42b", "rev": 7} | |
356 | } |
|
157 | } | |
357 | $ hg log -l1 -T'{rev}\n' |
|
158 | $ hg log -l1 -T'{rev}\n' | |
358 | 8 |
|
159 | 8 | |
359 |
|
160 | |||
360 | Template should precede style option |
|
161 | Template should precede style option | |
361 |
|
162 | |||
362 | $ hg log -l1 --style default -T '{rev}\n' |
|
163 | $ hg log -l1 --style default -T '{rev}\n' | |
363 | 8 |
|
164 | 8 | |
364 |
|
165 | |||
365 | Add a commit with empty description, to ensure that the templates |
|
166 | Add a commit with empty description, to ensure that the templates | |
366 | below will omit the description line. |
|
167 | below will omit the description line. | |
367 |
|
168 | |||
368 | $ echo c >> c |
|
169 | $ echo c >> c | |
369 | $ hg add c |
|
170 | $ hg add c | |
370 | $ hg commit -qm ' ' |
|
171 | $ hg commit -qm ' ' | |
371 |
|
172 | |||
372 | Default style is like normal output. Phases style should be the same |
|
173 | Default style is like normal output. Phases style should be the same | |
373 | as default style, except for extra phase lines. |
|
174 | as default style, except for extra phase lines. | |
374 |
|
175 | |||
375 | $ hg log > log.out |
|
176 | $ hg log > log.out | |
376 | $ hg log --style default > style.out |
|
177 | $ hg log --style default > style.out | |
377 | $ cmp log.out style.out || diff -u log.out style.out |
|
178 | $ cmp log.out style.out || diff -u log.out style.out | |
378 | $ hg log -T phases > phases.out |
|
179 | $ hg log -T phases > phases.out | |
379 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
180 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
380 | +phase: draft |
|
181 | +phase: draft | |
381 | +phase: draft |
|
182 | +phase: draft | |
382 | +phase: draft |
|
183 | +phase: draft | |
383 | +phase: draft |
|
184 | +phase: draft | |
384 | +phase: draft |
|
185 | +phase: draft | |
385 | +phase: draft |
|
186 | +phase: draft | |
386 | +phase: draft |
|
187 | +phase: draft | |
387 | +phase: draft |
|
188 | +phase: draft | |
388 | +phase: draft |
|
189 | +phase: draft | |
389 | +phase: draft |
|
190 | +phase: draft | |
390 |
|
191 | |||
391 | $ hg log -v > log.out |
|
192 | $ hg log -v > log.out | |
392 | $ hg log -v --style default > style.out |
|
193 | $ hg log -v --style default > style.out | |
393 | $ cmp log.out style.out || diff -u log.out style.out |
|
194 | $ cmp log.out style.out || diff -u log.out style.out | |
394 | $ hg log -v -T phases > phases.out |
|
195 | $ hg log -v -T phases > phases.out | |
395 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
196 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
396 | +phase: draft |
|
197 | +phase: draft | |
397 | +phase: draft |
|
198 | +phase: draft | |
398 | +phase: draft |
|
199 | +phase: draft | |
399 | +phase: draft |
|
200 | +phase: draft | |
400 | +phase: draft |
|
201 | +phase: draft | |
401 | +phase: draft |
|
202 | +phase: draft | |
402 | +phase: draft |
|
203 | +phase: draft | |
403 | +phase: draft |
|
204 | +phase: draft | |
404 | +phase: draft |
|
205 | +phase: draft | |
405 | +phase: draft |
|
206 | +phase: draft | |
406 |
|
207 | |||
407 | $ hg log -q > log.out |
|
208 | $ hg log -q > log.out | |
408 | $ hg log -q --style default > style.out |
|
209 | $ hg log -q --style default > style.out | |
409 | $ cmp log.out style.out || diff -u log.out style.out |
|
210 | $ cmp log.out style.out || diff -u log.out style.out | |
410 | $ hg log -q -T phases > phases.out |
|
211 | $ hg log -q -T phases > phases.out | |
411 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
212 | $ cmp log.out phases.out || diff -u log.out phases.out | |
412 |
|
213 | |||
413 | $ hg log --debug > log.out |
|
214 | $ hg log --debug > log.out | |
414 | $ hg log --debug --style default > style.out |
|
215 | $ hg log --debug --style default > style.out | |
415 | $ cmp log.out style.out || diff -u log.out style.out |
|
216 | $ cmp log.out style.out || diff -u log.out style.out | |
416 | $ hg log --debug -T phases > phases.out |
|
217 | $ hg log --debug -T phases > phases.out | |
417 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
218 | $ cmp log.out phases.out || diff -u log.out phases.out | |
418 |
|
219 | |||
419 | Default style of working-directory revision should also be the same (but |
|
220 | Default style of working-directory revision should also be the same (but | |
420 | date may change while running tests): |
|
221 | date may change while running tests): | |
421 |
|
222 | |||
422 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out |
|
223 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out | |
423 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out |
|
224 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out | |
424 | $ cmp log.out style.out || diff -u log.out style.out |
|
225 | $ cmp log.out style.out || diff -u log.out style.out | |
425 |
|
226 | |||
426 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out |
|
227 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out | |
427 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out |
|
228 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out | |
428 | $ cmp log.out style.out || diff -u log.out style.out |
|
229 | $ cmp log.out style.out || diff -u log.out style.out | |
429 |
|
230 | |||
430 | $ hg log -r 'wdir()' -q > log.out |
|
231 | $ hg log -r 'wdir()' -q > log.out | |
431 | $ hg log -r 'wdir()' -q --style default > style.out |
|
232 | $ hg log -r 'wdir()' -q --style default > style.out | |
432 | $ cmp log.out style.out || diff -u log.out style.out |
|
233 | $ cmp log.out style.out || diff -u log.out style.out | |
433 |
|
234 | |||
434 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out |
|
235 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out | |
435 | $ hg log -r 'wdir()' --debug --style default \ |
|
236 | $ hg log -r 'wdir()' --debug --style default \ | |
436 | > | sed 's|^date:.*|date:|' > style.out |
|
237 | > | sed 's|^date:.*|date:|' > style.out | |
437 | $ cmp log.out style.out || diff -u log.out style.out |
|
238 | $ cmp log.out style.out || diff -u log.out style.out | |
438 |
|
239 | |||
439 | Default style should also preserve color information (issue2866): |
|
240 | Default style should also preserve color information (issue2866): | |
440 |
|
241 | |||
441 | $ cp $HGRCPATH $HGRCPATH-bak |
|
242 | $ cp $HGRCPATH $HGRCPATH-bak | |
442 | $ cat <<EOF >> $HGRCPATH |
|
243 | $ cat <<EOF >> $HGRCPATH | |
443 | > [extensions] |
|
244 | > [extensions] | |
444 | > color= |
|
245 | > color= | |
445 | > EOF |
|
246 | > EOF | |
446 |
|
247 | |||
447 | $ hg --color=debug log > log.out |
|
248 | $ hg --color=debug log > log.out | |
448 | $ hg --color=debug log --style default > style.out |
|
249 | $ hg --color=debug log --style default > style.out | |
449 | $ cmp log.out style.out || diff -u log.out style.out |
|
250 | $ cmp log.out style.out || diff -u log.out style.out | |
450 | $ hg --color=debug log -T phases > phases.out |
|
251 | $ hg --color=debug log -T phases > phases.out | |
451 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
252 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
452 | +[log.phase|phase: draft] |
|
253 | +[log.phase|phase: draft] | |
453 | +[log.phase|phase: draft] |
|
254 | +[log.phase|phase: draft] | |
454 | +[log.phase|phase: draft] |
|
255 | +[log.phase|phase: draft] | |
455 | +[log.phase|phase: draft] |
|
256 | +[log.phase|phase: draft] | |
456 | +[log.phase|phase: draft] |
|
257 | +[log.phase|phase: draft] | |
457 | +[log.phase|phase: draft] |
|
258 | +[log.phase|phase: draft] | |
458 | +[log.phase|phase: draft] |
|
259 | +[log.phase|phase: draft] | |
459 | +[log.phase|phase: draft] |
|
260 | +[log.phase|phase: draft] | |
460 | +[log.phase|phase: draft] |
|
261 | +[log.phase|phase: draft] | |
461 | +[log.phase|phase: draft] |
|
262 | +[log.phase|phase: draft] | |
462 |
|
263 | |||
463 | $ hg --color=debug -v log > log.out |
|
264 | $ hg --color=debug -v log > log.out | |
464 | $ hg --color=debug -v log --style default > style.out |
|
265 | $ hg --color=debug -v log --style default > style.out | |
465 | $ cmp log.out style.out || diff -u log.out style.out |
|
266 | $ cmp log.out style.out || diff -u log.out style.out | |
466 | $ hg --color=debug -v log -T phases > phases.out |
|
267 | $ hg --color=debug -v log -T phases > phases.out | |
467 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
268 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
468 | +[log.phase|phase: draft] |
|
269 | +[log.phase|phase: draft] | |
469 | +[log.phase|phase: draft] |
|
270 | +[log.phase|phase: draft] | |
470 | +[log.phase|phase: draft] |
|
271 | +[log.phase|phase: draft] | |
471 | +[log.phase|phase: draft] |
|
272 | +[log.phase|phase: draft] | |
472 | +[log.phase|phase: draft] |
|
273 | +[log.phase|phase: draft] | |
473 | +[log.phase|phase: draft] |
|
274 | +[log.phase|phase: draft] | |
474 | +[log.phase|phase: draft] |
|
275 | +[log.phase|phase: draft] | |
475 | +[log.phase|phase: draft] |
|
276 | +[log.phase|phase: draft] | |
476 | +[log.phase|phase: draft] |
|
277 | +[log.phase|phase: draft] | |
477 | +[log.phase|phase: draft] |
|
278 | +[log.phase|phase: draft] | |
478 |
|
279 | |||
479 | $ hg --color=debug -q log > log.out |
|
280 | $ hg --color=debug -q log > log.out | |
480 | $ hg --color=debug -q log --style default > style.out |
|
281 | $ hg --color=debug -q log --style default > style.out | |
481 | $ cmp log.out style.out || diff -u log.out style.out |
|
282 | $ cmp log.out style.out || diff -u log.out style.out | |
482 | $ hg --color=debug -q log -T phases > phases.out |
|
283 | $ hg --color=debug -q log -T phases > phases.out | |
483 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
284 | $ cmp log.out phases.out || diff -u log.out phases.out | |
484 |
|
285 | |||
485 | $ hg --color=debug --debug log > log.out |
|
286 | $ hg --color=debug --debug log > log.out | |
486 | $ hg --color=debug --debug log --style default > style.out |
|
287 | $ hg --color=debug --debug log --style default > style.out | |
487 | $ cmp log.out style.out || diff -u log.out style.out |
|
288 | $ cmp log.out style.out || diff -u log.out style.out | |
488 | $ hg --color=debug --debug log -T phases > phases.out |
|
289 | $ hg --color=debug --debug log -T phases > phases.out | |
489 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
290 | $ cmp log.out phases.out || diff -u log.out phases.out | |
490 |
|
291 | |||
491 | $ mv $HGRCPATH-bak $HGRCPATH |
|
292 | $ mv $HGRCPATH-bak $HGRCPATH | |
492 |
|
293 | |||
493 | Remove commit with empty commit message, so as to not pollute further |
|
294 | Remove commit with empty commit message, so as to not pollute further | |
494 | tests. |
|
295 | tests. | |
495 |
|
296 | |||
496 | $ hg --config extensions.strip= strip -q . |
|
297 | $ hg --config extensions.strip= strip -q . | |
497 |
|
298 | |||
498 | Revision with no copies (used to print a traceback): |
|
299 | Revision with no copies (used to print a traceback): | |
499 |
|
300 | |||
500 | $ hg tip -v --template '\n' |
|
301 | $ hg tip -v --template '\n' | |
501 |
|
302 | |||
502 |
|
303 | |||
503 | Compact style works: |
|
304 | Compact style works: | |
504 |
|
305 | |||
505 | $ hg log -Tcompact |
|
306 | $ hg log -Tcompact | |
506 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
307 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
507 | third |
|
308 | third | |
508 |
|
309 | |||
509 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user |
|
310 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user | |
510 | second |
|
311 | second | |
511 |
|
312 | |||
512 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
313 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
513 | merge |
|
314 | merge | |
514 |
|
315 | |||
515 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
316 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
516 | new head |
|
317 | new head | |
517 |
|
318 | |||
518 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
319 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
519 | new branch |
|
320 | new branch | |
520 |
|
321 | |||
521 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
322 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
522 | no user, no domain |
|
323 | no user, no domain | |
523 |
|
324 | |||
524 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other |
|
325 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other | |
525 | no person |
|
326 | no person | |
526 |
|
327 | |||
527 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other |
|
328 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other | |
528 | other 1 |
|
329 | other 1 | |
529 |
|
330 | |||
530 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user |
|
331 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user | |
531 | line 1 |
|
332 | line 1 | |
532 |
|
333 | |||
533 |
|
334 | |||
534 | $ hg log -v --style compact |
|
335 | $ hg log -v --style compact | |
535 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
336 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
536 | third |
|
337 | third | |
537 |
|
338 | |||
538 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
339 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
539 | second |
|
340 | second | |
540 |
|
341 | |||
541 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
342 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
542 | merge |
|
343 | merge | |
543 |
|
344 | |||
544 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
345 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
545 | new head |
|
346 | new head | |
546 |
|
347 | |||
547 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
348 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
548 | new branch |
|
349 | new branch | |
549 |
|
350 | |||
550 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
351 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
551 | no user, no domain |
|
352 | no user, no domain | |
552 |
|
353 | |||
553 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
354 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
554 | no person |
|
355 | no person | |
555 |
|
356 | |||
556 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
357 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
557 | other 1 |
|
358 | other 1 | |
558 | other 2 |
|
359 | other 2 | |
559 |
|
360 | |||
560 | other 3 |
|
361 | other 3 | |
561 |
|
362 | |||
562 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
363 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
563 | line 1 |
|
364 | line 1 | |
564 | line 2 |
|
365 | line 2 | |
565 |
|
366 | |||
566 |
|
367 | |||
567 | $ hg log --debug --style compact |
|
368 | $ hg log --debug --style compact | |
568 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test |
|
369 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test | |
569 | third |
|
370 | third | |
570 |
|
371 | |||
571 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
372 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
572 | second |
|
373 | second | |
573 |
|
374 | |||
574 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
375 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
575 | merge |
|
376 | merge | |
576 |
|
377 | |||
577 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
378 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person | |
578 | new head |
|
379 | new head | |
579 |
|
380 | |||
580 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
381 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person | |
581 | new branch |
|
382 | new branch | |
582 |
|
383 | |||
583 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
384 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
584 | no user, no domain |
|
385 | no user, no domain | |
585 |
|
386 | |||
586 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
387 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
587 | no person |
|
388 | no person | |
588 |
|
389 | |||
589 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
390 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
590 | other 1 |
|
391 | other 1 | |
591 | other 2 |
|
392 | other 2 | |
592 |
|
393 | |||
593 | other 3 |
|
394 | other 3 | |
594 |
|
395 | |||
595 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
396 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
596 | line 1 |
|
397 | line 1 | |
597 | line 2 |
|
398 | line 2 | |
598 |
|
399 | |||
599 |
|
400 | |||
600 | Test xml styles: |
|
401 | Test xml styles: | |
601 |
|
402 | |||
602 | $ hg log --style xml -r 'not all()' |
|
403 | $ hg log --style xml -r 'not all()' | |
603 | <?xml version="1.0"?> |
|
404 | <?xml version="1.0"?> | |
604 | <log> |
|
405 | <log> | |
605 | </log> |
|
406 | </log> | |
606 |
|
407 | |||
607 | $ hg log --style xml |
|
408 | $ hg log --style xml | |
608 | <?xml version="1.0"?> |
|
409 | <?xml version="1.0"?> | |
609 | <log> |
|
410 | <log> | |
610 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
411 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
611 | <tag>tip</tag> |
|
412 | <tag>tip</tag> | |
612 | <author email="test">test</author> |
|
413 | <author email="test">test</author> | |
613 | <date>2020-01-01T10:01:00+00:00</date> |
|
414 | <date>2020-01-01T10:01:00+00:00</date> | |
614 | <msg xml:space="preserve">third</msg> |
|
415 | <msg xml:space="preserve">third</msg> | |
615 | </logentry> |
|
416 | </logentry> | |
616 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
417 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
617 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
418 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
618 | <author email="user@hostname">User Name</author> |
|
419 | <author email="user@hostname">User Name</author> | |
619 | <date>1970-01-12T13:46:40+00:00</date> |
|
420 | <date>1970-01-12T13:46:40+00:00</date> | |
620 | <msg xml:space="preserve">second</msg> |
|
421 | <msg xml:space="preserve">second</msg> | |
621 | </logentry> |
|
422 | </logentry> | |
622 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
423 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
623 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
424 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
624 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
425 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
625 | <author email="person">person</author> |
|
426 | <author email="person">person</author> | |
626 | <date>1970-01-18T08:40:01+00:00</date> |
|
427 | <date>1970-01-18T08:40:01+00:00</date> | |
627 | <msg xml:space="preserve">merge</msg> |
|
428 | <msg xml:space="preserve">merge</msg> | |
628 | </logentry> |
|
429 | </logentry> | |
629 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
430 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
630 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
431 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
631 | <author email="person">person</author> |
|
432 | <author email="person">person</author> | |
632 | <date>1970-01-18T08:40:00+00:00</date> |
|
433 | <date>1970-01-18T08:40:00+00:00</date> | |
633 | <msg xml:space="preserve">new head</msg> |
|
434 | <msg xml:space="preserve">new head</msg> | |
634 | </logentry> |
|
435 | </logentry> | |
635 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
436 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
636 | <branch>foo</branch> |
|
437 | <branch>foo</branch> | |
637 | <author email="person">person</author> |
|
438 | <author email="person">person</author> | |
638 | <date>1970-01-17T04:53:20+00:00</date> |
|
439 | <date>1970-01-17T04:53:20+00:00</date> | |
639 | <msg xml:space="preserve">new branch</msg> |
|
440 | <msg xml:space="preserve">new branch</msg> | |
640 | </logentry> |
|
441 | </logentry> | |
641 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
442 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
642 | <author email="person">person</author> |
|
443 | <author email="person">person</author> | |
643 | <date>1970-01-16T01:06:40+00:00</date> |
|
444 | <date>1970-01-16T01:06:40+00:00</date> | |
644 | <msg xml:space="preserve">no user, no domain</msg> |
|
445 | <msg xml:space="preserve">no user, no domain</msg> | |
645 | </logentry> |
|
446 | </logentry> | |
646 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
447 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
647 | <author email="other@place">other</author> |
|
448 | <author email="other@place">other</author> | |
648 | <date>1970-01-14T21:20:00+00:00</date> |
|
449 | <date>1970-01-14T21:20:00+00:00</date> | |
649 | <msg xml:space="preserve">no person</msg> |
|
450 | <msg xml:space="preserve">no person</msg> | |
650 | </logentry> |
|
451 | </logentry> | |
651 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
452 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
652 | <author email="other@place">A. N. Other</author> |
|
453 | <author email="other@place">A. N. Other</author> | |
653 | <date>1970-01-13T17:33:20+00:00</date> |
|
454 | <date>1970-01-13T17:33:20+00:00</date> | |
654 | <msg xml:space="preserve">other 1 |
|
455 | <msg xml:space="preserve">other 1 | |
655 | other 2 |
|
456 | other 2 | |
656 |
|
457 | |||
657 | other 3</msg> |
|
458 | other 3</msg> | |
658 | </logentry> |
|
459 | </logentry> | |
659 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
460 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
660 | <author email="user@hostname">User Name</author> |
|
461 | <author email="user@hostname">User Name</author> | |
661 | <date>1970-01-12T13:46:40+00:00</date> |
|
462 | <date>1970-01-12T13:46:40+00:00</date> | |
662 | <msg xml:space="preserve">line 1 |
|
463 | <msg xml:space="preserve">line 1 | |
663 | line 2</msg> |
|
464 | line 2</msg> | |
664 | </logentry> |
|
465 | </logentry> | |
665 | </log> |
|
466 | </log> | |
666 |
|
467 | |||
667 | $ hg log -v --style xml |
|
468 | $ hg log -v --style xml | |
668 | <?xml version="1.0"?> |
|
469 | <?xml version="1.0"?> | |
669 | <log> |
|
470 | <log> | |
670 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
471 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
671 | <tag>tip</tag> |
|
472 | <tag>tip</tag> | |
672 | <author email="test">test</author> |
|
473 | <author email="test">test</author> | |
673 | <date>2020-01-01T10:01:00+00:00</date> |
|
474 | <date>2020-01-01T10:01:00+00:00</date> | |
674 | <msg xml:space="preserve">third</msg> |
|
475 | <msg xml:space="preserve">third</msg> | |
675 | <paths> |
|
476 | <paths> | |
676 | <path action="A">fourth</path> |
|
477 | <path action="A">fourth</path> | |
677 | <path action="A">third</path> |
|
478 | <path action="A">third</path> | |
678 | <path action="R">second</path> |
|
479 | <path action="R">second</path> | |
679 | </paths> |
|
480 | </paths> | |
680 | <copies> |
|
481 | <copies> | |
681 | <copy source="second">fourth</copy> |
|
482 | <copy source="second">fourth</copy> | |
682 | </copies> |
|
483 | </copies> | |
683 | </logentry> |
|
484 | </logentry> | |
684 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
485 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
685 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
486 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
686 | <author email="user@hostname">User Name</author> |
|
487 | <author email="user@hostname">User Name</author> | |
687 | <date>1970-01-12T13:46:40+00:00</date> |
|
488 | <date>1970-01-12T13:46:40+00:00</date> | |
688 | <msg xml:space="preserve">second</msg> |
|
489 | <msg xml:space="preserve">second</msg> | |
689 | <paths> |
|
490 | <paths> | |
690 | <path action="A">second</path> |
|
491 | <path action="A">second</path> | |
691 | </paths> |
|
492 | </paths> | |
692 | </logentry> |
|
493 | </logentry> | |
693 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
494 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
694 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
495 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
695 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
496 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
696 | <author email="person">person</author> |
|
497 | <author email="person">person</author> | |
697 | <date>1970-01-18T08:40:01+00:00</date> |
|
498 | <date>1970-01-18T08:40:01+00:00</date> | |
698 | <msg xml:space="preserve">merge</msg> |
|
499 | <msg xml:space="preserve">merge</msg> | |
699 | <paths> |
|
500 | <paths> | |
700 | </paths> |
|
501 | </paths> | |
701 | </logentry> |
|
502 | </logentry> | |
702 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
503 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
703 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
504 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
704 | <author email="person">person</author> |
|
505 | <author email="person">person</author> | |
705 | <date>1970-01-18T08:40:00+00:00</date> |
|
506 | <date>1970-01-18T08:40:00+00:00</date> | |
706 | <msg xml:space="preserve">new head</msg> |
|
507 | <msg xml:space="preserve">new head</msg> | |
707 | <paths> |
|
508 | <paths> | |
708 | <path action="A">d</path> |
|
509 | <path action="A">d</path> | |
709 | </paths> |
|
510 | </paths> | |
710 | </logentry> |
|
511 | </logentry> | |
711 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
512 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
712 | <branch>foo</branch> |
|
513 | <branch>foo</branch> | |
713 | <author email="person">person</author> |
|
514 | <author email="person">person</author> | |
714 | <date>1970-01-17T04:53:20+00:00</date> |
|
515 | <date>1970-01-17T04:53:20+00:00</date> | |
715 | <msg xml:space="preserve">new branch</msg> |
|
516 | <msg xml:space="preserve">new branch</msg> | |
716 | <paths> |
|
517 | <paths> | |
717 | </paths> |
|
518 | </paths> | |
718 | </logentry> |
|
519 | </logentry> | |
719 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
520 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
720 | <author email="person">person</author> |
|
521 | <author email="person">person</author> | |
721 | <date>1970-01-16T01:06:40+00:00</date> |
|
522 | <date>1970-01-16T01:06:40+00:00</date> | |
722 | <msg xml:space="preserve">no user, no domain</msg> |
|
523 | <msg xml:space="preserve">no user, no domain</msg> | |
723 | <paths> |
|
524 | <paths> | |
724 | <path action="M">c</path> |
|
525 | <path action="M">c</path> | |
725 | </paths> |
|
526 | </paths> | |
726 | </logentry> |
|
527 | </logentry> | |
727 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
528 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
728 | <author email="other@place">other</author> |
|
529 | <author email="other@place">other</author> | |
729 | <date>1970-01-14T21:20:00+00:00</date> |
|
530 | <date>1970-01-14T21:20:00+00:00</date> | |
730 | <msg xml:space="preserve">no person</msg> |
|
531 | <msg xml:space="preserve">no person</msg> | |
731 | <paths> |
|
532 | <paths> | |
732 | <path action="A">c</path> |
|
533 | <path action="A">c</path> | |
733 | </paths> |
|
534 | </paths> | |
734 | </logentry> |
|
535 | </logentry> | |
735 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
536 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
736 | <author email="other@place">A. N. Other</author> |
|
537 | <author email="other@place">A. N. Other</author> | |
737 | <date>1970-01-13T17:33:20+00:00</date> |
|
538 | <date>1970-01-13T17:33:20+00:00</date> | |
738 | <msg xml:space="preserve">other 1 |
|
539 | <msg xml:space="preserve">other 1 | |
739 | other 2 |
|
540 | other 2 | |
740 |
|
541 | |||
741 | other 3</msg> |
|
542 | other 3</msg> | |
742 | <paths> |
|
543 | <paths> | |
743 | <path action="A">b</path> |
|
544 | <path action="A">b</path> | |
744 | </paths> |
|
545 | </paths> | |
745 | </logentry> |
|
546 | </logentry> | |
746 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
547 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
747 | <author email="user@hostname">User Name</author> |
|
548 | <author email="user@hostname">User Name</author> | |
748 | <date>1970-01-12T13:46:40+00:00</date> |
|
549 | <date>1970-01-12T13:46:40+00:00</date> | |
749 | <msg xml:space="preserve">line 1 |
|
550 | <msg xml:space="preserve">line 1 | |
750 | line 2</msg> |
|
551 | line 2</msg> | |
751 | <paths> |
|
552 | <paths> | |
752 | <path action="A">a</path> |
|
553 | <path action="A">a</path> | |
753 | </paths> |
|
554 | </paths> | |
754 | </logentry> |
|
555 | </logentry> | |
755 | </log> |
|
556 | </log> | |
756 |
|
557 | |||
757 | $ hg log --debug --style xml |
|
558 | $ hg log --debug --style xml | |
758 | <?xml version="1.0"?> |
|
559 | <?xml version="1.0"?> | |
759 | <log> |
|
560 | <log> | |
760 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
561 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
761 | <tag>tip</tag> |
|
562 | <tag>tip</tag> | |
762 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> |
|
563 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> | |
763 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
564 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
764 | <author email="test">test</author> |
|
565 | <author email="test">test</author> | |
765 | <date>2020-01-01T10:01:00+00:00</date> |
|
566 | <date>2020-01-01T10:01:00+00:00</date> | |
766 | <msg xml:space="preserve">third</msg> |
|
567 | <msg xml:space="preserve">third</msg> | |
767 | <paths> |
|
568 | <paths> | |
768 | <path action="A">fourth</path> |
|
569 | <path action="A">fourth</path> | |
769 | <path action="A">third</path> |
|
570 | <path action="A">third</path> | |
770 | <path action="R">second</path> |
|
571 | <path action="R">second</path> | |
771 | </paths> |
|
572 | </paths> | |
772 | <copies> |
|
573 | <copies> | |
773 | <copy source="second">fourth</copy> |
|
574 | <copy source="second">fourth</copy> | |
774 | </copies> |
|
575 | </copies> | |
775 | <extra key="branch">default</extra> |
|
576 | <extra key="branch">default</extra> | |
776 | </logentry> |
|
577 | </logentry> | |
777 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
578 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
778 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
579 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
779 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
580 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
780 | <author email="user@hostname">User Name</author> |
|
581 | <author email="user@hostname">User Name</author> | |
781 | <date>1970-01-12T13:46:40+00:00</date> |
|
582 | <date>1970-01-12T13:46:40+00:00</date> | |
782 | <msg xml:space="preserve">second</msg> |
|
583 | <msg xml:space="preserve">second</msg> | |
783 | <paths> |
|
584 | <paths> | |
784 | <path action="A">second</path> |
|
585 | <path action="A">second</path> | |
785 | </paths> |
|
586 | </paths> | |
786 | <extra key="branch">default</extra> |
|
587 | <extra key="branch">default</extra> | |
787 | </logentry> |
|
588 | </logentry> | |
788 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
589 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
789 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
590 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
790 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
591 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
791 | <author email="person">person</author> |
|
592 | <author email="person">person</author> | |
792 | <date>1970-01-18T08:40:01+00:00</date> |
|
593 | <date>1970-01-18T08:40:01+00:00</date> | |
793 | <msg xml:space="preserve">merge</msg> |
|
594 | <msg xml:space="preserve">merge</msg> | |
794 | <paths> |
|
595 | <paths> | |
795 | </paths> |
|
596 | </paths> | |
796 | <extra key="branch">default</extra> |
|
597 | <extra key="branch">default</extra> | |
797 | </logentry> |
|
598 | </logentry> | |
798 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
599 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
799 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
600 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
800 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
601 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
801 | <author email="person">person</author> |
|
602 | <author email="person">person</author> | |
802 | <date>1970-01-18T08:40:00+00:00</date> |
|
603 | <date>1970-01-18T08:40:00+00:00</date> | |
803 | <msg xml:space="preserve">new head</msg> |
|
604 | <msg xml:space="preserve">new head</msg> | |
804 | <paths> |
|
605 | <paths> | |
805 | <path action="A">d</path> |
|
606 | <path action="A">d</path> | |
806 | </paths> |
|
607 | </paths> | |
807 | <extra key="branch">default</extra> |
|
608 | <extra key="branch">default</extra> | |
808 | </logentry> |
|
609 | </logentry> | |
809 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
610 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
810 | <branch>foo</branch> |
|
611 | <branch>foo</branch> | |
811 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
612 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
812 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
613 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
813 | <author email="person">person</author> |
|
614 | <author email="person">person</author> | |
814 | <date>1970-01-17T04:53:20+00:00</date> |
|
615 | <date>1970-01-17T04:53:20+00:00</date> | |
815 | <msg xml:space="preserve">new branch</msg> |
|
616 | <msg xml:space="preserve">new branch</msg> | |
816 | <paths> |
|
617 | <paths> | |
817 | </paths> |
|
618 | </paths> | |
818 | <extra key="branch">foo</extra> |
|
619 | <extra key="branch">foo</extra> | |
819 | </logentry> |
|
620 | </logentry> | |
820 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
621 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
821 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> |
|
622 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> | |
822 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
623 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
823 | <author email="person">person</author> |
|
624 | <author email="person">person</author> | |
824 | <date>1970-01-16T01:06:40+00:00</date> |
|
625 | <date>1970-01-16T01:06:40+00:00</date> | |
825 | <msg xml:space="preserve">no user, no domain</msg> |
|
626 | <msg xml:space="preserve">no user, no domain</msg> | |
826 | <paths> |
|
627 | <paths> | |
827 | <path action="M">c</path> |
|
628 | <path action="M">c</path> | |
828 | </paths> |
|
629 | </paths> | |
829 | <extra key="branch">default</extra> |
|
630 | <extra key="branch">default</extra> | |
830 | </logentry> |
|
631 | </logentry> | |
831 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
632 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
832 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> |
|
633 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> | |
833 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
634 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
834 | <author email="other@place">other</author> |
|
635 | <author email="other@place">other</author> | |
835 | <date>1970-01-14T21:20:00+00:00</date> |
|
636 | <date>1970-01-14T21:20:00+00:00</date> | |
836 | <msg xml:space="preserve">no person</msg> |
|
637 | <msg xml:space="preserve">no person</msg> | |
837 | <paths> |
|
638 | <paths> | |
838 | <path action="A">c</path> |
|
639 | <path action="A">c</path> | |
839 | </paths> |
|
640 | </paths> | |
840 | <extra key="branch">default</extra> |
|
641 | <extra key="branch">default</extra> | |
841 | </logentry> |
|
642 | </logentry> | |
842 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
643 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
843 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> |
|
644 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> | |
844 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
645 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
845 | <author email="other@place">A. N. Other</author> |
|
646 | <author email="other@place">A. N. Other</author> | |
846 | <date>1970-01-13T17:33:20+00:00</date> |
|
647 | <date>1970-01-13T17:33:20+00:00</date> | |
847 | <msg xml:space="preserve">other 1 |
|
648 | <msg xml:space="preserve">other 1 | |
848 | other 2 |
|
649 | other 2 | |
849 |
|
650 | |||
850 | other 3</msg> |
|
651 | other 3</msg> | |
851 | <paths> |
|
652 | <paths> | |
852 | <path action="A">b</path> |
|
653 | <path action="A">b</path> | |
853 | </paths> |
|
654 | </paths> | |
854 | <extra key="branch">default</extra> |
|
655 | <extra key="branch">default</extra> | |
855 | </logentry> |
|
656 | </logentry> | |
856 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
657 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
857 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
658 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
858 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
659 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
859 | <author email="user@hostname">User Name</author> |
|
660 | <author email="user@hostname">User Name</author> | |
860 | <date>1970-01-12T13:46:40+00:00</date> |
|
661 | <date>1970-01-12T13:46:40+00:00</date> | |
861 | <msg xml:space="preserve">line 1 |
|
662 | <msg xml:space="preserve">line 1 | |
862 | line 2</msg> |
|
663 | line 2</msg> | |
863 | <paths> |
|
664 | <paths> | |
864 | <path action="A">a</path> |
|
665 | <path action="A">a</path> | |
865 | </paths> |
|
666 | </paths> | |
866 | <extra key="branch">default</extra> |
|
667 | <extra key="branch">default</extra> | |
867 | </logentry> |
|
668 | </logentry> | |
868 | </log> |
|
669 | </log> | |
869 |
|
670 | |||
870 |
|
671 | |||
871 | Test JSON style: |
|
672 | Test JSON style: | |
872 |
|
673 | |||
873 | $ hg log -k nosuch -Tjson |
|
674 | $ hg log -k nosuch -Tjson | |
874 | [ |
|
675 | [ | |
875 | ] |
|
676 | ] | |
876 |
|
677 | |||
877 | $ hg log -qr . -Tjson |
|
678 | $ hg log -qr . -Tjson | |
878 | [ |
|
679 | [ | |
879 | { |
|
680 | { | |
880 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
681 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
881 | "rev": 8 |
|
682 | "rev": 8 | |
882 | } |
|
683 | } | |
883 | ] |
|
684 | ] | |
884 |
|
685 | |||
885 | $ hg log -vpr . -Tjson --stat |
|
686 | $ hg log -vpr . -Tjson --stat | |
886 | [ |
|
687 | [ | |
887 | { |
|
688 | { | |
888 | "bookmarks": [], |
|
689 | "bookmarks": [], | |
889 | "branch": "default", |
|
690 | "branch": "default", | |
890 | "date": [1577872860, 0], |
|
691 | "date": [1577872860, 0], | |
891 | "desc": "third", |
|
692 | "desc": "third", | |
892 | "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", |
|
693 | "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", | |
893 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", |
|
694 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", | |
894 | "files": ["fourth", "second", "third"], |
|
695 | "files": ["fourth", "second", "third"], | |
895 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
696 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
896 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
697 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
897 | "phase": "draft", |
|
698 | "phase": "draft", | |
898 | "rev": 8, |
|
699 | "rev": 8, | |
899 | "tags": ["tip"], |
|
700 | "tags": ["tip"], | |
900 | "user": "test" |
|
701 | "user": "test" | |
901 | } |
|
702 | } | |
902 | ] |
|
703 | ] | |
903 |
|
704 | |||
904 | honor --git but not format-breaking diffopts |
|
705 | honor --git but not format-breaking diffopts | |
905 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson |
|
706 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson | |
906 | [ |
|
707 | [ | |
907 | { |
|
708 | { | |
908 | "bookmarks": [], |
|
709 | "bookmarks": [], | |
909 | "branch": "default", |
|
710 | "branch": "default", | |
910 | "date": [1577872860, 0], |
|
711 | "date": [1577872860, 0], | |
911 | "desc": "third", |
|
712 | "desc": "third", | |
912 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n", |
|
713 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n", | |
913 | "files": ["fourth", "second", "third"], |
|
714 | "files": ["fourth", "second", "third"], | |
914 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
715 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
915 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
716 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
916 | "phase": "draft", |
|
717 | "phase": "draft", | |
917 | "rev": 8, |
|
718 | "rev": 8, | |
918 | "tags": ["tip"], |
|
719 | "tags": ["tip"], | |
919 | "user": "test" |
|
720 | "user": "test" | |
920 | } |
|
721 | } | |
921 | ] |
|
722 | ] | |
922 |
|
723 | |||
923 | $ hg log -T json |
|
724 | $ hg log -T json | |
924 | [ |
|
725 | [ | |
925 | { |
|
726 | { | |
926 | "bookmarks": [], |
|
727 | "bookmarks": [], | |
927 | "branch": "default", |
|
728 | "branch": "default", | |
928 | "date": [1577872860, 0], |
|
729 | "date": [1577872860, 0], | |
929 | "desc": "third", |
|
730 | "desc": "third", | |
930 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
731 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
931 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
732 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
932 | "phase": "draft", |
|
733 | "phase": "draft", | |
933 | "rev": 8, |
|
734 | "rev": 8, | |
934 | "tags": ["tip"], |
|
735 | "tags": ["tip"], | |
935 | "user": "test" |
|
736 | "user": "test" | |
936 | }, |
|
737 | }, | |
937 | { |
|
738 | { | |
938 | "bookmarks": [], |
|
739 | "bookmarks": [], | |
939 | "branch": "default", |
|
740 | "branch": "default", | |
940 | "date": [1000000, 0], |
|
741 | "date": [1000000, 0], | |
941 | "desc": "second", |
|
742 | "desc": "second", | |
942 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
743 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
943 | "parents": ["0000000000000000000000000000000000000000"], |
|
744 | "parents": ["0000000000000000000000000000000000000000"], | |
944 | "phase": "draft", |
|
745 | "phase": "draft", | |
945 | "rev": 7, |
|
746 | "rev": 7, | |
946 | "tags": [], |
|
747 | "tags": [], | |
947 | "user": "User Name <user@hostname>" |
|
748 | "user": "User Name <user@hostname>" | |
948 | }, |
|
749 | }, | |
949 | { |
|
750 | { | |
950 | "bookmarks": [], |
|
751 | "bookmarks": [], | |
951 | "branch": "default", |
|
752 | "branch": "default", | |
952 | "date": [1500001, 0], |
|
753 | "date": [1500001, 0], | |
953 | "desc": "merge", |
|
754 | "desc": "merge", | |
954 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
755 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
955 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
756 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
956 | "phase": "draft", |
|
757 | "phase": "draft", | |
957 | "rev": 6, |
|
758 | "rev": 6, | |
958 | "tags": [], |
|
759 | "tags": [], | |
959 | "user": "person" |
|
760 | "user": "person" | |
960 | }, |
|
761 | }, | |
961 | { |
|
762 | { | |
962 | "bookmarks": [], |
|
763 | "bookmarks": [], | |
963 | "branch": "default", |
|
764 | "branch": "default", | |
964 | "date": [1500000, 0], |
|
765 | "date": [1500000, 0], | |
965 | "desc": "new head", |
|
766 | "desc": "new head", | |
966 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
767 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
967 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
768 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
968 | "phase": "draft", |
|
769 | "phase": "draft", | |
969 | "rev": 5, |
|
770 | "rev": 5, | |
970 | "tags": [], |
|
771 | "tags": [], | |
971 | "user": "person" |
|
772 | "user": "person" | |
972 | }, |
|
773 | }, | |
973 | { |
|
774 | { | |
974 | "bookmarks": [], |
|
775 | "bookmarks": [], | |
975 | "branch": "foo", |
|
776 | "branch": "foo", | |
976 | "date": [1400000, 0], |
|
777 | "date": [1400000, 0], | |
977 | "desc": "new branch", |
|
778 | "desc": "new branch", | |
978 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
779 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
979 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
780 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
980 | "phase": "draft", |
|
781 | "phase": "draft", | |
981 | "rev": 4, |
|
782 | "rev": 4, | |
982 | "tags": [], |
|
783 | "tags": [], | |
983 | "user": "person" |
|
784 | "user": "person" | |
984 | }, |
|
785 | }, | |
985 | { |
|
786 | { | |
986 | "bookmarks": [], |
|
787 | "bookmarks": [], | |
987 | "branch": "default", |
|
788 | "branch": "default", | |
988 | "date": [1300000, 0], |
|
789 | "date": [1300000, 0], | |
989 | "desc": "no user, no domain", |
|
790 | "desc": "no user, no domain", | |
990 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
791 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
991 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
792 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], | |
992 | "phase": "draft", |
|
793 | "phase": "draft", | |
993 | "rev": 3, |
|
794 | "rev": 3, | |
994 | "tags": [], |
|
795 | "tags": [], | |
995 | "user": "person" |
|
796 | "user": "person" | |
996 | }, |
|
797 | }, | |
997 | { |
|
798 | { | |
998 | "bookmarks": [], |
|
799 | "bookmarks": [], | |
999 | "branch": "default", |
|
800 | "branch": "default", | |
1000 | "date": [1200000, 0], |
|
801 | "date": [1200000, 0], | |
1001 | "desc": "no person", |
|
802 | "desc": "no person", | |
1002 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
803 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
1003 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
804 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], | |
1004 | "phase": "draft", |
|
805 | "phase": "draft", | |
1005 | "rev": 2, |
|
806 | "rev": 2, | |
1006 | "tags": [], |
|
807 | "tags": [], | |
1007 | "user": "other@place" |
|
808 | "user": "other@place" | |
1008 | }, |
|
809 | }, | |
1009 | { |
|
810 | { | |
1010 | "bookmarks": [], |
|
811 | "bookmarks": [], | |
1011 | "branch": "default", |
|
812 | "branch": "default", | |
1012 | "date": [1100000, 0], |
|
813 | "date": [1100000, 0], | |
1013 | "desc": "other 1\nother 2\n\nother 3", |
|
814 | "desc": "other 1\nother 2\n\nother 3", | |
1014 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
815 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
1015 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
816 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], | |
1016 | "phase": "draft", |
|
817 | "phase": "draft", | |
1017 | "rev": 1, |
|
818 | "rev": 1, | |
1018 | "tags": [], |
|
819 | "tags": [], | |
1019 | "user": "A. N. Other <other@place>" |
|
820 | "user": "A. N. Other <other@place>" | |
1020 | }, |
|
821 | }, | |
1021 | { |
|
822 | { | |
1022 | "bookmarks": [], |
|
823 | "bookmarks": [], | |
1023 | "branch": "default", |
|
824 | "branch": "default", | |
1024 | "date": [1000000, 0], |
|
825 | "date": [1000000, 0], | |
1025 | "desc": "line 1\nline 2", |
|
826 | "desc": "line 1\nline 2", | |
1026 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
827 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
1027 | "parents": ["0000000000000000000000000000000000000000"], |
|
828 | "parents": ["0000000000000000000000000000000000000000"], | |
1028 | "phase": "draft", |
|
829 | "phase": "draft", | |
1029 | "rev": 0, |
|
830 | "rev": 0, | |
1030 | "tags": [], |
|
831 | "tags": [], | |
1031 | "user": "User Name <user@hostname>" |
|
832 | "user": "User Name <user@hostname>" | |
1032 | } |
|
833 | } | |
1033 | ] |
|
834 | ] | |
1034 |
|
835 | |||
1035 | $ hg heads -v -Tjson |
|
836 | $ hg heads -v -Tjson | |
1036 | [ |
|
837 | [ | |
1037 | { |
|
838 | { | |
1038 | "bookmarks": [], |
|
839 | "bookmarks": [], | |
1039 | "branch": "default", |
|
840 | "branch": "default", | |
1040 | "date": [1577872860, 0], |
|
841 | "date": [1577872860, 0], | |
1041 | "desc": "third", |
|
842 | "desc": "third", | |
1042 | "files": ["fourth", "second", "third"], |
|
843 | "files": ["fourth", "second", "third"], | |
1043 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
844 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
1044 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
845 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
1045 | "phase": "draft", |
|
846 | "phase": "draft", | |
1046 | "rev": 8, |
|
847 | "rev": 8, | |
1047 | "tags": ["tip"], |
|
848 | "tags": ["tip"], | |
1048 | "user": "test" |
|
849 | "user": "test" | |
1049 | }, |
|
850 | }, | |
1050 | { |
|
851 | { | |
1051 | "bookmarks": [], |
|
852 | "bookmarks": [], | |
1052 | "branch": "default", |
|
853 | "branch": "default", | |
1053 | "date": [1500001, 0], |
|
854 | "date": [1500001, 0], | |
1054 | "desc": "merge", |
|
855 | "desc": "merge", | |
1055 | "files": [], |
|
856 | "files": [], | |
1056 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
857 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
1057 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
858 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
1058 | "phase": "draft", |
|
859 | "phase": "draft", | |
1059 | "rev": 6, |
|
860 | "rev": 6, | |
1060 | "tags": [], |
|
861 | "tags": [], | |
1061 | "user": "person" |
|
862 | "user": "person" | |
1062 | }, |
|
863 | }, | |
1063 | { |
|
864 | { | |
1064 | "bookmarks": [], |
|
865 | "bookmarks": [], | |
1065 | "branch": "foo", |
|
866 | "branch": "foo", | |
1066 | "date": [1400000, 0], |
|
867 | "date": [1400000, 0], | |
1067 | "desc": "new branch", |
|
868 | "desc": "new branch", | |
1068 | "files": [], |
|
869 | "files": [], | |
1069 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
870 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
1070 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
871 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1071 | "phase": "draft", |
|
872 | "phase": "draft", | |
1072 | "rev": 4, |
|
873 | "rev": 4, | |
1073 | "tags": [], |
|
874 | "tags": [], | |
1074 | "user": "person" |
|
875 | "user": "person" | |
1075 | } |
|
876 | } | |
1076 | ] |
|
877 | ] | |
1077 |
|
878 | |||
1078 | $ hg log --debug -Tjson |
|
879 | $ hg log --debug -Tjson | |
1079 | [ |
|
880 | [ | |
1080 | { |
|
881 | { | |
1081 | "added": ["fourth", "third"], |
|
882 | "added": ["fourth", "third"], | |
1082 | "bookmarks": [], |
|
883 | "bookmarks": [], | |
1083 | "branch": "default", |
|
884 | "branch": "default", | |
1084 | "date": [1577872860, 0], |
|
885 | "date": [1577872860, 0], | |
1085 | "desc": "third", |
|
886 | "desc": "third", | |
1086 | "extra": {"branch": "default"}, |
|
887 | "extra": {"branch": "default"}, | |
1087 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", |
|
888 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", | |
1088 | "modified": [], |
|
889 | "modified": [], | |
1089 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
890 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
1090 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
891 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
1091 | "phase": "draft", |
|
892 | "phase": "draft", | |
1092 | "removed": ["second"], |
|
893 | "removed": ["second"], | |
1093 | "rev": 8, |
|
894 | "rev": 8, | |
1094 | "tags": ["tip"], |
|
895 | "tags": ["tip"], | |
1095 | "user": "test" |
|
896 | "user": "test" | |
1096 | }, |
|
897 | }, | |
1097 | { |
|
898 | { | |
1098 | "added": ["second"], |
|
899 | "added": ["second"], | |
1099 | "bookmarks": [], |
|
900 | "bookmarks": [], | |
1100 | "branch": "default", |
|
901 | "branch": "default", | |
1101 | "date": [1000000, 0], |
|
902 | "date": [1000000, 0], | |
1102 | "desc": "second", |
|
903 | "desc": "second", | |
1103 | "extra": {"branch": "default"}, |
|
904 | "extra": {"branch": "default"}, | |
1104 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", |
|
905 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", | |
1105 | "modified": [], |
|
906 | "modified": [], | |
1106 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
907 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
1107 | "parents": ["0000000000000000000000000000000000000000"], |
|
908 | "parents": ["0000000000000000000000000000000000000000"], | |
1108 | "phase": "draft", |
|
909 | "phase": "draft", | |
1109 | "removed": [], |
|
910 | "removed": [], | |
1110 | "rev": 7, |
|
911 | "rev": 7, | |
1111 | "tags": [], |
|
912 | "tags": [], | |
1112 | "user": "User Name <user@hostname>" |
|
913 | "user": "User Name <user@hostname>" | |
1113 | }, |
|
914 | }, | |
1114 | { |
|
915 | { | |
1115 | "added": [], |
|
916 | "added": [], | |
1116 | "bookmarks": [], |
|
917 | "bookmarks": [], | |
1117 | "branch": "default", |
|
918 | "branch": "default", | |
1118 | "date": [1500001, 0], |
|
919 | "date": [1500001, 0], | |
1119 | "desc": "merge", |
|
920 | "desc": "merge", | |
1120 | "extra": {"branch": "default"}, |
|
921 | "extra": {"branch": "default"}, | |
1121 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
922 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1122 | "modified": [], |
|
923 | "modified": [], | |
1123 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
924 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
1124 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
925 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
1125 | "phase": "draft", |
|
926 | "phase": "draft", | |
1126 | "removed": [], |
|
927 | "removed": [], | |
1127 | "rev": 6, |
|
928 | "rev": 6, | |
1128 | "tags": [], |
|
929 | "tags": [], | |
1129 | "user": "person" |
|
930 | "user": "person" | |
1130 | }, |
|
931 | }, | |
1131 | { |
|
932 | { | |
1132 | "added": ["d"], |
|
933 | "added": ["d"], | |
1133 | "bookmarks": [], |
|
934 | "bookmarks": [], | |
1134 | "branch": "default", |
|
935 | "branch": "default", | |
1135 | "date": [1500000, 0], |
|
936 | "date": [1500000, 0], | |
1136 | "desc": "new head", |
|
937 | "desc": "new head", | |
1137 | "extra": {"branch": "default"}, |
|
938 | "extra": {"branch": "default"}, | |
1138 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
939 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1139 | "modified": [], |
|
940 | "modified": [], | |
1140 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
941 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
1141 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
942 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1142 | "phase": "draft", |
|
943 | "phase": "draft", | |
1143 | "removed": [], |
|
944 | "removed": [], | |
1144 | "rev": 5, |
|
945 | "rev": 5, | |
1145 | "tags": [], |
|
946 | "tags": [], | |
1146 | "user": "person" |
|
947 | "user": "person" | |
1147 | }, |
|
948 | }, | |
1148 | { |
|
949 | { | |
1149 | "added": [], |
|
950 | "added": [], | |
1150 | "bookmarks": [], |
|
951 | "bookmarks": [], | |
1151 | "branch": "foo", |
|
952 | "branch": "foo", | |
1152 | "date": [1400000, 0], |
|
953 | "date": [1400000, 0], | |
1153 | "desc": "new branch", |
|
954 | "desc": "new branch", | |
1154 | "extra": {"branch": "foo"}, |
|
955 | "extra": {"branch": "foo"}, | |
1155 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
956 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1156 | "modified": [], |
|
957 | "modified": [], | |
1157 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
958 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
1158 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
959 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1159 | "phase": "draft", |
|
960 | "phase": "draft", | |
1160 | "removed": [], |
|
961 | "removed": [], | |
1161 | "rev": 4, |
|
962 | "rev": 4, | |
1162 | "tags": [], |
|
963 | "tags": [], | |
1163 | "user": "person" |
|
964 | "user": "person" | |
1164 | }, |
|
965 | }, | |
1165 | { |
|
966 | { | |
1166 | "added": [], |
|
967 | "added": [], | |
1167 | "bookmarks": [], |
|
968 | "bookmarks": [], | |
1168 | "branch": "default", |
|
969 | "branch": "default", | |
1169 | "date": [1300000, 0], |
|
970 | "date": [1300000, 0], | |
1170 | "desc": "no user, no domain", |
|
971 | "desc": "no user, no domain", | |
1171 | "extra": {"branch": "default"}, |
|
972 | "extra": {"branch": "default"}, | |
1172 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
973 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1173 | "modified": ["c"], |
|
974 | "modified": ["c"], | |
1174 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
975 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
1175 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
976 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], | |
1176 | "phase": "draft", |
|
977 | "phase": "draft", | |
1177 | "removed": [], |
|
978 | "removed": [], | |
1178 | "rev": 3, |
|
979 | "rev": 3, | |
1179 | "tags": [], |
|
980 | "tags": [], | |
1180 | "user": "person" |
|
981 | "user": "person" | |
1181 | }, |
|
982 | }, | |
1182 | { |
|
983 | { | |
1183 | "added": ["c"], |
|
984 | "added": ["c"], | |
1184 | "bookmarks": [], |
|
985 | "bookmarks": [], | |
1185 | "branch": "default", |
|
986 | "branch": "default", | |
1186 | "date": [1200000, 0], |
|
987 | "date": [1200000, 0], | |
1187 | "desc": "no person", |
|
988 | "desc": "no person", | |
1188 | "extra": {"branch": "default"}, |
|
989 | "extra": {"branch": "default"}, | |
1189 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", |
|
990 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", | |
1190 | "modified": [], |
|
991 | "modified": [], | |
1191 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
992 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
1192 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
993 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], | |
1193 | "phase": "draft", |
|
994 | "phase": "draft", | |
1194 | "removed": [], |
|
995 | "removed": [], | |
1195 | "rev": 2, |
|
996 | "rev": 2, | |
1196 | "tags": [], |
|
997 | "tags": [], | |
1197 | "user": "other@place" |
|
998 | "user": "other@place" | |
1198 | }, |
|
999 | }, | |
1199 | { |
|
1000 | { | |
1200 | "added": ["b"], |
|
1001 | "added": ["b"], | |
1201 | "bookmarks": [], |
|
1002 | "bookmarks": [], | |
1202 | "branch": "default", |
|
1003 | "branch": "default", | |
1203 | "date": [1100000, 0], |
|
1004 | "date": [1100000, 0], | |
1204 | "desc": "other 1\nother 2\n\nother 3", |
|
1005 | "desc": "other 1\nother 2\n\nother 3", | |
1205 | "extra": {"branch": "default"}, |
|
1006 | "extra": {"branch": "default"}, | |
1206 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", |
|
1007 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", | |
1207 | "modified": [], |
|
1008 | "modified": [], | |
1208 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
1009 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
1209 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
1010 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], | |
1210 | "phase": "draft", |
|
1011 | "phase": "draft", | |
1211 | "removed": [], |
|
1012 | "removed": [], | |
1212 | "rev": 1, |
|
1013 | "rev": 1, | |
1213 | "tags": [], |
|
1014 | "tags": [], | |
1214 | "user": "A. N. Other <other@place>" |
|
1015 | "user": "A. N. Other <other@place>" | |
1215 | }, |
|
1016 | }, | |
1216 | { |
|
1017 | { | |
1217 | "added": ["a"], |
|
1018 | "added": ["a"], | |
1218 | "bookmarks": [], |
|
1019 | "bookmarks": [], | |
1219 | "branch": "default", |
|
1020 | "branch": "default", | |
1220 | "date": [1000000, 0], |
|
1021 | "date": [1000000, 0], | |
1221 | "desc": "line 1\nline 2", |
|
1022 | "desc": "line 1\nline 2", | |
1222 | "extra": {"branch": "default"}, |
|
1023 | "extra": {"branch": "default"}, | |
1223 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", |
|
1024 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", | |
1224 | "modified": [], |
|
1025 | "modified": [], | |
1225 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
1026 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
1226 | "parents": ["0000000000000000000000000000000000000000"], |
|
1027 | "parents": ["0000000000000000000000000000000000000000"], | |
1227 | "phase": "draft", |
|
1028 | "phase": "draft", | |
1228 | "removed": [], |
|
1029 | "removed": [], | |
1229 | "rev": 0, |
|
1030 | "rev": 0, | |
1230 | "tags": [], |
|
1031 | "tags": [], | |
1231 | "user": "User Name <user@hostname>" |
|
1032 | "user": "User Name <user@hostname>" | |
1232 | } |
|
1033 | } | |
1233 | ] |
|
1034 | ] | |
1234 |
|
1035 | |||
1235 | Error if style not readable: |
|
1036 | Error if style not readable: | |
1236 |
|
1037 | |||
1237 | #if unix-permissions no-root |
|
1038 | #if unix-permissions no-root | |
1238 | $ touch q |
|
1039 | $ touch q | |
1239 | $ chmod 0 q |
|
1040 | $ chmod 0 q | |
1240 | $ hg log --style ./q |
|
1041 | $ hg log --style ./q | |
1241 | abort: Permission denied: ./q |
|
1042 | abort: Permission denied: ./q | |
1242 | [255] |
|
1043 | [255] | |
1243 | #endif |
|
1044 | #endif | |
1244 |
|
1045 | |||
1245 | Error if no style: |
|
1046 | Error if no style: | |
1246 |
|
1047 | |||
1247 | $ hg log --style notexist |
|
1048 | $ hg log --style notexist | |
1248 | abort: style 'notexist' not found |
|
1049 | abort: style 'notexist' not found | |
1249 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
1050 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
1250 | [255] |
|
1051 | [255] | |
1251 |
|
1052 | |||
1252 | $ hg log -T list |
|
1053 | $ hg log -T list | |
1253 | available styles: bisect, changelog, compact, default, phases, show, status, xml |
|
1054 | available styles: bisect, changelog, compact, default, phases, show, status, xml | |
1254 | abort: specify a template |
|
1055 | abort: specify a template | |
1255 | [255] |
|
1056 | [255] | |
1256 |
|
1057 | |||
1257 | Error if style missing key: |
|
1058 | Error if style missing key: | |
1258 |
|
1059 | |||
1259 | $ echo 'q = q' > t |
|
1060 | $ echo 'q = q' > t | |
1260 | $ hg log --style ./t |
|
1061 | $ hg log --style ./t | |
1261 | abort: "changeset" not in template map |
|
1062 | abort: "changeset" not in template map | |
1262 | [255] |
|
1063 | [255] | |
1263 |
|
1064 | |||
1264 | Error if style missing value: |
|
1065 | Error if style missing value: | |
1265 |
|
1066 | |||
1266 | $ echo 'changeset =' > t |
|
1067 | $ echo 'changeset =' > t | |
1267 | $ hg log --style t |
|
1068 | $ hg log --style t | |
1268 | hg: parse error at t:1: missing value |
|
1069 | hg: parse error at t:1: missing value | |
1269 | [255] |
|
1070 | [255] | |
1270 |
|
1071 | |||
1271 | Error if include fails: |
|
1072 | Error if include fails: | |
1272 |
|
1073 | |||
1273 | $ echo 'changeset = q' >> t |
|
1074 | $ echo 'changeset = q' >> t | |
1274 | #if unix-permissions no-root |
|
1075 | #if unix-permissions no-root | |
1275 | $ hg log --style ./t |
|
1076 | $ hg log --style ./t | |
1276 | abort: template file ./q: Permission denied |
|
1077 | abort: template file ./q: Permission denied | |
1277 | [255] |
|
1078 | [255] | |
1278 | $ rm -f q |
|
1079 | $ rm -f q | |
1279 | #endif |
|
1080 | #endif | |
1280 |
|
1081 | |||
1281 | Include works: |
|
1082 | Include works: | |
1282 |
|
1083 | |||
1283 | $ echo '{rev}' > q |
|
1084 | $ echo '{rev}' > q | |
1284 | $ hg log --style ./t |
|
1085 | $ hg log --style ./t | |
1285 | 8 |
|
1086 | 8 | |
1286 | 7 |
|
1087 | 7 | |
1287 | 6 |
|
1088 | 6 | |
1288 | 5 |
|
1089 | 5 | |
1289 | 4 |
|
1090 | 4 | |
1290 | 3 |
|
1091 | 3 | |
1291 | 2 |
|
1092 | 2 | |
1292 | 1 |
|
1093 | 1 | |
1293 | 0 |
|
1094 | 0 | |
1294 |
|
1095 | |||
1295 | Check that recursive reference does not fall into RuntimeError (issue4758): |
|
|||
1296 |
|
||||
1297 | common mistake: |
|
|||
1298 |
|
||||
1299 | $ cat << EOF > issue4758 |
|
|||
1300 | > changeset = '{changeset}\n' |
|
|||
1301 | > EOF |
|
|||
1302 | $ hg log --style ./issue4758 |
|
|||
1303 | abort: recursive reference 'changeset' in template |
|
|||
1304 | [255] |
|
|||
1305 |
|
||||
1306 | circular reference: |
|
|||
1307 |
|
||||
1308 | $ cat << EOF > issue4758 |
|
|||
1309 | > changeset = '{foo}' |
|
|||
1310 | > foo = '{changeset}' |
|
|||
1311 | > EOF |
|
|||
1312 | $ hg log --style ./issue4758 |
|
|||
1313 | abort: recursive reference 'foo' in template |
|
|||
1314 | [255] |
|
|||
1315 |
|
||||
1316 | buildmap() -> gettemplate(), where no thunk was made: |
|
|||
1317 |
|
||||
1318 | $ cat << EOF > issue4758 |
|
|||
1319 | > changeset = '{files % changeset}\n' |
|
|||
1320 | > EOF |
|
|||
1321 | $ hg log --style ./issue4758 |
|
|||
1322 | abort: recursive reference 'changeset' in template |
|
|||
1323 | [255] |
|
|||
1324 |
|
||||
1325 | not a recursion if a keyword of the same name exists: |
|
|||
1326 |
|
||||
1327 | $ cat << EOF > issue4758 |
|
|||
1328 | > changeset = '{tags % rev}' |
|
|||
1329 | > rev = '{rev} {tag}\n' |
|
|||
1330 | > EOF |
|
|||
1331 | $ hg log --style ./issue4758 -r tip |
|
|||
1332 | 8 tip |
|
|||
1333 |
|
||||
1334 | Check that {phase} works correctly on parents: |
|
|||
1335 |
|
||||
1336 | $ cat << EOF > parentphase |
|
|||
1337 | > changeset_debug = '{rev} ({phase}):{parents}\n' |
|
|||
1338 | > parent = ' {rev} ({phase})' |
|
|||
1339 | > EOF |
|
|||
1340 | $ hg phase -r 5 --public |
|
1096 | $ hg phase -r 5 --public | |
1341 | $ hg phase -r 7 --secret --force |
|
1097 | $ hg phase -r 7 --secret --force | |
1342 | $ hg log --debug -G --style ./parentphase |
|
|||
1343 | @ 8 (secret): 7 (secret) -1 (public) |
|
|||
1344 | | |
|
|||
1345 | o 7 (secret): -1 (public) -1 (public) |
|
|||
1346 |
|
||||
1347 | o 6 (draft): 5 (public) 4 (draft) |
|
|||
1348 | |\ |
|
|||
1349 | | o 5 (public): 3 (public) -1 (public) |
|
|||
1350 | | | |
|
|||
1351 | o | 4 (draft): 3 (public) -1 (public) |
|
|||
1352 | |/ |
|
|||
1353 | o 3 (public): 2 (public) -1 (public) |
|
|||
1354 | | |
|
|||
1355 | o 2 (public): 1 (public) -1 (public) |
|
|||
1356 | | |
|
|||
1357 | o 1 (public): 0 (public) -1 (public) |
|
|||
1358 | | |
|
|||
1359 | o 0 (public): -1 (public) -1 (public) |
|
|||
1360 |
|
||||
1361 |
|
1098 | |||
1362 | Missing non-standard names give no error (backward compatibility): |
|
1099 | Missing non-standard names give no error (backward compatibility): | |
1363 |
|
1100 | |||
1364 | $ echo "changeset = '{c}'" > t |
|
1101 | $ echo "changeset = '{c}'" > t | |
1365 | $ hg log --style ./t |
|
1102 | $ hg log --style ./t | |
1366 |
|
1103 | |||
1367 | Defining non-standard name works: |
|
1104 | Defining non-standard name works: | |
1368 |
|
1105 | |||
1369 | $ cat <<EOF > t |
|
1106 | $ cat <<EOF > t | |
1370 | > changeset = '{c}' |
|
1107 | > changeset = '{c}' | |
1371 | > c = q |
|
1108 | > c = q | |
1372 | > EOF |
|
1109 | > EOF | |
1373 | $ hg log --style ./t |
|
1110 | $ hg log --style ./t | |
1374 | 8 |
|
1111 | 8 | |
1375 | 7 |
|
1112 | 7 | |
1376 | 6 |
|
1113 | 6 | |
1377 | 5 |
|
1114 | 5 | |
1378 | 4 |
|
1115 | 4 | |
1379 | 3 |
|
1116 | 3 | |
1380 | 2 |
|
1117 | 2 | |
1381 | 1 |
|
1118 | 1 | |
1382 | 0 |
|
1119 | 0 | |
1383 |
|
1120 | |||
1384 | ui.style works: |
|
1121 | ui.style works: | |
1385 |
|
1122 | |||
1386 | $ echo '[ui]' > .hg/hgrc |
|
1123 | $ echo '[ui]' > .hg/hgrc | |
1387 | $ echo 'style = t' >> .hg/hgrc |
|
1124 | $ echo 'style = t' >> .hg/hgrc | |
1388 | $ hg log |
|
1125 | $ hg log | |
1389 | 8 |
|
1126 | 8 | |
1390 | 7 |
|
1127 | 7 | |
1391 | 6 |
|
1128 | 6 | |
1392 | 5 |
|
1129 | 5 | |
1393 | 4 |
|
1130 | 4 | |
1394 | 3 |
|
1131 | 3 | |
1395 | 2 |
|
1132 | 2 | |
1396 | 1 |
|
1133 | 1 | |
1397 | 0 |
|
1134 | 0 | |
1398 |
|
1135 | |||
1399 |
|
||||
1400 | Issue338: |
|
1136 | Issue338: | |
1401 |
|
1137 | |||
1402 | $ hg log --style=changelog > changelog |
|
1138 | $ hg log --style=changelog > changelog | |
1403 |
|
1139 | |||
1404 | $ cat changelog |
|
1140 | $ cat changelog | |
1405 | 2020-01-01 test <test> |
|
1141 | 2020-01-01 test <test> | |
1406 |
|
1142 | |||
1407 | * fourth, second, third: |
|
1143 | * fourth, second, third: | |
1408 | third |
|
1144 | third | |
1409 | [95c24699272e] [tip] |
|
1145 | [95c24699272e] [tip] | |
1410 |
|
1146 | |||
1411 | 1970-01-12 User Name <user@hostname> |
|
1147 | 1970-01-12 User Name <user@hostname> | |
1412 |
|
1148 | |||
1413 | * second: |
|
1149 | * second: | |
1414 | second |
|
1150 | second | |
1415 | [29114dbae42b] |
|
1151 | [29114dbae42b] | |
1416 |
|
1152 | |||
1417 | 1970-01-18 person <person> |
|
1153 | 1970-01-18 person <person> | |
1418 |
|
1154 | |||
1419 | * merge |
|
1155 | * merge | |
1420 | [d41e714fe50d] |
|
1156 | [d41e714fe50d] | |
1421 |
|
1157 | |||
1422 | * d: |
|
1158 | * d: | |
1423 | new head |
|
1159 | new head | |
1424 | [13207e5a10d9] |
|
1160 | [13207e5a10d9] | |
1425 |
|
1161 | |||
1426 | 1970-01-17 person <person> |
|
1162 | 1970-01-17 person <person> | |
1427 |
|
1163 | |||
1428 | * new branch |
|
1164 | * new branch | |
1429 | [bbe44766e73d] <foo> |
|
1165 | [bbe44766e73d] <foo> | |
1430 |
|
1166 | |||
1431 | 1970-01-16 person <person> |
|
1167 | 1970-01-16 person <person> | |
1432 |
|
1168 | |||
1433 | * c: |
|
1169 | * c: | |
1434 | no user, no domain |
|
1170 | no user, no domain | |
1435 | [10e46f2dcbf4] |
|
1171 | [10e46f2dcbf4] | |
1436 |
|
1172 | |||
1437 | 1970-01-14 other <other@place> |
|
1173 | 1970-01-14 other <other@place> | |
1438 |
|
1174 | |||
1439 | * c: |
|
1175 | * c: | |
1440 | no person |
|
1176 | no person | |
1441 | [97054abb4ab8] |
|
1177 | [97054abb4ab8] | |
1442 |
|
1178 | |||
1443 | 1970-01-13 A. N. Other <other@place> |
|
1179 | 1970-01-13 A. N. Other <other@place> | |
1444 |
|
1180 | |||
1445 | * b: |
|
1181 | * b: | |
1446 | other 1 other 2 |
|
1182 | other 1 other 2 | |
1447 |
|
1183 | |||
1448 | other 3 |
|
1184 | other 3 | |
1449 | [b608e9d1a3f0] |
|
1185 | [b608e9d1a3f0] | |
1450 |
|
1186 | |||
1451 | 1970-01-12 User Name <user@hostname> |
|
1187 | 1970-01-12 User Name <user@hostname> | |
1452 |
|
1188 | |||
1453 | * a: |
|
1189 | * a: | |
1454 | line 1 line 2 |
|
1190 | line 1 line 2 | |
1455 | [1e4e1b8f71e0] |
|
1191 | [1e4e1b8f71e0] | |
1456 |
|
1192 | |||
1457 |
|
1193 | |||
1458 | Issue2130: xml output for 'hg heads' is malformed |
|
1194 | Issue2130: xml output for 'hg heads' is malformed | |
1459 |
|
1195 | |||
1460 | $ hg heads --style changelog |
|
1196 | $ hg heads --style changelog | |
1461 | 2020-01-01 test <test> |
|
1197 | 2020-01-01 test <test> | |
1462 |
|
1198 | |||
1463 | * fourth, second, third: |
|
1199 | * fourth, second, third: | |
1464 | third |
|
1200 | third | |
1465 | [95c24699272e] [tip] |
|
1201 | [95c24699272e] [tip] | |
1466 |
|
1202 | |||
1467 | 1970-01-18 person <person> |
|
1203 | 1970-01-18 person <person> | |
1468 |
|
1204 | |||
1469 | * merge |
|
1205 | * merge | |
1470 | [d41e714fe50d] |
|
1206 | [d41e714fe50d] | |
1471 |
|
1207 | |||
1472 | 1970-01-17 person <person> |
|
1208 | 1970-01-17 person <person> | |
1473 |
|
1209 | |||
1474 | * new branch |
|
1210 | * new branch | |
1475 | [bbe44766e73d] <foo> |
|
1211 | [bbe44766e73d] <foo> | |
1476 |
|
1212 | |||
1477 |
|
1213 | |||
1478 | Keys work: |
|
|||
1479 |
|
||||
1480 | $ for key in author branch branches date desc file_adds file_dels file_mods \ |
|
|||
1481 | > file_copies file_copies_switch files \ |
|
|||
1482 | > manifest node parents rev tags diffstat extras \ |
|
|||
1483 | > p1rev p2rev p1node p2node; do |
|
|||
1484 | > for mode in '' --verbose --debug; do |
|
|||
1485 | > hg log $mode --template "$key$mode: {$key}\n" |
|
|||
1486 | > done |
|
|||
1487 | > done |
|
|||
1488 | author: test |
|
|||
1489 | author: User Name <user@hostname> |
|
|||
1490 | author: person |
|
|||
1491 | author: person |
|
|||
1492 | author: person |
|
|||
1493 | author: person |
|
|||
1494 | author: other@place |
|
|||
1495 | author: A. N. Other <other@place> |
|
|||
1496 | author: User Name <user@hostname> |
|
|||
1497 | author--verbose: test |
|
|||
1498 | author--verbose: User Name <user@hostname> |
|
|||
1499 | author--verbose: person |
|
|||
1500 | author--verbose: person |
|
|||
1501 | author--verbose: person |
|
|||
1502 | author--verbose: person |
|
|||
1503 | author--verbose: other@place |
|
|||
1504 | author--verbose: A. N. Other <other@place> |
|
|||
1505 | author--verbose: User Name <user@hostname> |
|
|||
1506 | author--debug: test |
|
|||
1507 | author--debug: User Name <user@hostname> |
|
|||
1508 | author--debug: person |
|
|||
1509 | author--debug: person |
|
|||
1510 | author--debug: person |
|
|||
1511 | author--debug: person |
|
|||
1512 | author--debug: other@place |
|
|||
1513 | author--debug: A. N. Other <other@place> |
|
|||
1514 | author--debug: User Name <user@hostname> |
|
|||
1515 | branch: default |
|
|||
1516 | branch: default |
|
|||
1517 | branch: default |
|
|||
1518 | branch: default |
|
|||
1519 | branch: foo |
|
|||
1520 | branch: default |
|
|||
1521 | branch: default |
|
|||
1522 | branch: default |
|
|||
1523 | branch: default |
|
|||
1524 | branch--verbose: default |
|
|||
1525 | branch--verbose: default |
|
|||
1526 | branch--verbose: default |
|
|||
1527 | branch--verbose: default |
|
|||
1528 | branch--verbose: foo |
|
|||
1529 | branch--verbose: default |
|
|||
1530 | branch--verbose: default |
|
|||
1531 | branch--verbose: default |
|
|||
1532 | branch--verbose: default |
|
|||
1533 | branch--debug: default |
|
|||
1534 | branch--debug: default |
|
|||
1535 | branch--debug: default |
|
|||
1536 | branch--debug: default |
|
|||
1537 | branch--debug: foo |
|
|||
1538 | branch--debug: default |
|
|||
1539 | branch--debug: default |
|
|||
1540 | branch--debug: default |
|
|||
1541 | branch--debug: default |
|
|||
1542 | branches: |
|
|||
1543 | branches: |
|
|||
1544 | branches: |
|
|||
1545 | branches: |
|
|||
1546 | branches: foo |
|
|||
1547 | branches: |
|
|||
1548 | branches: |
|
|||
1549 | branches: |
|
|||
1550 | branches: |
|
|||
1551 | branches--verbose: |
|
|||
1552 | branches--verbose: |
|
|||
1553 | branches--verbose: |
|
|||
1554 | branches--verbose: |
|
|||
1555 | branches--verbose: foo |
|
|||
1556 | branches--verbose: |
|
|||
1557 | branches--verbose: |
|
|||
1558 | branches--verbose: |
|
|||
1559 | branches--verbose: |
|
|||
1560 | branches--debug: |
|
|||
1561 | branches--debug: |
|
|||
1562 | branches--debug: |
|
|||
1563 | branches--debug: |
|
|||
1564 | branches--debug: foo |
|
|||
1565 | branches--debug: |
|
|||
1566 | branches--debug: |
|
|||
1567 | branches--debug: |
|
|||
1568 | branches--debug: |
|
|||
1569 | date: 1577872860.00 |
|
|||
1570 | date: 1000000.00 |
|
|||
1571 | date: 1500001.00 |
|
|||
1572 | date: 1500000.00 |
|
|||
1573 | date: 1400000.00 |
|
|||
1574 | date: 1300000.00 |
|
|||
1575 | date: 1200000.00 |
|
|||
1576 | date: 1100000.00 |
|
|||
1577 | date: 1000000.00 |
|
|||
1578 | date--verbose: 1577872860.00 |
|
|||
1579 | date--verbose: 1000000.00 |
|
|||
1580 | date--verbose: 1500001.00 |
|
|||
1581 | date--verbose: 1500000.00 |
|
|||
1582 | date--verbose: 1400000.00 |
|
|||
1583 | date--verbose: 1300000.00 |
|
|||
1584 | date--verbose: 1200000.00 |
|
|||
1585 | date--verbose: 1100000.00 |
|
|||
1586 | date--verbose: 1000000.00 |
|
|||
1587 | date--debug: 1577872860.00 |
|
|||
1588 | date--debug: 1000000.00 |
|
|||
1589 | date--debug: 1500001.00 |
|
|||
1590 | date--debug: 1500000.00 |
|
|||
1591 | date--debug: 1400000.00 |
|
|||
1592 | date--debug: 1300000.00 |
|
|||
1593 | date--debug: 1200000.00 |
|
|||
1594 | date--debug: 1100000.00 |
|
|||
1595 | date--debug: 1000000.00 |
|
|||
1596 | desc: third |
|
|||
1597 | desc: second |
|
|||
1598 | desc: merge |
|
|||
1599 | desc: new head |
|
|||
1600 | desc: new branch |
|
|||
1601 | desc: no user, no domain |
|
|||
1602 | desc: no person |
|
|||
1603 | desc: other 1 |
|
|||
1604 | other 2 |
|
|||
1605 |
|
||||
1606 | other 3 |
|
|||
1607 | desc: line 1 |
|
|||
1608 | line 2 |
|
|||
1609 | desc--verbose: third |
|
|||
1610 | desc--verbose: second |
|
|||
1611 | desc--verbose: merge |
|
|||
1612 | desc--verbose: new head |
|
|||
1613 | desc--verbose: new branch |
|
|||
1614 | desc--verbose: no user, no domain |
|
|||
1615 | desc--verbose: no person |
|
|||
1616 | desc--verbose: other 1 |
|
|||
1617 | other 2 |
|
|||
1618 |
|
||||
1619 | other 3 |
|
|||
1620 | desc--verbose: line 1 |
|
|||
1621 | line 2 |
|
|||
1622 | desc--debug: third |
|
|||
1623 | desc--debug: second |
|
|||
1624 | desc--debug: merge |
|
|||
1625 | desc--debug: new head |
|
|||
1626 | desc--debug: new branch |
|
|||
1627 | desc--debug: no user, no domain |
|
|||
1628 | desc--debug: no person |
|
|||
1629 | desc--debug: other 1 |
|
|||
1630 | other 2 |
|
|||
1631 |
|
||||
1632 | other 3 |
|
|||
1633 | desc--debug: line 1 |
|
|||
1634 | line 2 |
|
|||
1635 | file_adds: fourth third |
|
|||
1636 | file_adds: second |
|
|||
1637 | file_adds: |
|
|||
1638 | file_adds: d |
|
|||
1639 | file_adds: |
|
|||
1640 | file_adds: |
|
|||
1641 | file_adds: c |
|
|||
1642 | file_adds: b |
|
|||
1643 | file_adds: a |
|
|||
1644 | file_adds--verbose: fourth third |
|
|||
1645 | file_adds--verbose: second |
|
|||
1646 | file_adds--verbose: |
|
|||
1647 | file_adds--verbose: d |
|
|||
1648 | file_adds--verbose: |
|
|||
1649 | file_adds--verbose: |
|
|||
1650 | file_adds--verbose: c |
|
|||
1651 | file_adds--verbose: b |
|
|||
1652 | file_adds--verbose: a |
|
|||
1653 | file_adds--debug: fourth third |
|
|||
1654 | file_adds--debug: second |
|
|||
1655 | file_adds--debug: |
|
|||
1656 | file_adds--debug: d |
|
|||
1657 | file_adds--debug: |
|
|||
1658 | file_adds--debug: |
|
|||
1659 | file_adds--debug: c |
|
|||
1660 | file_adds--debug: b |
|
|||
1661 | file_adds--debug: a |
|
|||
1662 | file_dels: second |
|
|||
1663 | file_dels: |
|
|||
1664 | file_dels: |
|
|||
1665 | file_dels: |
|
|||
1666 | file_dels: |
|
|||
1667 | file_dels: |
|
|||
1668 | file_dels: |
|
|||
1669 | file_dels: |
|
|||
1670 | file_dels: |
|
|||
1671 | file_dels--verbose: second |
|
|||
1672 | file_dels--verbose: |
|
|||
1673 | file_dels--verbose: |
|
|||
1674 | file_dels--verbose: |
|
|||
1675 | file_dels--verbose: |
|
|||
1676 | file_dels--verbose: |
|
|||
1677 | file_dels--verbose: |
|
|||
1678 | file_dels--verbose: |
|
|||
1679 | file_dels--verbose: |
|
|||
1680 | file_dels--debug: second |
|
|||
1681 | file_dels--debug: |
|
|||
1682 | file_dels--debug: |
|
|||
1683 | file_dels--debug: |
|
|||
1684 | file_dels--debug: |
|
|||
1685 | file_dels--debug: |
|
|||
1686 | file_dels--debug: |
|
|||
1687 | file_dels--debug: |
|
|||
1688 | file_dels--debug: |
|
|||
1689 | file_mods: |
|
|||
1690 | file_mods: |
|
|||
1691 | file_mods: |
|
|||
1692 | file_mods: |
|
|||
1693 | file_mods: |
|
|||
1694 | file_mods: c |
|
|||
1695 | file_mods: |
|
|||
1696 | file_mods: |
|
|||
1697 | file_mods: |
|
|||
1698 | file_mods--verbose: |
|
|||
1699 | file_mods--verbose: |
|
|||
1700 | file_mods--verbose: |
|
|||
1701 | file_mods--verbose: |
|
|||
1702 | file_mods--verbose: |
|
|||
1703 | file_mods--verbose: c |
|
|||
1704 | file_mods--verbose: |
|
|||
1705 | file_mods--verbose: |
|
|||
1706 | file_mods--verbose: |
|
|||
1707 | file_mods--debug: |
|
|||
1708 | file_mods--debug: |
|
|||
1709 | file_mods--debug: |
|
|||
1710 | file_mods--debug: |
|
|||
1711 | file_mods--debug: |
|
|||
1712 | file_mods--debug: c |
|
|||
1713 | file_mods--debug: |
|
|||
1714 | file_mods--debug: |
|
|||
1715 | file_mods--debug: |
|
|||
1716 | file_copies: fourth (second) |
|
|||
1717 | file_copies: |
|
|||
1718 | file_copies: |
|
|||
1719 | file_copies: |
|
|||
1720 | file_copies: |
|
|||
1721 | file_copies: |
|
|||
1722 | file_copies: |
|
|||
1723 | file_copies: |
|
|||
1724 | file_copies: |
|
|||
1725 | file_copies--verbose: fourth (second) |
|
|||
1726 | file_copies--verbose: |
|
|||
1727 | file_copies--verbose: |
|
|||
1728 | file_copies--verbose: |
|
|||
1729 | file_copies--verbose: |
|
|||
1730 | file_copies--verbose: |
|
|||
1731 | file_copies--verbose: |
|
|||
1732 | file_copies--verbose: |
|
|||
1733 | file_copies--verbose: |
|
|||
1734 | file_copies--debug: fourth (second) |
|
|||
1735 | file_copies--debug: |
|
|||
1736 | file_copies--debug: |
|
|||
1737 | file_copies--debug: |
|
|||
1738 | file_copies--debug: |
|
|||
1739 | file_copies--debug: |
|
|||
1740 | file_copies--debug: |
|
|||
1741 | file_copies--debug: |
|
|||
1742 | file_copies--debug: |
|
|||
1743 | file_copies_switch: |
|
|||
1744 | file_copies_switch: |
|
|||
1745 | file_copies_switch: |
|
|||
1746 | file_copies_switch: |
|
|||
1747 | file_copies_switch: |
|
|||
1748 | file_copies_switch: |
|
|||
1749 | file_copies_switch: |
|
|||
1750 | file_copies_switch: |
|
|||
1751 | file_copies_switch: |
|
|||
1752 | file_copies_switch--verbose: |
|
|||
1753 | file_copies_switch--verbose: |
|
|||
1754 | file_copies_switch--verbose: |
|
|||
1755 | file_copies_switch--verbose: |
|
|||
1756 | file_copies_switch--verbose: |
|
|||
1757 | file_copies_switch--verbose: |
|
|||
1758 | file_copies_switch--verbose: |
|
|||
1759 | file_copies_switch--verbose: |
|
|||
1760 | file_copies_switch--verbose: |
|
|||
1761 | file_copies_switch--debug: |
|
|||
1762 | file_copies_switch--debug: |
|
|||
1763 | file_copies_switch--debug: |
|
|||
1764 | file_copies_switch--debug: |
|
|||
1765 | file_copies_switch--debug: |
|
|||
1766 | file_copies_switch--debug: |
|
|||
1767 | file_copies_switch--debug: |
|
|||
1768 | file_copies_switch--debug: |
|
|||
1769 | file_copies_switch--debug: |
|
|||
1770 | files: fourth second third |
|
|||
1771 | files: second |
|
|||
1772 | files: |
|
|||
1773 | files: d |
|
|||
1774 | files: |
|
|||
1775 | files: c |
|
|||
1776 | files: c |
|
|||
1777 | files: b |
|
|||
1778 | files: a |
|
|||
1779 | files--verbose: fourth second third |
|
|||
1780 | files--verbose: second |
|
|||
1781 | files--verbose: |
|
|||
1782 | files--verbose: d |
|
|||
1783 | files--verbose: |
|
|||
1784 | files--verbose: c |
|
|||
1785 | files--verbose: c |
|
|||
1786 | files--verbose: b |
|
|||
1787 | files--verbose: a |
|
|||
1788 | files--debug: fourth second third |
|
|||
1789 | files--debug: second |
|
|||
1790 | files--debug: |
|
|||
1791 | files--debug: d |
|
|||
1792 | files--debug: |
|
|||
1793 | files--debug: c |
|
|||
1794 | files--debug: c |
|
|||
1795 | files--debug: b |
|
|||
1796 | files--debug: a |
|
|||
1797 | manifest: 6:94961b75a2da |
|
|||
1798 | manifest: 5:f2dbc354b94e |
|
|||
1799 | manifest: 4:4dc3def4f9b4 |
|
|||
1800 | manifest: 4:4dc3def4f9b4 |
|
|||
1801 | manifest: 3:cb5a1327723b |
|
|||
1802 | manifest: 3:cb5a1327723b |
|
|||
1803 | manifest: 2:6e0e82995c35 |
|
|||
1804 | manifest: 1:4e8d705b1e53 |
|
|||
1805 | manifest: 0:a0c8bcbbb45c |
|
|||
1806 | manifest--verbose: 6:94961b75a2da |
|
|||
1807 | manifest--verbose: 5:f2dbc354b94e |
|
|||
1808 | manifest--verbose: 4:4dc3def4f9b4 |
|
|||
1809 | manifest--verbose: 4:4dc3def4f9b4 |
|
|||
1810 | manifest--verbose: 3:cb5a1327723b |
|
|||
1811 | manifest--verbose: 3:cb5a1327723b |
|
|||
1812 | manifest--verbose: 2:6e0e82995c35 |
|
|||
1813 | manifest--verbose: 1:4e8d705b1e53 |
|
|||
1814 | manifest--verbose: 0:a0c8bcbbb45c |
|
|||
1815 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 |
|
|||
1816 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf |
|
|||
1817 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
|||
1818 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
|||
1819 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
|||
1820 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
|||
1821 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
|||
1822 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
|||
1823 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
|||
1824 | node: 95c24699272ef57d062b8bccc32c878bf841784a |
|
|||
1825 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
|||
1826 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
|||
1827 | node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
|||
1828 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
1829 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
1830 | node: 97054abb4ab824450e9164180baf491ae0078465 |
|
|||
1831 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
1832 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
1833 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a |
|
|||
1834 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
|||
1835 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
|||
1836 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
|||
1837 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
1838 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
1839 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
|||
1840 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
1841 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
1842 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a |
|
|||
1843 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
|||
1844 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
|||
1845 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
|||
1846 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
1847 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
1848 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
|||
1849 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
1850 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
1851 | parents: |
|
|||
1852 | parents: -1:000000000000 |
|
|||
1853 | parents: 5:13207e5a10d9 4:bbe44766e73d |
|
|||
1854 | parents: 3:10e46f2dcbf4 |
|
|||
1855 | parents: |
|
|||
1856 | parents: |
|
|||
1857 | parents: |
|
|||
1858 | parents: |
|
|||
1859 | parents: |
|
|||
1860 | parents--verbose: |
|
|||
1861 | parents--verbose: -1:000000000000 |
|
|||
1862 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d |
|
|||
1863 | parents--verbose: 3:10e46f2dcbf4 |
|
|||
1864 | parents--verbose: |
|
|||
1865 | parents--verbose: |
|
|||
1866 | parents--verbose: |
|
|||
1867 | parents--verbose: |
|
|||
1868 | parents--verbose: |
|
|||
1869 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 |
|
|||
1870 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
|||
1871 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
1872 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
|||
1873 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
|||
1874 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 |
|
|||
1875 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 |
|
|||
1876 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 |
|
|||
1877 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
|||
1878 | rev: 8 |
|
|||
1879 | rev: 7 |
|
|||
1880 | rev: 6 |
|
|||
1881 | rev: 5 |
|
|||
1882 | rev: 4 |
|
|||
1883 | rev: 3 |
|
|||
1884 | rev: 2 |
|
|||
1885 | rev: 1 |
|
|||
1886 | rev: 0 |
|
|||
1887 | rev--verbose: 8 |
|
|||
1888 | rev--verbose: 7 |
|
|||
1889 | rev--verbose: 6 |
|
|||
1890 | rev--verbose: 5 |
|
|||
1891 | rev--verbose: 4 |
|
|||
1892 | rev--verbose: 3 |
|
|||
1893 | rev--verbose: 2 |
|
|||
1894 | rev--verbose: 1 |
|
|||
1895 | rev--verbose: 0 |
|
|||
1896 | rev--debug: 8 |
|
|||
1897 | rev--debug: 7 |
|
|||
1898 | rev--debug: 6 |
|
|||
1899 | rev--debug: 5 |
|
|||
1900 | rev--debug: 4 |
|
|||
1901 | rev--debug: 3 |
|
|||
1902 | rev--debug: 2 |
|
|||
1903 | rev--debug: 1 |
|
|||
1904 | rev--debug: 0 |
|
|||
1905 | tags: tip |
|
|||
1906 | tags: |
|
|||
1907 | tags: |
|
|||
1908 | tags: |
|
|||
1909 | tags: |
|
|||
1910 | tags: |
|
|||
1911 | tags: |
|
|||
1912 | tags: |
|
|||
1913 | tags: |
|
|||
1914 | tags--verbose: tip |
|
|||
1915 | tags--verbose: |
|
|||
1916 | tags--verbose: |
|
|||
1917 | tags--verbose: |
|
|||
1918 | tags--verbose: |
|
|||
1919 | tags--verbose: |
|
|||
1920 | tags--verbose: |
|
|||
1921 | tags--verbose: |
|
|||
1922 | tags--verbose: |
|
|||
1923 | tags--debug: tip |
|
|||
1924 | tags--debug: |
|
|||
1925 | tags--debug: |
|
|||
1926 | tags--debug: |
|
|||
1927 | tags--debug: |
|
|||
1928 | tags--debug: |
|
|||
1929 | tags--debug: |
|
|||
1930 | tags--debug: |
|
|||
1931 | tags--debug: |
|
|||
1932 | diffstat: 3: +2/-1 |
|
|||
1933 | diffstat: 1: +1/-0 |
|
|||
1934 | diffstat: 0: +0/-0 |
|
|||
1935 | diffstat: 1: +1/-0 |
|
|||
1936 | diffstat: 0: +0/-0 |
|
|||
1937 | diffstat: 1: +1/-0 |
|
|||
1938 | diffstat: 1: +4/-0 |
|
|||
1939 | diffstat: 1: +2/-0 |
|
|||
1940 | diffstat: 1: +1/-0 |
|
|||
1941 | diffstat--verbose: 3: +2/-1 |
|
|||
1942 | diffstat--verbose: 1: +1/-0 |
|
|||
1943 | diffstat--verbose: 0: +0/-0 |
|
|||
1944 | diffstat--verbose: 1: +1/-0 |
|
|||
1945 | diffstat--verbose: 0: +0/-0 |
|
|||
1946 | diffstat--verbose: 1: +1/-0 |
|
|||
1947 | diffstat--verbose: 1: +4/-0 |
|
|||
1948 | diffstat--verbose: 1: +2/-0 |
|
|||
1949 | diffstat--verbose: 1: +1/-0 |
|
|||
1950 | diffstat--debug: 3: +2/-1 |
|
|||
1951 | diffstat--debug: 1: +1/-0 |
|
|||
1952 | diffstat--debug: 0: +0/-0 |
|
|||
1953 | diffstat--debug: 1: +1/-0 |
|
|||
1954 | diffstat--debug: 0: +0/-0 |
|
|||
1955 | diffstat--debug: 1: +1/-0 |
|
|||
1956 | diffstat--debug: 1: +4/-0 |
|
|||
1957 | diffstat--debug: 1: +2/-0 |
|
|||
1958 | diffstat--debug: 1: +1/-0 |
|
|||
1959 | extras: branch=default |
|
|||
1960 | extras: branch=default |
|
|||
1961 | extras: branch=default |
|
|||
1962 | extras: branch=default |
|
|||
1963 | extras: branch=foo |
|
|||
1964 | extras: branch=default |
|
|||
1965 | extras: branch=default |
|
|||
1966 | extras: branch=default |
|
|||
1967 | extras: branch=default |
|
|||
1968 | extras--verbose: branch=default |
|
|||
1969 | extras--verbose: branch=default |
|
|||
1970 | extras--verbose: branch=default |
|
|||
1971 | extras--verbose: branch=default |
|
|||
1972 | extras--verbose: branch=foo |
|
|||
1973 | extras--verbose: branch=default |
|
|||
1974 | extras--verbose: branch=default |
|
|||
1975 | extras--verbose: branch=default |
|
|||
1976 | extras--verbose: branch=default |
|
|||
1977 | extras--debug: branch=default |
|
|||
1978 | extras--debug: branch=default |
|
|||
1979 | extras--debug: branch=default |
|
|||
1980 | extras--debug: branch=default |
|
|||
1981 | extras--debug: branch=foo |
|
|||
1982 | extras--debug: branch=default |
|
|||
1983 | extras--debug: branch=default |
|
|||
1984 | extras--debug: branch=default |
|
|||
1985 | extras--debug: branch=default |
|
|||
1986 | p1rev: 7 |
|
|||
1987 | p1rev: -1 |
|
|||
1988 | p1rev: 5 |
|
|||
1989 | p1rev: 3 |
|
|||
1990 | p1rev: 3 |
|
|||
1991 | p1rev: 2 |
|
|||
1992 | p1rev: 1 |
|
|||
1993 | p1rev: 0 |
|
|||
1994 | p1rev: -1 |
|
|||
1995 | p1rev--verbose: 7 |
|
|||
1996 | p1rev--verbose: -1 |
|
|||
1997 | p1rev--verbose: 5 |
|
|||
1998 | p1rev--verbose: 3 |
|
|||
1999 | p1rev--verbose: 3 |
|
|||
2000 | p1rev--verbose: 2 |
|
|||
2001 | p1rev--verbose: 1 |
|
|||
2002 | p1rev--verbose: 0 |
|
|||
2003 | p1rev--verbose: -1 |
|
|||
2004 | p1rev--debug: 7 |
|
|||
2005 | p1rev--debug: -1 |
|
|||
2006 | p1rev--debug: 5 |
|
|||
2007 | p1rev--debug: 3 |
|
|||
2008 | p1rev--debug: 3 |
|
|||
2009 | p1rev--debug: 2 |
|
|||
2010 | p1rev--debug: 1 |
|
|||
2011 | p1rev--debug: 0 |
|
|||
2012 | p1rev--debug: -1 |
|
|||
2013 | p2rev: -1 |
|
|||
2014 | p2rev: -1 |
|
|||
2015 | p2rev: 4 |
|
|||
2016 | p2rev: -1 |
|
|||
2017 | p2rev: -1 |
|
|||
2018 | p2rev: -1 |
|
|||
2019 | p2rev: -1 |
|
|||
2020 | p2rev: -1 |
|
|||
2021 | p2rev: -1 |
|
|||
2022 | p2rev--verbose: -1 |
|
|||
2023 | p2rev--verbose: -1 |
|
|||
2024 | p2rev--verbose: 4 |
|
|||
2025 | p2rev--verbose: -1 |
|
|||
2026 | p2rev--verbose: -1 |
|
|||
2027 | p2rev--verbose: -1 |
|
|||
2028 | p2rev--verbose: -1 |
|
|||
2029 | p2rev--verbose: -1 |
|
|||
2030 | p2rev--verbose: -1 |
|
|||
2031 | p2rev--debug: -1 |
|
|||
2032 | p2rev--debug: -1 |
|
|||
2033 | p2rev--debug: 4 |
|
|||
2034 | p2rev--debug: -1 |
|
|||
2035 | p2rev--debug: -1 |
|
|||
2036 | p2rev--debug: -1 |
|
|||
2037 | p2rev--debug: -1 |
|
|||
2038 | p2rev--debug: -1 |
|
|||
2039 | p2rev--debug: -1 |
|
|||
2040 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
|||
2041 | p1node: 0000000000000000000000000000000000000000 |
|
|||
2042 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
|||
2043 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2044 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2045 | p1node: 97054abb4ab824450e9164180baf491ae0078465 |
|
|||
2046 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
2047 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
2048 | p1node: 0000000000000000000000000000000000000000 |
|
|||
2049 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
|||
2050 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2051 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
|||
2052 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2053 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2054 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
|||
2055 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
2056 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
2057 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2058 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
|||
2059 | p1node--debug: 0000000000000000000000000000000000000000 |
|
|||
2060 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
|||
2061 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2062 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
|||
2063 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
|||
2064 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
|||
2065 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
2066 | p1node--debug: 0000000000000000000000000000000000000000 |
|
|||
2067 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2068 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2069 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
2070 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2071 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2072 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2073 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2074 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2075 | p2node: 0000000000000000000000000000000000000000 |
|
|||
2076 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2077 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2078 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
2079 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2080 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2081 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2082 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2083 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2084 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
|||
2085 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2086 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2087 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
2088 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2089 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2090 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2091 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2092 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2093 | p2node--debug: 0000000000000000000000000000000000000000 |
|
|||
2094 |
|
||||
2095 | Filters work: |
|
|||
2096 |
|
||||
2097 | $ hg log --template '{author|domain}\n' |
|
|||
2098 |
|
||||
2099 | hostname |
|
|||
2100 |
|
||||
2101 |
|
||||
2102 |
|
||||
2103 |
|
||||
2104 | place |
|
|||
2105 | place |
|
|||
2106 | hostname |
|
|||
2107 |
|
||||
2108 | $ hg log --template '{author|person}\n' |
|
|||
2109 | test |
|
|||
2110 | User Name |
|
|||
2111 | person |
|
|||
2112 | person |
|
|||
2113 | person |
|
|||
2114 | person |
|
|||
2115 | other |
|
|||
2116 | A. N. Other |
|
|||
2117 | User Name |
|
|||
2118 |
|
||||
2119 | $ hg log --template '{author|user}\n' |
|
|||
2120 | test |
|
|||
2121 | user |
|
|||
2122 | person |
|
|||
2123 | person |
|
|||
2124 | person |
|
|||
2125 | person |
|
|||
2126 | other |
|
|||
2127 | other |
|
|||
2128 | user |
|
|||
2129 |
|
||||
2130 | $ hg log --template '{date|date}\n' |
|
|||
2131 | Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2132 | Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2133 | Sun Jan 18 08:40:01 1970 +0000 |
|
|||
2134 | Sun Jan 18 08:40:00 1970 +0000 |
|
|||
2135 | Sat Jan 17 04:53:20 1970 +0000 |
|
|||
2136 | Fri Jan 16 01:06:40 1970 +0000 |
|
|||
2137 | Wed Jan 14 21:20:00 1970 +0000 |
|
|||
2138 | Tue Jan 13 17:33:20 1970 +0000 |
|
|||
2139 | Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2140 |
|
||||
2141 | $ hg log --template '{date|isodate}\n' |
|
|||
2142 | 2020-01-01 10:01 +0000 |
|
|||
2143 | 1970-01-12 13:46 +0000 |
|
|||
2144 | 1970-01-18 08:40 +0000 |
|
|||
2145 | 1970-01-18 08:40 +0000 |
|
|||
2146 | 1970-01-17 04:53 +0000 |
|
|||
2147 | 1970-01-16 01:06 +0000 |
|
|||
2148 | 1970-01-14 21:20 +0000 |
|
|||
2149 | 1970-01-13 17:33 +0000 |
|
|||
2150 | 1970-01-12 13:46 +0000 |
|
|||
2151 |
|
||||
2152 | $ hg log --template '{date|isodatesec}\n' |
|
|||
2153 | 2020-01-01 10:01:00 +0000 |
|
|||
2154 | 1970-01-12 13:46:40 +0000 |
|
|||
2155 | 1970-01-18 08:40:01 +0000 |
|
|||
2156 | 1970-01-18 08:40:00 +0000 |
|
|||
2157 | 1970-01-17 04:53:20 +0000 |
|
|||
2158 | 1970-01-16 01:06:40 +0000 |
|
|||
2159 | 1970-01-14 21:20:00 +0000 |
|
|||
2160 | 1970-01-13 17:33:20 +0000 |
|
|||
2161 | 1970-01-12 13:46:40 +0000 |
|
|||
2162 |
|
||||
2163 | $ hg log --template '{date|rfc822date}\n' |
|
|||
2164 | Wed, 01 Jan 2020 10:01:00 +0000 |
|
|||
2165 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
|||
2166 | Sun, 18 Jan 1970 08:40:01 +0000 |
|
|||
2167 | Sun, 18 Jan 1970 08:40:00 +0000 |
|
|||
2168 | Sat, 17 Jan 1970 04:53:20 +0000 |
|
|||
2169 | Fri, 16 Jan 1970 01:06:40 +0000 |
|
|||
2170 | Wed, 14 Jan 1970 21:20:00 +0000 |
|
|||
2171 | Tue, 13 Jan 1970 17:33:20 +0000 |
|
|||
2172 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
|||
2173 |
|
||||
2174 | $ hg log --template '{desc|firstline}\n' |
|
|||
2175 | third |
|
|||
2176 | second |
|
|||
2177 | merge |
|
|||
2178 | new head |
|
|||
2179 | new branch |
|
|||
2180 | no user, no domain |
|
|||
2181 | no person |
|
|||
2182 | other 1 |
|
|||
2183 | line 1 |
|
|||
2184 |
|
||||
2185 | $ hg log --template '{node|short}\n' |
|
|||
2186 | 95c24699272e |
|
|||
2187 | 29114dbae42b |
|
|||
2188 | d41e714fe50d |
|
|||
2189 | 13207e5a10d9 |
|
|||
2190 | bbe44766e73d |
|
|||
2191 | 10e46f2dcbf4 |
|
|||
2192 | 97054abb4ab8 |
|
|||
2193 | b608e9d1a3f0 |
|
|||
2194 | 1e4e1b8f71e0 |
|
|||
2195 |
|
||||
2196 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' |
|
|||
2197 | <changeset author="test"/> |
|
|||
2198 | <changeset author="User Name <user@hostname>"/> |
|
|||
2199 | <changeset author="person"/> |
|
|||
2200 | <changeset author="person"/> |
|
|||
2201 | <changeset author="person"/> |
|
|||
2202 | <changeset author="person"/> |
|
|||
2203 | <changeset author="other@place"/> |
|
|||
2204 | <changeset author="A. N. Other <other@place>"/> |
|
|||
2205 | <changeset author="User Name <user@hostname>"/> |
|
|||
2206 |
|
||||
2207 | $ hg log --template '{rev}: {children}\n' |
|
|||
2208 | 8: |
|
|||
2209 | 7: 8:95c24699272e |
|
|||
2210 | 6: |
|
|||
2211 | 5: 6:d41e714fe50d |
|
|||
2212 | 4: 6:d41e714fe50d |
|
|||
2213 | 3: 4:bbe44766e73d 5:13207e5a10d9 |
|
|||
2214 | 2: 3:10e46f2dcbf4 |
|
|||
2215 | 1: 2:97054abb4ab8 |
|
|||
2216 | 0: 1:b608e9d1a3f0 |
|
|||
2217 |
|
||||
2218 | Formatnode filter works: |
|
|||
2219 |
|
||||
2220 | $ hg -q log -r 0 --template '{node|formatnode}\n' |
|
|||
2221 | 1e4e1b8f71e0 |
|
|||
2222 |
|
||||
2223 | $ hg log -r 0 --template '{node|formatnode}\n' |
|
|||
2224 | 1e4e1b8f71e0 |
|
|||
2225 |
|
||||
2226 | $ hg -v log -r 0 --template '{node|formatnode}\n' |
|
|||
2227 | 1e4e1b8f71e0 |
|
|||
2228 |
|
||||
2229 | $ hg --debug log -r 0 --template '{node|formatnode}\n' |
|
|||
2230 | 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
|||
2231 |
|
||||
2232 | Age filter: |
|
|||
2233 |
|
||||
2234 | $ hg init unstable-hash |
|
|||
2235 | $ cd unstable-hash |
|
|||
2236 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 |
|
|||
2237 |
|
||||
2238 | >>> from __future__ import absolute_import |
|
|||
2239 | >>> import datetime |
|
|||
2240 | >>> fp = open('a', 'wb') |
|
|||
2241 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) |
|
|||
2242 | >>> fp.write(b'%d-%d-%d 00:00' % (n.year, n.month, n.day)) and None |
|
|||
2243 | >>> fp.close() |
|
|||
2244 | $ hg add a |
|
|||
2245 | $ hg commit -m future -d "`cat a`" |
|
|||
2246 |
|
||||
2247 | $ hg log -l1 --template '{date|age}\n' |
|
|||
2248 | 7 years from now |
|
|||
2249 |
|
||||
2250 | $ cd .. |
|
|||
2251 | $ rm -rf unstable-hash |
|
|||
2252 |
|
||||
2253 | Filename filters: |
|
|||
2254 |
|
||||
2255 | $ hg debugtemplate '{"foo/bar"|basename}|{"foo/"|basename}|{"foo"|basename}|\n' |
|
|||
2256 | bar||foo| |
|
|||
2257 | $ hg debugtemplate '{"foo/bar"|dirname}|{"foo/"|dirname}|{"foo"|dirname}|\n' |
|
|||
2258 | foo|foo|| |
|
|||
2259 | $ hg debugtemplate '{"foo/bar"|stripdir}|{"foo/"|stripdir}|{"foo"|stripdir}|\n' |
|
|||
2260 | foo|foo|foo| |
|
|||
2261 |
|
||||
2262 | Add a dummy commit to make up for the instability of the above: |
|
1214 | Add a dummy commit to make up for the instability of the above: | |
2263 |
|
1215 | |||
2264 | $ echo a > a |
|
1216 | $ echo a > a | |
2265 | $ hg add a |
|
1217 | $ hg add a | |
2266 | $ hg ci -m future |
|
1218 | $ hg ci -m future | |
2267 |
|
1219 | |||
2268 | Count filter: |
|
|||
2269 |
|
||||
2270 | $ hg log -l1 --template '{node|count} {node|short|count}\n' |
|
|||
2271 | 40 12 |
|
|||
2272 |
|
||||
2273 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' |
|
|||
2274 | 0 1 4 |
|
|||
2275 |
|
||||
2276 | $ hg log -G --template '{rev}: children: {children|count}, \ |
|
|||
2277 | > tags: {tags|count}, file_adds: {file_adds|count}, \ |
|
|||
2278 | > ancestors: {revset("ancestors(%s)", rev)|count}' |
|
|||
2279 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 |
|
|||
2280 | | |
|
|||
2281 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 |
|
|||
2282 | | |
|
|||
2283 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
|||
2284 |
|
||||
2285 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 |
|
|||
2286 | |\ |
|
|||
2287 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 |
|
|||
2288 | | | |
|
|||
2289 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 |
|
|||
2290 | |/ |
|
|||
2291 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 |
|
|||
2292 | | |
|
|||
2293 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 |
|
|||
2294 | | |
|
|||
2295 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 |
|
|||
2296 | | |
|
|||
2297 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
|||
2298 |
|
||||
2299 |
|
||||
2300 | $ hg log -l1 -T '{termwidth|count}\n' |
|
|||
2301 | hg: parse error: not countable |
|
|||
2302 | (template filter 'count' is not compatible with keyword 'termwidth') |
|
|||
2303 | [255] |
|
|||
2304 |
|
||||
2305 | Upper/lower filters: |
|
|||
2306 |
|
||||
2307 | $ hg log -r0 --template '{branch|upper}\n' |
|
|||
2308 | DEFAULT |
|
|||
2309 | $ hg log -r0 --template '{author|lower}\n' |
|
|||
2310 | user name <user@hostname> |
|
|||
2311 | $ hg log -r0 --template '{date|upper}\n' |
|
|||
2312 | 1000000.00 |
|
|||
2313 |
|
||||
2314 | Add a commit that does all possible modifications at once |
|
1220 | Add a commit that does all possible modifications at once | |
2315 |
|
1221 | |||
2316 | $ echo modify >> third |
|
1222 | $ echo modify >> third | |
2317 | $ touch b |
|
1223 | $ touch b | |
2318 | $ hg add b |
|
1224 | $ hg add b | |
2319 | $ hg mv fourth fifth |
|
1225 | $ hg mv fourth fifth | |
2320 | $ hg rm a |
|
1226 | $ hg rm a | |
2321 | $ hg ci -m "Modify, add, remove, rename" |
|
1227 | $ hg ci -m "Modify, add, remove, rename" | |
2322 |
|
1228 | |||
2323 | Check the status template |
|
1229 | Check the status template | |
2324 |
|
1230 | |||
2325 | $ cat <<EOF >> $HGRCPATH |
|
1231 | $ cat <<EOF >> $HGRCPATH | |
2326 | > [extensions] |
|
1232 | > [extensions] | |
2327 | > color= |
|
1233 | > color= | |
2328 | > EOF |
|
1234 | > EOF | |
2329 |
|
1235 | |||
2330 | $ hg log -T status -r 10 |
|
1236 | $ hg log -T status -r 10 | |
2331 | changeset: 10:0f9759ec227a |
|
1237 | changeset: 10:0f9759ec227a | |
2332 | tag: tip |
|
1238 | tag: tip | |
2333 | user: test |
|
1239 | user: test | |
2334 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1240 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2335 | summary: Modify, add, remove, rename |
|
1241 | summary: Modify, add, remove, rename | |
2336 | files: |
|
1242 | files: | |
2337 | M third |
|
1243 | M third | |
2338 | A b |
|
1244 | A b | |
2339 | A fifth |
|
1245 | A fifth | |
2340 | R a |
|
1246 | R a | |
2341 | R fourth |
|
1247 | R fourth | |
2342 |
|
1248 | |||
2343 | $ hg log -T status -C -r 10 |
|
1249 | $ hg log -T status -C -r 10 | |
2344 | changeset: 10:0f9759ec227a |
|
1250 | changeset: 10:0f9759ec227a | |
2345 | tag: tip |
|
1251 | tag: tip | |
2346 | user: test |
|
1252 | user: test | |
2347 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1253 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2348 | summary: Modify, add, remove, rename |
|
1254 | summary: Modify, add, remove, rename | |
2349 | files: |
|
1255 | files: | |
2350 | M third |
|
1256 | M third | |
2351 | A b |
|
1257 | A b | |
2352 | A fifth |
|
1258 | A fifth | |
2353 | fourth |
|
1259 | fourth | |
2354 | R a |
|
1260 | R a | |
2355 | R fourth |
|
1261 | R fourth | |
2356 |
|
1262 | |||
2357 | $ hg log -T status -C -r 10 -v |
|
1263 | $ hg log -T status -C -r 10 -v | |
2358 | changeset: 10:0f9759ec227a |
|
1264 | changeset: 10:0f9759ec227a | |
2359 | tag: tip |
|
1265 | tag: tip | |
2360 | user: test |
|
1266 | user: test | |
2361 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1267 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2362 | description: |
|
1268 | description: | |
2363 | Modify, add, remove, rename |
|
1269 | Modify, add, remove, rename | |
2364 |
|
1270 | |||
2365 | files: |
|
1271 | files: | |
2366 | M third |
|
1272 | M third | |
2367 | A b |
|
1273 | A b | |
2368 | A fifth |
|
1274 | A fifth | |
2369 | fourth |
|
1275 | fourth | |
2370 | R a |
|
1276 | R a | |
2371 | R fourth |
|
1277 | R fourth | |
2372 |
|
1278 | |||
2373 | $ hg log -T status -C -r 10 --debug |
|
1279 | $ hg log -T status -C -r 10 --debug | |
2374 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c |
|
1280 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c | |
2375 | tag: tip |
|
1281 | tag: tip | |
2376 | phase: secret |
|
1282 | phase: secret | |
2377 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 |
|
1283 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 | |
2378 | parent: -1:0000000000000000000000000000000000000000 |
|
1284 | parent: -1:0000000000000000000000000000000000000000 | |
2379 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 |
|
1285 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 | |
2380 | user: test |
|
1286 | user: test | |
2381 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1287 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2382 | extra: branch=default |
|
1288 | extra: branch=default | |
2383 | description: |
|
1289 | description: | |
2384 | Modify, add, remove, rename |
|
1290 | Modify, add, remove, rename | |
2385 |
|
1291 | |||
2386 | files: |
|
1292 | files: | |
2387 | M third |
|
1293 | M third | |
2388 | A b |
|
1294 | A b | |
2389 | A fifth |
|
1295 | A fifth | |
2390 | fourth |
|
1296 | fourth | |
2391 | R a |
|
1297 | R a | |
2392 | R fourth |
|
1298 | R fourth | |
2393 |
|
1299 | |||
2394 | $ hg log -T status -C -r 10 --quiet |
|
1300 | $ hg log -T status -C -r 10 --quiet | |
2395 | 10:0f9759ec227a |
|
1301 | 10:0f9759ec227a | |
2396 | $ hg --color=debug log -T status -r 10 |
|
1302 | $ hg --color=debug log -T status -r 10 | |
2397 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
1303 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2398 | [log.tag|tag: tip] |
|
1304 | [log.tag|tag: tip] | |
2399 | [log.user|user: test] |
|
1305 | [log.user|user: test] | |
2400 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1306 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2401 | [log.summary|summary: Modify, add, remove, rename] |
|
1307 | [log.summary|summary: Modify, add, remove, rename] | |
2402 | [ui.note log.files|files:] |
|
1308 | [ui.note log.files|files:] | |
2403 | [status.modified|M third] |
|
1309 | [status.modified|M third] | |
2404 | [status.added|A b] |
|
1310 | [status.added|A b] | |
2405 | [status.added|A fifth] |
|
1311 | [status.added|A fifth] | |
2406 | [status.removed|R a] |
|
1312 | [status.removed|R a] | |
2407 | [status.removed|R fourth] |
|
1313 | [status.removed|R fourth] | |
2408 |
|
1314 | |||
2409 | $ hg --color=debug log -T status -C -r 10 |
|
1315 | $ hg --color=debug log -T status -C -r 10 | |
2410 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
1316 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2411 | [log.tag|tag: tip] |
|
1317 | [log.tag|tag: tip] | |
2412 | [log.user|user: test] |
|
1318 | [log.user|user: test] | |
2413 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1319 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2414 | [log.summary|summary: Modify, add, remove, rename] |
|
1320 | [log.summary|summary: Modify, add, remove, rename] | |
2415 | [ui.note log.files|files:] |
|
1321 | [ui.note log.files|files:] | |
2416 | [status.modified|M third] |
|
1322 | [status.modified|M third] | |
2417 | [status.added|A b] |
|
1323 | [status.added|A b] | |
2418 | [status.added|A fifth] |
|
1324 | [status.added|A fifth] | |
2419 | [status.copied| fourth] |
|
1325 | [status.copied| fourth] | |
2420 | [status.removed|R a] |
|
1326 | [status.removed|R a] | |
2421 | [status.removed|R fourth] |
|
1327 | [status.removed|R fourth] | |
2422 |
|
1328 | |||
2423 | $ hg --color=debug log -T status -C -r 10 -v |
|
1329 | $ hg --color=debug log -T status -C -r 10 -v | |
2424 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
1330 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2425 | [log.tag|tag: tip] |
|
1331 | [log.tag|tag: tip] | |
2426 | [log.user|user: test] |
|
1332 | [log.user|user: test] | |
2427 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1333 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2428 | [ui.note log.description|description:] |
|
1334 | [ui.note log.description|description:] | |
2429 | [ui.note log.description|Modify, add, remove, rename] |
|
1335 | [ui.note log.description|Modify, add, remove, rename] | |
2430 |
|
1336 | |||
2431 | [ui.note log.files|files:] |
|
1337 | [ui.note log.files|files:] | |
2432 | [status.modified|M third] |
|
1338 | [status.modified|M third] | |
2433 | [status.added|A b] |
|
1339 | [status.added|A b] | |
2434 | [status.added|A fifth] |
|
1340 | [status.added|A fifth] | |
2435 | [status.copied| fourth] |
|
1341 | [status.copied| fourth] | |
2436 | [status.removed|R a] |
|
1342 | [status.removed|R a] | |
2437 | [status.removed|R fourth] |
|
1343 | [status.removed|R fourth] | |
2438 |
|
1344 | |||
2439 | $ hg --color=debug log -T status -C -r 10 --debug |
|
1345 | $ hg --color=debug log -T status -C -r 10 --debug | |
2440 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] |
|
1346 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] | |
2441 | [log.tag|tag: tip] |
|
1347 | [log.tag|tag: tip] | |
2442 | [log.phase|phase: secret] |
|
1348 | [log.phase|phase: secret] | |
2443 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] |
|
1349 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] | |
2444 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1350 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2445 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] |
|
1351 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] | |
2446 | [log.user|user: test] |
|
1352 | [log.user|user: test] | |
2447 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1353 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2448 | [ui.debug log.extra|extra: branch=default] |
|
1354 | [ui.debug log.extra|extra: branch=default] | |
2449 | [ui.note log.description|description:] |
|
1355 | [ui.note log.description|description:] | |
2450 | [ui.note log.description|Modify, add, remove, rename] |
|
1356 | [ui.note log.description|Modify, add, remove, rename] | |
2451 |
|
1357 | |||
2452 | [ui.note log.files|files:] |
|
1358 | [ui.note log.files|files:] | |
2453 | [status.modified|M third] |
|
1359 | [status.modified|M third] | |
2454 | [status.added|A b] |
|
1360 | [status.added|A b] | |
2455 | [status.added|A fifth] |
|
1361 | [status.added|A fifth] | |
2456 | [status.copied| fourth] |
|
1362 | [status.copied| fourth] | |
2457 | [status.removed|R a] |
|
1363 | [status.removed|R a] | |
2458 | [status.removed|R fourth] |
|
1364 | [status.removed|R fourth] | |
2459 |
|
1365 | |||
2460 | $ hg --color=debug log -T status -C -r 10 --quiet |
|
1366 | $ hg --color=debug log -T status -C -r 10 --quiet | |
2461 | [log.node|10:0f9759ec227a] |
|
1367 | [log.node|10:0f9759ec227a] | |
2462 |
|
1368 | |||
2463 | Check the bisect template |
|
1369 | Check the bisect template | |
2464 |
|
1370 | |||
2465 | $ hg bisect -g 1 |
|
1371 | $ hg bisect -g 1 | |
2466 | $ hg bisect -b 3 --noupdate |
|
1372 | $ hg bisect -b 3 --noupdate | |
2467 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) |
|
1373 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) | |
2468 | $ hg log -T bisect -r 0:4 |
|
1374 | $ hg log -T bisect -r 0:4 | |
2469 | changeset: 0:1e4e1b8f71e0 |
|
1375 | changeset: 0:1e4e1b8f71e0 | |
2470 | bisect: good (implicit) |
|
1376 | bisect: good (implicit) | |
2471 | user: User Name <user@hostname> |
|
1377 | user: User Name <user@hostname> | |
2472 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
1378 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2473 | summary: line 1 |
|
1379 | summary: line 1 | |
2474 |
|
1380 | |||
2475 | changeset: 1:b608e9d1a3f0 |
|
1381 | changeset: 1:b608e9d1a3f0 | |
2476 | bisect: good |
|
1382 | bisect: good | |
2477 | user: A. N. Other <other@place> |
|
1383 | user: A. N. Other <other@place> | |
2478 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
1384 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2479 | summary: other 1 |
|
1385 | summary: other 1 | |
2480 |
|
1386 | |||
2481 | changeset: 2:97054abb4ab8 |
|
1387 | changeset: 2:97054abb4ab8 | |
2482 | bisect: untested |
|
1388 | bisect: untested | |
2483 | user: other@place |
|
1389 | user: other@place | |
2484 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
1390 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2485 | summary: no person |
|
1391 | summary: no person | |
2486 |
|
1392 | |||
2487 | changeset: 3:10e46f2dcbf4 |
|
1393 | changeset: 3:10e46f2dcbf4 | |
2488 | bisect: bad |
|
1394 | bisect: bad | |
2489 | user: person |
|
1395 | user: person | |
2490 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
1396 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2491 | summary: no user, no domain |
|
1397 | summary: no user, no domain | |
2492 |
|
1398 | |||
2493 | changeset: 4:bbe44766e73d |
|
1399 | changeset: 4:bbe44766e73d | |
2494 | bisect: bad (implicit) |
|
1400 | bisect: bad (implicit) | |
2495 | branch: foo |
|
1401 | branch: foo | |
2496 | user: person |
|
1402 | user: person | |
2497 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
1403 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2498 | summary: new branch |
|
1404 | summary: new branch | |
2499 |
|
1405 | |||
2500 | $ hg log --debug -T bisect -r 0:4 |
|
1406 | $ hg log --debug -T bisect -r 0:4 | |
2501 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1407 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2502 | bisect: good (implicit) |
|
1408 | bisect: good (implicit) | |
2503 | phase: public |
|
1409 | phase: public | |
2504 | parent: -1:0000000000000000000000000000000000000000 |
|
1410 | parent: -1:0000000000000000000000000000000000000000 | |
2505 | parent: -1:0000000000000000000000000000000000000000 |
|
1411 | parent: -1:0000000000000000000000000000000000000000 | |
2506 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
1412 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
2507 | user: User Name <user@hostname> |
|
1413 | user: User Name <user@hostname> | |
2508 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
1414 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2509 | files+: a |
|
1415 | files+: a | |
2510 | extra: branch=default |
|
1416 | extra: branch=default | |
2511 | description: |
|
1417 | description: | |
2512 | line 1 |
|
1418 | line 1 | |
2513 | line 2 |
|
1419 | line 2 | |
2514 |
|
1420 | |||
2515 |
|
1421 | |||
2516 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1422 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2517 | bisect: good |
|
1423 | bisect: good | |
2518 | phase: public |
|
1424 | phase: public | |
2519 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1425 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2520 | parent: -1:0000000000000000000000000000000000000000 |
|
1426 | parent: -1:0000000000000000000000000000000000000000 | |
2521 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
1427 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
2522 | user: A. N. Other <other@place> |
|
1428 | user: A. N. Other <other@place> | |
2523 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
1429 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2524 | files+: b |
|
1430 | files+: b | |
2525 | extra: branch=default |
|
1431 | extra: branch=default | |
2526 | description: |
|
1432 | description: | |
2527 | other 1 |
|
1433 | other 1 | |
2528 | other 2 |
|
1434 | other 2 | |
2529 |
|
1435 | |||
2530 | other 3 |
|
1436 | other 3 | |
2531 |
|
1437 | |||
2532 |
|
1438 | |||
2533 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
1439 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2534 | bisect: untested |
|
1440 | bisect: untested | |
2535 | phase: public |
|
1441 | phase: public | |
2536 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1442 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2537 | parent: -1:0000000000000000000000000000000000000000 |
|
1443 | parent: -1:0000000000000000000000000000000000000000 | |
2538 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
1444 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
2539 | user: other@place |
|
1445 | user: other@place | |
2540 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
1446 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2541 | files+: c |
|
1447 | files+: c | |
2542 | extra: branch=default |
|
1448 | extra: branch=default | |
2543 | description: |
|
1449 | description: | |
2544 | no person |
|
1450 | no person | |
2545 |
|
1451 | |||
2546 |
|
1452 | |||
2547 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1453 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2548 | bisect: bad |
|
1454 | bisect: bad | |
2549 | phase: public |
|
1455 | phase: public | |
2550 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
1456 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2551 | parent: -1:0000000000000000000000000000000000000000 |
|
1457 | parent: -1:0000000000000000000000000000000000000000 | |
2552 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1458 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2553 | user: person |
|
1459 | user: person | |
2554 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
1460 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2555 | files: c |
|
1461 | files: c | |
2556 | extra: branch=default |
|
1462 | extra: branch=default | |
2557 | description: |
|
1463 | description: | |
2558 | no user, no domain |
|
1464 | no user, no domain | |
2559 |
|
1465 | |||
2560 |
|
1466 | |||
2561 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1467 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2562 | bisect: bad (implicit) |
|
1468 | bisect: bad (implicit) | |
2563 | branch: foo |
|
1469 | branch: foo | |
2564 | phase: draft |
|
1470 | phase: draft | |
2565 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1471 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2566 | parent: -1:0000000000000000000000000000000000000000 |
|
1472 | parent: -1:0000000000000000000000000000000000000000 | |
2567 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1473 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2568 | user: person |
|
1474 | user: person | |
2569 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
1475 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2570 | extra: branch=foo |
|
1476 | extra: branch=foo | |
2571 | description: |
|
1477 | description: | |
2572 | new branch |
|
1478 | new branch | |
2573 |
|
1479 | |||
2574 |
|
1480 | |||
2575 | $ hg log -v -T bisect -r 0:4 |
|
1481 | $ hg log -v -T bisect -r 0:4 | |
2576 | changeset: 0:1e4e1b8f71e0 |
|
1482 | changeset: 0:1e4e1b8f71e0 | |
2577 | bisect: good (implicit) |
|
1483 | bisect: good (implicit) | |
2578 | user: User Name <user@hostname> |
|
1484 | user: User Name <user@hostname> | |
2579 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
1485 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2580 | files: a |
|
1486 | files: a | |
2581 | description: |
|
1487 | description: | |
2582 | line 1 |
|
1488 | line 1 | |
2583 | line 2 |
|
1489 | line 2 | |
2584 |
|
1490 | |||
2585 |
|
1491 | |||
2586 | changeset: 1:b608e9d1a3f0 |
|
1492 | changeset: 1:b608e9d1a3f0 | |
2587 | bisect: good |
|
1493 | bisect: good | |
2588 | user: A. N. Other <other@place> |
|
1494 | user: A. N. Other <other@place> | |
2589 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
1495 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2590 | files: b |
|
1496 | files: b | |
2591 | description: |
|
1497 | description: | |
2592 | other 1 |
|
1498 | other 1 | |
2593 | other 2 |
|
1499 | other 2 | |
2594 |
|
1500 | |||
2595 | other 3 |
|
1501 | other 3 | |
2596 |
|
1502 | |||
2597 |
|
1503 | |||
2598 | changeset: 2:97054abb4ab8 |
|
1504 | changeset: 2:97054abb4ab8 | |
2599 | bisect: untested |
|
1505 | bisect: untested | |
2600 | user: other@place |
|
1506 | user: other@place | |
2601 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
1507 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2602 | files: c |
|
1508 | files: c | |
2603 | description: |
|
1509 | description: | |
2604 | no person |
|
1510 | no person | |
2605 |
|
1511 | |||
2606 |
|
1512 | |||
2607 | changeset: 3:10e46f2dcbf4 |
|
1513 | changeset: 3:10e46f2dcbf4 | |
2608 | bisect: bad |
|
1514 | bisect: bad | |
2609 | user: person |
|
1515 | user: person | |
2610 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
1516 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2611 | files: c |
|
1517 | files: c | |
2612 | description: |
|
1518 | description: | |
2613 | no user, no domain |
|
1519 | no user, no domain | |
2614 |
|
1520 | |||
2615 |
|
1521 | |||
2616 | changeset: 4:bbe44766e73d |
|
1522 | changeset: 4:bbe44766e73d | |
2617 | bisect: bad (implicit) |
|
1523 | bisect: bad (implicit) | |
2618 | branch: foo |
|
1524 | branch: foo | |
2619 | user: person |
|
1525 | user: person | |
2620 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
1526 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2621 | description: |
|
1527 | description: | |
2622 | new branch |
|
1528 | new branch | |
2623 |
|
1529 | |||
2624 |
|
1530 | |||
2625 | $ hg --color=debug log -T bisect -r 0:4 |
|
1531 | $ hg --color=debug log -T bisect -r 0:4 | |
2626 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
1532 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2627 | [log.bisect bisect.good|bisect: good (implicit)] |
|
1533 | [log.bisect bisect.good|bisect: good (implicit)] | |
2628 | [log.user|user: User Name <user@hostname>] |
|
1534 | [log.user|user: User Name <user@hostname>] | |
2629 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
1535 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2630 | [log.summary|summary: line 1] |
|
1536 | [log.summary|summary: line 1] | |
2631 |
|
1537 | |||
2632 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
1538 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2633 | [log.bisect bisect.good|bisect: good] |
|
1539 | [log.bisect bisect.good|bisect: good] | |
2634 | [log.user|user: A. N. Other <other@place>] |
|
1540 | [log.user|user: A. N. Other <other@place>] | |
2635 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
1541 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2636 | [log.summary|summary: other 1] |
|
1542 | [log.summary|summary: other 1] | |
2637 |
|
1543 | |||
2638 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
1544 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2639 | [log.bisect bisect.untested|bisect: untested] |
|
1545 | [log.bisect bisect.untested|bisect: untested] | |
2640 | [log.user|user: other@place] |
|
1546 | [log.user|user: other@place] | |
2641 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
1547 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2642 | [log.summary|summary: no person] |
|
1548 | [log.summary|summary: no person] | |
2643 |
|
1549 | |||
2644 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
1550 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2645 | [log.bisect bisect.bad|bisect: bad] |
|
1551 | [log.bisect bisect.bad|bisect: bad] | |
2646 | [log.user|user: person] |
|
1552 | [log.user|user: person] | |
2647 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
1553 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2648 | [log.summary|summary: no user, no domain] |
|
1554 | [log.summary|summary: no user, no domain] | |
2649 |
|
1555 | |||
2650 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
1556 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2651 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
1557 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2652 | [log.branch|branch: foo] |
|
1558 | [log.branch|branch: foo] | |
2653 | [log.user|user: person] |
|
1559 | [log.user|user: person] | |
2654 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
1560 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2655 | [log.summary|summary: new branch] |
|
1561 | [log.summary|summary: new branch] | |
2656 |
|
1562 | |||
2657 | $ hg --color=debug log --debug -T bisect -r 0:4 |
|
1563 | $ hg --color=debug log --debug -T bisect -r 0:4 | |
2658 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
1564 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2659 | [log.bisect bisect.good|bisect: good (implicit)] |
|
1565 | [log.bisect bisect.good|bisect: good (implicit)] | |
2660 | [log.phase|phase: public] |
|
1566 | [log.phase|phase: public] | |
2661 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1567 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2662 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1568 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2663 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] |
|
1569 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] | |
2664 | [log.user|user: User Name <user@hostname>] |
|
1570 | [log.user|user: User Name <user@hostname>] | |
2665 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
1571 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2666 | [ui.debug log.files|files+: a] |
|
1572 | [ui.debug log.files|files+: a] | |
2667 | [ui.debug log.extra|extra: branch=default] |
|
1573 | [ui.debug log.extra|extra: branch=default] | |
2668 | [ui.note log.description|description:] |
|
1574 | [ui.note log.description|description:] | |
2669 | [ui.note log.description|line 1 |
|
1575 | [ui.note log.description|line 1 | |
2670 | line 2] |
|
1576 | line 2] | |
2671 |
|
1577 | |||
2672 |
|
1578 | |||
2673 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
1579 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2674 | [log.bisect bisect.good|bisect: good] |
|
1580 | [log.bisect bisect.good|bisect: good] | |
2675 | [log.phase|phase: public] |
|
1581 | [log.phase|phase: public] | |
2676 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
1582 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2677 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1583 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2678 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] |
|
1584 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] | |
2679 | [log.user|user: A. N. Other <other@place>] |
|
1585 | [log.user|user: A. N. Other <other@place>] | |
2680 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
1586 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2681 | [ui.debug log.files|files+: b] |
|
1587 | [ui.debug log.files|files+: b] | |
2682 | [ui.debug log.extra|extra: branch=default] |
|
1588 | [ui.debug log.extra|extra: branch=default] | |
2683 | [ui.note log.description|description:] |
|
1589 | [ui.note log.description|description:] | |
2684 | [ui.note log.description|other 1 |
|
1590 | [ui.note log.description|other 1 | |
2685 | other 2 |
|
1591 | other 2 | |
2686 |
|
1592 | |||
2687 | other 3] |
|
1593 | other 3] | |
2688 |
|
1594 | |||
2689 |
|
1595 | |||
2690 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
1596 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2691 | [log.bisect bisect.untested|bisect: untested] |
|
1597 | [log.bisect bisect.untested|bisect: untested] | |
2692 | [log.phase|phase: public] |
|
1598 | [log.phase|phase: public] | |
2693 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
1599 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2694 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1600 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2695 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] |
|
1601 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] | |
2696 | [log.user|user: other@place] |
|
1602 | [log.user|user: other@place] | |
2697 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
1603 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2698 | [ui.debug log.files|files+: c] |
|
1604 | [ui.debug log.files|files+: c] | |
2699 | [ui.debug log.extra|extra: branch=default] |
|
1605 | [ui.debug log.extra|extra: branch=default] | |
2700 | [ui.note log.description|description:] |
|
1606 | [ui.note log.description|description:] | |
2701 | [ui.note log.description|no person] |
|
1607 | [ui.note log.description|no person] | |
2702 |
|
1608 | |||
2703 |
|
1609 | |||
2704 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
1610 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2705 | [log.bisect bisect.bad|bisect: bad] |
|
1611 | [log.bisect bisect.bad|bisect: bad] | |
2706 | [log.phase|phase: public] |
|
1612 | [log.phase|phase: public] | |
2707 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
1613 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2708 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1614 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2709 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
1615 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2710 | [log.user|user: person] |
|
1616 | [log.user|user: person] | |
2711 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
1617 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2712 | [ui.debug log.files|files: c] |
|
1618 | [ui.debug log.files|files: c] | |
2713 | [ui.debug log.extra|extra: branch=default] |
|
1619 | [ui.debug log.extra|extra: branch=default] | |
2714 | [ui.note log.description|description:] |
|
1620 | [ui.note log.description|description:] | |
2715 | [ui.note log.description|no user, no domain] |
|
1621 | [ui.note log.description|no user, no domain] | |
2716 |
|
1622 | |||
2717 |
|
1623 | |||
2718 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] |
|
1624 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] | |
2719 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
1625 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2720 | [log.branch|branch: foo] |
|
1626 | [log.branch|branch: foo] | |
2721 | [log.phase|phase: draft] |
|
1627 | [log.phase|phase: draft] | |
2722 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
1628 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2723 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1629 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2724 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
1630 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2725 | [log.user|user: person] |
|
1631 | [log.user|user: person] | |
2726 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
1632 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2727 | [ui.debug log.extra|extra: branch=foo] |
|
1633 | [ui.debug log.extra|extra: branch=foo] | |
2728 | [ui.note log.description|description:] |
|
1634 | [ui.note log.description|description:] | |
2729 | [ui.note log.description|new branch] |
|
1635 | [ui.note log.description|new branch] | |
2730 |
|
1636 | |||
2731 |
|
1637 | |||
2732 | $ hg --color=debug log -v -T bisect -r 0:4 |
|
1638 | $ hg --color=debug log -v -T bisect -r 0:4 | |
2733 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
1639 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2734 | [log.bisect bisect.good|bisect: good (implicit)] |
|
1640 | [log.bisect bisect.good|bisect: good (implicit)] | |
2735 | [log.user|user: User Name <user@hostname>] |
|
1641 | [log.user|user: User Name <user@hostname>] | |
2736 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
1642 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2737 | [ui.note log.files|files: a] |
|
1643 | [ui.note log.files|files: a] | |
2738 | [ui.note log.description|description:] |
|
1644 | [ui.note log.description|description:] | |
2739 | [ui.note log.description|line 1 |
|
1645 | [ui.note log.description|line 1 | |
2740 | line 2] |
|
1646 | line 2] | |
2741 |
|
1647 | |||
2742 |
|
1648 | |||
2743 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
1649 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2744 | [log.bisect bisect.good|bisect: good] |
|
1650 | [log.bisect bisect.good|bisect: good] | |
2745 | [log.user|user: A. N. Other <other@place>] |
|
1651 | [log.user|user: A. N. Other <other@place>] | |
2746 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
1652 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2747 | [ui.note log.files|files: b] |
|
1653 | [ui.note log.files|files: b] | |
2748 | [ui.note log.description|description:] |
|
1654 | [ui.note log.description|description:] | |
2749 | [ui.note log.description|other 1 |
|
1655 | [ui.note log.description|other 1 | |
2750 | other 2 |
|
1656 | other 2 | |
2751 |
|
1657 | |||
2752 | other 3] |
|
1658 | other 3] | |
2753 |
|
1659 | |||
2754 |
|
1660 | |||
2755 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
1661 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2756 | [log.bisect bisect.untested|bisect: untested] |
|
1662 | [log.bisect bisect.untested|bisect: untested] | |
2757 | [log.user|user: other@place] |
|
1663 | [log.user|user: other@place] | |
2758 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
1664 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2759 | [ui.note log.files|files: c] |
|
1665 | [ui.note log.files|files: c] | |
2760 | [ui.note log.description|description:] |
|
1666 | [ui.note log.description|description:] | |
2761 | [ui.note log.description|no person] |
|
1667 | [ui.note log.description|no person] | |
2762 |
|
1668 | |||
2763 |
|
1669 | |||
2764 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
1670 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2765 | [log.bisect bisect.bad|bisect: bad] |
|
1671 | [log.bisect bisect.bad|bisect: bad] | |
2766 | [log.user|user: person] |
|
1672 | [log.user|user: person] | |
2767 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
1673 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2768 | [ui.note log.files|files: c] |
|
1674 | [ui.note log.files|files: c] | |
2769 | [ui.note log.description|description:] |
|
1675 | [ui.note log.description|description:] | |
2770 | [ui.note log.description|no user, no domain] |
|
1676 | [ui.note log.description|no user, no domain] | |
2771 |
|
1677 | |||
2772 |
|
1678 | |||
2773 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
1679 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2774 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
1680 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2775 | [log.branch|branch: foo] |
|
1681 | [log.branch|branch: foo] | |
2776 | [log.user|user: person] |
|
1682 | [log.user|user: person] | |
2777 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
1683 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2778 | [ui.note log.description|description:] |
|
1684 | [ui.note log.description|description:] | |
2779 | [ui.note log.description|new branch] |
|
1685 | [ui.note log.description|new branch] | |
2780 |
|
1686 | |||
2781 |
|
1687 | |||
2782 | $ hg bisect --reset |
|
1688 | $ hg bisect --reset | |
2783 |
|
1689 | |||
2784 | Error on syntax: |
|
|||
2785 |
|
||||
2786 | $ echo 'x = "f' >> t |
|
|||
2787 | $ hg log |
|
|||
2788 | hg: parse error at t:3: unmatched quotes |
|
|||
2789 | [255] |
|
|||
2790 |
|
||||
2791 | $ hg log -T '{date' |
|
|||
2792 | hg: parse error at 1: unterminated template expansion |
|
|||
2793 | ({date |
|
|||
2794 | ^ here) |
|
|||
2795 | [255] |
|
|||
2796 | $ hg log -T '{date(}' |
|
|||
2797 | hg: parse error at 6: not a prefix: end |
|
|||
2798 | ({date(} |
|
|||
2799 | ^ here) |
|
|||
2800 | [255] |
|
|||
2801 | $ hg log -T '{date)}' |
|
|||
2802 | hg: parse error at 5: invalid token |
|
|||
2803 | ({date)} |
|
|||
2804 | ^ here) |
|
|||
2805 | [255] |
|
|||
2806 | $ hg log -T '{date date}' |
|
|||
2807 | hg: parse error at 6: invalid token |
|
|||
2808 | ({date date} |
|
|||
2809 | ^ here) |
|
|||
2810 | [255] |
|
|||
2811 |
|
||||
2812 | $ hg log -T '{}' |
|
|||
2813 | hg: parse error at 1: not a prefix: end |
|
|||
2814 | ({} |
|
|||
2815 | ^ here) |
|
|||
2816 | [255] |
|
|||
2817 | $ hg debugtemplate -v '{()}' |
|
|||
2818 | (template |
|
|||
2819 | (group |
|
|||
2820 | None)) |
|
|||
2821 | * keywords: |
|
|||
2822 | * functions: |
|
|||
2823 | hg: parse error: missing argument |
|
|||
2824 | [255] |
|
|||
2825 |
|
||||
2826 | Behind the scenes, this would throw TypeError without intype=bytes |
|
|||
2827 |
|
||||
2828 | $ hg log -l 3 --template '{date|obfuscate}\n' |
|
|||
2829 | 0.00 |
|
|||
2830 | 0.00 |
|
|||
2831 | 1577872860.00 |
|
|||
2832 |
|
||||
2833 | Behind the scenes, this will throw a ValueError |
|
|||
2834 |
|
||||
2835 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' |
|
|||
2836 | hg: parse error: invalid date: 'Modify, add, remove, rename' |
|
|||
2837 | (template filter 'shortdate' is not compatible with keyword 'desc') |
|
|||
2838 | [255] |
|
|||
2839 |
|
||||
2840 | Behind the scenes, this would throw AttributeError without intype=bytes |
|
|||
2841 |
|
||||
2842 | $ hg log -l 3 --template 'line: {date|escape}\n' |
|
|||
2843 | line: 0.00 |
|
|||
2844 | line: 0.00 |
|
|||
2845 | line: 1577872860.00 |
|
|||
2846 |
|
||||
2847 | $ hg log -l 3 --template 'line: {extras|localdate}\n' |
|
|||
2848 | hg: parse error: localdate expects a date information |
|
|||
2849 | [255] |
|
|||
2850 |
|
||||
2851 | Behind the scenes, this will throw ValueError |
|
|||
2852 |
|
||||
2853 | $ hg tip --template '{author|email|date}\n' |
|
|||
2854 | hg: parse error: date expects a date information |
|
|||
2855 | [255] |
|
|||
2856 |
|
||||
2857 | $ hg tip -T '{author|email|shortdate}\n' |
|
|||
2858 | hg: parse error: invalid date: 'test' |
|
|||
2859 | (template filter 'shortdate' is not compatible with keyword 'author') |
|
|||
2860 | [255] |
|
|||
2861 |
|
||||
2862 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' |
|
|||
2863 | hg: parse error: invalid date: 'default' |
|
|||
2864 | (incompatible use of template filter 'shortdate') |
|
|||
2865 | [255] |
|
|||
2866 |
|
||||
2867 | Error in nested template: |
|
|||
2868 |
|
||||
2869 | $ hg log -T '{"date' |
|
|||
2870 | hg: parse error at 2: unterminated string |
|
|||
2871 | ({"date |
|
|||
2872 | ^ here) |
|
|||
2873 | [255] |
|
|||
2874 |
|
||||
2875 | $ hg log -T '{"foo{date|?}"}' |
|
|||
2876 | hg: parse error at 11: syntax error |
|
|||
2877 | ({"foo{date|?}"} |
|
|||
2878 | ^ here) |
|
|||
2879 | [255] |
|
|||
2880 |
|
||||
2881 | Thrown an error if a template function doesn't exist |
|
|||
2882 |
|
||||
2883 | $ hg tip --template '{foo()}\n' |
|
|||
2884 | hg: parse error: unknown function 'foo' |
|
|||
2885 | [255] |
|
|||
2886 |
|
||||
2887 | Pass generator object created by template function to filter |
|
|||
2888 |
|
||||
2889 | $ hg log -l 1 --template '{if(author, author)|user}\n' |
|
|||
2890 | test |
|
|||
2891 |
|
||||
2892 | Test index keyword: |
|
|||
2893 |
|
||||
2894 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' |
|
|||
2895 | 10 0:a 1:b 2:fifth 3:fourth 4:third |
|
|||
2896 | 11 0:a |
|
|||
2897 |
|
||||
2898 | $ hg branches -T '{index} {branch}\n' |
|
|||
2899 | 0 default |
|
|||
2900 | 1 foo |
|
|||
2901 |
|
||||
2902 | Test diff function: |
|
|||
2903 |
|
||||
2904 | $ hg diff -c 8 |
|
|||
2905 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
|||
2906 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2907 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2908 | @@ -0,0 +1,1 @@ |
|
|||
2909 | +second |
|
|||
2910 | diff -r 29114dbae42b -r 95c24699272e second |
|
|||
2911 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2912 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2913 | @@ -1,1 +0,0 @@ |
|
|||
2914 | -second |
|
|||
2915 | diff -r 29114dbae42b -r 95c24699272e third |
|
|||
2916 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2917 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2918 | @@ -0,0 +1,1 @@ |
|
|||
2919 | +third |
|
|||
2920 |
|
||||
2921 | $ hg log -r 8 -T "{diff()}" |
|
|||
2922 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
|||
2923 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2924 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2925 | @@ -0,0 +1,1 @@ |
|
|||
2926 | +second |
|
|||
2927 | diff -r 29114dbae42b -r 95c24699272e second |
|
|||
2928 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2929 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2930 | @@ -1,1 +0,0 @@ |
|
|||
2931 | -second |
|
|||
2932 | diff -r 29114dbae42b -r 95c24699272e third |
|
|||
2933 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2934 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2935 | @@ -0,0 +1,1 @@ |
|
|||
2936 | +third |
|
|||
2937 |
|
||||
2938 | $ hg log -r 8 -T "{diff('glob:f*')}" |
|
|||
2939 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
|||
2940 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2941 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2942 | @@ -0,0 +1,1 @@ |
|
|||
2943 | +second |
|
|||
2944 |
|
||||
2945 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" |
|
|||
2946 | diff -r 29114dbae42b -r 95c24699272e second |
|
|||
2947 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
|||
2948 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2949 | @@ -1,1 +0,0 @@ |
|
|||
2950 | -second |
|
|||
2951 | diff -r 29114dbae42b -r 95c24699272e third |
|
|||
2952 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2953 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2954 | @@ -0,0 +1,1 @@ |
|
|||
2955 | +third |
|
|||
2956 |
|
||||
2957 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" |
|
|||
2958 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
|||
2959 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
|||
2960 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
|||
2961 | @@ -0,0 +1,1 @@ |
|
|||
2962 | +second |
|
|||
2963 |
|
||||
2964 | ui verbosity: |
|
|||
2965 |
|
||||
2966 | $ hg log -l1 -T '{verbosity}\n' |
|
|||
2967 |
|
||||
2968 | $ hg log -l1 -T '{verbosity}\n' --debug |
|
|||
2969 | debug |
|
|||
2970 | $ hg log -l1 -T '{verbosity}\n' --quiet |
|
|||
2971 | quiet |
|
|||
2972 | $ hg log -l1 -T '{verbosity}\n' --verbose |
|
|||
2973 | verbose |
|
|||
2974 |
|
||||
2975 | $ cd .. |
|
1690 | $ cd .. | |
2976 |
|
1691 | |||
2977 |
|
1692 | Set up latesttag repository: | ||
2978 | latesttag: |
|
|||
2979 |
|
1693 | |||
2980 | $ hg init latesttag |
|
1694 | $ hg init latesttag | |
2981 | $ cd latesttag |
|
1695 | $ cd latesttag | |
2982 |
|
1696 | |||
2983 | $ echo a > file |
|
1697 | $ echo a > file | |
2984 | $ hg ci -Am a -d '0 0' |
|
1698 | $ hg ci -Am a -d '0 0' | |
2985 | adding file |
|
1699 | adding file | |
2986 |
|
1700 | |||
2987 | $ echo b >> file |
|
1701 | $ echo b >> file | |
2988 | $ hg ci -m b -d '1 0' |
|
1702 | $ hg ci -m b -d '1 0' | |
2989 |
|
1703 | |||
2990 | $ echo c >> head1 |
|
1704 | $ echo c >> head1 | |
2991 | $ hg ci -Am h1c -d '2 0' |
|
1705 | $ hg ci -Am h1c -d '2 0' | |
2992 | adding head1 |
|
1706 | adding head1 | |
2993 |
|
1707 | |||
2994 | $ hg update -q 1 |
|
1708 | $ hg update -q 1 | |
2995 | $ echo d >> head2 |
|
1709 | $ echo d >> head2 | |
2996 | $ hg ci -Am h2d -d '3 0' |
|
1710 | $ hg ci -Am h2d -d '3 0' | |
2997 | adding head2 |
|
1711 | adding head2 | |
2998 | created new head |
|
1712 | created new head | |
2999 |
|
1713 | |||
3000 | $ echo e >> head2 |
|
1714 | $ echo e >> head2 | |
3001 | $ hg ci -m h2e -d '4 0' |
|
1715 | $ hg ci -m h2e -d '4 0' | |
3002 |
|
1716 | |||
3003 | $ hg merge -q |
|
1717 | $ hg merge -q | |
3004 | $ hg ci -m merge -d '5 -3600' |
|
1718 | $ hg ci -m merge -d '5 -3600' | |
3005 |
|
1719 | |||
3006 | No tag set: |
|
|||
3007 |
|
||||
3008 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
|||
3009 | @ 5: null+5 |
|
|||
3010 | |\ |
|
|||
3011 | | o 4: null+4 |
|
|||
3012 | | | |
|
|||
3013 | | o 3: null+3 |
|
|||
3014 | | | |
|
|||
3015 | o | 2: null+3 |
|
|||
3016 | |/ |
|
|||
3017 | o 1: null+2 |
|
|||
3018 | | |
|
|||
3019 | o 0: null+1 |
|
|||
3020 |
|
||||
3021 |
|
||||
3022 | One common tag: longest path wins for {latesttagdistance}: |
|
|||
3023 |
|
||||
3024 | $ hg tag -r 1 -m t1 -d '6 0' t1 |
|
1720 | $ hg tag -r 1 -m t1 -d '6 0' t1 | |
3025 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
|||
3026 | @ 6: t1+4 |
|
|||
3027 | | |
|
|||
3028 | o 5: t1+3 |
|
|||
3029 | |\ |
|
|||
3030 | | o 4: t1+2 |
|
|||
3031 | | | |
|
|||
3032 | | o 3: t1+1 |
|
|||
3033 | | | |
|
|||
3034 | o | 2: t1+1 |
|
|||
3035 | |/ |
|
|||
3036 | o 1: t1+0 |
|
|||
3037 | | |
|
|||
3038 | o 0: null+1 |
|
|||
3039 |
|
||||
3040 |
|
||||
3041 | One ancestor tag: closest wins: |
|
|||
3042 |
|
||||
3043 | $ hg tag -r 2 -m t2 -d '7 0' t2 |
|
1721 | $ hg tag -r 2 -m t2 -d '7 0' t2 | |
3044 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
|||
3045 | @ 7: t2+3 |
|
|||
3046 | | |
|
|||
3047 | o 6: t2+2 |
|
|||
3048 | | |
|
|||
3049 | o 5: t2+1 |
|
|||
3050 | |\ |
|
|||
3051 | | o 4: t1+2 |
|
|||
3052 | | | |
|
|||
3053 | | o 3: t1+1 |
|
|||
3054 | | | |
|
|||
3055 | o | 2: t2+0 |
|
|||
3056 | |/ |
|
|||
3057 | o 1: t1+0 |
|
|||
3058 | | |
|
|||
3059 | o 0: null+1 |
|
|||
3060 |
|
||||
3061 |
|
||||
3062 | Two branch tags: more recent wins if same number of changes: |
|
|||
3063 |
|
||||
3064 | $ hg tag -r 3 -m t3 -d '8 0' t3 |
|
1722 | $ hg tag -r 3 -m t3 -d '8 0' t3 | |
3065 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
|||
3066 | @ 8: t3+5 |
|
|||
3067 | | |
|
|||
3068 | o 7: t3+4 |
|
|||
3069 | | |
|
|||
3070 | o 6: t3+3 |
|
|||
3071 | | |
|
|||
3072 | o 5: t3+2 |
|
|||
3073 | |\ |
|
|||
3074 | | o 4: t3+1 |
|
|||
3075 | | | |
|
|||
3076 | | o 3: t3+0 |
|
|||
3077 | | | |
|
|||
3078 | o | 2: t2+0 |
|
|||
3079 | |/ |
|
|||
3080 | o 1: t1+0 |
|
|||
3081 | | |
|
|||
3082 | o 0: null+1 |
|
|||
3083 |
|
||||
3084 |
|
||||
3085 | Two branch tags: fewest changes wins: |
|
|||
3086 |
|
||||
3087 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter |
|
1723 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter | |
3088 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
|||
3089 | @ 9: t4+5,6 |
|
|||
3090 | | |
|
|||
3091 | o 8: t4+4,5 |
|
|||
3092 | | |
|
|||
3093 | o 7: t4+3,4 |
|
|||
3094 | | |
|
|||
3095 | o 6: t4+2,3 |
|
|||
3096 | | |
|
|||
3097 | o 5: t4+1,2 |
|
|||
3098 | |\ |
|
|||
3099 | | o 4: t4+0,0 |
|
|||
3100 | | | |
|
|||
3101 | | o 3: t3+0,0 |
|
|||
3102 | | | |
|
|||
3103 | o | 2: t2+0,0 |
|
|||
3104 | |/ |
|
|||
3105 | o 1: t1+0,0 |
|
|||
3106 | | |
|
|||
3107 | o 0: null+1,1 |
|
|||
3108 |
|
||||
3109 |
|
||||
3110 | Merged tag overrides: |
|
|||
3111 |
|
||||
3112 | $ hg tag -r 5 -m t5 -d '9 0' t5 |
|
1724 | $ hg tag -r 5 -m t5 -d '9 0' t5 | |
3113 | $ hg tag -r 3 -m at3 -d '10 0' at3 |
|
1725 | $ hg tag -r 3 -m at3 -d '10 0' at3 | |
3114 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
|||
3115 | @ 11: t5+6 |
|
|||
3116 | | |
|
|||
3117 | o 10: t5+5 |
|
|||
3118 | | |
|
|||
3119 | o 9: t5+4 |
|
|||
3120 | | |
|
|||
3121 | o 8: t5+3 |
|
|||
3122 | | |
|
|||
3123 | o 7: t5+2 |
|
|||
3124 | | |
|
|||
3125 | o 6: t5+1 |
|
|||
3126 | | |
|
|||
3127 | o 5: t5+0 |
|
|||
3128 | |\ |
|
|||
3129 | | o 4: t4+0 |
|
|||
3130 | | | |
|
|||
3131 | | o 3: at3:t3+0 |
|
|||
3132 | | | |
|
|||
3133 | o | 2: t2+0 |
|
|||
3134 | |/ |
|
|||
3135 | o 1: t1+0 |
|
|||
3136 | | |
|
|||
3137 | o 0: null+1 |
|
|||
3138 |
|
||||
3139 |
|
||||
3140 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
|||
3141 | @ 11: t5+6,6 |
|
|||
3142 | | |
|
|||
3143 | o 10: t5+5,5 |
|
|||
3144 | | |
|
|||
3145 | o 9: t5+4,4 |
|
|||
3146 | | |
|
|||
3147 | o 8: t5+3,3 |
|
|||
3148 | | |
|
|||
3149 | o 7: t5+2,2 |
|
|||
3150 | | |
|
|||
3151 | o 6: t5+1,1 |
|
|||
3152 | | |
|
|||
3153 | o 5: t5+0,0 |
|
|||
3154 | |\ |
|
|||
3155 | | o 4: t4+0,0 |
|
|||
3156 | | | |
|
|||
3157 | | o 3: at3+0,0 t3+0,0 |
|
|||
3158 | | | |
|
|||
3159 | o | 2: t2+0,0 |
|
|||
3160 | |/ |
|
|||
3161 | o 1: t1+0,0 |
|
|||
3162 | | |
|
|||
3163 | o 0: null+1,1 |
|
|||
3164 |
|
||||
3165 |
|
||||
3166 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" |
|
|||
3167 | @ 11: t3, C: 9, D: 8 |
|
|||
3168 | | |
|
|||
3169 | o 10: t3, C: 8, D: 7 |
|
|||
3170 | | |
|
|||
3171 | o 9: t3, C: 7, D: 6 |
|
|||
3172 | | |
|
|||
3173 | o 8: t3, C: 6, D: 5 |
|
|||
3174 | | |
|
|||
3175 | o 7: t3, C: 5, D: 4 |
|
|||
3176 | | |
|
|||
3177 | o 6: t3, C: 4, D: 3 |
|
|||
3178 | | |
|
|||
3179 | o 5: t3, C: 3, D: 2 |
|
|||
3180 | |\ |
|
|||
3181 | | o 4: t3, C: 1, D: 1 |
|
|||
3182 | | | |
|
|||
3183 | | o 3: t3, C: 0, D: 0 |
|
|||
3184 | | | |
|
|||
3185 | o | 2: t1, C: 1, D: 1 |
|
|||
3186 | |/ |
|
|||
3187 | o 1: t1, C: 0, D: 0 |
|
|||
3188 | | |
|
|||
3189 | o 0: null, C: 1, D: 1 |
|
|||
3190 |
|
||||
3191 |
|
1726 | |||
3192 | $ cd .. |
|
1727 | $ cd .. | |
3193 |
|
1728 | |||
3194 |
|
||||
3195 | Style path expansion: issue1948 - ui.style option doesn't work on OSX |
|
1729 | Style path expansion: issue1948 - ui.style option doesn't work on OSX | |
3196 | if it is a relative path |
|
1730 | if it is a relative path | |
3197 |
|
1731 | |||
3198 | $ mkdir -p home/styles |
|
1732 | $ mkdir -p home/styles | |
3199 |
|
1733 | |||
3200 | $ cat > home/styles/teststyle <<EOF |
|
1734 | $ cat > home/styles/teststyle <<EOF | |
3201 | > changeset = 'test {rev}:{node|short}\n' |
|
1735 | > changeset = 'test {rev}:{node|short}\n' | |
3202 | > EOF |
|
1736 | > EOF | |
3203 |
|
1737 | |||
3204 | $ HOME=`pwd`/home; export HOME |
|
1738 | $ HOME=`pwd`/home; export HOME | |
3205 |
|
1739 | |||
3206 | $ cat > latesttag/.hg/hgrc <<EOF |
|
1740 | $ cat > latesttag/.hg/hgrc <<EOF | |
3207 | > [ui] |
|
1741 | > [ui] | |
3208 | > style = ~/styles/teststyle |
|
1742 | > style = ~/styles/teststyle | |
3209 | > EOF |
|
1743 | > EOF | |
3210 |
|
1744 | |||
3211 | $ hg -R latesttag tip |
|
1745 | $ hg -R latesttag tip | |
3212 | test 11:97e5943b523a |
|
1746 | test 11:97e5943b523a | |
3213 |
|
1747 | |||
3214 | Test recursive showlist template (issue1989): |
|
1748 | Test recursive showlist template (issue1989): | |
3215 |
|
1749 | |||
3216 | $ cat > style1989 <<EOF |
|
1750 | $ cat > style1989 <<EOF | |
3217 | > changeset = '{file_mods}{manifest}{extras}' |
|
1751 | > changeset = '{file_mods}{manifest}{extras}' | |
3218 | > file_mod = 'M|{author|person}\n' |
|
1752 | > file_mod = 'M|{author|person}\n' | |
3219 | > manifest = '{rev},{author}\n' |
|
1753 | > manifest = '{rev},{author}\n' | |
3220 | > extra = '{key}: {author}\n' |
|
1754 | > extra = '{key}: {author}\n' | |
3221 | > EOF |
|
1755 | > EOF | |
3222 |
|
1756 | |||
3223 | $ hg -R latesttag log -r tip --style=style1989 |
|
1757 | $ hg -R latesttag log -r tip --style=style1989 | |
3224 | M|test |
|
1758 | M|test | |
3225 | 11,test |
|
1759 | 11,test | |
3226 | branch: test |
|
1760 | branch: test | |
3227 |
|
||||
3228 | Test new-style inline templating: |
|
|||
3229 |
|
||||
3230 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
|
|||
3231 | modified files: .hgtags |
|
|||
3232 |
|
||||
3233 |
|
||||
3234 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' |
|
|||
3235 | hg: parse error: 11 is not iterable of mappings |
|
|||
3236 | (keyword 'rev' does not support map operation) |
|
|||
3237 | [255] |
|
|||
3238 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' |
|
|||
3239 | hg: parse error: None is not iterable of mappings |
|
|||
3240 | [255] |
|
|||
3241 | $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}' |
|
|||
3242 | hg: parse error: list of strings is not mappable |
|
|||
3243 | [255] |
|
|||
3244 |
|
||||
3245 | Test new-style inline templating of non-list/dict type: |
|
|||
3246 |
|
||||
3247 | $ hg log -R latesttag -r tip -T '{manifest}\n' |
|
|||
3248 | 11:2bc6e9006ce2 |
|
|||
3249 | $ hg log -R latesttag -r tip -T 'string length: {manifest|count}\n' |
|
|||
3250 | string length: 15 |
|
|||
3251 | $ hg log -R latesttag -r tip -T '{manifest % "{rev}:{node}"}\n' |
|
|||
3252 | 11:2bc6e9006ce29882383a22d39fd1f4e66dd3e2fc |
|
|||
3253 |
|
||||
3254 | $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}' |
|
|||
3255 | branch: default |
|
|||
3256 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' |
|
|||
3257 | hg: parse error: None is not iterable of mappings |
|
|||
3258 | [255] |
|
|||
3259 | $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' |
|
|||
3260 | branch: default |
|
|||
3261 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}' |
|
|||
3262 | 0:ce3cec86e6c2 |
|
|||
3263 | $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}' |
|
|||
3264 | 9:fbc7cd862e9c |
|
|||
3265 |
|
||||
3266 | Test manifest/get() can be join()-ed as string, though it's silly: |
|
|||
3267 |
|
||||
3268 | $ hg log -R latesttag -r tip -T '{join(manifest, ".")}\n' |
|
|||
3269 | 1.1.:.2.b.c.6.e.9.0.0.6.c.e.2 |
|
|||
3270 | $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), ".")}\n' |
|
|||
3271 | d.e.f.a.u.l.t |
|
|||
3272 |
|
||||
3273 | Test join() over string |
|
|||
3274 |
|
||||
3275 | $ hg log -R latesttag -r tip -T '{join(rev|stringify, ".")}\n' |
|
|||
3276 | 1.1 |
|
|||
3277 |
|
||||
3278 | Test join() over uniterable |
|
|||
3279 |
|
||||
3280 | $ hg log -R latesttag -r tip -T '{join(rev, "")}\n' |
|
|||
3281 | hg: parse error: 11 is not iterable |
|
|||
3282 | [255] |
|
|||
3283 |
|
||||
3284 | Test min/max of integers |
|
|||
3285 |
|
||||
3286 | $ hg log -R latesttag -l1 -T '{min(revset("9:10"))}\n' |
|
|||
3287 | 9 |
|
|||
3288 | $ hg log -R latesttag -l1 -T '{max(revset("9:10"))}\n' |
|
|||
3289 | 10 |
|
|||
3290 |
|
||||
3291 | Test min/max over map operation: |
|
|||
3292 |
|
||||
3293 | $ hg log -R latesttag -r3 -T '{min(tags % "{tag}")}\n' |
|
|||
3294 | at3 |
|
|||
3295 | $ hg log -R latesttag -r3 -T '{max(tags % "{tag}")}\n' |
|
|||
3296 | t3 |
|
|||
3297 |
|
||||
3298 | Test min/max of strings: |
|
|||
3299 |
|
||||
3300 | $ hg log -R latesttag -l1 -T '{min(desc)}\n' |
|
|||
3301 | 3 |
|
|||
3302 | $ hg log -R latesttag -l1 -T '{max(desc)}\n' |
|
|||
3303 | t |
|
|||
3304 |
|
||||
3305 | Test min/max of non-iterable: |
|
|||
3306 |
|
||||
3307 | $ hg debugtemplate '{min(1)}' |
|
|||
3308 | hg: parse error: 1 is not iterable |
|
|||
3309 | (min first argument should be an iterable) |
|
|||
3310 | [255] |
|
|||
3311 | $ hg debugtemplate '{max(2)}' |
|
|||
3312 | hg: parse error: 2 is not iterable |
|
|||
3313 | (max first argument should be an iterable) |
|
|||
3314 | [255] |
|
|||
3315 |
|
||||
3316 | $ hg log -R latesttag -l1 -T '{min(date)}' |
|
|||
3317 | hg: parse error: date is not iterable |
|
|||
3318 | (min first argument should be an iterable) |
|
|||
3319 | [255] |
|
|||
3320 | $ hg log -R latesttag -l1 -T '{max(date)}' |
|
|||
3321 | hg: parse error: date is not iterable |
|
|||
3322 | (max first argument should be an iterable) |
|
|||
3323 | [255] |
|
|||
3324 |
|
||||
3325 | Test min/max of empty sequence: |
|
|||
3326 |
|
||||
3327 | $ hg debugtemplate '{min("")}' |
|
|||
3328 | hg: parse error: empty string |
|
|||
3329 | (min first argument should be an iterable) |
|
|||
3330 | [255] |
|
|||
3331 | $ hg debugtemplate '{max("")}' |
|
|||
3332 | hg: parse error: empty string |
|
|||
3333 | (max first argument should be an iterable) |
|
|||
3334 | [255] |
|
|||
3335 | $ hg debugtemplate '{min(dict())}' |
|
|||
3336 | hg: parse error: empty sequence |
|
|||
3337 | (min first argument should be an iterable) |
|
|||
3338 | [255] |
|
|||
3339 | $ hg debugtemplate '{max(dict())}' |
|
|||
3340 | hg: parse error: empty sequence |
|
|||
3341 | (max first argument should be an iterable) |
|
|||
3342 | [255] |
|
|||
3343 | $ hg debugtemplate '{min(dict() % "")}' |
|
|||
3344 | hg: parse error: empty sequence |
|
|||
3345 | (min first argument should be an iterable) |
|
|||
3346 | [255] |
|
|||
3347 | $ hg debugtemplate '{max(dict() % "")}' |
|
|||
3348 | hg: parse error: empty sequence |
|
|||
3349 | (max first argument should be an iterable) |
|
|||
3350 | [255] |
|
|||
3351 |
|
||||
3352 | Test min/max of if() result |
|
|||
3353 |
|
||||
3354 | $ cd latesttag |
|
|||
3355 | $ hg log -l1 -T '{min(if(true, revset("9:10"), ""))}\n' |
|
|||
3356 | 9 |
|
|||
3357 | $ hg log -l1 -T '{max(if(false, "", revset("9:10")))}\n' |
|
|||
3358 | 10 |
|
|||
3359 | $ hg log -l1 -T '{min(ifcontains("a", "aa", revset("9:10"), ""))}\n' |
|
|||
3360 | 9 |
|
|||
3361 | $ hg log -l1 -T '{max(ifcontains("a", "bb", "", revset("9:10")))}\n' |
|
|||
3362 | 10 |
|
|||
3363 | $ hg log -l1 -T '{min(ifeq(0, 0, revset("9:10"), ""))}\n' |
|
|||
3364 | 9 |
|
|||
3365 | $ hg log -l1 -T '{max(ifeq(0, 1, "", revset("9:10")))}\n' |
|
|||
3366 | 10 |
|
|||
3367 | $ cd .. |
|
|||
3368 |
|
||||
3369 | Test laziness of if() then/else clause |
|
|||
3370 |
|
||||
3371 | $ hg debugtemplate '{count(0)}' |
|
|||
3372 | hg: parse error: not countable |
|
|||
3373 | (incompatible use of template filter 'count') |
|
|||
3374 | [255] |
|
|||
3375 | $ hg debugtemplate '{if(true, "", count(0))}' |
|
|||
3376 | $ hg debugtemplate '{if(false, count(0), "")}' |
|
|||
3377 | $ hg debugtemplate '{ifcontains("a", "aa", "", count(0))}' |
|
|||
3378 | $ hg debugtemplate '{ifcontains("a", "bb", count(0), "")}' |
|
|||
3379 | $ hg debugtemplate '{ifeq(0, 0, "", count(0))}' |
|
|||
3380 | $ hg debugtemplate '{ifeq(0, 1, count(0), "")}' |
|
|||
3381 |
|
||||
3382 | Test dot operator precedence: |
|
|||
3383 |
|
||||
3384 | $ hg debugtemplate -R latesttag -r0 -v '{manifest.node|short}\n' |
|
|||
3385 | (template |
|
|||
3386 | (| |
|
|||
3387 | (. |
|
|||
3388 | (symbol 'manifest') |
|
|||
3389 | (symbol 'node')) |
|
|||
3390 | (symbol 'short')) |
|
|||
3391 | (string '\n')) |
|
|||
3392 | * keywords: manifest, node, rev |
|
|||
3393 | * functions: formatnode, short |
|
|||
3394 | 89f4071fec70 |
|
|||
3395 |
|
||||
3396 | (the following examples are invalid, but seem natural in parsing POV) |
|
|||
3397 |
|
||||
3398 | $ hg debugtemplate -R latesttag -r0 -v '{foo|bar.baz}\n' 2> /dev/null |
|
|||
3399 | (template |
|
|||
3400 | (| |
|
|||
3401 | (symbol 'foo') |
|
|||
3402 | (. |
|
|||
3403 | (symbol 'bar') |
|
|||
3404 | (symbol 'baz'))) |
|
|||
3405 | (string '\n')) |
|
|||
3406 | [255] |
|
|||
3407 | $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null |
|
|||
3408 | (template |
|
|||
3409 | (. |
|
|||
3410 | (symbol 'foo') |
|
|||
3411 | (func |
|
|||
3412 | (symbol 'bar') |
|
|||
3413 | None)) |
|
|||
3414 | (string '\n')) |
|
|||
3415 | * keywords: foo |
|
|||
3416 | * functions: bar |
|
|||
3417 | [255] |
|
|||
3418 |
|
||||
3419 | Test evaluation of dot operator: |
|
|||
3420 |
|
||||
3421 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")).node}\n' |
|
|||
3422 | ce3cec86e6c26bd9bdfc590a6b92abc9680f1796 |
|
|||
3423 | $ hg log -R latesttag -r0 -T '{extras.branch}\n' |
|
|||
3424 | default |
|
|||
3425 | $ hg log -R latesttag -r0 -T '{date.unixtime} {localdate(date, "+0200").tzoffset}\n' |
|
|||
3426 | 0 -7200 |
|
|||
3427 |
|
||||
3428 | $ hg log -R latesttag -l1 -T '{author.invalid}\n' |
|
|||
3429 | hg: parse error: 'test' is not a dictionary |
|
|||
3430 | (keyword 'author' does not support member operation) |
|
|||
3431 | [255] |
|
|||
3432 | $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n' |
|
|||
3433 | hg: parse error: 'a' is not a dictionary |
|
|||
3434 | [255] |
|
|||
3435 |
|
||||
3436 | Test the sub function of templating for expansion: |
|
|||
3437 |
|
||||
3438 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' |
|
|||
3439 | xx |
|
|||
3440 |
|
||||
3441 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' |
|
|||
3442 | hg: parse error: sub got an invalid pattern: [ |
|
|||
3443 | [255] |
|
|||
3444 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' |
|
|||
3445 | hg: parse error: sub got an invalid replacement: \1 |
|
|||
3446 | [255] |
|
|||
3447 |
|
||||
3448 | Test the strip function with chars specified: |
|
|||
3449 |
|
||||
3450 | $ hg log -R latesttag --template '{desc}\n' |
|
|||
3451 | at3 |
|
|||
3452 | t5 |
|
|||
3453 | t4 |
|
|||
3454 | t3 |
|
|||
3455 | t2 |
|
|||
3456 | t1 |
|
|||
3457 | merge |
|
|||
3458 | h2e |
|
|||
3459 | h2d |
|
|||
3460 | h1c |
|
|||
3461 | b |
|
|||
3462 | a |
|
|||
3463 |
|
||||
3464 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' |
|
|||
3465 | at3 |
|
|||
3466 | 5 |
|
|||
3467 | 4 |
|
|||
3468 | 3 |
|
|||
3469 | 2 |
|
|||
3470 | 1 |
|
|||
3471 | merg |
|
|||
3472 | h2 |
|
|||
3473 | h2d |
|
|||
3474 | h1c |
|
|||
3475 | b |
|
|||
3476 | a |
|
|||
3477 |
|
||||
3478 | Test date format: |
|
|||
3479 |
|
||||
3480 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' |
|
|||
3481 | date: 70 01 01 10 +0000 |
|
|||
3482 | date: 70 01 01 09 +0000 |
|
|||
3483 | date: 70 01 01 04 +0000 |
|
|||
3484 | date: 70 01 01 08 +0000 |
|
|||
3485 | date: 70 01 01 07 +0000 |
|
|||
3486 | date: 70 01 01 06 +0000 |
|
|||
3487 | date: 70 01 01 05 +0100 |
|
|||
3488 | date: 70 01 01 04 +0000 |
|
|||
3489 | date: 70 01 01 03 +0000 |
|
|||
3490 | date: 70 01 01 02 +0000 |
|
|||
3491 | date: 70 01 01 01 +0000 |
|
|||
3492 | date: 70 01 01 00 +0000 |
|
|||
3493 |
|
||||
3494 | Test invalid date: |
|
|||
3495 |
|
||||
3496 | $ hg log -R latesttag -T '{date(rev)}\n' |
|
|||
3497 | hg: parse error: date expects a date information |
|
|||
3498 | [255] |
|
|||
3499 |
|
||||
3500 | Test integer literal: |
|
|||
3501 |
|
||||
3502 | $ hg debugtemplate -v '{(0)}\n' |
|
|||
3503 | (template |
|
|||
3504 | (group |
|
|||
3505 | (integer '0')) |
|
|||
3506 | (string '\n')) |
|
|||
3507 | * keywords: |
|
|||
3508 | * functions: |
|
|||
3509 | 0 |
|
|||
3510 | $ hg debugtemplate -v '{(123)}\n' |
|
|||
3511 | (template |
|
|||
3512 | (group |
|
|||
3513 | (integer '123')) |
|
|||
3514 | (string '\n')) |
|
|||
3515 | * keywords: |
|
|||
3516 | * functions: |
|
|||
3517 | 123 |
|
|||
3518 | $ hg debugtemplate -v '{(-4)}\n' |
|
|||
3519 | (template |
|
|||
3520 | (group |
|
|||
3521 | (negate |
|
|||
3522 | (integer '4'))) |
|
|||
3523 | (string '\n')) |
|
|||
3524 | * keywords: |
|
|||
3525 | * functions: |
|
|||
3526 | -4 |
|
|||
3527 | $ hg debugtemplate '{(-)}\n' |
|
|||
3528 | hg: parse error at 3: not a prefix: ) |
|
|||
3529 | ({(-)}\n |
|
|||
3530 | ^ here) |
|
|||
3531 | [255] |
|
|||
3532 | $ hg debugtemplate '{(-a)}\n' |
|
|||
3533 | hg: parse error: negation needs an integer argument |
|
|||
3534 | [255] |
|
|||
3535 |
|
||||
3536 | top-level integer literal is interpreted as symbol (i.e. variable name): |
|
|||
3537 |
|
||||
3538 | $ hg debugtemplate -D 1=one -v '{1}\n' |
|
|||
3539 | (template |
|
|||
3540 | (integer '1') |
|
|||
3541 | (string '\n')) |
|
|||
3542 | * keywords: |
|
|||
3543 | * functions: |
|
|||
3544 | one |
|
|||
3545 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' |
|
|||
3546 | (template |
|
|||
3547 | (func |
|
|||
3548 | (symbol 'if') |
|
|||
3549 | (list |
|
|||
3550 | (string 't') |
|
|||
3551 | (template |
|
|||
3552 | (integer '1')))) |
|
|||
3553 | (string '\n')) |
|
|||
3554 | * keywords: |
|
|||
3555 | * functions: if |
|
|||
3556 | one |
|
|||
3557 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' |
|
|||
3558 | (template |
|
|||
3559 | (| |
|
|||
3560 | (integer '1') |
|
|||
3561 | (symbol 'stringify')) |
|
|||
3562 | (string '\n')) |
|
|||
3563 | * keywords: |
|
|||
3564 | * functions: stringify |
|
|||
3565 | one |
|
|||
3566 |
|
||||
3567 | unless explicit symbol is expected: |
|
|||
3568 |
|
||||
3569 | $ hg log -Ra -r0 -T '{desc|1}\n' |
|
|||
3570 | hg: parse error: expected a symbol, got 'integer' |
|
|||
3571 | [255] |
|
|||
3572 | $ hg log -Ra -r0 -T '{1()}\n' |
|
|||
3573 | hg: parse error: expected a symbol, got 'integer' |
|
|||
3574 | [255] |
|
|||
3575 |
|
||||
3576 | Test string literal: |
|
|||
3577 |
|
||||
3578 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' |
|
|||
3579 | (template |
|
|||
3580 | (string 'string with no template fragment') |
|
|||
3581 | (string '\n')) |
|
|||
3582 | * keywords: |
|
|||
3583 | * functions: |
|
|||
3584 | string with no template fragment |
|
|||
3585 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' |
|
|||
3586 | (template |
|
|||
3587 | (template |
|
|||
3588 | (string 'template: ') |
|
|||
3589 | (symbol 'rev')) |
|
|||
3590 | (string '\n')) |
|
|||
3591 | * keywords: rev |
|
|||
3592 | * functions: |
|
|||
3593 | template: 0 |
|
|||
3594 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' |
|
|||
3595 | (template |
|
|||
3596 | (string 'rawstring: {rev}') |
|
|||
3597 | (string '\n')) |
|
|||
3598 | * keywords: |
|
|||
3599 | * functions: |
|
|||
3600 | rawstring: {rev} |
|
|||
3601 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' |
|
|||
3602 | (template |
|
|||
3603 | (% |
|
|||
3604 | (symbol 'files') |
|
|||
3605 | (string 'rawstring: {file}')) |
|
|||
3606 | (string '\n')) |
|
|||
3607 | * keywords: files |
|
|||
3608 | * functions: |
|
|||
3609 | rawstring: {file} |
|
|||
3610 |
|
||||
3611 | Test string escaping: |
|
|||
3612 |
|
||||
3613 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
|||
3614 | > |
|
|||
3615 | <>\n<[> |
|
|||
3616 | <>\n<]> |
|
|||
3617 | <>\n< |
|
|||
3618 |
|
||||
3619 | $ hg log -R latesttag -r 0 \ |
|
|||
3620 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
|||
3621 | > |
|
|||
3622 | <>\n<[> |
|
|||
3623 | <>\n<]> |
|
|||
3624 | <>\n< |
|
|||
3625 |
|
||||
3626 | $ hg log -R latesttag -r 0 -T esc \ |
|
|||
3627 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
|||
3628 | > |
|
|||
3629 | <>\n<[> |
|
|||
3630 | <>\n<]> |
|
|||
3631 | <>\n< |
|
|||
3632 |
|
||||
3633 | $ cat <<'EOF' > esctmpl |
|
|||
3634 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
|||
3635 | > EOF |
|
|||
3636 | $ hg log -R latesttag -r 0 --style ./esctmpl |
|
|||
3637 | > |
|
|||
3638 | <>\n<[> |
|
|||
3639 | <>\n<]> |
|
|||
3640 | <>\n< |
|
|||
3641 |
|
||||
3642 | Test string escaping of quotes: |
|
|||
3643 |
|
||||
3644 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
|||
3645 | " |
|
|||
3646 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
|||
3647 | \" |
|
|||
3648 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
|||
3649 | \" |
|
|||
3650 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
|||
3651 | \\\" |
|
|||
3652 |
|
||||
3653 |
|
||||
3654 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
|||
3655 | " |
|
|||
3656 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
|||
3657 | \" |
|
|||
3658 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
|||
3659 | \" |
|
|||
3660 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
|||
3661 | \\\" |
|
|||
3662 |
|
||||
3663 | Test exception in quoted template. single backslash before quotation mark is |
|
|||
3664 | stripped before parsing: |
|
|||
3665 |
|
||||
3666 | $ cat <<'EOF' > escquotetmpl |
|
|||
3667 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" |
|
|||
3668 | > EOF |
|
|||
3669 | $ cd latesttag |
|
|||
3670 | $ hg log -r 2 --style ../escquotetmpl |
|
|||
3671 | " \" \" \\" head1 |
|
|||
3672 |
|
||||
3673 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' |
|
|||
3674 | valid |
|
|||
3675 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" |
|
|||
3676 | valid |
|
|||
3677 |
|
||||
3678 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested |
|
|||
3679 | _evalifliteral() templates (issue4733): |
|
|||
3680 |
|
||||
3681 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' |
|
|||
3682 | "2 |
|
|||
3683 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' |
|
|||
3684 | "2 |
|
|||
3685 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' |
|
|||
3686 | "2 |
|
|||
3687 |
|
||||
3688 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' |
|
|||
3689 | \" |
|
|||
3690 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' |
|
|||
3691 | \" |
|
|||
3692 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
|||
3693 | \" |
|
|||
3694 |
|
||||
3695 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' |
|
|||
3696 | \\\" |
|
|||
3697 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' |
|
|||
3698 | \\\" |
|
|||
3699 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
|||
3700 | \\\" |
|
|||
3701 |
|
||||
3702 | escaped single quotes and errors: |
|
|||
3703 |
|
||||
3704 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' |
|
|||
3705 | foo |
|
|||
3706 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' |
|
|||
3707 | foo |
|
|||
3708 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' |
|
|||
3709 | hg: parse error at 21: unterminated string |
|
|||
3710 | ({if(rev, "{if(rev, \")}")}\n |
|
|||
3711 | ^ here) |
|
|||
3712 | [255] |
|
|||
3713 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' |
|
|||
3714 | hg: parse error: trailing \ in string |
|
|||
3715 | [255] |
|
|||
3716 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' |
|
|||
3717 | hg: parse error: trailing \ in string |
|
|||
3718 | [255] |
|
|||
3719 |
|
||||
3720 | $ cd .. |
|
|||
3721 |
|
||||
3722 | Test leading backslashes: |
|
|||
3723 |
|
||||
3724 | $ cd latesttag |
|
|||
3725 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' |
|
|||
3726 | {rev} {file} |
|
|||
3727 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' |
|
|||
3728 | \2 \head1 |
|
|||
3729 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' |
|
|||
3730 | \{rev} \{file} |
|
|||
3731 | $ cd .. |
|
|||
3732 |
|
||||
3733 | Test leading backslashes in "if" expression (issue4714): |
|
|||
3734 |
|
||||
3735 | $ cd latesttag |
|
|||
3736 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' |
|
|||
3737 | {rev} \{rev} |
|
|||
3738 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' |
|
|||
3739 | \2 \\{rev} |
|
|||
3740 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' |
|
|||
3741 | \{rev} \\\{rev} |
|
|||
3742 | $ cd .. |
|
|||
3743 |
|
||||
3744 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) |
|
|||
3745 |
|
||||
3746 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' |
|
|||
3747 | \x6e |
|
|||
3748 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' |
|
|||
3749 | \x5c\x786e |
|
|||
3750 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' |
|
|||
3751 | \x6e |
|
|||
3752 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' |
|
|||
3753 | \x5c\x786e |
|
|||
3754 |
|
||||
3755 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' |
|
|||
3756 | \x6e |
|
|||
3757 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' |
|
|||
3758 | \x5c\x786e |
|
|||
3759 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' |
|
|||
3760 | \x6e |
|
|||
3761 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' |
|
|||
3762 | \x5c\x786e |
|
|||
3763 |
|
||||
3764 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' |
|
|||
3765 | fourth |
|
|||
3766 | second |
|
|||
3767 | third |
|
|||
3768 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' |
|
|||
3769 | fourth\nsecond\nthird |
|
|||
3770 |
|
||||
3771 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' |
|
|||
3772 | <p> |
|
|||
3773 | 1st |
|
|||
3774 | </p> |
|
|||
3775 | <p> |
|
|||
3776 | 2nd |
|
|||
3777 | </p> |
|
|||
3778 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' |
|
|||
3779 | <p> |
|
|||
3780 | 1st\n\n2nd |
|
|||
3781 | </p> |
|
|||
3782 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' |
|
|||
3783 | 1st |
|
|||
3784 |
|
||||
3785 | 2nd |
|
|||
3786 |
|
||||
3787 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' |
|
|||
3788 | o perso |
|
|||
3789 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' |
|
|||
3790 | no person |
|
|||
3791 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' |
|
|||
3792 | o perso |
|
|||
3793 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' |
|
|||
3794 | no perso |
|
|||
3795 |
|
||||
3796 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' |
|
|||
3797 | -o perso- |
|
|||
3798 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' |
|
|||
3799 | no person |
|
|||
3800 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' |
|
|||
3801 | \x2do perso\x2d |
|
|||
3802 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' |
|
|||
3803 | -o perso- |
|
|||
3804 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' |
|
|||
3805 | \x2do perso\x6e |
|
|||
3806 |
|
||||
3807 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' |
|
|||
3808 | fourth |
|
|||
3809 | second |
|
|||
3810 | third |
|
|||
3811 |
|
||||
3812 | Test string escaping in nested expression: |
|
|||
3813 |
|
||||
3814 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' |
|
|||
3815 | fourth\x6esecond\x6ethird |
|
|||
3816 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' |
|
|||
3817 | fourth\x6esecond\x6ethird |
|
|||
3818 |
|
||||
3819 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' |
|
|||
3820 | fourth\x6esecond\x6ethird |
|
|||
3821 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' |
|
|||
3822 | fourth\x5c\x786esecond\x5c\x786ethird |
|
|||
3823 |
|
||||
3824 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' |
|
|||
3825 | 3:\x6eo user, \x6eo domai\x6e |
|
|||
3826 | 4:\x5c\x786eew bra\x5c\x786ech |
|
|||
3827 |
|
||||
3828 | Test quotes in nested expression are evaluated just like a $(command) |
|
|||
3829 | substitution in POSIX shells: |
|
|||
3830 |
|
||||
3831 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' |
|
|||
3832 | 8:95c24699272e |
|
|||
3833 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' |
|
|||
3834 | {8} "95c24699272e" |
|
|||
3835 |
|
||||
3836 | Test recursive evaluation: |
|
|||
3837 |
|
||||
3838 | $ hg init r |
|
|||
3839 | $ cd r |
|
|||
3840 | $ echo a > a |
|
|||
3841 | $ hg ci -Am '{rev}' |
|
|||
3842 | adding a |
|
|||
3843 | $ hg log -r 0 --template '{if(rev, desc)}\n' |
|
|||
3844 | {rev} |
|
|||
3845 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' |
|
|||
3846 | test 0 |
|
|||
3847 |
|
||||
3848 | $ hg branch -q 'text.{rev}' |
|
|||
3849 | $ echo aa >> aa |
|
|||
3850 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' |
|
|||
3851 |
|
||||
3852 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' |
|
|||
3853 | {node|short}desc to |
|
|||
3854 | text.{rev}be wrapped |
|
|||
3855 | text.{rev}desc to be |
|
|||
3856 | text.{rev}wrapped (no-eol) |
|
|||
3857 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' |
|
|||
3858 | bcc7ff960b8e:desc to |
|
|||
3859 | text.1:be wrapped |
|
|||
3860 | text.1:desc to be |
|
|||
3861 | text.1:wrapped (no-eol) |
|
|||
3862 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' |
|
|||
3863 | hg: parse error: fill expects an integer width |
|
|||
3864 | [255] |
|
|||
3865 |
|
||||
3866 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' |
|
|||
3867 | bcc7ff960b8e:desc to be |
|
|||
3868 | termwidth.1:wrapped desc |
|
|||
3869 | termwidth.1:to be wrapped (no-eol) |
|
|||
3870 |
|
||||
3871 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
|||
3872 | {node|short} (no-eol) |
|
|||
3873 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' |
|
|||
3874 | bcc-ff---b-e (no-eol) |
|
|||
3875 |
|
||||
3876 | $ cat >> .hg/hgrc <<EOF |
|
|||
3877 | > [extensions] |
|
|||
3878 | > color= |
|
|||
3879 | > [color] |
|
|||
3880 | > mode=ansi |
|
|||
3881 | > text.{rev} = red |
|
|||
3882 | > text.1 = green |
|
|||
3883 | > EOF |
|
|||
3884 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' |
|
|||
3885 | \x1b[0;31mtext\x1b[0m (esc) |
|
|||
3886 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' |
|
|||
3887 | \x1b[0;32mtext\x1b[0m (esc) |
|
|||
3888 |
|
||||
3889 | color effect can be specified without quoting: |
|
|||
3890 |
|
||||
3891 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' |
|
|||
3892 | \x1b[0;31mtext\x1b[0m (esc) |
|
|||
3893 |
|
||||
3894 | color effects can be nested (issue5413) |
|
|||
3895 |
|
||||
3896 | $ hg debugtemplate --color=always \ |
|
|||
3897 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' |
|
|||
3898 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) |
|
|||
3899 |
|
||||
3900 | pad() should interact well with color codes (issue5416) |
|
|||
3901 |
|
||||
3902 | $ hg debugtemplate --color=always \ |
|
|||
3903 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' |
|
|||
3904 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) |
|
|||
3905 |
|
||||
3906 | label should be no-op if color is disabled: |
|
|||
3907 |
|
||||
3908 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' |
|
|||
3909 | text |
|
|||
3910 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' |
|
|||
3911 | text |
|
|||
3912 |
|
||||
3913 | Test branches inside if statement: |
|
|||
3914 |
|
||||
3915 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' |
|
|||
3916 | no |
|
|||
3917 |
|
||||
3918 | Test dict constructor: |
|
|||
3919 |
|
||||
3920 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' |
|
|||
3921 | y=f7769ec2ab97 x=0 |
|
|||
3922 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' |
|
|||
3923 | x=0 |
|
|||
3924 | y=f7769ec2ab97 |
|
|||
3925 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' |
|
|||
3926 | {"x": 0, "y": "f7769ec2ab97"} |
|
|||
3927 | $ hg log -r 0 -T '{dict()|json}\n' |
|
|||
3928 | {} |
|
|||
3929 |
|
||||
3930 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' |
|
|||
3931 | rev=0 node=f7769ec2ab97 |
|
|||
3932 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' |
|
|||
3933 | rev=0 node=f7769ec2ab97 |
|
|||
3934 |
|
||||
3935 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' |
|
|||
3936 | hg: parse error: duplicated dict key 'rev' inferred |
|
|||
3937 | [255] |
|
|||
3938 | $ hg log -r 0 -T '{dict(node, node|short)}\n' |
|
|||
3939 | hg: parse error: duplicated dict key 'node' inferred |
|
|||
3940 | [255] |
|
|||
3941 | $ hg log -r 0 -T '{dict(1 + 2)}' |
|
|||
3942 | hg: parse error: dict key cannot be inferred |
|
|||
3943 | [255] |
|
|||
3944 |
|
||||
3945 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' |
|
|||
3946 | hg: parse error: dict got multiple values for keyword argument 'x' |
|
|||
3947 | [255] |
|
|||
3948 |
|
||||
3949 | Test get function: |
|
|||
3950 |
|
||||
3951 | $ hg log -r 0 --template '{get(extras, "branch")}\n' |
|
|||
3952 | default |
|
|||
3953 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' |
|
|||
3954 | default |
|
|||
3955 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' |
|
|||
3956 | hg: parse error: not a dictionary |
|
|||
3957 | (get() expects a dict as first argument) |
|
|||
3958 | [255] |
|
|||
3959 |
|
||||
3960 | Test json filter applied to wrapped object: |
|
|||
3961 |
|
||||
3962 | $ hg log -r0 -T '{files|json}\n' |
|
|||
3963 | ["a"] |
|
|||
3964 | $ hg log -r0 -T '{extras|json}\n' |
|
|||
3965 | {"branch": "default"} |
|
|||
3966 | $ hg log -r0 -T '{date|json}\n' |
|
|||
3967 | [0, 0] |
|
|||
3968 |
|
||||
3969 | Test json filter applied to map result: |
|
|||
3970 |
|
||||
3971 | $ hg log -r0 -T '{json(extras % "{key}")}\n' |
|
|||
3972 | ["branch"] |
|
|||
3973 |
|
||||
3974 | Test localdate(date, tz) function: |
|
|||
3975 |
|
||||
3976 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' |
|
|||
3977 | 1970-01-01 09:00 +0900 |
|
|||
3978 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' |
|
|||
3979 | 1970-01-01 00:00 +0000 |
|
|||
3980 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' |
|
|||
3981 | hg: parse error: localdate expects a timezone |
|
|||
3982 | [255] |
|
|||
3983 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' |
|
|||
3984 | 1970-01-01 02:00 +0200 |
|
|||
3985 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' |
|
|||
3986 | 1970-01-01 00:00 +0000 |
|
|||
3987 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' |
|
|||
3988 | 1970-01-01 00:00 +0000 |
|
|||
3989 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' |
|
|||
3990 | hg: parse error: localdate expects a timezone |
|
|||
3991 | [255] |
|
|||
3992 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' |
|
|||
3993 | hg: parse error: localdate expects a timezone |
|
|||
3994 | [255] |
|
|||
3995 |
|
||||
3996 | Test shortest(node) function: |
|
|||
3997 |
|
||||
3998 | $ echo b > b |
|
|||
3999 | $ hg ci -qAm b |
|
|||
4000 | $ hg log --template '{shortest(node)}\n' |
|
|||
4001 | e777 |
|
|||
4002 | bcc7 |
|
|||
4003 | f776 |
|
|||
4004 | $ hg log --template '{shortest(node, 10)}\n' |
|
|||
4005 | e777603221 |
|
|||
4006 | bcc7ff960b |
|
|||
4007 | f7769ec2ab |
|
|||
4008 | $ hg log --template '{node|shortest}\n' -l1 |
|
|||
4009 | e777 |
|
|||
4010 |
|
||||
4011 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' |
|
|||
4012 | f7769ec2ab |
|
|||
4013 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' |
|
|||
4014 | hg: parse error: shortest() expects an integer minlength |
|
|||
4015 | [255] |
|
|||
4016 |
|
||||
4017 | $ hg log -r 'wdir()' -T '{node|shortest}\n' |
|
|||
4018 | ffff |
|
|||
4019 |
|
||||
4020 | $ hg log --template '{shortest("f")}\n' -l1 |
|
|||
4021 | f |
|
|||
4022 |
|
||||
4023 | $ hg log --template '{shortest("0123456789012345678901234567890123456789")}\n' -l1 |
|
|||
4024 | 0123456789012345678901234567890123456789 |
|
|||
4025 |
|
||||
4026 | $ hg log --template '{shortest("01234567890123456789012345678901234567890123456789")}\n' -l1 |
|
|||
4027 | 01234567890123456789012345678901234567890123456789 |
|
|||
4028 |
|
||||
4029 | $ hg log --template '{shortest("not a hex string")}\n' -l1 |
|
|||
4030 | not a hex string |
|
|||
4031 |
|
||||
4032 | $ hg log --template '{shortest("not a hex string, but it'\''s 40 bytes long")}\n' -l1 |
|
|||
4033 | not a hex string, but it's 40 bytes long |
|
|||
4034 |
|
||||
4035 | $ hg log --template '{shortest("ffffffffffffffffffffffffffffffffffffffff")}\n' -l1 |
|
|||
4036 | ffff |
|
|||
4037 |
|
||||
4038 | $ hg log --template '{shortest("fffffff")}\n' -l1 |
|
|||
4039 | ffff |
|
|||
4040 |
|
||||
4041 | $ hg log --template '{shortest("ff")}\n' -l1 |
|
|||
4042 | ffff |
|
|||
4043 |
|
||||
4044 | $ cd .. |
|
|||
4045 |
|
||||
4046 | Test shortest(node) with the repo having short hash collision: |
|
|||
4047 |
|
||||
4048 | $ hg init hashcollision |
|
|||
4049 | $ cd hashcollision |
|
|||
4050 | $ cat <<EOF >> .hg/hgrc |
|
|||
4051 | > [experimental] |
|
|||
4052 | > evolution.createmarkers=True |
|
|||
4053 | > EOF |
|
|||
4054 | $ echo 0 > a |
|
|||
4055 | $ hg ci -qAm 0 |
|
|||
4056 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do |
|
|||
4057 | > hg up -q 0 |
|
|||
4058 | > echo $i > a |
|
|||
4059 | > hg ci -qm $i |
|
|||
4060 | > done |
|
|||
4061 | $ hg up -q null |
|
|||
4062 | $ hg log -r0: -T '{rev}:{node}\n' |
|
|||
4063 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a |
|
|||
4064 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc |
|
|||
4065 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 |
|
|||
4066 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 |
|
|||
4067 | 4:10776689e627b465361ad5c296a20a487e153ca4 |
|
|||
4068 | 5:a00be79088084cb3aff086ab799f8790e01a976b |
|
|||
4069 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 |
|
|||
4070 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d |
|
|||
4071 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a |
|
|||
4072 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
|||
4073 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
|||
4074 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b |
|
|||
4075 | obsoleted 1 changesets |
|
|||
4076 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
|||
4077 | obsoleted 1 changesets |
|
|||
4078 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
|||
4079 | obsoleted 1 changesets |
|
|||
4080 |
|
||||
4081 | nodes starting with '11' (we don't have the revision number '11' though) |
|
|||
4082 |
|
||||
4083 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' |
|
|||
4084 | 1:1142 |
|
|||
4085 | 2:1140 |
|
|||
4086 | 3:11d |
|
|||
4087 |
|
||||
4088 | '5:a00' is hidden, but still we have two nodes starting with 'a0' |
|
|||
4089 |
|
||||
4090 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' |
|
|||
4091 | 6:a0b |
|
|||
4092 | 7:a04 |
|
|||
4093 |
|
||||
4094 | node '10' conflicts with the revision number '10' even if it is hidden |
|
|||
4095 | (we could exclude hidden revision numbers, but currently we don't) |
|
|||
4096 |
|
||||
4097 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' |
|
|||
4098 | 4:107 |
|
|||
4099 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden |
|
|||
4100 | 4:107 |
|
|||
4101 |
|
||||
4102 | node 'c562' should be unique if the other 'c562' nodes are hidden |
|
|||
4103 | (but we don't try the slow path to filter out hidden nodes for now) |
|
|||
4104 |
|
||||
4105 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' |
|
|||
4106 | 8:c5625 |
|
|||
4107 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden |
|
|||
4108 | 8:c5625 |
|
|||
4109 | 9:c5623 |
|
|||
4110 | 10:c562d |
|
|||
4111 |
|
||||
4112 | $ cd .. |
|
|||
4113 |
|
||||
4114 | Test pad function |
|
|||
4115 |
|
||||
4116 | $ cd r |
|
|||
4117 |
|
||||
4118 | $ hg log --template '{pad(rev, 20)} {author|user}\n' |
|
|||
4119 | 2 test |
|
|||
4120 | 1 {node|short} |
|
|||
4121 | 0 test |
|
|||
4122 |
|
||||
4123 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' |
|
|||
4124 | 2 test |
|
|||
4125 | 1 {node|short} |
|
|||
4126 | 0 test |
|
|||
4127 |
|
||||
4128 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' |
|
|||
4129 | 2------------------- test |
|
|||
4130 | 1------------------- {node|short} |
|
|||
4131 | 0------------------- test |
|
|||
4132 |
|
||||
4133 | Test template string in pad function |
|
|||
4134 |
|
||||
4135 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' |
|
|||
4136 | {0} test |
|
|||
4137 |
|
||||
4138 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' |
|
|||
4139 | \{rev} test |
|
|||
4140 |
|
||||
4141 | Test width argument passed to pad function |
|
|||
4142 |
|
||||
4143 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' |
|
|||
4144 | 0 test |
|
|||
4145 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' |
|
|||
4146 | hg: parse error: pad() expects an integer width |
|
|||
4147 | [255] |
|
|||
4148 |
|
||||
4149 | Test invalid fillchar passed to pad function |
|
|||
4150 |
|
||||
4151 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' |
|
|||
4152 | hg: parse error: pad() expects a single fill character |
|
|||
4153 | [255] |
|
|||
4154 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' |
|
|||
4155 | hg: parse error: pad() expects a single fill character |
|
|||
4156 | [255] |
|
|||
4157 |
|
||||
4158 | Test boolean argument passed to pad function |
|
|||
4159 |
|
||||
4160 | no crash |
|
|||
4161 |
|
||||
4162 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' |
|
|||
4163 | ---------0 |
|
|||
4164 |
|
||||
4165 | string/literal |
|
|||
4166 |
|
||||
4167 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' |
|
|||
4168 | ---------0 |
|
|||
4169 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' |
|
|||
4170 | 0--------- |
|
|||
4171 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' |
|
|||
4172 | 0--------- |
|
|||
4173 |
|
||||
4174 | unknown keyword is evaluated to '' |
|
|||
4175 |
|
||||
4176 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' |
|
|||
4177 | 0--------- |
|
|||
4178 |
|
||||
4179 | Test separate function |
|
|||
4180 |
|
||||
4181 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' |
|
|||
4182 | a-b-c |
|
|||
4183 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' |
|
|||
4184 | 0:f7769ec2ab97 test default |
|
|||
4185 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' |
|
|||
4186 | a \x1b[0;31mb\x1b[0m c d (esc) |
|
|||
4187 |
|
||||
4188 | Test boolean expression/literal passed to if function |
|
|||
4189 |
|
||||
4190 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' |
|
|||
4191 | rev 0 is True |
|
|||
4192 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' |
|
|||
4193 | literal 0 is True as well |
|
|||
4194 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' |
|
|||
4195 | empty string is False |
|
|||
4196 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' |
|
|||
4197 | empty list is False |
|
|||
4198 | $ hg log -r 0 -T '{if(revset(r"0"), "non-empty list is True")}\n' |
|
|||
4199 | non-empty list is True |
|
|||
4200 | $ hg log -r 0 -T '{if(revset(r"0") % "", "list of empty strings is True")}\n' |
|
|||
4201 | list of empty strings is True |
|
|||
4202 | $ hg log -r 0 -T '{if(true, "true is True")}\n' |
|
|||
4203 | true is True |
|
|||
4204 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' |
|
|||
4205 | false is False |
|
|||
4206 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' |
|
|||
4207 | non-empty string is True |
|
|||
4208 |
|
||||
4209 | Test ifcontains function |
|
|||
4210 |
|
||||
4211 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' |
|
|||
4212 | 2 is in the string |
|
|||
4213 | 1 is not |
|
|||
4214 | 0 is in the string |
|
|||
4215 |
|
||||
4216 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' |
|
|||
4217 | 2 is in the string |
|
|||
4218 | 1 is not |
|
|||
4219 | 0 is in the string |
|
|||
4220 |
|
||||
4221 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' |
|
|||
4222 | 2 did not add a |
|
|||
4223 | 1 did not add a |
|
|||
4224 | 0 added a |
|
|||
4225 |
|
||||
4226 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' |
|
|||
4227 | 2 is parent of 1 |
|
|||
4228 | 1 |
|
|||
4229 | 0 |
|
|||
4230 |
|
||||
4231 | $ hg log -l1 -T '{ifcontains("branch", extras, "t", "f")}\n' |
|
|||
4232 | t |
|
|||
4233 | $ hg log -l1 -T '{ifcontains("branch", extras % "{key}", "t", "f")}\n' |
|
|||
4234 | t |
|
|||
4235 | $ hg log -l1 -T '{ifcontains("branc", extras % "{key}", "t", "f")}\n' |
|
|||
4236 | f |
|
|||
4237 | $ hg log -l1 -T '{ifcontains("branc", stringify(extras % "{key}"), "t", "f")}\n' |
|
|||
4238 | t |
|
|||
4239 |
|
||||
4240 | Test revset function |
|
|||
4241 |
|
||||
4242 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' |
|
|||
4243 | 2 current rev |
|
|||
4244 | 1 not current rev |
|
|||
4245 | 0 not current rev |
|
|||
4246 |
|
||||
4247 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' |
|
|||
4248 | 2 match rev |
|
|||
4249 | 1 match rev |
|
|||
4250 | 0 not match rev |
|
|||
4251 |
|
||||
4252 | $ hg log -T '{ifcontains(desc, revset(":"), "", "type not match")}\n' -l1 |
|
|||
4253 | type not match |
|
|||
4254 |
|
||||
4255 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' |
|
|||
4256 | 2 Parents: 1 |
|
|||
4257 | 1 Parents: 0 |
|
|||
4258 | 0 Parents: |
|
|||
4259 |
|
||||
4260 | $ cat >> .hg/hgrc <<EOF |
|
|||
4261 | > [revsetalias] |
|
|||
4262 | > myparents(\$1) = parents(\$1) |
|
|||
4263 | > EOF |
|
|||
4264 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' |
|
|||
4265 | 2 Parents: 1 |
|
|||
4266 | 1 Parents: 0 |
|
|||
4267 | 0 Parents: |
|
|||
4268 |
|
||||
4269 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' |
|
|||
4270 | Rev: 2 |
|
|||
4271 | Ancestor: 0 |
|
|||
4272 | Ancestor: 1 |
|
|||
4273 | Ancestor: 2 |
|
|||
4274 |
|
||||
4275 | Rev: 1 |
|
|||
4276 | Ancestor: 0 |
|
|||
4277 | Ancestor: 1 |
|
|||
4278 |
|
||||
4279 | Rev: 0 |
|
|||
4280 | Ancestor: 0 |
|
|||
4281 |
|
||||
4282 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 |
|
|||
4283 | 2 |
|
|||
4284 |
|
||||
4285 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 |
|
|||
4286 | 2 |
|
|||
4287 |
|
||||
4288 | a list template is evaluated for each item of revset/parents |
|
|||
4289 |
|
||||
4290 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' |
|
|||
4291 | 2 p: 1:bcc7ff960b8e |
|
|||
4292 | 1 p: 0:f7769ec2ab97 |
|
|||
4293 | 0 p: |
|
|||
4294 |
|
||||
4295 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' |
|
|||
4296 | 2 p: 1:bcc7ff960b8e -1:000000000000 |
|
|||
4297 | 1 p: 0:f7769ec2ab97 -1:000000000000 |
|
|||
4298 | 0 p: -1:000000000000 -1:000000000000 |
|
|||
4299 |
|
||||
4300 | therefore, 'revcache' should be recreated for each rev |
|
|||
4301 |
|
||||
4302 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' |
|
|||
4303 | 2 aa b |
|
|||
4304 | p |
|
|||
4305 | 1 |
|
|||
4306 | p a |
|
|||
4307 | 0 a |
|
|||
4308 | p |
|
|||
4309 |
|
||||
4310 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' |
|
|||
4311 | 2 aa b |
|
|||
4312 | p |
|
|||
4313 | 1 |
|
|||
4314 | p a |
|
|||
4315 | 0 a |
|
|||
4316 | p |
|
|||
4317 |
|
||||
4318 | a revset item must be evaluated as an integer revision, not an offset from tip |
|
|||
4319 |
|
||||
4320 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' |
|
|||
4321 | -1:000000000000 |
|
|||
4322 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' |
|
|||
4323 | -1:000000000000 |
|
|||
4324 |
|
||||
4325 | join() should pick '{rev}' from revset items: |
|
|||
4326 |
|
||||
4327 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 |
|
|||
4328 | 4, 5 |
|
|||
4329 |
|
||||
4330 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by |
|
|||
4331 | default. join() should agree with the default formatting: |
|
|||
4332 |
|
||||
4333 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 |
|
|||
4334 | 5:13207e5a10d9, 4:bbe44766e73d |
|
|||
4335 |
|
||||
4336 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug |
|
|||
4337 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, |
|
|||
4338 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
|||
4339 |
|
||||
4340 | Invalid arguments passed to revset() |
|
|||
4341 |
|
||||
4342 | $ hg log -T '{revset("%whatever", 0)}\n' |
|
|||
4343 | hg: parse error: unexpected revspec format character w |
|
|||
4344 | [255] |
|
|||
4345 | $ hg log -T '{revset("%lwhatever", files)}\n' |
|
|||
4346 | hg: parse error: unexpected revspec format character w |
|
|||
4347 | [255] |
|
|||
4348 | $ hg log -T '{revset("%s %s", 0)}\n' |
|
|||
4349 | hg: parse error: missing argument for revspec |
|
|||
4350 | [255] |
|
|||
4351 | $ hg log -T '{revset("", 0)}\n' |
|
|||
4352 | hg: parse error: too many revspec arguments specified |
|
|||
4353 | [255] |
|
|||
4354 | $ hg log -T '{revset("%s", 0, 1)}\n' |
|
|||
4355 | hg: parse error: too many revspec arguments specified |
|
|||
4356 | [255] |
|
|||
4357 | $ hg log -T '{revset("%", 0)}\n' |
|
|||
4358 | hg: parse error: incomplete revspec format character |
|
|||
4359 | [255] |
|
|||
4360 | $ hg log -T '{revset("%l", 0)}\n' |
|
|||
4361 | hg: parse error: incomplete revspec format character |
|
|||
4362 | [255] |
|
|||
4363 | $ hg log -T '{revset("%d", 'foo')}\n' |
|
|||
4364 | hg: parse error: invalid argument for revspec |
|
|||
4365 | [255] |
|
|||
4366 | $ hg log -T '{revset("%ld", files)}\n' |
|
|||
4367 | hg: parse error: invalid argument for revspec |
|
|||
4368 | [255] |
|
|||
4369 | $ hg log -T '{revset("%ls", 0)}\n' |
|
|||
4370 | hg: parse error: invalid argument for revspec |
|
|||
4371 | [255] |
|
|||
4372 | $ hg log -T '{revset("%b", 'foo')}\n' |
|
|||
4373 | hg: parse error: invalid argument for revspec |
|
|||
4374 | [255] |
|
|||
4375 | $ hg log -T '{revset("%lb", files)}\n' |
|
|||
4376 | hg: parse error: invalid argument for revspec |
|
|||
4377 | [255] |
|
|||
4378 | $ hg log -T '{revset("%r", 0)}\n' |
|
|||
4379 | hg: parse error: invalid argument for revspec |
|
|||
4380 | [255] |
|
|||
4381 |
|
||||
4382 | Test 'originalnode' |
|
|||
4383 |
|
||||
4384 | $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n' |
|
|||
4385 | 000000000000 bcc7ff960b8e |
|
|||
4386 | $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n' |
|
|||
4387 | a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1 |
|
|||
4388 |
|
||||
4389 | Test files function |
|
|||
4390 |
|
||||
4391 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" |
|
|||
4392 | 2 |
|
|||
4393 | a |
|
|||
4394 | aa |
|
|||
4395 | b |
|
|||
4396 | 1 |
|
|||
4397 | a |
|
|||
4398 | 0 |
|
|||
4399 | a |
|
|||
4400 |
|
||||
4401 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" |
|
|||
4402 | 2 |
|
|||
4403 | aa |
|
|||
4404 | 1 |
|
|||
4405 |
|
||||
4406 | 0 |
|
|||
4407 |
|
||||
4408 | $ hg rm a |
|
|||
4409 | $ hg log -r "wdir()" -T "{rev}\n{join(files('*'), '\n')}\n" |
|
|||
4410 | 2147483647 |
|
|||
4411 | aa |
|
|||
4412 | b |
|
|||
4413 | $ hg revert a |
|
|||
4414 |
|
||||
4415 | Test relpath function |
|
|||
4416 |
|
||||
4417 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' |
|
|||
4418 | a |
|
|||
4419 | $ cd .. |
|
|||
4420 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' |
|
|||
4421 | r/a |
|
|||
4422 | $ cd r |
|
|||
4423 |
|
||||
4424 | Test active bookmark templating |
|
|||
4425 |
|
||||
4426 | $ hg book foo |
|
|||
4427 | $ hg book bar |
|
|||
4428 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" |
|
|||
4429 | 2 bar* foo |
|
|||
4430 | 1 |
|
|||
4431 | 0 |
|
|||
4432 | $ hg log --template "{rev} {activebookmark}\n" |
|
|||
4433 | 2 bar |
|
|||
4434 | 1 |
|
|||
4435 | 0 |
|
|||
4436 | $ hg bookmarks --inactive bar |
|
|||
4437 | $ hg log --template "{rev} {activebookmark}\n" |
|
|||
4438 | 2 |
|
|||
4439 | 1 |
|
|||
4440 | 0 |
|
|||
4441 | $ hg book -r1 baz |
|
|||
4442 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" |
|
|||
4443 | 2 bar foo |
|
|||
4444 | 1 baz |
|
|||
4445 | 0 |
|
|||
4446 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" |
|
|||
4447 | 2 t |
|
|||
4448 | 1 f |
|
|||
4449 | 0 f |
|
|||
4450 |
|
||||
4451 | Test namespaces dict |
|
|||
4452 |
|
||||
4453 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' |
|
|||
4454 | 2 |
|
|||
4455 | bookmarks color=bookmark builtin=True |
|
|||
4456 | bar,foo |
|
|||
4457 | tags color=tag builtin=True |
|
|||
4458 | tip |
|
|||
4459 | branches color=branch builtin=True |
|
|||
4460 | text.{rev} |
|
|||
4461 | revnames color=revname builtin=False |
|
|||
4462 | r2 |
|
|||
4463 |
|
||||
4464 | 1 |
|
|||
4465 | bookmarks color=bookmark builtin=True |
|
|||
4466 | baz |
|
|||
4467 | tags color=tag builtin=True |
|
|||
4468 |
|
||||
4469 | branches color=branch builtin=True |
|
|||
4470 | text.{rev} |
|
|||
4471 | revnames color=revname builtin=False |
|
|||
4472 | r1 |
|
|||
4473 |
|
||||
4474 | 0 |
|
|||
4475 | bookmarks color=bookmark builtin=True |
|
|||
4476 |
|
||||
4477 | tags color=tag builtin=True |
|
|||
4478 |
|
||||
4479 | branches color=branch builtin=True |
|
|||
4480 | default |
|
|||
4481 | revnames color=revname builtin=False |
|
|||
4482 | r0 |
|
|||
4483 |
|
||||
4484 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' |
|
|||
4485 | bookmarks: bar foo |
|
|||
4486 | tags: tip |
|
|||
4487 | branches: text.{rev} |
|
|||
4488 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' |
|
|||
4489 | bookmarks: |
|
|||
4490 | bar |
|
|||
4491 | foo |
|
|||
4492 | tags: |
|
|||
4493 | tip |
|
|||
4494 | branches: |
|
|||
4495 | text.{rev} |
|
|||
4496 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' |
|
|||
4497 | bar |
|
|||
4498 | foo |
|
|||
4499 | $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}' |
|
|||
4500 | bar |
|
|||
4501 | foo |
|
|||
4502 |
|
||||
4503 | Test stringify on sub expressions |
|
|||
4504 |
|
||||
4505 | $ cd .. |
|
|||
4506 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' |
|
|||
4507 | fourth, second, third |
|
|||
4508 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' |
|
|||
4509 | abc |
|
|||
4510 |
|
||||
4511 | Test splitlines |
|
|||
4512 |
|
||||
4513 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" |
|
|||
4514 | @ foo Modify, add, remove, rename |
|
|||
4515 | | |
|
|||
4516 | o foo future |
|
|||
4517 | | |
|
|||
4518 | o foo third |
|
|||
4519 | | |
|
|||
4520 | o foo second |
|
|||
4521 |
|
||||
4522 | o foo merge |
|
|||
4523 | |\ |
|
|||
4524 | | o foo new head |
|
|||
4525 | | | |
|
|||
4526 | o | foo new branch |
|
|||
4527 | |/ |
|
|||
4528 | o foo no user, no domain |
|
|||
4529 | | |
|
|||
4530 | o foo no person |
|
|||
4531 | | |
|
|||
4532 | o foo other 1 |
|
|||
4533 | | foo other 2 |
|
|||
4534 | | foo |
|
|||
4535 | | foo other 3 |
|
|||
4536 | o foo line 1 |
|
|||
4537 | foo line 2 |
|
|||
4538 |
|
||||
4539 | $ hg log -R a -r0 -T '{desc|splitlines}\n' |
|
|||
4540 | line 1 line 2 |
|
|||
4541 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' |
|
|||
4542 | line 1|line 2 |
|
|||
4543 |
|
||||
4544 | Test startswith |
|
|||
4545 | $ hg log -Gv -R a --template "{startswith(desc)}" |
|
|||
4546 | hg: parse error: startswith expects two arguments |
|
|||
4547 | [255] |
|
|||
4548 |
|
||||
4549 | $ hg log -Gv -R a --template "{startswith('line', desc)}" |
|
|||
4550 | @ |
|
|||
4551 | | |
|
|||
4552 | o |
|
|||
4553 | | |
|
|||
4554 | o |
|
|||
4555 | | |
|
|||
4556 | o |
|
|||
4557 |
|
||||
4558 | o |
|
|||
4559 | |\ |
|
|||
4560 | | o |
|
|||
4561 | | | |
|
|||
4562 | o | |
|
|||
4563 | |/ |
|
|||
4564 | o |
|
|||
4565 | | |
|
|||
4566 | o |
|
|||
4567 | | |
|
|||
4568 | o |
|
|||
4569 | | |
|
|||
4570 | o line 1 |
|
|||
4571 | line 2 |
|
|||
4572 |
|
||||
4573 | Test bad template with better error message |
|
|||
4574 |
|
||||
4575 | $ hg log -Gv -R a --template '{desc|user()}' |
|
|||
4576 | hg: parse error: expected a symbol, got 'func' |
|
|||
4577 | [255] |
|
|||
4578 |
|
||||
4579 | Test word function (including index out of bounds graceful failure) |
|
|||
4580 |
|
||||
4581 | $ hg log -Gv -R a --template "{word('1', desc)}" |
|
|||
4582 | @ add, |
|
|||
4583 | | |
|
|||
4584 | o |
|
|||
4585 | | |
|
|||
4586 | o |
|
|||
4587 | | |
|
|||
4588 | o |
|
|||
4589 |
|
||||
4590 | o |
|
|||
4591 | |\ |
|
|||
4592 | | o head |
|
|||
4593 | | | |
|
|||
4594 | o | branch |
|
|||
4595 | |/ |
|
|||
4596 | o user, |
|
|||
4597 | | |
|
|||
4598 | o person |
|
|||
4599 | | |
|
|||
4600 | o 1 |
|
|||
4601 | | |
|
|||
4602 | o 1 |
|
|||
4603 |
|
||||
4604 |
|
||||
4605 | Test word third parameter used as splitter |
|
|||
4606 |
|
||||
4607 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" |
|
|||
4608 | @ M |
|
|||
4609 | | |
|
|||
4610 | o future |
|
|||
4611 | | |
|
|||
4612 | o third |
|
|||
4613 | | |
|
|||
4614 | o sec |
|
|||
4615 |
|
||||
4616 | o merge |
|
|||
4617 | |\ |
|
|||
4618 | | o new head |
|
|||
4619 | | | |
|
|||
4620 | o | new branch |
|
|||
4621 | |/ |
|
|||
4622 | o n |
|
|||
4623 | | |
|
|||
4624 | o n |
|
|||
4625 | | |
|
|||
4626 | o |
|
|||
4627 | | |
|
|||
4628 | o line 1 |
|
|||
4629 | line 2 |
|
|||
4630 |
|
||||
4631 | Test word error messages for not enough and too many arguments |
|
|||
4632 |
|
||||
4633 | $ hg log -Gv -R a --template "{word('0')}" |
|
|||
4634 | hg: parse error: word expects two or three arguments, got 1 |
|
|||
4635 | [255] |
|
|||
4636 |
|
||||
4637 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" |
|
|||
4638 | hg: parse error: word expects two or three arguments, got 7 |
|
|||
4639 | [255] |
|
|||
4640 |
|
||||
4641 | Test word for integer literal |
|
|||
4642 |
|
||||
4643 | $ hg log -R a --template "{word(2, desc)}\n" -r0 |
|
|||
4644 | line |
|
|||
4645 |
|
||||
4646 | Test word for invalid numbers |
|
|||
4647 |
|
||||
4648 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
|||
4649 | hg: parse error: word expects an integer index |
|
|||
4650 | [255] |
|
|||
4651 |
|
||||
4652 | Test word for out of range |
|
|||
4653 |
|
||||
4654 | $ hg log -R a --template "{word(10000, desc)}" |
|
|||
4655 | $ hg log -R a --template "{word(-10000, desc)}" |
|
|||
4656 |
|
||||
4657 | Test indent and not adding to empty lines |
|
|||
4658 |
|
||||
4659 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a |
|
|||
4660 | ----- |
|
|||
4661 | > line 1 |
|
|||
4662 | >> line 2 |
|
|||
4663 | ----- |
|
|||
4664 | > other 1 |
|
|||
4665 | >> other 2 |
|
|||
4666 |
|
||||
4667 | >> other 3 |
|
|||
4668 |
|
||||
4669 | Test with non-strings like dates |
|
|||
4670 |
|
||||
4671 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a |
|
|||
4672 | 1200000.00 |
|
|||
4673 | 1300000.00 |
|
|||
4674 |
|
||||
4675 | Test broken string escapes: |
|
|||
4676 |
|
||||
4677 | $ hg log -T "bogus\\" -R a |
|
|||
4678 | hg: parse error: trailing \ in string |
|
|||
4679 | [255] |
|
|||
4680 | $ hg log -T "\\xy" -R a |
|
|||
4681 | hg: parse error: invalid \x escape* (glob) |
|
|||
4682 | [255] |
|
|||
4683 |
|
||||
4684 | json filter should escape HTML tags so that the output can be embedded in hgweb: |
|
|||
4685 |
|
||||
4686 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 |
|
|||
4687 | "\u003cfoo@example.org\u003e" |
|
|||
4688 |
|
||||
4689 | Templater supports aliases of symbol and func() styles: |
|
|||
4690 |
|
||||
4691 | $ hg clone -q a aliases |
|
|||
4692 | $ cd aliases |
|
|||
4693 | $ cat <<EOF >> .hg/hgrc |
|
|||
4694 | > [templatealias] |
|
|||
4695 | > r = rev |
|
|||
4696 | > rn = "{r}:{node|short}" |
|
|||
4697 | > status(c, files) = files % "{c} {file}\n" |
|
|||
4698 | > utcdate(d) = localdate(d, "UTC") |
|
|||
4699 | > EOF |
|
|||
4700 |
|
||||
4701 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' |
|
|||
4702 | (template |
|
|||
4703 | (symbol 'rn') |
|
|||
4704 | (string ' ') |
|
|||
4705 | (| |
|
|||
4706 | (func |
|
|||
4707 | (symbol 'utcdate') |
|
|||
4708 | (symbol 'date')) |
|
|||
4709 | (symbol 'isodate')) |
|
|||
4710 | (string '\n')) |
|
|||
4711 | * expanded: |
|
|||
4712 | (template |
|
|||
4713 | (template |
|
|||
4714 | (symbol 'rev') |
|
|||
4715 | (string ':') |
|
|||
4716 | (| |
|
|||
4717 | (symbol 'node') |
|
|||
4718 | (symbol 'short'))) |
|
|||
4719 | (string ' ') |
|
|||
4720 | (| |
|
|||
4721 | (func |
|
|||
4722 | (symbol 'localdate') |
|
|||
4723 | (list |
|
|||
4724 | (symbol 'date') |
|
|||
4725 | (string 'UTC'))) |
|
|||
4726 | (symbol 'isodate')) |
|
|||
4727 | (string '\n')) |
|
|||
4728 | * keywords: date, node, rev |
|
|||
4729 | * functions: isodate, localdate, short |
|
|||
4730 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
|||
4731 |
|
||||
4732 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' |
|
|||
4733 | (template |
|
|||
4734 | (func |
|
|||
4735 | (symbol 'status') |
|
|||
4736 | (list |
|
|||
4737 | (string 'A') |
|
|||
4738 | (symbol 'file_adds')))) |
|
|||
4739 | * expanded: |
|
|||
4740 | (template |
|
|||
4741 | (% |
|
|||
4742 | (symbol 'file_adds') |
|
|||
4743 | (template |
|
|||
4744 | (string 'A') |
|
|||
4745 | (string ' ') |
|
|||
4746 | (symbol 'file') |
|
|||
4747 | (string '\n')))) |
|
|||
4748 | * keywords: file, file_adds |
|
|||
4749 | * functions: |
|
|||
4750 | A a |
|
|||
4751 |
|
||||
4752 | A unary function alias can be called as a filter: |
|
|||
4753 |
|
||||
4754 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' |
|
|||
4755 | (template |
|
|||
4756 | (| |
|
|||
4757 | (| |
|
|||
4758 | (symbol 'date') |
|
|||
4759 | (symbol 'utcdate')) |
|
|||
4760 | (symbol 'isodate')) |
|
|||
4761 | (string '\n')) |
|
|||
4762 | * expanded: |
|
|||
4763 | (template |
|
|||
4764 | (| |
|
|||
4765 | (func |
|
|||
4766 | (symbol 'localdate') |
|
|||
4767 | (list |
|
|||
4768 | (symbol 'date') |
|
|||
4769 | (string 'UTC'))) |
|
|||
4770 | (symbol 'isodate')) |
|
|||
4771 | (string '\n')) |
|
|||
4772 | * keywords: date |
|
|||
4773 | * functions: isodate, localdate |
|
|||
4774 | 1970-01-12 13:46 +0000 |
|
|||
4775 |
|
||||
4776 | Aliases should be applied only to command arguments and templates in hgrc. |
|
|||
4777 | Otherwise, our stock styles and web templates could be corrupted: |
|
|||
4778 |
|
||||
4779 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' |
|
|||
4780 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
|||
4781 |
|
||||
4782 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' |
|
|||
4783 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
|||
4784 |
|
||||
4785 | $ cat <<EOF > tmpl |
|
|||
4786 | > changeset = 'nothing expanded:{rn}\n' |
|
|||
4787 | > EOF |
|
|||
4788 | $ hg log -r0 --style ./tmpl |
|
|||
4789 | nothing expanded: |
|
|||
4790 |
|
||||
4791 | Aliases in formatter: |
|
|||
4792 |
|
||||
4793 | $ hg branches -T '{pad(branch, 7)} {rn}\n' |
|
|||
4794 | default 6:d41e714fe50d |
|
|||
4795 | foo 4:bbe44766e73d |
|
|||
4796 |
|
||||
4797 | Aliases should honor HGPLAIN: |
|
|||
4798 |
|
||||
4799 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' |
|
|||
4800 | nothing expanded: |
|
|||
4801 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' |
|
|||
4802 | 0:1e4e1b8f71e0 |
|
|||
4803 |
|
||||
4804 | Unparsable alias: |
|
|||
4805 |
|
||||
4806 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' |
|
|||
4807 | (template |
|
|||
4808 | (symbol 'bad')) |
|
|||
4809 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
|||
4810 | [255] |
|
|||
4811 | $ hg log --config templatealias.bad='x(' -T '{bad}' |
|
|||
4812 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
|||
4813 | [255] |
|
|||
4814 |
|
||||
4815 | $ cd .. |
|
|||
4816 |
|
||||
4817 | Set up repository for non-ascii encoding tests: |
|
|||
4818 |
|
||||
4819 | $ hg init nonascii |
|
|||
4820 | $ cd nonascii |
|
|||
4821 | $ $PYTHON <<EOF |
|
|||
4822 | > open('latin1', 'wb').write(b'\xe9') |
|
|||
4823 | > open('utf-8', 'wb').write(b'\xc3\xa9') |
|
|||
4824 | > EOF |
|
|||
4825 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
|
|||
4826 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
|
|||
4827 |
|
||||
4828 | json filter should try round-trip conversion to utf-8: |
|
|||
4829 |
|
||||
4830 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 |
|
|||
4831 | "\u00e9" |
|
|||
4832 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 |
|
|||
4833 | "non-ascii branch: \u00e9" |
|
|||
4834 |
|
||||
4835 | json filter should take input as utf-8 if it was converted from utf-8: |
|
|||
4836 |
|
||||
4837 | $ HGENCODING=latin-1 hg log -T "{branch|json}\n" -r0 |
|
|||
4838 | "\u00e9" |
|
|||
4839 | $ HGENCODING=latin-1 hg log -T "{desc|json}\n" -r0 |
|
|||
4840 | "non-ascii branch: \u00e9" |
|
|||
4841 |
|
||||
4842 | json filter takes input as utf-8b: |
|
|||
4843 |
|
||||
4844 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
|
|||
4845 | "\u00e9" |
|
|||
4846 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 |
|
|||
4847 | "\udce9" |
|
|||
4848 |
|
||||
4849 | utf8 filter: |
|
|||
4850 |
|
||||
4851 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 |
|
|||
4852 | round-trip: c3a9 |
|
|||
4853 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
|||
4854 | decoded: c3a9 |
|
|||
4855 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
|||
4856 | abort: decoding near * (glob) |
|
|||
4857 | [255] |
|
|||
4858 | $ hg log -T "coerced to string: {rev|utf8}\n" -r0 |
|
|||
4859 | coerced to string: 0 |
|
|||
4860 |
|
||||
4861 | pad width: |
|
|||
4862 |
|
||||
4863 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" |
|
|||
4864 | \xc3\xa9- (esc) |
|
|||
4865 |
|
||||
4866 | $ cd .. |
|
|||
4867 |
|
||||
4868 | Test that template function in extension is registered as expected |
|
|||
4869 |
|
||||
4870 | $ cd a |
|
|||
4871 |
|
||||
4872 | $ cat <<EOF > $TESTTMP/customfunc.py |
|
|||
4873 | > from mercurial import registrar |
|
|||
4874 | > |
|
|||
4875 | > templatefunc = registrar.templatefunc() |
|
|||
4876 | > |
|
|||
4877 | > @templatefunc(b'custom()') |
|
|||
4878 | > def custom(context, mapping, args): |
|
|||
4879 | > return b'custom' |
|
|||
4880 | > EOF |
|
|||
4881 | $ cat <<EOF > .hg/hgrc |
|
|||
4882 | > [extensions] |
|
|||
4883 | > customfunc = $TESTTMP/customfunc.py |
|
|||
4884 | > EOF |
|
|||
4885 |
|
||||
4886 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true |
|
|||
4887 | custom |
|
|||
4888 |
|
||||
4889 | $ cd .. |
|
|||
4890 |
|
||||
4891 | Test 'graphwidth' in 'hg log' on various topologies. The key here is that the |
|
|||
4892 | printed graphwidths 3, 5, 7, etc. should all line up in their respective |
|
|||
4893 | columns. We don't care about other aspects of the graph rendering here. |
|
|||
4894 |
|
||||
4895 | $ hg init graphwidth |
|
|||
4896 | $ cd graphwidth |
|
|||
4897 |
|
||||
4898 | $ wrappabletext="a a a a a a a a a a a a" |
|
|||
4899 |
|
||||
4900 | $ printf "first\n" > file |
|
|||
4901 | $ hg add file |
|
|||
4902 | $ hg commit -m "$wrappabletext" |
|
|||
4903 |
|
||||
4904 | $ printf "first\nsecond\n" > file |
|
|||
4905 | $ hg commit -m "$wrappabletext" |
|
|||
4906 |
|
||||
4907 | $ hg checkout 0 |
|
|||
4908 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
4909 | $ printf "third\nfirst\n" > file |
|
|||
4910 | $ hg commit -m "$wrappabletext" |
|
|||
4911 | created new head |
|
|||
4912 |
|
||||
4913 | $ hg merge |
|
|||
4914 | merging file |
|
|||
4915 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
|||
4916 | (branch merge, don't forget to commit) |
|
|||
4917 |
|
||||
4918 | $ hg log --graph -T "{graphwidth}" |
|
|||
4919 | @ 3 |
|
|||
4920 | | |
|
|||
4921 | | @ 5 |
|
|||
4922 | |/ |
|
|||
4923 | o 3 |
|
|||
4924 |
|
||||
4925 | $ hg commit -m "$wrappabletext" |
|
|||
4926 |
|
||||
4927 | $ hg log --graph -T "{graphwidth}" |
|
|||
4928 | @ 5 |
|
|||
4929 | |\ |
|
|||
4930 | | o 5 |
|
|||
4931 | | | |
|
|||
4932 | o | 5 |
|
|||
4933 | |/ |
|
|||
4934 | o 3 |
|
|||
4935 |
|
||||
4936 |
|
||||
4937 | $ hg checkout 0 |
|
|||
4938 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
4939 | $ printf "third\nfirst\nsecond\n" > file |
|
|||
4940 | $ hg commit -m "$wrappabletext" |
|
|||
4941 | created new head |
|
|||
4942 |
|
||||
4943 | $ hg log --graph -T "{graphwidth}" |
|
|||
4944 | @ 3 |
|
|||
4945 | | |
|
|||
4946 | | o 7 |
|
|||
4947 | | |\ |
|
|||
4948 | +---o 7 |
|
|||
4949 | | | |
|
|||
4950 | | o 5 |
|
|||
4951 | |/ |
|
|||
4952 | o 3 |
|
|||
4953 |
|
||||
4954 |
|
||||
4955 | $ hg log --graph -T "{graphwidth}" -r 3 |
|
|||
4956 | o 5 |
|
|||
4957 | |\ |
|
|||
4958 | ~ ~ |
|
|||
4959 |
|
||||
4960 | $ hg log --graph -T "{graphwidth}" -r 1 |
|
|||
4961 | o 3 |
|
|||
4962 | | |
|
|||
4963 | ~ |
|
|||
4964 |
|
||||
4965 | $ hg merge |
|
|||
4966 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
4967 | (branch merge, don't forget to commit) |
|
|||
4968 | $ hg commit -m "$wrappabletext" |
|
|||
4969 |
|
||||
4970 | $ printf "seventh\n" >> file |
|
|||
4971 | $ hg commit -m "$wrappabletext" |
|
|||
4972 |
|
||||
4973 | $ hg log --graph -T "{graphwidth}" |
|
|||
4974 | @ 3 |
|
|||
4975 | | |
|
|||
4976 | o 5 |
|
|||
4977 | |\ |
|
|||
4978 | | o 5 |
|
|||
4979 | | | |
|
|||
4980 | o | 7 |
|
|||
4981 | |\ \ |
|
|||
4982 | | o | 7 |
|
|||
4983 | | |/ |
|
|||
4984 | o / 5 |
|
|||
4985 | |/ |
|
|||
4986 | o 3 |
|
|||
4987 |
|
||||
4988 |
|
||||
4989 | The point of graphwidth is to allow wrapping that accounts for the space taken |
|
|||
4990 | by the graph. |
|
|||
4991 |
|
||||
4992 | $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}" |
|
|||
4993 | @ a a a a |
|
|||
4994 | | a a a a |
|
|||
4995 | | a a a a |
|
|||
4996 | o a a a |
|
|||
4997 | |\ a a a |
|
|||
4998 | | | a a a |
|
|||
4999 | | | a a a |
|
|||
5000 | | o a a a |
|
|||
5001 | | | a a a |
|
|||
5002 | | | a a a |
|
|||
5003 | | | a a a |
|
|||
5004 | o | a a |
|
|||
5005 | |\ \ a a |
|
|||
5006 | | | | a a |
|
|||
5007 | | | | a a |
|
|||
5008 | | | | a a |
|
|||
5009 | | | | a a |
|
|||
5010 | | o | a a |
|
|||
5011 | | |/ a a |
|
|||
5012 | | | a a |
|
|||
5013 | | | a a |
|
|||
5014 | | | a a |
|
|||
5015 | | | a a |
|
|||
5016 | o | a a a |
|
|||
5017 | |/ a a a |
|
|||
5018 | | a a a |
|
|||
5019 | | a a a |
|
|||
5020 | o a a a a |
|
|||
5021 | a a a a |
|
|||
5022 | a a a a |
|
|||
5023 |
|
||||
5024 | Something tricky happens when there are elided nodes; the next drawn row of |
|
|||
5025 | edges can be more than one column wider, but the graph width only increases by |
|
|||
5026 | one column. The remaining columns are added in between the nodes. |
|
|||
5027 |
|
||||
5028 | $ hg log --graph -T "{graphwidth}" -r "0|2|4|5" |
|
|||
5029 | o 5 |
|
|||
5030 | |\ |
|
|||
5031 | | \ |
|
|||
5032 | | :\ |
|
|||
5033 | o : : 7 |
|
|||
5034 | :/ / |
|
|||
5035 | : o 5 |
|
|||
5036 | :/ |
|
|||
5037 | o 3 |
|
|||
5038 |
|
||||
5039 |
|
||||
5040 | $ cd .. |
|
|||
5041 |
|
General Comments 0
You need to be logged in to leave comments.
Login now