##// END OF EJS Templates
Extended templating test for new branches and extra changeset info.
Thomas Arendsen Hein -
r3463:031aac7e default
parent child Browse files
Show More
@@ -1,98 +1,100 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init a
3 hg init a
4 cd a
4 cd a
5 echo a > a
5 echo a > a
6 hg add a
6 hg add a
7 echo line 1 > b
7 echo line 1 > b
8 echo line 2 >> b
8 echo line 2 >> b
9 hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
9 hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
10 hg add b
10 hg add b
11 echo other 1 > c
11 echo other 1 > c
12 echo other 2 >> c
12 echo other 2 >> c
13 echo >> c
13 echo >> c
14 echo other 3 >> c
14 echo other 3 >> c
15 hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
15 hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
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 echo foo > .hg/branch
21 hg commit -m 'new branch' -d '1400000 0' -u 'person'
20
22
21 # make sure user/global hgrc does not affect tests
23 # make sure user/global hgrc does not affect tests
22 echo '[ui]' > .hg/hgrc
24 echo '[ui]' > .hg/hgrc
23 echo 'logtemplate =' >> .hg/hgrc
25 echo 'logtemplate =' >> .hg/hgrc
24 echo 'style =' >> .hg/hgrc
26 echo 'style =' >> .hg/hgrc
25
27
26 echo '# default style is like normal output'
28 echo '# default style is like normal output'
27 echo '# normal'
29 echo '# normal'
28 hg log > log.out
30 hg log > log.out
29 hg log --style default > style.out
31 hg log --style default > style.out
30 diff log.out style.out
32 diff log.out style.out
31 echo '# verbose'
33 echo '# verbose'
32 hg log -v > log.out
34 hg log -v > log.out
33 hg log -v --style default > style.out
35 hg log -v --style default > style.out
34 diff log.out style.out
36 diff log.out style.out
35 echo '# debug'
37 echo '# debug'
36 hg log --debug > log.out
38 hg log --debug > log.out
37 hg log --debug --style default > style.out
39 hg log --debug --style default > style.out
38 diff log.out style.out
40 diff log.out style.out
39
41
40 echo '# compact style works'
42 echo '# compact style works'
41 hg log --style compact
43 hg log --style compact
42 hg log -v --style compact
44 hg log -v --style compact
43 hg log --debug --style compact
45 hg log --debug --style compact
44
46
45 echo '# error if style not readable'
47 echo '# error if style not readable'
46 touch q
48 touch q
47 chmod 0 q
49 chmod 0 q
48 hg log --style ./q
50 hg log --style ./q
49
51
50 echo '# error if no style'
52 echo '# error if no style'
51 hg log --style notexist
53 hg log --style notexist
52
54
53 echo '# error if style missing key'
55 echo '# error if style missing key'
54 echo 'q = q' > t
56 echo 'q = q' > t
55 hg log --style ./t
57 hg log --style ./t
56
58
57 echo '# error if include fails'
59 echo '# error if include fails'
58 echo 'changeset = q' >> t
60 echo 'changeset = q' >> t
59 hg log --style ./t
61 hg log --style ./t
60
62
61 echo '# include works'
63 echo '# include works'
62 rm -f q
64 rm -f q
63 echo '{rev}' > q
65 echo '{rev}' > q
64 hg log --style ./t
66 hg log --style ./t
65
67
66 echo '# ui.style works'
68 echo '# ui.style works'
67 echo '[ui]' > .hg/hgrc
69 echo '[ui]' > .hg/hgrc
68 echo 'style = t' >> .hg/hgrc
70 echo 'style = t' >> .hg/hgrc
69 hg log
71 hg log
70
72
71 echo '# issue338'
73 echo '# issue338'
72 hg log --style=changelog > changelog
74 hg log --style=changelog > changelog
73 cat changelog
75 cat changelog
74
76
75 echo "# keys work"
77 echo "# keys work"
76 for key in author branches date desc file_adds file_dels files \
78 for key in author branches date desc file_adds file_dels files \
77 manifest node parents rev tags; do
79 manifest node parents rev tags; do
78 for mode in '' --verbose --debug; do
80 for mode in '' --verbose --debug; do
79 hg log $mode --template "$key$mode: {$key}\n"
81 hg log $mode --template "$key$mode: {$key}\n"
80 done
82 done
81 done
83 done
82
84
83 echo '# filters work'
85 echo '# filters work'
84 hg log --template '{author|domain}\n'
86 hg log --template '{author|domain}\n'
85 hg log --template '{author|person}\n'
87 hg log --template '{author|person}\n'
86 hg log --template '{author|user}\n'
88 hg log --template '{author|user}\n'
87 hg log --template '{date|age}\n' > /dev/null || exit 1
89 hg log --template '{date|age}\n' > /dev/null || exit 1
88 hg log --template '{date|date}\n'
90 hg log --template '{date|date}\n'
89 hg log --template '{date|isodate}\n'
91 hg log --template '{date|isodate}\n'
90 hg log --template '{date|rfc822date}\n'
92 hg log --template '{date|rfc822date}\n'
91 hg log --template '{desc|firstline}\n'
93 hg log --template '{desc|firstline}\n'
92 hg log --template '{node|short}\n'
94 hg log --template '{node|short}\n'
93
95
94 echo '# error on syntax'
96 echo '# error on syntax'
95 echo 'x = "f' >> t
97 echo 'x = "f' >> t
96 hg log
98 hg log
97
99
98 echo '# done'
100 echo '# done'
@@ -1,279 +1,339 b''
1 # default style is like normal output
1 # default style is like normal output
2 # normal
2 # normal
3 # verbose
3 # verbose
4 # debug
4 # debug
5 # compact style works
5 # compact style works
6 3[tip] 10e46f2dcbf4 1970-01-16 01:06 +0000 person
6 4[tip] 32a18f097fcc 1970-01-17 04:53 +0000 person
7 new branch
8
9 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
7 no user, no domain
10 no user, no domain
8
11
9 2 97054abb4ab8 1970-01-14 21:20 +0000 other
12 2 97054abb4ab8 1970-01-14 21:20 +0000 other
10 no person
13 no person
11
14
12 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
15 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
13 other 1
16 other 1
14
17
15 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
18 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
16 line 1
19 line 1
17
20
18 3[tip] 10e46f2dcbf4 1970-01-16 01:06 +0000 person
21 4[tip] 32a18f097fcc 1970-01-17 04:53 +0000 person
22 new branch
23
24 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
19 no user, no domain
25 no user, no domain
20
26
21 2 97054abb4ab8 1970-01-14 21:20 +0000 other
27 2 97054abb4ab8 1970-01-14 21:20 +0000 other
22 no person
28 no person
23
29
24 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
30 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
25 other 1
31 other 1
26
32
27 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
33 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
28 line 1
34 line 1
29
35
30 3[tip]:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
36 4[tip]:3,-1 32a18f097fcc 1970-01-17 04:53 +0000 person
37 new branch
38
39 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
31 no user, no domain
40 no user, no domain
32
41
33 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other
42 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other
34 no person
43 no person
35
44
36 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
45 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
37 other 1
46 other 1
38
47
39 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
48 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
40 line 1
49 line 1
41
50
42 # error if style not readable
51 # error if style not readable
43 abort: Permission denied: ./q
52 abort: Permission denied: ./q
44 # error if no style
53 # error if no style
45 abort: No such file or directory: notexist
54 abort: No such file or directory: notexist
46 # error if style missing key
55 # error if style missing key
47 abort: ./t: no key named 'changeset'
56 abort: ./t: no key named 'changeset'
48 # error if include fails
57 # error if include fails
49 abort: template file ./q: Permission denied
58 abort: template file ./q: Permission denied
50 # include works
59 # include works
60 4
51 3
61 3
52 2
62 2
53 1
63 1
54 0
64 0
55 # ui.style works
65 # ui.style works
66 4
56 3
67 3
57 2
68 2
58 1
69 1
59 0
70 0
60 # issue338
71 # issue338
72 1970-01-17 person <person>
73
74 * new branch
75 [32a18f097fcc] [tip]
76
61 1970-01-16 person <person>
77 1970-01-16 person <person>
62
78
63 * c:
79 * c:
64 no user, no domain
80 no user, no domain
65 [10e46f2dcbf4] [tip]
81 [10e46f2dcbf4]
66
82
67 1970-01-14 other <other@place>
83 1970-01-14 other <other@place>
68
84
69 * c:
85 * c:
70 no person
86 no person
71 [97054abb4ab8]
87 [97054abb4ab8]
72
88
73 1970-01-13 A. N. Other <other@place>
89 1970-01-13 A. N. Other <other@place>
74
90
75 * b:
91 * b:
76 other 1 other 2
92 other 1 other 2
77
93
78 other 3
94 other 3
79 [b608e9d1a3f0]
95 [b608e9d1a3f0]
80
96
81 1970-01-12 User Name <user@hostname>
97 1970-01-12 User Name <user@hostname>
82
98
83 * a:
99 * a:
84 line 1 line 2
100 line 1 line 2
85 [1e4e1b8f71e0]
101 [1e4e1b8f71e0]
86
102
87 # keys work
103 # keys work
88 author: person
104 author: person
105 author: person
89 author: other@place
106 author: other@place
90 author: A. N. Other <other@place>
107 author: A. N. Other <other@place>
91 author: User Name <user@hostname>
108 author: User Name <user@hostname>
92 author--verbose: person
109 author--verbose: person
110 author--verbose: person
93 author--verbose: other@place
111 author--verbose: other@place
94 author--verbose: A. N. Other <other@place>
112 author--verbose: A. N. Other <other@place>
95 author--verbose: User Name <user@hostname>
113 author--verbose: User Name <user@hostname>
96 author--debug: person
114 author--debug: person
115 author--debug: person
97 author--debug: other@place
116 author--debug: other@place
98 author--debug: A. N. Other <other@place>
117 author--debug: A. N. Other <other@place>
99 author--debug: User Name <user@hostname>
118 author--debug: User Name <user@hostname>
119 branches: foo
100 branches:
120 branches:
101 branches:
121 branches:
102 branches:
122 branches:
103 branches:
123 branches:
124 branches--verbose: foo
104 branches--verbose:
125 branches--verbose:
105 branches--verbose:
126 branches--verbose:
106 branches--verbose:
127 branches--verbose:
107 branches--verbose:
128 branches--verbose:
129 branches--debug: foo
108 branches--debug:
130 branches--debug:
109 branches--debug:
131 branches--debug:
110 branches--debug:
132 branches--debug:
111 branches--debug:
133 branches--debug:
134 date: 1400000.00
112 date: 1300000.00
135 date: 1300000.00
113 date: 1200000.00
136 date: 1200000.00
114 date: 1100000.00
137 date: 1100000.00
115 date: 1000000.00
138 date: 1000000.00
139 date--verbose: 1400000.00
116 date--verbose: 1300000.00
140 date--verbose: 1300000.00
117 date--verbose: 1200000.00
141 date--verbose: 1200000.00
118 date--verbose: 1100000.00
142 date--verbose: 1100000.00
119 date--verbose: 1000000.00
143 date--verbose: 1000000.00
144 date--debug: 1400000.00
120 date--debug: 1300000.00
145 date--debug: 1300000.00
121 date--debug: 1200000.00
146 date--debug: 1200000.00
122 date--debug: 1100000.00
147 date--debug: 1100000.00
123 date--debug: 1000000.00
148 date--debug: 1000000.00
149 desc: new branch
124 desc: no user, no domain
150 desc: no user, no domain
125 desc: no person
151 desc: no person
126 desc: other 1
152 desc: other 1
127 other 2
153 other 2
128
154
129 other 3
155 other 3
130 desc: line 1
156 desc: line 1
131 line 2
157 line 2
158 desc--verbose: new branch
132 desc--verbose: no user, no domain
159 desc--verbose: no user, no domain
133 desc--verbose: no person
160 desc--verbose: no person
134 desc--verbose: other 1
161 desc--verbose: other 1
135 other 2
162 other 2
136
163
137 other 3
164 other 3
138 desc--verbose: line 1
165 desc--verbose: line 1
139 line 2
166 line 2
167 desc--debug: new branch
140 desc--debug: no user, no domain
168 desc--debug: no user, no domain
141 desc--debug: no person
169 desc--debug: no person
142 desc--debug: other 1
170 desc--debug: other 1
143 other 2
171 other 2
144
172
145 other 3
173 other 3
146 desc--debug: line 1
174 desc--debug: line 1
147 line 2
175 line 2
148 file_adds:
176 file_adds:
149 file_adds:
177 file_adds:
150 file_adds:
178 file_adds:
151 file_adds:
179 file_adds:
180 file_adds:
152 file_adds--verbose:
181 file_adds--verbose:
153 file_adds--verbose:
182 file_adds--verbose:
154 file_adds--verbose:
183 file_adds--verbose:
155 file_adds--verbose:
184 file_adds--verbose:
185 file_adds--verbose:
186 file_adds--debug:
156 file_adds--debug:
187 file_adds--debug:
157 file_adds--debug: c
188 file_adds--debug: c
158 file_adds--debug: b
189 file_adds--debug: b
159 file_adds--debug: a
190 file_adds--debug: a
160 file_dels:
191 file_dels:
161 file_dels:
192 file_dels:
162 file_dels:
193 file_dels:
163 file_dels:
194 file_dels:
195 file_dels:
196 file_dels--verbose:
164 file_dels--verbose:
197 file_dels--verbose:
165 file_dels--verbose:
198 file_dels--verbose:
166 file_dels--verbose:
199 file_dels--verbose:
167 file_dels--verbose:
200 file_dels--verbose:
168 file_dels--debug:
201 file_dels--debug:
169 file_dels--debug:
202 file_dels--debug:
170 file_dels--debug:
203 file_dels--debug:
171 file_dels--debug:
204 file_dels--debug:
205 file_dels--debug:
206 files:
172 files: c
207 files: c
173 files: c
208 files: c
174 files: b
209 files: b
175 files: a
210 files: a
211 files--verbose:
176 files--verbose: c
212 files--verbose: c
177 files--verbose: c
213 files--verbose: c
178 files--verbose: b
214 files--verbose: b
179 files--verbose: a
215 files--verbose: a
216 files--debug:
180 files--debug: c
217 files--debug: c
181 files--debug:
218 files--debug:
182 files--debug:
219 files--debug:
183 files--debug:
220 files--debug:
184 manifest:
221 manifest:
185 manifest:
222 manifest:
186 manifest:
223 manifest:
187 manifest:
224 manifest:
225 manifest:
188 manifest--verbose:
226 manifest--verbose:
189 manifest--verbose:
227 manifest--verbose:
190 manifest--verbose:
228 manifest--verbose:
191 manifest--verbose:
229 manifest--verbose:
230 manifest--verbose:
231 manifest--debug: 4:90ae8dda64e1
192 manifest--debug: 3:cb5a1327723b
232 manifest--debug: 3:cb5a1327723b
193 manifest--debug: 2:6e0e82995c35
233 manifest--debug: 2:6e0e82995c35
194 manifest--debug: 1:4e8d705b1e53
234 manifest--debug: 1:4e8d705b1e53
195 manifest--debug: 0:a0c8bcbbb45c
235 manifest--debug: 0:a0c8bcbbb45c
236 node: 32a18f097fcccf76ef282f62f8a85b3adf8d13c4
196 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
237 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
197 node: 97054abb4ab824450e9164180baf491ae0078465
238 node: 97054abb4ab824450e9164180baf491ae0078465
198 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
239 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
199 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
240 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
241 node--verbose: 32a18f097fcccf76ef282f62f8a85b3adf8d13c4
200 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
242 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
201 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
243 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
202 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
244 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
203 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
245 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
246 node--debug: 32a18f097fcccf76ef282f62f8a85b3adf8d13c4
204 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
247 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
205 node--debug: 97054abb4ab824450e9164180baf491ae0078465
248 node--debug: 97054abb4ab824450e9164180baf491ae0078465
206 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
249 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
207 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
250 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
208 parents:
251 parents:
209 parents:
252 parents:
210 parents:
253 parents:
211 parents:
254 parents:
255 parents:
212 parents--verbose:
256 parents--verbose:
213 parents--verbose:
257 parents--verbose:
214 parents--verbose:
258 parents--verbose:
215 parents--verbose:
259 parents--verbose:
260 parents--verbose:
261 parents--debug: 3:10e46f2dcbf4 -1:000000000000
216 parents--debug: 2:97054abb4ab8 -1:000000000000
262 parents--debug: 2:97054abb4ab8 -1:000000000000
217 parents--debug: 1:b608e9d1a3f0 -1:000000000000
263 parents--debug: 1:b608e9d1a3f0 -1:000000000000
218 parents--debug: 0:1e4e1b8f71e0 -1:000000000000
264 parents--debug: 0:1e4e1b8f71e0 -1:000000000000
219 parents--debug: -1:000000000000 -1:000000000000
265 parents--debug: -1:000000000000 -1:000000000000
266 rev: 4
220 rev: 3
267 rev: 3
221 rev: 2
268 rev: 2
222 rev: 1
269 rev: 1
223 rev: 0
270 rev: 0
271 rev--verbose: 4
224 rev--verbose: 3
272 rev--verbose: 3
225 rev--verbose: 2
273 rev--verbose: 2
226 rev--verbose: 1
274 rev--verbose: 1
227 rev--verbose: 0
275 rev--verbose: 0
276 rev--debug: 4
228 rev--debug: 3
277 rev--debug: 3
229 rev--debug: 2
278 rev--debug: 2
230 rev--debug: 1
279 rev--debug: 1
231 rev--debug: 0
280 rev--debug: 0
232 tags: tip
281 tags: tip
233 tags:
282 tags:
234 tags:
283 tags:
235 tags:
284 tags:
285 tags:
236 tags--verbose: tip
286 tags--verbose: tip
237 tags--verbose:
287 tags--verbose:
238 tags--verbose:
288 tags--verbose:
239 tags--verbose:
289 tags--verbose:
290 tags--verbose:
240 tags--debug: tip
291 tags--debug: tip
241 tags--debug:
292 tags--debug:
242 tags--debug:
293 tags--debug:
243 tags--debug:
294 tags--debug:
295 tags--debug:
244 # filters work
296 # filters work
245
297
298
246 place
299 place
247 place
300 place
248 hostname
301 hostname
249 person
302 person
303 person
250 other
304 other
251 A. N. Other
305 A. N. Other
252 User Name
306 User Name
253 person
307 person
308 person
254 other
309 other
255 other
310 other
256 user
311 user
312 Sat Jan 17 04:53:20 1970 +0000
257 Fri Jan 16 01:06:40 1970 +0000
313 Fri Jan 16 01:06:40 1970 +0000
258 Wed Jan 14 21:20:00 1970 +0000
314 Wed Jan 14 21:20:00 1970 +0000
259 Tue Jan 13 17:33:20 1970 +0000
315 Tue Jan 13 17:33:20 1970 +0000
260 Mon Jan 12 13:46:40 1970 +0000
316 Mon Jan 12 13:46:40 1970 +0000
317 1970-01-17 04:53 +0000
261 1970-01-16 01:06 +0000
318 1970-01-16 01:06 +0000
262 1970-01-14 21:20 +0000
319 1970-01-14 21:20 +0000
263 1970-01-13 17:33 +0000
320 1970-01-13 17:33 +0000
264 1970-01-12 13:46 +0000
321 1970-01-12 13:46 +0000
322 Sat, 17 Jan 1970 04:53:20 +0000
265 Fri, 16 Jan 1970 01:06:40 +0000
323 Fri, 16 Jan 1970 01:06:40 +0000
266 Wed, 14 Jan 1970 21:20:00 +0000
324 Wed, 14 Jan 1970 21:20:00 +0000
267 Tue, 13 Jan 1970 17:33:20 +0000
325 Tue, 13 Jan 1970 17:33:20 +0000
268 Mon, 12 Jan 1970 13:46:40 +0000
326 Mon, 12 Jan 1970 13:46:40 +0000
327 new branch
269 no user, no domain
328 no user, no domain
270 no person
329 no person
271 other 1
330 other 1
272 line 1
331 line 1
332 32a18f097fcc
273 10e46f2dcbf4
333 10e46f2dcbf4
274 97054abb4ab8
334 97054abb4ab8
275 b608e9d1a3f0
335 b608e9d1a3f0
276 1e4e1b8f71e0
336 1e4e1b8f71e0
277 # error on syntax
337 # error on syntax
278 abort: t:3: unmatched quotes
338 abort: t:3: unmatched quotes
279 # done
339 # done
General Comments 0
You need to be logged in to leave comments. Login now