##// END OF EJS Templates
log: rewrite default template to use labels (issue2866)...
Jordi Gutiérrez Hermoso -
r22766:0ded0f0b default
parent child Browse files
Show More
@@ -1,25 +1,73 b''
1 changeset = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user: {author}\ndate: {date|date}\nsummary: {desc|firstline}\n\n'
1 # Base templates. Due to name clashes with existing keywords, we have
2 changeset_quiet = '{rev}:{node|short}\n'
2 # to replace some keywords with 'lkeyword', for 'labelled keyword'
3 changeset_verbose = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user: {author}\ndate: {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
3 changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
4 changeset_debug = 'changeset: {rev}:{node}\n{branches}{bookmarks}{tags}phase: {phase}\n{parents}{manifest}user: {author}\ndate: {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
4 changeset_quiet = '{node}'
5 start_files = 'files: '
5 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
6 file = ' {file}'
6 changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
7 end_files = '\n'
7
8 start_file_mods = 'files: '
8 # File templates
9 file_mod = ' {file_mod}'
9 lfiles = '{if(files,
10 end_file_mods = '\n'
10 label("ui.note log.files",
11 start_file_adds = 'files+: '
11 "files: {files}\n"))}'
12 file_add = ' {file_add}'
12
13 end_file_adds = '\n'
13 lfile_mods = '{if(file_mods,
14 start_file_dels = 'files-: '
14 label("ui.debug log.files",
15 file_del = ' {file_del}'
15 "files: {file_mods}\n"))}'
16 end_file_dels = '\n'
16
17 start_file_copies = 'copies: '
17 lfile_adds = '{if(file_adds,
18 file_copy = ' {name} ({source})'
18 label("ui.debug log.files",
19 end_file_copies = '\n'
19 "files+: {file_adds}\n"))}'
20 parent = 'parent: {rev}:{node|formatnode}\n'
20
21 manifest = 'manifest: {rev}:{node}\n'
21 lfile_dels = '{if(file_dels,
22 branch = 'branch: {branch}\n'
22 label("ui.debug log.files",
23 tag = 'tag: {tag}\n'
23 "files-: {file_dels}\n"))}'
24 bookmark = 'bookmark: {bookmark}\n'
24
25 extra = 'extra: {key}={value|stringescape}\n'
25 lfile_copies_switch = '{if(file_copies_switch,
26 label("ui.note log.copies",
27 "copies: {file_copies_switch
28 % ' {name} ({source})'}\n"))}'
29
30 # General templates
31 cset = '{label("log.changeset changeset.{phase}",
32 "changeset: {rev}:{node|short}")}\n'
33
34 lphase = '{label("log.phase",
35 "phase: {phase}")}\n'
36
37 fullcset = '{label("log.changeset changeset.{phase}",
38 "changeset: {rev}:{node}")}\n'
39
40 parent = '{label("log.parent changeset.{phase}",
41 "parent: {rev}:{node|formatnode}")}\n'
42
43 node = '{label("log.node",
44 "{rev}:{node|short}")}\n'
45
46 manifest = '{label("ui.debug log.manifest",
47 "manifest: {rev}:{node}")}\n'
48
49 branch = '{label("log.branch",
50 "branch: {branch}")}\n'
51
52 tag = '{label("log.tag",
53 "tag: {tag}")}\n'
54
55 bookmark = '{label("log.bookmark",
56 "bookmark: {bookmark}")}\n'
57
58 user = '{label("log.user",
59 "user: {author}")}\n'
60
61 summary = '{label("log.summary",
62 "summary: {desc|firstline}")}\n'
63
64 ldate = '{label("log.date",
65 "date: {date|date}")}\n'
66
67 extra = '{label("ui.debug log.extra",
68 "extra: {key}={value|stringescape}")}\n'
69
70 description = '{label("ui.note log.description",
71 "description:")}
72 {label("ui.note log.description",
73 "{desc|strip}")}\n\n'
@@ -1,2464 +1,2484 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 Second branch starting at nullrev:
32 Second branch starting at nullrev:
33
33
34 $ hg update null
34 $ hg update null
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
36 $ echo second > second
36 $ echo second > second
37 $ hg add second
37 $ hg add second
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
39 created new head
39 created new head
40
40
41 $ echo third > third
41 $ echo third > third
42 $ hg add third
42 $ hg add third
43 $ hg mv second fourth
43 $ hg mv second fourth
44 $ hg commit -m third -d "2020-01-01 10:01"
44 $ hg commit -m third -d "2020-01-01 10:01"
45
45
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
47 fourth (second)
47 fourth (second)
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
49 second -> fourth
49 second -> fourth
50
50
51 Quoting for ui.logtemplate
51 Quoting for ui.logtemplate
52
52
53 $ hg tip --config "ui.logtemplate={rev}\n"
53 $ hg tip --config "ui.logtemplate={rev}\n"
54 8
54 8
55 $ hg tip --config "ui.logtemplate='{rev}\n'"
55 $ hg tip --config "ui.logtemplate='{rev}\n'"
56 8
56 8
57 $ hg tip --config 'ui.logtemplate="{rev}\n"'
57 $ hg tip --config 'ui.logtemplate="{rev}\n"'
58 8
58 8
59
59
60 Make sure user/global hgrc does not affect tests
60 Make sure user/global hgrc does not affect tests
61
61
62 $ echo '[ui]' > .hg/hgrc
62 $ echo '[ui]' > .hg/hgrc
63 $ echo 'logtemplate =' >> .hg/hgrc
63 $ echo 'logtemplate =' >> .hg/hgrc
64 $ echo 'style =' >> .hg/hgrc
64 $ echo 'style =' >> .hg/hgrc
65
65
66 Add some simple styles to settings
66 Add some simple styles to settings
67
67
68 $ echo '[templates]' >> .hg/hgrc
68 $ echo '[templates]' >> .hg/hgrc
69 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
69 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
70 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
70 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
71
71
72 $ hg log -l1 -Tsimple
72 $ hg log -l1 -Tsimple
73 8
73 8
74 $ hg log -l1 -Tsimple2
74 $ hg log -l1 -Tsimple2
75 8
75 8
76
76
77 Test templates and style maps in files:
77 Test templates and style maps in files:
78
78
79 $ echo "{rev}" > tmpl
79 $ echo "{rev}" > tmpl
80 $ hg log -l1 -T./tmpl
80 $ hg log -l1 -T./tmpl
81 8
81 8
82 $ hg log -l1 -Tblah/blah
82 $ hg log -l1 -Tblah/blah
83 blah/blah (no-eol)
83 blah/blah (no-eol)
84
84
85 $ printf 'changeset = "{rev}\\n"\n' > map-simple
85 $ printf 'changeset = "{rev}\\n"\n' > map-simple
86 $ hg log -l1 -T./map-simple
86 $ hg log -l1 -T./map-simple
87 8
87 8
88
88
89 Template should precede style option
89 Template should precede style option
90
90
91 $ hg log -l1 --style default -T '{rev}\n'
91 $ hg log -l1 --style default -T '{rev}\n'
92 8
92 8
93
93
94 Default style is like normal output:
94 Default style is like normal output:
95
95
96 $ hg log > log.out
96 $ hg log > log.out
97 $ hg log --style default > style.out
97 $ hg log --style default > style.out
98 $ cmp log.out style.out || diff -u log.out style.out
98 $ cmp log.out style.out || diff -u log.out style.out
99
99
100 $ hg log -v > log.out
100 $ hg log -v > log.out
101 $ hg log -v --style default > style.out
101 $ hg log -v --style default > style.out
102 $ cmp log.out style.out || diff -u log.out style.out
102 $ cmp log.out style.out || diff -u log.out style.out
103
103
104 $ hg log --debug > log.out
104 $ hg log --debug > log.out
105 $ hg log --debug --style default > style.out
105 $ hg log --debug --style default > style.out
106 $ cmp log.out style.out || diff -u log.out style.out
106 $ cmp log.out style.out || diff -u log.out style.out
107
107
108 Default style should also preserve color information (issue2866):
109
110 $ cp $HGRCPATH $HGRCPATH-bak
111 $ cat <<EOF >> $HGRCPATH
112 > [extensions]
113 > color=
114 > EOF
115
116 $ hg --color=debug log > log.out
117 $ hg --color=debug log --style default > style.out
118 $ cmp log.out style.out || diff -u log.out style.out
119 $ hg --color=debug -v log > log.out
120 $ hg --color=debug -v log --style default > style.out
121 $ cmp log.out style.out || diff -u log.out style.out
122 $ hg --color=debug --debug log > log.out
123 $ hg --color=debug --debug log --style default > style.out
124 $ cmp log.out style.out || diff -u log.out style.out
125
126 $ mv $HGRCPATH-bak $HGRCPATH
127
108 Revision with no copies (used to print a traceback):
128 Revision with no copies (used to print a traceback):
109
129
110 $ hg tip -v --template '\n'
130 $ hg tip -v --template '\n'
111
131
112
132
113 Compact style works:
133 Compact style works:
114
134
115 $ hg log -Tcompact
135 $ hg log -Tcompact
116 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
136 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
117 third
137 third
118
138
119 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
139 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
120 second
140 second
121
141
122 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
142 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
123 merge
143 merge
124
144
125 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
145 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
126 new head
146 new head
127
147
128 4 bbe44766e73d 1970-01-17 04:53 +0000 person
148 4 bbe44766e73d 1970-01-17 04:53 +0000 person
129 new branch
149 new branch
130
150
131 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
151 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
132 no user, no domain
152 no user, no domain
133
153
134 2 97054abb4ab8 1970-01-14 21:20 +0000 other
154 2 97054abb4ab8 1970-01-14 21:20 +0000 other
135 no person
155 no person
136
156
137 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
157 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
138 other 1
158 other 1
139
159
140 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
160 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
141 line 1
161 line 1
142
162
143
163
144 $ hg log -v --style compact
164 $ hg log -v --style compact
145 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
165 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
146 third
166 third
147
167
148 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
168 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
149 second
169 second
150
170
151 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
171 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
152 merge
172 merge
153
173
154 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
174 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
155 new head
175 new head
156
176
157 4 bbe44766e73d 1970-01-17 04:53 +0000 person
177 4 bbe44766e73d 1970-01-17 04:53 +0000 person
158 new branch
178 new branch
159
179
160 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
180 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
161 no user, no domain
181 no user, no domain
162
182
163 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
183 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
164 no person
184 no person
165
185
166 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
186 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
167 other 1
187 other 1
168 other 2
188 other 2
169
189
170 other 3
190 other 3
171
191
172 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
192 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
173 line 1
193 line 1
174 line 2
194 line 2
175
195
176
196
177 $ hg log --debug --style compact
197 $ hg log --debug --style compact
178 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
198 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
179 third
199 third
180
200
181 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
201 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
182 second
202 second
183
203
184 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
204 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
185 merge
205 merge
186
206
187 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
207 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
188 new head
208 new head
189
209
190 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
210 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
191 new branch
211 new branch
192
212
193 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
213 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
194 no user, no domain
214 no user, no domain
195
215
196 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
216 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
197 no person
217 no person
198
218
199 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
219 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
200 other 1
220 other 1
201 other 2
221 other 2
202
222
203 other 3
223 other 3
204
224
205 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
225 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
206 line 1
226 line 1
207 line 2
227 line 2
208
228
209
229
210 Test xml styles:
230 Test xml styles:
211
231
212 $ hg log --style xml
232 $ hg log --style xml
213 <?xml version="1.0"?>
233 <?xml version="1.0"?>
214 <log>
234 <log>
215 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
235 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
216 <tag>tip</tag>
236 <tag>tip</tag>
217 <author email="test">test</author>
237 <author email="test">test</author>
218 <date>2020-01-01T10:01:00+00:00</date>
238 <date>2020-01-01T10:01:00+00:00</date>
219 <msg xml:space="preserve">third</msg>
239 <msg xml:space="preserve">third</msg>
220 </logentry>
240 </logentry>
221 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
241 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
222 <parent revision="-1" node="0000000000000000000000000000000000000000" />
242 <parent revision="-1" node="0000000000000000000000000000000000000000" />
223 <author email="user@hostname">User Name</author>
243 <author email="user@hostname">User Name</author>
224 <date>1970-01-12T13:46:40+00:00</date>
244 <date>1970-01-12T13:46:40+00:00</date>
225 <msg xml:space="preserve">second</msg>
245 <msg xml:space="preserve">second</msg>
226 </logentry>
246 </logentry>
227 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
247 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
228 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
248 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
229 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
249 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
230 <author email="person">person</author>
250 <author email="person">person</author>
231 <date>1970-01-18T08:40:01+00:00</date>
251 <date>1970-01-18T08:40:01+00:00</date>
232 <msg xml:space="preserve">merge</msg>
252 <msg xml:space="preserve">merge</msg>
233 </logentry>
253 </logentry>
234 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
254 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
235 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
255 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
236 <author email="person">person</author>
256 <author email="person">person</author>
237 <date>1970-01-18T08:40:00+00:00</date>
257 <date>1970-01-18T08:40:00+00:00</date>
238 <msg xml:space="preserve">new head</msg>
258 <msg xml:space="preserve">new head</msg>
239 </logentry>
259 </logentry>
240 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
260 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
241 <branch>foo</branch>
261 <branch>foo</branch>
242 <author email="person">person</author>
262 <author email="person">person</author>
243 <date>1970-01-17T04:53:20+00:00</date>
263 <date>1970-01-17T04:53:20+00:00</date>
244 <msg xml:space="preserve">new branch</msg>
264 <msg xml:space="preserve">new branch</msg>
245 </logentry>
265 </logentry>
246 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
266 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
247 <author email="person">person</author>
267 <author email="person">person</author>
248 <date>1970-01-16T01:06:40+00:00</date>
268 <date>1970-01-16T01:06:40+00:00</date>
249 <msg xml:space="preserve">no user, no domain</msg>
269 <msg xml:space="preserve">no user, no domain</msg>
250 </logentry>
270 </logentry>
251 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
271 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
252 <author email="other@place">other</author>
272 <author email="other@place">other</author>
253 <date>1970-01-14T21:20:00+00:00</date>
273 <date>1970-01-14T21:20:00+00:00</date>
254 <msg xml:space="preserve">no person</msg>
274 <msg xml:space="preserve">no person</msg>
255 </logentry>
275 </logentry>
256 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
276 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
257 <author email="other@place">A. N. Other</author>
277 <author email="other@place">A. N. Other</author>
258 <date>1970-01-13T17:33:20+00:00</date>
278 <date>1970-01-13T17:33:20+00:00</date>
259 <msg xml:space="preserve">other 1
279 <msg xml:space="preserve">other 1
260 other 2
280 other 2
261
281
262 other 3</msg>
282 other 3</msg>
263 </logentry>
283 </logentry>
264 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
284 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
265 <author email="user@hostname">User Name</author>
285 <author email="user@hostname">User Name</author>
266 <date>1970-01-12T13:46:40+00:00</date>
286 <date>1970-01-12T13:46:40+00:00</date>
267 <msg xml:space="preserve">line 1
287 <msg xml:space="preserve">line 1
268 line 2</msg>
288 line 2</msg>
269 </logentry>
289 </logentry>
270 </log>
290 </log>
271
291
272 $ hg log -v --style xml
292 $ hg log -v --style xml
273 <?xml version="1.0"?>
293 <?xml version="1.0"?>
274 <log>
294 <log>
275 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
295 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
276 <tag>tip</tag>
296 <tag>tip</tag>
277 <author email="test">test</author>
297 <author email="test">test</author>
278 <date>2020-01-01T10:01:00+00:00</date>
298 <date>2020-01-01T10:01:00+00:00</date>
279 <msg xml:space="preserve">third</msg>
299 <msg xml:space="preserve">third</msg>
280 <paths>
300 <paths>
281 <path action="A">fourth</path>
301 <path action="A">fourth</path>
282 <path action="A">third</path>
302 <path action="A">third</path>
283 <path action="R">second</path>
303 <path action="R">second</path>
284 </paths>
304 </paths>
285 <copies>
305 <copies>
286 <copy source="second">fourth</copy>
306 <copy source="second">fourth</copy>
287 </copies>
307 </copies>
288 </logentry>
308 </logentry>
289 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
309 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
290 <parent revision="-1" node="0000000000000000000000000000000000000000" />
310 <parent revision="-1" node="0000000000000000000000000000000000000000" />
291 <author email="user@hostname">User Name</author>
311 <author email="user@hostname">User Name</author>
292 <date>1970-01-12T13:46:40+00:00</date>
312 <date>1970-01-12T13:46:40+00:00</date>
293 <msg xml:space="preserve">second</msg>
313 <msg xml:space="preserve">second</msg>
294 <paths>
314 <paths>
295 <path action="A">second</path>
315 <path action="A">second</path>
296 </paths>
316 </paths>
297 </logentry>
317 </logentry>
298 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
318 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
299 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
319 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
300 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
320 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
301 <author email="person">person</author>
321 <author email="person">person</author>
302 <date>1970-01-18T08:40:01+00:00</date>
322 <date>1970-01-18T08:40:01+00:00</date>
303 <msg xml:space="preserve">merge</msg>
323 <msg xml:space="preserve">merge</msg>
304 <paths>
324 <paths>
305 </paths>
325 </paths>
306 </logentry>
326 </logentry>
307 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
327 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
308 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
328 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
309 <author email="person">person</author>
329 <author email="person">person</author>
310 <date>1970-01-18T08:40:00+00:00</date>
330 <date>1970-01-18T08:40:00+00:00</date>
311 <msg xml:space="preserve">new head</msg>
331 <msg xml:space="preserve">new head</msg>
312 <paths>
332 <paths>
313 <path action="A">d</path>
333 <path action="A">d</path>
314 </paths>
334 </paths>
315 </logentry>
335 </logentry>
316 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
336 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
317 <branch>foo</branch>
337 <branch>foo</branch>
318 <author email="person">person</author>
338 <author email="person">person</author>
319 <date>1970-01-17T04:53:20+00:00</date>
339 <date>1970-01-17T04:53:20+00:00</date>
320 <msg xml:space="preserve">new branch</msg>
340 <msg xml:space="preserve">new branch</msg>
321 <paths>
341 <paths>
322 </paths>
342 </paths>
323 </logentry>
343 </logentry>
324 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
344 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
325 <author email="person">person</author>
345 <author email="person">person</author>
326 <date>1970-01-16T01:06:40+00:00</date>
346 <date>1970-01-16T01:06:40+00:00</date>
327 <msg xml:space="preserve">no user, no domain</msg>
347 <msg xml:space="preserve">no user, no domain</msg>
328 <paths>
348 <paths>
329 <path action="M">c</path>
349 <path action="M">c</path>
330 </paths>
350 </paths>
331 </logentry>
351 </logentry>
332 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
352 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
333 <author email="other@place">other</author>
353 <author email="other@place">other</author>
334 <date>1970-01-14T21:20:00+00:00</date>
354 <date>1970-01-14T21:20:00+00:00</date>
335 <msg xml:space="preserve">no person</msg>
355 <msg xml:space="preserve">no person</msg>
336 <paths>
356 <paths>
337 <path action="A">c</path>
357 <path action="A">c</path>
338 </paths>
358 </paths>
339 </logentry>
359 </logentry>
340 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
360 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
341 <author email="other@place">A. N. Other</author>
361 <author email="other@place">A. N. Other</author>
342 <date>1970-01-13T17:33:20+00:00</date>
362 <date>1970-01-13T17:33:20+00:00</date>
343 <msg xml:space="preserve">other 1
363 <msg xml:space="preserve">other 1
344 other 2
364 other 2
345
365
346 other 3</msg>
366 other 3</msg>
347 <paths>
367 <paths>
348 <path action="A">b</path>
368 <path action="A">b</path>
349 </paths>
369 </paths>
350 </logentry>
370 </logentry>
351 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
371 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
352 <author email="user@hostname">User Name</author>
372 <author email="user@hostname">User Name</author>
353 <date>1970-01-12T13:46:40+00:00</date>
373 <date>1970-01-12T13:46:40+00:00</date>
354 <msg xml:space="preserve">line 1
374 <msg xml:space="preserve">line 1
355 line 2</msg>
375 line 2</msg>
356 <paths>
376 <paths>
357 <path action="A">a</path>
377 <path action="A">a</path>
358 </paths>
378 </paths>
359 </logentry>
379 </logentry>
360 </log>
380 </log>
361
381
362 $ hg log --debug --style xml
382 $ hg log --debug --style xml
363 <?xml version="1.0"?>
383 <?xml version="1.0"?>
364 <log>
384 <log>
365 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
385 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
366 <tag>tip</tag>
386 <tag>tip</tag>
367 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
387 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
368 <parent revision="-1" node="0000000000000000000000000000000000000000" />
388 <parent revision="-1" node="0000000000000000000000000000000000000000" />
369 <author email="test">test</author>
389 <author email="test">test</author>
370 <date>2020-01-01T10:01:00+00:00</date>
390 <date>2020-01-01T10:01:00+00:00</date>
371 <msg xml:space="preserve">third</msg>
391 <msg xml:space="preserve">third</msg>
372 <paths>
392 <paths>
373 <path action="A">fourth</path>
393 <path action="A">fourth</path>
374 <path action="A">third</path>
394 <path action="A">third</path>
375 <path action="R">second</path>
395 <path action="R">second</path>
376 </paths>
396 </paths>
377 <copies>
397 <copies>
378 <copy source="second">fourth</copy>
398 <copy source="second">fourth</copy>
379 </copies>
399 </copies>
380 <extra key="branch">default</extra>
400 <extra key="branch">default</extra>
381 </logentry>
401 </logentry>
382 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
402 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
383 <parent revision="-1" node="0000000000000000000000000000000000000000" />
403 <parent revision="-1" node="0000000000000000000000000000000000000000" />
384 <parent revision="-1" node="0000000000000000000000000000000000000000" />
404 <parent revision="-1" node="0000000000000000000000000000000000000000" />
385 <author email="user@hostname">User Name</author>
405 <author email="user@hostname">User Name</author>
386 <date>1970-01-12T13:46:40+00:00</date>
406 <date>1970-01-12T13:46:40+00:00</date>
387 <msg xml:space="preserve">second</msg>
407 <msg xml:space="preserve">second</msg>
388 <paths>
408 <paths>
389 <path action="A">second</path>
409 <path action="A">second</path>
390 </paths>
410 </paths>
391 <extra key="branch">default</extra>
411 <extra key="branch">default</extra>
392 </logentry>
412 </logentry>
393 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
413 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
394 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
414 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
395 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
415 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
396 <author email="person">person</author>
416 <author email="person">person</author>
397 <date>1970-01-18T08:40:01+00:00</date>
417 <date>1970-01-18T08:40:01+00:00</date>
398 <msg xml:space="preserve">merge</msg>
418 <msg xml:space="preserve">merge</msg>
399 <paths>
419 <paths>
400 </paths>
420 </paths>
401 <extra key="branch">default</extra>
421 <extra key="branch">default</extra>
402 </logentry>
422 </logentry>
403 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
423 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
404 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
424 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
405 <parent revision="-1" node="0000000000000000000000000000000000000000" />
425 <parent revision="-1" node="0000000000000000000000000000000000000000" />
406 <author email="person">person</author>
426 <author email="person">person</author>
407 <date>1970-01-18T08:40:00+00:00</date>
427 <date>1970-01-18T08:40:00+00:00</date>
408 <msg xml:space="preserve">new head</msg>
428 <msg xml:space="preserve">new head</msg>
409 <paths>
429 <paths>
410 <path action="A">d</path>
430 <path action="A">d</path>
411 </paths>
431 </paths>
412 <extra key="branch">default</extra>
432 <extra key="branch">default</extra>
413 </logentry>
433 </logentry>
414 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
434 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
415 <branch>foo</branch>
435 <branch>foo</branch>
416 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
436 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
417 <parent revision="-1" node="0000000000000000000000000000000000000000" />
437 <parent revision="-1" node="0000000000000000000000000000000000000000" />
418 <author email="person">person</author>
438 <author email="person">person</author>
419 <date>1970-01-17T04:53:20+00:00</date>
439 <date>1970-01-17T04:53:20+00:00</date>
420 <msg xml:space="preserve">new branch</msg>
440 <msg xml:space="preserve">new branch</msg>
421 <paths>
441 <paths>
422 </paths>
442 </paths>
423 <extra key="branch">foo</extra>
443 <extra key="branch">foo</extra>
424 </logentry>
444 </logentry>
425 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
445 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
426 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
446 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
427 <parent revision="-1" node="0000000000000000000000000000000000000000" />
447 <parent revision="-1" node="0000000000000000000000000000000000000000" />
428 <author email="person">person</author>
448 <author email="person">person</author>
429 <date>1970-01-16T01:06:40+00:00</date>
449 <date>1970-01-16T01:06:40+00:00</date>
430 <msg xml:space="preserve">no user, no domain</msg>
450 <msg xml:space="preserve">no user, no domain</msg>
431 <paths>
451 <paths>
432 <path action="M">c</path>
452 <path action="M">c</path>
433 </paths>
453 </paths>
434 <extra key="branch">default</extra>
454 <extra key="branch">default</extra>
435 </logentry>
455 </logentry>
436 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
456 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
437 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
457 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
438 <parent revision="-1" node="0000000000000000000000000000000000000000" />
458 <parent revision="-1" node="0000000000000000000000000000000000000000" />
439 <author email="other@place">other</author>
459 <author email="other@place">other</author>
440 <date>1970-01-14T21:20:00+00:00</date>
460 <date>1970-01-14T21:20:00+00:00</date>
441 <msg xml:space="preserve">no person</msg>
461 <msg xml:space="preserve">no person</msg>
442 <paths>
462 <paths>
443 <path action="A">c</path>
463 <path action="A">c</path>
444 </paths>
464 </paths>
445 <extra key="branch">default</extra>
465 <extra key="branch">default</extra>
446 </logentry>
466 </logentry>
447 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
467 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
448 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
468 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
449 <parent revision="-1" node="0000000000000000000000000000000000000000" />
469 <parent revision="-1" node="0000000000000000000000000000000000000000" />
450 <author email="other@place">A. N. Other</author>
470 <author email="other@place">A. N. Other</author>
451 <date>1970-01-13T17:33:20+00:00</date>
471 <date>1970-01-13T17:33:20+00:00</date>
452 <msg xml:space="preserve">other 1
472 <msg xml:space="preserve">other 1
453 other 2
473 other 2
454
474
455 other 3</msg>
475 other 3</msg>
456 <paths>
476 <paths>
457 <path action="A">b</path>
477 <path action="A">b</path>
458 </paths>
478 </paths>
459 <extra key="branch">default</extra>
479 <extra key="branch">default</extra>
460 </logentry>
480 </logentry>
461 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
481 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
462 <parent revision="-1" node="0000000000000000000000000000000000000000" />
482 <parent revision="-1" node="0000000000000000000000000000000000000000" />
463 <parent revision="-1" node="0000000000000000000000000000000000000000" />
483 <parent revision="-1" node="0000000000000000000000000000000000000000" />
464 <author email="user@hostname">User Name</author>
484 <author email="user@hostname">User Name</author>
465 <date>1970-01-12T13:46:40+00:00</date>
485 <date>1970-01-12T13:46:40+00:00</date>
466 <msg xml:space="preserve">line 1
486 <msg xml:space="preserve">line 1
467 line 2</msg>
487 line 2</msg>
468 <paths>
488 <paths>
469 <path action="A">a</path>
489 <path action="A">a</path>
470 </paths>
490 </paths>
471 <extra key="branch">default</extra>
491 <extra key="branch">default</extra>
472 </logentry>
492 </logentry>
473 </log>
493 </log>
474
494
475
495
476 Test JSON style:
496 Test JSON style:
477
497
478 $ hg log -k nosuch -Tjson
498 $ hg log -k nosuch -Tjson
479 []
499 []
480
500
481 $ hg log -qr . -Tjson
501 $ hg log -qr . -Tjson
482 [
502 [
483 {
503 {
484 "rev": 8,
504 "rev": 8,
485 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
505 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
486 }
506 }
487 ]
507 ]
488
508
489 $ hg log -vpr . -Tjson --stat
509 $ hg log -vpr . -Tjson --stat
490 [
510 [
491 {
511 {
492 "rev": 8,
512 "rev": 8,
493 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
513 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
494 "branch": "default",
514 "branch": "default",
495 "phase": "draft",
515 "phase": "draft",
496 "user": "test",
516 "user": "test",
497 "date": [1577872860, 0],
517 "date": [1577872860, 0],
498 "desc": "third",
518 "desc": "third",
499 "bookmarks": [],
519 "bookmarks": [],
500 "tags": ["tip"],
520 "tags": ["tip"],
501 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
521 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
502 "files": ["fourth", "second", "third"],
522 "files": ["fourth", "second", "third"],
503 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
523 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
504 "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"
524 "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"
505 }
525 }
506 ]
526 ]
507
527
508 $ hg log -T json
528 $ hg log -T json
509 [
529 [
510 {
530 {
511 "rev": 8,
531 "rev": 8,
512 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
532 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
513 "branch": "default",
533 "branch": "default",
514 "phase": "draft",
534 "phase": "draft",
515 "user": "test",
535 "user": "test",
516 "date": [1577872860, 0],
536 "date": [1577872860, 0],
517 "desc": "third",
537 "desc": "third",
518 "bookmarks": [],
538 "bookmarks": [],
519 "tags": ["tip"],
539 "tags": ["tip"],
520 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
540 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
521 },
541 },
522 {
542 {
523 "rev": 7,
543 "rev": 7,
524 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
544 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
525 "branch": "default",
545 "branch": "default",
526 "phase": "draft",
546 "phase": "draft",
527 "user": "User Name <user@hostname>",
547 "user": "User Name <user@hostname>",
528 "date": [1000000, 0],
548 "date": [1000000, 0],
529 "desc": "second",
549 "desc": "second",
530 "bookmarks": [],
550 "bookmarks": [],
531 "tags": [],
551 "tags": [],
532 "parents": ["0000000000000000000000000000000000000000"]
552 "parents": ["0000000000000000000000000000000000000000"]
533 },
553 },
534 {
554 {
535 "rev": 6,
555 "rev": 6,
536 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
556 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
537 "branch": "default",
557 "branch": "default",
538 "phase": "draft",
558 "phase": "draft",
539 "user": "person",
559 "user": "person",
540 "date": [1500001, 0],
560 "date": [1500001, 0],
541 "desc": "merge",
561 "desc": "merge",
542 "bookmarks": [],
562 "bookmarks": [],
543 "tags": [],
563 "tags": [],
544 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
564 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
545 },
565 },
546 {
566 {
547 "rev": 5,
567 "rev": 5,
548 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
568 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
549 "branch": "default",
569 "branch": "default",
550 "phase": "draft",
570 "phase": "draft",
551 "user": "person",
571 "user": "person",
552 "date": [1500000, 0],
572 "date": [1500000, 0],
553 "desc": "new head",
573 "desc": "new head",
554 "bookmarks": [],
574 "bookmarks": [],
555 "tags": [],
575 "tags": [],
556 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
576 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
557 },
577 },
558 {
578 {
559 "rev": 4,
579 "rev": 4,
560 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
580 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
561 "branch": "foo",
581 "branch": "foo",
562 "phase": "draft",
582 "phase": "draft",
563 "user": "person",
583 "user": "person",
564 "date": [1400000, 0],
584 "date": [1400000, 0],
565 "desc": "new branch",
585 "desc": "new branch",
566 "bookmarks": [],
586 "bookmarks": [],
567 "tags": [],
587 "tags": [],
568 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
588 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
569 },
589 },
570 {
590 {
571 "rev": 3,
591 "rev": 3,
572 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
592 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
573 "branch": "default",
593 "branch": "default",
574 "phase": "draft",
594 "phase": "draft",
575 "user": "person",
595 "user": "person",
576 "date": [1300000, 0],
596 "date": [1300000, 0],
577 "desc": "no user, no domain",
597 "desc": "no user, no domain",
578 "bookmarks": [],
598 "bookmarks": [],
579 "tags": [],
599 "tags": [],
580 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
600 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
581 },
601 },
582 {
602 {
583 "rev": 2,
603 "rev": 2,
584 "node": "97054abb4ab824450e9164180baf491ae0078465",
604 "node": "97054abb4ab824450e9164180baf491ae0078465",
585 "branch": "default",
605 "branch": "default",
586 "phase": "draft",
606 "phase": "draft",
587 "user": "other@place",
607 "user": "other@place",
588 "date": [1200000, 0],
608 "date": [1200000, 0],
589 "desc": "no person",
609 "desc": "no person",
590 "bookmarks": [],
610 "bookmarks": [],
591 "tags": [],
611 "tags": [],
592 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
612 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
593 },
613 },
594 {
614 {
595 "rev": 1,
615 "rev": 1,
596 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
616 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
597 "branch": "default",
617 "branch": "default",
598 "phase": "draft",
618 "phase": "draft",
599 "user": "A. N. Other <other@place>",
619 "user": "A. N. Other <other@place>",
600 "date": [1100000, 0],
620 "date": [1100000, 0],
601 "desc": "other 1\nother 2\n\nother 3",
621 "desc": "other 1\nother 2\n\nother 3",
602 "bookmarks": [],
622 "bookmarks": [],
603 "tags": [],
623 "tags": [],
604 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
624 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
605 },
625 },
606 {
626 {
607 "rev": 0,
627 "rev": 0,
608 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
628 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
609 "branch": "default",
629 "branch": "default",
610 "phase": "draft",
630 "phase": "draft",
611 "user": "User Name <user@hostname>",
631 "user": "User Name <user@hostname>",
612 "date": [1000000, 0],
632 "date": [1000000, 0],
613 "desc": "line 1\nline 2",
633 "desc": "line 1\nline 2",
614 "bookmarks": [],
634 "bookmarks": [],
615 "tags": [],
635 "tags": [],
616 "parents": ["0000000000000000000000000000000000000000"]
636 "parents": ["0000000000000000000000000000000000000000"]
617 }
637 }
618 ]
638 ]
619
639
620 $ hg heads -v -Tjson
640 $ hg heads -v -Tjson
621 [
641 [
622 {
642 {
623 "rev": 8,
643 "rev": 8,
624 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
644 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
625 "branch": "default",
645 "branch": "default",
626 "phase": "draft",
646 "phase": "draft",
627 "user": "test",
647 "user": "test",
628 "date": [1577872860, 0],
648 "date": [1577872860, 0],
629 "desc": "third",
649 "desc": "third",
630 "bookmarks": [],
650 "bookmarks": [],
631 "tags": ["tip"],
651 "tags": ["tip"],
632 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
652 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
633 "files": ["fourth", "second", "third"]
653 "files": ["fourth", "second", "third"]
634 },
654 },
635 {
655 {
636 "rev": 6,
656 "rev": 6,
637 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
657 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
638 "branch": "default",
658 "branch": "default",
639 "phase": "draft",
659 "phase": "draft",
640 "user": "person",
660 "user": "person",
641 "date": [1500001, 0],
661 "date": [1500001, 0],
642 "desc": "merge",
662 "desc": "merge",
643 "bookmarks": [],
663 "bookmarks": [],
644 "tags": [],
664 "tags": [],
645 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
665 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
646 "files": []
666 "files": []
647 },
667 },
648 {
668 {
649 "rev": 4,
669 "rev": 4,
650 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
670 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
651 "branch": "foo",
671 "branch": "foo",
652 "phase": "draft",
672 "phase": "draft",
653 "user": "person",
673 "user": "person",
654 "date": [1400000, 0],
674 "date": [1400000, 0],
655 "desc": "new branch",
675 "desc": "new branch",
656 "bookmarks": [],
676 "bookmarks": [],
657 "tags": [],
677 "tags": [],
658 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
678 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
659 "files": []
679 "files": []
660 }
680 }
661 ]
681 ]
662
682
663 $ hg log --debug -Tjson
683 $ hg log --debug -Tjson
664 [
684 [
665 {
685 {
666 "rev": 8,
686 "rev": 8,
667 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
687 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
668 "branch": "default",
688 "branch": "default",
669 "phase": "draft",
689 "phase": "draft",
670 "user": "test",
690 "user": "test",
671 "date": [1577872860, 0],
691 "date": [1577872860, 0],
672 "desc": "third",
692 "desc": "third",
673 "bookmarks": [],
693 "bookmarks": [],
674 "tags": ["tip"],
694 "tags": ["tip"],
675 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
695 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
676 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
696 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
677 "extra": {"branch": "default"},
697 "extra": {"branch": "default"},
678 "modified": [],
698 "modified": [],
679 "added": ["second"],
699 "added": ["second"],
680 "removed": ["fourth", "third"]
700 "removed": ["fourth", "third"]
681 },
701 },
682 {
702 {
683 "rev": 7,
703 "rev": 7,
684 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
704 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
685 "branch": "default",
705 "branch": "default",
686 "phase": "draft",
706 "phase": "draft",
687 "user": "User Name <user@hostname>",
707 "user": "User Name <user@hostname>",
688 "date": [1000000, 0],
708 "date": [1000000, 0],
689 "desc": "second",
709 "desc": "second",
690 "bookmarks": [],
710 "bookmarks": [],
691 "tags": [],
711 "tags": [],
692 "parents": ["0000000000000000000000000000000000000000"],
712 "parents": ["0000000000000000000000000000000000000000"],
693 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
713 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
694 "extra": {"branch": "default"},
714 "extra": {"branch": "default"},
695 "modified": [],
715 "modified": [],
696 "added": [],
716 "added": [],
697 "removed": ["second"]
717 "removed": ["second"]
698 },
718 },
699 {
719 {
700 "rev": 6,
720 "rev": 6,
701 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
721 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
702 "branch": "default",
722 "branch": "default",
703 "phase": "draft",
723 "phase": "draft",
704 "user": "person",
724 "user": "person",
705 "date": [1500001, 0],
725 "date": [1500001, 0],
706 "desc": "merge",
726 "desc": "merge",
707 "bookmarks": [],
727 "bookmarks": [],
708 "tags": [],
728 "tags": [],
709 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
729 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
710 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
730 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
711 "extra": {"branch": "default"},
731 "extra": {"branch": "default"},
712 "modified": [],
732 "modified": [],
713 "added": [],
733 "added": [],
714 "removed": []
734 "removed": []
715 },
735 },
716 {
736 {
717 "rev": 5,
737 "rev": 5,
718 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
738 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
719 "branch": "default",
739 "branch": "default",
720 "phase": "draft",
740 "phase": "draft",
721 "user": "person",
741 "user": "person",
722 "date": [1500000, 0],
742 "date": [1500000, 0],
723 "desc": "new head",
743 "desc": "new head",
724 "bookmarks": [],
744 "bookmarks": [],
725 "tags": [],
745 "tags": [],
726 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
746 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
727 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
747 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
728 "extra": {"branch": "default"},
748 "extra": {"branch": "default"},
729 "modified": [],
749 "modified": [],
730 "added": [],
750 "added": [],
731 "removed": ["d"]
751 "removed": ["d"]
732 },
752 },
733 {
753 {
734 "rev": 4,
754 "rev": 4,
735 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
755 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
736 "branch": "foo",
756 "branch": "foo",
737 "phase": "draft",
757 "phase": "draft",
738 "user": "person",
758 "user": "person",
739 "date": [1400000, 0],
759 "date": [1400000, 0],
740 "desc": "new branch",
760 "desc": "new branch",
741 "bookmarks": [],
761 "bookmarks": [],
742 "tags": [],
762 "tags": [],
743 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
763 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
744 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
764 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
745 "extra": {"branch": "foo"},
765 "extra": {"branch": "foo"},
746 "modified": [],
766 "modified": [],
747 "added": [],
767 "added": [],
748 "removed": []
768 "removed": []
749 },
769 },
750 {
770 {
751 "rev": 3,
771 "rev": 3,
752 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
772 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
753 "branch": "default",
773 "branch": "default",
754 "phase": "draft",
774 "phase": "draft",
755 "user": "person",
775 "user": "person",
756 "date": [1300000, 0],
776 "date": [1300000, 0],
757 "desc": "no user, no domain",
777 "desc": "no user, no domain",
758 "bookmarks": [],
778 "bookmarks": [],
759 "tags": [],
779 "tags": [],
760 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
780 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
761 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
781 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
762 "extra": {"branch": "default"},
782 "extra": {"branch": "default"},
763 "modified": ["c"],
783 "modified": ["c"],
764 "added": [],
784 "added": [],
765 "removed": []
785 "removed": []
766 },
786 },
767 {
787 {
768 "rev": 2,
788 "rev": 2,
769 "node": "97054abb4ab824450e9164180baf491ae0078465",
789 "node": "97054abb4ab824450e9164180baf491ae0078465",
770 "branch": "default",
790 "branch": "default",
771 "phase": "draft",
791 "phase": "draft",
772 "user": "other@place",
792 "user": "other@place",
773 "date": [1200000, 0],
793 "date": [1200000, 0],
774 "desc": "no person",
794 "desc": "no person",
775 "bookmarks": [],
795 "bookmarks": [],
776 "tags": [],
796 "tags": [],
777 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
797 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
778 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
798 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
779 "extra": {"branch": "default"},
799 "extra": {"branch": "default"},
780 "modified": [],
800 "modified": [],
781 "added": [],
801 "added": [],
782 "removed": ["c"]
802 "removed": ["c"]
783 },
803 },
784 {
804 {
785 "rev": 1,
805 "rev": 1,
786 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
806 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
787 "branch": "default",
807 "branch": "default",
788 "phase": "draft",
808 "phase": "draft",
789 "user": "A. N. Other <other@place>",
809 "user": "A. N. Other <other@place>",
790 "date": [1100000, 0],
810 "date": [1100000, 0],
791 "desc": "other 1\nother 2\n\nother 3",
811 "desc": "other 1\nother 2\n\nother 3",
792 "bookmarks": [],
812 "bookmarks": [],
793 "tags": [],
813 "tags": [],
794 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
814 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
795 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
815 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
796 "extra": {"branch": "default"},
816 "extra": {"branch": "default"},
797 "modified": [],
817 "modified": [],
798 "added": [],
818 "added": [],
799 "removed": ["b"]
819 "removed": ["b"]
800 },
820 },
801 {
821 {
802 "rev": 0,
822 "rev": 0,
803 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
823 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
804 "branch": "default",
824 "branch": "default",
805 "phase": "draft",
825 "phase": "draft",
806 "user": "User Name <user@hostname>",
826 "user": "User Name <user@hostname>",
807 "date": [1000000, 0],
827 "date": [1000000, 0],
808 "desc": "line 1\nline 2",
828 "desc": "line 1\nline 2",
809 "bookmarks": [],
829 "bookmarks": [],
810 "tags": [],
830 "tags": [],
811 "parents": ["0000000000000000000000000000000000000000"],
831 "parents": ["0000000000000000000000000000000000000000"],
812 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
832 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
813 "extra": {"branch": "default"},
833 "extra": {"branch": "default"},
814 "modified": [],
834 "modified": [],
815 "added": [],
835 "added": [],
816 "removed": ["a"]
836 "removed": ["a"]
817 }
837 }
818 ]
838 ]
819
839
820 Error if style not readable:
840 Error if style not readable:
821
841
822 #if unix-permissions no-root
842 #if unix-permissions no-root
823 $ touch q
843 $ touch q
824 $ chmod 0 q
844 $ chmod 0 q
825 $ hg log --style ./q
845 $ hg log --style ./q
826 abort: Permission denied: ./q
846 abort: Permission denied: ./q
827 [255]
847 [255]
828 #endif
848 #endif
829
849
830 Error if no style:
850 Error if no style:
831
851
832 $ hg log --style notexist
852 $ hg log --style notexist
833 abort: style 'notexist' not found
853 abort: style 'notexist' not found
834 (available styles: bisect, changelog, compact, default, phases, xml)
854 (available styles: bisect, changelog, compact, default, phases, xml)
835 [255]
855 [255]
836
856
837 $ hg log -T list
857 $ hg log -T list
838 available styles: bisect, changelog, compact, default, phases, xml
858 available styles: bisect, changelog, compact, default, phases, xml
839 abort: specify a template
859 abort: specify a template
840 [255]
860 [255]
841
861
842 Error if style missing key:
862 Error if style missing key:
843
863
844 $ echo 'q = q' > t
864 $ echo 'q = q' > t
845 $ hg log --style ./t
865 $ hg log --style ./t
846 abort: "changeset" not in template map
866 abort: "changeset" not in template map
847 [255]
867 [255]
848
868
849 Error if style missing value:
869 Error if style missing value:
850
870
851 $ echo 'changeset =' > t
871 $ echo 'changeset =' > t
852 $ hg log --style t
872 $ hg log --style t
853 abort: t:1: missing value
873 abort: t:1: missing value
854 [255]
874 [255]
855
875
856 Error if include fails:
876 Error if include fails:
857
877
858 $ echo 'changeset = q' >> t
878 $ echo 'changeset = q' >> t
859 #if unix-permissions no-root
879 #if unix-permissions no-root
860 $ hg log --style ./t
880 $ hg log --style ./t
861 abort: template file ./q: Permission denied
881 abort: template file ./q: Permission denied
862 [255]
882 [255]
863 $ rm q
883 $ rm q
864 #endif
884 #endif
865
885
866 Include works:
886 Include works:
867
887
868 $ echo '{rev}' > q
888 $ echo '{rev}' > q
869 $ hg log --style ./t
889 $ hg log --style ./t
870 8
890 8
871 7
891 7
872 6
892 6
873 5
893 5
874 4
894 4
875 3
895 3
876 2
896 2
877 1
897 1
878 0
898 0
879
899
880 Check that {phase} works correctly on parents:
900 Check that {phase} works correctly on parents:
881
901
882 $ cat << EOF > parentphase
902 $ cat << EOF > parentphase
883 > changeset_debug = '{rev} ({phase}):{parents}\n'
903 > changeset_debug = '{rev} ({phase}):{parents}\n'
884 > parent = ' {rev} ({phase})'
904 > parent = ' {rev} ({phase})'
885 > EOF
905 > EOF
886 $ hg phase -r 5 --public
906 $ hg phase -r 5 --public
887 $ hg phase -r 7 --secret --force
907 $ hg phase -r 7 --secret --force
888 $ hg log --debug -G --style ./parentphase
908 $ hg log --debug -G --style ./parentphase
889 @ 8 (secret): 7 (secret) -1 (public)
909 @ 8 (secret): 7 (secret) -1 (public)
890 |
910 |
891 o 7 (secret): -1 (public) -1 (public)
911 o 7 (secret): -1 (public) -1 (public)
892
912
893 o 6 (draft): 5 (public) 4 (draft)
913 o 6 (draft): 5 (public) 4 (draft)
894 |\
914 |\
895 | o 5 (public): 3 (public) -1 (public)
915 | o 5 (public): 3 (public) -1 (public)
896 | |
916 | |
897 o | 4 (draft): 3 (public) -1 (public)
917 o | 4 (draft): 3 (public) -1 (public)
898 |/
918 |/
899 o 3 (public): 2 (public) -1 (public)
919 o 3 (public): 2 (public) -1 (public)
900 |
920 |
901 o 2 (public): 1 (public) -1 (public)
921 o 2 (public): 1 (public) -1 (public)
902 |
922 |
903 o 1 (public): 0 (public) -1 (public)
923 o 1 (public): 0 (public) -1 (public)
904 |
924 |
905 o 0 (public): -1 (public) -1 (public)
925 o 0 (public): -1 (public) -1 (public)
906
926
907
927
908 Missing non-standard names give no error (backward compatibility):
928 Missing non-standard names give no error (backward compatibility):
909
929
910 $ echo "changeset = '{c}'" > t
930 $ echo "changeset = '{c}'" > t
911 $ hg log --style ./t
931 $ hg log --style ./t
912
932
913 Defining non-standard name works:
933 Defining non-standard name works:
914
934
915 $ cat <<EOF > t
935 $ cat <<EOF > t
916 > changeset = '{c}'
936 > changeset = '{c}'
917 > c = q
937 > c = q
918 > EOF
938 > EOF
919 $ hg log --style ./t
939 $ hg log --style ./t
920 8
940 8
921 7
941 7
922 6
942 6
923 5
943 5
924 4
944 4
925 3
945 3
926 2
946 2
927 1
947 1
928 0
948 0
929
949
930 ui.style works:
950 ui.style works:
931
951
932 $ echo '[ui]' > .hg/hgrc
952 $ echo '[ui]' > .hg/hgrc
933 $ echo 'style = t' >> .hg/hgrc
953 $ echo 'style = t' >> .hg/hgrc
934 $ hg log
954 $ hg log
935 8
955 8
936 7
956 7
937 6
957 6
938 5
958 5
939 4
959 4
940 3
960 3
941 2
961 2
942 1
962 1
943 0
963 0
944
964
945
965
946 Issue338:
966 Issue338:
947
967
948 $ hg log --style=changelog > changelog
968 $ hg log --style=changelog > changelog
949
969
950 $ cat changelog
970 $ cat changelog
951 2020-01-01 test <test>
971 2020-01-01 test <test>
952
972
953 * fourth, second, third:
973 * fourth, second, third:
954 third
974 third
955 [95c24699272e] [tip]
975 [95c24699272e] [tip]
956
976
957 1970-01-12 User Name <user@hostname>
977 1970-01-12 User Name <user@hostname>
958
978
959 * second:
979 * second:
960 second
980 second
961 [29114dbae42b]
981 [29114dbae42b]
962
982
963 1970-01-18 person <person>
983 1970-01-18 person <person>
964
984
965 * merge
985 * merge
966 [d41e714fe50d]
986 [d41e714fe50d]
967
987
968 * d:
988 * d:
969 new head
989 new head
970 [13207e5a10d9]
990 [13207e5a10d9]
971
991
972 1970-01-17 person <person>
992 1970-01-17 person <person>
973
993
974 * new branch
994 * new branch
975 [bbe44766e73d] <foo>
995 [bbe44766e73d] <foo>
976
996
977 1970-01-16 person <person>
997 1970-01-16 person <person>
978
998
979 * c:
999 * c:
980 no user, no domain
1000 no user, no domain
981 [10e46f2dcbf4]
1001 [10e46f2dcbf4]
982
1002
983 1970-01-14 other <other@place>
1003 1970-01-14 other <other@place>
984
1004
985 * c:
1005 * c:
986 no person
1006 no person
987 [97054abb4ab8]
1007 [97054abb4ab8]
988
1008
989 1970-01-13 A. N. Other <other@place>
1009 1970-01-13 A. N. Other <other@place>
990
1010
991 * b:
1011 * b:
992 other 1 other 2
1012 other 1 other 2
993
1013
994 other 3
1014 other 3
995 [b608e9d1a3f0]
1015 [b608e9d1a3f0]
996
1016
997 1970-01-12 User Name <user@hostname>
1017 1970-01-12 User Name <user@hostname>
998
1018
999 * a:
1019 * a:
1000 line 1 line 2
1020 line 1 line 2
1001 [1e4e1b8f71e0]
1021 [1e4e1b8f71e0]
1002
1022
1003
1023
1004 Issue2130: xml output for 'hg heads' is malformed
1024 Issue2130: xml output for 'hg heads' is malformed
1005
1025
1006 $ hg heads --style changelog
1026 $ hg heads --style changelog
1007 2020-01-01 test <test>
1027 2020-01-01 test <test>
1008
1028
1009 * fourth, second, third:
1029 * fourth, second, third:
1010 third
1030 third
1011 [95c24699272e] [tip]
1031 [95c24699272e] [tip]
1012
1032
1013 1970-01-18 person <person>
1033 1970-01-18 person <person>
1014
1034
1015 * merge
1035 * merge
1016 [d41e714fe50d]
1036 [d41e714fe50d]
1017
1037
1018 1970-01-17 person <person>
1038 1970-01-17 person <person>
1019
1039
1020 * new branch
1040 * new branch
1021 [bbe44766e73d] <foo>
1041 [bbe44766e73d] <foo>
1022
1042
1023
1043
1024 Keys work:
1044 Keys work:
1025
1045
1026 $ for key in author branch branches date desc file_adds file_dels file_mods \
1046 $ for key in author branch branches date desc file_adds file_dels file_mods \
1027 > file_copies file_copies_switch files \
1047 > file_copies file_copies_switch files \
1028 > manifest node parents rev tags diffstat extras \
1048 > manifest node parents rev tags diffstat extras \
1029 > p1rev p2rev p1node p2node; do
1049 > p1rev p2rev p1node p2node; do
1030 > for mode in '' --verbose --debug; do
1050 > for mode in '' --verbose --debug; do
1031 > hg log $mode --template "$key$mode: {$key}\n"
1051 > hg log $mode --template "$key$mode: {$key}\n"
1032 > done
1052 > done
1033 > done
1053 > done
1034 author: test
1054 author: test
1035 author: User Name <user@hostname>
1055 author: User Name <user@hostname>
1036 author: person
1056 author: person
1037 author: person
1057 author: person
1038 author: person
1058 author: person
1039 author: person
1059 author: person
1040 author: other@place
1060 author: other@place
1041 author: A. N. Other <other@place>
1061 author: A. N. Other <other@place>
1042 author: User Name <user@hostname>
1062 author: User Name <user@hostname>
1043 author--verbose: test
1063 author--verbose: test
1044 author--verbose: User Name <user@hostname>
1064 author--verbose: User Name <user@hostname>
1045 author--verbose: person
1065 author--verbose: person
1046 author--verbose: person
1066 author--verbose: person
1047 author--verbose: person
1067 author--verbose: person
1048 author--verbose: person
1068 author--verbose: person
1049 author--verbose: other@place
1069 author--verbose: other@place
1050 author--verbose: A. N. Other <other@place>
1070 author--verbose: A. N. Other <other@place>
1051 author--verbose: User Name <user@hostname>
1071 author--verbose: User Name <user@hostname>
1052 author--debug: test
1072 author--debug: test
1053 author--debug: User Name <user@hostname>
1073 author--debug: User Name <user@hostname>
1054 author--debug: person
1074 author--debug: person
1055 author--debug: person
1075 author--debug: person
1056 author--debug: person
1076 author--debug: person
1057 author--debug: person
1077 author--debug: person
1058 author--debug: other@place
1078 author--debug: other@place
1059 author--debug: A. N. Other <other@place>
1079 author--debug: A. N. Other <other@place>
1060 author--debug: User Name <user@hostname>
1080 author--debug: User Name <user@hostname>
1061 branch: default
1081 branch: default
1062 branch: default
1082 branch: default
1063 branch: default
1083 branch: default
1064 branch: default
1084 branch: default
1065 branch: foo
1085 branch: foo
1066 branch: default
1086 branch: default
1067 branch: default
1087 branch: default
1068 branch: default
1088 branch: default
1069 branch: default
1089 branch: default
1070 branch--verbose: default
1090 branch--verbose: default
1071 branch--verbose: default
1091 branch--verbose: default
1072 branch--verbose: default
1092 branch--verbose: default
1073 branch--verbose: default
1093 branch--verbose: default
1074 branch--verbose: foo
1094 branch--verbose: foo
1075 branch--verbose: default
1095 branch--verbose: default
1076 branch--verbose: default
1096 branch--verbose: default
1077 branch--verbose: default
1097 branch--verbose: default
1078 branch--verbose: default
1098 branch--verbose: default
1079 branch--debug: default
1099 branch--debug: default
1080 branch--debug: default
1100 branch--debug: default
1081 branch--debug: default
1101 branch--debug: default
1082 branch--debug: default
1102 branch--debug: default
1083 branch--debug: foo
1103 branch--debug: foo
1084 branch--debug: default
1104 branch--debug: default
1085 branch--debug: default
1105 branch--debug: default
1086 branch--debug: default
1106 branch--debug: default
1087 branch--debug: default
1107 branch--debug: default
1088 branches:
1108 branches:
1089 branches:
1109 branches:
1090 branches:
1110 branches:
1091 branches:
1111 branches:
1092 branches: foo
1112 branches: foo
1093 branches:
1113 branches:
1094 branches:
1114 branches:
1095 branches:
1115 branches:
1096 branches:
1116 branches:
1097 branches--verbose:
1117 branches--verbose:
1098 branches--verbose:
1118 branches--verbose:
1099 branches--verbose:
1119 branches--verbose:
1100 branches--verbose:
1120 branches--verbose:
1101 branches--verbose: foo
1121 branches--verbose: foo
1102 branches--verbose:
1122 branches--verbose:
1103 branches--verbose:
1123 branches--verbose:
1104 branches--verbose:
1124 branches--verbose:
1105 branches--verbose:
1125 branches--verbose:
1106 branches--debug:
1126 branches--debug:
1107 branches--debug:
1127 branches--debug:
1108 branches--debug:
1128 branches--debug:
1109 branches--debug:
1129 branches--debug:
1110 branches--debug: foo
1130 branches--debug: foo
1111 branches--debug:
1131 branches--debug:
1112 branches--debug:
1132 branches--debug:
1113 branches--debug:
1133 branches--debug:
1114 branches--debug:
1134 branches--debug:
1115 date: 1577872860.00
1135 date: 1577872860.00
1116 date: 1000000.00
1136 date: 1000000.00
1117 date: 1500001.00
1137 date: 1500001.00
1118 date: 1500000.00
1138 date: 1500000.00
1119 date: 1400000.00
1139 date: 1400000.00
1120 date: 1300000.00
1140 date: 1300000.00
1121 date: 1200000.00
1141 date: 1200000.00
1122 date: 1100000.00
1142 date: 1100000.00
1123 date: 1000000.00
1143 date: 1000000.00
1124 date--verbose: 1577872860.00
1144 date--verbose: 1577872860.00
1125 date--verbose: 1000000.00
1145 date--verbose: 1000000.00
1126 date--verbose: 1500001.00
1146 date--verbose: 1500001.00
1127 date--verbose: 1500000.00
1147 date--verbose: 1500000.00
1128 date--verbose: 1400000.00
1148 date--verbose: 1400000.00
1129 date--verbose: 1300000.00
1149 date--verbose: 1300000.00
1130 date--verbose: 1200000.00
1150 date--verbose: 1200000.00
1131 date--verbose: 1100000.00
1151 date--verbose: 1100000.00
1132 date--verbose: 1000000.00
1152 date--verbose: 1000000.00
1133 date--debug: 1577872860.00
1153 date--debug: 1577872860.00
1134 date--debug: 1000000.00
1154 date--debug: 1000000.00
1135 date--debug: 1500001.00
1155 date--debug: 1500001.00
1136 date--debug: 1500000.00
1156 date--debug: 1500000.00
1137 date--debug: 1400000.00
1157 date--debug: 1400000.00
1138 date--debug: 1300000.00
1158 date--debug: 1300000.00
1139 date--debug: 1200000.00
1159 date--debug: 1200000.00
1140 date--debug: 1100000.00
1160 date--debug: 1100000.00
1141 date--debug: 1000000.00
1161 date--debug: 1000000.00
1142 desc: third
1162 desc: third
1143 desc: second
1163 desc: second
1144 desc: merge
1164 desc: merge
1145 desc: new head
1165 desc: new head
1146 desc: new branch
1166 desc: new branch
1147 desc: no user, no domain
1167 desc: no user, no domain
1148 desc: no person
1168 desc: no person
1149 desc: other 1
1169 desc: other 1
1150 other 2
1170 other 2
1151
1171
1152 other 3
1172 other 3
1153 desc: line 1
1173 desc: line 1
1154 line 2
1174 line 2
1155 desc--verbose: third
1175 desc--verbose: third
1156 desc--verbose: second
1176 desc--verbose: second
1157 desc--verbose: merge
1177 desc--verbose: merge
1158 desc--verbose: new head
1178 desc--verbose: new head
1159 desc--verbose: new branch
1179 desc--verbose: new branch
1160 desc--verbose: no user, no domain
1180 desc--verbose: no user, no domain
1161 desc--verbose: no person
1181 desc--verbose: no person
1162 desc--verbose: other 1
1182 desc--verbose: other 1
1163 other 2
1183 other 2
1164
1184
1165 other 3
1185 other 3
1166 desc--verbose: line 1
1186 desc--verbose: line 1
1167 line 2
1187 line 2
1168 desc--debug: third
1188 desc--debug: third
1169 desc--debug: second
1189 desc--debug: second
1170 desc--debug: merge
1190 desc--debug: merge
1171 desc--debug: new head
1191 desc--debug: new head
1172 desc--debug: new branch
1192 desc--debug: new branch
1173 desc--debug: no user, no domain
1193 desc--debug: no user, no domain
1174 desc--debug: no person
1194 desc--debug: no person
1175 desc--debug: other 1
1195 desc--debug: other 1
1176 other 2
1196 other 2
1177
1197
1178 other 3
1198 other 3
1179 desc--debug: line 1
1199 desc--debug: line 1
1180 line 2
1200 line 2
1181 file_adds: fourth third
1201 file_adds: fourth third
1182 file_adds: second
1202 file_adds: second
1183 file_adds:
1203 file_adds:
1184 file_adds: d
1204 file_adds: d
1185 file_adds:
1205 file_adds:
1186 file_adds:
1206 file_adds:
1187 file_adds: c
1207 file_adds: c
1188 file_adds: b
1208 file_adds: b
1189 file_adds: a
1209 file_adds: a
1190 file_adds--verbose: fourth third
1210 file_adds--verbose: fourth third
1191 file_adds--verbose: second
1211 file_adds--verbose: second
1192 file_adds--verbose:
1212 file_adds--verbose:
1193 file_adds--verbose: d
1213 file_adds--verbose: d
1194 file_adds--verbose:
1214 file_adds--verbose:
1195 file_adds--verbose:
1215 file_adds--verbose:
1196 file_adds--verbose: c
1216 file_adds--verbose: c
1197 file_adds--verbose: b
1217 file_adds--verbose: b
1198 file_adds--verbose: a
1218 file_adds--verbose: a
1199 file_adds--debug: fourth third
1219 file_adds--debug: fourth third
1200 file_adds--debug: second
1220 file_adds--debug: second
1201 file_adds--debug:
1221 file_adds--debug:
1202 file_adds--debug: d
1222 file_adds--debug: d
1203 file_adds--debug:
1223 file_adds--debug:
1204 file_adds--debug:
1224 file_adds--debug:
1205 file_adds--debug: c
1225 file_adds--debug: c
1206 file_adds--debug: b
1226 file_adds--debug: b
1207 file_adds--debug: a
1227 file_adds--debug: a
1208 file_dels: second
1228 file_dels: second
1209 file_dels:
1229 file_dels:
1210 file_dels:
1230 file_dels:
1211 file_dels:
1231 file_dels:
1212 file_dels:
1232 file_dels:
1213 file_dels:
1233 file_dels:
1214 file_dels:
1234 file_dels:
1215 file_dels:
1235 file_dels:
1216 file_dels:
1236 file_dels:
1217 file_dels--verbose: second
1237 file_dels--verbose: second
1218 file_dels--verbose:
1238 file_dels--verbose:
1219 file_dels--verbose:
1239 file_dels--verbose:
1220 file_dels--verbose:
1240 file_dels--verbose:
1221 file_dels--verbose:
1241 file_dels--verbose:
1222 file_dels--verbose:
1242 file_dels--verbose:
1223 file_dels--verbose:
1243 file_dels--verbose:
1224 file_dels--verbose:
1244 file_dels--verbose:
1225 file_dels--verbose:
1245 file_dels--verbose:
1226 file_dels--debug: second
1246 file_dels--debug: second
1227 file_dels--debug:
1247 file_dels--debug:
1228 file_dels--debug:
1248 file_dels--debug:
1229 file_dels--debug:
1249 file_dels--debug:
1230 file_dels--debug:
1250 file_dels--debug:
1231 file_dels--debug:
1251 file_dels--debug:
1232 file_dels--debug:
1252 file_dels--debug:
1233 file_dels--debug:
1253 file_dels--debug:
1234 file_dels--debug:
1254 file_dels--debug:
1235 file_mods:
1255 file_mods:
1236 file_mods:
1256 file_mods:
1237 file_mods:
1257 file_mods:
1238 file_mods:
1258 file_mods:
1239 file_mods:
1259 file_mods:
1240 file_mods: c
1260 file_mods: c
1241 file_mods:
1261 file_mods:
1242 file_mods:
1262 file_mods:
1243 file_mods:
1263 file_mods:
1244 file_mods--verbose:
1264 file_mods--verbose:
1245 file_mods--verbose:
1265 file_mods--verbose:
1246 file_mods--verbose:
1266 file_mods--verbose:
1247 file_mods--verbose:
1267 file_mods--verbose:
1248 file_mods--verbose:
1268 file_mods--verbose:
1249 file_mods--verbose: c
1269 file_mods--verbose: c
1250 file_mods--verbose:
1270 file_mods--verbose:
1251 file_mods--verbose:
1271 file_mods--verbose:
1252 file_mods--verbose:
1272 file_mods--verbose:
1253 file_mods--debug:
1273 file_mods--debug:
1254 file_mods--debug:
1274 file_mods--debug:
1255 file_mods--debug:
1275 file_mods--debug:
1256 file_mods--debug:
1276 file_mods--debug:
1257 file_mods--debug:
1277 file_mods--debug:
1258 file_mods--debug: c
1278 file_mods--debug: c
1259 file_mods--debug:
1279 file_mods--debug:
1260 file_mods--debug:
1280 file_mods--debug:
1261 file_mods--debug:
1281 file_mods--debug:
1262 file_copies: fourth (second)
1282 file_copies: fourth (second)
1263 file_copies:
1283 file_copies:
1264 file_copies:
1284 file_copies:
1265 file_copies:
1285 file_copies:
1266 file_copies:
1286 file_copies:
1267 file_copies:
1287 file_copies:
1268 file_copies:
1288 file_copies:
1269 file_copies:
1289 file_copies:
1270 file_copies:
1290 file_copies:
1271 file_copies--verbose: fourth (second)
1291 file_copies--verbose: fourth (second)
1272 file_copies--verbose:
1292 file_copies--verbose:
1273 file_copies--verbose:
1293 file_copies--verbose:
1274 file_copies--verbose:
1294 file_copies--verbose:
1275 file_copies--verbose:
1295 file_copies--verbose:
1276 file_copies--verbose:
1296 file_copies--verbose:
1277 file_copies--verbose:
1297 file_copies--verbose:
1278 file_copies--verbose:
1298 file_copies--verbose:
1279 file_copies--verbose:
1299 file_copies--verbose:
1280 file_copies--debug: fourth (second)
1300 file_copies--debug: fourth (second)
1281 file_copies--debug:
1301 file_copies--debug:
1282 file_copies--debug:
1302 file_copies--debug:
1283 file_copies--debug:
1303 file_copies--debug:
1284 file_copies--debug:
1304 file_copies--debug:
1285 file_copies--debug:
1305 file_copies--debug:
1286 file_copies--debug:
1306 file_copies--debug:
1287 file_copies--debug:
1307 file_copies--debug:
1288 file_copies--debug:
1308 file_copies--debug:
1289 file_copies_switch:
1309 file_copies_switch:
1290 file_copies_switch:
1310 file_copies_switch:
1291 file_copies_switch:
1311 file_copies_switch:
1292 file_copies_switch:
1312 file_copies_switch:
1293 file_copies_switch:
1313 file_copies_switch:
1294 file_copies_switch:
1314 file_copies_switch:
1295 file_copies_switch:
1315 file_copies_switch:
1296 file_copies_switch:
1316 file_copies_switch:
1297 file_copies_switch:
1317 file_copies_switch:
1298 file_copies_switch--verbose:
1318 file_copies_switch--verbose:
1299 file_copies_switch--verbose:
1319 file_copies_switch--verbose:
1300 file_copies_switch--verbose:
1320 file_copies_switch--verbose:
1301 file_copies_switch--verbose:
1321 file_copies_switch--verbose:
1302 file_copies_switch--verbose:
1322 file_copies_switch--verbose:
1303 file_copies_switch--verbose:
1323 file_copies_switch--verbose:
1304 file_copies_switch--verbose:
1324 file_copies_switch--verbose:
1305 file_copies_switch--verbose:
1325 file_copies_switch--verbose:
1306 file_copies_switch--verbose:
1326 file_copies_switch--verbose:
1307 file_copies_switch--debug:
1327 file_copies_switch--debug:
1308 file_copies_switch--debug:
1328 file_copies_switch--debug:
1309 file_copies_switch--debug:
1329 file_copies_switch--debug:
1310 file_copies_switch--debug:
1330 file_copies_switch--debug:
1311 file_copies_switch--debug:
1331 file_copies_switch--debug:
1312 file_copies_switch--debug:
1332 file_copies_switch--debug:
1313 file_copies_switch--debug:
1333 file_copies_switch--debug:
1314 file_copies_switch--debug:
1334 file_copies_switch--debug:
1315 file_copies_switch--debug:
1335 file_copies_switch--debug:
1316 files: fourth second third
1336 files: fourth second third
1317 files: second
1337 files: second
1318 files:
1338 files:
1319 files: d
1339 files: d
1320 files:
1340 files:
1321 files: c
1341 files: c
1322 files: c
1342 files: c
1323 files: b
1343 files: b
1324 files: a
1344 files: a
1325 files--verbose: fourth second third
1345 files--verbose: fourth second third
1326 files--verbose: second
1346 files--verbose: second
1327 files--verbose:
1347 files--verbose:
1328 files--verbose: d
1348 files--verbose: d
1329 files--verbose:
1349 files--verbose:
1330 files--verbose: c
1350 files--verbose: c
1331 files--verbose: c
1351 files--verbose: c
1332 files--verbose: b
1352 files--verbose: b
1333 files--verbose: a
1353 files--verbose: a
1334 files--debug: fourth second third
1354 files--debug: fourth second third
1335 files--debug: second
1355 files--debug: second
1336 files--debug:
1356 files--debug:
1337 files--debug: d
1357 files--debug: d
1338 files--debug:
1358 files--debug:
1339 files--debug: c
1359 files--debug: c
1340 files--debug: c
1360 files--debug: c
1341 files--debug: b
1361 files--debug: b
1342 files--debug: a
1362 files--debug: a
1343 manifest: 6:94961b75a2da
1363 manifest: 6:94961b75a2da
1344 manifest: 5:f2dbc354b94e
1364 manifest: 5:f2dbc354b94e
1345 manifest: 4:4dc3def4f9b4
1365 manifest: 4:4dc3def4f9b4
1346 manifest: 4:4dc3def4f9b4
1366 manifest: 4:4dc3def4f9b4
1347 manifest: 3:cb5a1327723b
1367 manifest: 3:cb5a1327723b
1348 manifest: 3:cb5a1327723b
1368 manifest: 3:cb5a1327723b
1349 manifest: 2:6e0e82995c35
1369 manifest: 2:6e0e82995c35
1350 manifest: 1:4e8d705b1e53
1370 manifest: 1:4e8d705b1e53
1351 manifest: 0:a0c8bcbbb45c
1371 manifest: 0:a0c8bcbbb45c
1352 manifest--verbose: 6:94961b75a2da
1372 manifest--verbose: 6:94961b75a2da
1353 manifest--verbose: 5:f2dbc354b94e
1373 manifest--verbose: 5:f2dbc354b94e
1354 manifest--verbose: 4:4dc3def4f9b4
1374 manifest--verbose: 4:4dc3def4f9b4
1355 manifest--verbose: 4:4dc3def4f9b4
1375 manifest--verbose: 4:4dc3def4f9b4
1356 manifest--verbose: 3:cb5a1327723b
1376 manifest--verbose: 3:cb5a1327723b
1357 manifest--verbose: 3:cb5a1327723b
1377 manifest--verbose: 3:cb5a1327723b
1358 manifest--verbose: 2:6e0e82995c35
1378 manifest--verbose: 2:6e0e82995c35
1359 manifest--verbose: 1:4e8d705b1e53
1379 manifest--verbose: 1:4e8d705b1e53
1360 manifest--verbose: 0:a0c8bcbbb45c
1380 manifest--verbose: 0:a0c8bcbbb45c
1361 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1381 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1362 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1382 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1363 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1383 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1364 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1384 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1365 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1385 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1366 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1386 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1367 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1387 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1368 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1388 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1369 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1389 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1370 node: 95c24699272ef57d062b8bccc32c878bf841784a
1390 node: 95c24699272ef57d062b8bccc32c878bf841784a
1371 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1391 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1372 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1392 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1373 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1393 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1374 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1394 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1375 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1395 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1376 node: 97054abb4ab824450e9164180baf491ae0078465
1396 node: 97054abb4ab824450e9164180baf491ae0078465
1377 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1397 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1378 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1398 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1379 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1399 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1380 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1400 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1381 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1401 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1382 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1402 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1383 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1403 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1384 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1404 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1385 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1405 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1386 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1406 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1387 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1407 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1388 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1408 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1389 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1409 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1390 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1410 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1391 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1411 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1392 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1412 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1393 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1413 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1394 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1414 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1395 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1415 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1396 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1416 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1397 parents:
1417 parents:
1398 parents: -1:000000000000
1418 parents: -1:000000000000
1399 parents: 5:13207e5a10d9 4:bbe44766e73d
1419 parents: 5:13207e5a10d9 4:bbe44766e73d
1400 parents: 3:10e46f2dcbf4
1420 parents: 3:10e46f2dcbf4
1401 parents:
1421 parents:
1402 parents:
1422 parents:
1403 parents:
1423 parents:
1404 parents:
1424 parents:
1405 parents:
1425 parents:
1406 parents--verbose:
1426 parents--verbose:
1407 parents--verbose: -1:000000000000
1427 parents--verbose: -1:000000000000
1408 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1428 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1409 parents--verbose: 3:10e46f2dcbf4
1429 parents--verbose: 3:10e46f2dcbf4
1410 parents--verbose:
1430 parents--verbose:
1411 parents--verbose:
1431 parents--verbose:
1412 parents--verbose:
1432 parents--verbose:
1413 parents--verbose:
1433 parents--verbose:
1414 parents--verbose:
1434 parents--verbose:
1415 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1435 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1416 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1436 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1417 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1437 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1418 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1438 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1419 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1439 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1420 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1440 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1421 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1441 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1422 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1442 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1423 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1443 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1424 rev: 8
1444 rev: 8
1425 rev: 7
1445 rev: 7
1426 rev: 6
1446 rev: 6
1427 rev: 5
1447 rev: 5
1428 rev: 4
1448 rev: 4
1429 rev: 3
1449 rev: 3
1430 rev: 2
1450 rev: 2
1431 rev: 1
1451 rev: 1
1432 rev: 0
1452 rev: 0
1433 rev--verbose: 8
1453 rev--verbose: 8
1434 rev--verbose: 7
1454 rev--verbose: 7
1435 rev--verbose: 6
1455 rev--verbose: 6
1436 rev--verbose: 5
1456 rev--verbose: 5
1437 rev--verbose: 4
1457 rev--verbose: 4
1438 rev--verbose: 3
1458 rev--verbose: 3
1439 rev--verbose: 2
1459 rev--verbose: 2
1440 rev--verbose: 1
1460 rev--verbose: 1
1441 rev--verbose: 0
1461 rev--verbose: 0
1442 rev--debug: 8
1462 rev--debug: 8
1443 rev--debug: 7
1463 rev--debug: 7
1444 rev--debug: 6
1464 rev--debug: 6
1445 rev--debug: 5
1465 rev--debug: 5
1446 rev--debug: 4
1466 rev--debug: 4
1447 rev--debug: 3
1467 rev--debug: 3
1448 rev--debug: 2
1468 rev--debug: 2
1449 rev--debug: 1
1469 rev--debug: 1
1450 rev--debug: 0
1470 rev--debug: 0
1451 tags: tip
1471 tags: tip
1452 tags:
1472 tags:
1453 tags:
1473 tags:
1454 tags:
1474 tags:
1455 tags:
1475 tags:
1456 tags:
1476 tags:
1457 tags:
1477 tags:
1458 tags:
1478 tags:
1459 tags:
1479 tags:
1460 tags--verbose: tip
1480 tags--verbose: tip
1461 tags--verbose:
1481 tags--verbose:
1462 tags--verbose:
1482 tags--verbose:
1463 tags--verbose:
1483 tags--verbose:
1464 tags--verbose:
1484 tags--verbose:
1465 tags--verbose:
1485 tags--verbose:
1466 tags--verbose:
1486 tags--verbose:
1467 tags--verbose:
1487 tags--verbose:
1468 tags--verbose:
1488 tags--verbose:
1469 tags--debug: tip
1489 tags--debug: tip
1470 tags--debug:
1490 tags--debug:
1471 tags--debug:
1491 tags--debug:
1472 tags--debug:
1492 tags--debug:
1473 tags--debug:
1493 tags--debug:
1474 tags--debug:
1494 tags--debug:
1475 tags--debug:
1495 tags--debug:
1476 tags--debug:
1496 tags--debug:
1477 tags--debug:
1497 tags--debug:
1478 diffstat: 3: +2/-1
1498 diffstat: 3: +2/-1
1479 diffstat: 1: +1/-0
1499 diffstat: 1: +1/-0
1480 diffstat: 0: +0/-0
1500 diffstat: 0: +0/-0
1481 diffstat: 1: +1/-0
1501 diffstat: 1: +1/-0
1482 diffstat: 0: +0/-0
1502 diffstat: 0: +0/-0
1483 diffstat: 1: +1/-0
1503 diffstat: 1: +1/-0
1484 diffstat: 1: +4/-0
1504 diffstat: 1: +4/-0
1485 diffstat: 1: +2/-0
1505 diffstat: 1: +2/-0
1486 diffstat: 1: +1/-0
1506 diffstat: 1: +1/-0
1487 diffstat--verbose: 3: +2/-1
1507 diffstat--verbose: 3: +2/-1
1488 diffstat--verbose: 1: +1/-0
1508 diffstat--verbose: 1: +1/-0
1489 diffstat--verbose: 0: +0/-0
1509 diffstat--verbose: 0: +0/-0
1490 diffstat--verbose: 1: +1/-0
1510 diffstat--verbose: 1: +1/-0
1491 diffstat--verbose: 0: +0/-0
1511 diffstat--verbose: 0: +0/-0
1492 diffstat--verbose: 1: +1/-0
1512 diffstat--verbose: 1: +1/-0
1493 diffstat--verbose: 1: +4/-0
1513 diffstat--verbose: 1: +4/-0
1494 diffstat--verbose: 1: +2/-0
1514 diffstat--verbose: 1: +2/-0
1495 diffstat--verbose: 1: +1/-0
1515 diffstat--verbose: 1: +1/-0
1496 diffstat--debug: 3: +2/-1
1516 diffstat--debug: 3: +2/-1
1497 diffstat--debug: 1: +1/-0
1517 diffstat--debug: 1: +1/-0
1498 diffstat--debug: 0: +0/-0
1518 diffstat--debug: 0: +0/-0
1499 diffstat--debug: 1: +1/-0
1519 diffstat--debug: 1: +1/-0
1500 diffstat--debug: 0: +0/-0
1520 diffstat--debug: 0: +0/-0
1501 diffstat--debug: 1: +1/-0
1521 diffstat--debug: 1: +1/-0
1502 diffstat--debug: 1: +4/-0
1522 diffstat--debug: 1: +4/-0
1503 diffstat--debug: 1: +2/-0
1523 diffstat--debug: 1: +2/-0
1504 diffstat--debug: 1: +1/-0
1524 diffstat--debug: 1: +1/-0
1505 extras: branch=default
1525 extras: branch=default
1506 extras: branch=default
1526 extras: branch=default
1507 extras: branch=default
1527 extras: branch=default
1508 extras: branch=default
1528 extras: branch=default
1509 extras: branch=foo
1529 extras: branch=foo
1510 extras: branch=default
1530 extras: branch=default
1511 extras: branch=default
1531 extras: branch=default
1512 extras: branch=default
1532 extras: branch=default
1513 extras: branch=default
1533 extras: branch=default
1514 extras--verbose: branch=default
1534 extras--verbose: branch=default
1515 extras--verbose: branch=default
1535 extras--verbose: branch=default
1516 extras--verbose: branch=default
1536 extras--verbose: branch=default
1517 extras--verbose: branch=default
1537 extras--verbose: branch=default
1518 extras--verbose: branch=foo
1538 extras--verbose: branch=foo
1519 extras--verbose: branch=default
1539 extras--verbose: branch=default
1520 extras--verbose: branch=default
1540 extras--verbose: branch=default
1521 extras--verbose: branch=default
1541 extras--verbose: branch=default
1522 extras--verbose: branch=default
1542 extras--verbose: branch=default
1523 extras--debug: branch=default
1543 extras--debug: branch=default
1524 extras--debug: branch=default
1544 extras--debug: branch=default
1525 extras--debug: branch=default
1545 extras--debug: branch=default
1526 extras--debug: branch=default
1546 extras--debug: branch=default
1527 extras--debug: branch=foo
1547 extras--debug: branch=foo
1528 extras--debug: branch=default
1548 extras--debug: branch=default
1529 extras--debug: branch=default
1549 extras--debug: branch=default
1530 extras--debug: branch=default
1550 extras--debug: branch=default
1531 extras--debug: branch=default
1551 extras--debug: branch=default
1532 p1rev: 7
1552 p1rev: 7
1533 p1rev: -1
1553 p1rev: -1
1534 p1rev: 5
1554 p1rev: 5
1535 p1rev: 3
1555 p1rev: 3
1536 p1rev: 3
1556 p1rev: 3
1537 p1rev: 2
1557 p1rev: 2
1538 p1rev: 1
1558 p1rev: 1
1539 p1rev: 0
1559 p1rev: 0
1540 p1rev: -1
1560 p1rev: -1
1541 p1rev--verbose: 7
1561 p1rev--verbose: 7
1542 p1rev--verbose: -1
1562 p1rev--verbose: -1
1543 p1rev--verbose: 5
1563 p1rev--verbose: 5
1544 p1rev--verbose: 3
1564 p1rev--verbose: 3
1545 p1rev--verbose: 3
1565 p1rev--verbose: 3
1546 p1rev--verbose: 2
1566 p1rev--verbose: 2
1547 p1rev--verbose: 1
1567 p1rev--verbose: 1
1548 p1rev--verbose: 0
1568 p1rev--verbose: 0
1549 p1rev--verbose: -1
1569 p1rev--verbose: -1
1550 p1rev--debug: 7
1570 p1rev--debug: 7
1551 p1rev--debug: -1
1571 p1rev--debug: -1
1552 p1rev--debug: 5
1572 p1rev--debug: 5
1553 p1rev--debug: 3
1573 p1rev--debug: 3
1554 p1rev--debug: 3
1574 p1rev--debug: 3
1555 p1rev--debug: 2
1575 p1rev--debug: 2
1556 p1rev--debug: 1
1576 p1rev--debug: 1
1557 p1rev--debug: 0
1577 p1rev--debug: 0
1558 p1rev--debug: -1
1578 p1rev--debug: -1
1559 p2rev: -1
1579 p2rev: -1
1560 p2rev: -1
1580 p2rev: -1
1561 p2rev: 4
1581 p2rev: 4
1562 p2rev: -1
1582 p2rev: -1
1563 p2rev: -1
1583 p2rev: -1
1564 p2rev: -1
1584 p2rev: -1
1565 p2rev: -1
1585 p2rev: -1
1566 p2rev: -1
1586 p2rev: -1
1567 p2rev: -1
1587 p2rev: -1
1568 p2rev--verbose: -1
1588 p2rev--verbose: -1
1569 p2rev--verbose: -1
1589 p2rev--verbose: -1
1570 p2rev--verbose: 4
1590 p2rev--verbose: 4
1571 p2rev--verbose: -1
1591 p2rev--verbose: -1
1572 p2rev--verbose: -1
1592 p2rev--verbose: -1
1573 p2rev--verbose: -1
1593 p2rev--verbose: -1
1574 p2rev--verbose: -1
1594 p2rev--verbose: -1
1575 p2rev--verbose: -1
1595 p2rev--verbose: -1
1576 p2rev--verbose: -1
1596 p2rev--verbose: -1
1577 p2rev--debug: -1
1597 p2rev--debug: -1
1578 p2rev--debug: -1
1598 p2rev--debug: -1
1579 p2rev--debug: 4
1599 p2rev--debug: 4
1580 p2rev--debug: -1
1600 p2rev--debug: -1
1581 p2rev--debug: -1
1601 p2rev--debug: -1
1582 p2rev--debug: -1
1602 p2rev--debug: -1
1583 p2rev--debug: -1
1603 p2rev--debug: -1
1584 p2rev--debug: -1
1604 p2rev--debug: -1
1585 p2rev--debug: -1
1605 p2rev--debug: -1
1586 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1606 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1587 p1node: 0000000000000000000000000000000000000000
1607 p1node: 0000000000000000000000000000000000000000
1588 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1608 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1589 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1609 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1590 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1610 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1591 p1node: 97054abb4ab824450e9164180baf491ae0078465
1611 p1node: 97054abb4ab824450e9164180baf491ae0078465
1592 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1612 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1593 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1613 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1594 p1node: 0000000000000000000000000000000000000000
1614 p1node: 0000000000000000000000000000000000000000
1595 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1615 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1596 p1node--verbose: 0000000000000000000000000000000000000000
1616 p1node--verbose: 0000000000000000000000000000000000000000
1597 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1617 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1598 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1618 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1599 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1619 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1600 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1620 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1601 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1621 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1602 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1622 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1603 p1node--verbose: 0000000000000000000000000000000000000000
1623 p1node--verbose: 0000000000000000000000000000000000000000
1604 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1624 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1605 p1node--debug: 0000000000000000000000000000000000000000
1625 p1node--debug: 0000000000000000000000000000000000000000
1606 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1626 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1607 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1627 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1608 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1628 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1609 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1629 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1610 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1630 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1611 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1631 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1612 p1node--debug: 0000000000000000000000000000000000000000
1632 p1node--debug: 0000000000000000000000000000000000000000
1613 p2node: 0000000000000000000000000000000000000000
1633 p2node: 0000000000000000000000000000000000000000
1614 p2node: 0000000000000000000000000000000000000000
1634 p2node: 0000000000000000000000000000000000000000
1615 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1635 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1616 p2node: 0000000000000000000000000000000000000000
1636 p2node: 0000000000000000000000000000000000000000
1617 p2node: 0000000000000000000000000000000000000000
1637 p2node: 0000000000000000000000000000000000000000
1618 p2node: 0000000000000000000000000000000000000000
1638 p2node: 0000000000000000000000000000000000000000
1619 p2node: 0000000000000000000000000000000000000000
1639 p2node: 0000000000000000000000000000000000000000
1620 p2node: 0000000000000000000000000000000000000000
1640 p2node: 0000000000000000000000000000000000000000
1621 p2node: 0000000000000000000000000000000000000000
1641 p2node: 0000000000000000000000000000000000000000
1622 p2node--verbose: 0000000000000000000000000000000000000000
1642 p2node--verbose: 0000000000000000000000000000000000000000
1623 p2node--verbose: 0000000000000000000000000000000000000000
1643 p2node--verbose: 0000000000000000000000000000000000000000
1624 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1644 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1625 p2node--verbose: 0000000000000000000000000000000000000000
1645 p2node--verbose: 0000000000000000000000000000000000000000
1626 p2node--verbose: 0000000000000000000000000000000000000000
1646 p2node--verbose: 0000000000000000000000000000000000000000
1627 p2node--verbose: 0000000000000000000000000000000000000000
1647 p2node--verbose: 0000000000000000000000000000000000000000
1628 p2node--verbose: 0000000000000000000000000000000000000000
1648 p2node--verbose: 0000000000000000000000000000000000000000
1629 p2node--verbose: 0000000000000000000000000000000000000000
1649 p2node--verbose: 0000000000000000000000000000000000000000
1630 p2node--verbose: 0000000000000000000000000000000000000000
1650 p2node--verbose: 0000000000000000000000000000000000000000
1631 p2node--debug: 0000000000000000000000000000000000000000
1651 p2node--debug: 0000000000000000000000000000000000000000
1632 p2node--debug: 0000000000000000000000000000000000000000
1652 p2node--debug: 0000000000000000000000000000000000000000
1633 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1653 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1634 p2node--debug: 0000000000000000000000000000000000000000
1654 p2node--debug: 0000000000000000000000000000000000000000
1635 p2node--debug: 0000000000000000000000000000000000000000
1655 p2node--debug: 0000000000000000000000000000000000000000
1636 p2node--debug: 0000000000000000000000000000000000000000
1656 p2node--debug: 0000000000000000000000000000000000000000
1637 p2node--debug: 0000000000000000000000000000000000000000
1657 p2node--debug: 0000000000000000000000000000000000000000
1638 p2node--debug: 0000000000000000000000000000000000000000
1658 p2node--debug: 0000000000000000000000000000000000000000
1639 p2node--debug: 0000000000000000000000000000000000000000
1659 p2node--debug: 0000000000000000000000000000000000000000
1640
1660
1641 Filters work:
1661 Filters work:
1642
1662
1643 $ hg log --template '{author|domain}\n'
1663 $ hg log --template '{author|domain}\n'
1644
1664
1645 hostname
1665 hostname
1646
1666
1647
1667
1648
1668
1649
1669
1650 place
1670 place
1651 place
1671 place
1652 hostname
1672 hostname
1653
1673
1654 $ hg log --template '{author|person}\n'
1674 $ hg log --template '{author|person}\n'
1655 test
1675 test
1656 User Name
1676 User Name
1657 person
1677 person
1658 person
1678 person
1659 person
1679 person
1660 person
1680 person
1661 other
1681 other
1662 A. N. Other
1682 A. N. Other
1663 User Name
1683 User Name
1664
1684
1665 $ hg log --template '{author|user}\n'
1685 $ hg log --template '{author|user}\n'
1666 test
1686 test
1667 user
1687 user
1668 person
1688 person
1669 person
1689 person
1670 person
1690 person
1671 person
1691 person
1672 other
1692 other
1673 other
1693 other
1674 user
1694 user
1675
1695
1676 $ hg log --template '{date|date}\n'
1696 $ hg log --template '{date|date}\n'
1677 Wed Jan 01 10:01:00 2020 +0000
1697 Wed Jan 01 10:01:00 2020 +0000
1678 Mon Jan 12 13:46:40 1970 +0000
1698 Mon Jan 12 13:46:40 1970 +0000
1679 Sun Jan 18 08:40:01 1970 +0000
1699 Sun Jan 18 08:40:01 1970 +0000
1680 Sun Jan 18 08:40:00 1970 +0000
1700 Sun Jan 18 08:40:00 1970 +0000
1681 Sat Jan 17 04:53:20 1970 +0000
1701 Sat Jan 17 04:53:20 1970 +0000
1682 Fri Jan 16 01:06:40 1970 +0000
1702 Fri Jan 16 01:06:40 1970 +0000
1683 Wed Jan 14 21:20:00 1970 +0000
1703 Wed Jan 14 21:20:00 1970 +0000
1684 Tue Jan 13 17:33:20 1970 +0000
1704 Tue Jan 13 17:33:20 1970 +0000
1685 Mon Jan 12 13:46:40 1970 +0000
1705 Mon Jan 12 13:46:40 1970 +0000
1686
1706
1687 $ hg log --template '{date|isodate}\n'
1707 $ hg log --template '{date|isodate}\n'
1688 2020-01-01 10:01 +0000
1708 2020-01-01 10:01 +0000
1689 1970-01-12 13:46 +0000
1709 1970-01-12 13:46 +0000
1690 1970-01-18 08:40 +0000
1710 1970-01-18 08:40 +0000
1691 1970-01-18 08:40 +0000
1711 1970-01-18 08:40 +0000
1692 1970-01-17 04:53 +0000
1712 1970-01-17 04:53 +0000
1693 1970-01-16 01:06 +0000
1713 1970-01-16 01:06 +0000
1694 1970-01-14 21:20 +0000
1714 1970-01-14 21:20 +0000
1695 1970-01-13 17:33 +0000
1715 1970-01-13 17:33 +0000
1696 1970-01-12 13:46 +0000
1716 1970-01-12 13:46 +0000
1697
1717
1698 $ hg log --template '{date|isodatesec}\n'
1718 $ hg log --template '{date|isodatesec}\n'
1699 2020-01-01 10:01:00 +0000
1719 2020-01-01 10:01:00 +0000
1700 1970-01-12 13:46:40 +0000
1720 1970-01-12 13:46:40 +0000
1701 1970-01-18 08:40:01 +0000
1721 1970-01-18 08:40:01 +0000
1702 1970-01-18 08:40:00 +0000
1722 1970-01-18 08:40:00 +0000
1703 1970-01-17 04:53:20 +0000
1723 1970-01-17 04:53:20 +0000
1704 1970-01-16 01:06:40 +0000
1724 1970-01-16 01:06:40 +0000
1705 1970-01-14 21:20:00 +0000
1725 1970-01-14 21:20:00 +0000
1706 1970-01-13 17:33:20 +0000
1726 1970-01-13 17:33:20 +0000
1707 1970-01-12 13:46:40 +0000
1727 1970-01-12 13:46:40 +0000
1708
1728
1709 $ hg log --template '{date|rfc822date}\n'
1729 $ hg log --template '{date|rfc822date}\n'
1710 Wed, 01 Jan 2020 10:01:00 +0000
1730 Wed, 01 Jan 2020 10:01:00 +0000
1711 Mon, 12 Jan 1970 13:46:40 +0000
1731 Mon, 12 Jan 1970 13:46:40 +0000
1712 Sun, 18 Jan 1970 08:40:01 +0000
1732 Sun, 18 Jan 1970 08:40:01 +0000
1713 Sun, 18 Jan 1970 08:40:00 +0000
1733 Sun, 18 Jan 1970 08:40:00 +0000
1714 Sat, 17 Jan 1970 04:53:20 +0000
1734 Sat, 17 Jan 1970 04:53:20 +0000
1715 Fri, 16 Jan 1970 01:06:40 +0000
1735 Fri, 16 Jan 1970 01:06:40 +0000
1716 Wed, 14 Jan 1970 21:20:00 +0000
1736 Wed, 14 Jan 1970 21:20:00 +0000
1717 Tue, 13 Jan 1970 17:33:20 +0000
1737 Tue, 13 Jan 1970 17:33:20 +0000
1718 Mon, 12 Jan 1970 13:46:40 +0000
1738 Mon, 12 Jan 1970 13:46:40 +0000
1719
1739
1720 $ hg log --template '{desc|firstline}\n'
1740 $ hg log --template '{desc|firstline}\n'
1721 third
1741 third
1722 second
1742 second
1723 merge
1743 merge
1724 new head
1744 new head
1725 new branch
1745 new branch
1726 no user, no domain
1746 no user, no domain
1727 no person
1747 no person
1728 other 1
1748 other 1
1729 line 1
1749 line 1
1730
1750
1731 $ hg log --template '{node|short}\n'
1751 $ hg log --template '{node|short}\n'
1732 95c24699272e
1752 95c24699272e
1733 29114dbae42b
1753 29114dbae42b
1734 d41e714fe50d
1754 d41e714fe50d
1735 13207e5a10d9
1755 13207e5a10d9
1736 bbe44766e73d
1756 bbe44766e73d
1737 10e46f2dcbf4
1757 10e46f2dcbf4
1738 97054abb4ab8
1758 97054abb4ab8
1739 b608e9d1a3f0
1759 b608e9d1a3f0
1740 1e4e1b8f71e0
1760 1e4e1b8f71e0
1741
1761
1742 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1762 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1743 <changeset author="test"/>
1763 <changeset author="test"/>
1744 <changeset author="User Name &lt;user@hostname&gt;"/>
1764 <changeset author="User Name &lt;user@hostname&gt;"/>
1745 <changeset author="person"/>
1765 <changeset author="person"/>
1746 <changeset author="person"/>
1766 <changeset author="person"/>
1747 <changeset author="person"/>
1767 <changeset author="person"/>
1748 <changeset author="person"/>
1768 <changeset author="person"/>
1749 <changeset author="other@place"/>
1769 <changeset author="other@place"/>
1750 <changeset author="A. N. Other &lt;other@place&gt;"/>
1770 <changeset author="A. N. Other &lt;other@place&gt;"/>
1751 <changeset author="User Name &lt;user@hostname&gt;"/>
1771 <changeset author="User Name &lt;user@hostname&gt;"/>
1752
1772
1753 $ hg log --template '{rev}: {children}\n'
1773 $ hg log --template '{rev}: {children}\n'
1754 8:
1774 8:
1755 7: 8:95c24699272e
1775 7: 8:95c24699272e
1756 6:
1776 6:
1757 5: 6:d41e714fe50d
1777 5: 6:d41e714fe50d
1758 4: 6:d41e714fe50d
1778 4: 6:d41e714fe50d
1759 3: 4:bbe44766e73d 5:13207e5a10d9
1779 3: 4:bbe44766e73d 5:13207e5a10d9
1760 2: 3:10e46f2dcbf4
1780 2: 3:10e46f2dcbf4
1761 1: 2:97054abb4ab8
1781 1: 2:97054abb4ab8
1762 0: 1:b608e9d1a3f0
1782 0: 1:b608e9d1a3f0
1763
1783
1764 Formatnode filter works:
1784 Formatnode filter works:
1765
1785
1766 $ hg -q log -r 0 --template '{node|formatnode}\n'
1786 $ hg -q log -r 0 --template '{node|formatnode}\n'
1767 1e4e1b8f71e0
1787 1e4e1b8f71e0
1768
1788
1769 $ hg log -r 0 --template '{node|formatnode}\n'
1789 $ hg log -r 0 --template '{node|formatnode}\n'
1770 1e4e1b8f71e0
1790 1e4e1b8f71e0
1771
1791
1772 $ hg -v log -r 0 --template '{node|formatnode}\n'
1792 $ hg -v log -r 0 --template '{node|formatnode}\n'
1773 1e4e1b8f71e0
1793 1e4e1b8f71e0
1774
1794
1775 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1795 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1776 1e4e1b8f71e05681d422154f5421e385fec3454f
1796 1e4e1b8f71e05681d422154f5421e385fec3454f
1777
1797
1778 Age filter:
1798 Age filter:
1779
1799
1780 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1800 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1781
1801
1782 >>> from datetime import datetime, timedelta
1802 >>> from datetime import datetime, timedelta
1783 >>> fp = open('a', 'w')
1803 >>> fp = open('a', 'w')
1784 >>> n = datetime.now() + timedelta(366 * 7)
1804 >>> n = datetime.now() + timedelta(366 * 7)
1785 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1805 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1786 >>> fp.close()
1806 >>> fp.close()
1787 $ hg add a
1807 $ hg add a
1788 $ hg commit -m future -d "`cat a`"
1808 $ hg commit -m future -d "`cat a`"
1789
1809
1790 $ hg log -l1 --template '{date|age}\n'
1810 $ hg log -l1 --template '{date|age}\n'
1791 7 years from now
1811 7 years from now
1792
1812
1793 Count filter:
1813 Count filter:
1794
1814
1795 $ hg log -l1 --template '{node|count} {node|short|count}\n'
1815 $ hg log -l1 --template '{node|count} {node|short|count}\n'
1796 40 12
1816 40 12
1797
1817
1798 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
1818 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
1799 0 1 4
1819 0 1 4
1800
1820
1801 $ hg log -G --template '{rev}: children: {children|count}, \
1821 $ hg log -G --template '{rev}: children: {children|count}, \
1802 > tags: {tags|count}, file_adds: {file_adds|count}, \
1822 > tags: {tags|count}, file_adds: {file_adds|count}, \
1803 > ancestors: {revset("ancestors(%s)", rev)|count}'
1823 > ancestors: {revset("ancestors(%s)", rev)|count}'
1804 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
1824 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
1805 |
1825 |
1806 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
1826 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
1807 |
1827 |
1808 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
1828 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
1809
1829
1810 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
1830 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
1811 |\
1831 |\
1812 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
1832 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
1813 | |
1833 | |
1814 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
1834 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
1815 |/
1835 |/
1816 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
1836 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
1817 |
1837 |
1818 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
1838 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
1819 |
1839 |
1820 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
1840 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
1821 |
1841 |
1822 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
1842 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
1823
1843
1824
1844
1825 Error on syntax:
1845 Error on syntax:
1826
1846
1827 $ echo 'x = "f' >> t
1847 $ echo 'x = "f' >> t
1828 $ hg log
1848 $ hg log
1829 abort: t:3: unmatched quotes
1849 abort: t:3: unmatched quotes
1830 [255]
1850 [255]
1831
1851
1832 Behind the scenes, this will throw TypeError
1852 Behind the scenes, this will throw TypeError
1833
1853
1834 $ hg log -l 3 --template '{date|obfuscate}\n'
1854 $ hg log -l 3 --template '{date|obfuscate}\n'
1835 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1855 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1836 [255]
1856 [255]
1837
1857
1838 Behind the scenes, this will throw a ValueError
1858 Behind the scenes, this will throw a ValueError
1839
1859
1840 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1860 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1841 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1861 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1842 [255]
1862 [255]
1843
1863
1844 Behind the scenes, this will throw AttributeError
1864 Behind the scenes, this will throw AttributeError
1845
1865
1846 $ hg log -l 3 --template 'line: {date|escape}\n'
1866 $ hg log -l 3 --template 'line: {date|escape}\n'
1847 abort: template filter 'escape' is not compatible with keyword 'date'
1867 abort: template filter 'escape' is not compatible with keyword 'date'
1848 [255]
1868 [255]
1849
1869
1850 Behind the scenes, this will throw ValueError
1870 Behind the scenes, this will throw ValueError
1851
1871
1852 $ hg tip --template '{author|email|date}\n'
1872 $ hg tip --template '{author|email|date}\n'
1853 abort: template filter 'datefilter' is not compatible with keyword 'author'
1873 abort: template filter 'datefilter' is not compatible with keyword 'author'
1854 [255]
1874 [255]
1855
1875
1856 Thrown an error if a template function doesn't exist
1876 Thrown an error if a template function doesn't exist
1857
1877
1858 $ hg tip --template '{foo()}\n'
1878 $ hg tip --template '{foo()}\n'
1859 hg: parse error: unknown function 'foo'
1879 hg: parse error: unknown function 'foo'
1860 [255]
1880 [255]
1861
1881
1862 Test diff function:
1882 Test diff function:
1863
1883
1864 $ hg diff -c 8
1884 $ hg diff -c 8
1865 diff -r 29114dbae42b -r 95c24699272e fourth
1885 diff -r 29114dbae42b -r 95c24699272e fourth
1866 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1886 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1867 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1887 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1868 @@ -0,0 +1,1 @@
1888 @@ -0,0 +1,1 @@
1869 +second
1889 +second
1870 diff -r 29114dbae42b -r 95c24699272e second
1890 diff -r 29114dbae42b -r 95c24699272e second
1871 --- a/second Mon Jan 12 13:46:40 1970 +0000
1891 --- a/second Mon Jan 12 13:46:40 1970 +0000
1872 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1892 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1873 @@ -1,1 +0,0 @@
1893 @@ -1,1 +0,0 @@
1874 -second
1894 -second
1875 diff -r 29114dbae42b -r 95c24699272e third
1895 diff -r 29114dbae42b -r 95c24699272e third
1876 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1896 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1877 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1897 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1878 @@ -0,0 +1,1 @@
1898 @@ -0,0 +1,1 @@
1879 +third
1899 +third
1880
1900
1881 $ hg log -r 8 -T "{diff()}"
1901 $ hg log -r 8 -T "{diff()}"
1882 diff -r 29114dbae42b -r 95c24699272e fourth
1902 diff -r 29114dbae42b -r 95c24699272e fourth
1883 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1903 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1884 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1904 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1885 @@ -0,0 +1,1 @@
1905 @@ -0,0 +1,1 @@
1886 +second
1906 +second
1887 diff -r 29114dbae42b -r 95c24699272e second
1907 diff -r 29114dbae42b -r 95c24699272e second
1888 --- a/second Mon Jan 12 13:46:40 1970 +0000
1908 --- a/second Mon Jan 12 13:46:40 1970 +0000
1889 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1909 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1890 @@ -1,1 +0,0 @@
1910 @@ -1,1 +0,0 @@
1891 -second
1911 -second
1892 diff -r 29114dbae42b -r 95c24699272e third
1912 diff -r 29114dbae42b -r 95c24699272e third
1893 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1913 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1894 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1914 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1895 @@ -0,0 +1,1 @@
1915 @@ -0,0 +1,1 @@
1896 +third
1916 +third
1897
1917
1898 $ hg log -r 8 -T "{diff('glob:f*')}"
1918 $ hg log -r 8 -T "{diff('glob:f*')}"
1899 diff -r 29114dbae42b -r 95c24699272e fourth
1919 diff -r 29114dbae42b -r 95c24699272e fourth
1900 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1920 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1901 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1921 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1902 @@ -0,0 +1,1 @@
1922 @@ -0,0 +1,1 @@
1903 +second
1923 +second
1904
1924
1905 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
1925 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
1906 diff -r 29114dbae42b -r 95c24699272e second
1926 diff -r 29114dbae42b -r 95c24699272e second
1907 --- a/second Mon Jan 12 13:46:40 1970 +0000
1927 --- a/second Mon Jan 12 13:46:40 1970 +0000
1908 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1928 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1909 @@ -1,1 +0,0 @@
1929 @@ -1,1 +0,0 @@
1910 -second
1930 -second
1911 diff -r 29114dbae42b -r 95c24699272e third
1931 diff -r 29114dbae42b -r 95c24699272e third
1912 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1932 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1913 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1933 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1914 @@ -0,0 +1,1 @@
1934 @@ -0,0 +1,1 @@
1915 +third
1935 +third
1916
1936
1917 $ cd ..
1937 $ cd ..
1918
1938
1919
1939
1920 latesttag:
1940 latesttag:
1921
1941
1922 $ hg init latesttag
1942 $ hg init latesttag
1923 $ cd latesttag
1943 $ cd latesttag
1924
1944
1925 $ echo a > file
1945 $ echo a > file
1926 $ hg ci -Am a -d '0 0'
1946 $ hg ci -Am a -d '0 0'
1927 adding file
1947 adding file
1928
1948
1929 $ echo b >> file
1949 $ echo b >> file
1930 $ hg ci -m b -d '1 0'
1950 $ hg ci -m b -d '1 0'
1931
1951
1932 $ echo c >> head1
1952 $ echo c >> head1
1933 $ hg ci -Am h1c -d '2 0'
1953 $ hg ci -Am h1c -d '2 0'
1934 adding head1
1954 adding head1
1935
1955
1936 $ hg update -q 1
1956 $ hg update -q 1
1937 $ echo d >> head2
1957 $ echo d >> head2
1938 $ hg ci -Am h2d -d '3 0'
1958 $ hg ci -Am h2d -d '3 0'
1939 adding head2
1959 adding head2
1940 created new head
1960 created new head
1941
1961
1942 $ echo e >> head2
1962 $ echo e >> head2
1943 $ hg ci -m h2e -d '4 0'
1963 $ hg ci -m h2e -d '4 0'
1944
1964
1945 $ hg merge -q
1965 $ hg merge -q
1946 $ hg ci -m merge -d '5 -3600'
1966 $ hg ci -m merge -d '5 -3600'
1947
1967
1948 No tag set:
1968 No tag set:
1949
1969
1950 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1970 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1951 5: null+5
1971 5: null+5
1952 4: null+4
1972 4: null+4
1953 3: null+3
1973 3: null+3
1954 2: null+3
1974 2: null+3
1955 1: null+2
1975 1: null+2
1956 0: null+1
1976 0: null+1
1957
1977
1958 One common tag: longest path wins:
1978 One common tag: longest path wins:
1959
1979
1960 $ hg tag -r 1 -m t1 -d '6 0' t1
1980 $ hg tag -r 1 -m t1 -d '6 0' t1
1961 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1981 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1962 6: t1+4
1982 6: t1+4
1963 5: t1+3
1983 5: t1+3
1964 4: t1+2
1984 4: t1+2
1965 3: t1+1
1985 3: t1+1
1966 2: t1+1
1986 2: t1+1
1967 1: t1+0
1987 1: t1+0
1968 0: null+1
1988 0: null+1
1969
1989
1970 One ancestor tag: more recent wins:
1990 One ancestor tag: more recent wins:
1971
1991
1972 $ hg tag -r 2 -m t2 -d '7 0' t2
1992 $ hg tag -r 2 -m t2 -d '7 0' t2
1973 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1993 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1974 7: t2+3
1994 7: t2+3
1975 6: t2+2
1995 6: t2+2
1976 5: t2+1
1996 5: t2+1
1977 4: t1+2
1997 4: t1+2
1978 3: t1+1
1998 3: t1+1
1979 2: t2+0
1999 2: t2+0
1980 1: t1+0
2000 1: t1+0
1981 0: null+1
2001 0: null+1
1982
2002
1983 Two branch tags: more recent wins:
2003 Two branch tags: more recent wins:
1984
2004
1985 $ hg tag -r 3 -m t3 -d '8 0' t3
2005 $ hg tag -r 3 -m t3 -d '8 0' t3
1986 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2006 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1987 8: t3+5
2007 8: t3+5
1988 7: t3+4
2008 7: t3+4
1989 6: t3+3
2009 6: t3+3
1990 5: t3+2
2010 5: t3+2
1991 4: t3+1
2011 4: t3+1
1992 3: t3+0
2012 3: t3+0
1993 2: t2+0
2013 2: t2+0
1994 1: t1+0
2014 1: t1+0
1995 0: null+1
2015 0: null+1
1996
2016
1997 Merged tag overrides:
2017 Merged tag overrides:
1998
2018
1999 $ hg tag -r 5 -m t5 -d '9 0' t5
2019 $ hg tag -r 5 -m t5 -d '9 0' t5
2000 $ hg tag -r 3 -m at3 -d '10 0' at3
2020 $ hg tag -r 3 -m at3 -d '10 0' at3
2001 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2021 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2002 10: t5+5
2022 10: t5+5
2003 9: t5+4
2023 9: t5+4
2004 8: t5+3
2024 8: t5+3
2005 7: t5+2
2025 7: t5+2
2006 6: t5+1
2026 6: t5+1
2007 5: t5+0
2027 5: t5+0
2008 4: at3:t3+1
2028 4: at3:t3+1
2009 3: at3:t3+0
2029 3: at3:t3+0
2010 2: t2+0
2030 2: t2+0
2011 1: t1+0
2031 1: t1+0
2012 0: null+1
2032 0: null+1
2013
2033
2014 $ cd ..
2034 $ cd ..
2015
2035
2016
2036
2017 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2037 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2018 if it is a relative path
2038 if it is a relative path
2019
2039
2020 $ mkdir -p home/styles
2040 $ mkdir -p home/styles
2021
2041
2022 $ cat > home/styles/teststyle <<EOF
2042 $ cat > home/styles/teststyle <<EOF
2023 > changeset = 'test {rev}:{node|short}\n'
2043 > changeset = 'test {rev}:{node|short}\n'
2024 > EOF
2044 > EOF
2025
2045
2026 $ HOME=`pwd`/home; export HOME
2046 $ HOME=`pwd`/home; export HOME
2027
2047
2028 $ cat > latesttag/.hg/hgrc <<EOF
2048 $ cat > latesttag/.hg/hgrc <<EOF
2029 > [ui]
2049 > [ui]
2030 > style = ~/styles/teststyle
2050 > style = ~/styles/teststyle
2031 > EOF
2051 > EOF
2032
2052
2033 $ hg -R latesttag tip
2053 $ hg -R latesttag tip
2034 test 10:9b4a630e5f5f
2054 test 10:9b4a630e5f5f
2035
2055
2036 Test recursive showlist template (issue1989):
2056 Test recursive showlist template (issue1989):
2037
2057
2038 $ cat > style1989 <<EOF
2058 $ cat > style1989 <<EOF
2039 > changeset = '{file_mods}{manifest}{extras}'
2059 > changeset = '{file_mods}{manifest}{extras}'
2040 > file_mod = 'M|{author|person}\n'
2060 > file_mod = 'M|{author|person}\n'
2041 > manifest = '{rev},{author}\n'
2061 > manifest = '{rev},{author}\n'
2042 > extra = '{key}: {author}\n'
2062 > extra = '{key}: {author}\n'
2043 > EOF
2063 > EOF
2044
2064
2045 $ hg -R latesttag log -r tip --style=style1989
2065 $ hg -R latesttag log -r tip --style=style1989
2046 M|test
2066 M|test
2047 10,test
2067 10,test
2048 branch: test
2068 branch: test
2049
2069
2050 Test new-style inline templating:
2070 Test new-style inline templating:
2051
2071
2052 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2072 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2053 modified files: .hgtags
2073 modified files: .hgtags
2054
2074
2055 Test the sub function of templating for expansion:
2075 Test the sub function of templating for expansion:
2056
2076
2057 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2077 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2058 xx
2078 xx
2059
2079
2060 Test the strip function with chars specified:
2080 Test the strip function with chars specified:
2061
2081
2062 $ hg log -R latesttag --template '{desc}\n'
2082 $ hg log -R latesttag --template '{desc}\n'
2063 at3
2083 at3
2064 t5
2084 t5
2065 t3
2085 t3
2066 t2
2086 t2
2067 t1
2087 t1
2068 merge
2088 merge
2069 h2e
2089 h2e
2070 h2d
2090 h2d
2071 h1c
2091 h1c
2072 b
2092 b
2073 a
2093 a
2074
2094
2075 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2095 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2076 at3
2096 at3
2077 5
2097 5
2078 3
2098 3
2079 2
2099 2
2080 1
2100 1
2081 merg
2101 merg
2082 h2
2102 h2
2083 h2d
2103 h2d
2084 h1c
2104 h1c
2085 b
2105 b
2086 a
2106 a
2087
2107
2088 Test date format:
2108 Test date format:
2089
2109
2090 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2110 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2091 date: 70 01 01 10 +0000
2111 date: 70 01 01 10 +0000
2092 date: 70 01 01 09 +0000
2112 date: 70 01 01 09 +0000
2093 date: 70 01 01 08 +0000
2113 date: 70 01 01 08 +0000
2094 date: 70 01 01 07 +0000
2114 date: 70 01 01 07 +0000
2095 date: 70 01 01 06 +0000
2115 date: 70 01 01 06 +0000
2096 date: 70 01 01 05 +0100
2116 date: 70 01 01 05 +0100
2097 date: 70 01 01 04 +0000
2117 date: 70 01 01 04 +0000
2098 date: 70 01 01 03 +0000
2118 date: 70 01 01 03 +0000
2099 date: 70 01 01 02 +0000
2119 date: 70 01 01 02 +0000
2100 date: 70 01 01 01 +0000
2120 date: 70 01 01 01 +0000
2101 date: 70 01 01 00 +0000
2121 date: 70 01 01 00 +0000
2102
2122
2103 Test string escaping:
2123 Test string escaping:
2104
2124
2105 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
2125 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
2106 >
2126 >
2107 <>\n<[>
2127 <>\n<[>
2108 <>\n<]>
2128 <>\n<]>
2109 <>\n<
2129 <>\n<
2110
2130
2111 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
2131 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
2112
2132
2113 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
2133 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
2114 \x6e
2134 \x6e
2115 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
2135 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
2116 \x5c\x786e
2136 \x5c\x786e
2117 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
2137 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
2118 \x6e
2138 \x6e
2119 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
2139 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
2120 \x5c\x786e
2140 \x5c\x786e
2121
2141
2122 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
2142 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
2123 \x6e
2143 \x6e
2124 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
2144 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
2125 \x5c\x786e
2145 \x5c\x786e
2126 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
2146 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
2127 \x6e
2147 \x6e
2128 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
2148 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
2129 \x5c\x786e
2149 \x5c\x786e
2130
2150
2131 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
2151 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
2132 fourth
2152 fourth
2133 second
2153 second
2134 third
2154 third
2135 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
2155 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
2136 fourth\nsecond\nthird
2156 fourth\nsecond\nthird
2137
2157
2138 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
2158 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
2139 <p>
2159 <p>
2140 1st
2160 1st
2141 </p>
2161 </p>
2142 <p>
2162 <p>
2143 2nd
2163 2nd
2144 </p>
2164 </p>
2145 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
2165 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
2146 <p>
2166 <p>
2147 1st\n\n2nd
2167 1st\n\n2nd
2148 </p>
2168 </p>
2149 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
2169 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
2150 1st
2170 1st
2151
2171
2152 2nd
2172 2nd
2153
2173
2154 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
2174 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
2155 o perso
2175 o perso
2156 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
2176 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
2157 no person
2177 no person
2158 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
2178 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
2159 o perso
2179 o perso
2160 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
2180 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
2161 no perso
2181 no perso
2162
2182
2163 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
2183 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
2164 -o perso-
2184 -o perso-
2165 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
2185 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
2166 no person
2186 no person
2167 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
2187 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
2168 \x2do perso\x2d
2188 \x2do perso\x2d
2169 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
2189 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
2170 -o perso-
2190 -o perso-
2171 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
2191 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
2172 \x2do perso\x6e
2192 \x2do perso\x6e
2173
2193
2174 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
2194 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
2175 fourth
2195 fourth
2176 second
2196 second
2177 third
2197 third
2178 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
2198 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
2179 fourth\nsecond\nthird\n
2199 fourth\nsecond\nthird\n
2180
2200
2181 Test string escaping in nested expression:
2201 Test string escaping in nested expression:
2182
2202
2183 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
2203 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
2184 fourth\x6esecond\x6ethird
2204 fourth\x6esecond\x6ethird
2185 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
2205 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
2186 fourth\x6esecond\x6ethird
2206 fourth\x6esecond\x6ethird
2187
2207
2188 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
2208 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
2189 fourth\x6esecond\x6ethird
2209 fourth\x6esecond\x6ethird
2190 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
2210 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
2191 fourth\x5c\x786esecond\x5c\x786ethird
2211 fourth\x5c\x786esecond\x5c\x786ethird
2192
2212
2193 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
2213 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
2194 3:\x6eo user, \x6eo domai\x6e
2214 3:\x6eo user, \x6eo domai\x6e
2195 4:\x5c\x786eew bra\x5c\x786ech
2215 4:\x5c\x786eew bra\x5c\x786ech
2196
2216
2197 Test recursive evaluation:
2217 Test recursive evaluation:
2198
2218
2199 $ hg init r
2219 $ hg init r
2200 $ cd r
2220 $ cd r
2201 $ echo a > a
2221 $ echo a > a
2202 $ hg ci -Am '{rev}'
2222 $ hg ci -Am '{rev}'
2203 adding a
2223 adding a
2204 $ hg log -r 0 --template '{if(rev, desc)}\n'
2224 $ hg log -r 0 --template '{if(rev, desc)}\n'
2205 {rev}
2225 {rev}
2206 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
2226 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
2207 test 0
2227 test 0
2208
2228
2209 $ hg branch -q 'text.{rev}'
2229 $ hg branch -q 'text.{rev}'
2210 $ echo aa >> aa
2230 $ echo aa >> aa
2211 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
2231 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
2212
2232
2213 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
2233 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
2214 {node|short}desc to
2234 {node|short}desc to
2215 text.{rev}be wrapped
2235 text.{rev}be wrapped
2216 text.{rev}desc to be
2236 text.{rev}desc to be
2217 text.{rev}wrapped (no-eol)
2237 text.{rev}wrapped (no-eol)
2218 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
2238 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
2219 bcc7ff960b8e:desc to
2239 bcc7ff960b8e:desc to
2220 text.1:be wrapped
2240 text.1:be wrapped
2221 text.1:desc to be
2241 text.1:desc to be
2222 text.1:wrapped (no-eol)
2242 text.1:wrapped (no-eol)
2223
2243
2224 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
2244 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
2225 {node|short} (no-eol)
2245 {node|short} (no-eol)
2226 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
2246 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
2227 bcc-ff---b-e (no-eol)
2247 bcc-ff---b-e (no-eol)
2228
2248
2229 $ cat >> .hg/hgrc <<EOF
2249 $ cat >> .hg/hgrc <<EOF
2230 > [extensions]
2250 > [extensions]
2231 > color=
2251 > color=
2232 > [color]
2252 > [color]
2233 > mode=ansi
2253 > mode=ansi
2234 > text.{rev} = red
2254 > text.{rev} = red
2235 > text.1 = green
2255 > text.1 = green
2236 > EOF
2256 > EOF
2237 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
2257 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
2238 \x1b[0;31mtext\x1b[0m (esc)
2258 \x1b[0;31mtext\x1b[0m (esc)
2239 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
2259 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
2240 \x1b[0;32mtext\x1b[0m (esc)
2260 \x1b[0;32mtext\x1b[0m (esc)
2241
2261
2242 Test branches inside if statement:
2262 Test branches inside if statement:
2243
2263
2244 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
2264 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
2245 no
2265 no
2246
2266
2247 Test shortest(node) function:
2267 Test shortest(node) function:
2248
2268
2249 $ echo b > b
2269 $ echo b > b
2250 $ hg ci -qAm b
2270 $ hg ci -qAm b
2251 $ hg log --template '{shortest(node)}\n'
2271 $ hg log --template '{shortest(node)}\n'
2252 e777
2272 e777
2253 bcc7
2273 bcc7
2254 f776
2274 f776
2255 $ hg log --template '{shortest(node, 10)}\n'
2275 $ hg log --template '{shortest(node, 10)}\n'
2256 e777603221
2276 e777603221
2257 bcc7ff960b
2277 bcc7ff960b
2258 f7769ec2ab
2278 f7769ec2ab
2259
2279
2260 Test pad function
2280 Test pad function
2261
2281
2262 $ hg log --template '{pad(rev, 20)} {author|user}\n'
2282 $ hg log --template '{pad(rev, 20)} {author|user}\n'
2263 2 test
2283 2 test
2264 1 {node|short}
2284 1 {node|short}
2265 0 test
2285 0 test
2266
2286
2267 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
2287 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
2268 2 test
2288 2 test
2269 1 {node|short}
2289 1 {node|short}
2270 0 test
2290 0 test
2271
2291
2272 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
2292 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
2273 2------------------- test
2293 2------------------- test
2274 1------------------- {node|short}
2294 1------------------- {node|short}
2275 0------------------- test
2295 0------------------- test
2276
2296
2277 Test ifcontains function
2297 Test ifcontains function
2278
2298
2279 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
2299 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
2280 2 did not add a
2300 2 did not add a
2281 1 did not add a
2301 1 did not add a
2282 0 added a
2302 0 added a
2283
2303
2284 Test revset function
2304 Test revset function
2285
2305
2286 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
2306 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
2287 2 current rev
2307 2 current rev
2288 1 not current rev
2308 1 not current rev
2289 0 not current rev
2309 0 not current rev
2290
2310
2291 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
2311 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
2292 2 match rev
2312 2 match rev
2293 1 match rev
2313 1 match rev
2294 0 not match rev
2314 0 not match rev
2295
2315
2296 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
2316 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
2297 2 Parents: 1
2317 2 Parents: 1
2298 1 Parents: 0
2318 1 Parents: 0
2299 0 Parents:
2319 0 Parents:
2300
2320
2301 $ cat >> .hg/hgrc <<EOF
2321 $ cat >> .hg/hgrc <<EOF
2302 > [revsetalias]
2322 > [revsetalias]
2303 > myparents(\$1) = parents(\$1)
2323 > myparents(\$1) = parents(\$1)
2304 > EOF
2324 > EOF
2305 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
2325 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
2306 2 Parents: 1
2326 2 Parents: 1
2307 1 Parents: 0
2327 1 Parents: 0
2308 0 Parents:
2328 0 Parents:
2309
2329
2310 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
2330 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
2311 Rev: 2
2331 Rev: 2
2312 Ancestor: 0
2332 Ancestor: 0
2313 Ancestor: 1
2333 Ancestor: 1
2314 Ancestor: 2
2334 Ancestor: 2
2315
2335
2316 Rev: 1
2336 Rev: 1
2317 Ancestor: 0
2337 Ancestor: 0
2318 Ancestor: 1
2338 Ancestor: 1
2319
2339
2320 Rev: 0
2340 Rev: 0
2321 Ancestor: 0
2341 Ancestor: 0
2322
2342
2323 Test current bookmark templating
2343 Test current bookmark templating
2324
2344
2325 $ hg book foo
2345 $ hg book foo
2326 $ hg book bar
2346 $ hg book bar
2327 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
2347 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
2328 2 bar* foo
2348 2 bar* foo
2329 1
2349 1
2330 0
2350 0
2331 $ hg log --template "{rev} {currentbookmark}\n"
2351 $ hg log --template "{rev} {currentbookmark}\n"
2332 2 bar
2352 2 bar
2333 1
2353 1
2334 0
2354 0
2335 $ hg bookmarks --inactive bar
2355 $ hg bookmarks --inactive bar
2336 $ hg log --template "{rev} {currentbookmark}\n"
2356 $ hg log --template "{rev} {currentbookmark}\n"
2337 2
2357 2
2338 1
2358 1
2339 0
2359 0
2340
2360
2341 Test stringify on sub expressions
2361 Test stringify on sub expressions
2342
2362
2343 $ cd ..
2363 $ cd ..
2344 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
2364 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
2345 fourth, second, third
2365 fourth, second, third
2346 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
2366 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
2347 abc
2367 abc
2348
2368
2349 Test splitlines
2369 Test splitlines
2350
2370
2351 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
2371 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
2352 @ foo future
2372 @ foo future
2353 |
2373 |
2354 o foo third
2374 o foo third
2355 |
2375 |
2356 o foo second
2376 o foo second
2357
2377
2358 o foo merge
2378 o foo merge
2359 |\
2379 |\
2360 | o foo new head
2380 | o foo new head
2361 | |
2381 | |
2362 o | foo new branch
2382 o | foo new branch
2363 |/
2383 |/
2364 o foo no user, no domain
2384 o foo no user, no domain
2365 |
2385 |
2366 o foo no person
2386 o foo no person
2367 |
2387 |
2368 o foo other 1
2388 o foo other 1
2369 | foo other 2
2389 | foo other 2
2370 | foo
2390 | foo
2371 | foo other 3
2391 | foo other 3
2372 o foo line 1
2392 o foo line 1
2373 foo line 2
2393 foo line 2
2374
2394
2375 Test startswith
2395 Test startswith
2376 $ hg log -Gv -R a --template "{startswith(desc)}"
2396 $ hg log -Gv -R a --template "{startswith(desc)}"
2377 hg: parse error: startswith expects two arguments
2397 hg: parse error: startswith expects two arguments
2378 [255]
2398 [255]
2379
2399
2380 $ hg log -Gv -R a --template "{startswith('line', desc)}"
2400 $ hg log -Gv -R a --template "{startswith('line', desc)}"
2381 @
2401 @
2382 |
2402 |
2383 o
2403 o
2384 |
2404 |
2385 o
2405 o
2386
2406
2387 o
2407 o
2388 |\
2408 |\
2389 | o
2409 | o
2390 | |
2410 | |
2391 o |
2411 o |
2392 |/
2412 |/
2393 o
2413 o
2394 |
2414 |
2395 o
2415 o
2396 |
2416 |
2397 o
2417 o
2398 |
2418 |
2399 o line 1
2419 o line 1
2400 line 2
2420 line 2
2401
2421
2402 Test bad template with better error message
2422 Test bad template with better error message
2403
2423
2404 $ hg log -Gv -R a --template '{desc|user()}'
2424 $ hg log -Gv -R a --template '{desc|user()}'
2405 hg: parse error: expected a symbol, got 'func'
2425 hg: parse error: expected a symbol, got 'func'
2406 [255]
2426 [255]
2407
2427
2408 Test word function (including index out of bounds graceful failure)
2428 Test word function (including index out of bounds graceful failure)
2409
2429
2410 $ hg log -Gv -R a --template "{word('1', desc)}"
2430 $ hg log -Gv -R a --template "{word('1', desc)}"
2411 @
2431 @
2412 |
2432 |
2413 o
2433 o
2414 |
2434 |
2415 o
2435 o
2416
2436
2417 o
2437 o
2418 |\
2438 |\
2419 | o head
2439 | o head
2420 | |
2440 | |
2421 o | branch
2441 o | branch
2422 |/
2442 |/
2423 o user,
2443 o user,
2424 |
2444 |
2425 o person
2445 o person
2426 |
2446 |
2427 o 1
2447 o 1
2428 |
2448 |
2429 o 1
2449 o 1
2430
2450
2431
2451
2432 Test word third parameter used as splitter
2452 Test word third parameter used as splitter
2433
2453
2434 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
2454 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
2435 @ future
2455 @ future
2436 |
2456 |
2437 o third
2457 o third
2438 |
2458 |
2439 o sec
2459 o sec
2440
2460
2441 o merge
2461 o merge
2442 |\
2462 |\
2443 | o new head
2463 | o new head
2444 | |
2464 | |
2445 o | new branch
2465 o | new branch
2446 |/
2466 |/
2447 o n
2467 o n
2448 |
2468 |
2449 o n
2469 o n
2450 |
2470 |
2451 o
2471 o
2452 |
2472 |
2453 o line 1
2473 o line 1
2454 line 2
2474 line 2
2455
2475
2456 Test word error messages for not enough and too many arguments
2476 Test word error messages for not enough and too many arguments
2457
2477
2458 $ hg log -Gv -R a --template "{word('0')}"
2478 $ hg log -Gv -R a --template "{word('0')}"
2459 hg: parse error: word expects two or three arguments, got 1
2479 hg: parse error: word expects two or three arguments, got 1
2460 [255]
2480 [255]
2461
2481
2462 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
2482 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
2463 hg: parse error: word expects two or three arguments, got 7
2483 hg: parse error: word expects two or three arguments, got 7
2464 [255]
2484 [255]
General Comments 0
You need to be logged in to leave comments. Login now