##// END OF EJS Templates
tests: update globs for Windows...
Matt Harbison -
r30732:d4ec69ff default
parent child Browse files
Show More
@@ -1,4126 +1,4126 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo a > a
3 $ echo a > a
4 $ hg add a
4 $ hg add a
5 $ echo line 1 > b
5 $ echo line 1 > b
6 $ echo line 2 >> b
6 $ echo line 2 >> b
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
8
8
9 $ hg add b
9 $ hg add b
10 $ echo other 1 > c
10 $ echo other 1 > c
11 $ echo other 2 >> c
11 $ echo other 2 >> c
12 $ echo >> c
12 $ echo >> c
13 $ echo other 3 >> c
13 $ echo other 3 >> c
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
15
15
16 $ hg add c
16 $ hg add c
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
18 $ echo c >> c
18 $ echo c >> c
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
20
20
21 $ echo foo > .hg/branch
21 $ echo foo > .hg/branch
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
23
23
24 $ hg co -q 3
24 $ hg co -q 3
25 $ echo other 4 >> d
25 $ echo other 4 >> d
26 $ hg add d
26 $ hg add d
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
28
28
29 $ hg merge -q foo
29 $ hg merge -q foo
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
31
31
32 Test arithmetic operators have the right precedence:
32 Test arithmetic operators have the right precedence:
33
33
34 $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n'
34 $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n'
35 2020 1964
35 2020 1964
36 $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n'
36 $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n'
37 9860 5908
37 9860 5908
38
38
39 Test division:
39 Test division:
40
40
41 $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n'
41 $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n'
42 (template
42 (template
43 (/
43 (/
44 ('integer', '5')
44 ('integer', '5')
45 ('integer', '2'))
45 ('integer', '2'))
46 ('string', ' ')
46 ('string', ' ')
47 (func
47 (func
48 ('symbol', 'mod')
48 ('symbol', 'mod')
49 (list
49 (list
50 ('integer', '5')
50 ('integer', '5')
51 ('integer', '2')))
51 ('integer', '2')))
52 ('string', '\n'))
52 ('string', '\n'))
53 2 1
53 2 1
54 $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n'
54 $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n'
55 (template
55 (template
56 (/
56 (/
57 ('integer', '5')
57 ('integer', '5')
58 (negate
58 (negate
59 ('integer', '2')))
59 ('integer', '2')))
60 ('string', ' ')
60 ('string', ' ')
61 (func
61 (func
62 ('symbol', 'mod')
62 ('symbol', 'mod')
63 (list
63 (list
64 ('integer', '5')
64 ('integer', '5')
65 (negate
65 (negate
66 ('integer', '2'))))
66 ('integer', '2'))))
67 ('string', '\n'))
67 ('string', '\n'))
68 -3 -1
68 -3 -1
69 $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n'
69 $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n'
70 (template
70 (template
71 (/
71 (/
72 (negate
72 (negate
73 ('integer', '5'))
73 ('integer', '5'))
74 ('integer', '2'))
74 ('integer', '2'))
75 ('string', ' ')
75 ('string', ' ')
76 (func
76 (func
77 ('symbol', 'mod')
77 ('symbol', 'mod')
78 (list
78 (list
79 (negate
79 (negate
80 ('integer', '5'))
80 ('integer', '5'))
81 ('integer', '2')))
81 ('integer', '2')))
82 ('string', '\n'))
82 ('string', '\n'))
83 -3 1
83 -3 1
84 $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n'
84 $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n'
85 (template
85 (template
86 (/
86 (/
87 (negate
87 (negate
88 ('integer', '5'))
88 ('integer', '5'))
89 (negate
89 (negate
90 ('integer', '2')))
90 ('integer', '2')))
91 ('string', ' ')
91 ('string', ' ')
92 (func
92 (func
93 ('symbol', 'mod')
93 ('symbol', 'mod')
94 (list
94 (list
95 (negate
95 (negate
96 ('integer', '5'))
96 ('integer', '5'))
97 (negate
97 (negate
98 ('integer', '2'))))
98 ('integer', '2'))))
99 ('string', '\n'))
99 ('string', '\n'))
100 2 -1
100 2 -1
101
101
102 Filters bind closer than arithmetic:
102 Filters bind closer than arithmetic:
103
103
104 $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n'
104 $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n'
105 (template
105 (template
106 (-
106 (-
107 (|
107 (|
108 (func
108 (func
109 ('symbol', 'revset')
109 ('symbol', 'revset')
110 ('string', '.'))
110 ('string', '.'))
111 ('symbol', 'count'))
111 ('symbol', 'count'))
112 ('integer', '1'))
112 ('integer', '1'))
113 ('string', '\n'))
113 ('string', '\n'))
114 0
114 0
115
115
116 But negate binds closer still:
116 But negate binds closer still:
117
117
118 $ hg debugtemplate -r0 -v '{1-3|stringify}\n'
118 $ hg debugtemplate -r0 -v '{1-3|stringify}\n'
119 (template
119 (template
120 (-
120 (-
121 ('integer', '1')
121 ('integer', '1')
122 (|
122 (|
123 ('integer', '3')
123 ('integer', '3')
124 ('symbol', 'stringify')))
124 ('symbol', 'stringify')))
125 ('string', '\n'))
125 ('string', '\n'))
126 hg: parse error: arithmetic only defined on integers
126 hg: parse error: arithmetic only defined on integers
127 [255]
127 [255]
128 $ hg debugtemplate -r0 -v '{-3|stringify}\n'
128 $ hg debugtemplate -r0 -v '{-3|stringify}\n'
129 (template
129 (template
130 (|
130 (|
131 (negate
131 (negate
132 ('integer', '3'))
132 ('integer', '3'))
133 ('symbol', 'stringify'))
133 ('symbol', 'stringify'))
134 ('string', '\n'))
134 ('string', '\n'))
135 -3
135 -3
136
136
137 Second branch starting at nullrev:
137 Second branch starting at nullrev:
138
138
139 $ hg update null
139 $ hg update null
140 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
140 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
141 $ echo second > second
141 $ echo second > second
142 $ hg add second
142 $ hg add second
143 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
143 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
144 created new head
144 created new head
145
145
146 $ echo third > third
146 $ echo third > third
147 $ hg add third
147 $ hg add third
148 $ hg mv second fourth
148 $ hg mv second fourth
149 $ hg commit -m third -d "2020-01-01 10:01"
149 $ hg commit -m third -d "2020-01-01 10:01"
150
150
151 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
151 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
152 fourth (second)
152 fourth (second)
153 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
153 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
154 second -> fourth
154 second -> fourth
155 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
155 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
156 8 t
156 8 t
157 7 f
157 7 f
158
158
159 Working-directory revision has special identifiers, though they are still
159 Working-directory revision has special identifiers, though they are still
160 experimental:
160 experimental:
161
161
162 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
162 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
163 2147483647:ffffffffffffffffffffffffffffffffffffffff
163 2147483647:ffffffffffffffffffffffffffffffffffffffff
164
164
165 Some keywords are invalid for working-directory revision, but they should
165 Some keywords are invalid for working-directory revision, but they should
166 never cause crash:
166 never cause crash:
167
167
168 $ hg log -r 'wdir()' -T '{manifest}\n'
168 $ hg log -r 'wdir()' -T '{manifest}\n'
169
169
170
170
171 Quoting for ui.logtemplate
171 Quoting for ui.logtemplate
172
172
173 $ hg tip --config "ui.logtemplate={rev}\n"
173 $ hg tip --config "ui.logtemplate={rev}\n"
174 8
174 8
175 $ hg tip --config "ui.logtemplate='{rev}\n'"
175 $ hg tip --config "ui.logtemplate='{rev}\n'"
176 8
176 8
177 $ hg tip --config 'ui.logtemplate="{rev}\n"'
177 $ hg tip --config 'ui.logtemplate="{rev}\n"'
178 8
178 8
179 $ hg tip --config 'ui.logtemplate=n{rev}\n'
179 $ hg tip --config 'ui.logtemplate=n{rev}\n'
180 n8
180 n8
181
181
182 Make sure user/global hgrc does not affect tests
182 Make sure user/global hgrc does not affect tests
183
183
184 $ echo '[ui]' > .hg/hgrc
184 $ echo '[ui]' > .hg/hgrc
185 $ echo 'logtemplate =' >> .hg/hgrc
185 $ echo 'logtemplate =' >> .hg/hgrc
186 $ echo 'style =' >> .hg/hgrc
186 $ echo 'style =' >> .hg/hgrc
187
187
188 Add some simple styles to settings
188 Add some simple styles to settings
189
189
190 $ echo '[templates]' >> .hg/hgrc
190 $ echo '[templates]' >> .hg/hgrc
191 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
191 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
192 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
192 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
193
193
194 $ hg log -l1 -Tsimple
194 $ hg log -l1 -Tsimple
195 8
195 8
196 $ hg log -l1 -Tsimple2
196 $ hg log -l1 -Tsimple2
197 8
197 8
198
198
199 Test templates and style maps in files:
199 Test templates and style maps in files:
200
200
201 $ echo "{rev}" > tmpl
201 $ echo "{rev}" > tmpl
202 $ hg log -l1 -T./tmpl
202 $ hg log -l1 -T./tmpl
203 8
203 8
204 $ hg log -l1 -Tblah/blah
204 $ hg log -l1 -Tblah/blah
205 blah/blah (no-eol)
205 blah/blah (no-eol)
206
206
207 $ printf 'changeset = "{rev}\\n"\n' > map-simple
207 $ printf 'changeset = "{rev}\\n"\n' > map-simple
208 $ hg log -l1 -T./map-simple
208 $ hg log -l1 -T./map-simple
209 8
209 8
210
210
211 Test template map inheritance
211 Test template map inheritance
212
212
213 $ echo "__base__ = map-cmdline.default" > map-simple
213 $ echo "__base__ = map-cmdline.default" > map-simple
214 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
214 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
215 $ hg log -l1 -T./map-simple
215 $ hg log -l1 -T./map-simple
216 changeset: ***8***
216 changeset: ***8***
217 tag: tip
217 tag: tip
218 user: test
218 user: test
219 date: Wed Jan 01 10:01:00 2020 +0000
219 date: Wed Jan 01 10:01:00 2020 +0000
220 summary: third
220 summary: third
221
221
222
222
223 Template should precede style option
223 Template should precede style option
224
224
225 $ hg log -l1 --style default -T '{rev}\n'
225 $ hg log -l1 --style default -T '{rev}\n'
226 8
226 8
227
227
228 Add a commit with empty description, to ensure that the templates
228 Add a commit with empty description, to ensure that the templates
229 below will omit the description line.
229 below will omit the description line.
230
230
231 $ echo c >> c
231 $ echo c >> c
232 $ hg add c
232 $ hg add c
233 $ hg commit -qm ' '
233 $ hg commit -qm ' '
234
234
235 Default style is like normal output. Phases style should be the same
235 Default style is like normal output. Phases style should be the same
236 as default style, except for extra phase lines.
236 as default style, except for extra phase lines.
237
237
238 $ hg log > log.out
238 $ hg log > log.out
239 $ hg log --style default > style.out
239 $ hg log --style default > style.out
240 $ cmp log.out style.out || diff -u log.out style.out
240 $ cmp log.out style.out || diff -u log.out style.out
241 $ hg log -T phases > phases.out
241 $ hg log -T phases > phases.out
242 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
242 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
243 +phase: draft
243 +phase: draft
244 +phase: draft
244 +phase: draft
245 +phase: draft
245 +phase: draft
246 +phase: draft
246 +phase: draft
247 +phase: draft
247 +phase: draft
248 +phase: draft
248 +phase: draft
249 +phase: draft
249 +phase: draft
250 +phase: draft
250 +phase: draft
251 +phase: draft
251 +phase: draft
252 +phase: draft
252 +phase: draft
253
253
254 $ hg log -v > log.out
254 $ hg log -v > log.out
255 $ hg log -v --style default > style.out
255 $ hg log -v --style default > style.out
256 $ cmp log.out style.out || diff -u log.out style.out
256 $ cmp log.out style.out || diff -u log.out style.out
257 $ hg log -v -T phases > phases.out
257 $ hg log -v -T phases > phases.out
258 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
258 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
259 +phase: draft
259 +phase: draft
260 +phase: draft
260 +phase: draft
261 +phase: draft
261 +phase: draft
262 +phase: draft
262 +phase: draft
263 +phase: draft
263 +phase: draft
264 +phase: draft
264 +phase: draft
265 +phase: draft
265 +phase: draft
266 +phase: draft
266 +phase: draft
267 +phase: draft
267 +phase: draft
268 +phase: draft
268 +phase: draft
269
269
270 $ hg log -q > log.out
270 $ hg log -q > log.out
271 $ hg log -q --style default > style.out
271 $ hg log -q --style default > style.out
272 $ cmp log.out style.out || diff -u log.out style.out
272 $ cmp log.out style.out || diff -u log.out style.out
273 $ hg log -q -T phases > phases.out
273 $ hg log -q -T phases > phases.out
274 $ cmp log.out phases.out || diff -u log.out phases.out
274 $ cmp log.out phases.out || diff -u log.out phases.out
275
275
276 $ hg log --debug > log.out
276 $ hg log --debug > log.out
277 $ hg log --debug --style default > style.out
277 $ hg log --debug --style default > style.out
278 $ cmp log.out style.out || diff -u log.out style.out
278 $ cmp log.out style.out || diff -u log.out style.out
279 $ hg log --debug -T phases > phases.out
279 $ hg log --debug -T phases > phases.out
280 $ cmp log.out phases.out || diff -u log.out phases.out
280 $ cmp log.out phases.out || diff -u log.out phases.out
281
281
282 Default style of working-directory revision should also be the same (but
282 Default style of working-directory revision should also be the same (but
283 date may change while running tests):
283 date may change while running tests):
284
284
285 $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
285 $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
286 $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
286 $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
287 $ cmp log.out style.out || diff -u log.out style.out
287 $ cmp log.out style.out || diff -u log.out style.out
288
288
289 $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
289 $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
290 $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
290 $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
291 $ cmp log.out style.out || diff -u log.out style.out
291 $ cmp log.out style.out || diff -u log.out style.out
292
292
293 $ hg log -r 'wdir()' -q > log.out
293 $ hg log -r 'wdir()' -q > log.out
294 $ hg log -r 'wdir()' -q --style default > style.out
294 $ hg log -r 'wdir()' -q --style default > style.out
295 $ cmp log.out style.out || diff -u log.out style.out
295 $ cmp log.out style.out || diff -u log.out style.out
296
296
297 $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
297 $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
298 $ hg log -r 'wdir()' --debug --style default \
298 $ hg log -r 'wdir()' --debug --style default \
299 > | sed 's|^date:.*|date:|' > style.out
299 > | sed 's|^date:.*|date:|' > style.out
300 $ cmp log.out style.out || diff -u log.out style.out
300 $ cmp log.out style.out || diff -u log.out style.out
301
301
302 Default style should also preserve color information (issue2866):
302 Default style should also preserve color information (issue2866):
303
303
304 $ cp $HGRCPATH $HGRCPATH-bak
304 $ cp $HGRCPATH $HGRCPATH-bak
305 $ cat <<EOF >> $HGRCPATH
305 $ cat <<EOF >> $HGRCPATH
306 > [extensions]
306 > [extensions]
307 > color=
307 > color=
308 > EOF
308 > EOF
309
309
310 $ hg --color=debug log > log.out
310 $ hg --color=debug log > log.out
311 $ hg --color=debug log --style default > style.out
311 $ hg --color=debug log --style default > style.out
312 $ cmp log.out style.out || diff -u log.out style.out
312 $ cmp log.out style.out || diff -u log.out style.out
313 $ hg --color=debug log -T phases > phases.out
313 $ hg --color=debug log -T phases > phases.out
314 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
314 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
315 +[log.phase|phase: draft]
315 +[log.phase|phase: draft]
316 +[log.phase|phase: draft]
316 +[log.phase|phase: draft]
317 +[log.phase|phase: draft]
317 +[log.phase|phase: draft]
318 +[log.phase|phase: draft]
318 +[log.phase|phase: draft]
319 +[log.phase|phase: draft]
319 +[log.phase|phase: draft]
320 +[log.phase|phase: draft]
320 +[log.phase|phase: draft]
321 +[log.phase|phase: draft]
321 +[log.phase|phase: draft]
322 +[log.phase|phase: draft]
322 +[log.phase|phase: draft]
323 +[log.phase|phase: draft]
323 +[log.phase|phase: draft]
324 +[log.phase|phase: draft]
324 +[log.phase|phase: draft]
325
325
326 $ hg --color=debug -v log > log.out
326 $ hg --color=debug -v log > log.out
327 $ hg --color=debug -v log --style default > style.out
327 $ hg --color=debug -v log --style default > style.out
328 $ cmp log.out style.out || diff -u log.out style.out
328 $ cmp log.out style.out || diff -u log.out style.out
329 $ hg --color=debug -v log -T phases > phases.out
329 $ hg --color=debug -v log -T phases > phases.out
330 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
330 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
331 +[log.phase|phase: draft]
331 +[log.phase|phase: draft]
332 +[log.phase|phase: draft]
332 +[log.phase|phase: draft]
333 +[log.phase|phase: draft]
333 +[log.phase|phase: draft]
334 +[log.phase|phase: draft]
334 +[log.phase|phase: draft]
335 +[log.phase|phase: draft]
335 +[log.phase|phase: draft]
336 +[log.phase|phase: draft]
336 +[log.phase|phase: draft]
337 +[log.phase|phase: draft]
337 +[log.phase|phase: draft]
338 +[log.phase|phase: draft]
338 +[log.phase|phase: draft]
339 +[log.phase|phase: draft]
339 +[log.phase|phase: draft]
340 +[log.phase|phase: draft]
340 +[log.phase|phase: draft]
341
341
342 $ hg --color=debug -q log > log.out
342 $ hg --color=debug -q log > log.out
343 $ hg --color=debug -q log --style default > style.out
343 $ hg --color=debug -q log --style default > style.out
344 $ cmp log.out style.out || diff -u log.out style.out
344 $ cmp log.out style.out || diff -u log.out style.out
345 $ hg --color=debug -q log -T phases > phases.out
345 $ hg --color=debug -q log -T phases > phases.out
346 $ cmp log.out phases.out || diff -u log.out phases.out
346 $ cmp log.out phases.out || diff -u log.out phases.out
347
347
348 $ hg --color=debug --debug log > log.out
348 $ hg --color=debug --debug log > log.out
349 $ hg --color=debug --debug log --style default > style.out
349 $ hg --color=debug --debug log --style default > style.out
350 $ cmp log.out style.out || diff -u log.out style.out
350 $ cmp log.out style.out || diff -u log.out style.out
351 $ hg --color=debug --debug log -T phases > phases.out
351 $ hg --color=debug --debug log -T phases > phases.out
352 $ cmp log.out phases.out || diff -u log.out phases.out
352 $ cmp log.out phases.out || diff -u log.out phases.out
353
353
354 $ mv $HGRCPATH-bak $HGRCPATH
354 $ mv $HGRCPATH-bak $HGRCPATH
355
355
356 Remove commit with empty commit message, so as to not pollute further
356 Remove commit with empty commit message, so as to not pollute further
357 tests.
357 tests.
358
358
359 $ hg --config extensions.strip= strip -q .
359 $ hg --config extensions.strip= strip -q .
360
360
361 Revision with no copies (used to print a traceback):
361 Revision with no copies (used to print a traceback):
362
362
363 $ hg tip -v --template '\n'
363 $ hg tip -v --template '\n'
364
364
365
365
366 Compact style works:
366 Compact style works:
367
367
368 $ hg log -Tcompact
368 $ hg log -Tcompact
369 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
369 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
370 third
370 third
371
371
372 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
372 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
373 second
373 second
374
374
375 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
375 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
376 merge
376 merge
377
377
378 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
378 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
379 new head
379 new head
380
380
381 4 bbe44766e73d 1970-01-17 04:53 +0000 person
381 4 bbe44766e73d 1970-01-17 04:53 +0000 person
382 new branch
382 new branch
383
383
384 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
384 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
385 no user, no domain
385 no user, no domain
386
386
387 2 97054abb4ab8 1970-01-14 21:20 +0000 other
387 2 97054abb4ab8 1970-01-14 21:20 +0000 other
388 no person
388 no person
389
389
390 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
390 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
391 other 1
391 other 1
392
392
393 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
393 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
394 line 1
394 line 1
395
395
396
396
397 $ hg log -v --style compact
397 $ hg log -v --style compact
398 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
398 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
399 third
399 third
400
400
401 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
401 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
402 second
402 second
403
403
404 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
404 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
405 merge
405 merge
406
406
407 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
407 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
408 new head
408 new head
409
409
410 4 bbe44766e73d 1970-01-17 04:53 +0000 person
410 4 bbe44766e73d 1970-01-17 04:53 +0000 person
411 new branch
411 new branch
412
412
413 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
413 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
414 no user, no domain
414 no user, no domain
415
415
416 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
416 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
417 no person
417 no person
418
418
419 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
419 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
420 other 1
420 other 1
421 other 2
421 other 2
422
422
423 other 3
423 other 3
424
424
425 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
425 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
426 line 1
426 line 1
427 line 2
427 line 2
428
428
429
429
430 $ hg log --debug --style compact
430 $ hg log --debug --style compact
431 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
431 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
432 third
432 third
433
433
434 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
434 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
435 second
435 second
436
436
437 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
437 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
438 merge
438 merge
439
439
440 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
440 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
441 new head
441 new head
442
442
443 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
443 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
444 new branch
444 new branch
445
445
446 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
446 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
447 no user, no domain
447 no user, no domain
448
448
449 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
449 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
450 no person
450 no person
451
451
452 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
452 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
453 other 1
453 other 1
454 other 2
454 other 2
455
455
456 other 3
456 other 3
457
457
458 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
458 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
459 line 1
459 line 1
460 line 2
460 line 2
461
461
462
462
463 Test xml styles:
463 Test xml styles:
464
464
465 $ hg log --style xml -r 'not all()'
465 $ hg log --style xml -r 'not all()'
466 <?xml version="1.0"?>
466 <?xml version="1.0"?>
467 <log>
467 <log>
468 </log>
468 </log>
469
469
470 $ hg log --style xml
470 $ hg log --style xml
471 <?xml version="1.0"?>
471 <?xml version="1.0"?>
472 <log>
472 <log>
473 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
473 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
474 <tag>tip</tag>
474 <tag>tip</tag>
475 <author email="test">test</author>
475 <author email="test">test</author>
476 <date>2020-01-01T10:01:00+00:00</date>
476 <date>2020-01-01T10:01:00+00:00</date>
477 <msg xml:space="preserve">third</msg>
477 <msg xml:space="preserve">third</msg>
478 </logentry>
478 </logentry>
479 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
479 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
480 <parent revision="-1" node="0000000000000000000000000000000000000000" />
480 <parent revision="-1" node="0000000000000000000000000000000000000000" />
481 <author email="user@hostname">User Name</author>
481 <author email="user@hostname">User Name</author>
482 <date>1970-01-12T13:46:40+00:00</date>
482 <date>1970-01-12T13:46:40+00:00</date>
483 <msg xml:space="preserve">second</msg>
483 <msg xml:space="preserve">second</msg>
484 </logentry>
484 </logentry>
485 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
485 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
486 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
486 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
487 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
487 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
488 <author email="person">person</author>
488 <author email="person">person</author>
489 <date>1970-01-18T08:40:01+00:00</date>
489 <date>1970-01-18T08:40:01+00:00</date>
490 <msg xml:space="preserve">merge</msg>
490 <msg xml:space="preserve">merge</msg>
491 </logentry>
491 </logentry>
492 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
492 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
493 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
493 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
494 <author email="person">person</author>
494 <author email="person">person</author>
495 <date>1970-01-18T08:40:00+00:00</date>
495 <date>1970-01-18T08:40:00+00:00</date>
496 <msg xml:space="preserve">new head</msg>
496 <msg xml:space="preserve">new head</msg>
497 </logentry>
497 </logentry>
498 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
498 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
499 <branch>foo</branch>
499 <branch>foo</branch>
500 <author email="person">person</author>
500 <author email="person">person</author>
501 <date>1970-01-17T04:53:20+00:00</date>
501 <date>1970-01-17T04:53:20+00:00</date>
502 <msg xml:space="preserve">new branch</msg>
502 <msg xml:space="preserve">new branch</msg>
503 </logentry>
503 </logentry>
504 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
504 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
505 <author email="person">person</author>
505 <author email="person">person</author>
506 <date>1970-01-16T01:06:40+00:00</date>
506 <date>1970-01-16T01:06:40+00:00</date>
507 <msg xml:space="preserve">no user, no domain</msg>
507 <msg xml:space="preserve">no user, no domain</msg>
508 </logentry>
508 </logentry>
509 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
509 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
510 <author email="other@place">other</author>
510 <author email="other@place">other</author>
511 <date>1970-01-14T21:20:00+00:00</date>
511 <date>1970-01-14T21:20:00+00:00</date>
512 <msg xml:space="preserve">no person</msg>
512 <msg xml:space="preserve">no person</msg>
513 </logentry>
513 </logentry>
514 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
514 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
515 <author email="other@place">A. N. Other</author>
515 <author email="other@place">A. N. Other</author>
516 <date>1970-01-13T17:33:20+00:00</date>
516 <date>1970-01-13T17:33:20+00:00</date>
517 <msg xml:space="preserve">other 1
517 <msg xml:space="preserve">other 1
518 other 2
518 other 2
519
519
520 other 3</msg>
520 other 3</msg>
521 </logentry>
521 </logentry>
522 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
522 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
523 <author email="user@hostname">User Name</author>
523 <author email="user@hostname">User Name</author>
524 <date>1970-01-12T13:46:40+00:00</date>
524 <date>1970-01-12T13:46:40+00:00</date>
525 <msg xml:space="preserve">line 1
525 <msg xml:space="preserve">line 1
526 line 2</msg>
526 line 2</msg>
527 </logentry>
527 </logentry>
528 </log>
528 </log>
529
529
530 $ hg log -v --style xml
530 $ hg log -v --style xml
531 <?xml version="1.0"?>
531 <?xml version="1.0"?>
532 <log>
532 <log>
533 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
533 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
534 <tag>tip</tag>
534 <tag>tip</tag>
535 <author email="test">test</author>
535 <author email="test">test</author>
536 <date>2020-01-01T10:01:00+00:00</date>
536 <date>2020-01-01T10:01:00+00:00</date>
537 <msg xml:space="preserve">third</msg>
537 <msg xml:space="preserve">third</msg>
538 <paths>
538 <paths>
539 <path action="A">fourth</path>
539 <path action="A">fourth</path>
540 <path action="A">third</path>
540 <path action="A">third</path>
541 <path action="R">second</path>
541 <path action="R">second</path>
542 </paths>
542 </paths>
543 <copies>
543 <copies>
544 <copy source="second">fourth</copy>
544 <copy source="second">fourth</copy>
545 </copies>
545 </copies>
546 </logentry>
546 </logentry>
547 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
547 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
548 <parent revision="-1" node="0000000000000000000000000000000000000000" />
548 <parent revision="-1" node="0000000000000000000000000000000000000000" />
549 <author email="user@hostname">User Name</author>
549 <author email="user@hostname">User Name</author>
550 <date>1970-01-12T13:46:40+00:00</date>
550 <date>1970-01-12T13:46:40+00:00</date>
551 <msg xml:space="preserve">second</msg>
551 <msg xml:space="preserve">second</msg>
552 <paths>
552 <paths>
553 <path action="A">second</path>
553 <path action="A">second</path>
554 </paths>
554 </paths>
555 </logentry>
555 </logentry>
556 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
556 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
557 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
557 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
558 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
558 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
559 <author email="person">person</author>
559 <author email="person">person</author>
560 <date>1970-01-18T08:40:01+00:00</date>
560 <date>1970-01-18T08:40:01+00:00</date>
561 <msg xml:space="preserve">merge</msg>
561 <msg xml:space="preserve">merge</msg>
562 <paths>
562 <paths>
563 </paths>
563 </paths>
564 </logentry>
564 </logentry>
565 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
565 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
566 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
566 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
567 <author email="person">person</author>
567 <author email="person">person</author>
568 <date>1970-01-18T08:40:00+00:00</date>
568 <date>1970-01-18T08:40:00+00:00</date>
569 <msg xml:space="preserve">new head</msg>
569 <msg xml:space="preserve">new head</msg>
570 <paths>
570 <paths>
571 <path action="A">d</path>
571 <path action="A">d</path>
572 </paths>
572 </paths>
573 </logentry>
573 </logentry>
574 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
574 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
575 <branch>foo</branch>
575 <branch>foo</branch>
576 <author email="person">person</author>
576 <author email="person">person</author>
577 <date>1970-01-17T04:53:20+00:00</date>
577 <date>1970-01-17T04:53:20+00:00</date>
578 <msg xml:space="preserve">new branch</msg>
578 <msg xml:space="preserve">new branch</msg>
579 <paths>
579 <paths>
580 </paths>
580 </paths>
581 </logentry>
581 </logentry>
582 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
582 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
583 <author email="person">person</author>
583 <author email="person">person</author>
584 <date>1970-01-16T01:06:40+00:00</date>
584 <date>1970-01-16T01:06:40+00:00</date>
585 <msg xml:space="preserve">no user, no domain</msg>
585 <msg xml:space="preserve">no user, no domain</msg>
586 <paths>
586 <paths>
587 <path action="M">c</path>
587 <path action="M">c</path>
588 </paths>
588 </paths>
589 </logentry>
589 </logentry>
590 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
590 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
591 <author email="other@place">other</author>
591 <author email="other@place">other</author>
592 <date>1970-01-14T21:20:00+00:00</date>
592 <date>1970-01-14T21:20:00+00:00</date>
593 <msg xml:space="preserve">no person</msg>
593 <msg xml:space="preserve">no person</msg>
594 <paths>
594 <paths>
595 <path action="A">c</path>
595 <path action="A">c</path>
596 </paths>
596 </paths>
597 </logentry>
597 </logentry>
598 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
598 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
599 <author email="other@place">A. N. Other</author>
599 <author email="other@place">A. N. Other</author>
600 <date>1970-01-13T17:33:20+00:00</date>
600 <date>1970-01-13T17:33:20+00:00</date>
601 <msg xml:space="preserve">other 1
601 <msg xml:space="preserve">other 1
602 other 2
602 other 2
603
603
604 other 3</msg>
604 other 3</msg>
605 <paths>
605 <paths>
606 <path action="A">b</path>
606 <path action="A">b</path>
607 </paths>
607 </paths>
608 </logentry>
608 </logentry>
609 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
609 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
610 <author email="user@hostname">User Name</author>
610 <author email="user@hostname">User Name</author>
611 <date>1970-01-12T13:46:40+00:00</date>
611 <date>1970-01-12T13:46:40+00:00</date>
612 <msg xml:space="preserve">line 1
612 <msg xml:space="preserve">line 1
613 line 2</msg>
613 line 2</msg>
614 <paths>
614 <paths>
615 <path action="A">a</path>
615 <path action="A">a</path>
616 </paths>
616 </paths>
617 </logentry>
617 </logentry>
618 </log>
618 </log>
619
619
620 $ hg log --debug --style xml
620 $ hg log --debug --style xml
621 <?xml version="1.0"?>
621 <?xml version="1.0"?>
622 <log>
622 <log>
623 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
623 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
624 <tag>tip</tag>
624 <tag>tip</tag>
625 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
625 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
626 <parent revision="-1" node="0000000000000000000000000000000000000000" />
626 <parent revision="-1" node="0000000000000000000000000000000000000000" />
627 <author email="test">test</author>
627 <author email="test">test</author>
628 <date>2020-01-01T10:01:00+00:00</date>
628 <date>2020-01-01T10:01:00+00:00</date>
629 <msg xml:space="preserve">third</msg>
629 <msg xml:space="preserve">third</msg>
630 <paths>
630 <paths>
631 <path action="A">fourth</path>
631 <path action="A">fourth</path>
632 <path action="A">third</path>
632 <path action="A">third</path>
633 <path action="R">second</path>
633 <path action="R">second</path>
634 </paths>
634 </paths>
635 <copies>
635 <copies>
636 <copy source="second">fourth</copy>
636 <copy source="second">fourth</copy>
637 </copies>
637 </copies>
638 <extra key="branch">default</extra>
638 <extra key="branch">default</extra>
639 </logentry>
639 </logentry>
640 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
640 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
641 <parent revision="-1" node="0000000000000000000000000000000000000000" />
641 <parent revision="-1" node="0000000000000000000000000000000000000000" />
642 <parent revision="-1" node="0000000000000000000000000000000000000000" />
642 <parent revision="-1" node="0000000000000000000000000000000000000000" />
643 <author email="user@hostname">User Name</author>
643 <author email="user@hostname">User Name</author>
644 <date>1970-01-12T13:46:40+00:00</date>
644 <date>1970-01-12T13:46:40+00:00</date>
645 <msg xml:space="preserve">second</msg>
645 <msg xml:space="preserve">second</msg>
646 <paths>
646 <paths>
647 <path action="A">second</path>
647 <path action="A">second</path>
648 </paths>
648 </paths>
649 <extra key="branch">default</extra>
649 <extra key="branch">default</extra>
650 </logentry>
650 </logentry>
651 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
651 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
652 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
652 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
653 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
653 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
654 <author email="person">person</author>
654 <author email="person">person</author>
655 <date>1970-01-18T08:40:01+00:00</date>
655 <date>1970-01-18T08:40:01+00:00</date>
656 <msg xml:space="preserve">merge</msg>
656 <msg xml:space="preserve">merge</msg>
657 <paths>
657 <paths>
658 </paths>
658 </paths>
659 <extra key="branch">default</extra>
659 <extra key="branch">default</extra>
660 </logentry>
660 </logentry>
661 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
661 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
662 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
662 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
663 <parent revision="-1" node="0000000000000000000000000000000000000000" />
663 <parent revision="-1" node="0000000000000000000000000000000000000000" />
664 <author email="person">person</author>
664 <author email="person">person</author>
665 <date>1970-01-18T08:40:00+00:00</date>
665 <date>1970-01-18T08:40:00+00:00</date>
666 <msg xml:space="preserve">new head</msg>
666 <msg xml:space="preserve">new head</msg>
667 <paths>
667 <paths>
668 <path action="A">d</path>
668 <path action="A">d</path>
669 </paths>
669 </paths>
670 <extra key="branch">default</extra>
670 <extra key="branch">default</extra>
671 </logentry>
671 </logentry>
672 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
672 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
673 <branch>foo</branch>
673 <branch>foo</branch>
674 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
674 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
675 <parent revision="-1" node="0000000000000000000000000000000000000000" />
675 <parent revision="-1" node="0000000000000000000000000000000000000000" />
676 <author email="person">person</author>
676 <author email="person">person</author>
677 <date>1970-01-17T04:53:20+00:00</date>
677 <date>1970-01-17T04:53:20+00:00</date>
678 <msg xml:space="preserve">new branch</msg>
678 <msg xml:space="preserve">new branch</msg>
679 <paths>
679 <paths>
680 </paths>
680 </paths>
681 <extra key="branch">foo</extra>
681 <extra key="branch">foo</extra>
682 </logentry>
682 </logentry>
683 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
683 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
684 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
684 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
685 <parent revision="-1" node="0000000000000000000000000000000000000000" />
685 <parent revision="-1" node="0000000000000000000000000000000000000000" />
686 <author email="person">person</author>
686 <author email="person">person</author>
687 <date>1970-01-16T01:06:40+00:00</date>
687 <date>1970-01-16T01:06:40+00:00</date>
688 <msg xml:space="preserve">no user, no domain</msg>
688 <msg xml:space="preserve">no user, no domain</msg>
689 <paths>
689 <paths>
690 <path action="M">c</path>
690 <path action="M">c</path>
691 </paths>
691 </paths>
692 <extra key="branch">default</extra>
692 <extra key="branch">default</extra>
693 </logentry>
693 </logentry>
694 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
694 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
695 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
695 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
696 <parent revision="-1" node="0000000000000000000000000000000000000000" />
696 <parent revision="-1" node="0000000000000000000000000000000000000000" />
697 <author email="other@place">other</author>
697 <author email="other@place">other</author>
698 <date>1970-01-14T21:20:00+00:00</date>
698 <date>1970-01-14T21:20:00+00:00</date>
699 <msg xml:space="preserve">no person</msg>
699 <msg xml:space="preserve">no person</msg>
700 <paths>
700 <paths>
701 <path action="A">c</path>
701 <path action="A">c</path>
702 </paths>
702 </paths>
703 <extra key="branch">default</extra>
703 <extra key="branch">default</extra>
704 </logentry>
704 </logentry>
705 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
705 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
706 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
706 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
707 <parent revision="-1" node="0000000000000000000000000000000000000000" />
707 <parent revision="-1" node="0000000000000000000000000000000000000000" />
708 <author email="other@place">A. N. Other</author>
708 <author email="other@place">A. N. Other</author>
709 <date>1970-01-13T17:33:20+00:00</date>
709 <date>1970-01-13T17:33:20+00:00</date>
710 <msg xml:space="preserve">other 1
710 <msg xml:space="preserve">other 1
711 other 2
711 other 2
712
712
713 other 3</msg>
713 other 3</msg>
714 <paths>
714 <paths>
715 <path action="A">b</path>
715 <path action="A">b</path>
716 </paths>
716 </paths>
717 <extra key="branch">default</extra>
717 <extra key="branch">default</extra>
718 </logentry>
718 </logentry>
719 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
719 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
720 <parent revision="-1" node="0000000000000000000000000000000000000000" />
720 <parent revision="-1" node="0000000000000000000000000000000000000000" />
721 <parent revision="-1" node="0000000000000000000000000000000000000000" />
721 <parent revision="-1" node="0000000000000000000000000000000000000000" />
722 <author email="user@hostname">User Name</author>
722 <author email="user@hostname">User Name</author>
723 <date>1970-01-12T13:46:40+00:00</date>
723 <date>1970-01-12T13:46:40+00:00</date>
724 <msg xml:space="preserve">line 1
724 <msg xml:space="preserve">line 1
725 line 2</msg>
725 line 2</msg>
726 <paths>
726 <paths>
727 <path action="A">a</path>
727 <path action="A">a</path>
728 </paths>
728 </paths>
729 <extra key="branch">default</extra>
729 <extra key="branch">default</extra>
730 </logentry>
730 </logentry>
731 </log>
731 </log>
732
732
733
733
734 Test JSON style:
734 Test JSON style:
735
735
736 $ hg log -k nosuch -Tjson
736 $ hg log -k nosuch -Tjson
737 []
737 []
738
738
739 $ hg log -qr . -Tjson
739 $ hg log -qr . -Tjson
740 [
740 [
741 {
741 {
742 "rev": 8,
742 "rev": 8,
743 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
743 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
744 }
744 }
745 ]
745 ]
746
746
747 $ hg log -vpr . -Tjson --stat
747 $ hg log -vpr . -Tjson --stat
748 [
748 [
749 {
749 {
750 "rev": 8,
750 "rev": 8,
751 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
751 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
752 "branch": "default",
752 "branch": "default",
753 "phase": "draft",
753 "phase": "draft",
754 "user": "test",
754 "user": "test",
755 "date": [1577872860, 0],
755 "date": [1577872860, 0],
756 "desc": "third",
756 "desc": "third",
757 "bookmarks": [],
757 "bookmarks": [],
758 "tags": ["tip"],
758 "tags": ["tip"],
759 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
759 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
760 "files": ["fourth", "second", "third"],
760 "files": ["fourth", "second", "third"],
761 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
761 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
762 "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"
762 "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"
763 }
763 }
764 ]
764 ]
765
765
766 honor --git but not format-breaking diffopts
766 honor --git but not format-breaking diffopts
767 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
767 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
768 [
768 [
769 {
769 {
770 "rev": 8,
770 "rev": 8,
771 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
771 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
772 "branch": "default",
772 "branch": "default",
773 "phase": "draft",
773 "phase": "draft",
774 "user": "test",
774 "user": "test",
775 "date": [1577872860, 0],
775 "date": [1577872860, 0],
776 "desc": "third",
776 "desc": "third",
777 "bookmarks": [],
777 "bookmarks": [],
778 "tags": ["tip"],
778 "tags": ["tip"],
779 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
779 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
780 "files": ["fourth", "second", "third"],
780 "files": ["fourth", "second", "third"],
781 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n"
781 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n"
782 }
782 }
783 ]
783 ]
784
784
785 $ hg log -T json
785 $ hg log -T json
786 [
786 [
787 {
787 {
788 "rev": 8,
788 "rev": 8,
789 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
789 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
790 "branch": "default",
790 "branch": "default",
791 "phase": "draft",
791 "phase": "draft",
792 "user": "test",
792 "user": "test",
793 "date": [1577872860, 0],
793 "date": [1577872860, 0],
794 "desc": "third",
794 "desc": "third",
795 "bookmarks": [],
795 "bookmarks": [],
796 "tags": ["tip"],
796 "tags": ["tip"],
797 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
797 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
798 },
798 },
799 {
799 {
800 "rev": 7,
800 "rev": 7,
801 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
801 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
802 "branch": "default",
802 "branch": "default",
803 "phase": "draft",
803 "phase": "draft",
804 "user": "User Name <user@hostname>",
804 "user": "User Name <user@hostname>",
805 "date": [1000000, 0],
805 "date": [1000000, 0],
806 "desc": "second",
806 "desc": "second",
807 "bookmarks": [],
807 "bookmarks": [],
808 "tags": [],
808 "tags": [],
809 "parents": ["0000000000000000000000000000000000000000"]
809 "parents": ["0000000000000000000000000000000000000000"]
810 },
810 },
811 {
811 {
812 "rev": 6,
812 "rev": 6,
813 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
813 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
814 "branch": "default",
814 "branch": "default",
815 "phase": "draft",
815 "phase": "draft",
816 "user": "person",
816 "user": "person",
817 "date": [1500001, 0],
817 "date": [1500001, 0],
818 "desc": "merge",
818 "desc": "merge",
819 "bookmarks": [],
819 "bookmarks": [],
820 "tags": [],
820 "tags": [],
821 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
821 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
822 },
822 },
823 {
823 {
824 "rev": 5,
824 "rev": 5,
825 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
825 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
826 "branch": "default",
826 "branch": "default",
827 "phase": "draft",
827 "phase": "draft",
828 "user": "person",
828 "user": "person",
829 "date": [1500000, 0],
829 "date": [1500000, 0],
830 "desc": "new head",
830 "desc": "new head",
831 "bookmarks": [],
831 "bookmarks": [],
832 "tags": [],
832 "tags": [],
833 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
833 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
834 },
834 },
835 {
835 {
836 "rev": 4,
836 "rev": 4,
837 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
837 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
838 "branch": "foo",
838 "branch": "foo",
839 "phase": "draft",
839 "phase": "draft",
840 "user": "person",
840 "user": "person",
841 "date": [1400000, 0],
841 "date": [1400000, 0],
842 "desc": "new branch",
842 "desc": "new branch",
843 "bookmarks": [],
843 "bookmarks": [],
844 "tags": [],
844 "tags": [],
845 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
845 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
846 },
846 },
847 {
847 {
848 "rev": 3,
848 "rev": 3,
849 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
849 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
850 "branch": "default",
850 "branch": "default",
851 "phase": "draft",
851 "phase": "draft",
852 "user": "person",
852 "user": "person",
853 "date": [1300000, 0],
853 "date": [1300000, 0],
854 "desc": "no user, no domain",
854 "desc": "no user, no domain",
855 "bookmarks": [],
855 "bookmarks": [],
856 "tags": [],
856 "tags": [],
857 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
857 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
858 },
858 },
859 {
859 {
860 "rev": 2,
860 "rev": 2,
861 "node": "97054abb4ab824450e9164180baf491ae0078465",
861 "node": "97054abb4ab824450e9164180baf491ae0078465",
862 "branch": "default",
862 "branch": "default",
863 "phase": "draft",
863 "phase": "draft",
864 "user": "other@place",
864 "user": "other@place",
865 "date": [1200000, 0],
865 "date": [1200000, 0],
866 "desc": "no person",
866 "desc": "no person",
867 "bookmarks": [],
867 "bookmarks": [],
868 "tags": [],
868 "tags": [],
869 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
869 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
870 },
870 },
871 {
871 {
872 "rev": 1,
872 "rev": 1,
873 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
873 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
874 "branch": "default",
874 "branch": "default",
875 "phase": "draft",
875 "phase": "draft",
876 "user": "A. N. Other <other@place>",
876 "user": "A. N. Other <other@place>",
877 "date": [1100000, 0],
877 "date": [1100000, 0],
878 "desc": "other 1\nother 2\n\nother 3",
878 "desc": "other 1\nother 2\n\nother 3",
879 "bookmarks": [],
879 "bookmarks": [],
880 "tags": [],
880 "tags": [],
881 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
881 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
882 },
882 },
883 {
883 {
884 "rev": 0,
884 "rev": 0,
885 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
885 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
886 "branch": "default",
886 "branch": "default",
887 "phase": "draft",
887 "phase": "draft",
888 "user": "User Name <user@hostname>",
888 "user": "User Name <user@hostname>",
889 "date": [1000000, 0],
889 "date": [1000000, 0],
890 "desc": "line 1\nline 2",
890 "desc": "line 1\nline 2",
891 "bookmarks": [],
891 "bookmarks": [],
892 "tags": [],
892 "tags": [],
893 "parents": ["0000000000000000000000000000000000000000"]
893 "parents": ["0000000000000000000000000000000000000000"]
894 }
894 }
895 ]
895 ]
896
896
897 $ hg heads -v -Tjson
897 $ hg heads -v -Tjson
898 [
898 [
899 {
899 {
900 "rev": 8,
900 "rev": 8,
901 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
901 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
902 "branch": "default",
902 "branch": "default",
903 "phase": "draft",
903 "phase": "draft",
904 "user": "test",
904 "user": "test",
905 "date": [1577872860, 0],
905 "date": [1577872860, 0],
906 "desc": "third",
906 "desc": "third",
907 "bookmarks": [],
907 "bookmarks": [],
908 "tags": ["tip"],
908 "tags": ["tip"],
909 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
909 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
910 "files": ["fourth", "second", "third"]
910 "files": ["fourth", "second", "third"]
911 },
911 },
912 {
912 {
913 "rev": 6,
913 "rev": 6,
914 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
914 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
915 "branch": "default",
915 "branch": "default",
916 "phase": "draft",
916 "phase": "draft",
917 "user": "person",
917 "user": "person",
918 "date": [1500001, 0],
918 "date": [1500001, 0],
919 "desc": "merge",
919 "desc": "merge",
920 "bookmarks": [],
920 "bookmarks": [],
921 "tags": [],
921 "tags": [],
922 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
922 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
923 "files": []
923 "files": []
924 },
924 },
925 {
925 {
926 "rev": 4,
926 "rev": 4,
927 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
927 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
928 "branch": "foo",
928 "branch": "foo",
929 "phase": "draft",
929 "phase": "draft",
930 "user": "person",
930 "user": "person",
931 "date": [1400000, 0],
931 "date": [1400000, 0],
932 "desc": "new branch",
932 "desc": "new branch",
933 "bookmarks": [],
933 "bookmarks": [],
934 "tags": [],
934 "tags": [],
935 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
935 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
936 "files": []
936 "files": []
937 }
937 }
938 ]
938 ]
939
939
940 $ hg log --debug -Tjson
940 $ hg log --debug -Tjson
941 [
941 [
942 {
942 {
943 "rev": 8,
943 "rev": 8,
944 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
944 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
945 "branch": "default",
945 "branch": "default",
946 "phase": "draft",
946 "phase": "draft",
947 "user": "test",
947 "user": "test",
948 "date": [1577872860, 0],
948 "date": [1577872860, 0],
949 "desc": "third",
949 "desc": "third",
950 "bookmarks": [],
950 "bookmarks": [],
951 "tags": ["tip"],
951 "tags": ["tip"],
952 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
952 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
953 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
953 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
954 "extra": {"branch": "default"},
954 "extra": {"branch": "default"},
955 "modified": [],
955 "modified": [],
956 "added": ["fourth", "third"],
956 "added": ["fourth", "third"],
957 "removed": ["second"]
957 "removed": ["second"]
958 },
958 },
959 {
959 {
960 "rev": 7,
960 "rev": 7,
961 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
961 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
962 "branch": "default",
962 "branch": "default",
963 "phase": "draft",
963 "phase": "draft",
964 "user": "User Name <user@hostname>",
964 "user": "User Name <user@hostname>",
965 "date": [1000000, 0],
965 "date": [1000000, 0],
966 "desc": "second",
966 "desc": "second",
967 "bookmarks": [],
967 "bookmarks": [],
968 "tags": [],
968 "tags": [],
969 "parents": ["0000000000000000000000000000000000000000"],
969 "parents": ["0000000000000000000000000000000000000000"],
970 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
970 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
971 "extra": {"branch": "default"},
971 "extra": {"branch": "default"},
972 "modified": [],
972 "modified": [],
973 "added": ["second"],
973 "added": ["second"],
974 "removed": []
974 "removed": []
975 },
975 },
976 {
976 {
977 "rev": 6,
977 "rev": 6,
978 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
978 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
979 "branch": "default",
979 "branch": "default",
980 "phase": "draft",
980 "phase": "draft",
981 "user": "person",
981 "user": "person",
982 "date": [1500001, 0],
982 "date": [1500001, 0],
983 "desc": "merge",
983 "desc": "merge",
984 "bookmarks": [],
984 "bookmarks": [],
985 "tags": [],
985 "tags": [],
986 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
986 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
987 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
987 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
988 "extra": {"branch": "default"},
988 "extra": {"branch": "default"},
989 "modified": [],
989 "modified": [],
990 "added": [],
990 "added": [],
991 "removed": []
991 "removed": []
992 },
992 },
993 {
993 {
994 "rev": 5,
994 "rev": 5,
995 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
995 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
996 "branch": "default",
996 "branch": "default",
997 "phase": "draft",
997 "phase": "draft",
998 "user": "person",
998 "user": "person",
999 "date": [1500000, 0],
999 "date": [1500000, 0],
1000 "desc": "new head",
1000 "desc": "new head",
1001 "bookmarks": [],
1001 "bookmarks": [],
1002 "tags": [],
1002 "tags": [],
1003 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1003 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1004 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1004 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1005 "extra": {"branch": "default"},
1005 "extra": {"branch": "default"},
1006 "modified": [],
1006 "modified": [],
1007 "added": ["d"],
1007 "added": ["d"],
1008 "removed": []
1008 "removed": []
1009 },
1009 },
1010 {
1010 {
1011 "rev": 4,
1011 "rev": 4,
1012 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
1012 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
1013 "branch": "foo",
1013 "branch": "foo",
1014 "phase": "draft",
1014 "phase": "draft",
1015 "user": "person",
1015 "user": "person",
1016 "date": [1400000, 0],
1016 "date": [1400000, 0],
1017 "desc": "new branch",
1017 "desc": "new branch",
1018 "bookmarks": [],
1018 "bookmarks": [],
1019 "tags": [],
1019 "tags": [],
1020 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1020 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1021 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1021 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1022 "extra": {"branch": "foo"},
1022 "extra": {"branch": "foo"},
1023 "modified": [],
1023 "modified": [],
1024 "added": [],
1024 "added": [],
1025 "removed": []
1025 "removed": []
1026 },
1026 },
1027 {
1027 {
1028 "rev": 3,
1028 "rev": 3,
1029 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
1029 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
1030 "branch": "default",
1030 "branch": "default",
1031 "phase": "draft",
1031 "phase": "draft",
1032 "user": "person",
1032 "user": "person",
1033 "date": [1300000, 0],
1033 "date": [1300000, 0],
1034 "desc": "no user, no domain",
1034 "desc": "no user, no domain",
1035 "bookmarks": [],
1035 "bookmarks": [],
1036 "tags": [],
1036 "tags": [],
1037 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
1037 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
1038 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1038 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1039 "extra": {"branch": "default"},
1039 "extra": {"branch": "default"},
1040 "modified": ["c"],
1040 "modified": ["c"],
1041 "added": [],
1041 "added": [],
1042 "removed": []
1042 "removed": []
1043 },
1043 },
1044 {
1044 {
1045 "rev": 2,
1045 "rev": 2,
1046 "node": "97054abb4ab824450e9164180baf491ae0078465",
1046 "node": "97054abb4ab824450e9164180baf491ae0078465",
1047 "branch": "default",
1047 "branch": "default",
1048 "phase": "draft",
1048 "phase": "draft",
1049 "user": "other@place",
1049 "user": "other@place",
1050 "date": [1200000, 0],
1050 "date": [1200000, 0],
1051 "desc": "no person",
1051 "desc": "no person",
1052 "bookmarks": [],
1052 "bookmarks": [],
1053 "tags": [],
1053 "tags": [],
1054 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
1054 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
1055 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
1055 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
1056 "extra": {"branch": "default"},
1056 "extra": {"branch": "default"},
1057 "modified": [],
1057 "modified": [],
1058 "added": ["c"],
1058 "added": ["c"],
1059 "removed": []
1059 "removed": []
1060 },
1060 },
1061 {
1061 {
1062 "rev": 1,
1062 "rev": 1,
1063 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
1063 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
1064 "branch": "default",
1064 "branch": "default",
1065 "phase": "draft",
1065 "phase": "draft",
1066 "user": "A. N. Other <other@place>",
1066 "user": "A. N. Other <other@place>",
1067 "date": [1100000, 0],
1067 "date": [1100000, 0],
1068 "desc": "other 1\nother 2\n\nother 3",
1068 "desc": "other 1\nother 2\n\nother 3",
1069 "bookmarks": [],
1069 "bookmarks": [],
1070 "tags": [],
1070 "tags": [],
1071 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
1071 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
1072 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
1072 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
1073 "extra": {"branch": "default"},
1073 "extra": {"branch": "default"},
1074 "modified": [],
1074 "modified": [],
1075 "added": ["b"],
1075 "added": ["b"],
1076 "removed": []
1076 "removed": []
1077 },
1077 },
1078 {
1078 {
1079 "rev": 0,
1079 "rev": 0,
1080 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
1080 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
1081 "branch": "default",
1081 "branch": "default",
1082 "phase": "draft",
1082 "phase": "draft",
1083 "user": "User Name <user@hostname>",
1083 "user": "User Name <user@hostname>",
1084 "date": [1000000, 0],
1084 "date": [1000000, 0],
1085 "desc": "line 1\nline 2",
1085 "desc": "line 1\nline 2",
1086 "bookmarks": [],
1086 "bookmarks": [],
1087 "tags": [],
1087 "tags": [],
1088 "parents": ["0000000000000000000000000000000000000000"],
1088 "parents": ["0000000000000000000000000000000000000000"],
1089 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
1089 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
1090 "extra": {"branch": "default"},
1090 "extra": {"branch": "default"},
1091 "modified": [],
1091 "modified": [],
1092 "added": ["a"],
1092 "added": ["a"],
1093 "removed": []
1093 "removed": []
1094 }
1094 }
1095 ]
1095 ]
1096
1096
1097 Error if style not readable:
1097 Error if style not readable:
1098
1098
1099 #if unix-permissions no-root
1099 #if unix-permissions no-root
1100 $ touch q
1100 $ touch q
1101 $ chmod 0 q
1101 $ chmod 0 q
1102 $ hg log --style ./q
1102 $ hg log --style ./q
1103 abort: Permission denied: ./q
1103 abort: Permission denied: ./q
1104 [255]
1104 [255]
1105 #endif
1105 #endif
1106
1106
1107 Error if no style:
1107 Error if no style:
1108
1108
1109 $ hg log --style notexist
1109 $ hg log --style notexist
1110 abort: style 'notexist' not found
1110 abort: style 'notexist' not found
1111 (available styles: bisect, changelog, compact, default, phases, status, xml)
1111 (available styles: bisect, changelog, compact, default, phases, status, xml)
1112 [255]
1112 [255]
1113
1113
1114 $ hg log -T list
1114 $ hg log -T list
1115 available styles: bisect, changelog, compact, default, phases, status, xml
1115 available styles: bisect, changelog, compact, default, phases, status, xml
1116 abort: specify a template
1116 abort: specify a template
1117 [255]
1117 [255]
1118
1118
1119 Error if style missing key:
1119 Error if style missing key:
1120
1120
1121 $ echo 'q = q' > t
1121 $ echo 'q = q' > t
1122 $ hg log --style ./t
1122 $ hg log --style ./t
1123 abort: "changeset" not in template map
1123 abort: "changeset" not in template map
1124 [255]
1124 [255]
1125
1125
1126 Error if style missing value:
1126 Error if style missing value:
1127
1127
1128 $ echo 'changeset =' > t
1128 $ echo 'changeset =' > t
1129 $ hg log --style t
1129 $ hg log --style t
1130 hg: parse error at t:1: missing value
1130 hg: parse error at t:1: missing value
1131 [255]
1131 [255]
1132
1132
1133 Error if include fails:
1133 Error if include fails:
1134
1134
1135 $ echo 'changeset = q' >> t
1135 $ echo 'changeset = q' >> t
1136 #if unix-permissions no-root
1136 #if unix-permissions no-root
1137 $ hg log --style ./t
1137 $ hg log --style ./t
1138 abort: template file ./q: Permission denied
1138 abort: template file ./q: Permission denied
1139 [255]
1139 [255]
1140 $ rm -f q
1140 $ rm -f q
1141 #endif
1141 #endif
1142
1142
1143 Include works:
1143 Include works:
1144
1144
1145 $ echo '{rev}' > q
1145 $ echo '{rev}' > q
1146 $ hg log --style ./t
1146 $ hg log --style ./t
1147 8
1147 8
1148 7
1148 7
1149 6
1149 6
1150 5
1150 5
1151 4
1151 4
1152 3
1152 3
1153 2
1153 2
1154 1
1154 1
1155 0
1155 0
1156
1156
1157 Check that recursive reference does not fall into RuntimeError (issue4758):
1157 Check that recursive reference does not fall into RuntimeError (issue4758):
1158
1158
1159 common mistake:
1159 common mistake:
1160
1160
1161 $ hg log -T '{changeset}\n'
1161 $ hg log -T '{changeset}\n'
1162 abort: recursive reference 'changeset' in template
1162 abort: recursive reference 'changeset' in template
1163 [255]
1163 [255]
1164
1164
1165 circular reference:
1165 circular reference:
1166
1166
1167 $ cat << EOF > issue4758
1167 $ cat << EOF > issue4758
1168 > changeset = '{foo}'
1168 > changeset = '{foo}'
1169 > foo = '{changeset}'
1169 > foo = '{changeset}'
1170 > EOF
1170 > EOF
1171 $ hg log --style ./issue4758
1171 $ hg log --style ./issue4758
1172 abort: recursive reference 'foo' in template
1172 abort: recursive reference 'foo' in template
1173 [255]
1173 [255]
1174
1174
1175 buildmap() -> gettemplate(), where no thunk was made:
1175 buildmap() -> gettemplate(), where no thunk was made:
1176
1176
1177 $ hg log -T '{files % changeset}\n'
1177 $ hg log -T '{files % changeset}\n'
1178 abort: recursive reference 'changeset' in template
1178 abort: recursive reference 'changeset' in template
1179 [255]
1179 [255]
1180
1180
1181 not a recursion if a keyword of the same name exists:
1181 not a recursion if a keyword of the same name exists:
1182
1182
1183 $ cat << EOF > issue4758
1183 $ cat << EOF > issue4758
1184 > changeset = '{tags % rev}'
1184 > changeset = '{tags % rev}'
1185 > rev = '{rev} {tag}\n'
1185 > rev = '{rev} {tag}\n'
1186 > EOF
1186 > EOF
1187 $ hg log --style ./issue4758 -r tip
1187 $ hg log --style ./issue4758 -r tip
1188 8 tip
1188 8 tip
1189
1189
1190 Check that {phase} works correctly on parents:
1190 Check that {phase} works correctly on parents:
1191
1191
1192 $ cat << EOF > parentphase
1192 $ cat << EOF > parentphase
1193 > changeset_debug = '{rev} ({phase}):{parents}\n'
1193 > changeset_debug = '{rev} ({phase}):{parents}\n'
1194 > parent = ' {rev} ({phase})'
1194 > parent = ' {rev} ({phase})'
1195 > EOF
1195 > EOF
1196 $ hg phase -r 5 --public
1196 $ hg phase -r 5 --public
1197 $ hg phase -r 7 --secret --force
1197 $ hg phase -r 7 --secret --force
1198 $ hg log --debug -G --style ./parentphase
1198 $ hg log --debug -G --style ./parentphase
1199 @ 8 (secret): 7 (secret) -1 (public)
1199 @ 8 (secret): 7 (secret) -1 (public)
1200 |
1200 |
1201 o 7 (secret): -1 (public) -1 (public)
1201 o 7 (secret): -1 (public) -1 (public)
1202
1202
1203 o 6 (draft): 5 (public) 4 (draft)
1203 o 6 (draft): 5 (public) 4 (draft)
1204 |\
1204 |\
1205 | o 5 (public): 3 (public) -1 (public)
1205 | o 5 (public): 3 (public) -1 (public)
1206 | |
1206 | |
1207 o | 4 (draft): 3 (public) -1 (public)
1207 o | 4 (draft): 3 (public) -1 (public)
1208 |/
1208 |/
1209 o 3 (public): 2 (public) -1 (public)
1209 o 3 (public): 2 (public) -1 (public)
1210 |
1210 |
1211 o 2 (public): 1 (public) -1 (public)
1211 o 2 (public): 1 (public) -1 (public)
1212 |
1212 |
1213 o 1 (public): 0 (public) -1 (public)
1213 o 1 (public): 0 (public) -1 (public)
1214 |
1214 |
1215 o 0 (public): -1 (public) -1 (public)
1215 o 0 (public): -1 (public) -1 (public)
1216
1216
1217
1217
1218 Missing non-standard names give no error (backward compatibility):
1218 Missing non-standard names give no error (backward compatibility):
1219
1219
1220 $ echo "changeset = '{c}'" > t
1220 $ echo "changeset = '{c}'" > t
1221 $ hg log --style ./t
1221 $ hg log --style ./t
1222
1222
1223 Defining non-standard name works:
1223 Defining non-standard name works:
1224
1224
1225 $ cat <<EOF > t
1225 $ cat <<EOF > t
1226 > changeset = '{c}'
1226 > changeset = '{c}'
1227 > c = q
1227 > c = q
1228 > EOF
1228 > EOF
1229 $ hg log --style ./t
1229 $ hg log --style ./t
1230 8
1230 8
1231 7
1231 7
1232 6
1232 6
1233 5
1233 5
1234 4
1234 4
1235 3
1235 3
1236 2
1236 2
1237 1
1237 1
1238 0
1238 0
1239
1239
1240 ui.style works:
1240 ui.style works:
1241
1241
1242 $ echo '[ui]' > .hg/hgrc
1242 $ echo '[ui]' > .hg/hgrc
1243 $ echo 'style = t' >> .hg/hgrc
1243 $ echo 'style = t' >> .hg/hgrc
1244 $ hg log
1244 $ hg log
1245 8
1245 8
1246 7
1246 7
1247 6
1247 6
1248 5
1248 5
1249 4
1249 4
1250 3
1250 3
1251 2
1251 2
1252 1
1252 1
1253 0
1253 0
1254
1254
1255
1255
1256 Issue338:
1256 Issue338:
1257
1257
1258 $ hg log --style=changelog > changelog
1258 $ hg log --style=changelog > changelog
1259
1259
1260 $ cat changelog
1260 $ cat changelog
1261 2020-01-01 test <test>
1261 2020-01-01 test <test>
1262
1262
1263 * fourth, second, third:
1263 * fourth, second, third:
1264 third
1264 third
1265 [95c24699272e] [tip]
1265 [95c24699272e] [tip]
1266
1266
1267 1970-01-12 User Name <user@hostname>
1267 1970-01-12 User Name <user@hostname>
1268
1268
1269 * second:
1269 * second:
1270 second
1270 second
1271 [29114dbae42b]
1271 [29114dbae42b]
1272
1272
1273 1970-01-18 person <person>
1273 1970-01-18 person <person>
1274
1274
1275 * merge
1275 * merge
1276 [d41e714fe50d]
1276 [d41e714fe50d]
1277
1277
1278 * d:
1278 * d:
1279 new head
1279 new head
1280 [13207e5a10d9]
1280 [13207e5a10d9]
1281
1281
1282 1970-01-17 person <person>
1282 1970-01-17 person <person>
1283
1283
1284 * new branch
1284 * new branch
1285 [bbe44766e73d] <foo>
1285 [bbe44766e73d] <foo>
1286
1286
1287 1970-01-16 person <person>
1287 1970-01-16 person <person>
1288
1288
1289 * c:
1289 * c:
1290 no user, no domain
1290 no user, no domain
1291 [10e46f2dcbf4]
1291 [10e46f2dcbf4]
1292
1292
1293 1970-01-14 other <other@place>
1293 1970-01-14 other <other@place>
1294
1294
1295 * c:
1295 * c:
1296 no person
1296 no person
1297 [97054abb4ab8]
1297 [97054abb4ab8]
1298
1298
1299 1970-01-13 A. N. Other <other@place>
1299 1970-01-13 A. N. Other <other@place>
1300
1300
1301 * b:
1301 * b:
1302 other 1 other 2
1302 other 1 other 2
1303
1303
1304 other 3
1304 other 3
1305 [b608e9d1a3f0]
1305 [b608e9d1a3f0]
1306
1306
1307 1970-01-12 User Name <user@hostname>
1307 1970-01-12 User Name <user@hostname>
1308
1308
1309 * a:
1309 * a:
1310 line 1 line 2
1310 line 1 line 2
1311 [1e4e1b8f71e0]
1311 [1e4e1b8f71e0]
1312
1312
1313
1313
1314 Issue2130: xml output for 'hg heads' is malformed
1314 Issue2130: xml output for 'hg heads' is malformed
1315
1315
1316 $ hg heads --style changelog
1316 $ hg heads --style changelog
1317 2020-01-01 test <test>
1317 2020-01-01 test <test>
1318
1318
1319 * fourth, second, third:
1319 * fourth, second, third:
1320 third
1320 third
1321 [95c24699272e] [tip]
1321 [95c24699272e] [tip]
1322
1322
1323 1970-01-18 person <person>
1323 1970-01-18 person <person>
1324
1324
1325 * merge
1325 * merge
1326 [d41e714fe50d]
1326 [d41e714fe50d]
1327
1327
1328 1970-01-17 person <person>
1328 1970-01-17 person <person>
1329
1329
1330 * new branch
1330 * new branch
1331 [bbe44766e73d] <foo>
1331 [bbe44766e73d] <foo>
1332
1332
1333
1333
1334 Keys work:
1334 Keys work:
1335
1335
1336 $ for key in author branch branches date desc file_adds file_dels file_mods \
1336 $ for key in author branch branches date desc file_adds file_dels file_mods \
1337 > file_copies file_copies_switch files \
1337 > file_copies file_copies_switch files \
1338 > manifest node parents rev tags diffstat extras \
1338 > manifest node parents rev tags diffstat extras \
1339 > p1rev p2rev p1node p2node; do
1339 > p1rev p2rev p1node p2node; do
1340 > for mode in '' --verbose --debug; do
1340 > for mode in '' --verbose --debug; do
1341 > hg log $mode --template "$key$mode: {$key}\n"
1341 > hg log $mode --template "$key$mode: {$key}\n"
1342 > done
1342 > done
1343 > done
1343 > done
1344 author: test
1344 author: test
1345 author: User Name <user@hostname>
1345 author: User Name <user@hostname>
1346 author: person
1346 author: person
1347 author: person
1347 author: person
1348 author: person
1348 author: person
1349 author: person
1349 author: person
1350 author: other@place
1350 author: other@place
1351 author: A. N. Other <other@place>
1351 author: A. N. Other <other@place>
1352 author: User Name <user@hostname>
1352 author: User Name <user@hostname>
1353 author--verbose: test
1353 author--verbose: test
1354 author--verbose: User Name <user@hostname>
1354 author--verbose: User Name <user@hostname>
1355 author--verbose: person
1355 author--verbose: person
1356 author--verbose: person
1356 author--verbose: person
1357 author--verbose: person
1357 author--verbose: person
1358 author--verbose: person
1358 author--verbose: person
1359 author--verbose: other@place
1359 author--verbose: other@place
1360 author--verbose: A. N. Other <other@place>
1360 author--verbose: A. N. Other <other@place>
1361 author--verbose: User Name <user@hostname>
1361 author--verbose: User Name <user@hostname>
1362 author--debug: test
1362 author--debug: test
1363 author--debug: User Name <user@hostname>
1363 author--debug: User Name <user@hostname>
1364 author--debug: person
1364 author--debug: person
1365 author--debug: person
1365 author--debug: person
1366 author--debug: person
1366 author--debug: person
1367 author--debug: person
1367 author--debug: person
1368 author--debug: other@place
1368 author--debug: other@place
1369 author--debug: A. N. Other <other@place>
1369 author--debug: A. N. Other <other@place>
1370 author--debug: User Name <user@hostname>
1370 author--debug: User Name <user@hostname>
1371 branch: default
1371 branch: default
1372 branch: default
1372 branch: default
1373 branch: default
1373 branch: default
1374 branch: default
1374 branch: default
1375 branch: foo
1375 branch: foo
1376 branch: default
1376 branch: default
1377 branch: default
1377 branch: default
1378 branch: default
1378 branch: default
1379 branch: default
1379 branch: default
1380 branch--verbose: default
1380 branch--verbose: default
1381 branch--verbose: default
1381 branch--verbose: default
1382 branch--verbose: default
1382 branch--verbose: default
1383 branch--verbose: default
1383 branch--verbose: default
1384 branch--verbose: foo
1384 branch--verbose: foo
1385 branch--verbose: default
1385 branch--verbose: default
1386 branch--verbose: default
1386 branch--verbose: default
1387 branch--verbose: default
1387 branch--verbose: default
1388 branch--verbose: default
1388 branch--verbose: default
1389 branch--debug: default
1389 branch--debug: default
1390 branch--debug: default
1390 branch--debug: default
1391 branch--debug: default
1391 branch--debug: default
1392 branch--debug: default
1392 branch--debug: default
1393 branch--debug: foo
1393 branch--debug: foo
1394 branch--debug: default
1394 branch--debug: default
1395 branch--debug: default
1395 branch--debug: default
1396 branch--debug: default
1396 branch--debug: default
1397 branch--debug: default
1397 branch--debug: default
1398 branches:
1398 branches:
1399 branches:
1399 branches:
1400 branches:
1400 branches:
1401 branches:
1401 branches:
1402 branches: foo
1402 branches: foo
1403 branches:
1403 branches:
1404 branches:
1404 branches:
1405 branches:
1405 branches:
1406 branches:
1406 branches:
1407 branches--verbose:
1407 branches--verbose:
1408 branches--verbose:
1408 branches--verbose:
1409 branches--verbose:
1409 branches--verbose:
1410 branches--verbose:
1410 branches--verbose:
1411 branches--verbose: foo
1411 branches--verbose: foo
1412 branches--verbose:
1412 branches--verbose:
1413 branches--verbose:
1413 branches--verbose:
1414 branches--verbose:
1414 branches--verbose:
1415 branches--verbose:
1415 branches--verbose:
1416 branches--debug:
1416 branches--debug:
1417 branches--debug:
1417 branches--debug:
1418 branches--debug:
1418 branches--debug:
1419 branches--debug:
1419 branches--debug:
1420 branches--debug: foo
1420 branches--debug: foo
1421 branches--debug:
1421 branches--debug:
1422 branches--debug:
1422 branches--debug:
1423 branches--debug:
1423 branches--debug:
1424 branches--debug:
1424 branches--debug:
1425 date: 1577872860.00
1425 date: 1577872860.00
1426 date: 1000000.00
1426 date: 1000000.00
1427 date: 1500001.00
1427 date: 1500001.00
1428 date: 1500000.00
1428 date: 1500000.00
1429 date: 1400000.00
1429 date: 1400000.00
1430 date: 1300000.00
1430 date: 1300000.00
1431 date: 1200000.00
1431 date: 1200000.00
1432 date: 1100000.00
1432 date: 1100000.00
1433 date: 1000000.00
1433 date: 1000000.00
1434 date--verbose: 1577872860.00
1434 date--verbose: 1577872860.00
1435 date--verbose: 1000000.00
1435 date--verbose: 1000000.00
1436 date--verbose: 1500001.00
1436 date--verbose: 1500001.00
1437 date--verbose: 1500000.00
1437 date--verbose: 1500000.00
1438 date--verbose: 1400000.00
1438 date--verbose: 1400000.00
1439 date--verbose: 1300000.00
1439 date--verbose: 1300000.00
1440 date--verbose: 1200000.00
1440 date--verbose: 1200000.00
1441 date--verbose: 1100000.00
1441 date--verbose: 1100000.00
1442 date--verbose: 1000000.00
1442 date--verbose: 1000000.00
1443 date--debug: 1577872860.00
1443 date--debug: 1577872860.00
1444 date--debug: 1000000.00
1444 date--debug: 1000000.00
1445 date--debug: 1500001.00
1445 date--debug: 1500001.00
1446 date--debug: 1500000.00
1446 date--debug: 1500000.00
1447 date--debug: 1400000.00
1447 date--debug: 1400000.00
1448 date--debug: 1300000.00
1448 date--debug: 1300000.00
1449 date--debug: 1200000.00
1449 date--debug: 1200000.00
1450 date--debug: 1100000.00
1450 date--debug: 1100000.00
1451 date--debug: 1000000.00
1451 date--debug: 1000000.00
1452 desc: third
1452 desc: third
1453 desc: second
1453 desc: second
1454 desc: merge
1454 desc: merge
1455 desc: new head
1455 desc: new head
1456 desc: new branch
1456 desc: new branch
1457 desc: no user, no domain
1457 desc: no user, no domain
1458 desc: no person
1458 desc: no person
1459 desc: other 1
1459 desc: other 1
1460 other 2
1460 other 2
1461
1461
1462 other 3
1462 other 3
1463 desc: line 1
1463 desc: line 1
1464 line 2
1464 line 2
1465 desc--verbose: third
1465 desc--verbose: third
1466 desc--verbose: second
1466 desc--verbose: second
1467 desc--verbose: merge
1467 desc--verbose: merge
1468 desc--verbose: new head
1468 desc--verbose: new head
1469 desc--verbose: new branch
1469 desc--verbose: new branch
1470 desc--verbose: no user, no domain
1470 desc--verbose: no user, no domain
1471 desc--verbose: no person
1471 desc--verbose: no person
1472 desc--verbose: other 1
1472 desc--verbose: other 1
1473 other 2
1473 other 2
1474
1474
1475 other 3
1475 other 3
1476 desc--verbose: line 1
1476 desc--verbose: line 1
1477 line 2
1477 line 2
1478 desc--debug: third
1478 desc--debug: third
1479 desc--debug: second
1479 desc--debug: second
1480 desc--debug: merge
1480 desc--debug: merge
1481 desc--debug: new head
1481 desc--debug: new head
1482 desc--debug: new branch
1482 desc--debug: new branch
1483 desc--debug: no user, no domain
1483 desc--debug: no user, no domain
1484 desc--debug: no person
1484 desc--debug: no person
1485 desc--debug: other 1
1485 desc--debug: other 1
1486 other 2
1486 other 2
1487
1487
1488 other 3
1488 other 3
1489 desc--debug: line 1
1489 desc--debug: line 1
1490 line 2
1490 line 2
1491 file_adds: fourth third
1491 file_adds: fourth third
1492 file_adds: second
1492 file_adds: second
1493 file_adds:
1493 file_adds:
1494 file_adds: d
1494 file_adds: d
1495 file_adds:
1495 file_adds:
1496 file_adds:
1496 file_adds:
1497 file_adds: c
1497 file_adds: c
1498 file_adds: b
1498 file_adds: b
1499 file_adds: a
1499 file_adds: a
1500 file_adds--verbose: fourth third
1500 file_adds--verbose: fourth third
1501 file_adds--verbose: second
1501 file_adds--verbose: second
1502 file_adds--verbose:
1502 file_adds--verbose:
1503 file_adds--verbose: d
1503 file_adds--verbose: d
1504 file_adds--verbose:
1504 file_adds--verbose:
1505 file_adds--verbose:
1505 file_adds--verbose:
1506 file_adds--verbose: c
1506 file_adds--verbose: c
1507 file_adds--verbose: b
1507 file_adds--verbose: b
1508 file_adds--verbose: a
1508 file_adds--verbose: a
1509 file_adds--debug: fourth third
1509 file_adds--debug: fourth third
1510 file_adds--debug: second
1510 file_adds--debug: second
1511 file_adds--debug:
1511 file_adds--debug:
1512 file_adds--debug: d
1512 file_adds--debug: d
1513 file_adds--debug:
1513 file_adds--debug:
1514 file_adds--debug:
1514 file_adds--debug:
1515 file_adds--debug: c
1515 file_adds--debug: c
1516 file_adds--debug: b
1516 file_adds--debug: b
1517 file_adds--debug: a
1517 file_adds--debug: a
1518 file_dels: second
1518 file_dels: second
1519 file_dels:
1519 file_dels:
1520 file_dels:
1520 file_dels:
1521 file_dels:
1521 file_dels:
1522 file_dels:
1522 file_dels:
1523 file_dels:
1523 file_dels:
1524 file_dels:
1524 file_dels:
1525 file_dels:
1525 file_dels:
1526 file_dels:
1526 file_dels:
1527 file_dels--verbose: second
1527 file_dels--verbose: second
1528 file_dels--verbose:
1528 file_dels--verbose:
1529 file_dels--verbose:
1529 file_dels--verbose:
1530 file_dels--verbose:
1530 file_dels--verbose:
1531 file_dels--verbose:
1531 file_dels--verbose:
1532 file_dels--verbose:
1532 file_dels--verbose:
1533 file_dels--verbose:
1533 file_dels--verbose:
1534 file_dels--verbose:
1534 file_dels--verbose:
1535 file_dels--verbose:
1535 file_dels--verbose:
1536 file_dels--debug: second
1536 file_dels--debug: second
1537 file_dels--debug:
1537 file_dels--debug:
1538 file_dels--debug:
1538 file_dels--debug:
1539 file_dels--debug:
1539 file_dels--debug:
1540 file_dels--debug:
1540 file_dels--debug:
1541 file_dels--debug:
1541 file_dels--debug:
1542 file_dels--debug:
1542 file_dels--debug:
1543 file_dels--debug:
1543 file_dels--debug:
1544 file_dels--debug:
1544 file_dels--debug:
1545 file_mods:
1545 file_mods:
1546 file_mods:
1546 file_mods:
1547 file_mods:
1547 file_mods:
1548 file_mods:
1548 file_mods:
1549 file_mods:
1549 file_mods:
1550 file_mods: c
1550 file_mods: c
1551 file_mods:
1551 file_mods:
1552 file_mods:
1552 file_mods:
1553 file_mods:
1553 file_mods:
1554 file_mods--verbose:
1554 file_mods--verbose:
1555 file_mods--verbose:
1555 file_mods--verbose:
1556 file_mods--verbose:
1556 file_mods--verbose:
1557 file_mods--verbose:
1557 file_mods--verbose:
1558 file_mods--verbose:
1558 file_mods--verbose:
1559 file_mods--verbose: c
1559 file_mods--verbose: c
1560 file_mods--verbose:
1560 file_mods--verbose:
1561 file_mods--verbose:
1561 file_mods--verbose:
1562 file_mods--verbose:
1562 file_mods--verbose:
1563 file_mods--debug:
1563 file_mods--debug:
1564 file_mods--debug:
1564 file_mods--debug:
1565 file_mods--debug:
1565 file_mods--debug:
1566 file_mods--debug:
1566 file_mods--debug:
1567 file_mods--debug:
1567 file_mods--debug:
1568 file_mods--debug: c
1568 file_mods--debug: c
1569 file_mods--debug:
1569 file_mods--debug:
1570 file_mods--debug:
1570 file_mods--debug:
1571 file_mods--debug:
1571 file_mods--debug:
1572 file_copies: fourth (second)
1572 file_copies: fourth (second)
1573 file_copies:
1573 file_copies:
1574 file_copies:
1574 file_copies:
1575 file_copies:
1575 file_copies:
1576 file_copies:
1576 file_copies:
1577 file_copies:
1577 file_copies:
1578 file_copies:
1578 file_copies:
1579 file_copies:
1579 file_copies:
1580 file_copies:
1580 file_copies:
1581 file_copies--verbose: fourth (second)
1581 file_copies--verbose: fourth (second)
1582 file_copies--verbose:
1582 file_copies--verbose:
1583 file_copies--verbose:
1583 file_copies--verbose:
1584 file_copies--verbose:
1584 file_copies--verbose:
1585 file_copies--verbose:
1585 file_copies--verbose:
1586 file_copies--verbose:
1586 file_copies--verbose:
1587 file_copies--verbose:
1587 file_copies--verbose:
1588 file_copies--verbose:
1588 file_copies--verbose:
1589 file_copies--verbose:
1589 file_copies--verbose:
1590 file_copies--debug: fourth (second)
1590 file_copies--debug: fourth (second)
1591 file_copies--debug:
1591 file_copies--debug:
1592 file_copies--debug:
1592 file_copies--debug:
1593 file_copies--debug:
1593 file_copies--debug:
1594 file_copies--debug:
1594 file_copies--debug:
1595 file_copies--debug:
1595 file_copies--debug:
1596 file_copies--debug:
1596 file_copies--debug:
1597 file_copies--debug:
1597 file_copies--debug:
1598 file_copies--debug:
1598 file_copies--debug:
1599 file_copies_switch:
1599 file_copies_switch:
1600 file_copies_switch:
1600 file_copies_switch:
1601 file_copies_switch:
1601 file_copies_switch:
1602 file_copies_switch:
1602 file_copies_switch:
1603 file_copies_switch:
1603 file_copies_switch:
1604 file_copies_switch:
1604 file_copies_switch:
1605 file_copies_switch:
1605 file_copies_switch:
1606 file_copies_switch:
1606 file_copies_switch:
1607 file_copies_switch:
1607 file_copies_switch:
1608 file_copies_switch--verbose:
1608 file_copies_switch--verbose:
1609 file_copies_switch--verbose:
1609 file_copies_switch--verbose:
1610 file_copies_switch--verbose:
1610 file_copies_switch--verbose:
1611 file_copies_switch--verbose:
1611 file_copies_switch--verbose:
1612 file_copies_switch--verbose:
1612 file_copies_switch--verbose:
1613 file_copies_switch--verbose:
1613 file_copies_switch--verbose:
1614 file_copies_switch--verbose:
1614 file_copies_switch--verbose:
1615 file_copies_switch--verbose:
1615 file_copies_switch--verbose:
1616 file_copies_switch--verbose:
1616 file_copies_switch--verbose:
1617 file_copies_switch--debug:
1617 file_copies_switch--debug:
1618 file_copies_switch--debug:
1618 file_copies_switch--debug:
1619 file_copies_switch--debug:
1619 file_copies_switch--debug:
1620 file_copies_switch--debug:
1620 file_copies_switch--debug:
1621 file_copies_switch--debug:
1621 file_copies_switch--debug:
1622 file_copies_switch--debug:
1622 file_copies_switch--debug:
1623 file_copies_switch--debug:
1623 file_copies_switch--debug:
1624 file_copies_switch--debug:
1624 file_copies_switch--debug:
1625 file_copies_switch--debug:
1625 file_copies_switch--debug:
1626 files: fourth second third
1626 files: fourth second third
1627 files: second
1627 files: second
1628 files:
1628 files:
1629 files: d
1629 files: d
1630 files:
1630 files:
1631 files: c
1631 files: c
1632 files: c
1632 files: c
1633 files: b
1633 files: b
1634 files: a
1634 files: a
1635 files--verbose: fourth second third
1635 files--verbose: fourth second third
1636 files--verbose: second
1636 files--verbose: second
1637 files--verbose:
1637 files--verbose:
1638 files--verbose: d
1638 files--verbose: d
1639 files--verbose:
1639 files--verbose:
1640 files--verbose: c
1640 files--verbose: c
1641 files--verbose: c
1641 files--verbose: c
1642 files--verbose: b
1642 files--verbose: b
1643 files--verbose: a
1643 files--verbose: a
1644 files--debug: fourth second third
1644 files--debug: fourth second third
1645 files--debug: second
1645 files--debug: second
1646 files--debug:
1646 files--debug:
1647 files--debug: d
1647 files--debug: d
1648 files--debug:
1648 files--debug:
1649 files--debug: c
1649 files--debug: c
1650 files--debug: c
1650 files--debug: c
1651 files--debug: b
1651 files--debug: b
1652 files--debug: a
1652 files--debug: a
1653 manifest: 6:94961b75a2da
1653 manifest: 6:94961b75a2da
1654 manifest: 5:f2dbc354b94e
1654 manifest: 5:f2dbc354b94e
1655 manifest: 4:4dc3def4f9b4
1655 manifest: 4:4dc3def4f9b4
1656 manifest: 4:4dc3def4f9b4
1656 manifest: 4:4dc3def4f9b4
1657 manifest: 3:cb5a1327723b
1657 manifest: 3:cb5a1327723b
1658 manifest: 3:cb5a1327723b
1658 manifest: 3:cb5a1327723b
1659 manifest: 2:6e0e82995c35
1659 manifest: 2:6e0e82995c35
1660 manifest: 1:4e8d705b1e53
1660 manifest: 1:4e8d705b1e53
1661 manifest: 0:a0c8bcbbb45c
1661 manifest: 0:a0c8bcbbb45c
1662 manifest--verbose: 6:94961b75a2da
1662 manifest--verbose: 6:94961b75a2da
1663 manifest--verbose: 5:f2dbc354b94e
1663 manifest--verbose: 5:f2dbc354b94e
1664 manifest--verbose: 4:4dc3def4f9b4
1664 manifest--verbose: 4:4dc3def4f9b4
1665 manifest--verbose: 4:4dc3def4f9b4
1665 manifest--verbose: 4:4dc3def4f9b4
1666 manifest--verbose: 3:cb5a1327723b
1666 manifest--verbose: 3:cb5a1327723b
1667 manifest--verbose: 3:cb5a1327723b
1667 manifest--verbose: 3:cb5a1327723b
1668 manifest--verbose: 2:6e0e82995c35
1668 manifest--verbose: 2:6e0e82995c35
1669 manifest--verbose: 1:4e8d705b1e53
1669 manifest--verbose: 1:4e8d705b1e53
1670 manifest--verbose: 0:a0c8bcbbb45c
1670 manifest--verbose: 0:a0c8bcbbb45c
1671 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1671 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1672 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1672 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1673 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1673 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1674 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1674 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1675 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1675 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1676 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1676 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1677 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1677 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1678 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1678 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1679 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1679 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1680 node: 95c24699272ef57d062b8bccc32c878bf841784a
1680 node: 95c24699272ef57d062b8bccc32c878bf841784a
1681 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1681 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1682 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1682 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1683 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1683 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1684 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1684 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1685 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1685 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1686 node: 97054abb4ab824450e9164180baf491ae0078465
1686 node: 97054abb4ab824450e9164180baf491ae0078465
1687 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1687 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1688 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1688 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1689 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1689 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1690 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1690 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1691 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1691 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1692 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1692 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1693 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1693 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1694 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1694 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1695 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1695 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1696 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1696 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1697 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1697 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1698 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1698 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1699 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1699 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1700 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1700 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1701 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1701 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1702 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1702 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1703 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1703 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1704 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1704 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1705 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1705 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1706 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1706 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1707 parents:
1707 parents:
1708 parents: -1:000000000000
1708 parents: -1:000000000000
1709 parents: 5:13207e5a10d9 4:bbe44766e73d
1709 parents: 5:13207e5a10d9 4:bbe44766e73d
1710 parents: 3:10e46f2dcbf4
1710 parents: 3:10e46f2dcbf4
1711 parents:
1711 parents:
1712 parents:
1712 parents:
1713 parents:
1713 parents:
1714 parents:
1714 parents:
1715 parents:
1715 parents:
1716 parents--verbose:
1716 parents--verbose:
1717 parents--verbose: -1:000000000000
1717 parents--verbose: -1:000000000000
1718 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1718 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1719 parents--verbose: 3:10e46f2dcbf4
1719 parents--verbose: 3:10e46f2dcbf4
1720 parents--verbose:
1720 parents--verbose:
1721 parents--verbose:
1721 parents--verbose:
1722 parents--verbose:
1722 parents--verbose:
1723 parents--verbose:
1723 parents--verbose:
1724 parents--verbose:
1724 parents--verbose:
1725 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1725 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1726 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1726 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1727 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1727 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1728 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1728 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1729 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1729 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1730 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1730 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1731 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1731 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1732 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1732 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1733 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1733 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1734 rev: 8
1734 rev: 8
1735 rev: 7
1735 rev: 7
1736 rev: 6
1736 rev: 6
1737 rev: 5
1737 rev: 5
1738 rev: 4
1738 rev: 4
1739 rev: 3
1739 rev: 3
1740 rev: 2
1740 rev: 2
1741 rev: 1
1741 rev: 1
1742 rev: 0
1742 rev: 0
1743 rev--verbose: 8
1743 rev--verbose: 8
1744 rev--verbose: 7
1744 rev--verbose: 7
1745 rev--verbose: 6
1745 rev--verbose: 6
1746 rev--verbose: 5
1746 rev--verbose: 5
1747 rev--verbose: 4
1747 rev--verbose: 4
1748 rev--verbose: 3
1748 rev--verbose: 3
1749 rev--verbose: 2
1749 rev--verbose: 2
1750 rev--verbose: 1
1750 rev--verbose: 1
1751 rev--verbose: 0
1751 rev--verbose: 0
1752 rev--debug: 8
1752 rev--debug: 8
1753 rev--debug: 7
1753 rev--debug: 7
1754 rev--debug: 6
1754 rev--debug: 6
1755 rev--debug: 5
1755 rev--debug: 5
1756 rev--debug: 4
1756 rev--debug: 4
1757 rev--debug: 3
1757 rev--debug: 3
1758 rev--debug: 2
1758 rev--debug: 2
1759 rev--debug: 1
1759 rev--debug: 1
1760 rev--debug: 0
1760 rev--debug: 0
1761 tags: tip
1761 tags: tip
1762 tags:
1762 tags:
1763 tags:
1763 tags:
1764 tags:
1764 tags:
1765 tags:
1765 tags:
1766 tags:
1766 tags:
1767 tags:
1767 tags:
1768 tags:
1768 tags:
1769 tags:
1769 tags:
1770 tags--verbose: tip
1770 tags--verbose: tip
1771 tags--verbose:
1771 tags--verbose:
1772 tags--verbose:
1772 tags--verbose:
1773 tags--verbose:
1773 tags--verbose:
1774 tags--verbose:
1774 tags--verbose:
1775 tags--verbose:
1775 tags--verbose:
1776 tags--verbose:
1776 tags--verbose:
1777 tags--verbose:
1777 tags--verbose:
1778 tags--verbose:
1778 tags--verbose:
1779 tags--debug: tip
1779 tags--debug: tip
1780 tags--debug:
1780 tags--debug:
1781 tags--debug:
1781 tags--debug:
1782 tags--debug:
1782 tags--debug:
1783 tags--debug:
1783 tags--debug:
1784 tags--debug:
1784 tags--debug:
1785 tags--debug:
1785 tags--debug:
1786 tags--debug:
1786 tags--debug:
1787 tags--debug:
1787 tags--debug:
1788 diffstat: 3: +2/-1
1788 diffstat: 3: +2/-1
1789 diffstat: 1: +1/-0
1789 diffstat: 1: +1/-0
1790 diffstat: 0: +0/-0
1790 diffstat: 0: +0/-0
1791 diffstat: 1: +1/-0
1791 diffstat: 1: +1/-0
1792 diffstat: 0: +0/-0
1792 diffstat: 0: +0/-0
1793 diffstat: 1: +1/-0
1793 diffstat: 1: +1/-0
1794 diffstat: 1: +4/-0
1794 diffstat: 1: +4/-0
1795 diffstat: 1: +2/-0
1795 diffstat: 1: +2/-0
1796 diffstat: 1: +1/-0
1796 diffstat: 1: +1/-0
1797 diffstat--verbose: 3: +2/-1
1797 diffstat--verbose: 3: +2/-1
1798 diffstat--verbose: 1: +1/-0
1798 diffstat--verbose: 1: +1/-0
1799 diffstat--verbose: 0: +0/-0
1799 diffstat--verbose: 0: +0/-0
1800 diffstat--verbose: 1: +1/-0
1800 diffstat--verbose: 1: +1/-0
1801 diffstat--verbose: 0: +0/-0
1801 diffstat--verbose: 0: +0/-0
1802 diffstat--verbose: 1: +1/-0
1802 diffstat--verbose: 1: +1/-0
1803 diffstat--verbose: 1: +4/-0
1803 diffstat--verbose: 1: +4/-0
1804 diffstat--verbose: 1: +2/-0
1804 diffstat--verbose: 1: +2/-0
1805 diffstat--verbose: 1: +1/-0
1805 diffstat--verbose: 1: +1/-0
1806 diffstat--debug: 3: +2/-1
1806 diffstat--debug: 3: +2/-1
1807 diffstat--debug: 1: +1/-0
1807 diffstat--debug: 1: +1/-0
1808 diffstat--debug: 0: +0/-0
1808 diffstat--debug: 0: +0/-0
1809 diffstat--debug: 1: +1/-0
1809 diffstat--debug: 1: +1/-0
1810 diffstat--debug: 0: +0/-0
1810 diffstat--debug: 0: +0/-0
1811 diffstat--debug: 1: +1/-0
1811 diffstat--debug: 1: +1/-0
1812 diffstat--debug: 1: +4/-0
1812 diffstat--debug: 1: +4/-0
1813 diffstat--debug: 1: +2/-0
1813 diffstat--debug: 1: +2/-0
1814 diffstat--debug: 1: +1/-0
1814 diffstat--debug: 1: +1/-0
1815 extras: branch=default
1815 extras: branch=default
1816 extras: branch=default
1816 extras: branch=default
1817 extras: branch=default
1817 extras: branch=default
1818 extras: branch=default
1818 extras: branch=default
1819 extras: branch=foo
1819 extras: branch=foo
1820 extras: branch=default
1820 extras: branch=default
1821 extras: branch=default
1821 extras: branch=default
1822 extras: branch=default
1822 extras: branch=default
1823 extras: branch=default
1823 extras: branch=default
1824 extras--verbose: branch=default
1824 extras--verbose: branch=default
1825 extras--verbose: branch=default
1825 extras--verbose: branch=default
1826 extras--verbose: branch=default
1826 extras--verbose: branch=default
1827 extras--verbose: branch=default
1827 extras--verbose: branch=default
1828 extras--verbose: branch=foo
1828 extras--verbose: branch=foo
1829 extras--verbose: branch=default
1829 extras--verbose: branch=default
1830 extras--verbose: branch=default
1830 extras--verbose: branch=default
1831 extras--verbose: branch=default
1831 extras--verbose: branch=default
1832 extras--verbose: branch=default
1832 extras--verbose: branch=default
1833 extras--debug: branch=default
1833 extras--debug: branch=default
1834 extras--debug: branch=default
1834 extras--debug: branch=default
1835 extras--debug: branch=default
1835 extras--debug: branch=default
1836 extras--debug: branch=default
1836 extras--debug: branch=default
1837 extras--debug: branch=foo
1837 extras--debug: branch=foo
1838 extras--debug: branch=default
1838 extras--debug: branch=default
1839 extras--debug: branch=default
1839 extras--debug: branch=default
1840 extras--debug: branch=default
1840 extras--debug: branch=default
1841 extras--debug: branch=default
1841 extras--debug: branch=default
1842 p1rev: 7
1842 p1rev: 7
1843 p1rev: -1
1843 p1rev: -1
1844 p1rev: 5
1844 p1rev: 5
1845 p1rev: 3
1845 p1rev: 3
1846 p1rev: 3
1846 p1rev: 3
1847 p1rev: 2
1847 p1rev: 2
1848 p1rev: 1
1848 p1rev: 1
1849 p1rev: 0
1849 p1rev: 0
1850 p1rev: -1
1850 p1rev: -1
1851 p1rev--verbose: 7
1851 p1rev--verbose: 7
1852 p1rev--verbose: -1
1852 p1rev--verbose: -1
1853 p1rev--verbose: 5
1853 p1rev--verbose: 5
1854 p1rev--verbose: 3
1854 p1rev--verbose: 3
1855 p1rev--verbose: 3
1855 p1rev--verbose: 3
1856 p1rev--verbose: 2
1856 p1rev--verbose: 2
1857 p1rev--verbose: 1
1857 p1rev--verbose: 1
1858 p1rev--verbose: 0
1858 p1rev--verbose: 0
1859 p1rev--verbose: -1
1859 p1rev--verbose: -1
1860 p1rev--debug: 7
1860 p1rev--debug: 7
1861 p1rev--debug: -1
1861 p1rev--debug: -1
1862 p1rev--debug: 5
1862 p1rev--debug: 5
1863 p1rev--debug: 3
1863 p1rev--debug: 3
1864 p1rev--debug: 3
1864 p1rev--debug: 3
1865 p1rev--debug: 2
1865 p1rev--debug: 2
1866 p1rev--debug: 1
1866 p1rev--debug: 1
1867 p1rev--debug: 0
1867 p1rev--debug: 0
1868 p1rev--debug: -1
1868 p1rev--debug: -1
1869 p2rev: -1
1869 p2rev: -1
1870 p2rev: -1
1870 p2rev: -1
1871 p2rev: 4
1871 p2rev: 4
1872 p2rev: -1
1872 p2rev: -1
1873 p2rev: -1
1873 p2rev: -1
1874 p2rev: -1
1874 p2rev: -1
1875 p2rev: -1
1875 p2rev: -1
1876 p2rev: -1
1876 p2rev: -1
1877 p2rev: -1
1877 p2rev: -1
1878 p2rev--verbose: -1
1878 p2rev--verbose: -1
1879 p2rev--verbose: -1
1879 p2rev--verbose: -1
1880 p2rev--verbose: 4
1880 p2rev--verbose: 4
1881 p2rev--verbose: -1
1881 p2rev--verbose: -1
1882 p2rev--verbose: -1
1882 p2rev--verbose: -1
1883 p2rev--verbose: -1
1883 p2rev--verbose: -1
1884 p2rev--verbose: -1
1884 p2rev--verbose: -1
1885 p2rev--verbose: -1
1885 p2rev--verbose: -1
1886 p2rev--verbose: -1
1886 p2rev--verbose: -1
1887 p2rev--debug: -1
1887 p2rev--debug: -1
1888 p2rev--debug: -1
1888 p2rev--debug: -1
1889 p2rev--debug: 4
1889 p2rev--debug: 4
1890 p2rev--debug: -1
1890 p2rev--debug: -1
1891 p2rev--debug: -1
1891 p2rev--debug: -1
1892 p2rev--debug: -1
1892 p2rev--debug: -1
1893 p2rev--debug: -1
1893 p2rev--debug: -1
1894 p2rev--debug: -1
1894 p2rev--debug: -1
1895 p2rev--debug: -1
1895 p2rev--debug: -1
1896 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1896 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1897 p1node: 0000000000000000000000000000000000000000
1897 p1node: 0000000000000000000000000000000000000000
1898 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1898 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1899 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1899 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1900 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1900 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1901 p1node: 97054abb4ab824450e9164180baf491ae0078465
1901 p1node: 97054abb4ab824450e9164180baf491ae0078465
1902 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1902 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1903 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1903 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1904 p1node: 0000000000000000000000000000000000000000
1904 p1node: 0000000000000000000000000000000000000000
1905 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1905 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1906 p1node--verbose: 0000000000000000000000000000000000000000
1906 p1node--verbose: 0000000000000000000000000000000000000000
1907 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1907 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1908 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1908 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1909 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1909 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1910 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1910 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1911 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1911 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1912 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1912 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1913 p1node--verbose: 0000000000000000000000000000000000000000
1913 p1node--verbose: 0000000000000000000000000000000000000000
1914 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1914 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1915 p1node--debug: 0000000000000000000000000000000000000000
1915 p1node--debug: 0000000000000000000000000000000000000000
1916 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1916 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1917 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1917 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1918 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1918 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1919 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1919 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1920 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1920 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1921 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1921 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1922 p1node--debug: 0000000000000000000000000000000000000000
1922 p1node--debug: 0000000000000000000000000000000000000000
1923 p2node: 0000000000000000000000000000000000000000
1923 p2node: 0000000000000000000000000000000000000000
1924 p2node: 0000000000000000000000000000000000000000
1924 p2node: 0000000000000000000000000000000000000000
1925 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1925 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1926 p2node: 0000000000000000000000000000000000000000
1926 p2node: 0000000000000000000000000000000000000000
1927 p2node: 0000000000000000000000000000000000000000
1927 p2node: 0000000000000000000000000000000000000000
1928 p2node: 0000000000000000000000000000000000000000
1928 p2node: 0000000000000000000000000000000000000000
1929 p2node: 0000000000000000000000000000000000000000
1929 p2node: 0000000000000000000000000000000000000000
1930 p2node: 0000000000000000000000000000000000000000
1930 p2node: 0000000000000000000000000000000000000000
1931 p2node: 0000000000000000000000000000000000000000
1931 p2node: 0000000000000000000000000000000000000000
1932 p2node--verbose: 0000000000000000000000000000000000000000
1932 p2node--verbose: 0000000000000000000000000000000000000000
1933 p2node--verbose: 0000000000000000000000000000000000000000
1933 p2node--verbose: 0000000000000000000000000000000000000000
1934 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1934 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1935 p2node--verbose: 0000000000000000000000000000000000000000
1935 p2node--verbose: 0000000000000000000000000000000000000000
1936 p2node--verbose: 0000000000000000000000000000000000000000
1936 p2node--verbose: 0000000000000000000000000000000000000000
1937 p2node--verbose: 0000000000000000000000000000000000000000
1937 p2node--verbose: 0000000000000000000000000000000000000000
1938 p2node--verbose: 0000000000000000000000000000000000000000
1938 p2node--verbose: 0000000000000000000000000000000000000000
1939 p2node--verbose: 0000000000000000000000000000000000000000
1939 p2node--verbose: 0000000000000000000000000000000000000000
1940 p2node--verbose: 0000000000000000000000000000000000000000
1940 p2node--verbose: 0000000000000000000000000000000000000000
1941 p2node--debug: 0000000000000000000000000000000000000000
1941 p2node--debug: 0000000000000000000000000000000000000000
1942 p2node--debug: 0000000000000000000000000000000000000000
1942 p2node--debug: 0000000000000000000000000000000000000000
1943 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1943 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1944 p2node--debug: 0000000000000000000000000000000000000000
1944 p2node--debug: 0000000000000000000000000000000000000000
1945 p2node--debug: 0000000000000000000000000000000000000000
1945 p2node--debug: 0000000000000000000000000000000000000000
1946 p2node--debug: 0000000000000000000000000000000000000000
1946 p2node--debug: 0000000000000000000000000000000000000000
1947 p2node--debug: 0000000000000000000000000000000000000000
1947 p2node--debug: 0000000000000000000000000000000000000000
1948 p2node--debug: 0000000000000000000000000000000000000000
1948 p2node--debug: 0000000000000000000000000000000000000000
1949 p2node--debug: 0000000000000000000000000000000000000000
1949 p2node--debug: 0000000000000000000000000000000000000000
1950
1950
1951 Filters work:
1951 Filters work:
1952
1952
1953 $ hg log --template '{author|domain}\n'
1953 $ hg log --template '{author|domain}\n'
1954
1954
1955 hostname
1955 hostname
1956
1956
1957
1957
1958
1958
1959
1959
1960 place
1960 place
1961 place
1961 place
1962 hostname
1962 hostname
1963
1963
1964 $ hg log --template '{author|person}\n'
1964 $ hg log --template '{author|person}\n'
1965 test
1965 test
1966 User Name
1966 User Name
1967 person
1967 person
1968 person
1968 person
1969 person
1969 person
1970 person
1970 person
1971 other
1971 other
1972 A. N. Other
1972 A. N. Other
1973 User Name
1973 User Name
1974
1974
1975 $ hg log --template '{author|user}\n'
1975 $ hg log --template '{author|user}\n'
1976 test
1976 test
1977 user
1977 user
1978 person
1978 person
1979 person
1979 person
1980 person
1980 person
1981 person
1981 person
1982 other
1982 other
1983 other
1983 other
1984 user
1984 user
1985
1985
1986 $ hg log --template '{date|date}\n'
1986 $ hg log --template '{date|date}\n'
1987 Wed Jan 01 10:01:00 2020 +0000
1987 Wed Jan 01 10:01:00 2020 +0000
1988 Mon Jan 12 13:46:40 1970 +0000
1988 Mon Jan 12 13:46:40 1970 +0000
1989 Sun Jan 18 08:40:01 1970 +0000
1989 Sun Jan 18 08:40:01 1970 +0000
1990 Sun Jan 18 08:40:00 1970 +0000
1990 Sun Jan 18 08:40:00 1970 +0000
1991 Sat Jan 17 04:53:20 1970 +0000
1991 Sat Jan 17 04:53:20 1970 +0000
1992 Fri Jan 16 01:06:40 1970 +0000
1992 Fri Jan 16 01:06:40 1970 +0000
1993 Wed Jan 14 21:20:00 1970 +0000
1993 Wed Jan 14 21:20:00 1970 +0000
1994 Tue Jan 13 17:33:20 1970 +0000
1994 Tue Jan 13 17:33:20 1970 +0000
1995 Mon Jan 12 13:46:40 1970 +0000
1995 Mon Jan 12 13:46:40 1970 +0000
1996
1996
1997 $ hg log --template '{date|isodate}\n'
1997 $ hg log --template '{date|isodate}\n'
1998 2020-01-01 10:01 +0000
1998 2020-01-01 10:01 +0000
1999 1970-01-12 13:46 +0000
1999 1970-01-12 13:46 +0000
2000 1970-01-18 08:40 +0000
2000 1970-01-18 08:40 +0000
2001 1970-01-18 08:40 +0000
2001 1970-01-18 08:40 +0000
2002 1970-01-17 04:53 +0000
2002 1970-01-17 04:53 +0000
2003 1970-01-16 01:06 +0000
2003 1970-01-16 01:06 +0000
2004 1970-01-14 21:20 +0000
2004 1970-01-14 21:20 +0000
2005 1970-01-13 17:33 +0000
2005 1970-01-13 17:33 +0000
2006 1970-01-12 13:46 +0000
2006 1970-01-12 13:46 +0000
2007
2007
2008 $ hg log --template '{date|isodatesec}\n'
2008 $ hg log --template '{date|isodatesec}\n'
2009 2020-01-01 10:01:00 +0000
2009 2020-01-01 10:01:00 +0000
2010 1970-01-12 13:46:40 +0000
2010 1970-01-12 13:46:40 +0000
2011 1970-01-18 08:40:01 +0000
2011 1970-01-18 08:40:01 +0000
2012 1970-01-18 08:40:00 +0000
2012 1970-01-18 08:40:00 +0000
2013 1970-01-17 04:53:20 +0000
2013 1970-01-17 04:53:20 +0000
2014 1970-01-16 01:06:40 +0000
2014 1970-01-16 01:06:40 +0000
2015 1970-01-14 21:20:00 +0000
2015 1970-01-14 21:20:00 +0000
2016 1970-01-13 17:33:20 +0000
2016 1970-01-13 17:33:20 +0000
2017 1970-01-12 13:46:40 +0000
2017 1970-01-12 13:46:40 +0000
2018
2018
2019 $ hg log --template '{date|rfc822date}\n'
2019 $ hg log --template '{date|rfc822date}\n'
2020 Wed, 01 Jan 2020 10:01:00 +0000
2020 Wed, 01 Jan 2020 10:01:00 +0000
2021 Mon, 12 Jan 1970 13:46:40 +0000
2021 Mon, 12 Jan 1970 13:46:40 +0000
2022 Sun, 18 Jan 1970 08:40:01 +0000
2022 Sun, 18 Jan 1970 08:40:01 +0000
2023 Sun, 18 Jan 1970 08:40:00 +0000
2023 Sun, 18 Jan 1970 08:40:00 +0000
2024 Sat, 17 Jan 1970 04:53:20 +0000
2024 Sat, 17 Jan 1970 04:53:20 +0000
2025 Fri, 16 Jan 1970 01:06:40 +0000
2025 Fri, 16 Jan 1970 01:06:40 +0000
2026 Wed, 14 Jan 1970 21:20:00 +0000
2026 Wed, 14 Jan 1970 21:20:00 +0000
2027 Tue, 13 Jan 1970 17:33:20 +0000
2027 Tue, 13 Jan 1970 17:33:20 +0000
2028 Mon, 12 Jan 1970 13:46:40 +0000
2028 Mon, 12 Jan 1970 13:46:40 +0000
2029
2029
2030 $ hg log --template '{desc|firstline}\n'
2030 $ hg log --template '{desc|firstline}\n'
2031 third
2031 third
2032 second
2032 second
2033 merge
2033 merge
2034 new head
2034 new head
2035 new branch
2035 new branch
2036 no user, no domain
2036 no user, no domain
2037 no person
2037 no person
2038 other 1
2038 other 1
2039 line 1
2039 line 1
2040
2040
2041 $ hg log --template '{node|short}\n'
2041 $ hg log --template '{node|short}\n'
2042 95c24699272e
2042 95c24699272e
2043 29114dbae42b
2043 29114dbae42b
2044 d41e714fe50d
2044 d41e714fe50d
2045 13207e5a10d9
2045 13207e5a10d9
2046 bbe44766e73d
2046 bbe44766e73d
2047 10e46f2dcbf4
2047 10e46f2dcbf4
2048 97054abb4ab8
2048 97054abb4ab8
2049 b608e9d1a3f0
2049 b608e9d1a3f0
2050 1e4e1b8f71e0
2050 1e4e1b8f71e0
2051
2051
2052 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
2052 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
2053 <changeset author="test"/>
2053 <changeset author="test"/>
2054 <changeset author="User Name &lt;user@hostname&gt;"/>
2054 <changeset author="User Name &lt;user@hostname&gt;"/>
2055 <changeset author="person"/>
2055 <changeset author="person"/>
2056 <changeset author="person"/>
2056 <changeset author="person"/>
2057 <changeset author="person"/>
2057 <changeset author="person"/>
2058 <changeset author="person"/>
2058 <changeset author="person"/>
2059 <changeset author="other@place"/>
2059 <changeset author="other@place"/>
2060 <changeset author="A. N. Other &lt;other@place&gt;"/>
2060 <changeset author="A. N. Other &lt;other@place&gt;"/>
2061 <changeset author="User Name &lt;user@hostname&gt;"/>
2061 <changeset author="User Name &lt;user@hostname&gt;"/>
2062
2062
2063 $ hg log --template '{rev}: {children}\n'
2063 $ hg log --template '{rev}: {children}\n'
2064 8:
2064 8:
2065 7: 8:95c24699272e
2065 7: 8:95c24699272e
2066 6:
2066 6:
2067 5: 6:d41e714fe50d
2067 5: 6:d41e714fe50d
2068 4: 6:d41e714fe50d
2068 4: 6:d41e714fe50d
2069 3: 4:bbe44766e73d 5:13207e5a10d9
2069 3: 4:bbe44766e73d 5:13207e5a10d9
2070 2: 3:10e46f2dcbf4
2070 2: 3:10e46f2dcbf4
2071 1: 2:97054abb4ab8
2071 1: 2:97054abb4ab8
2072 0: 1:b608e9d1a3f0
2072 0: 1:b608e9d1a3f0
2073
2073
2074 Formatnode filter works:
2074 Formatnode filter works:
2075
2075
2076 $ hg -q log -r 0 --template '{node|formatnode}\n'
2076 $ hg -q log -r 0 --template '{node|formatnode}\n'
2077 1e4e1b8f71e0
2077 1e4e1b8f71e0
2078
2078
2079 $ hg log -r 0 --template '{node|formatnode}\n'
2079 $ hg log -r 0 --template '{node|formatnode}\n'
2080 1e4e1b8f71e0
2080 1e4e1b8f71e0
2081
2081
2082 $ hg -v log -r 0 --template '{node|formatnode}\n'
2082 $ hg -v log -r 0 --template '{node|formatnode}\n'
2083 1e4e1b8f71e0
2083 1e4e1b8f71e0
2084
2084
2085 $ hg --debug log -r 0 --template '{node|formatnode}\n'
2085 $ hg --debug log -r 0 --template '{node|formatnode}\n'
2086 1e4e1b8f71e05681d422154f5421e385fec3454f
2086 1e4e1b8f71e05681d422154f5421e385fec3454f
2087
2087
2088 Age filter:
2088 Age filter:
2089
2089
2090 $ hg init unstable-hash
2090 $ hg init unstable-hash
2091 $ cd unstable-hash
2091 $ cd unstable-hash
2092 $ hg log --template '{date|age}\n' > /dev/null || exit 1
2092 $ hg log --template '{date|age}\n' > /dev/null || exit 1
2093
2093
2094 >>> from datetime import datetime, timedelta
2094 >>> from datetime import datetime, timedelta
2095 >>> fp = open('a', 'w')
2095 >>> fp = open('a', 'w')
2096 >>> n = datetime.now() + timedelta(366 * 7)
2096 >>> n = datetime.now() + timedelta(366 * 7)
2097 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
2097 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
2098 >>> fp.close()
2098 >>> fp.close()
2099 $ hg add a
2099 $ hg add a
2100 $ hg commit -m future -d "`cat a`"
2100 $ hg commit -m future -d "`cat a`"
2101
2101
2102 $ hg log -l1 --template '{date|age}\n'
2102 $ hg log -l1 --template '{date|age}\n'
2103 7 years from now
2103 7 years from now
2104
2104
2105 $ cd ..
2105 $ cd ..
2106 $ rm -rf unstable-hash
2106 $ rm -rf unstable-hash
2107
2107
2108 Add a dummy commit to make up for the instability of the above:
2108 Add a dummy commit to make up for the instability of the above:
2109
2109
2110 $ echo a > a
2110 $ echo a > a
2111 $ hg add a
2111 $ hg add a
2112 $ hg ci -m future
2112 $ hg ci -m future
2113
2113
2114 Count filter:
2114 Count filter:
2115
2115
2116 $ hg log -l1 --template '{node|count} {node|short|count}\n'
2116 $ hg log -l1 --template '{node|count} {node|short|count}\n'
2117 40 12
2117 40 12
2118
2118
2119 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
2119 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
2120 0 1 4
2120 0 1 4
2121
2121
2122 $ hg log -G --template '{rev}: children: {children|count}, \
2122 $ hg log -G --template '{rev}: children: {children|count}, \
2123 > tags: {tags|count}, file_adds: {file_adds|count}, \
2123 > tags: {tags|count}, file_adds: {file_adds|count}, \
2124 > ancestors: {revset("ancestors(%s)", rev)|count}'
2124 > ancestors: {revset("ancestors(%s)", rev)|count}'
2125 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
2125 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
2126 |
2126 |
2127 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
2127 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
2128 |
2128 |
2129 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
2129 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
2130
2130
2131 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
2131 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
2132 |\
2132 |\
2133 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
2133 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
2134 | |
2134 | |
2135 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
2135 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
2136 |/
2136 |/
2137 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
2137 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
2138 |
2138 |
2139 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
2139 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
2140 |
2140 |
2141 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
2141 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
2142 |
2142 |
2143 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
2143 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
2144
2144
2145
2145
2146 Upper/lower filters:
2146 Upper/lower filters:
2147
2147
2148 $ hg log -r0 --template '{branch|upper}\n'
2148 $ hg log -r0 --template '{branch|upper}\n'
2149 DEFAULT
2149 DEFAULT
2150 $ hg log -r0 --template '{author|lower}\n'
2150 $ hg log -r0 --template '{author|lower}\n'
2151 user name <user@hostname>
2151 user name <user@hostname>
2152 $ hg log -r0 --template '{date|upper}\n'
2152 $ hg log -r0 --template '{date|upper}\n'
2153 abort: template filter 'upper' is not compatible with keyword 'date'
2153 abort: template filter 'upper' is not compatible with keyword 'date'
2154 [255]
2154 [255]
2155
2155
2156 Add a commit that does all possible modifications at once
2156 Add a commit that does all possible modifications at once
2157
2157
2158 $ echo modify >> third
2158 $ echo modify >> third
2159 $ touch b
2159 $ touch b
2160 $ hg add b
2160 $ hg add b
2161 $ hg mv fourth fifth
2161 $ hg mv fourth fifth
2162 $ hg rm a
2162 $ hg rm a
2163 $ hg ci -m "Modify, add, remove, rename"
2163 $ hg ci -m "Modify, add, remove, rename"
2164
2164
2165 Check the status template
2165 Check the status template
2166
2166
2167 $ cat <<EOF >> $HGRCPATH
2167 $ cat <<EOF >> $HGRCPATH
2168 > [extensions]
2168 > [extensions]
2169 > color=
2169 > color=
2170 > EOF
2170 > EOF
2171
2171
2172 $ hg log -T status -r 10
2172 $ hg log -T status -r 10
2173 changeset: 10:0f9759ec227a
2173 changeset: 10:0f9759ec227a
2174 tag: tip
2174 tag: tip
2175 user: test
2175 user: test
2176 date: Thu Jan 01 00:00:00 1970 +0000
2176 date: Thu Jan 01 00:00:00 1970 +0000
2177 summary: Modify, add, remove, rename
2177 summary: Modify, add, remove, rename
2178 files:
2178 files:
2179 M third
2179 M third
2180 A b
2180 A b
2181 A fifth
2181 A fifth
2182 R a
2182 R a
2183 R fourth
2183 R fourth
2184
2184
2185 $ hg log -T status -C -r 10
2185 $ hg log -T status -C -r 10
2186 changeset: 10:0f9759ec227a
2186 changeset: 10:0f9759ec227a
2187 tag: tip
2187 tag: tip
2188 user: test
2188 user: test
2189 date: Thu Jan 01 00:00:00 1970 +0000
2189 date: Thu Jan 01 00:00:00 1970 +0000
2190 summary: Modify, add, remove, rename
2190 summary: Modify, add, remove, rename
2191 files:
2191 files:
2192 M third
2192 M third
2193 A b
2193 A b
2194 A fifth
2194 A fifth
2195 fourth
2195 fourth
2196 R a
2196 R a
2197 R fourth
2197 R fourth
2198
2198
2199 $ hg log -T status -C -r 10 -v
2199 $ hg log -T status -C -r 10 -v
2200 changeset: 10:0f9759ec227a
2200 changeset: 10:0f9759ec227a
2201 tag: tip
2201 tag: tip
2202 user: test
2202 user: test
2203 date: Thu Jan 01 00:00:00 1970 +0000
2203 date: Thu Jan 01 00:00:00 1970 +0000
2204 description:
2204 description:
2205 Modify, add, remove, rename
2205 Modify, add, remove, rename
2206
2206
2207 files:
2207 files:
2208 M third
2208 M third
2209 A b
2209 A b
2210 A fifth
2210 A fifth
2211 fourth
2211 fourth
2212 R a
2212 R a
2213 R fourth
2213 R fourth
2214
2214
2215 $ hg log -T status -C -r 10 --debug
2215 $ hg log -T status -C -r 10 --debug
2216 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
2216 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
2217 tag: tip
2217 tag: tip
2218 phase: secret
2218 phase: secret
2219 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
2219 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
2220 parent: -1:0000000000000000000000000000000000000000
2220 parent: -1:0000000000000000000000000000000000000000
2221 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
2221 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
2222 user: test
2222 user: test
2223 date: Thu Jan 01 00:00:00 1970 +0000
2223 date: Thu Jan 01 00:00:00 1970 +0000
2224 extra: branch=default
2224 extra: branch=default
2225 description:
2225 description:
2226 Modify, add, remove, rename
2226 Modify, add, remove, rename
2227
2227
2228 files:
2228 files:
2229 M third
2229 M third
2230 A b
2230 A b
2231 A fifth
2231 A fifth
2232 fourth
2232 fourth
2233 R a
2233 R a
2234 R fourth
2234 R fourth
2235
2235
2236 $ hg log -T status -C -r 10 --quiet
2236 $ hg log -T status -C -r 10 --quiet
2237 10:0f9759ec227a
2237 10:0f9759ec227a
2238 $ hg --color=debug log -T status -r 10
2238 $ hg --color=debug log -T status -r 10
2239 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2239 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2240 [log.tag|tag: tip]
2240 [log.tag|tag: tip]
2241 [log.user|user: test]
2241 [log.user|user: test]
2242 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2242 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2243 [log.summary|summary: Modify, add, remove, rename]
2243 [log.summary|summary: Modify, add, remove, rename]
2244 [ui.note log.files|files:]
2244 [ui.note log.files|files:]
2245 [status.modified|M third]
2245 [status.modified|M third]
2246 [status.added|A b]
2246 [status.added|A b]
2247 [status.added|A fifth]
2247 [status.added|A fifth]
2248 [status.removed|R a]
2248 [status.removed|R a]
2249 [status.removed|R fourth]
2249 [status.removed|R fourth]
2250
2250
2251 $ hg --color=debug log -T status -C -r 10
2251 $ hg --color=debug log -T status -C -r 10
2252 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2252 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2253 [log.tag|tag: tip]
2253 [log.tag|tag: tip]
2254 [log.user|user: test]
2254 [log.user|user: test]
2255 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2255 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2256 [log.summary|summary: Modify, add, remove, rename]
2256 [log.summary|summary: Modify, add, remove, rename]
2257 [ui.note log.files|files:]
2257 [ui.note log.files|files:]
2258 [status.modified|M third]
2258 [status.modified|M third]
2259 [status.added|A b]
2259 [status.added|A b]
2260 [status.added|A fifth]
2260 [status.added|A fifth]
2261 [status.copied| fourth]
2261 [status.copied| fourth]
2262 [status.removed|R a]
2262 [status.removed|R a]
2263 [status.removed|R fourth]
2263 [status.removed|R fourth]
2264
2264
2265 $ hg --color=debug log -T status -C -r 10 -v
2265 $ hg --color=debug log -T status -C -r 10 -v
2266 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2266 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2267 [log.tag|tag: tip]
2267 [log.tag|tag: tip]
2268 [log.user|user: test]
2268 [log.user|user: test]
2269 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2269 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2270 [ui.note log.description|description:]
2270 [ui.note log.description|description:]
2271 [ui.note log.description|Modify, add, remove, rename]
2271 [ui.note log.description|Modify, add, remove, rename]
2272
2272
2273 [ui.note log.files|files:]
2273 [ui.note log.files|files:]
2274 [status.modified|M third]
2274 [status.modified|M third]
2275 [status.added|A b]
2275 [status.added|A b]
2276 [status.added|A fifth]
2276 [status.added|A fifth]
2277 [status.copied| fourth]
2277 [status.copied| fourth]
2278 [status.removed|R a]
2278 [status.removed|R a]
2279 [status.removed|R fourth]
2279 [status.removed|R fourth]
2280
2280
2281 $ hg --color=debug log -T status -C -r 10 --debug
2281 $ hg --color=debug log -T status -C -r 10 --debug
2282 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
2282 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
2283 [log.tag|tag: tip]
2283 [log.tag|tag: tip]
2284 [log.phase|phase: secret]
2284 [log.phase|phase: secret]
2285 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
2285 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
2286 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2286 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2287 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
2287 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
2288 [log.user|user: test]
2288 [log.user|user: test]
2289 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2289 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2290 [ui.debug log.extra|extra: branch=default]
2290 [ui.debug log.extra|extra: branch=default]
2291 [ui.note log.description|description:]
2291 [ui.note log.description|description:]
2292 [ui.note log.description|Modify, add, remove, rename]
2292 [ui.note log.description|Modify, add, remove, rename]
2293
2293
2294 [ui.note log.files|files:]
2294 [ui.note log.files|files:]
2295 [status.modified|M third]
2295 [status.modified|M third]
2296 [status.added|A b]
2296 [status.added|A b]
2297 [status.added|A fifth]
2297 [status.added|A fifth]
2298 [status.copied| fourth]
2298 [status.copied| fourth]
2299 [status.removed|R a]
2299 [status.removed|R a]
2300 [status.removed|R fourth]
2300 [status.removed|R fourth]
2301
2301
2302 $ hg --color=debug log -T status -C -r 10 --quiet
2302 $ hg --color=debug log -T status -C -r 10 --quiet
2303 [log.node|10:0f9759ec227a]
2303 [log.node|10:0f9759ec227a]
2304
2304
2305 Check the bisect template
2305 Check the bisect template
2306
2306
2307 $ hg bisect -g 1
2307 $ hg bisect -g 1
2308 $ hg bisect -b 3 --noupdate
2308 $ hg bisect -b 3 --noupdate
2309 Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
2309 Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
2310 $ hg log -T bisect -r 0:4
2310 $ hg log -T bisect -r 0:4
2311 changeset: 0:1e4e1b8f71e0
2311 changeset: 0:1e4e1b8f71e0
2312 bisect: good (implicit)
2312 bisect: good (implicit)
2313 user: User Name <user@hostname>
2313 user: User Name <user@hostname>
2314 date: Mon Jan 12 13:46:40 1970 +0000
2314 date: Mon Jan 12 13:46:40 1970 +0000
2315 summary: line 1
2315 summary: line 1
2316
2316
2317 changeset: 1:b608e9d1a3f0
2317 changeset: 1:b608e9d1a3f0
2318 bisect: good
2318 bisect: good
2319 user: A. N. Other <other@place>
2319 user: A. N. Other <other@place>
2320 date: Tue Jan 13 17:33:20 1970 +0000
2320 date: Tue Jan 13 17:33:20 1970 +0000
2321 summary: other 1
2321 summary: other 1
2322
2322
2323 changeset: 2:97054abb4ab8
2323 changeset: 2:97054abb4ab8
2324 bisect: untested
2324 bisect: untested
2325 user: other@place
2325 user: other@place
2326 date: Wed Jan 14 21:20:00 1970 +0000
2326 date: Wed Jan 14 21:20:00 1970 +0000
2327 summary: no person
2327 summary: no person
2328
2328
2329 changeset: 3:10e46f2dcbf4
2329 changeset: 3:10e46f2dcbf4
2330 bisect: bad
2330 bisect: bad
2331 user: person
2331 user: person
2332 date: Fri Jan 16 01:06:40 1970 +0000
2332 date: Fri Jan 16 01:06:40 1970 +0000
2333 summary: no user, no domain
2333 summary: no user, no domain
2334
2334
2335 changeset: 4:bbe44766e73d
2335 changeset: 4:bbe44766e73d
2336 bisect: bad (implicit)
2336 bisect: bad (implicit)
2337 branch: foo
2337 branch: foo
2338 user: person
2338 user: person
2339 date: Sat Jan 17 04:53:20 1970 +0000
2339 date: Sat Jan 17 04:53:20 1970 +0000
2340 summary: new branch
2340 summary: new branch
2341
2341
2342 $ hg log --debug -T bisect -r 0:4
2342 $ hg log --debug -T bisect -r 0:4
2343 changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2343 changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2344 bisect: good (implicit)
2344 bisect: good (implicit)
2345 phase: public
2345 phase: public
2346 parent: -1:0000000000000000000000000000000000000000
2346 parent: -1:0000000000000000000000000000000000000000
2347 parent: -1:0000000000000000000000000000000000000000
2347 parent: -1:0000000000000000000000000000000000000000
2348 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
2348 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
2349 user: User Name <user@hostname>
2349 user: User Name <user@hostname>
2350 date: Mon Jan 12 13:46:40 1970 +0000
2350 date: Mon Jan 12 13:46:40 1970 +0000
2351 files+: a
2351 files+: a
2352 extra: branch=default
2352 extra: branch=default
2353 description:
2353 description:
2354 line 1
2354 line 1
2355 line 2
2355 line 2
2356
2356
2357
2357
2358 changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2358 changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2359 bisect: good
2359 bisect: good
2360 phase: public
2360 phase: public
2361 parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2361 parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2362 parent: -1:0000000000000000000000000000000000000000
2362 parent: -1:0000000000000000000000000000000000000000
2363 manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
2363 manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
2364 user: A. N. Other <other@place>
2364 user: A. N. Other <other@place>
2365 date: Tue Jan 13 17:33:20 1970 +0000
2365 date: Tue Jan 13 17:33:20 1970 +0000
2366 files+: b
2366 files+: b
2367 extra: branch=default
2367 extra: branch=default
2368 description:
2368 description:
2369 other 1
2369 other 1
2370 other 2
2370 other 2
2371
2371
2372 other 3
2372 other 3
2373
2373
2374
2374
2375 changeset: 2:97054abb4ab824450e9164180baf491ae0078465
2375 changeset: 2:97054abb4ab824450e9164180baf491ae0078465
2376 bisect: untested
2376 bisect: untested
2377 phase: public
2377 phase: public
2378 parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2378 parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2379 parent: -1:0000000000000000000000000000000000000000
2379 parent: -1:0000000000000000000000000000000000000000
2380 manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
2380 manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
2381 user: other@place
2381 user: other@place
2382 date: Wed Jan 14 21:20:00 1970 +0000
2382 date: Wed Jan 14 21:20:00 1970 +0000
2383 files+: c
2383 files+: c
2384 extra: branch=default
2384 extra: branch=default
2385 description:
2385 description:
2386 no person
2386 no person
2387
2387
2388
2388
2389 changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2389 changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2390 bisect: bad
2390 bisect: bad
2391 phase: public
2391 phase: public
2392 parent: 2:97054abb4ab824450e9164180baf491ae0078465
2392 parent: 2:97054abb4ab824450e9164180baf491ae0078465
2393 parent: -1:0000000000000000000000000000000000000000
2393 parent: -1:0000000000000000000000000000000000000000
2394 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2394 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2395 user: person
2395 user: person
2396 date: Fri Jan 16 01:06:40 1970 +0000
2396 date: Fri Jan 16 01:06:40 1970 +0000
2397 files: c
2397 files: c
2398 extra: branch=default
2398 extra: branch=default
2399 description:
2399 description:
2400 no user, no domain
2400 no user, no domain
2401
2401
2402
2402
2403 changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
2403 changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
2404 bisect: bad (implicit)
2404 bisect: bad (implicit)
2405 branch: foo
2405 branch: foo
2406 phase: draft
2406 phase: draft
2407 parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2407 parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2408 parent: -1:0000000000000000000000000000000000000000
2408 parent: -1:0000000000000000000000000000000000000000
2409 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2409 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2410 user: person
2410 user: person
2411 date: Sat Jan 17 04:53:20 1970 +0000
2411 date: Sat Jan 17 04:53:20 1970 +0000
2412 extra: branch=foo
2412 extra: branch=foo
2413 description:
2413 description:
2414 new branch
2414 new branch
2415
2415
2416
2416
2417 $ hg log -v -T bisect -r 0:4
2417 $ hg log -v -T bisect -r 0:4
2418 changeset: 0:1e4e1b8f71e0
2418 changeset: 0:1e4e1b8f71e0
2419 bisect: good (implicit)
2419 bisect: good (implicit)
2420 user: User Name <user@hostname>
2420 user: User Name <user@hostname>
2421 date: Mon Jan 12 13:46:40 1970 +0000
2421 date: Mon Jan 12 13:46:40 1970 +0000
2422 files: a
2422 files: a
2423 description:
2423 description:
2424 line 1
2424 line 1
2425 line 2
2425 line 2
2426
2426
2427
2427
2428 changeset: 1:b608e9d1a3f0
2428 changeset: 1:b608e9d1a3f0
2429 bisect: good
2429 bisect: good
2430 user: A. N. Other <other@place>
2430 user: A. N. Other <other@place>
2431 date: Tue Jan 13 17:33:20 1970 +0000
2431 date: Tue Jan 13 17:33:20 1970 +0000
2432 files: b
2432 files: b
2433 description:
2433 description:
2434 other 1
2434 other 1
2435 other 2
2435 other 2
2436
2436
2437 other 3
2437 other 3
2438
2438
2439
2439
2440 changeset: 2:97054abb4ab8
2440 changeset: 2:97054abb4ab8
2441 bisect: untested
2441 bisect: untested
2442 user: other@place
2442 user: other@place
2443 date: Wed Jan 14 21:20:00 1970 +0000
2443 date: Wed Jan 14 21:20:00 1970 +0000
2444 files: c
2444 files: c
2445 description:
2445 description:
2446 no person
2446 no person
2447
2447
2448
2448
2449 changeset: 3:10e46f2dcbf4
2449 changeset: 3:10e46f2dcbf4
2450 bisect: bad
2450 bisect: bad
2451 user: person
2451 user: person
2452 date: Fri Jan 16 01:06:40 1970 +0000
2452 date: Fri Jan 16 01:06:40 1970 +0000
2453 files: c
2453 files: c
2454 description:
2454 description:
2455 no user, no domain
2455 no user, no domain
2456
2456
2457
2457
2458 changeset: 4:bbe44766e73d
2458 changeset: 4:bbe44766e73d
2459 bisect: bad (implicit)
2459 bisect: bad (implicit)
2460 branch: foo
2460 branch: foo
2461 user: person
2461 user: person
2462 date: Sat Jan 17 04:53:20 1970 +0000
2462 date: Sat Jan 17 04:53:20 1970 +0000
2463 description:
2463 description:
2464 new branch
2464 new branch
2465
2465
2466
2466
2467 $ hg --color=debug log -T bisect -r 0:4
2467 $ hg --color=debug log -T bisect -r 0:4
2468 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2468 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2469 [log.bisect bisect.good|bisect: good (implicit)]
2469 [log.bisect bisect.good|bisect: good (implicit)]
2470 [log.user|user: User Name <user@hostname>]
2470 [log.user|user: User Name <user@hostname>]
2471 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2471 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2472 [log.summary|summary: line 1]
2472 [log.summary|summary: line 1]
2473
2473
2474 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2474 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2475 [log.bisect bisect.good|bisect: good]
2475 [log.bisect bisect.good|bisect: good]
2476 [log.user|user: A. N. Other <other@place>]
2476 [log.user|user: A. N. Other <other@place>]
2477 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2477 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2478 [log.summary|summary: other 1]
2478 [log.summary|summary: other 1]
2479
2479
2480 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2480 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2481 [log.bisect bisect.untested|bisect: untested]
2481 [log.bisect bisect.untested|bisect: untested]
2482 [log.user|user: other@place]
2482 [log.user|user: other@place]
2483 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2483 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2484 [log.summary|summary: no person]
2484 [log.summary|summary: no person]
2485
2485
2486 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2486 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2487 [log.bisect bisect.bad|bisect: bad]
2487 [log.bisect bisect.bad|bisect: bad]
2488 [log.user|user: person]
2488 [log.user|user: person]
2489 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2489 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2490 [log.summary|summary: no user, no domain]
2490 [log.summary|summary: no user, no domain]
2491
2491
2492 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2492 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2493 [log.bisect bisect.bad|bisect: bad (implicit)]
2493 [log.bisect bisect.bad|bisect: bad (implicit)]
2494 [log.branch|branch: foo]
2494 [log.branch|branch: foo]
2495 [log.user|user: person]
2495 [log.user|user: person]
2496 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2496 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2497 [log.summary|summary: new branch]
2497 [log.summary|summary: new branch]
2498
2498
2499 $ hg --color=debug log --debug -T bisect -r 0:4
2499 $ hg --color=debug log --debug -T bisect -r 0:4
2500 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2500 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2501 [log.bisect bisect.good|bisect: good (implicit)]
2501 [log.bisect bisect.good|bisect: good (implicit)]
2502 [log.phase|phase: public]
2502 [log.phase|phase: public]
2503 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2503 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2504 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2504 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2505 [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
2505 [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
2506 [log.user|user: User Name <user@hostname>]
2506 [log.user|user: User Name <user@hostname>]
2507 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2507 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2508 [ui.debug log.files|files+: a]
2508 [ui.debug log.files|files+: a]
2509 [ui.debug log.extra|extra: branch=default]
2509 [ui.debug log.extra|extra: branch=default]
2510 [ui.note log.description|description:]
2510 [ui.note log.description|description:]
2511 [ui.note log.description|line 1
2511 [ui.note log.description|line 1
2512 line 2]
2512 line 2]
2513
2513
2514
2514
2515 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2515 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2516 [log.bisect bisect.good|bisect: good]
2516 [log.bisect bisect.good|bisect: good]
2517 [log.phase|phase: public]
2517 [log.phase|phase: public]
2518 [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2518 [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2519 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2519 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2520 [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
2520 [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
2521 [log.user|user: A. N. Other <other@place>]
2521 [log.user|user: A. N. Other <other@place>]
2522 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2522 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2523 [ui.debug log.files|files+: b]
2523 [ui.debug log.files|files+: b]
2524 [ui.debug log.extra|extra: branch=default]
2524 [ui.debug log.extra|extra: branch=default]
2525 [ui.note log.description|description:]
2525 [ui.note log.description|description:]
2526 [ui.note log.description|other 1
2526 [ui.note log.description|other 1
2527 other 2
2527 other 2
2528
2528
2529 other 3]
2529 other 3]
2530
2530
2531
2531
2532 [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465]
2532 [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465]
2533 [log.bisect bisect.untested|bisect: untested]
2533 [log.bisect bisect.untested|bisect: untested]
2534 [log.phase|phase: public]
2534 [log.phase|phase: public]
2535 [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2535 [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2536 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2536 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2537 [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
2537 [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
2538 [log.user|user: other@place]
2538 [log.user|user: other@place]
2539 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2539 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2540 [ui.debug log.files|files+: c]
2540 [ui.debug log.files|files+: c]
2541 [ui.debug log.extra|extra: branch=default]
2541 [ui.debug log.extra|extra: branch=default]
2542 [ui.note log.description|description:]
2542 [ui.note log.description|description:]
2543 [ui.note log.description|no person]
2543 [ui.note log.description|no person]
2544
2544
2545
2545
2546 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2546 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2547 [log.bisect bisect.bad|bisect: bad]
2547 [log.bisect bisect.bad|bisect: bad]
2548 [log.phase|phase: public]
2548 [log.phase|phase: public]
2549 [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465]
2549 [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465]
2550 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2550 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2551 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2551 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2552 [log.user|user: person]
2552 [log.user|user: person]
2553 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2553 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2554 [ui.debug log.files|files: c]
2554 [ui.debug log.files|files: c]
2555 [ui.debug log.extra|extra: branch=default]
2555 [ui.debug log.extra|extra: branch=default]
2556 [ui.note log.description|description:]
2556 [ui.note log.description|description:]
2557 [ui.note log.description|no user, no domain]
2557 [ui.note log.description|no user, no domain]
2558
2558
2559
2559
2560 [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
2560 [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
2561 [log.bisect bisect.bad|bisect: bad (implicit)]
2561 [log.bisect bisect.bad|bisect: bad (implicit)]
2562 [log.branch|branch: foo]
2562 [log.branch|branch: foo]
2563 [log.phase|phase: draft]
2563 [log.phase|phase: draft]
2564 [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2564 [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2565 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2565 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2566 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2566 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2567 [log.user|user: person]
2567 [log.user|user: person]
2568 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2568 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2569 [ui.debug log.extra|extra: branch=foo]
2569 [ui.debug log.extra|extra: branch=foo]
2570 [ui.note log.description|description:]
2570 [ui.note log.description|description:]
2571 [ui.note log.description|new branch]
2571 [ui.note log.description|new branch]
2572
2572
2573
2573
2574 $ hg --color=debug log -v -T bisect -r 0:4
2574 $ hg --color=debug log -v -T bisect -r 0:4
2575 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2575 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2576 [log.bisect bisect.good|bisect: good (implicit)]
2576 [log.bisect bisect.good|bisect: good (implicit)]
2577 [log.user|user: User Name <user@hostname>]
2577 [log.user|user: User Name <user@hostname>]
2578 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2578 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2579 [ui.note log.files|files: a]
2579 [ui.note log.files|files: a]
2580 [ui.note log.description|description:]
2580 [ui.note log.description|description:]
2581 [ui.note log.description|line 1
2581 [ui.note log.description|line 1
2582 line 2]
2582 line 2]
2583
2583
2584
2584
2585 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2585 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2586 [log.bisect bisect.good|bisect: good]
2586 [log.bisect bisect.good|bisect: good]
2587 [log.user|user: A. N. Other <other@place>]
2587 [log.user|user: A. N. Other <other@place>]
2588 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2588 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2589 [ui.note log.files|files: b]
2589 [ui.note log.files|files: b]
2590 [ui.note log.description|description:]
2590 [ui.note log.description|description:]
2591 [ui.note log.description|other 1
2591 [ui.note log.description|other 1
2592 other 2
2592 other 2
2593
2593
2594 other 3]
2594 other 3]
2595
2595
2596
2596
2597 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2597 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2598 [log.bisect bisect.untested|bisect: untested]
2598 [log.bisect bisect.untested|bisect: untested]
2599 [log.user|user: other@place]
2599 [log.user|user: other@place]
2600 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2600 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2601 [ui.note log.files|files: c]
2601 [ui.note log.files|files: c]
2602 [ui.note log.description|description:]
2602 [ui.note log.description|description:]
2603 [ui.note log.description|no person]
2603 [ui.note log.description|no person]
2604
2604
2605
2605
2606 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2606 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2607 [log.bisect bisect.bad|bisect: bad]
2607 [log.bisect bisect.bad|bisect: bad]
2608 [log.user|user: person]
2608 [log.user|user: person]
2609 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2609 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2610 [ui.note log.files|files: c]
2610 [ui.note log.files|files: c]
2611 [ui.note log.description|description:]
2611 [ui.note log.description|description:]
2612 [ui.note log.description|no user, no domain]
2612 [ui.note log.description|no user, no domain]
2613
2613
2614
2614
2615 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2615 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2616 [log.bisect bisect.bad|bisect: bad (implicit)]
2616 [log.bisect bisect.bad|bisect: bad (implicit)]
2617 [log.branch|branch: foo]
2617 [log.branch|branch: foo]
2618 [log.user|user: person]
2618 [log.user|user: person]
2619 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2619 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2620 [ui.note log.description|description:]
2620 [ui.note log.description|description:]
2621 [ui.note log.description|new branch]
2621 [ui.note log.description|new branch]
2622
2622
2623
2623
2624 $ hg bisect --reset
2624 $ hg bisect --reset
2625
2625
2626 Error on syntax:
2626 Error on syntax:
2627
2627
2628 $ echo 'x = "f' >> t
2628 $ echo 'x = "f' >> t
2629 $ hg log
2629 $ hg log
2630 hg: parse error at t:3: unmatched quotes
2630 hg: parse error at t:3: unmatched quotes
2631 [255]
2631 [255]
2632
2632
2633 $ hg log -T '{date'
2633 $ hg log -T '{date'
2634 hg: parse error at 1: unterminated template expansion
2634 hg: parse error at 1: unterminated template expansion
2635 [255]
2635 [255]
2636
2636
2637 Behind the scenes, this will throw TypeError
2637 Behind the scenes, this will throw TypeError
2638
2638
2639 $ hg log -l 3 --template '{date|obfuscate}\n'
2639 $ hg log -l 3 --template '{date|obfuscate}\n'
2640 abort: template filter 'obfuscate' is not compatible with keyword 'date'
2640 abort: template filter 'obfuscate' is not compatible with keyword 'date'
2641 [255]
2641 [255]
2642
2642
2643 Behind the scenes, this will throw a ValueError
2643 Behind the scenes, this will throw a ValueError
2644
2644
2645 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
2645 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
2646 abort: template filter 'shortdate' is not compatible with keyword 'desc'
2646 abort: template filter 'shortdate' is not compatible with keyword 'desc'
2647 [255]
2647 [255]
2648
2648
2649 Behind the scenes, this will throw AttributeError
2649 Behind the scenes, this will throw AttributeError
2650
2650
2651 $ hg log -l 3 --template 'line: {date|escape}\n'
2651 $ hg log -l 3 --template 'line: {date|escape}\n'
2652 abort: template filter 'escape' is not compatible with keyword 'date'
2652 abort: template filter 'escape' is not compatible with keyword 'date'
2653 [255]
2653 [255]
2654
2654
2655 $ hg log -l 3 --template 'line: {extras|localdate}\n'
2655 $ hg log -l 3 --template 'line: {extras|localdate}\n'
2656 hg: parse error: localdate expects a date information
2656 hg: parse error: localdate expects a date information
2657 [255]
2657 [255]
2658
2658
2659 Behind the scenes, this will throw ValueError
2659 Behind the scenes, this will throw ValueError
2660
2660
2661 $ hg tip --template '{author|email|date}\n'
2661 $ hg tip --template '{author|email|date}\n'
2662 hg: parse error: date expects a date information
2662 hg: parse error: date expects a date information
2663 [255]
2663 [255]
2664
2664
2665 Error in nested template:
2665 Error in nested template:
2666
2666
2667 $ hg log -T '{"date'
2667 $ hg log -T '{"date'
2668 hg: parse error at 2: unterminated string
2668 hg: parse error at 2: unterminated string
2669 [255]
2669 [255]
2670
2670
2671 $ hg log -T '{"foo{date|=}"}'
2671 $ hg log -T '{"foo{date|=}"}'
2672 hg: parse error at 11: syntax error
2672 hg: parse error at 11: syntax error
2673 [255]
2673 [255]
2674
2674
2675 Thrown an error if a template function doesn't exist
2675 Thrown an error if a template function doesn't exist
2676
2676
2677 $ hg tip --template '{foo()}\n'
2677 $ hg tip --template '{foo()}\n'
2678 hg: parse error: unknown function 'foo'
2678 hg: parse error: unknown function 'foo'
2679 [255]
2679 [255]
2680
2680
2681 Pass generator object created by template function to filter
2681 Pass generator object created by template function to filter
2682
2682
2683 $ hg log -l 1 --template '{if(author, author)|user}\n'
2683 $ hg log -l 1 --template '{if(author, author)|user}\n'
2684 test
2684 test
2685
2685
2686 Test diff function:
2686 Test diff function:
2687
2687
2688 $ hg diff -c 8
2688 $ hg diff -c 8
2689 diff -r 29114dbae42b -r 95c24699272e fourth
2689 diff -r 29114dbae42b -r 95c24699272e fourth
2690 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2690 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2691 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2691 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2692 @@ -0,0 +1,1 @@
2692 @@ -0,0 +1,1 @@
2693 +second
2693 +second
2694 diff -r 29114dbae42b -r 95c24699272e second
2694 diff -r 29114dbae42b -r 95c24699272e second
2695 --- a/second Mon Jan 12 13:46:40 1970 +0000
2695 --- a/second Mon Jan 12 13:46:40 1970 +0000
2696 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2696 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2697 @@ -1,1 +0,0 @@
2697 @@ -1,1 +0,0 @@
2698 -second
2698 -second
2699 diff -r 29114dbae42b -r 95c24699272e third
2699 diff -r 29114dbae42b -r 95c24699272e third
2700 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2700 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2701 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2701 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2702 @@ -0,0 +1,1 @@
2702 @@ -0,0 +1,1 @@
2703 +third
2703 +third
2704
2704
2705 $ hg log -r 8 -T "{diff()}"
2705 $ hg log -r 8 -T "{diff()}"
2706 diff -r 29114dbae42b -r 95c24699272e fourth
2706 diff -r 29114dbae42b -r 95c24699272e fourth
2707 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2707 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2708 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2708 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2709 @@ -0,0 +1,1 @@
2709 @@ -0,0 +1,1 @@
2710 +second
2710 +second
2711 diff -r 29114dbae42b -r 95c24699272e second
2711 diff -r 29114dbae42b -r 95c24699272e second
2712 --- a/second Mon Jan 12 13:46:40 1970 +0000
2712 --- a/second Mon Jan 12 13:46:40 1970 +0000
2713 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2713 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2714 @@ -1,1 +0,0 @@
2714 @@ -1,1 +0,0 @@
2715 -second
2715 -second
2716 diff -r 29114dbae42b -r 95c24699272e third
2716 diff -r 29114dbae42b -r 95c24699272e third
2717 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2717 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2718 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2718 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2719 @@ -0,0 +1,1 @@
2719 @@ -0,0 +1,1 @@
2720 +third
2720 +third
2721
2721
2722 $ hg log -r 8 -T "{diff('glob:f*')}"
2722 $ hg log -r 8 -T "{diff('glob:f*')}"
2723 diff -r 29114dbae42b -r 95c24699272e fourth
2723 diff -r 29114dbae42b -r 95c24699272e fourth
2724 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2724 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2725 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2725 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2726 @@ -0,0 +1,1 @@
2726 @@ -0,0 +1,1 @@
2727 +second
2727 +second
2728
2728
2729 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
2729 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
2730 diff -r 29114dbae42b -r 95c24699272e second
2730 diff -r 29114dbae42b -r 95c24699272e second
2731 --- a/second Mon Jan 12 13:46:40 1970 +0000
2731 --- a/second Mon Jan 12 13:46:40 1970 +0000
2732 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2732 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2733 @@ -1,1 +0,0 @@
2733 @@ -1,1 +0,0 @@
2734 -second
2734 -second
2735 diff -r 29114dbae42b -r 95c24699272e third
2735 diff -r 29114dbae42b -r 95c24699272e third
2736 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2736 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2737 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2737 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2738 @@ -0,0 +1,1 @@
2738 @@ -0,0 +1,1 @@
2739 +third
2739 +third
2740
2740
2741 $ hg log -r 8 -T "{diff('FOURTH'|lower)}"
2741 $ hg log -r 8 -T "{diff('FOURTH'|lower)}"
2742 diff -r 29114dbae42b -r 95c24699272e fourth
2742 diff -r 29114dbae42b -r 95c24699272e fourth
2743 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2743 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2744 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2744 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2745 @@ -0,0 +1,1 @@
2745 @@ -0,0 +1,1 @@
2746 +second
2746 +second
2747
2747
2748 $ cd ..
2748 $ cd ..
2749
2749
2750
2750
2751 latesttag:
2751 latesttag:
2752
2752
2753 $ hg init latesttag
2753 $ hg init latesttag
2754 $ cd latesttag
2754 $ cd latesttag
2755
2755
2756 $ echo a > file
2756 $ echo a > file
2757 $ hg ci -Am a -d '0 0'
2757 $ hg ci -Am a -d '0 0'
2758 adding file
2758 adding file
2759
2759
2760 $ echo b >> file
2760 $ echo b >> file
2761 $ hg ci -m b -d '1 0'
2761 $ hg ci -m b -d '1 0'
2762
2762
2763 $ echo c >> head1
2763 $ echo c >> head1
2764 $ hg ci -Am h1c -d '2 0'
2764 $ hg ci -Am h1c -d '2 0'
2765 adding head1
2765 adding head1
2766
2766
2767 $ hg update -q 1
2767 $ hg update -q 1
2768 $ echo d >> head2
2768 $ echo d >> head2
2769 $ hg ci -Am h2d -d '3 0'
2769 $ hg ci -Am h2d -d '3 0'
2770 adding head2
2770 adding head2
2771 created new head
2771 created new head
2772
2772
2773 $ echo e >> head2
2773 $ echo e >> head2
2774 $ hg ci -m h2e -d '4 0'
2774 $ hg ci -m h2e -d '4 0'
2775
2775
2776 $ hg merge -q
2776 $ hg merge -q
2777 $ hg ci -m merge -d '5 -3600'
2777 $ hg ci -m merge -d '5 -3600'
2778
2778
2779 No tag set:
2779 No tag set:
2780
2780
2781 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2781 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2782 5: null+5
2782 5: null+5
2783 4: null+4
2783 4: null+4
2784 3: null+3
2784 3: null+3
2785 2: null+3
2785 2: null+3
2786 1: null+2
2786 1: null+2
2787 0: null+1
2787 0: null+1
2788
2788
2789 One common tag: longest path wins:
2789 One common tag: longest path wins:
2790
2790
2791 $ hg tag -r 1 -m t1 -d '6 0' t1
2791 $ hg tag -r 1 -m t1 -d '6 0' t1
2792 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2792 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2793 6: t1+4
2793 6: t1+4
2794 5: t1+3
2794 5: t1+3
2795 4: t1+2
2795 4: t1+2
2796 3: t1+1
2796 3: t1+1
2797 2: t1+1
2797 2: t1+1
2798 1: t1+0
2798 1: t1+0
2799 0: null+1
2799 0: null+1
2800
2800
2801 One ancestor tag: more recent wins:
2801 One ancestor tag: more recent wins:
2802
2802
2803 $ hg tag -r 2 -m t2 -d '7 0' t2
2803 $ hg tag -r 2 -m t2 -d '7 0' t2
2804 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2804 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2805 7: t2+3
2805 7: t2+3
2806 6: t2+2
2806 6: t2+2
2807 5: t2+1
2807 5: t2+1
2808 4: t1+2
2808 4: t1+2
2809 3: t1+1
2809 3: t1+1
2810 2: t2+0
2810 2: t2+0
2811 1: t1+0
2811 1: t1+0
2812 0: null+1
2812 0: null+1
2813
2813
2814 Two branch tags: more recent wins:
2814 Two branch tags: more recent wins:
2815
2815
2816 $ hg tag -r 3 -m t3 -d '8 0' t3
2816 $ hg tag -r 3 -m t3 -d '8 0' t3
2817 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2817 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2818 8: t3+5
2818 8: t3+5
2819 7: t3+4
2819 7: t3+4
2820 6: t3+3
2820 6: t3+3
2821 5: t3+2
2821 5: t3+2
2822 4: t3+1
2822 4: t3+1
2823 3: t3+0
2823 3: t3+0
2824 2: t2+0
2824 2: t2+0
2825 1: t1+0
2825 1: t1+0
2826 0: null+1
2826 0: null+1
2827
2827
2828 Merged tag overrides:
2828 Merged tag overrides:
2829
2829
2830 $ hg tag -r 5 -m t5 -d '9 0' t5
2830 $ hg tag -r 5 -m t5 -d '9 0' t5
2831 $ hg tag -r 3 -m at3 -d '10 0' at3
2831 $ hg tag -r 3 -m at3 -d '10 0' at3
2832 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2832 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2833 10: t5+5
2833 10: t5+5
2834 9: t5+4
2834 9: t5+4
2835 8: t5+3
2835 8: t5+3
2836 7: t5+2
2836 7: t5+2
2837 6: t5+1
2837 6: t5+1
2838 5: t5+0
2838 5: t5+0
2839 4: at3:t3+1
2839 4: at3:t3+1
2840 3: at3:t3+0
2840 3: at3:t3+0
2841 2: t2+0
2841 2: t2+0
2842 1: t1+0
2842 1: t1+0
2843 0: null+1
2843 0: null+1
2844
2844
2845 $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
2845 $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
2846 10: t5+5,5
2846 10: t5+5,5
2847 9: t5+4,4
2847 9: t5+4,4
2848 8: t5+3,3
2848 8: t5+3,3
2849 7: t5+2,2
2849 7: t5+2,2
2850 6: t5+1,1
2850 6: t5+1,1
2851 5: t5+0,0
2851 5: t5+0,0
2852 4: at3+1,1 t3+1,1
2852 4: at3+1,1 t3+1,1
2853 3: at3+0,0 t3+0,0
2853 3: at3+0,0 t3+0,0
2854 2: t2+0,0
2854 2: t2+0,0
2855 1: t1+0,0
2855 1: t1+0,0
2856 0: null+1,1
2856 0: null+1,1
2857
2857
2858 $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n"
2858 $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n"
2859 10: t3, C: 8, D: 7
2859 10: t3, C: 8, D: 7
2860 9: t3, C: 7, D: 6
2860 9: t3, C: 7, D: 6
2861 8: t3, C: 6, D: 5
2861 8: t3, C: 6, D: 5
2862 7: t3, C: 5, D: 4
2862 7: t3, C: 5, D: 4
2863 6: t3, C: 4, D: 3
2863 6: t3, C: 4, D: 3
2864 5: t3, C: 3, D: 2
2864 5: t3, C: 3, D: 2
2865 4: t3, C: 1, D: 1
2865 4: t3, C: 1, D: 1
2866 3: t3, C: 0, D: 0
2866 3: t3, C: 0, D: 0
2867 2: t1, C: 1, D: 1
2867 2: t1, C: 1, D: 1
2868 1: t1, C: 0, D: 0
2868 1: t1, C: 0, D: 0
2869 0: null, C: 1, D: 1
2869 0: null, C: 1, D: 1
2870
2870
2871 $ cd ..
2871 $ cd ..
2872
2872
2873
2873
2874 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2874 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2875 if it is a relative path
2875 if it is a relative path
2876
2876
2877 $ mkdir -p home/styles
2877 $ mkdir -p home/styles
2878
2878
2879 $ cat > home/styles/teststyle <<EOF
2879 $ cat > home/styles/teststyle <<EOF
2880 > changeset = 'test {rev}:{node|short}\n'
2880 > changeset = 'test {rev}:{node|short}\n'
2881 > EOF
2881 > EOF
2882
2882
2883 $ HOME=`pwd`/home; export HOME
2883 $ HOME=`pwd`/home; export HOME
2884
2884
2885 $ cat > latesttag/.hg/hgrc <<EOF
2885 $ cat > latesttag/.hg/hgrc <<EOF
2886 > [ui]
2886 > [ui]
2887 > style = ~/styles/teststyle
2887 > style = ~/styles/teststyle
2888 > EOF
2888 > EOF
2889
2889
2890 $ hg -R latesttag tip
2890 $ hg -R latesttag tip
2891 test 10:9b4a630e5f5f
2891 test 10:9b4a630e5f5f
2892
2892
2893 Test recursive showlist template (issue1989):
2893 Test recursive showlist template (issue1989):
2894
2894
2895 $ cat > style1989 <<EOF
2895 $ cat > style1989 <<EOF
2896 > changeset = '{file_mods}{manifest}{extras}'
2896 > changeset = '{file_mods}{manifest}{extras}'
2897 > file_mod = 'M|{author|person}\n'
2897 > file_mod = 'M|{author|person}\n'
2898 > manifest = '{rev},{author}\n'
2898 > manifest = '{rev},{author}\n'
2899 > extra = '{key}: {author}\n'
2899 > extra = '{key}: {author}\n'
2900 > EOF
2900 > EOF
2901
2901
2902 $ hg -R latesttag log -r tip --style=style1989
2902 $ hg -R latesttag log -r tip --style=style1989
2903 M|test
2903 M|test
2904 10,test
2904 10,test
2905 branch: test
2905 branch: test
2906
2906
2907 Test new-style inline templating:
2907 Test new-style inline templating:
2908
2908
2909 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2909 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2910 modified files: .hgtags
2910 modified files: .hgtags
2911
2911
2912
2912
2913 $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
2913 $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
2914 hg: parse error: keyword 'rev' is not iterable
2914 hg: parse error: keyword 'rev' is not iterable
2915 [255]
2915 [255]
2916 $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
2916 $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
2917 hg: parse error: None is not iterable
2917 hg: parse error: None is not iterable
2918 [255]
2918 [255]
2919
2919
2920 Test the sub function of templating for expansion:
2920 Test the sub function of templating for expansion:
2921
2921
2922 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2922 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2923 xx
2923 xx
2924
2924
2925 $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n'
2925 $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n'
2926 hg: parse error: sub got an invalid pattern: [
2926 hg: parse error: sub got an invalid pattern: [
2927 [255]
2927 [255]
2928 $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n'
2928 $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n'
2929 hg: parse error: sub got an invalid replacement: \1
2929 hg: parse error: sub got an invalid replacement: \1
2930 [255]
2930 [255]
2931
2931
2932 Test the strip function with chars specified:
2932 Test the strip function with chars specified:
2933
2933
2934 $ hg log -R latesttag --template '{desc}\n'
2934 $ hg log -R latesttag --template '{desc}\n'
2935 at3
2935 at3
2936 t5
2936 t5
2937 t3
2937 t3
2938 t2
2938 t2
2939 t1
2939 t1
2940 merge
2940 merge
2941 h2e
2941 h2e
2942 h2d
2942 h2d
2943 h1c
2943 h1c
2944 b
2944 b
2945 a
2945 a
2946
2946
2947 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2947 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2948 at3
2948 at3
2949 5
2949 5
2950 3
2950 3
2951 2
2951 2
2952 1
2952 1
2953 merg
2953 merg
2954 h2
2954 h2
2955 h2d
2955 h2d
2956 h1c
2956 h1c
2957 b
2957 b
2958 a
2958 a
2959
2959
2960 Test date format:
2960 Test date format:
2961
2961
2962 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2962 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2963 date: 70 01 01 10 +0000
2963 date: 70 01 01 10 +0000
2964 date: 70 01 01 09 +0000
2964 date: 70 01 01 09 +0000
2965 date: 70 01 01 08 +0000
2965 date: 70 01 01 08 +0000
2966 date: 70 01 01 07 +0000
2966 date: 70 01 01 07 +0000
2967 date: 70 01 01 06 +0000
2967 date: 70 01 01 06 +0000
2968 date: 70 01 01 05 +0100
2968 date: 70 01 01 05 +0100
2969 date: 70 01 01 04 +0000
2969 date: 70 01 01 04 +0000
2970 date: 70 01 01 03 +0000
2970 date: 70 01 01 03 +0000
2971 date: 70 01 01 02 +0000
2971 date: 70 01 01 02 +0000
2972 date: 70 01 01 01 +0000
2972 date: 70 01 01 01 +0000
2973 date: 70 01 01 00 +0000
2973 date: 70 01 01 00 +0000
2974
2974
2975 Test invalid date:
2975 Test invalid date:
2976
2976
2977 $ hg log -R latesttag -T '{date(rev)}\n'
2977 $ hg log -R latesttag -T '{date(rev)}\n'
2978 hg: parse error: date expects a date information
2978 hg: parse error: date expects a date information
2979 [255]
2979 [255]
2980
2980
2981 Test integer literal:
2981 Test integer literal:
2982
2982
2983 $ hg debugtemplate -v '{(0)}\n'
2983 $ hg debugtemplate -v '{(0)}\n'
2984 (template
2984 (template
2985 (group
2985 (group
2986 ('integer', '0'))
2986 ('integer', '0'))
2987 ('string', '\n'))
2987 ('string', '\n'))
2988 0
2988 0
2989 $ hg debugtemplate -v '{(123)}\n'
2989 $ hg debugtemplate -v '{(123)}\n'
2990 (template
2990 (template
2991 (group
2991 (group
2992 ('integer', '123'))
2992 ('integer', '123'))
2993 ('string', '\n'))
2993 ('string', '\n'))
2994 123
2994 123
2995 $ hg debugtemplate -v '{(-4)}\n'
2995 $ hg debugtemplate -v '{(-4)}\n'
2996 (template
2996 (template
2997 (group
2997 (group
2998 (negate
2998 (negate
2999 ('integer', '4')))
2999 ('integer', '4')))
3000 ('string', '\n'))
3000 ('string', '\n'))
3001 -4
3001 -4
3002 $ hg debugtemplate '{(-)}\n'
3002 $ hg debugtemplate '{(-)}\n'
3003 hg: parse error at 3: not a prefix: )
3003 hg: parse error at 3: not a prefix: )
3004 [255]
3004 [255]
3005 $ hg debugtemplate '{(-a)}\n'
3005 $ hg debugtemplate '{(-a)}\n'
3006 hg: parse error: negation needs an integer argument
3006 hg: parse error: negation needs an integer argument
3007 [255]
3007 [255]
3008
3008
3009 top-level integer literal is interpreted as symbol (i.e. variable name):
3009 top-level integer literal is interpreted as symbol (i.e. variable name):
3010
3010
3011 $ hg debugtemplate -D 1=one -v '{1}\n'
3011 $ hg debugtemplate -D 1=one -v '{1}\n'
3012 (template
3012 (template
3013 ('integer', '1')
3013 ('integer', '1')
3014 ('string', '\n'))
3014 ('string', '\n'))
3015 one
3015 one
3016 $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n'
3016 $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n'
3017 (template
3017 (template
3018 (func
3018 (func
3019 ('symbol', 'if')
3019 ('symbol', 'if')
3020 (list
3020 (list
3021 ('string', 't')
3021 ('string', 't')
3022 (template
3022 (template
3023 ('integer', '1'))))
3023 ('integer', '1'))))
3024 ('string', '\n'))
3024 ('string', '\n'))
3025 one
3025 one
3026 $ hg debugtemplate -D 1=one -v '{1|stringify}\n'
3026 $ hg debugtemplate -D 1=one -v '{1|stringify}\n'
3027 (template
3027 (template
3028 (|
3028 (|
3029 ('integer', '1')
3029 ('integer', '1')
3030 ('symbol', 'stringify'))
3030 ('symbol', 'stringify'))
3031 ('string', '\n'))
3031 ('string', '\n'))
3032 one
3032 one
3033
3033
3034 unless explicit symbol is expected:
3034 unless explicit symbol is expected:
3035
3035
3036 $ hg log -Ra -r0 -T '{desc|1}\n'
3036 $ hg log -Ra -r0 -T '{desc|1}\n'
3037 hg: parse error: expected a symbol, got 'integer'
3037 hg: parse error: expected a symbol, got 'integer'
3038 [255]
3038 [255]
3039 $ hg log -Ra -r0 -T '{1()}\n'
3039 $ hg log -Ra -r0 -T '{1()}\n'
3040 hg: parse error: expected a symbol, got 'integer'
3040 hg: parse error: expected a symbol, got 'integer'
3041 [255]
3041 [255]
3042
3042
3043 Test string literal:
3043 Test string literal:
3044
3044
3045 $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n'
3045 $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n'
3046 (template
3046 (template
3047 ('string', 'string with no template fragment')
3047 ('string', 'string with no template fragment')
3048 ('string', '\n'))
3048 ('string', '\n'))
3049 string with no template fragment
3049 string with no template fragment
3050 $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n'
3050 $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n'
3051 (template
3051 (template
3052 (template
3052 (template
3053 ('string', 'template: ')
3053 ('string', 'template: ')
3054 ('symbol', 'rev'))
3054 ('symbol', 'rev'))
3055 ('string', '\n'))
3055 ('string', '\n'))
3056 template: 0
3056 template: 0
3057 $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n'
3057 $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n'
3058 (template
3058 (template
3059 ('string', 'rawstring: {rev}')
3059 ('string', 'rawstring: {rev}')
3060 ('string', '\n'))
3060 ('string', '\n'))
3061 rawstring: {rev}
3061 rawstring: {rev}
3062 $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n'
3062 $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n'
3063 (template
3063 (template
3064 (%
3064 (%
3065 ('symbol', 'files')
3065 ('symbol', 'files')
3066 ('string', 'rawstring: {file}'))
3066 ('string', 'rawstring: {file}'))
3067 ('string', '\n'))
3067 ('string', '\n'))
3068 rawstring: {file}
3068 rawstring: {file}
3069
3069
3070 Test string escaping:
3070 Test string escaping:
3071
3071
3072 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3072 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3073 >
3073 >
3074 <>\n<[>
3074 <>\n<[>
3075 <>\n<]>
3075 <>\n<]>
3076 <>\n<
3076 <>\n<
3077
3077
3078 $ hg log -R latesttag -r 0 \
3078 $ hg log -R latesttag -r 0 \
3079 > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3079 > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3080 >
3080 >
3081 <>\n<[>
3081 <>\n<[>
3082 <>\n<]>
3082 <>\n<]>
3083 <>\n<
3083 <>\n<
3084
3084
3085 $ hg log -R latesttag -r 0 -T esc \
3085 $ hg log -R latesttag -r 0 -T esc \
3086 > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3086 > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3087 >
3087 >
3088 <>\n<[>
3088 <>\n<[>
3089 <>\n<]>
3089 <>\n<]>
3090 <>\n<
3090 <>\n<
3091
3091
3092 $ cat <<'EOF' > esctmpl
3092 $ cat <<'EOF' > esctmpl
3093 > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3093 > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3094 > EOF
3094 > EOF
3095 $ hg log -R latesttag -r 0 --style ./esctmpl
3095 $ hg log -R latesttag -r 0 --style ./esctmpl
3096 >
3096 >
3097 <>\n<[>
3097 <>\n<[>
3098 <>\n<]>
3098 <>\n<]>
3099 <>\n<
3099 <>\n<
3100
3100
3101 Test string escaping of quotes:
3101 Test string escaping of quotes:
3102
3102
3103 $ hg log -Ra -r0 -T '{"\""}\n'
3103 $ hg log -Ra -r0 -T '{"\""}\n'
3104 "
3104 "
3105 $ hg log -Ra -r0 -T '{"\\\""}\n'
3105 $ hg log -Ra -r0 -T '{"\\\""}\n'
3106 \"
3106 \"
3107 $ hg log -Ra -r0 -T '{r"\""}\n'
3107 $ hg log -Ra -r0 -T '{r"\""}\n'
3108 \"
3108 \"
3109 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3109 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3110 \\\"
3110 \\\"
3111
3111
3112
3112
3113 $ hg log -Ra -r0 -T '{"\""}\n'
3113 $ hg log -Ra -r0 -T '{"\""}\n'
3114 "
3114 "
3115 $ hg log -Ra -r0 -T '{"\\\""}\n'
3115 $ hg log -Ra -r0 -T '{"\\\""}\n'
3116 \"
3116 \"
3117 $ hg log -Ra -r0 -T '{r"\""}\n'
3117 $ hg log -Ra -r0 -T '{r"\""}\n'
3118 \"
3118 \"
3119 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3119 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3120 \\\"
3120 \\\"
3121
3121
3122 Test exception in quoted template. single backslash before quotation mark is
3122 Test exception in quoted template. single backslash before quotation mark is
3123 stripped before parsing:
3123 stripped before parsing:
3124
3124
3125 $ cat <<'EOF' > escquotetmpl
3125 $ cat <<'EOF' > escquotetmpl
3126 > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
3126 > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
3127 > EOF
3127 > EOF
3128 $ cd latesttag
3128 $ cd latesttag
3129 $ hg log -r 2 --style ../escquotetmpl
3129 $ hg log -r 2 --style ../escquotetmpl
3130 " \" \" \\" head1
3130 " \" \" \\" head1
3131
3131
3132 $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"'
3132 $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"'
3133 valid
3133 valid
3134 $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'"
3134 $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'"
3135 valid
3135 valid
3136
3136
3137 Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested
3137 Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested
3138 _evalifliteral() templates (issue4733):
3138 _evalifliteral() templates (issue4733):
3139
3139
3140 $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n'
3140 $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n'
3141 "2
3141 "2
3142 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n'
3142 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n'
3143 "2
3143 "2
3144 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n'
3144 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n'
3145 "2
3145 "2
3146
3146
3147 $ hg log -r 2 -T '{if(rev, "\\\"")}\n'
3147 $ hg log -r 2 -T '{if(rev, "\\\"")}\n'
3148 \"
3148 \"
3149 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n'
3149 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n'
3150 \"
3150 \"
3151 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3151 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3152 \"
3152 \"
3153
3153
3154 $ hg log -r 2 -T '{if(rev, r"\\\"")}\n'
3154 $ hg log -r 2 -T '{if(rev, r"\\\"")}\n'
3155 \\\"
3155 \\\"
3156 $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n'
3156 $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n'
3157 \\\"
3157 \\\"
3158 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3158 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3159 \\\"
3159 \\\"
3160
3160
3161 escaped single quotes and errors:
3161 escaped single quotes and errors:
3162
3162
3163 $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n'
3163 $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n'
3164 foo
3164 foo
3165 $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n'
3165 $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n'
3166 foo
3166 foo
3167 $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n'
3167 $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n'
3168 hg: parse error at 21: unterminated string
3168 hg: parse error at 21: unterminated string
3169 [255]
3169 [255]
3170 $ hg log -r 2 -T '{if(rev, \"\\"")}\n'
3170 $ hg log -r 2 -T '{if(rev, \"\\"")}\n'
3171 hg: parse error: trailing \ in string
3171 hg: parse error: trailing \ in string
3172 [255]
3172 [255]
3173 $ hg log -r 2 -T '{if(rev, r\"\\"")}\n'
3173 $ hg log -r 2 -T '{if(rev, r\"\\"")}\n'
3174 hg: parse error: trailing \ in string
3174 hg: parse error: trailing \ in string
3175 [255]
3175 [255]
3176
3176
3177 $ cd ..
3177 $ cd ..
3178
3178
3179 Test leading backslashes:
3179 Test leading backslashes:
3180
3180
3181 $ cd latesttag
3181 $ cd latesttag
3182 $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n'
3182 $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n'
3183 {rev} {file}
3183 {rev} {file}
3184 $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n'
3184 $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n'
3185 \2 \head1
3185 \2 \head1
3186 $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n'
3186 $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n'
3187 \{rev} \{file}
3187 \{rev} \{file}
3188 $ cd ..
3188 $ cd ..
3189
3189
3190 Test leading backslashes in "if" expression (issue4714):
3190 Test leading backslashes in "if" expression (issue4714):
3191
3191
3192 $ cd latesttag
3192 $ cd latesttag
3193 $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n'
3193 $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n'
3194 {rev} \{rev}
3194 {rev} \{rev}
3195 $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n'
3195 $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n'
3196 \2 \\{rev}
3196 \2 \\{rev}
3197 $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n'
3197 $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n'
3198 \{rev} \\\{rev}
3198 \{rev} \\\{rev}
3199 $ cd ..
3199 $ cd ..
3200
3200
3201 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
3201 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
3202
3202
3203 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
3203 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
3204 \x6e
3204 \x6e
3205 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
3205 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
3206 \x5c\x786e
3206 \x5c\x786e
3207 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
3207 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
3208 \x6e
3208 \x6e
3209 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
3209 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
3210 \x5c\x786e
3210 \x5c\x786e
3211
3211
3212 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
3212 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
3213 \x6e
3213 \x6e
3214 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
3214 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
3215 \x5c\x786e
3215 \x5c\x786e
3216 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
3216 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
3217 \x6e
3217 \x6e
3218 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
3218 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
3219 \x5c\x786e
3219 \x5c\x786e
3220
3220
3221 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
3221 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
3222 fourth
3222 fourth
3223 second
3223 second
3224 third
3224 third
3225 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
3225 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
3226 fourth\nsecond\nthird
3226 fourth\nsecond\nthird
3227
3227
3228 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
3228 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
3229 <p>
3229 <p>
3230 1st
3230 1st
3231 </p>
3231 </p>
3232 <p>
3232 <p>
3233 2nd
3233 2nd
3234 </p>
3234 </p>
3235 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
3235 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
3236 <p>
3236 <p>
3237 1st\n\n2nd
3237 1st\n\n2nd
3238 </p>
3238 </p>
3239 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
3239 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
3240 1st
3240 1st
3241
3241
3242 2nd
3242 2nd
3243
3243
3244 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
3244 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
3245 o perso
3245 o perso
3246 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
3246 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
3247 no person
3247 no person
3248 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
3248 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
3249 o perso
3249 o perso
3250 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
3250 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
3251 no perso
3251 no perso
3252
3252
3253 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
3253 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
3254 -o perso-
3254 -o perso-
3255 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
3255 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
3256 no person
3256 no person
3257 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
3257 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
3258 \x2do perso\x2d
3258 \x2do perso\x2d
3259 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
3259 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
3260 -o perso-
3260 -o perso-
3261 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
3261 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
3262 \x2do perso\x6e
3262 \x2do perso\x6e
3263
3263
3264 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
3264 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
3265 fourth
3265 fourth
3266 second
3266 second
3267 third
3267 third
3268
3268
3269 Test string escaping in nested expression:
3269 Test string escaping in nested expression:
3270
3270
3271 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
3271 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
3272 fourth\x6esecond\x6ethird
3272 fourth\x6esecond\x6ethird
3273 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
3273 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
3274 fourth\x6esecond\x6ethird
3274 fourth\x6esecond\x6ethird
3275
3275
3276 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
3276 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
3277 fourth\x6esecond\x6ethird
3277 fourth\x6esecond\x6ethird
3278 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
3278 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
3279 fourth\x5c\x786esecond\x5c\x786ethird
3279 fourth\x5c\x786esecond\x5c\x786ethird
3280
3280
3281 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
3281 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
3282 3:\x6eo user, \x6eo domai\x6e
3282 3:\x6eo user, \x6eo domai\x6e
3283 4:\x5c\x786eew bra\x5c\x786ech
3283 4:\x5c\x786eew bra\x5c\x786ech
3284
3284
3285 Test quotes in nested expression are evaluated just like a $(command)
3285 Test quotes in nested expression are evaluated just like a $(command)
3286 substitution in POSIX shells:
3286 substitution in POSIX shells:
3287
3287
3288 $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n'
3288 $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n'
3289 8:95c24699272e
3289 8:95c24699272e
3290 $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n'
3290 $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n'
3291 {8} "95c24699272e"
3291 {8} "95c24699272e"
3292
3292
3293 Test recursive evaluation:
3293 Test recursive evaluation:
3294
3294
3295 $ hg init r
3295 $ hg init r
3296 $ cd r
3296 $ cd r
3297 $ echo a > a
3297 $ echo a > a
3298 $ hg ci -Am '{rev}'
3298 $ hg ci -Am '{rev}'
3299 adding a
3299 adding a
3300 $ hg log -r 0 --template '{if(rev, desc)}\n'
3300 $ hg log -r 0 --template '{if(rev, desc)}\n'
3301 {rev}
3301 {rev}
3302 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
3302 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
3303 test 0
3303 test 0
3304
3304
3305 $ hg branch -q 'text.{rev}'
3305 $ hg branch -q 'text.{rev}'
3306 $ echo aa >> aa
3306 $ echo aa >> aa
3307 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
3307 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
3308
3308
3309 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
3309 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
3310 {node|short}desc to
3310 {node|short}desc to
3311 text.{rev}be wrapped
3311 text.{rev}be wrapped
3312 text.{rev}desc to be
3312 text.{rev}desc to be
3313 text.{rev}wrapped (no-eol)
3313 text.{rev}wrapped (no-eol)
3314 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
3314 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
3315 bcc7ff960b8e:desc to
3315 bcc7ff960b8e:desc to
3316 text.1:be wrapped
3316 text.1:be wrapped
3317 text.1:desc to be
3317 text.1:desc to be
3318 text.1:wrapped (no-eol)
3318 text.1:wrapped (no-eol)
3319 $ hg log -l1 -T '{fill(desc, date, "", "")}\n'
3319 $ hg log -l1 -T '{fill(desc, date, "", "")}\n'
3320 hg: parse error: fill expects an integer width
3320 hg: parse error: fill expects an integer width
3321 [255]
3321 [255]
3322
3322
3323 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
3323 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
3324 bcc7ff960b8e:desc to be
3324 bcc7ff960b8e:desc to be
3325 termwidth.1:wrapped desc
3325 termwidth.1:wrapped desc
3326 termwidth.1:to be wrapped (no-eol)
3326 termwidth.1:to be wrapped (no-eol)
3327
3327
3328 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
3328 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
3329 {node|short} (no-eol)
3329 {node|short} (no-eol)
3330 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
3330 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
3331 bcc-ff---b-e (no-eol)
3331 bcc-ff---b-e (no-eol)
3332
3332
3333 $ cat >> .hg/hgrc <<EOF
3333 $ cat >> .hg/hgrc <<EOF
3334 > [extensions]
3334 > [extensions]
3335 > color=
3335 > color=
3336 > [color]
3336 > [color]
3337 > mode=ansi
3337 > mode=ansi
3338 > text.{rev} = red
3338 > text.{rev} = red
3339 > text.1 = green
3339 > text.1 = green
3340 > EOF
3340 > EOF
3341 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
3341 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
3342 \x1b[0;31mtext\x1b[0m (esc)
3342 \x1b[0;31mtext\x1b[0m (esc)
3343 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
3343 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
3344 \x1b[0;32mtext\x1b[0m (esc)
3344 \x1b[0;32mtext\x1b[0m (esc)
3345
3345
3346 color effect can be specified without quoting:
3346 color effect can be specified without quoting:
3347
3347
3348 $ hg log --color=always -l 1 --template '{label(red, "text\n")}'
3348 $ hg log --color=always -l 1 --template '{label(red, "text\n")}'
3349 \x1b[0;31mtext\x1b[0m (esc)
3349 \x1b[0;31mtext\x1b[0m (esc)
3350
3350
3351 label should be no-op if color is disabled:
3351 label should be no-op if color is disabled:
3352
3352
3353 $ hg log --color=never -l 1 --template '{label(red, "text\n")}'
3353 $ hg log --color=never -l 1 --template '{label(red, "text\n")}'
3354 text
3354 text
3355 $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}'
3355 $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}'
3356 text
3356 text
3357
3357
3358 Test branches inside if statement:
3358 Test branches inside if statement:
3359
3359
3360 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
3360 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
3361 no
3361 no
3362
3362
3363 Test get function:
3363 Test get function:
3364
3364
3365 $ hg log -r 0 --template '{get(extras, "branch")}\n'
3365 $ hg log -r 0 --template '{get(extras, "branch")}\n'
3366 default
3366 default
3367 $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n'
3367 $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n'
3368 default
3368 default
3369 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
3369 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
3370 hg: parse error: get() expects a dict as first argument
3370 hg: parse error: get() expects a dict as first argument
3371 [255]
3371 [255]
3372
3372
3373 Test localdate(date, tz) function:
3373 Test localdate(date, tz) function:
3374
3374
3375 $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n'
3375 $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n'
3376 1970-01-01 09:00 +0900
3376 1970-01-01 09:00 +0900
3377 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n'
3377 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n'
3378 1970-01-01 00:00 +0000
3378 1970-01-01 00:00 +0000
3379 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n'
3379 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n'
3380 hg: parse error: localdate expects a timezone
3380 hg: parse error: localdate expects a timezone
3381 [255]
3381 [255]
3382 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n'
3382 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n'
3383 1970-01-01 02:00 +0200
3383 1970-01-01 02:00 +0200
3384 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n'
3384 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n'
3385 1970-01-01 00:00 +0000
3385 1970-01-01 00:00 +0000
3386 $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n'
3386 $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n'
3387 1970-01-01 00:00 +0000
3387 1970-01-01 00:00 +0000
3388 $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n'
3388 $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n'
3389 hg: parse error: localdate expects a timezone
3389 hg: parse error: localdate expects a timezone
3390 [255]
3390 [255]
3391 $ hg log -r0 -T '{localdate(date, date)|isodate}\n'
3391 $ hg log -r0 -T '{localdate(date, date)|isodate}\n'
3392 hg: parse error: localdate expects a timezone
3392 hg: parse error: localdate expects a timezone
3393 [255]
3393 [255]
3394
3394
3395 Test shortest(node) function:
3395 Test shortest(node) function:
3396
3396
3397 $ echo b > b
3397 $ echo b > b
3398 $ hg ci -qAm b
3398 $ hg ci -qAm b
3399 $ hg log --template '{shortest(node)}\n'
3399 $ hg log --template '{shortest(node)}\n'
3400 e777
3400 e777
3401 bcc7
3401 bcc7
3402 f776
3402 f776
3403 $ hg log --template '{shortest(node, 10)}\n'
3403 $ hg log --template '{shortest(node, 10)}\n'
3404 e777603221
3404 e777603221
3405 bcc7ff960b
3405 bcc7ff960b
3406 f7769ec2ab
3406 f7769ec2ab
3407 $ hg log --template '{node|shortest}\n' -l1
3407 $ hg log --template '{node|shortest}\n' -l1
3408 e777
3408 e777
3409
3409
3410 $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n'
3410 $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n'
3411 f7769ec2ab
3411 f7769ec2ab
3412 $ hg log -r 0 -T '{shortest(node, "not an int")}\n'
3412 $ hg log -r 0 -T '{shortest(node, "not an int")}\n'
3413 hg: parse error: shortest() expects an integer minlength
3413 hg: parse error: shortest() expects an integer minlength
3414 [255]
3414 [255]
3415
3415
3416 $ cd ..
3416 $ cd ..
3417
3417
3418 Test shortest(node) with the repo having short hash collision:
3418 Test shortest(node) with the repo having short hash collision:
3419
3419
3420 $ hg init hashcollision
3420 $ hg init hashcollision
3421 $ cd hashcollision
3421 $ cd hashcollision
3422 $ cat <<EOF >> .hg/hgrc
3422 $ cat <<EOF >> .hg/hgrc
3423 > [experimental]
3423 > [experimental]
3424 > evolution = createmarkers
3424 > evolution = createmarkers
3425 > EOF
3425 > EOF
3426 $ echo 0 > a
3426 $ echo 0 > a
3427 $ hg ci -qAm 0
3427 $ hg ci -qAm 0
3428 $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do
3428 $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do
3429 > hg up -q 0
3429 > hg up -q 0
3430 > echo $i > a
3430 > echo $i > a
3431 > hg ci -qm $i
3431 > hg ci -qm $i
3432 > done
3432 > done
3433 $ hg up -q null
3433 $ hg up -q null
3434 $ hg log -r0: -T '{rev}:{node}\n'
3434 $ hg log -r0: -T '{rev}:{node}\n'
3435 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a
3435 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a
3436 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc
3436 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc
3437 2:11407b3f1b9c3e76a79c1ec5373924df096f0499
3437 2:11407b3f1b9c3e76a79c1ec5373924df096f0499
3438 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4
3438 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4
3439 4:10776689e627b465361ad5c296a20a487e153ca4
3439 4:10776689e627b465361ad5c296a20a487e153ca4
3440 5:a00be79088084cb3aff086ab799f8790e01a976b
3440 5:a00be79088084cb3aff086ab799f8790e01a976b
3441 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6
3441 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6
3442 7:a0457b3450b8e1b778f1163b31a435802987fe5d
3442 7:a0457b3450b8e1b778f1163b31a435802987fe5d
3443 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a
3443 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a
3444 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48
3444 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48
3445 10:c562ddd9c94164376c20b86b0b4991636a3bf84f
3445 10:c562ddd9c94164376c20b86b0b4991636a3bf84f
3446 $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b
3446 $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b
3447 $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48
3447 $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48
3448 $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f
3448 $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f
3449
3449
3450 nodes starting with '11' (we don't have the revision number '11' though)
3450 nodes starting with '11' (we don't have the revision number '11' though)
3451
3451
3452 $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n'
3452 $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n'
3453 1:1142
3453 1:1142
3454 2:1140
3454 2:1140
3455 3:11d
3455 3:11d
3456
3456
3457 '5:a00' is hidden, but still we have two nodes starting with 'a0'
3457 '5:a00' is hidden, but still we have two nodes starting with 'a0'
3458
3458
3459 $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n'
3459 $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n'
3460 6:a0b
3460 6:a0b
3461 7:a04
3461 7:a04
3462
3462
3463 node '10' conflicts with the revision number '10' even if it is hidden
3463 node '10' conflicts with the revision number '10' even if it is hidden
3464 (we could exclude hidden revision numbers, but currently we don't)
3464 (we could exclude hidden revision numbers, but currently we don't)
3465
3465
3466 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n'
3466 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n'
3467 4:107
3467 4:107
3468 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden
3468 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden
3469 4:107
3469 4:107
3470
3470
3471 node 'c562' should be unique if the other 'c562' nodes are hidden
3471 node 'c562' should be unique if the other 'c562' nodes are hidden
3472 (but we don't try the slow path to filter out hidden nodes for now)
3472 (but we don't try the slow path to filter out hidden nodes for now)
3473
3473
3474 $ hg log -r 8 -T '{rev}:{node|shortest}\n'
3474 $ hg log -r 8 -T '{rev}:{node|shortest}\n'
3475 8:c5625
3475 8:c5625
3476 $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden
3476 $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden
3477 8:c5625
3477 8:c5625
3478 9:c5623
3478 9:c5623
3479 10:c562d
3479 10:c562d
3480
3480
3481 $ cd ..
3481 $ cd ..
3482
3482
3483 Test pad function
3483 Test pad function
3484
3484
3485 $ cd r
3485 $ cd r
3486
3486
3487 $ hg log --template '{pad(rev, 20)} {author|user}\n'
3487 $ hg log --template '{pad(rev, 20)} {author|user}\n'
3488 2 test
3488 2 test
3489 1 {node|short}
3489 1 {node|short}
3490 0 test
3490 0 test
3491
3491
3492 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
3492 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
3493 2 test
3493 2 test
3494 1 {node|short}
3494 1 {node|short}
3495 0 test
3495 0 test
3496
3496
3497 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
3497 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
3498 2------------------- test
3498 2------------------- test
3499 1------------------- {node|short}
3499 1------------------- {node|short}
3500 0------------------- test
3500 0------------------- test
3501
3501
3502 Test template string in pad function
3502 Test template string in pad function
3503
3503
3504 $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n'
3504 $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n'
3505 {0} test
3505 {0} test
3506
3506
3507 $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n'
3507 $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n'
3508 \{rev} test
3508 \{rev} test
3509
3509
3510 Test width argument passed to pad function
3510 Test width argument passed to pad function
3511
3511
3512 $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n'
3512 $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n'
3513 0 test
3513 0 test
3514 $ hg log -r 0 -T '{pad(rev, "not an int")}\n'
3514 $ hg log -r 0 -T '{pad(rev, "not an int")}\n'
3515 hg: parse error: pad() expects an integer width
3515 hg: parse error: pad() expects an integer width
3516 [255]
3516 [255]
3517
3517
3518 Test boolean argument passed to pad function
3518 Test boolean argument passed to pad function
3519
3519
3520 no crash
3520 no crash
3521
3521
3522 $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n'
3522 $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n'
3523 ---------0
3523 ---------0
3524
3524
3525 string/literal
3525 string/literal
3526
3526
3527 $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n'
3527 $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n'
3528 ---------0
3528 ---------0
3529 $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n'
3529 $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n'
3530 0---------
3530 0---------
3531 $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n'
3531 $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n'
3532 0---------
3532 0---------
3533
3533
3534 unknown keyword is evaluated to ''
3534 unknown keyword is evaluated to ''
3535
3535
3536 $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n'
3536 $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n'
3537 0---------
3537 0---------
3538
3538
3539 Test separate function
3539 Test separate function
3540
3540
3541 $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n'
3541 $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n'
3542 a-b-c
3542 a-b-c
3543 $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n'
3543 $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n'
3544 0:f7769ec2ab97 test default
3544 0:f7769ec2ab97 test default
3545 $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n'
3545 $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n'
3546 a \x1b[0;31mb\x1b[0m c d (esc)
3546 a \x1b[0;31mb\x1b[0m c d (esc)
3547
3547
3548 Test boolean expression/literal passed to if function
3548 Test boolean expression/literal passed to if function
3549
3549
3550 $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n'
3550 $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n'
3551 rev 0 is True
3551 rev 0 is True
3552 $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n'
3552 $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n'
3553 literal 0 is True as well
3553 literal 0 is True as well
3554 $ hg log -r 0 -T '{if("", "", "empty string is False")}\n'
3554 $ hg log -r 0 -T '{if("", "", "empty string is False")}\n'
3555 empty string is False
3555 empty string is False
3556 $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n'
3556 $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n'
3557 empty list is False
3557 empty list is False
3558 $ hg log -r 0 -T '{if(true, "true is True")}\n'
3558 $ hg log -r 0 -T '{if(true, "true is True")}\n'
3559 true is True
3559 true is True
3560 $ hg log -r 0 -T '{if(false, "", "false is False")}\n'
3560 $ hg log -r 0 -T '{if(false, "", "false is False")}\n'
3561 false is False
3561 false is False
3562 $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n'
3562 $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n'
3563 non-empty string is True
3563 non-empty string is True
3564
3564
3565 Test ifcontains function
3565 Test ifcontains function
3566
3566
3567 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
3567 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
3568 2 is in the string
3568 2 is in the string
3569 1 is not
3569 1 is not
3570 0 is in the string
3570 0 is in the string
3571
3571
3572 $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n'
3572 $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n'
3573 2 is in the string
3573 2 is in the string
3574 1 is not
3574 1 is not
3575 0 is in the string
3575 0 is in the string
3576
3576
3577 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
3577 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
3578 2 did not add a
3578 2 did not add a
3579 1 did not add a
3579 1 did not add a
3580 0 added a
3580 0 added a
3581
3581
3582 $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n'
3582 $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n'
3583 2 is parent of 1
3583 2 is parent of 1
3584 1
3584 1
3585 0
3585 0
3586
3586
3587 Test revset function
3587 Test revset function
3588
3588
3589 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
3589 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
3590 2 current rev
3590 2 current rev
3591 1 not current rev
3591 1 not current rev
3592 0 not current rev
3592 0 not current rev
3593
3593
3594 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
3594 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
3595 2 match rev
3595 2 match rev
3596 1 match rev
3596 1 match rev
3597 0 not match rev
3597 0 not match rev
3598
3598
3599 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
3599 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
3600 2 Parents: 1
3600 2 Parents: 1
3601 1 Parents: 0
3601 1 Parents: 0
3602 0 Parents:
3602 0 Parents:
3603
3603
3604 $ cat >> .hg/hgrc <<EOF
3604 $ cat >> .hg/hgrc <<EOF
3605 > [revsetalias]
3605 > [revsetalias]
3606 > myparents(\$1) = parents(\$1)
3606 > myparents(\$1) = parents(\$1)
3607 > EOF
3607 > EOF
3608 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
3608 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
3609 2 Parents: 1
3609 2 Parents: 1
3610 1 Parents: 0
3610 1 Parents: 0
3611 0 Parents:
3611 0 Parents:
3612
3612
3613 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
3613 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
3614 Rev: 2
3614 Rev: 2
3615 Ancestor: 0
3615 Ancestor: 0
3616 Ancestor: 1
3616 Ancestor: 1
3617 Ancestor: 2
3617 Ancestor: 2
3618
3618
3619 Rev: 1
3619 Rev: 1
3620 Ancestor: 0
3620 Ancestor: 0
3621 Ancestor: 1
3621 Ancestor: 1
3622
3622
3623 Rev: 0
3623 Rev: 0
3624 Ancestor: 0
3624 Ancestor: 0
3625
3625
3626 $ hg log --template '{revset("TIP"|lower)}\n' -l1
3626 $ hg log --template '{revset("TIP"|lower)}\n' -l1
3627 2
3627 2
3628
3628
3629 $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1
3629 $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1
3630 2
3630 2
3631
3631
3632 a list template is evaluated for each item of revset/parents
3632 a list template is evaluated for each item of revset/parents
3633
3633
3634 $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n'
3634 $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n'
3635 2 p: 1:bcc7ff960b8e
3635 2 p: 1:bcc7ff960b8e
3636 1 p: 0:f7769ec2ab97
3636 1 p: 0:f7769ec2ab97
3637 0 p:
3637 0 p:
3638
3638
3639 $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n'
3639 $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n'
3640 2 p: 1:bcc7ff960b8e -1:000000000000
3640 2 p: 1:bcc7ff960b8e -1:000000000000
3641 1 p: 0:f7769ec2ab97 -1:000000000000
3641 1 p: 0:f7769ec2ab97 -1:000000000000
3642 0 p: -1:000000000000 -1:000000000000
3642 0 p: -1:000000000000 -1:000000000000
3643
3643
3644 therefore, 'revcache' should be recreated for each rev
3644 therefore, 'revcache' should be recreated for each rev
3645
3645
3646 $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n'
3646 $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n'
3647 2 aa b
3647 2 aa b
3648 p
3648 p
3649 1
3649 1
3650 p a
3650 p a
3651 0 a
3651 0 a
3652 p
3652 p
3653
3653
3654 $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n'
3654 $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n'
3655 2 aa b
3655 2 aa b
3656 p
3656 p
3657 1
3657 1
3658 p a
3658 p a
3659 0 a
3659 0 a
3660 p
3660 p
3661
3661
3662 a revset item must be evaluated as an integer revision, not an offset from tip
3662 a revset item must be evaluated as an integer revision, not an offset from tip
3663
3663
3664 $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n'
3664 $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n'
3665 -1:000000000000
3665 -1:000000000000
3666 $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n'
3666 $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n'
3667 -1:000000000000
3667 -1:000000000000
3668
3668
3669 join() should pick '{rev}' from revset items:
3669 join() should pick '{rev}' from revset items:
3670
3670
3671 $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6
3671 $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6
3672 4, 5
3672 4, 5
3673
3673
3674 on the other hand, parents are formatted as '{rev}:{node|formatnode}' by
3674 on the other hand, parents are formatted as '{rev}:{node|formatnode}' by
3675 default. join() should agree with the default formatting:
3675 default. join() should agree with the default formatting:
3676
3676
3677 $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6
3677 $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6
3678 5:13207e5a10d9, 4:bbe44766e73d
3678 5:13207e5a10d9, 4:bbe44766e73d
3679
3679
3680 $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug
3680 $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug
3681 5:13207e5a10d9fd28ec424934298e176197f2c67f,
3681 5:13207e5a10d9fd28ec424934298e176197f2c67f,
3682 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
3682 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
3683
3683
3684 Test files function
3684 Test files function
3685
3685
3686 $ hg log -T "{rev}\n{join(files('*'), '\n')}\n"
3686 $ hg log -T "{rev}\n{join(files('*'), '\n')}\n"
3687 2
3687 2
3688 a
3688 a
3689 aa
3689 aa
3690 b
3690 b
3691 1
3691 1
3692 a
3692 a
3693 0
3693 0
3694 a
3694 a
3695
3695
3696 $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n"
3696 $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n"
3697 2
3697 2
3698 aa
3698 aa
3699 1
3699 1
3700
3700
3701 0
3701 0
3702
3702
3703
3703
3704 Test relpath function
3704 Test relpath function
3705
3705
3706 $ hg log -r0 -T '{files % "{file|relpath}\n"}'
3706 $ hg log -r0 -T '{files % "{file|relpath}\n"}'
3707 a
3707 a
3708 $ cd ..
3708 $ cd ..
3709 $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}'
3709 $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}'
3710 r/a (glob)
3710 r/a
3711 $ cd r
3711 $ cd r
3712
3712
3713 Test active bookmark templating
3713 Test active bookmark templating
3714
3714
3715 $ hg book foo
3715 $ hg book foo
3716 $ hg book bar
3716 $ hg book bar
3717 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
3717 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
3718 2 bar* foo
3718 2 bar* foo
3719 1
3719 1
3720 0
3720 0
3721 $ hg log --template "{rev} {activebookmark}\n"
3721 $ hg log --template "{rev} {activebookmark}\n"
3722 2 bar
3722 2 bar
3723 1
3723 1
3724 0
3724 0
3725 $ hg bookmarks --inactive bar
3725 $ hg bookmarks --inactive bar
3726 $ hg log --template "{rev} {activebookmark}\n"
3726 $ hg log --template "{rev} {activebookmark}\n"
3727 2
3727 2
3728 1
3728 1
3729 0
3729 0
3730 $ hg book -r1 baz
3730 $ hg book -r1 baz
3731 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
3731 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
3732 2 bar foo
3732 2 bar foo
3733 1 baz
3733 1 baz
3734 0
3734 0
3735 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
3735 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
3736 2 t
3736 2 t
3737 1 f
3737 1 f
3738 0 f
3738 0 f
3739
3739
3740 Test namespaces dict
3740 Test namespaces dict
3741
3741
3742 $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n'
3742 $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n'
3743 2 bookmarks=bar,foo tags=tip branches=text.{rev}
3743 2 bookmarks=bar,foo tags=tip branches=text.{rev}
3744 1 bookmarks=baz tags= branches=text.{rev}
3744 1 bookmarks=baz tags= branches=text.{rev}
3745 0 bookmarks= tags= branches=default
3745 0 bookmarks= tags= branches=default
3746 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
3746 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
3747 bookmarks: bar foo
3747 bookmarks: bar foo
3748 tags: tip
3748 tags: tip
3749 branches: text.{rev}
3749 branches: text.{rev}
3750 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
3750 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
3751 bookmarks:
3751 bookmarks:
3752 bar
3752 bar
3753 foo
3753 foo
3754 tags:
3754 tags:
3755 tip
3755 tip
3756 branches:
3756 branches:
3757 text.{rev}
3757 text.{rev}
3758 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
3758 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
3759 bar
3759 bar
3760 foo
3760 foo
3761
3761
3762 Test stringify on sub expressions
3762 Test stringify on sub expressions
3763
3763
3764 $ cd ..
3764 $ cd ..
3765 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
3765 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
3766 fourth, second, third
3766 fourth, second, third
3767 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
3767 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
3768 abc
3768 abc
3769
3769
3770 Test splitlines
3770 Test splitlines
3771
3771
3772 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
3772 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
3773 @ foo Modify, add, remove, rename
3773 @ foo Modify, add, remove, rename
3774 |
3774 |
3775 o foo future
3775 o foo future
3776 |
3776 |
3777 o foo third
3777 o foo third
3778 |
3778 |
3779 o foo second
3779 o foo second
3780
3780
3781 o foo merge
3781 o foo merge
3782 |\
3782 |\
3783 | o foo new head
3783 | o foo new head
3784 | |
3784 | |
3785 o | foo new branch
3785 o | foo new branch
3786 |/
3786 |/
3787 o foo no user, no domain
3787 o foo no user, no domain
3788 |
3788 |
3789 o foo no person
3789 o foo no person
3790 |
3790 |
3791 o foo other 1
3791 o foo other 1
3792 | foo other 2
3792 | foo other 2
3793 | foo
3793 | foo
3794 | foo other 3
3794 | foo other 3
3795 o foo line 1
3795 o foo line 1
3796 foo line 2
3796 foo line 2
3797
3797
3798 Test startswith
3798 Test startswith
3799 $ hg log -Gv -R a --template "{startswith(desc)}"
3799 $ hg log -Gv -R a --template "{startswith(desc)}"
3800 hg: parse error: startswith expects two arguments
3800 hg: parse error: startswith expects two arguments
3801 [255]
3801 [255]
3802
3802
3803 $ hg log -Gv -R a --template "{startswith('line', desc)}"
3803 $ hg log -Gv -R a --template "{startswith('line', desc)}"
3804 @
3804 @
3805 |
3805 |
3806 o
3806 o
3807 |
3807 |
3808 o
3808 o
3809 |
3809 |
3810 o
3810 o
3811
3811
3812 o
3812 o
3813 |\
3813 |\
3814 | o
3814 | o
3815 | |
3815 | |
3816 o |
3816 o |
3817 |/
3817 |/
3818 o
3818 o
3819 |
3819 |
3820 o
3820 o
3821 |
3821 |
3822 o
3822 o
3823 |
3823 |
3824 o line 1
3824 o line 1
3825 line 2
3825 line 2
3826
3826
3827 Test bad template with better error message
3827 Test bad template with better error message
3828
3828
3829 $ hg log -Gv -R a --template '{desc|user()}'
3829 $ hg log -Gv -R a --template '{desc|user()}'
3830 hg: parse error: expected a symbol, got 'func'
3830 hg: parse error: expected a symbol, got 'func'
3831 [255]
3831 [255]
3832
3832
3833 Test word function (including index out of bounds graceful failure)
3833 Test word function (including index out of bounds graceful failure)
3834
3834
3835 $ hg log -Gv -R a --template "{word('1', desc)}"
3835 $ hg log -Gv -R a --template "{word('1', desc)}"
3836 @ add,
3836 @ add,
3837 |
3837 |
3838 o
3838 o
3839 |
3839 |
3840 o
3840 o
3841 |
3841 |
3842 o
3842 o
3843
3843
3844 o
3844 o
3845 |\
3845 |\
3846 | o head
3846 | o head
3847 | |
3847 | |
3848 o | branch
3848 o | branch
3849 |/
3849 |/
3850 o user,
3850 o user,
3851 |
3851 |
3852 o person
3852 o person
3853 |
3853 |
3854 o 1
3854 o 1
3855 |
3855 |
3856 o 1
3856 o 1
3857
3857
3858
3858
3859 Test word third parameter used as splitter
3859 Test word third parameter used as splitter
3860
3860
3861 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
3861 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
3862 @ M
3862 @ M
3863 |
3863 |
3864 o future
3864 o future
3865 |
3865 |
3866 o third
3866 o third
3867 |
3867 |
3868 o sec
3868 o sec
3869
3869
3870 o merge
3870 o merge
3871 |\
3871 |\
3872 | o new head
3872 | o new head
3873 | |
3873 | |
3874 o | new branch
3874 o | new branch
3875 |/
3875 |/
3876 o n
3876 o n
3877 |
3877 |
3878 o n
3878 o n
3879 |
3879 |
3880 o
3880 o
3881 |
3881 |
3882 o line 1
3882 o line 1
3883 line 2
3883 line 2
3884
3884
3885 Test word error messages for not enough and too many arguments
3885 Test word error messages for not enough and too many arguments
3886
3886
3887 $ hg log -Gv -R a --template "{word('0')}"
3887 $ hg log -Gv -R a --template "{word('0')}"
3888 hg: parse error: word expects two or three arguments, got 1
3888 hg: parse error: word expects two or three arguments, got 1
3889 [255]
3889 [255]
3890
3890
3891 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
3891 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
3892 hg: parse error: word expects two or three arguments, got 7
3892 hg: parse error: word expects two or three arguments, got 7
3893 [255]
3893 [255]
3894
3894
3895 Test word for integer literal
3895 Test word for integer literal
3896
3896
3897 $ hg log -R a --template "{word(2, desc)}\n" -r0
3897 $ hg log -R a --template "{word(2, desc)}\n" -r0
3898 line
3898 line
3899
3899
3900 Test word for invalid numbers
3900 Test word for invalid numbers
3901
3901
3902 $ hg log -Gv -R a --template "{word('a', desc)}"
3902 $ hg log -Gv -R a --template "{word('a', desc)}"
3903 hg: parse error: word expects an integer index
3903 hg: parse error: word expects an integer index
3904 [255]
3904 [255]
3905
3905
3906 Test word for out of range
3906 Test word for out of range
3907
3907
3908 $ hg log -R a --template "{word(10000, desc)}"
3908 $ hg log -R a --template "{word(10000, desc)}"
3909 $ hg log -R a --template "{word(-10000, desc)}"
3909 $ hg log -R a --template "{word(-10000, desc)}"
3910
3910
3911 Test indent and not adding to empty lines
3911 Test indent and not adding to empty lines
3912
3912
3913 $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a
3913 $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a
3914 -----
3914 -----
3915 > line 1
3915 > line 1
3916 >> line 2
3916 >> line 2
3917 -----
3917 -----
3918 > other 1
3918 > other 1
3919 >> other 2
3919 >> other 2
3920
3920
3921 >> other 3
3921 >> other 3
3922
3922
3923 Test with non-strings like dates
3923 Test with non-strings like dates
3924
3924
3925 $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a
3925 $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a
3926 1200000.00
3926 1200000.00
3927 1300000.00
3927 1300000.00
3928
3928
3929 Test broken string escapes:
3929 Test broken string escapes:
3930
3930
3931 $ hg log -T "bogus\\" -R a
3931 $ hg log -T "bogus\\" -R a
3932 hg: parse error: trailing \ in string
3932 hg: parse error: trailing \ in string
3933 [255]
3933 [255]
3934 $ hg log -T "\\xy" -R a
3934 $ hg log -T "\\xy" -R a
3935 hg: parse error: invalid \x escape
3935 hg: parse error: invalid \x escape
3936 [255]
3936 [255]
3937
3937
3938 json filter should escape HTML tags so that the output can be embedded in hgweb:
3938 json filter should escape HTML tags so that the output can be embedded in hgweb:
3939
3939
3940 $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1
3940 $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1
3941 "\u003cfoo@example.org\u003e"
3941 "\u003cfoo@example.org\u003e"
3942
3942
3943 Templater supports aliases of symbol and func() styles:
3943 Templater supports aliases of symbol and func() styles:
3944
3944
3945 $ hg clone -q a aliases
3945 $ hg clone -q a aliases
3946 $ cd aliases
3946 $ cd aliases
3947 $ cat <<EOF >> .hg/hgrc
3947 $ cat <<EOF >> .hg/hgrc
3948 > [templatealias]
3948 > [templatealias]
3949 > r = rev
3949 > r = rev
3950 > rn = "{r}:{node|short}"
3950 > rn = "{r}:{node|short}"
3951 > status(c, files) = files % "{c} {file}\n"
3951 > status(c, files) = files % "{c} {file}\n"
3952 > utcdate(d) = localdate(d, "UTC")
3952 > utcdate(d) = localdate(d, "UTC")
3953 > EOF
3953 > EOF
3954
3954
3955 $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n'
3955 $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n'
3956 (template
3956 (template
3957 ('symbol', 'rn')
3957 ('symbol', 'rn')
3958 ('string', ' ')
3958 ('string', ' ')
3959 (|
3959 (|
3960 (func
3960 (func
3961 ('symbol', 'utcdate')
3961 ('symbol', 'utcdate')
3962 ('symbol', 'date'))
3962 ('symbol', 'date'))
3963 ('symbol', 'isodate'))
3963 ('symbol', 'isodate'))
3964 ('string', '\n'))
3964 ('string', '\n'))
3965 * expanded:
3965 * expanded:
3966 (template
3966 (template
3967 (template
3967 (template
3968 ('symbol', 'rev')
3968 ('symbol', 'rev')
3969 ('string', ':')
3969 ('string', ':')
3970 (|
3970 (|
3971 ('symbol', 'node')
3971 ('symbol', 'node')
3972 ('symbol', 'short')))
3972 ('symbol', 'short')))
3973 ('string', ' ')
3973 ('string', ' ')
3974 (|
3974 (|
3975 (func
3975 (func
3976 ('symbol', 'localdate')
3976 ('symbol', 'localdate')
3977 (list
3977 (list
3978 ('symbol', 'date')
3978 ('symbol', 'date')
3979 ('string', 'UTC')))
3979 ('string', 'UTC')))
3980 ('symbol', 'isodate'))
3980 ('symbol', 'isodate'))
3981 ('string', '\n'))
3981 ('string', '\n'))
3982 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
3982 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
3983
3983
3984 $ hg debugtemplate -vr0 '{status("A", file_adds)}'
3984 $ hg debugtemplate -vr0 '{status("A", file_adds)}'
3985 (template
3985 (template
3986 (func
3986 (func
3987 ('symbol', 'status')
3987 ('symbol', 'status')
3988 (list
3988 (list
3989 ('string', 'A')
3989 ('string', 'A')
3990 ('symbol', 'file_adds'))))
3990 ('symbol', 'file_adds'))))
3991 * expanded:
3991 * expanded:
3992 (template
3992 (template
3993 (%
3993 (%
3994 ('symbol', 'file_adds')
3994 ('symbol', 'file_adds')
3995 (template
3995 (template
3996 ('string', 'A')
3996 ('string', 'A')
3997 ('string', ' ')
3997 ('string', ' ')
3998 ('symbol', 'file')
3998 ('symbol', 'file')
3999 ('string', '\n'))))
3999 ('string', '\n'))))
4000 A a
4000 A a
4001
4001
4002 A unary function alias can be called as a filter:
4002 A unary function alias can be called as a filter:
4003
4003
4004 $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n'
4004 $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n'
4005 (template
4005 (template
4006 (|
4006 (|
4007 (|
4007 (|
4008 ('symbol', 'date')
4008 ('symbol', 'date')
4009 ('symbol', 'utcdate'))
4009 ('symbol', 'utcdate'))
4010 ('symbol', 'isodate'))
4010 ('symbol', 'isodate'))
4011 ('string', '\n'))
4011 ('string', '\n'))
4012 * expanded:
4012 * expanded:
4013 (template
4013 (template
4014 (|
4014 (|
4015 (func
4015 (func
4016 ('symbol', 'localdate')
4016 ('symbol', 'localdate')
4017 (list
4017 (list
4018 ('symbol', 'date')
4018 ('symbol', 'date')
4019 ('string', 'UTC')))
4019 ('string', 'UTC')))
4020 ('symbol', 'isodate'))
4020 ('symbol', 'isodate'))
4021 ('string', '\n'))
4021 ('string', '\n'))
4022 1970-01-12 13:46 +0000
4022 1970-01-12 13:46 +0000
4023
4023
4024 Aliases should be applied only to command arguments and templates in hgrc.
4024 Aliases should be applied only to command arguments and templates in hgrc.
4025 Otherwise, our stock styles and web templates could be corrupted:
4025 Otherwise, our stock styles and web templates could be corrupted:
4026
4026
4027 $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n'
4027 $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n'
4028 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4028 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4029
4029
4030 $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"'
4030 $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"'
4031 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4031 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4032
4032
4033 $ cat <<EOF > tmpl
4033 $ cat <<EOF > tmpl
4034 > changeset = 'nothing expanded:{rn}\n'
4034 > changeset = 'nothing expanded:{rn}\n'
4035 > EOF
4035 > EOF
4036 $ hg log -r0 --style ./tmpl
4036 $ hg log -r0 --style ./tmpl
4037 nothing expanded:
4037 nothing expanded:
4038
4038
4039 Aliases in formatter:
4039 Aliases in formatter:
4040
4040
4041 $ hg branches -T '{pad(branch, 7)} {rn}\n'
4041 $ hg branches -T '{pad(branch, 7)} {rn}\n'
4042 default 6:d41e714fe50d
4042 default 6:d41e714fe50d
4043 foo 4:bbe44766e73d
4043 foo 4:bbe44766e73d
4044
4044
4045 Aliases should honor HGPLAIN:
4045 Aliases should honor HGPLAIN:
4046
4046
4047 $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n'
4047 $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n'
4048 nothing expanded:
4048 nothing expanded:
4049 $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n'
4049 $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n'
4050 0:1e4e1b8f71e0
4050 0:1e4e1b8f71e0
4051
4051
4052 Unparsable alias:
4052 Unparsable alias:
4053
4053
4054 $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}'
4054 $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}'
4055 (template
4055 (template
4056 ('symbol', 'bad'))
4056 ('symbol', 'bad'))
4057 abort: bad definition of template alias "bad": at 2: not a prefix: end
4057 abort: bad definition of template alias "bad": at 2: not a prefix: end
4058 [255]
4058 [255]
4059 $ hg log --config templatealias.bad='x(' -T '{bad}'
4059 $ hg log --config templatealias.bad='x(' -T '{bad}'
4060 abort: bad definition of template alias "bad": at 2: not a prefix: end
4060 abort: bad definition of template alias "bad": at 2: not a prefix: end
4061 [255]
4061 [255]
4062
4062
4063 $ cd ..
4063 $ cd ..
4064
4064
4065 Set up repository for non-ascii encoding tests:
4065 Set up repository for non-ascii encoding tests:
4066
4066
4067 $ hg init nonascii
4067 $ hg init nonascii
4068 $ cd nonascii
4068 $ cd nonascii
4069 $ python <<EOF
4069 $ python <<EOF
4070 > open('latin1', 'w').write('\xe9')
4070 > open('latin1', 'w').write('\xe9')
4071 > open('utf-8', 'w').write('\xc3\xa9')
4071 > open('utf-8', 'w').write('\xc3\xa9')
4072 > EOF
4072 > EOF
4073 $ HGENCODING=utf-8 hg branch -q `cat utf-8`
4073 $ HGENCODING=utf-8 hg branch -q `cat utf-8`
4074 $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8
4074 $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8
4075
4075
4076 json filter should try round-trip conversion to utf-8:
4076 json filter should try round-trip conversion to utf-8:
4077
4077
4078 $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0
4078 $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0
4079 "\u00e9"
4079 "\u00e9"
4080 $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0
4080 $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0
4081 "non-ascii branch: \u00e9"
4081 "non-ascii branch: \u00e9"
4082
4082
4083 json filter takes input as utf-8b:
4083 json filter takes input as utf-8b:
4084
4084
4085 $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1
4085 $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1
4086 "\u00e9"
4086 "\u00e9"
4087 $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1
4087 $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1
4088 "\udce9"
4088 "\udce9"
4089
4089
4090 utf8 filter:
4090 utf8 filter:
4091
4091
4092 $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0
4092 $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0
4093 round-trip: c3a9
4093 round-trip: c3a9
4094 $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1
4094 $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1
4095 decoded: c3a9
4095 decoded: c3a9
4096 $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1
4096 $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1
4097 abort: decoding near * (glob)
4097 abort: decoding near * (glob)
4098 [255]
4098 [255]
4099 $ hg log -T "invalid type: {rev|utf8}\n" -r0
4099 $ hg log -T "invalid type: {rev|utf8}\n" -r0
4100 abort: template filter 'utf8' is not compatible with keyword 'rev'
4100 abort: template filter 'utf8' is not compatible with keyword 'rev'
4101 [255]
4101 [255]
4102
4102
4103 $ cd ..
4103 $ cd ..
4104
4104
4105 Test that template function in extension is registered as expected
4105 Test that template function in extension is registered as expected
4106
4106
4107 $ cd a
4107 $ cd a
4108
4108
4109 $ cat <<EOF > $TESTTMP/customfunc.py
4109 $ cat <<EOF > $TESTTMP/customfunc.py
4110 > from mercurial import registrar
4110 > from mercurial import registrar
4111 >
4111 >
4112 > templatefunc = registrar.templatefunc()
4112 > templatefunc = registrar.templatefunc()
4113 >
4113 >
4114 > @templatefunc('custom()')
4114 > @templatefunc('custom()')
4115 > def custom(context, mapping, args):
4115 > def custom(context, mapping, args):
4116 > return 'custom'
4116 > return 'custom'
4117 > EOF
4117 > EOF
4118 $ cat <<EOF > .hg/hgrc
4118 $ cat <<EOF > .hg/hgrc
4119 > [extensions]
4119 > [extensions]
4120 > customfunc = $TESTTMP/customfunc.py
4120 > customfunc = $TESTTMP/customfunc.py
4121 > EOF
4121 > EOF
4122
4122
4123 $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true
4123 $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true
4124 custom
4124 custom
4125
4125
4126 $ cd ..
4126 $ cd ..
@@ -1,985 +1,985 b''
1 #require git
1 #require git
2
2
3 $ echo "[core]" >> $HOME/.gitconfig
3 $ echo "[core]" >> $HOME/.gitconfig
4 $ echo "autocrlf = false" >> $HOME/.gitconfig
4 $ echo "autocrlf = false" >> $HOME/.gitconfig
5 $ echo "[core]" >> $HOME/.gitconfig
5 $ echo "[core]" >> $HOME/.gitconfig
6 $ echo "autocrlf = false" >> $HOME/.gitconfig
6 $ echo "autocrlf = false" >> $HOME/.gitconfig
7 $ echo "[extensions]" >> $HGRCPATH
7 $ echo "[extensions]" >> $HGRCPATH
8 $ echo "convert=" >> $HGRCPATH
8 $ echo "convert=" >> $HGRCPATH
9 $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
9 $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
10 $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
10 $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
11 $ GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE
11 $ GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE
12 $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
12 $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
13 $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
13 $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
14 $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
14 $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
15 $ INVALIDID1=afd12345af
15 $ INVALIDID1=afd12345af
16 $ INVALIDID2=28173x36ddd1e67bf7098d541130558ef5534a86
16 $ INVALIDID2=28173x36ddd1e67bf7098d541130558ef5534a86
17 $ VALIDID1=39b3d83f9a69a9ba4ebb111461071a0af0027357
17 $ VALIDID1=39b3d83f9a69a9ba4ebb111461071a0af0027357
18 $ VALIDID2=8dd6476bd09d9c7776355dc454dafe38efaec5da
18 $ VALIDID2=8dd6476bd09d9c7776355dc454dafe38efaec5da
19 $ count=10
19 $ count=10
20 $ commit()
20 $ commit()
21 > {
21 > {
22 > GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
22 > GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
23 > GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
23 > GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
24 > git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
24 > git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
25 > count=`expr $count + 1`
25 > count=`expr $count + 1`
26 > }
26 > }
27 $ mkdir git-repo
27 $ mkdir git-repo
28 $ cd git-repo
28 $ cd git-repo
29 $ git init-db >/dev/null 2>/dev/null
29 $ git init-db >/dev/null 2>/dev/null
30 $ echo a > a
30 $ echo a > a
31 $ mkdir d
31 $ mkdir d
32 $ echo b > d/b
32 $ echo b > d/b
33 $ git add a d
33 $ git add a d
34 $ commit -a -m t1
34 $ commit -a -m t1
35
35
36 Remove the directory, then try to replace it with a file (issue754)
36 Remove the directory, then try to replace it with a file (issue754)
37
37
38 $ git rm -f d/b
38 $ git rm -f d/b
39 rm 'd/b'
39 rm 'd/b'
40 $ commit -m t2
40 $ commit -m t2
41 $ echo d > d
41 $ echo d > d
42 $ git add d
42 $ git add d
43 $ commit -m t3
43 $ commit -m t3
44 $ echo b >> a
44 $ echo b >> a
45 $ commit -a -m t4.1
45 $ commit -a -m t4.1
46 $ git checkout -b other HEAD~ >/dev/null 2>/dev/null
46 $ git checkout -b other HEAD~ >/dev/null 2>/dev/null
47 $ echo c > a
47 $ echo c > a
48 $ echo a >> a
48 $ echo a >> a
49 $ commit -a -m t4.2
49 $ commit -a -m t4.2
50 $ git checkout master >/dev/null 2>/dev/null
50 $ git checkout master >/dev/null 2>/dev/null
51 $ git pull --no-commit . other > /dev/null 2>/dev/null
51 $ git pull --no-commit . other > /dev/null 2>/dev/null
52 $ commit -m 'Merge branch other'
52 $ commit -m 'Merge branch other'
53 $ cd ..
53 $ cd ..
54 $ hg convert --config extensions.progress= --config progress.assume-tty=1 \
54 $ hg convert --config extensions.progress= --config progress.assume-tty=1 \
55 > --config progress.delay=0 --config progress.changedelay=0 \
55 > --config progress.delay=0 --config progress.changedelay=0 \
56 > --config progress.refresh=0 --config progress.width=60 \
56 > --config progress.refresh=0 --config progress.width=60 \
57 > --config progress.format='topic, bar, number' --datesort git-repo
57 > --config progress.format='topic, bar, number' --datesort git-repo
58 \r (no-eol) (esc)
58 \r (no-eol) (esc)
59 scanning [======> ] 1/6\r (no-eol) (esc)
59 scanning [======> ] 1/6\r (no-eol) (esc)
60 scanning [=============> ] 2/6\r (no-eol) (esc)
60 scanning [=============> ] 2/6\r (no-eol) (esc)
61 scanning [=====================> ] 3/6\r (no-eol) (esc)
61 scanning [=====================> ] 3/6\r (no-eol) (esc)
62 scanning [============================> ] 4/6\r (no-eol) (esc)
62 scanning [============================> ] 4/6\r (no-eol) (esc)
63 scanning [===================================> ] 5/6\r (no-eol) (esc)
63 scanning [===================================> ] 5/6\r (no-eol) (esc)
64 scanning [===========================================>] 6/6\r (no-eol) (esc)
64 scanning [===========================================>] 6/6\r (no-eol) (esc)
65 \r (no-eol) (esc)
65 \r (no-eol) (esc)
66 \r (no-eol) (esc)
66 \r (no-eol) (esc)
67 converting [ ] 0/6\r (no-eol) (esc)
67 converting [ ] 0/6\r (no-eol) (esc)
68 getting files [==================> ] 1/2\r (no-eol) (esc)
68 getting files [==================> ] 1/2\r (no-eol) (esc)
69 getting files [======================================>] 2/2\r (no-eol) (esc)
69 getting files [======================================>] 2/2\r (no-eol) (esc)
70 \r (no-eol) (esc)
70 \r (no-eol) (esc)
71 \r (no-eol) (esc)
71 \r (no-eol) (esc)
72 converting [======> ] 1/6\r (no-eol) (esc)
72 converting [======> ] 1/6\r (no-eol) (esc)
73 getting files [======================================>] 1/1\r (no-eol) (esc)
73 getting files [======================================>] 1/1\r (no-eol) (esc)
74 \r (no-eol) (esc)
74 \r (no-eol) (esc)
75 \r (no-eol) (esc)
75 \r (no-eol) (esc)
76 converting [=============> ] 2/6\r (no-eol) (esc)
76 converting [=============> ] 2/6\r (no-eol) (esc)
77 getting files [======================================>] 1/1\r (no-eol) (esc)
77 getting files [======================================>] 1/1\r (no-eol) (esc)
78 \r (no-eol) (esc)
78 \r (no-eol) (esc)
79 \r (no-eol) (esc)
79 \r (no-eol) (esc)
80 converting [====================> ] 3/6\r (no-eol) (esc)
80 converting [====================> ] 3/6\r (no-eol) (esc)
81 getting files [======================================>] 1/1\r (no-eol) (esc)
81 getting files [======================================>] 1/1\r (no-eol) (esc)
82 \r (no-eol) (esc)
82 \r (no-eol) (esc)
83 \r (no-eol) (esc)
83 \r (no-eol) (esc)
84 converting [===========================> ] 4/6\r (no-eol) (esc)
84 converting [===========================> ] 4/6\r (no-eol) (esc)
85 getting files [======================================>] 1/1\r (no-eol) (esc)
85 getting files [======================================>] 1/1\r (no-eol) (esc)
86 \r (no-eol) (esc)
86 \r (no-eol) (esc)
87 \r (no-eol) (esc)
87 \r (no-eol) (esc)
88 converting [==================================> ] 5/6\r (no-eol) (esc)
88 converting [==================================> ] 5/6\r (no-eol) (esc)
89 getting files [======================================>] 1/1\r (no-eol) (esc)
89 getting files [======================================>] 1/1\r (no-eol) (esc)
90 \r (no-eol) (esc)
90 \r (no-eol) (esc)
91 assuming destination git-repo-hg
91 assuming destination git-repo-hg
92 initializing destination git-repo-hg repository
92 initializing destination git-repo-hg repository
93 scanning source...
93 scanning source...
94 sorting...
94 sorting...
95 converting...
95 converting...
96 5 t1
96 5 t1
97 4 t2
97 4 t2
98 3 t3
98 3 t3
99 2 t4.1
99 2 t4.1
100 1 t4.2
100 1 t4.2
101 0 Merge branch other
101 0 Merge branch other
102 updating bookmarks
102 updating bookmarks
103 $ hg up -q -R git-repo-hg
103 $ hg up -q -R git-repo-hg
104 $ hg -R git-repo-hg tip -v
104 $ hg -R git-repo-hg tip -v
105 changeset: 5:c78094926be2
105 changeset: 5:c78094926be2
106 bookmark: master
106 bookmark: master
107 tag: tip
107 tag: tip
108 parent: 3:f5f5cb45432b
108 parent: 3:f5f5cb45432b
109 parent: 4:4e174f80c67c
109 parent: 4:4e174f80c67c
110 user: test <test@example.org>
110 user: test <test@example.org>
111 date: Mon Jan 01 00:00:15 2007 +0000
111 date: Mon Jan 01 00:00:15 2007 +0000
112 files: a
112 files: a
113 description:
113 description:
114 Merge branch other
114 Merge branch other
115
115
116
116
117 $ count=10
117 $ count=10
118 $ mkdir git-repo2
118 $ mkdir git-repo2
119 $ cd git-repo2
119 $ cd git-repo2
120 $ git init-db >/dev/null 2>/dev/null
120 $ git init-db >/dev/null 2>/dev/null
121 $ echo foo > foo
121 $ echo foo > foo
122 $ git add foo
122 $ git add foo
123 $ commit -a -m 'add foo'
123 $ commit -a -m 'add foo'
124 $ echo >> foo
124 $ echo >> foo
125 $ commit -a -m 'change foo'
125 $ commit -a -m 'change foo'
126 $ git checkout -b Bar HEAD~ >/dev/null 2>/dev/null
126 $ git checkout -b Bar HEAD~ >/dev/null 2>/dev/null
127 $ echo quux >> quux
127 $ echo quux >> quux
128 $ git add quux
128 $ git add quux
129 $ commit -a -m 'add quux'
129 $ commit -a -m 'add quux'
130 $ echo bar > bar
130 $ echo bar > bar
131 $ git add bar
131 $ git add bar
132 $ commit -a -m 'add bar'
132 $ commit -a -m 'add bar'
133 $ git checkout -b Baz HEAD~ >/dev/null 2>/dev/null
133 $ git checkout -b Baz HEAD~ >/dev/null 2>/dev/null
134 $ echo baz > baz
134 $ echo baz > baz
135 $ git add baz
135 $ git add baz
136 $ commit -a -m 'add baz'
136 $ commit -a -m 'add baz'
137 $ git checkout master >/dev/null 2>/dev/null
137 $ git checkout master >/dev/null 2>/dev/null
138 $ git pull --no-commit . Bar Baz > /dev/null 2>/dev/null
138 $ git pull --no-commit . Bar Baz > /dev/null 2>/dev/null
139 $ commit -m 'Octopus merge'
139 $ commit -m 'Octopus merge'
140 $ echo bar >> bar
140 $ echo bar >> bar
141 $ commit -a -m 'change bar'
141 $ commit -a -m 'change bar'
142 $ git checkout -b Foo HEAD~ >/dev/null 2>/dev/null
142 $ git checkout -b Foo HEAD~ >/dev/null 2>/dev/null
143 $ echo >> foo
143 $ echo >> foo
144 $ commit -a -m 'change foo'
144 $ commit -a -m 'change foo'
145 $ git checkout master >/dev/null 2>/dev/null
145 $ git checkout master >/dev/null 2>/dev/null
146 $ git pull --no-commit -s ours . Foo > /dev/null 2>/dev/null
146 $ git pull --no-commit -s ours . Foo > /dev/null 2>/dev/null
147 $ commit -m 'Discard change to foo'
147 $ commit -m 'Discard change to foo'
148 $ cd ..
148 $ cd ..
149 $ glog()
149 $ glog()
150 > {
150 > {
151 > hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
151 > hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
152 > }
152 > }
153 $ splitrepo()
153 $ splitrepo()
154 > {
154 > {
155 > msg="$1"
155 > msg="$1"
156 > files="$2"
156 > files="$2"
157 > opts=$3
157 > opts=$3
158 > echo "% $files: $msg"
158 > echo "% $files: $msg"
159 > prefix=`echo "$files" | sed -e 's/ /-/g'`
159 > prefix=`echo "$files" | sed -e 's/ /-/g'`
160 > fmap="$prefix.fmap"
160 > fmap="$prefix.fmap"
161 > repo="$prefix.repo"
161 > repo="$prefix.repo"
162 > for i in $files; do
162 > for i in $files; do
163 > echo "include $i" >> "$fmap"
163 > echo "include $i" >> "$fmap"
164 > done
164 > done
165 > hg -q convert $opts --filemap "$fmap" --datesort git-repo2 "$repo"
165 > hg -q convert $opts --filemap "$fmap" --datesort git-repo2 "$repo"
166 > hg up -q -R "$repo"
166 > hg up -q -R "$repo"
167 > glog -R "$repo"
167 > glog -R "$repo"
168 > hg -R "$repo" manifest --debug
168 > hg -R "$repo" manifest --debug
169 > }
169 > }
170
170
171 full conversion
171 full conversion
172
172
173 $ hg convert --datesort git-repo2 fullrepo \
173 $ hg convert --datesort git-repo2 fullrepo \
174 > --config extensions.progress= --config progress.assume-tty=1 \
174 > --config extensions.progress= --config progress.assume-tty=1 \
175 > --config progress.delay=0 --config progress.changedelay=0 \
175 > --config progress.delay=0 --config progress.changedelay=0 \
176 > --config progress.refresh=0 --config progress.width=60 \
176 > --config progress.refresh=0 --config progress.width=60 \
177 > --config progress.format='topic, bar, number'
177 > --config progress.format='topic, bar, number'
178 \r (no-eol) (esc)
178 \r (no-eol) (esc)
179 scanning [===> ] 1/9\r (no-eol) (esc)
179 scanning [===> ] 1/9\r (no-eol) (esc)
180 scanning [========> ] 2/9\r (no-eol) (esc)
180 scanning [========> ] 2/9\r (no-eol) (esc)
181 scanning [=============> ] 3/9\r (no-eol) (esc)
181 scanning [=============> ] 3/9\r (no-eol) (esc)
182 scanning [==================> ] 4/9\r (no-eol) (esc)
182 scanning [==================> ] 4/9\r (no-eol) (esc)
183 scanning [=======================> ] 5/9\r (no-eol) (esc)
183 scanning [=======================> ] 5/9\r (no-eol) (esc)
184 scanning [============================> ] 6/9\r (no-eol) (esc)
184 scanning [============================> ] 6/9\r (no-eol) (esc)
185 scanning [=================================> ] 7/9\r (no-eol) (esc)
185 scanning [=================================> ] 7/9\r (no-eol) (esc)
186 scanning [======================================> ] 8/9\r (no-eol) (esc)
186 scanning [======================================> ] 8/9\r (no-eol) (esc)
187 scanning [===========================================>] 9/9\r (no-eol) (esc)
187 scanning [===========================================>] 9/9\r (no-eol) (esc)
188 \r (no-eol) (esc)
188 \r (no-eol) (esc)
189 \r (no-eol) (esc)
189 \r (no-eol) (esc)
190 converting [ ] 0/9\r (no-eol) (esc)
190 converting [ ] 0/9\r (no-eol) (esc)
191 getting files [======================================>] 1/1\r (no-eol) (esc)
191 getting files [======================================>] 1/1\r (no-eol) (esc)
192 \r (no-eol) (esc)
192 \r (no-eol) (esc)
193 \r (no-eol) (esc)
193 \r (no-eol) (esc)
194 converting [===> ] 1/9\r (no-eol) (esc)
194 converting [===> ] 1/9\r (no-eol) (esc)
195 getting files [======================================>] 1/1\r (no-eol) (esc)
195 getting files [======================================>] 1/1\r (no-eol) (esc)
196 \r (no-eol) (esc)
196 \r (no-eol) (esc)
197 \r (no-eol) (esc)
197 \r (no-eol) (esc)
198 converting [========> ] 2/9\r (no-eol) (esc)
198 converting [========> ] 2/9\r (no-eol) (esc)
199 getting files [======================================>] 1/1\r (no-eol) (esc)
199 getting files [======================================>] 1/1\r (no-eol) (esc)
200 \r (no-eol) (esc)
200 \r (no-eol) (esc)
201 \r (no-eol) (esc)
201 \r (no-eol) (esc)
202 converting [=============> ] 3/9\r (no-eol) (esc)
202 converting [=============> ] 3/9\r (no-eol) (esc)
203 getting files [======================================>] 1/1\r (no-eol) (esc)
203 getting files [======================================>] 1/1\r (no-eol) (esc)
204 \r (no-eol) (esc)
204 \r (no-eol) (esc)
205 \r (no-eol) (esc)
205 \r (no-eol) (esc)
206 converting [=================> ] 4/9\r (no-eol) (esc)
206 converting [=================> ] 4/9\r (no-eol) (esc)
207 getting files [======================================>] 1/1\r (no-eol) (esc)
207 getting files [======================================>] 1/1\r (no-eol) (esc)
208 \r (no-eol) (esc)
208 \r (no-eol) (esc)
209 \r (no-eol) (esc)
209 \r (no-eol) (esc)
210 converting [======================> ] 5/9\r (no-eol) (esc)
210 converting [======================> ] 5/9\r (no-eol) (esc)
211 getting files [===> ] 1/8\r (no-eol) (esc)
211 getting files [===> ] 1/8\r (no-eol) (esc)
212 getting files [========> ] 2/8\r (no-eol) (esc)
212 getting files [========> ] 2/8\r (no-eol) (esc)
213 getting files [=============> ] 3/8\r (no-eol) (esc)
213 getting files [=============> ] 3/8\r (no-eol) (esc)
214 getting files [==================> ] 4/8\r (no-eol) (esc)
214 getting files [==================> ] 4/8\r (no-eol) (esc)
215 getting files [=======================> ] 5/8\r (no-eol) (esc)
215 getting files [=======================> ] 5/8\r (no-eol) (esc)
216 getting files [============================> ] 6/8\r (no-eol) (esc)
216 getting files [============================> ] 6/8\r (no-eol) (esc)
217 getting files [=================================> ] 7/8\r (no-eol) (esc)
217 getting files [=================================> ] 7/8\r (no-eol) (esc)
218 getting files [======================================>] 8/8\r (no-eol) (esc)
218 getting files [======================================>] 8/8\r (no-eol) (esc)
219 \r (no-eol) (esc)
219 \r (no-eol) (esc)
220 \r (no-eol) (esc)
220 \r (no-eol) (esc)
221 converting [===========================> ] 6/9\r (no-eol) (esc)
221 converting [===========================> ] 6/9\r (no-eol) (esc)
222 getting files [======================================>] 1/1\r (no-eol) (esc)
222 getting files [======================================>] 1/1\r (no-eol) (esc)
223 \r (no-eol) (esc)
223 \r (no-eol) (esc)
224 \r (no-eol) (esc)
224 \r (no-eol) (esc)
225 converting [===============================> ] 7/9\r (no-eol) (esc)
225 converting [===============================> ] 7/9\r (no-eol) (esc)
226 getting files [======================================>] 1/1\r (no-eol) (esc)
226 getting files [======================================>] 1/1\r (no-eol) (esc)
227 \r (no-eol) (esc)
227 \r (no-eol) (esc)
228 \r (no-eol) (esc)
228 \r (no-eol) (esc)
229 converting [====================================> ] 8/9\r (no-eol) (esc)
229 converting [====================================> ] 8/9\r (no-eol) (esc)
230 getting files [==================> ] 1/2\r (no-eol) (esc)
230 getting files [==================> ] 1/2\r (no-eol) (esc)
231 getting files [======================================>] 2/2\r (no-eol) (esc)
231 getting files [======================================>] 2/2\r (no-eol) (esc)
232 \r (no-eol) (esc)
232 \r (no-eol) (esc)
233 initializing destination fullrepo repository
233 initializing destination fullrepo repository
234 scanning source...
234 scanning source...
235 sorting...
235 sorting...
236 converting...
236 converting...
237 8 add foo
237 8 add foo
238 7 change foo
238 7 change foo
239 6 add quux
239 6 add quux
240 5 add bar
240 5 add bar
241 4 add baz
241 4 add baz
242 3 Octopus merge
242 3 Octopus merge
243 2 change bar
243 2 change bar
244 1 change foo
244 1 change foo
245 0 Discard change to foo
245 0 Discard change to foo
246 updating bookmarks
246 updating bookmarks
247 $ hg up -q -R fullrepo
247 $ hg up -q -R fullrepo
248 $ glog -R fullrepo
248 $ glog -R fullrepo
249 @ 9 "Discard change to foo" files: foo
249 @ 9 "Discard change to foo" files: foo
250 |\
250 |\
251 | o 8 "change foo" files: foo
251 | o 8 "change foo" files: foo
252 | |
252 | |
253 o | 7 "change bar" files: bar
253 o | 7 "change bar" files: bar
254 |/
254 |/
255 o 6 "(octopus merge fixup)" files:
255 o 6 "(octopus merge fixup)" files:
256 |\
256 |\
257 | o 5 "Octopus merge" files: baz
257 | o 5 "Octopus merge" files: baz
258 | |\
258 | |\
259 o | | 4 "add baz" files: baz
259 o | | 4 "add baz" files: baz
260 | | |
260 | | |
261 +---o 3 "add bar" files: bar
261 +---o 3 "add bar" files: bar
262 | |
262 | |
263 o | 2 "add quux" files: quux
263 o | 2 "add quux" files: quux
264 | |
264 | |
265 | o 1 "change foo" files: foo
265 | o 1 "change foo" files: foo
266 |/
266 |/
267 o 0 "add foo" files: foo
267 o 0 "add foo" files: foo
268
268
269 $ hg -R fullrepo manifest --debug
269 $ hg -R fullrepo manifest --debug
270 245a3b8bc653999c2b22cdabd517ccb47aecafdf 644 bar
270 245a3b8bc653999c2b22cdabd517ccb47aecafdf 644 bar
271 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
271 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
272 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
272 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
273 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux
273 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux
274 $ splitrepo 'octopus merge' 'foo bar baz'
274 $ splitrepo 'octopus merge' 'foo bar baz'
275 % foo bar baz: octopus merge
275 % foo bar baz: octopus merge
276 @ 8 "Discard change to foo" files: foo
276 @ 8 "Discard change to foo" files: foo
277 |\
277 |\
278 | o 7 "change foo" files: foo
278 | o 7 "change foo" files: foo
279 | |
279 | |
280 o | 6 "change bar" files: bar
280 o | 6 "change bar" files: bar
281 |/
281 |/
282 o 5 "(octopus merge fixup)" files:
282 o 5 "(octopus merge fixup)" files:
283 |\
283 |\
284 | o 4 "Octopus merge" files: baz
284 | o 4 "Octopus merge" files: baz
285 | |\
285 | |\
286 o | | 3 "add baz" files: baz
286 o | | 3 "add baz" files: baz
287 | | |
287 | | |
288 +---o 2 "add bar" files: bar
288 +---o 2 "add bar" files: bar
289 | |
289 | |
290 | o 1 "change foo" files: foo
290 | o 1 "change foo" files: foo
291 |/
291 |/
292 o 0 "add foo" files: foo
292 o 0 "add foo" files: foo
293
293
294 245a3b8bc653999c2b22cdabd517ccb47aecafdf 644 bar
294 245a3b8bc653999c2b22cdabd517ccb47aecafdf 644 bar
295 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
295 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
296 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
296 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
297 $ splitrepo 'only some parents of an octopus merge; "discard" a head' 'foo baz quux'
297 $ splitrepo 'only some parents of an octopus merge; "discard" a head' 'foo baz quux'
298 % foo baz quux: only some parents of an octopus merge; "discard" a head
298 % foo baz quux: only some parents of an octopus merge; "discard" a head
299 @ 6 "Discard change to foo" files: foo
299 @ 6 "Discard change to foo" files: foo
300 |
300 |
301 o 5 "change foo" files: foo
301 o 5 "change foo" files: foo
302 |
302 |
303 o 4 "Octopus merge" files:
303 o 4 "Octopus merge" files:
304 |\
304 |\
305 | o 3 "add baz" files: baz
305 | o 3 "add baz" files: baz
306 | |
306 | |
307 | o 2 "add quux" files: quux
307 | o 2 "add quux" files: quux
308 | |
308 | |
309 o | 1 "change foo" files: foo
309 o | 1 "change foo" files: foo
310 |/
310 |/
311 o 0 "add foo" files: foo
311 o 0 "add foo" files: foo
312
312
313 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
313 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
314 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
314 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
315 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux
315 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux
316
316
317 test importing git renames and copies
317 test importing git renames and copies
318
318
319 $ cd git-repo2
319 $ cd git-repo2
320 $ git mv foo foo-renamed
320 $ git mv foo foo-renamed
321 since bar is not touched in this commit, this copy will not be detected
321 since bar is not touched in this commit, this copy will not be detected
322 $ cp bar bar-copied
322 $ cp bar bar-copied
323 $ cp baz baz-copied
323 $ cp baz baz-copied
324 $ cp baz baz-copied2
324 $ cp baz baz-copied2
325 $ cp baz ba-copy
325 $ cp baz ba-copy
326 $ echo baz2 >> baz
326 $ echo baz2 >> baz
327 $ git add bar-copied baz-copied baz-copied2 ba-copy
327 $ git add bar-copied baz-copied baz-copied2 ba-copy
328 $ commit -a -m 'rename and copy'
328 $ commit -a -m 'rename and copy'
329 $ cd ..
329 $ cd ..
330
330
331 input validation
331 input validation
332 $ hg convert --config convert.git.similarity=foo --datesort git-repo2 fullrepo
332 $ hg convert --config convert.git.similarity=foo --datesort git-repo2 fullrepo
333 abort: convert.git.similarity is not an integer ('foo')
333 abort: convert.git.similarity is not an integer ('foo')
334 [255]
334 [255]
335 $ hg convert --config convert.git.similarity=-1 --datesort git-repo2 fullrepo
335 $ hg convert --config convert.git.similarity=-1 --datesort git-repo2 fullrepo
336 abort: similarity must be between 0 and 100
336 abort: similarity must be between 0 and 100
337 [255]
337 [255]
338 $ hg convert --config convert.git.similarity=101 --datesort git-repo2 fullrepo
338 $ hg convert --config convert.git.similarity=101 --datesort git-repo2 fullrepo
339 abort: similarity must be between 0 and 100
339 abort: similarity must be between 0 and 100
340 [255]
340 [255]
341
341
342 $ hg -q convert --config convert.git.similarity=100 --datesort git-repo2 fullrepo
342 $ hg -q convert --config convert.git.similarity=100 --datesort git-repo2 fullrepo
343 $ hg -R fullrepo status -C --change master
343 $ hg -R fullrepo status -C --change master
344 M baz
344 M baz
345 A ba-copy
345 A ba-copy
346 baz
346 baz
347 A bar-copied
347 A bar-copied
348 A baz-copied
348 A baz-copied
349 baz
349 baz
350 A baz-copied2
350 A baz-copied2
351 baz
351 baz
352 A foo-renamed
352 A foo-renamed
353 foo
353 foo
354 R foo
354 R foo
355
355
356 Ensure that the modification to the copy source was preserved
356 Ensure that the modification to the copy source was preserved
357 (there was a bug where if the copy dest was alphabetically prior to the copy
357 (there was a bug where if the copy dest was alphabetically prior to the copy
358 source, the copy source took the contents of the copy dest)
358 source, the copy source took the contents of the copy dest)
359 $ hg cat -r tip fullrepo/baz
359 $ hg cat -r tip fullrepo/baz
360 baz
360 baz
361 baz2
361 baz2
362
362
363 $ cd git-repo2
363 $ cd git-repo2
364 $ echo bar2 >> bar
364 $ echo bar2 >> bar
365 $ commit -a -m 'change bar'
365 $ commit -a -m 'change bar'
366 $ cp bar bar-copied2
366 $ cp bar bar-copied2
367 $ git add bar-copied2
367 $ git add bar-copied2
368 $ commit -a -m 'copy with no changes'
368 $ commit -a -m 'copy with no changes'
369 $ cd ..
369 $ cd ..
370
370
371 $ hg -q convert --config convert.git.similarity=100 \
371 $ hg -q convert --config convert.git.similarity=100 \
372 > --config convert.git.findcopiesharder=1 --datesort git-repo2 fullrepo
372 > --config convert.git.findcopiesharder=1 --datesort git-repo2 fullrepo
373 $ hg -R fullrepo status -C --change master
373 $ hg -R fullrepo status -C --change master
374 A bar-copied2
374 A bar-copied2
375 bar
375 bar
376
376
377 renamelimit config option works
377 renamelimit config option works
378
378
379 $ cd git-repo2
379 $ cd git-repo2
380 $ cat >> copy-source << EOF
380 $ cat >> copy-source << EOF
381 > sc0
381 > sc0
382 > sc1
382 > sc1
383 > sc2
383 > sc2
384 > sc3
384 > sc3
385 > sc4
385 > sc4
386 > sc5
386 > sc5
387 > sc6
387 > sc6
388 > EOF
388 > EOF
389 $ git add copy-source
389 $ git add copy-source
390 $ commit -m 'add copy-source'
390 $ commit -m 'add copy-source'
391 $ cp copy-source source-copy0
391 $ cp copy-source source-copy0
392 $ echo 0 >> source-copy0
392 $ echo 0 >> source-copy0
393 $ cp copy-source source-copy1
393 $ cp copy-source source-copy1
394 $ echo 1 >> source-copy1
394 $ echo 1 >> source-copy1
395 $ git add source-copy0 source-copy1
395 $ git add source-copy0 source-copy1
396 $ commit -a -m 'copy copy-source 2 times'
396 $ commit -a -m 'copy copy-source 2 times'
397 $ cd ..
397 $ cd ..
398
398
399 $ hg -q convert --config convert.git.renamelimit=1 \
399 $ hg -q convert --config convert.git.renamelimit=1 \
400 > --config convert.git.findcopiesharder=true --datesort git-repo2 fullrepo2
400 > --config convert.git.findcopiesharder=true --datesort git-repo2 fullrepo2
401 $ hg -R fullrepo2 status -C --change master
401 $ hg -R fullrepo2 status -C --change master
402 A source-copy0
402 A source-copy0
403 A source-copy1
403 A source-copy1
404
404
405 $ hg -q convert --config convert.git.renamelimit=100 \
405 $ hg -q convert --config convert.git.renamelimit=100 \
406 > --config convert.git.findcopiesharder=true --datesort git-repo2 fullrepo3
406 > --config convert.git.findcopiesharder=true --datesort git-repo2 fullrepo3
407 $ hg -R fullrepo3 status -C --change master
407 $ hg -R fullrepo3 status -C --change master
408 A source-copy0
408 A source-copy0
409 copy-source
409 copy-source
410 A source-copy1
410 A source-copy1
411 copy-source
411 copy-source
412
412
413 test binary conversion (issue1359)
413 test binary conversion (issue1359)
414
414
415 $ count=19
415 $ count=19
416 $ mkdir git-repo3
416 $ mkdir git-repo3
417 $ cd git-repo3
417 $ cd git-repo3
418 $ git init-db >/dev/null 2>/dev/null
418 $ git init-db >/dev/null 2>/dev/null
419 $ $PYTHON -c 'file("b", "wb").write("".join([chr(i) for i in range(256)])*16)'
419 $ $PYTHON -c 'file("b", "wb").write("".join([chr(i) for i in range(256)])*16)'
420 $ git add b
420 $ git add b
421 $ commit -a -m addbinary
421 $ commit -a -m addbinary
422 $ cd ..
422 $ cd ..
423
423
424 convert binary file
424 convert binary file
425
425
426 $ hg convert git-repo3 git-repo3-hg
426 $ hg convert git-repo3 git-repo3-hg
427 initializing destination git-repo3-hg repository
427 initializing destination git-repo3-hg repository
428 scanning source...
428 scanning source...
429 sorting...
429 sorting...
430 converting...
430 converting...
431 0 addbinary
431 0 addbinary
432 updating bookmarks
432 updating bookmarks
433 $ cd git-repo3-hg
433 $ cd git-repo3-hg
434 $ hg up -C
434 $ hg up -C
435 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
435 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 $ $PYTHON -c 'print len(file("b", "rb").read())'
436 $ $PYTHON -c 'print len(file("b", "rb").read())'
437 4096
437 4096
438 $ cd ..
438 $ cd ..
439
439
440 test author vs committer
440 test author vs committer
441
441
442 $ mkdir git-repo4
442 $ mkdir git-repo4
443 $ cd git-repo4
443 $ cd git-repo4
444 $ git init-db >/dev/null 2>/dev/null
444 $ git init-db >/dev/null 2>/dev/null
445 $ echo >> foo
445 $ echo >> foo
446 $ git add foo
446 $ git add foo
447 $ commit -a -m addfoo
447 $ commit -a -m addfoo
448 $ echo >> foo
448 $ echo >> foo
449 $ GIT_AUTHOR_NAME="nottest"
449 $ GIT_AUTHOR_NAME="nottest"
450 $ commit -a -m addfoo2
450 $ commit -a -m addfoo2
451 $ cd ..
451 $ cd ..
452
452
453 convert author committer
453 convert author committer
454
454
455 $ hg convert git-repo4 git-repo4-hg
455 $ hg convert git-repo4 git-repo4-hg
456 initializing destination git-repo4-hg repository
456 initializing destination git-repo4-hg repository
457 scanning source...
457 scanning source...
458 sorting...
458 sorting...
459 converting...
459 converting...
460 1 addfoo
460 1 addfoo
461 0 addfoo2
461 0 addfoo2
462 updating bookmarks
462 updating bookmarks
463 $ hg -R git-repo4-hg log -v
463 $ hg -R git-repo4-hg log -v
464 changeset: 1:d63e967f93da
464 changeset: 1:d63e967f93da
465 bookmark: master
465 bookmark: master
466 tag: tip
466 tag: tip
467 user: nottest <test@example.org>
467 user: nottest <test@example.org>
468 date: Mon Jan 01 00:00:21 2007 +0000
468 date: Mon Jan 01 00:00:21 2007 +0000
469 files: foo
469 files: foo
470 description:
470 description:
471 addfoo2
471 addfoo2
472
472
473 committer: test <test@example.org>
473 committer: test <test@example.org>
474
474
475
475
476 changeset: 0:0735477b0224
476 changeset: 0:0735477b0224
477 user: test <test@example.org>
477 user: test <test@example.org>
478 date: Mon Jan 01 00:00:20 2007 +0000
478 date: Mon Jan 01 00:00:20 2007 +0000
479 files: foo
479 files: foo
480 description:
480 description:
481 addfoo
481 addfoo
482
482
483
483
484
484
485 --sourceorder should fail
485 --sourceorder should fail
486
486
487 $ hg convert --sourcesort git-repo4 git-repo4-sourcesort-hg
487 $ hg convert --sourcesort git-repo4 git-repo4-sourcesort-hg
488 initializing destination git-repo4-sourcesort-hg repository
488 initializing destination git-repo4-sourcesort-hg repository
489 abort: --sourcesort is not supported by this data source
489 abort: --sourcesort is not supported by this data source
490 [255]
490 [255]
491
491
492 test converting certain branches
492 test converting certain branches
493
493
494 $ mkdir git-testrevs
494 $ mkdir git-testrevs
495 $ cd git-testrevs
495 $ cd git-testrevs
496 $ git init
496 $ git init
497 Initialized empty Git repository in $TESTTMP/git-testrevs/.git/
497 Initialized empty Git repository in $TESTTMP/git-testrevs/.git/
498 $ echo a >> a ; git add a > /dev/null; git commit -m 'first' > /dev/null
498 $ echo a >> a ; git add a > /dev/null; git commit -m 'first' > /dev/null
499 $ echo a >> a ; git add a > /dev/null; git commit -m 'master commit' > /dev/null
499 $ echo a >> a ; git add a > /dev/null; git commit -m 'master commit' > /dev/null
500 $ git checkout -b goodbranch 'HEAD^'
500 $ git checkout -b goodbranch 'HEAD^'
501 Switched to a new branch 'goodbranch'
501 Switched to a new branch 'goodbranch'
502 $ echo a >> b ; git add b > /dev/null; git commit -m 'good branch commit' > /dev/null
502 $ echo a >> b ; git add b > /dev/null; git commit -m 'good branch commit' > /dev/null
503 $ git checkout -b badbranch 'HEAD^'
503 $ git checkout -b badbranch 'HEAD^'
504 Switched to a new branch 'badbranch'
504 Switched to a new branch 'badbranch'
505 $ echo a >> c ; git add c > /dev/null; git commit -m 'bad branch commit' > /dev/null
505 $ echo a >> c ; git add c > /dev/null; git commit -m 'bad branch commit' > /dev/null
506 $ cd ..
506 $ cd ..
507 $ hg convert git-testrevs hg-testrevs --rev master --rev goodbranch
507 $ hg convert git-testrevs hg-testrevs --rev master --rev goodbranch
508 initializing destination hg-testrevs repository
508 initializing destination hg-testrevs repository
509 scanning source...
509 scanning source...
510 sorting...
510 sorting...
511 converting...
511 converting...
512 2 first
512 2 first
513 1 good branch commit
513 1 good branch commit
514 0 master commit
514 0 master commit
515 updating bookmarks
515 updating bookmarks
516 $ cd hg-testrevs
516 $ cd hg-testrevs
517 $ hg log -G -T '{rev} {bookmarks}'
517 $ hg log -G -T '{rev} {bookmarks}'
518 o 2 master
518 o 2 master
519 |
519 |
520 | o 1 goodbranch
520 | o 1 goodbranch
521 |/
521 |/
522 o 0
522 o 0
523
523
524 $ cd ..
524 $ cd ..
525
525
526 test sub modules
526 test sub modules
527
527
528 $ mkdir git-repo5
528 $ mkdir git-repo5
529 $ cd git-repo5
529 $ cd git-repo5
530 $ git init-db >/dev/null 2>/dev/null
530 $ git init-db >/dev/null 2>/dev/null
531 $ echo 'sub' >> foo
531 $ echo 'sub' >> foo
532 $ git add foo
532 $ git add foo
533 $ commit -a -m 'addfoo'
533 $ commit -a -m 'addfoo'
534 $ BASE=`pwd`
534 $ BASE=`pwd`
535 $ cd ..
535 $ cd ..
536 $ mkdir git-repo6
536 $ mkdir git-repo6
537 $ cd git-repo6
537 $ cd git-repo6
538 $ git init-db >/dev/null 2>/dev/null
538 $ git init-db >/dev/null 2>/dev/null
539 $ git submodule add ${BASE} >/dev/null 2>/dev/null
539 $ git submodule add ${BASE} >/dev/null 2>/dev/null
540 $ commit -a -m 'addsubmodule' >/dev/null 2>/dev/null
540 $ commit -a -m 'addsubmodule' >/dev/null 2>/dev/null
541
541
542 test non-tab whitespace .gitmodules
542 test non-tab whitespace .gitmodules
543
543
544 $ cat >> .gitmodules <<EOF
544 $ cat >> .gitmodules <<EOF
545 > [submodule "git-repo5"]
545 > [submodule "git-repo5"]
546 > path = git-repo5
546 > path = git-repo5
547 > url = git-repo5
547 > url = git-repo5
548 > EOF
548 > EOF
549 $ git commit -q -a -m "weird white space submodule"
549 $ git commit -q -a -m "weird white space submodule"
550 $ cd ..
550 $ cd ..
551 $ hg convert git-repo6 hg-repo6
551 $ hg convert git-repo6 hg-repo6
552 initializing destination hg-repo6 repository
552 initializing destination hg-repo6 repository
553 scanning source...
553 scanning source...
554 sorting...
554 sorting...
555 converting...
555 converting...
556 1 addsubmodule
556 1 addsubmodule
557 0 weird white space submodule
557 0 weird white space submodule
558 updating bookmarks
558 updating bookmarks
559
559
560 $ rm -rf hg-repo6
560 $ rm -rf hg-repo6
561 $ cd git-repo6
561 $ cd git-repo6
562 $ git reset --hard 'HEAD^' > /dev/null
562 $ git reset --hard 'HEAD^' > /dev/null
563
563
564 test missing .gitmodules
564 test missing .gitmodules
565
565
566 $ git submodule add ../git-repo4 >/dev/null 2>/dev/null
566 $ git submodule add ../git-repo4 >/dev/null 2>/dev/null
567 $ git checkout HEAD .gitmodules
567 $ git checkout HEAD .gitmodules
568 $ git rm .gitmodules
568 $ git rm .gitmodules
569 rm '.gitmodules'
569 rm '.gitmodules'
570 $ git commit -q -m "remove .gitmodules" .gitmodules
570 $ git commit -q -m "remove .gitmodules" .gitmodules
571 $ git commit -q -m "missing .gitmodules"
571 $ git commit -q -m "missing .gitmodules"
572 $ cd ..
572 $ cd ..
573 $ hg convert git-repo6 hg-repo6 --traceback 2>&1 | grep -v "fatal: Path '.gitmodules' does not exist"
573 $ hg convert git-repo6 hg-repo6 --traceback 2>&1 | grep -v "fatal: Path '.gitmodules' does not exist"
574 initializing destination hg-repo6 repository
574 initializing destination hg-repo6 repository
575 scanning source...
575 scanning source...
576 sorting...
576 sorting...
577 converting...
577 converting...
578 2 addsubmodule
578 2 addsubmodule
579 1 remove .gitmodules
579 1 remove .gitmodules
580 0 missing .gitmodules
580 0 missing .gitmodules
581 warning: cannot read submodules config file in * (glob)
581 warning: cannot read submodules config file in * (glob)
582 updating bookmarks
582 updating bookmarks
583 $ rm -rf hg-repo6
583 $ rm -rf hg-repo6
584 $ cd git-repo6
584 $ cd git-repo6
585 $ rm -rf git-repo4
585 $ rm -rf git-repo4
586 $ git reset --hard 'HEAD^^' > /dev/null
586 $ git reset --hard 'HEAD^^' > /dev/null
587 $ cd ..
587 $ cd ..
588
588
589 test invalid splicemap1
589 test invalid splicemap1
590
590
591 $ cat > splicemap <<EOF
591 $ cat > splicemap <<EOF
592 > $VALIDID1
592 > $VALIDID1
593 > EOF
593 > EOF
594 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap1-hg
594 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap1-hg
595 initializing destination git-repo2-splicemap1-hg repository
595 initializing destination git-repo2-splicemap1-hg repository
596 abort: syntax error in splicemap(1): child parent1[,parent2] expected
596 abort: syntax error in splicemap(1): child parent1[,parent2] expected
597 [255]
597 [255]
598
598
599 test invalid splicemap2
599 test invalid splicemap2
600
600
601 $ cat > splicemap <<EOF
601 $ cat > splicemap <<EOF
602 > $VALIDID1 $VALIDID2, $VALIDID2, $VALIDID2
602 > $VALIDID1 $VALIDID2, $VALIDID2, $VALIDID2
603 > EOF
603 > EOF
604 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap2-hg
604 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap2-hg
605 initializing destination git-repo2-splicemap2-hg repository
605 initializing destination git-repo2-splicemap2-hg repository
606 abort: syntax error in splicemap(1): child parent1[,parent2] expected
606 abort: syntax error in splicemap(1): child parent1[,parent2] expected
607 [255]
607 [255]
608
608
609 test invalid splicemap3
609 test invalid splicemap3
610
610
611 $ cat > splicemap <<EOF
611 $ cat > splicemap <<EOF
612 > $INVALIDID1 $INVALIDID2
612 > $INVALIDID1 $INVALIDID2
613 > EOF
613 > EOF
614 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap3-hg
614 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap3-hg
615 initializing destination git-repo2-splicemap3-hg repository
615 initializing destination git-repo2-splicemap3-hg repository
616 abort: splicemap entry afd12345af is not a valid revision identifier
616 abort: splicemap entry afd12345af is not a valid revision identifier
617 [255]
617 [255]
618
618
619 convert sub modules
619 convert sub modules
620 $ hg convert git-repo6 git-repo6-hg
620 $ hg convert git-repo6 git-repo6-hg
621 initializing destination git-repo6-hg repository
621 initializing destination git-repo6-hg repository
622 scanning source...
622 scanning source...
623 sorting...
623 sorting...
624 converting...
624 converting...
625 0 addsubmodule
625 0 addsubmodule
626 updating bookmarks
626 updating bookmarks
627 $ hg -R git-repo6-hg log -v
627 $ hg -R git-repo6-hg log -v
628 changeset: 0:* (glob)
628 changeset: 0:* (glob)
629 bookmark: master
629 bookmark: master
630 tag: tip
630 tag: tip
631 user: nottest <test@example.org>
631 user: nottest <test@example.org>
632 date: Mon Jan 01 00:00:23 2007 +0000
632 date: Mon Jan 01 00:00:23 2007 +0000
633 files: .hgsub .hgsubstate
633 files: .hgsub .hgsubstate
634 description:
634 description:
635 addsubmodule
635 addsubmodule
636
636
637 committer: test <test@example.org>
637 committer: test <test@example.org>
638
638
639
639
640
640
641 $ cd git-repo6-hg
641 $ cd git-repo6-hg
642 $ hg up >/dev/null 2>/dev/null
642 $ hg up >/dev/null 2>/dev/null
643 $ cat .hgsubstate
643 $ cat .hgsubstate
644 * git-repo5 (glob)
644 * git-repo5 (glob)
645 $ cd git-repo5
645 $ cd git-repo5
646 $ cat foo
646 $ cat foo
647 sub
647 sub
648
648
649 $ cd ../..
649 $ cd ../..
650
650
651 make sure rename detection doesn't break removing and adding gitmodules
651 make sure rename detection doesn't break removing and adding gitmodules
652
652
653 $ cd git-repo6
653 $ cd git-repo6
654 $ git mv .gitmodules .gitmodules-renamed
654 $ git mv .gitmodules .gitmodules-renamed
655 $ commit -a -m 'rename .gitmodules'
655 $ commit -a -m 'rename .gitmodules'
656 $ git mv .gitmodules-renamed .gitmodules
656 $ git mv .gitmodules-renamed .gitmodules
657 $ commit -a -m 'rename .gitmodules back'
657 $ commit -a -m 'rename .gitmodules back'
658 $ cd ..
658 $ cd ..
659
659
660 $ hg --config convert.git.similarity=100 convert -q git-repo6 git-repo6-hg
660 $ hg --config convert.git.similarity=100 convert -q git-repo6 git-repo6-hg
661 $ hg -R git-repo6-hg log -r 'tip^' -T "{desc|firstline}\n"
661 $ hg -R git-repo6-hg log -r 'tip^' -T "{desc|firstline}\n"
662 rename .gitmodules
662 rename .gitmodules
663 $ hg -R git-repo6-hg status -C --change 'tip^'
663 $ hg -R git-repo6-hg status -C --change 'tip^'
664 A .gitmodules-renamed
664 A .gitmodules-renamed
665 R .hgsub
665 R .hgsub
666 R .hgsubstate
666 R .hgsubstate
667 $ hg -R git-repo6-hg log -r tip -T "{desc|firstline}\n"
667 $ hg -R git-repo6-hg log -r tip -T "{desc|firstline}\n"
668 rename .gitmodules back
668 rename .gitmodules back
669 $ hg -R git-repo6-hg status -C --change tip
669 $ hg -R git-repo6-hg status -C --change tip
670 A .hgsub
670 A .hgsub
671 A .hgsubstate
671 A .hgsubstate
672 R .gitmodules-renamed
672 R .gitmodules-renamed
673
673
674 convert the revision removing '.gitmodules' itself (and related
674 convert the revision removing '.gitmodules' itself (and related
675 submodules)
675 submodules)
676
676
677 $ cd git-repo6
677 $ cd git-repo6
678 $ git rm .gitmodules
678 $ git rm .gitmodules
679 rm '.gitmodules'
679 rm '.gitmodules'
680 $ git rm --cached git-repo5
680 $ git rm --cached git-repo5
681 rm 'git-repo5'
681 rm 'git-repo5'
682 $ commit -a -m 'remove .gitmodules and submodule git-repo5'
682 $ commit -a -m 'remove .gitmodules and submodule git-repo5'
683 $ cd ..
683 $ cd ..
684
684
685 $ hg convert -q git-repo6 git-repo6-hg
685 $ hg convert -q git-repo6 git-repo6-hg
686 $ hg -R git-repo6-hg tip -T "{desc|firstline}\n"
686 $ hg -R git-repo6-hg tip -T "{desc|firstline}\n"
687 remove .gitmodules and submodule git-repo5
687 remove .gitmodules and submodule git-repo5
688 $ hg -R git-repo6-hg tip -T "{file_dels}\n"
688 $ hg -R git-repo6-hg tip -T "{file_dels}\n"
689 .hgsub .hgsubstate
689 .hgsub .hgsubstate
690
690
691 skip submodules in the conversion
691 skip submodules in the conversion
692
692
693 $ hg convert -q git-repo6 no-submodules --config convert.git.skipsubmodules=True
693 $ hg convert -q git-repo6 no-submodules --config convert.git.skipsubmodules=True
694 $ hg -R no-submodules manifest --all
694 $ hg -R no-submodules manifest --all
695 .gitmodules-renamed
695 .gitmodules-renamed
696
696
697 convert using a different remote prefix
697 convert using a different remote prefix
698 $ git init git-repo7
698 $ git init git-repo7
699 Initialized empty Git repository in $TESTTMP/git-repo7/.git/
699 Initialized empty Git repository in $TESTTMP/git-repo7/.git/
700 $ cd git-repo7
700 $ cd git-repo7
701 TODO: it'd be nice to use (?) lines instead of grep -v to handle the
701 TODO: it'd be nice to use (?) lines instead of grep -v to handle the
702 git output variance, but that doesn't currently work in the middle of
702 git output variance, but that doesn't currently work in the middle of
703 a block, so do this for now.
703 a block, so do this for now.
704 $ touch a && git add a && git commit -am "commit a" | grep -v changed
704 $ touch a && git add a && git commit -am "commit a" | grep -v changed
705 [master (root-commit) 8ae5f69] commit a
705 [master (root-commit) 8ae5f69] commit a
706 Author: nottest <test@example.org>
706 Author: nottest <test@example.org>
707 create mode 100644 a
707 create mode 100644 a
708 $ cd ..
708 $ cd ..
709 $ git clone git-repo7 git-repo7-client
709 $ git clone git-repo7 git-repo7-client
710 Cloning into 'git-repo7-client'...
710 Cloning into 'git-repo7-client'...
711 done.
711 done.
712 $ hg convert --config convert.git.remoteprefix=origin git-repo7-client hg-repo7
712 $ hg convert --config convert.git.remoteprefix=origin git-repo7-client hg-repo7
713 initializing destination hg-repo7 repository
713 initializing destination hg-repo7 repository
714 scanning source...
714 scanning source...
715 sorting...
715 sorting...
716 converting...
716 converting...
717 0 commit a
717 0 commit a
718 updating bookmarks
718 updating bookmarks
719 $ hg -R hg-repo7 bookmarks
719 $ hg -R hg-repo7 bookmarks
720 master 0:03bf38caa4c6
720 master 0:03bf38caa4c6
721 origin/master 0:03bf38caa4c6
721 origin/master 0:03bf38caa4c6
722
722
723 Run convert when the remote branches have changed
723 Run convert when the remote branches have changed
724 (there was an old bug where the local convert read branches from the server)
724 (there was an old bug where the local convert read branches from the server)
725
725
726 $ cd git-repo7
726 $ cd git-repo7
727 $ echo a >> a
727 $ echo a >> a
728 $ git commit -q -am "move master forward"
728 $ git commit -q -am "move master forward"
729 $ cd ..
729 $ cd ..
730 $ rm -rf hg-repo7
730 $ rm -rf hg-repo7
731 $ hg convert --config convert.git.remoteprefix=origin git-repo7-client hg-repo7
731 $ hg convert --config convert.git.remoteprefix=origin git-repo7-client hg-repo7
732 initializing destination hg-repo7 repository
732 initializing destination hg-repo7 repository
733 scanning source...
733 scanning source...
734 sorting...
734 sorting...
735 converting...
735 converting...
736 0 commit a
736 0 commit a
737 updating bookmarks
737 updating bookmarks
738 $ hg -R hg-repo7 bookmarks
738 $ hg -R hg-repo7 bookmarks
739 master 0:03bf38caa4c6
739 master 0:03bf38caa4c6
740 origin/master 0:03bf38caa4c6
740 origin/master 0:03bf38caa4c6
741
741
742 damaged git repository tests:
742 damaged git repository tests:
743 In case the hard-coded hashes change, the following commands can be used to
743 In case the hard-coded hashes change, the following commands can be used to
744 list the hashes and their corresponding types in the repository:
744 list the hashes and their corresponding types in the repository:
745 cd git-repo4/.git/objects
745 cd git-repo4/.git/objects
746 find . -type f | cut -c 3- | sed 's_/__' | xargs -n 1 -t git cat-file -t
746 find . -type f | cut -c 3- | sed 's_/__' | xargs -n 1 -t git cat-file -t
747 cd ../../..
747 cd ../../..
748
748
749 damage git repository by renaming a commit object
749 damage git repository by renaming a commit object
750 $ COMMIT_OBJ=1c/0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd
750 $ COMMIT_OBJ=1c/0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd
751 $ mv git-repo4/.git/objects/$COMMIT_OBJ git-repo4/.git/objects/$COMMIT_OBJ.tmp
751 $ mv git-repo4/.git/objects/$COMMIT_OBJ git-repo4/.git/objects/$COMMIT_OBJ.tmp
752 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
752 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
753 abort: cannot retrieve number of commits in $TESTTMP/git-repo4/.git
753 abort: cannot retrieve number of commits in $TESTTMP/git-repo4/.git (glob)
754 $ mv git-repo4/.git/objects/$COMMIT_OBJ.tmp git-repo4/.git/objects/$COMMIT_OBJ
754 $ mv git-repo4/.git/objects/$COMMIT_OBJ.tmp git-repo4/.git/objects/$COMMIT_OBJ
755 damage git repository by renaming a blob object
755 damage git repository by renaming a blob object
756
756
757 $ BLOB_OBJ=8b/137891791fe96927ad78e64b0aad7bded08bdc
757 $ BLOB_OBJ=8b/137891791fe96927ad78e64b0aad7bded08bdc
758 $ mv git-repo4/.git/objects/$BLOB_OBJ git-repo4/.git/objects/$BLOB_OBJ.tmp
758 $ mv git-repo4/.git/objects/$BLOB_OBJ git-repo4/.git/objects/$BLOB_OBJ.tmp
759 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
759 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
760 abort: cannot read 'blob' object at 8b137891791fe96927ad78e64b0aad7bded08bdc
760 abort: cannot read 'blob' object at 8b137891791fe96927ad78e64b0aad7bded08bdc
761 $ mv git-repo4/.git/objects/$BLOB_OBJ.tmp git-repo4/.git/objects/$BLOB_OBJ
761 $ mv git-repo4/.git/objects/$BLOB_OBJ.tmp git-repo4/.git/objects/$BLOB_OBJ
762 damage git repository by renaming a tree object
762 damage git repository by renaming a tree object
763
763
764 $ TREE_OBJ=72/49f083d2a63a41cc737764a86981eb5f3e4635
764 $ TREE_OBJ=72/49f083d2a63a41cc737764a86981eb5f3e4635
765 $ mv git-repo4/.git/objects/$TREE_OBJ git-repo4/.git/objects/$TREE_OBJ.tmp
765 $ mv git-repo4/.git/objects/$TREE_OBJ git-repo4/.git/objects/$TREE_OBJ.tmp
766 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
766 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
767 abort: cannot read changes in 1c0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd
767 abort: cannot read changes in 1c0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd
768
768
769 #if no-windows
769 #if no-windows
770
770
771 test for escaping the repo name (CVE-2016-3069)
771 test for escaping the repo name (CVE-2016-3069)
772
772
773 $ git init '`echo pwned >COMMAND-INJECTION`'
773 $ git init '`echo pwned >COMMAND-INJECTION`'
774 Initialized empty Git repository in $TESTTMP/`echo pwned >COMMAND-INJECTION`/.git/
774 Initialized empty Git repository in $TESTTMP/`echo pwned >COMMAND-INJECTION`/.git/
775 $ cd '`echo pwned >COMMAND-INJECTION`'
775 $ cd '`echo pwned >COMMAND-INJECTION`'
776 $ git commit -q --allow-empty -m 'empty'
776 $ git commit -q --allow-empty -m 'empty'
777 $ cd ..
777 $ cd ..
778 $ hg convert '`echo pwned >COMMAND-INJECTION`' 'converted'
778 $ hg convert '`echo pwned >COMMAND-INJECTION`' 'converted'
779 initializing destination converted repository
779 initializing destination converted repository
780 scanning source...
780 scanning source...
781 sorting...
781 sorting...
782 converting...
782 converting...
783 0 empty
783 0 empty
784 updating bookmarks
784 updating bookmarks
785 $ test -f COMMAND-INJECTION
785 $ test -f COMMAND-INJECTION
786 [1]
786 [1]
787
787
788 test for safely passing paths to git (CVE-2016-3105)
788 test for safely passing paths to git (CVE-2016-3105)
789
789
790 $ git init 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
790 $ git init 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
791 Initialized empty Git repository in $TESTTMP/ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #/.git/
791 Initialized empty Git repository in $TESTTMP/ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #/.git/
792 $ cd 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
792 $ cd 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
793 $ git commit -q --allow-empty -m 'empty'
793 $ git commit -q --allow-empty -m 'empty'
794 $ cd ..
794 $ cd ..
795 $ hg convert 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #' 'converted-git-ext'
795 $ hg convert 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #' 'converted-git-ext'
796 initializing destination converted-git-ext repository
796 initializing destination converted-git-ext repository
797 scanning source...
797 scanning source...
798 sorting...
798 sorting...
799 converting...
799 converting...
800 0 empty
800 0 empty
801 updating bookmarks
801 updating bookmarks
802 $ test -f GIT-EXT-COMMAND-INJECTION
802 $ test -f GIT-EXT-COMMAND-INJECTION
803 [1]
803 [1]
804
804
805 #endif
805 #endif
806
806
807 Conversion of extra commit metadata to extras works
807 Conversion of extra commit metadata to extras works
808
808
809 $ git init gitextras >/dev/null 2>/dev/null
809 $ git init gitextras >/dev/null 2>/dev/null
810 $ cd gitextras
810 $ cd gitextras
811 $ touch foo
811 $ touch foo
812 $ git add foo
812 $ git add foo
813 $ commit -m initial
813 $ commit -m initial
814 $ echo 1 > foo
814 $ echo 1 > foo
815 $ tree=`git write-tree`
815 $ tree=`git write-tree`
816
816
817 Git doesn't provider a user-facing API to write extra metadata into the
817 Git doesn't provider a user-facing API to write extra metadata into the
818 commit, so create the commit object by hand
818 commit, so create the commit object by hand
819
819
820 $ git hash-object -t commit -w --stdin << EOF
820 $ git hash-object -t commit -w --stdin << EOF
821 > tree ${tree}
821 > tree ${tree}
822 > parent ba6b1344e977ece9e00958dbbf17f1f09384b2c1
822 > parent ba6b1344e977ece9e00958dbbf17f1f09384b2c1
823 > author test <test@example.com> 1000000000 +0000
823 > author test <test@example.com> 1000000000 +0000
824 > committer test <test@example.com> 1000000000 +0000
824 > committer test <test@example.com> 1000000000 +0000
825 > extra-1 extra-1
825 > extra-1 extra-1
826 > extra-2 extra-2 with space
826 > extra-2 extra-2 with space
827 > convert_revision 0000aaaabbbbccccddddeeee
827 > convert_revision 0000aaaabbbbccccddddeeee
828 >
828 >
829 > message with extras
829 > message with extras
830 > EOF
830 > EOF
831 8123727c8361a4117d1a2d80e0c4e7d70c757f18
831 8123727c8361a4117d1a2d80e0c4e7d70c757f18
832
832
833 $ git reset --hard 8123727c8361a4117d1a2d80e0c4e7d70c757f18 > /dev/null
833 $ git reset --hard 8123727c8361a4117d1a2d80e0c4e7d70c757f18 > /dev/null
834
834
835 $ cd ..
835 $ cd ..
836
836
837 convert will not retain custom metadata keys by default
837 convert will not retain custom metadata keys by default
838
838
839 $ hg convert gitextras hgextras1
839 $ hg convert gitextras hgextras1
840 initializing destination hgextras1 repository
840 initializing destination hgextras1 repository
841 scanning source...
841 scanning source...
842 sorting...
842 sorting...
843 converting...
843 converting...
844 1 initial
844 1 initial
845 0 message with extras
845 0 message with extras
846 updating bookmarks
846 updating bookmarks
847
847
848 $ hg -R hgextras1 log --debug -r 1
848 $ hg -R hgextras1 log --debug -r 1
849 changeset: 1:e13a39880f68479127b2a80fa0b448cc8524aa09
849 changeset: 1:e13a39880f68479127b2a80fa0b448cc8524aa09
850 bookmark: master
850 bookmark: master
851 tag: tip
851 tag: tip
852 phase: draft
852 phase: draft
853 parent: 0:dcb68977c55cd02cbd13b901df65c4b6e7b9c4b9
853 parent: 0:dcb68977c55cd02cbd13b901df65c4b6e7b9c4b9
854 parent: -1:0000000000000000000000000000000000000000
854 parent: -1:0000000000000000000000000000000000000000
855 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
855 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
856 user: test <test@example.com>
856 user: test <test@example.com>
857 date: Sun Sep 09 01:46:40 2001 +0000
857 date: Sun Sep 09 01:46:40 2001 +0000
858 extra: branch=default
858 extra: branch=default
859 extra: convert_revision=8123727c8361a4117d1a2d80e0c4e7d70c757f18
859 extra: convert_revision=8123727c8361a4117d1a2d80e0c4e7d70c757f18
860 description:
860 description:
861 message with extras
861 message with extras
862
862
863
863
864
864
865 Attempting to convert a banned extra is disallowed
865 Attempting to convert a banned extra is disallowed
866
866
867 $ hg convert --config convert.git.extrakeys=tree,parent gitextras hgextras-banned
867 $ hg convert --config convert.git.extrakeys=tree,parent gitextras hgextras-banned
868 initializing destination hgextras-banned repository
868 initializing destination hgextras-banned repository
869 abort: copying of extra key is forbidden: parent, tree
869 abort: copying of extra key is forbidden: parent, tree
870 [255]
870 [255]
871
871
872 Converting a specific extra works
872 Converting a specific extra works
873
873
874 $ hg convert --config convert.git.extrakeys=extra-1 gitextras hgextras2
874 $ hg convert --config convert.git.extrakeys=extra-1 gitextras hgextras2
875 initializing destination hgextras2 repository
875 initializing destination hgextras2 repository
876 scanning source...
876 scanning source...
877 sorting...
877 sorting...
878 converting...
878 converting...
879 1 initial
879 1 initial
880 0 message with extras
880 0 message with extras
881 updating bookmarks
881 updating bookmarks
882
882
883 $ hg -R hgextras2 log --debug -r 1
883 $ hg -R hgextras2 log --debug -r 1
884 changeset: 1:d40fb205d58597e6ecfd55b16f198be5bf436391
884 changeset: 1:d40fb205d58597e6ecfd55b16f198be5bf436391
885 bookmark: master
885 bookmark: master
886 tag: tip
886 tag: tip
887 phase: draft
887 phase: draft
888 parent: 0:dcb68977c55cd02cbd13b901df65c4b6e7b9c4b9
888 parent: 0:dcb68977c55cd02cbd13b901df65c4b6e7b9c4b9
889 parent: -1:0000000000000000000000000000000000000000
889 parent: -1:0000000000000000000000000000000000000000
890 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
890 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
891 user: test <test@example.com>
891 user: test <test@example.com>
892 date: Sun Sep 09 01:46:40 2001 +0000
892 date: Sun Sep 09 01:46:40 2001 +0000
893 extra: branch=default
893 extra: branch=default
894 extra: convert_revision=8123727c8361a4117d1a2d80e0c4e7d70c757f18
894 extra: convert_revision=8123727c8361a4117d1a2d80e0c4e7d70c757f18
895 extra: extra-1=extra-1
895 extra: extra-1=extra-1
896 description:
896 description:
897 message with extras
897 message with extras
898
898
899
899
900
900
901 Converting multiple extras works
901 Converting multiple extras works
902
902
903 $ hg convert --config convert.git.extrakeys=extra-1,extra-2 gitextras hgextras3
903 $ hg convert --config convert.git.extrakeys=extra-1,extra-2 gitextras hgextras3
904 initializing destination hgextras3 repository
904 initializing destination hgextras3 repository
905 scanning source...
905 scanning source...
906 sorting...
906 sorting...
907 converting...
907 converting...
908 1 initial
908 1 initial
909 0 message with extras
909 0 message with extras
910 updating bookmarks
910 updating bookmarks
911
911
912 $ hg -R hgextras3 log --debug -r 1
912 $ hg -R hgextras3 log --debug -r 1
913 changeset: 1:0105af33379e7b6491501fd34141b7af700fe125
913 changeset: 1:0105af33379e7b6491501fd34141b7af700fe125
914 bookmark: master
914 bookmark: master
915 tag: tip
915 tag: tip
916 phase: draft
916 phase: draft
917 parent: 0:dcb68977c55cd02cbd13b901df65c4b6e7b9c4b9
917 parent: 0:dcb68977c55cd02cbd13b901df65c4b6e7b9c4b9
918 parent: -1:0000000000000000000000000000000000000000
918 parent: -1:0000000000000000000000000000000000000000
919 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
919 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
920 user: test <test@example.com>
920 user: test <test@example.com>
921 date: Sun Sep 09 01:46:40 2001 +0000
921 date: Sun Sep 09 01:46:40 2001 +0000
922 extra: branch=default
922 extra: branch=default
923 extra: convert_revision=8123727c8361a4117d1a2d80e0c4e7d70c757f18
923 extra: convert_revision=8123727c8361a4117d1a2d80e0c4e7d70c757f18
924 extra: extra-1=extra-1
924 extra: extra-1=extra-1
925 extra: extra-2=extra-2 with space
925 extra: extra-2=extra-2 with space
926 description:
926 description:
927 message with extras
927 message with extras
928
928
929
929
930
930
931 convert.git.saverev can be disabled to prevent convert_revision from being written
931 convert.git.saverev can be disabled to prevent convert_revision from being written
932
932
933 $ hg convert --config convert.git.saverev=false gitextras hgextras4
933 $ hg convert --config convert.git.saverev=false gitextras hgextras4
934 initializing destination hgextras4 repository
934 initializing destination hgextras4 repository
935 scanning source...
935 scanning source...
936 sorting...
936 sorting...
937 converting...
937 converting...
938 1 initial
938 1 initial
939 0 message with extras
939 0 message with extras
940 updating bookmarks
940 updating bookmarks
941
941
942 $ hg -R hgextras4 log --debug -r 1
942 $ hg -R hgextras4 log --debug -r 1
943 changeset: 1:1dcaf4ffe5bee43fa86db2800821f6f0af212c5c
943 changeset: 1:1dcaf4ffe5bee43fa86db2800821f6f0af212c5c
944 bookmark: master
944 bookmark: master
945 tag: tip
945 tag: tip
946 phase: draft
946 phase: draft
947 parent: 0:a13935fec4daf06a5a87a7307ccb0fc94f98d06d
947 parent: 0:a13935fec4daf06a5a87a7307ccb0fc94f98d06d
948 parent: -1:0000000000000000000000000000000000000000
948 parent: -1:0000000000000000000000000000000000000000
949 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
949 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
950 user: test <test@example.com>
950 user: test <test@example.com>
951 date: Sun Sep 09 01:46:40 2001 +0000
951 date: Sun Sep 09 01:46:40 2001 +0000
952 extra: branch=default
952 extra: branch=default
953 description:
953 description:
954 message with extras
954 message with extras
955
955
956
956
957
957
958 convert.git.saverev and convert.git.extrakeys can be combined to preserve
958 convert.git.saverev and convert.git.extrakeys can be combined to preserve
959 convert_revision from source
959 convert_revision from source
960
960
961 $ hg convert --config convert.git.saverev=false --config convert.git.extrakeys=convert_revision gitextras hgextras5
961 $ hg convert --config convert.git.saverev=false --config convert.git.extrakeys=convert_revision gitextras hgextras5
962 initializing destination hgextras5 repository
962 initializing destination hgextras5 repository
963 scanning source...
963 scanning source...
964 sorting...
964 sorting...
965 converting...
965 converting...
966 1 initial
966 1 initial
967 0 message with extras
967 0 message with extras
968 updating bookmarks
968 updating bookmarks
969
969
970 $ hg -R hgextras5 log --debug -r 1
970 $ hg -R hgextras5 log --debug -r 1
971 changeset: 1:574d85931544d4542007664fee3747360e85ee28
971 changeset: 1:574d85931544d4542007664fee3747360e85ee28
972 bookmark: master
972 bookmark: master
973 tag: tip
973 tag: tip
974 phase: draft
974 phase: draft
975 parent: 0:a13935fec4daf06a5a87a7307ccb0fc94f98d06d
975 parent: 0:a13935fec4daf06a5a87a7307ccb0fc94f98d06d
976 parent: -1:0000000000000000000000000000000000000000
976 parent: -1:0000000000000000000000000000000000000000
977 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
977 manifest: 0:6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50
978 user: test <test@example.com>
978 user: test <test@example.com>
979 date: Sun Sep 09 01:46:40 2001 +0000
979 date: Sun Sep 09 01:46:40 2001 +0000
980 extra: branch=default
980 extra: branch=default
981 extra: convert_revision=0000aaaabbbbccccddddeeee
981 extra: convert_revision=0000aaaabbbbccccddddeeee
982 description:
982 description:
983 message with extras
983 message with extras
984
984
985
985
@@ -1,1778 +1,1778 b''
1 Let commit recurse into subrepos by default to match pre-2.0 behavior:
1 Let commit recurse into subrepos by default to match pre-2.0 behavior:
2
2
3 $ echo "[ui]" >> $HGRCPATH
3 $ echo "[ui]" >> $HGRCPATH
4 $ echo "commitsubrepos = Yes" >> $HGRCPATH
4 $ echo "commitsubrepos = Yes" >> $HGRCPATH
5
5
6 $ hg init t
6 $ hg init t
7 $ cd t
7 $ cd t
8
8
9 first revision, no sub
9 first revision, no sub
10
10
11 $ echo a > a
11 $ echo a > a
12 $ hg ci -Am0
12 $ hg ci -Am0
13 adding a
13 adding a
14
14
15 add first sub
15 add first sub
16
16
17 $ echo s = s > .hgsub
17 $ echo s = s > .hgsub
18 $ hg add .hgsub
18 $ hg add .hgsub
19 $ hg init s
19 $ hg init s
20 $ echo a > s/a
20 $ echo a > s/a
21
21
22 Issue2232: committing a subrepo without .hgsub
22 Issue2232: committing a subrepo without .hgsub
23
23
24 $ hg ci -mbad s
24 $ hg ci -mbad s
25 abort: can't commit subrepos without .hgsub
25 abort: can't commit subrepos without .hgsub
26 [255]
26 [255]
27
27
28 $ hg -R s add s/a
28 $ hg -R s add s/a
29 $ hg files -S
29 $ hg files -S
30 .hgsub
30 .hgsub
31 a
31 a
32 s/a (glob)
32 s/a (glob)
33
33
34 $ hg -R s ci -Ams0
34 $ hg -R s ci -Ams0
35 $ hg sum
35 $ hg sum
36 parent: 0:f7b1eb17ad24 tip
36 parent: 0:f7b1eb17ad24 tip
37 0
37 0
38 branch: default
38 branch: default
39 commit: 1 added, 1 subrepos
39 commit: 1 added, 1 subrepos
40 update: (current)
40 update: (current)
41 phases: 1 draft
41 phases: 1 draft
42 $ hg ci -m1
42 $ hg ci -m1
43
43
44 test handling .hgsubstate "added" explicitly.
44 test handling .hgsubstate "added" explicitly.
45
45
46 $ hg parents --template '{node}\n{files}\n'
46 $ hg parents --template '{node}\n{files}\n'
47 7cf8cfea66e410e8e3336508dfeec07b3192de51
47 7cf8cfea66e410e8e3336508dfeec07b3192de51
48 .hgsub .hgsubstate
48 .hgsub .hgsubstate
49 $ hg rollback -q
49 $ hg rollback -q
50 $ hg add .hgsubstate
50 $ hg add .hgsubstate
51 $ hg ci -m1
51 $ hg ci -m1
52 $ hg parents --template '{node}\n{files}\n'
52 $ hg parents --template '{node}\n{files}\n'
53 7cf8cfea66e410e8e3336508dfeec07b3192de51
53 7cf8cfea66e410e8e3336508dfeec07b3192de51
54 .hgsub .hgsubstate
54 .hgsub .hgsubstate
55
55
56 Subrepopath which overlaps with filepath, does not change warnings in remove()
56 Subrepopath which overlaps with filepath, does not change warnings in remove()
57
57
58 $ mkdir snot
58 $ mkdir snot
59 $ touch snot/file
59 $ touch snot/file
60 $ hg remove -S snot/file
60 $ hg remove -S snot/file
61 not removing snot/file: file is untracked
61 not removing snot/file: file is untracked (glob)
62 [1]
62 [1]
63 $ hg cat snot/filenot
63 $ hg cat snot/filenot
64 snot/filenot: no such file in rev 7cf8cfea66e4
64 snot/filenot: no such file in rev 7cf8cfea66e4 (glob)
65 [1]
65 [1]
66 $ rm -r snot
66 $ rm -r snot
67
67
68 Revert subrepo and test subrepo fileset keyword:
68 Revert subrepo and test subrepo fileset keyword:
69
69
70 $ echo b > s/a
70 $ echo b > s/a
71 $ hg revert --dry-run "set:subrepo('glob:s*')"
71 $ hg revert --dry-run "set:subrepo('glob:s*')"
72 reverting subrepo s
72 reverting subrepo s
73 reverting s/a (glob)
73 reverting s/a (glob)
74 $ cat s/a
74 $ cat s/a
75 b
75 b
76 $ hg revert "set:subrepo('glob:s*')"
76 $ hg revert "set:subrepo('glob:s*')"
77 reverting subrepo s
77 reverting subrepo s
78 reverting s/a (glob)
78 reverting s/a (glob)
79 $ cat s/a
79 $ cat s/a
80 a
80 a
81 $ rm s/a.orig
81 $ rm s/a.orig
82
82
83 Revert subrepo with no backup. The "reverting s/a" line is gone since
83 Revert subrepo with no backup. The "reverting s/a" line is gone since
84 we're really running 'hg update' in the subrepo:
84 we're really running 'hg update' in the subrepo:
85
85
86 $ echo b > s/a
86 $ echo b > s/a
87 $ hg revert --no-backup s
87 $ hg revert --no-backup s
88 reverting subrepo s
88 reverting subrepo s
89
89
90 Issue2022: update -C
90 Issue2022: update -C
91
91
92 $ echo b > s/a
92 $ echo b > s/a
93 $ hg sum
93 $ hg sum
94 parent: 1:7cf8cfea66e4 tip
94 parent: 1:7cf8cfea66e4 tip
95 1
95 1
96 branch: default
96 branch: default
97 commit: 1 subrepos
97 commit: 1 subrepos
98 update: (current)
98 update: (current)
99 phases: 2 draft
99 phases: 2 draft
100 $ hg co -C 1
100 $ hg co -C 1
101 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
102 $ hg sum
102 $ hg sum
103 parent: 1:7cf8cfea66e4 tip
103 parent: 1:7cf8cfea66e4 tip
104 1
104 1
105 branch: default
105 branch: default
106 commit: (clean)
106 commit: (clean)
107 update: (current)
107 update: (current)
108 phases: 2 draft
108 phases: 2 draft
109
109
110 commands that require a clean repo should respect subrepos
110 commands that require a clean repo should respect subrepos
111
111
112 $ echo b >> s/a
112 $ echo b >> s/a
113 $ hg backout tip
113 $ hg backout tip
114 abort: uncommitted changes in subrepository 's'
114 abort: uncommitted changes in subrepository 's'
115 [255]
115 [255]
116 $ hg revert -C -R s s/a
116 $ hg revert -C -R s s/a
117
117
118 add sub sub
118 add sub sub
119
119
120 $ echo ss = ss > s/.hgsub
120 $ echo ss = ss > s/.hgsub
121 $ hg init s/ss
121 $ hg init s/ss
122 $ echo a > s/ss/a
122 $ echo a > s/ss/a
123 $ hg -R s add s/.hgsub
123 $ hg -R s add s/.hgsub
124 $ hg -R s/ss add s/ss/a
124 $ hg -R s/ss add s/ss/a
125 $ hg sum
125 $ hg sum
126 parent: 1:7cf8cfea66e4 tip
126 parent: 1:7cf8cfea66e4 tip
127 1
127 1
128 branch: default
128 branch: default
129 commit: 1 subrepos
129 commit: 1 subrepos
130 update: (current)
130 update: (current)
131 phases: 2 draft
131 phases: 2 draft
132 $ hg ci -m2
132 $ hg ci -m2
133 committing subrepository s
133 committing subrepository s
134 committing subrepository s/ss (glob)
134 committing subrepository s/ss (glob)
135 $ hg sum
135 $ hg sum
136 parent: 2:df30734270ae tip
136 parent: 2:df30734270ae tip
137 2
137 2
138 branch: default
138 branch: default
139 commit: (clean)
139 commit: (clean)
140 update: (current)
140 update: (current)
141 phases: 3 draft
141 phases: 3 draft
142
142
143 test handling .hgsubstate "modified" explicitly.
143 test handling .hgsubstate "modified" explicitly.
144
144
145 $ hg parents --template '{node}\n{files}\n'
145 $ hg parents --template '{node}\n{files}\n'
146 df30734270ae757feb35e643b7018e818e78a9aa
146 df30734270ae757feb35e643b7018e818e78a9aa
147 .hgsubstate
147 .hgsubstate
148 $ hg rollback -q
148 $ hg rollback -q
149 $ hg status -A .hgsubstate
149 $ hg status -A .hgsubstate
150 M .hgsubstate
150 M .hgsubstate
151 $ hg ci -m2
151 $ hg ci -m2
152 $ hg parents --template '{node}\n{files}\n'
152 $ hg parents --template '{node}\n{files}\n'
153 df30734270ae757feb35e643b7018e818e78a9aa
153 df30734270ae757feb35e643b7018e818e78a9aa
154 .hgsubstate
154 .hgsubstate
155
155
156 bump sub rev (and check it is ignored by ui.commitsubrepos)
156 bump sub rev (and check it is ignored by ui.commitsubrepos)
157
157
158 $ echo b > s/a
158 $ echo b > s/a
159 $ hg -R s ci -ms1
159 $ hg -R s ci -ms1
160 $ hg --config ui.commitsubrepos=no ci -m3
160 $ hg --config ui.commitsubrepos=no ci -m3
161
161
162 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
162 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
163
163
164 $ echo c > s/a
164 $ echo c > s/a
165 $ hg --config ui.commitsubrepos=no ci -m4
165 $ hg --config ui.commitsubrepos=no ci -m4
166 abort: uncommitted changes in subrepository 's'
166 abort: uncommitted changes in subrepository 's'
167 (use --subrepos for recursive commit)
167 (use --subrepos for recursive commit)
168 [255]
168 [255]
169 $ hg id
169 $ hg id
170 f6affe3fbfaa+ tip
170 f6affe3fbfaa+ tip
171 $ hg -R s ci -mc
171 $ hg -R s ci -mc
172 $ hg id
172 $ hg id
173 f6affe3fbfaa+ tip
173 f6affe3fbfaa+ tip
174 $ echo d > s/a
174 $ echo d > s/a
175 $ hg ci -m4
175 $ hg ci -m4
176 committing subrepository s
176 committing subrepository s
177 $ hg tip -R s
177 $ hg tip -R s
178 changeset: 4:02dcf1d70411
178 changeset: 4:02dcf1d70411
179 tag: tip
179 tag: tip
180 user: test
180 user: test
181 date: Thu Jan 01 00:00:00 1970 +0000
181 date: Thu Jan 01 00:00:00 1970 +0000
182 summary: 4
182 summary: 4
183
183
184
184
185 check caching
185 check caching
186
186
187 $ hg co 0
187 $ hg co 0
188 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
188 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
189 $ hg debugsub
189 $ hg debugsub
190
190
191 restore
191 restore
192
192
193 $ hg co
193 $ hg co
194 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
195 $ hg debugsub
195 $ hg debugsub
196 path s
196 path s
197 source s
197 source s
198 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
198 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
199
199
200 new branch for merge tests
200 new branch for merge tests
201
201
202 $ hg co 1
202 $ hg co 1
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
204 $ echo t = t >> .hgsub
204 $ echo t = t >> .hgsub
205 $ hg init t
205 $ hg init t
206 $ echo t > t/t
206 $ echo t > t/t
207 $ hg -R t add t
207 $ hg -R t add t
208 adding t/t (glob)
208 adding t/t (glob)
209
209
210 5
210 5
211
211
212 $ hg ci -m5 # add sub
212 $ hg ci -m5 # add sub
213 committing subrepository t
213 committing subrepository t
214 created new head
214 created new head
215 $ echo t2 > t/t
215 $ echo t2 > t/t
216
216
217 6
217 6
218
218
219 $ hg st -R s
219 $ hg st -R s
220 $ hg ci -m6 # change sub
220 $ hg ci -m6 # change sub
221 committing subrepository t
221 committing subrepository t
222 $ hg debugsub
222 $ hg debugsub
223 path s
223 path s
224 source s
224 source s
225 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
225 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
226 path t
226 path t
227 source t
227 source t
228 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
228 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
229 $ echo t3 > t/t
229 $ echo t3 > t/t
230
230
231 7
231 7
232
232
233 $ hg ci -m7 # change sub again for conflict test
233 $ hg ci -m7 # change sub again for conflict test
234 committing subrepository t
234 committing subrepository t
235 $ hg rm .hgsub
235 $ hg rm .hgsub
236
236
237 8
237 8
238
238
239 $ hg ci -m8 # remove sub
239 $ hg ci -m8 # remove sub
240
240
241 test handling .hgsubstate "removed" explicitly.
241 test handling .hgsubstate "removed" explicitly.
242
242
243 $ hg parents --template '{node}\n{files}\n'
243 $ hg parents --template '{node}\n{files}\n'
244 96615c1dad2dc8e3796d7332c77ce69156f7b78e
244 96615c1dad2dc8e3796d7332c77ce69156f7b78e
245 .hgsub .hgsubstate
245 .hgsub .hgsubstate
246 $ hg rollback -q
246 $ hg rollback -q
247 $ hg remove .hgsubstate
247 $ hg remove .hgsubstate
248 $ hg ci -m8
248 $ hg ci -m8
249 $ hg parents --template '{node}\n{files}\n'
249 $ hg parents --template '{node}\n{files}\n'
250 96615c1dad2dc8e3796d7332c77ce69156f7b78e
250 96615c1dad2dc8e3796d7332c77ce69156f7b78e
251 .hgsub .hgsubstate
251 .hgsub .hgsubstate
252
252
253 merge tests
253 merge tests
254
254
255 $ hg co -C 3
255 $ hg co -C 3
256 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
257 $ hg merge 5 # test adding
257 $ hg merge 5 # test adding
258 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 (branch merge, don't forget to commit)
259 (branch merge, don't forget to commit)
260 $ hg debugsub
260 $ hg debugsub
261 path s
261 path s
262 source s
262 source s
263 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
263 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
264 path t
264 path t
265 source t
265 source t
266 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
266 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
267 $ hg ci -m9
267 $ hg ci -m9
268 created new head
268 created new head
269 $ hg merge 6 --debug # test change
269 $ hg merge 6 --debug # test change
270 searching for copies back to rev 2
270 searching for copies back to rev 2
271 resolving manifests
271 resolving manifests
272 branchmerge: True, force: False, partial: False
272 branchmerge: True, force: False, partial: False
273 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
273 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
274 starting 4 threads for background file closing (?)
274 starting 4 threads for background file closing (?)
275 .hgsubstate: versions differ -> m (premerge)
275 .hgsubstate: versions differ -> m (premerge)
276 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
276 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
277 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
277 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
278 getting subrepo t
278 getting subrepo t
279 resolving manifests
279 resolving manifests
280 branchmerge: False, force: False, partial: False
280 branchmerge: False, force: False, partial: False
281 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
281 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
282 t: remote is newer -> g
282 t: remote is newer -> g
283 getting t
283 getting t
284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 (branch merge, don't forget to commit)
285 (branch merge, don't forget to commit)
286 $ hg debugsub
286 $ hg debugsub
287 path s
287 path s
288 source s
288 source s
289 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
289 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
290 path t
290 path t
291 source t
291 source t
292 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
292 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
293 $ echo conflict > t/t
293 $ echo conflict > t/t
294 $ hg ci -m10
294 $ hg ci -m10
295 committing subrepository t
295 committing subrepository t
296 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
296 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
297 searching for copies back to rev 2
297 searching for copies back to rev 2
298 resolving manifests
298 resolving manifests
299 branchmerge: True, force: False, partial: False
299 branchmerge: True, force: False, partial: False
300 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
300 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
301 starting 4 threads for background file closing (?)
301 starting 4 threads for background file closing (?)
302 .hgsubstate: versions differ -> m (premerge)
302 .hgsubstate: versions differ -> m (premerge)
303 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
303 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
304 subrepo t: both sides changed
304 subrepo t: both sides changed
305 subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198)
305 subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198)
306 starting 4 threads for background file closing (?)
306 starting 4 threads for background file closing (?)
307 (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m
307 (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m
308 merging subrepo t
308 merging subrepo t
309 searching for copies back to rev 2
309 searching for copies back to rev 2
310 resolving manifests
310 resolving manifests
311 branchmerge: True, force: False, partial: False
311 branchmerge: True, force: False, partial: False
312 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
312 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
313 preserving t for resolve of t
313 preserving t for resolve of t
314 t: versions differ -> m (premerge)
314 t: versions differ -> m (premerge)
315 picked tool ':merge' for t (binary False symlink False changedelete False)
315 picked tool ':merge' for t (binary False symlink False changedelete False)
316 merging t
316 merging t
317 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
317 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
318 t: versions differ -> m (merge)
318 t: versions differ -> m (merge)
319 picked tool ':merge' for t (binary False symlink False changedelete False)
319 picked tool ':merge' for t (binary False symlink False changedelete False)
320 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
320 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
321 warning: conflicts while merging t! (edit, then use 'hg resolve --mark')
321 warning: conflicts while merging t! (edit, then use 'hg resolve --mark')
322 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
322 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
323 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
323 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
324 subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
324 subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
325 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
325 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
326 (branch merge, don't forget to commit)
326 (branch merge, don't forget to commit)
327
327
328 should conflict
328 should conflict
329
329
330 $ cat t/t
330 $ cat t/t
331 <<<<<<< local: 20a0db6fbf6c - test: 10
331 <<<<<<< local: 20a0db6fbf6c - test: 10
332 conflict
332 conflict
333 =======
333 =======
334 t3
334 t3
335 >>>>>>> other: 7af322bc1198 - test: 7
335 >>>>>>> other: 7af322bc1198 - test: 7
336
336
337 11: remove subrepo t
337 11: remove subrepo t
338
338
339 $ hg co -C 5
339 $ hg co -C 5
340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
341 $ hg revert -r 4 .hgsub # remove t
341 $ hg revert -r 4 .hgsub # remove t
342 $ hg ci -m11
342 $ hg ci -m11
343 created new head
343 created new head
344 $ hg debugsub
344 $ hg debugsub
345 path s
345 path s
346 source s
346 source s
347 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
347 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
348
348
349 local removed, remote changed, keep changed
349 local removed, remote changed, keep changed
350
350
351 $ hg merge 6
351 $ hg merge 6
352 remote [merge rev] changed subrepository s which local [working copy] removed
352 remote [merge rev] changed subrepository s which local [working copy] removed
353 use (c)hanged version or (d)elete? c
353 use (c)hanged version or (d)elete? c
354 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
354 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
355 (branch merge, don't forget to commit)
355 (branch merge, don't forget to commit)
356 BROKEN: should include subrepo t
356 BROKEN: should include subrepo t
357 $ hg debugsub
357 $ hg debugsub
358 path s
358 path s
359 source s
359 source s
360 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
360 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
361 $ cat .hgsubstate
361 $ cat .hgsubstate
362 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
362 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
363 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t
363 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t
364 $ hg ci -m 'local removed, remote changed, keep changed'
364 $ hg ci -m 'local removed, remote changed, keep changed'
365 BROKEN: should include subrepo t
365 BROKEN: should include subrepo t
366 $ hg debugsub
366 $ hg debugsub
367 path s
367 path s
368 source s
368 source s
369 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
369 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
370 BROKEN: should include subrepo t
370 BROKEN: should include subrepo t
371 $ cat .hgsubstate
371 $ cat .hgsubstate
372 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
372 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
373 $ cat t/t
373 $ cat t/t
374 t2
374 t2
375
375
376 local removed, remote changed, keep removed
376 local removed, remote changed, keep removed
377
377
378 $ hg co -C 11
378 $ hg co -C 11
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 $ hg merge --config ui.interactive=true 6 <<EOF
380 $ hg merge --config ui.interactive=true 6 <<EOF
381 > d
381 > d
382 > EOF
382 > EOF
383 remote [merge rev] changed subrepository s which local [working copy] removed
383 remote [merge rev] changed subrepository s which local [working copy] removed
384 use (c)hanged version or (d)elete? d
384 use (c)hanged version or (d)elete? d
385 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
385 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
386 (branch merge, don't forget to commit)
386 (branch merge, don't forget to commit)
387 $ hg debugsub
387 $ hg debugsub
388 path s
388 path s
389 source s
389 source s
390 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
390 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
391 $ cat .hgsubstate
391 $ cat .hgsubstate
392 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
392 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
393 $ hg ci -m 'local removed, remote changed, keep removed'
393 $ hg ci -m 'local removed, remote changed, keep removed'
394 created new head
394 created new head
395 $ hg debugsub
395 $ hg debugsub
396 path s
396 path s
397 source s
397 source s
398 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
398 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
399 $ cat .hgsubstate
399 $ cat .hgsubstate
400 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
400 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
401
401
402 local changed, remote removed, keep changed
402 local changed, remote removed, keep changed
403
403
404 $ hg co -C 6
404 $ hg co -C 6
405 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
405 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
406 $ hg merge 11
406 $ hg merge 11
407 local [working copy] changed subrepository s which remote [merge rev] removed
407 local [working copy] changed subrepository s which remote [merge rev] removed
408 use (c)hanged version or (d)elete? c
408 use (c)hanged version or (d)elete? c
409 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
409 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
410 (branch merge, don't forget to commit)
410 (branch merge, don't forget to commit)
411 BROKEN: should include subrepo t
411 BROKEN: should include subrepo t
412 $ hg debugsub
412 $ hg debugsub
413 path s
413 path s
414 source s
414 source s
415 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
415 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
416 BROKEN: should include subrepo t
416 BROKEN: should include subrepo t
417 $ cat .hgsubstate
417 $ cat .hgsubstate
418 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
418 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
419 $ hg ci -m 'local changed, remote removed, keep changed'
419 $ hg ci -m 'local changed, remote removed, keep changed'
420 created new head
420 created new head
421 BROKEN: should include subrepo t
421 BROKEN: should include subrepo t
422 $ hg debugsub
422 $ hg debugsub
423 path s
423 path s
424 source s
424 source s
425 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
425 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
426 BROKEN: should include subrepo t
426 BROKEN: should include subrepo t
427 $ cat .hgsubstate
427 $ cat .hgsubstate
428 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
428 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
429 $ cat t/t
429 $ cat t/t
430 t2
430 t2
431
431
432 local changed, remote removed, keep removed
432 local changed, remote removed, keep removed
433
433
434 $ hg co -C 6
434 $ hg co -C 6
435 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
435 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 $ hg merge --config ui.interactive=true 11 <<EOF
436 $ hg merge --config ui.interactive=true 11 <<EOF
437 > d
437 > d
438 > EOF
438 > EOF
439 local [working copy] changed subrepository s which remote [merge rev] removed
439 local [working copy] changed subrepository s which remote [merge rev] removed
440 use (c)hanged version or (d)elete? d
440 use (c)hanged version or (d)elete? d
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 (branch merge, don't forget to commit)
442 (branch merge, don't forget to commit)
443 $ hg debugsub
443 $ hg debugsub
444 path s
444 path s
445 source s
445 source s
446 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
446 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
447 $ cat .hgsubstate
447 $ cat .hgsubstate
448 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
448 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
449 $ hg ci -m 'local changed, remote removed, keep removed'
449 $ hg ci -m 'local changed, remote removed, keep removed'
450 created new head
450 created new head
451 $ hg debugsub
451 $ hg debugsub
452 path s
452 path s
453 source s
453 source s
454 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
454 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
455 $ cat .hgsubstate
455 $ cat .hgsubstate
456 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
456 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
457
457
458 clean up to avoid having to fix up the tests below
458 clean up to avoid having to fix up the tests below
459
459
460 $ hg co -C 10
460 $ hg co -C 10
461 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
461 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
462 $ cat >> $HGRCPATH <<EOF
462 $ cat >> $HGRCPATH <<EOF
463 > [extensions]
463 > [extensions]
464 > strip=
464 > strip=
465 > EOF
465 > EOF
466 $ hg strip -r 11:15
466 $ hg strip -r 11:15
467 saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob)
467 saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob)
468
468
469 clone
469 clone
470
470
471 $ cd ..
471 $ cd ..
472 $ hg clone t tc
472 $ hg clone t tc
473 updating to branch default
473 updating to branch default
474 cloning subrepo s from $TESTTMP/t/s
474 cloning subrepo s from $TESTTMP/t/s
475 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
475 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
476 cloning subrepo t from $TESTTMP/t/t
476 cloning subrepo t from $TESTTMP/t/t
477 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
477 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
478 $ cd tc
478 $ cd tc
479 $ hg debugsub
479 $ hg debugsub
480 path s
480 path s
481 source s
481 source s
482 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
482 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
483 path t
483 path t
484 source t
484 source t
485 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
485 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
486
486
487 push
487 push
488
488
489 $ echo bah > t/t
489 $ echo bah > t/t
490 $ hg ci -m11
490 $ hg ci -m11
491 committing subrepository t
491 committing subrepository t
492 $ hg push
492 $ hg push
493 pushing to $TESTTMP/t (glob)
493 pushing to $TESTTMP/t (glob)
494 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
494 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
495 no changes made to subrepo s since last push to $TESTTMP/t/s
495 no changes made to subrepo s since last push to $TESTTMP/t/s
496 pushing subrepo t to $TESTTMP/t/t
496 pushing subrepo t to $TESTTMP/t/t
497 searching for changes
497 searching for changes
498 adding changesets
498 adding changesets
499 adding manifests
499 adding manifests
500 adding file changes
500 adding file changes
501 added 1 changesets with 1 changes to 1 files
501 added 1 changesets with 1 changes to 1 files
502 searching for changes
502 searching for changes
503 adding changesets
503 adding changesets
504 adding manifests
504 adding manifests
505 adding file changes
505 adding file changes
506 added 1 changesets with 1 changes to 1 files
506 added 1 changesets with 1 changes to 1 files
507
507
508 push -f
508 push -f
509
509
510 $ echo bah > s/a
510 $ echo bah > s/a
511 $ hg ci -m12
511 $ hg ci -m12
512 committing subrepository s
512 committing subrepository s
513 $ hg push
513 $ hg push
514 pushing to $TESTTMP/t (glob)
514 pushing to $TESTTMP/t (glob)
515 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
515 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
516 pushing subrepo s to $TESTTMP/t/s
516 pushing subrepo s to $TESTTMP/t/s
517 searching for changes
517 searching for changes
518 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
518 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
519 (merge or see 'hg help push' for details about pushing new heads)
519 (merge or see 'hg help push' for details about pushing new heads)
520 [255]
520 [255]
521 $ hg push -f
521 $ hg push -f
522 pushing to $TESTTMP/t (glob)
522 pushing to $TESTTMP/t (glob)
523 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
523 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
524 searching for changes
524 searching for changes
525 no changes found
525 no changes found
526 pushing subrepo s to $TESTTMP/t/s
526 pushing subrepo s to $TESTTMP/t/s
527 searching for changes
527 searching for changes
528 adding changesets
528 adding changesets
529 adding manifests
529 adding manifests
530 adding file changes
530 adding file changes
531 added 1 changesets with 1 changes to 1 files (+1 heads)
531 added 1 changesets with 1 changes to 1 files (+1 heads)
532 pushing subrepo t to $TESTTMP/t/t
532 pushing subrepo t to $TESTTMP/t/t
533 searching for changes
533 searching for changes
534 no changes found
534 no changes found
535 searching for changes
535 searching for changes
536 adding changesets
536 adding changesets
537 adding manifests
537 adding manifests
538 adding file changes
538 adding file changes
539 added 1 changesets with 1 changes to 1 files
539 added 1 changesets with 1 changes to 1 files
540
540
541 check that unmodified subrepos are not pushed
541 check that unmodified subrepos are not pushed
542
542
543 $ hg clone . ../tcc
543 $ hg clone . ../tcc
544 updating to branch default
544 updating to branch default
545 cloning subrepo s from $TESTTMP/tc/s
545 cloning subrepo s from $TESTTMP/tc/s
546 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
546 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
547 cloning subrepo t from $TESTTMP/tc/t
547 cloning subrepo t from $TESTTMP/tc/t
548 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
548 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
549
549
550 the subrepos on the new clone have nothing to push to its source
550 the subrepos on the new clone have nothing to push to its source
551
551
552 $ hg push -R ../tcc .
552 $ hg push -R ../tcc .
553 pushing to .
553 pushing to .
554 no changes made to subrepo s/ss since last push to s/ss (glob)
554 no changes made to subrepo s/ss since last push to s/ss (glob)
555 no changes made to subrepo s since last push to s
555 no changes made to subrepo s since last push to s
556 no changes made to subrepo t since last push to t
556 no changes made to subrepo t since last push to t
557 searching for changes
557 searching for changes
558 no changes found
558 no changes found
559 [1]
559 [1]
560
560
561 the subrepos on the source do not have a clean store versus the clone target
561 the subrepos on the source do not have a clean store versus the clone target
562 because they were never explicitly pushed to the source
562 because they were never explicitly pushed to the source
563
563
564 $ hg push ../tcc
564 $ hg push ../tcc
565 pushing to ../tcc
565 pushing to ../tcc
566 pushing subrepo s/ss to ../tcc/s/ss (glob)
566 pushing subrepo s/ss to ../tcc/s/ss (glob)
567 searching for changes
567 searching for changes
568 no changes found
568 no changes found
569 pushing subrepo s to ../tcc/s
569 pushing subrepo s to ../tcc/s
570 searching for changes
570 searching for changes
571 no changes found
571 no changes found
572 pushing subrepo t to ../tcc/t
572 pushing subrepo t to ../tcc/t
573 searching for changes
573 searching for changes
574 no changes found
574 no changes found
575 searching for changes
575 searching for changes
576 no changes found
576 no changes found
577 [1]
577 [1]
578
578
579 after push their stores become clean
579 after push their stores become clean
580
580
581 $ hg push ../tcc
581 $ hg push ../tcc
582 pushing to ../tcc
582 pushing to ../tcc
583 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
583 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
584 no changes made to subrepo s since last push to ../tcc/s
584 no changes made to subrepo s since last push to ../tcc/s
585 no changes made to subrepo t since last push to ../tcc/t
585 no changes made to subrepo t since last push to ../tcc/t
586 searching for changes
586 searching for changes
587 no changes found
587 no changes found
588 [1]
588 [1]
589
589
590 updating a subrepo to a different revision or changing
590 updating a subrepo to a different revision or changing
591 its working directory does not make its store dirty
591 its working directory does not make its store dirty
592
592
593 $ hg -R s update '.^'
593 $ hg -R s update '.^'
594 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
594 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
595 $ hg push
595 $ hg push
596 pushing to $TESTTMP/t (glob)
596 pushing to $TESTTMP/t (glob)
597 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
597 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
598 no changes made to subrepo s since last push to $TESTTMP/t/s
598 no changes made to subrepo s since last push to $TESTTMP/t/s
599 no changes made to subrepo t since last push to $TESTTMP/t/t
599 no changes made to subrepo t since last push to $TESTTMP/t/t
600 searching for changes
600 searching for changes
601 no changes found
601 no changes found
602 [1]
602 [1]
603 $ echo foo >> s/a
603 $ echo foo >> s/a
604 $ hg push
604 $ hg push
605 pushing to $TESTTMP/t (glob)
605 pushing to $TESTTMP/t (glob)
606 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
606 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
607 no changes made to subrepo s since last push to $TESTTMP/t/s
607 no changes made to subrepo s since last push to $TESTTMP/t/s
608 no changes made to subrepo t since last push to $TESTTMP/t/t
608 no changes made to subrepo t since last push to $TESTTMP/t/t
609 searching for changes
609 searching for changes
610 no changes found
610 no changes found
611 [1]
611 [1]
612 $ hg -R s update -C tip
612 $ hg -R s update -C tip
613 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
613 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
614
614
615 committing into a subrepo makes its store (but not its parent's store) dirty
615 committing into a subrepo makes its store (but not its parent's store) dirty
616
616
617 $ echo foo >> s/ss/a
617 $ echo foo >> s/ss/a
618 $ hg -R s/ss commit -m 'test dirty store detection'
618 $ hg -R s/ss commit -m 'test dirty store detection'
619
619
620 $ hg out -S -r `hg log -r tip -T "{node|short}"`
620 $ hg out -S -r `hg log -r tip -T "{node|short}"`
621 comparing with $TESTTMP/t (glob)
621 comparing with $TESTTMP/t (glob)
622 searching for changes
622 searching for changes
623 no changes found
623 no changes found
624 comparing with $TESTTMP/t/s
624 comparing with $TESTTMP/t/s
625 searching for changes
625 searching for changes
626 no changes found
626 no changes found
627 comparing with $TESTTMP/t/s/ss
627 comparing with $TESTTMP/t/s/ss
628 searching for changes
628 searching for changes
629 changeset: 1:79ea5566a333
629 changeset: 1:79ea5566a333
630 tag: tip
630 tag: tip
631 user: test
631 user: test
632 date: Thu Jan 01 00:00:00 1970 +0000
632 date: Thu Jan 01 00:00:00 1970 +0000
633 summary: test dirty store detection
633 summary: test dirty store detection
634
634
635 comparing with $TESTTMP/t/t
635 comparing with $TESTTMP/t/t
636 searching for changes
636 searching for changes
637 no changes found
637 no changes found
638
638
639 $ hg push
639 $ hg push
640 pushing to $TESTTMP/t (glob)
640 pushing to $TESTTMP/t (glob)
641 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
641 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
642 searching for changes
642 searching for changes
643 adding changesets
643 adding changesets
644 adding manifests
644 adding manifests
645 adding file changes
645 adding file changes
646 added 1 changesets with 1 changes to 1 files
646 added 1 changesets with 1 changes to 1 files
647 no changes made to subrepo s since last push to $TESTTMP/t/s
647 no changes made to subrepo s since last push to $TESTTMP/t/s
648 no changes made to subrepo t since last push to $TESTTMP/t/t
648 no changes made to subrepo t since last push to $TESTTMP/t/t
649 searching for changes
649 searching for changes
650 no changes found
650 no changes found
651 [1]
651 [1]
652
652
653 a subrepo store may be clean versus one repo but not versus another
653 a subrepo store may be clean versus one repo but not versus another
654
654
655 $ hg push
655 $ hg push
656 pushing to $TESTTMP/t (glob)
656 pushing to $TESTTMP/t (glob)
657 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
657 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
658 no changes made to subrepo s since last push to $TESTTMP/t/s
658 no changes made to subrepo s since last push to $TESTTMP/t/s
659 no changes made to subrepo t since last push to $TESTTMP/t/t
659 no changes made to subrepo t since last push to $TESTTMP/t/t
660 searching for changes
660 searching for changes
661 no changes found
661 no changes found
662 [1]
662 [1]
663 $ hg push ../tcc
663 $ hg push ../tcc
664 pushing to ../tcc
664 pushing to ../tcc
665 pushing subrepo s/ss to ../tcc/s/ss (glob)
665 pushing subrepo s/ss to ../tcc/s/ss (glob)
666 searching for changes
666 searching for changes
667 adding changesets
667 adding changesets
668 adding manifests
668 adding manifests
669 adding file changes
669 adding file changes
670 added 1 changesets with 1 changes to 1 files
670 added 1 changesets with 1 changes to 1 files
671 no changes made to subrepo s since last push to ../tcc/s
671 no changes made to subrepo s since last push to ../tcc/s
672 no changes made to subrepo t since last push to ../tcc/t
672 no changes made to subrepo t since last push to ../tcc/t
673 searching for changes
673 searching for changes
674 no changes found
674 no changes found
675 [1]
675 [1]
676
676
677 update
677 update
678
678
679 $ cd ../t
679 $ cd ../t
680 $ hg up -C # discard our earlier merge
680 $ hg up -C # discard our earlier merge
681 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
681 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
682 2 other heads for branch "default"
682 2 other heads for branch "default"
683 $ echo blah > t/t
683 $ echo blah > t/t
684 $ hg ci -m13
684 $ hg ci -m13
685 committing subrepository t
685 committing subrepository t
686
686
687 backout calls revert internally with minimal opts, which should not raise
687 backout calls revert internally with minimal opts, which should not raise
688 KeyError
688 KeyError
689
689
690 $ hg backout ".^" --no-commit
690 $ hg backout ".^" --no-commit
691 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
691 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
692 changeset c373c8102e68 backed out, don't forget to commit.
692 changeset c373c8102e68 backed out, don't forget to commit.
693
693
694 $ hg up -C # discard changes
694 $ hg up -C # discard changes
695 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
695 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
696 2 other heads for branch "default"
696 2 other heads for branch "default"
697
697
698 pull
698 pull
699
699
700 $ cd ../tc
700 $ cd ../tc
701 $ hg pull
701 $ hg pull
702 pulling from $TESTTMP/t (glob)
702 pulling from $TESTTMP/t (glob)
703 searching for changes
703 searching for changes
704 adding changesets
704 adding changesets
705 adding manifests
705 adding manifests
706 adding file changes
706 adding file changes
707 added 1 changesets with 1 changes to 1 files
707 added 1 changesets with 1 changes to 1 files
708 (run 'hg update' to get a working copy)
708 (run 'hg update' to get a working copy)
709
709
710 should pull t
710 should pull t
711
711
712 $ hg incoming -S -r `hg log -r tip -T "{node|short}"`
712 $ hg incoming -S -r `hg log -r tip -T "{node|short}"`
713 comparing with $TESTTMP/t (glob)
713 comparing with $TESTTMP/t (glob)
714 no changes found
714 no changes found
715 comparing with $TESTTMP/t/s
715 comparing with $TESTTMP/t/s
716 searching for changes
716 searching for changes
717 no changes found
717 no changes found
718 comparing with $TESTTMP/t/s/ss
718 comparing with $TESTTMP/t/s/ss
719 searching for changes
719 searching for changes
720 no changes found
720 no changes found
721 comparing with $TESTTMP/t/t
721 comparing with $TESTTMP/t/t
722 searching for changes
722 searching for changes
723 changeset: 5:52c0adc0515a
723 changeset: 5:52c0adc0515a
724 tag: tip
724 tag: tip
725 user: test
725 user: test
726 date: Thu Jan 01 00:00:00 1970 +0000
726 date: Thu Jan 01 00:00:00 1970 +0000
727 summary: 13
727 summary: 13
728
728
729
729
730 $ hg up
730 $ hg up
731 pulling subrepo t from $TESTTMP/t/t
731 pulling subrepo t from $TESTTMP/t/t
732 searching for changes
732 searching for changes
733 adding changesets
733 adding changesets
734 adding manifests
734 adding manifests
735 adding file changes
735 adding file changes
736 added 1 changesets with 1 changes to 1 files
736 added 1 changesets with 1 changes to 1 files
737 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
737 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
738 2 other heads for branch "default"
738 2 other heads for branch "default"
739 $ cat t/t
739 $ cat t/t
740 blah
740 blah
741
741
742 bogus subrepo path aborts
742 bogus subrepo path aborts
743
743
744 $ echo 'bogus=[boguspath' >> .hgsub
744 $ echo 'bogus=[boguspath' >> .hgsub
745 $ hg ci -m 'bogus subrepo path'
745 $ hg ci -m 'bogus subrepo path'
746 abort: missing ] in subrepo source
746 abort: missing ] in subrepo source
747 [255]
747 [255]
748
748
749 Issue1986: merge aborts when trying to merge a subrepo that
749 Issue1986: merge aborts when trying to merge a subrepo that
750 shouldn't need merging
750 shouldn't need merging
751
751
752 # subrepo layout
752 # subrepo layout
753 #
753 #
754 # o 5 br
754 # o 5 br
755 # /|
755 # /|
756 # o | 4 default
756 # o | 4 default
757 # | |
757 # | |
758 # | o 3 br
758 # | o 3 br
759 # |/|
759 # |/|
760 # o | 2 default
760 # o | 2 default
761 # | |
761 # | |
762 # | o 1 br
762 # | o 1 br
763 # |/
763 # |/
764 # o 0 default
764 # o 0 default
765
765
766 $ cd ..
766 $ cd ..
767 $ rm -rf sub
767 $ rm -rf sub
768 $ hg init main
768 $ hg init main
769 $ cd main
769 $ cd main
770 $ hg init s
770 $ hg init s
771 $ cd s
771 $ cd s
772 $ echo a > a
772 $ echo a > a
773 $ hg ci -Am1
773 $ hg ci -Am1
774 adding a
774 adding a
775 $ hg branch br
775 $ hg branch br
776 marked working directory as branch br
776 marked working directory as branch br
777 (branches are permanent and global, did you want a bookmark?)
777 (branches are permanent and global, did you want a bookmark?)
778 $ echo a >> a
778 $ echo a >> a
779 $ hg ci -m1
779 $ hg ci -m1
780 $ hg up default
780 $ hg up default
781 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
781 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
782 $ echo b > b
782 $ echo b > b
783 $ hg ci -Am1
783 $ hg ci -Am1
784 adding b
784 adding b
785 $ hg up br
785 $ hg up br
786 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
786 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
787 $ hg merge tip
787 $ hg merge tip
788 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
788 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
789 (branch merge, don't forget to commit)
789 (branch merge, don't forget to commit)
790 $ hg ci -m1
790 $ hg ci -m1
791 $ hg up 2
791 $ hg up 2
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
793 $ echo c > c
793 $ echo c > c
794 $ hg ci -Am1
794 $ hg ci -Am1
795 adding c
795 adding c
796 $ hg up 3
796 $ hg up 3
797 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
797 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
798 $ hg merge 4
798 $ hg merge 4
799 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
799 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
800 (branch merge, don't forget to commit)
800 (branch merge, don't forget to commit)
801 $ hg ci -m1
801 $ hg ci -m1
802
802
803 # main repo layout:
803 # main repo layout:
804 #
804 #
805 # * <-- try to merge default into br again
805 # * <-- try to merge default into br again
806 # .`|
806 # .`|
807 # . o 5 br --> substate = 5
807 # . o 5 br --> substate = 5
808 # . |
808 # . |
809 # o | 4 default --> substate = 4
809 # o | 4 default --> substate = 4
810 # | |
810 # | |
811 # | o 3 br --> substate = 2
811 # | o 3 br --> substate = 2
812 # |/|
812 # |/|
813 # o | 2 default --> substate = 2
813 # o | 2 default --> substate = 2
814 # | |
814 # | |
815 # | o 1 br --> substate = 3
815 # | o 1 br --> substate = 3
816 # |/
816 # |/
817 # o 0 default --> substate = 2
817 # o 0 default --> substate = 2
818
818
819 $ cd ..
819 $ cd ..
820 $ echo 's = s' > .hgsub
820 $ echo 's = s' > .hgsub
821 $ hg -R s up 2
821 $ hg -R s up 2
822 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
822 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
823 $ hg ci -Am1
823 $ hg ci -Am1
824 adding .hgsub
824 adding .hgsub
825 $ hg branch br
825 $ hg branch br
826 marked working directory as branch br
826 marked working directory as branch br
827 (branches are permanent and global, did you want a bookmark?)
827 (branches are permanent and global, did you want a bookmark?)
828 $ echo b > b
828 $ echo b > b
829 $ hg -R s up 3
829 $ hg -R s up 3
830 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
830 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
831 $ hg ci -Am1
831 $ hg ci -Am1
832 adding b
832 adding b
833 $ hg up default
833 $ hg up default
834 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
834 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
835 $ echo c > c
835 $ echo c > c
836 $ hg ci -Am1
836 $ hg ci -Am1
837 adding c
837 adding c
838 $ hg up 1
838 $ hg up 1
839 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
839 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
840 $ hg merge 2
840 $ hg merge 2
841 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
841 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
842 (branch merge, don't forget to commit)
842 (branch merge, don't forget to commit)
843 $ hg ci -m1
843 $ hg ci -m1
844 $ hg up 2
844 $ hg up 2
845 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
845 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
846 $ hg -R s up 4
846 $ hg -R s up 4
847 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
847 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
848 $ echo d > d
848 $ echo d > d
849 $ hg ci -Am1
849 $ hg ci -Am1
850 adding d
850 adding d
851 $ hg up 3
851 $ hg up 3
852 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
852 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
853 $ hg -R s up 5
853 $ hg -R s up 5
854 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
854 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
855 $ echo e > e
855 $ echo e > e
856 $ hg ci -Am1
856 $ hg ci -Am1
857 adding e
857 adding e
858
858
859 $ hg up 5
859 $ hg up 5
860 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
860 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
861 $ hg merge 4 # try to merge default into br again
861 $ hg merge 4 # try to merge default into br again
862 subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88)
862 subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88)
863 (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m
863 (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m
864 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
864 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
865 (branch merge, don't forget to commit)
865 (branch merge, don't forget to commit)
866 $ cd ..
866 $ cd ..
867
867
868 test subrepo delete from .hgsubstate
868 test subrepo delete from .hgsubstate
869
869
870 $ hg init testdelete
870 $ hg init testdelete
871 $ mkdir testdelete/nested testdelete/nested2
871 $ mkdir testdelete/nested testdelete/nested2
872 $ hg init testdelete/nested
872 $ hg init testdelete/nested
873 $ hg init testdelete/nested2
873 $ hg init testdelete/nested2
874 $ echo test > testdelete/nested/foo
874 $ echo test > testdelete/nested/foo
875 $ echo test > testdelete/nested2/foo
875 $ echo test > testdelete/nested2/foo
876 $ hg -R testdelete/nested add
876 $ hg -R testdelete/nested add
877 adding testdelete/nested/foo (glob)
877 adding testdelete/nested/foo (glob)
878 $ hg -R testdelete/nested2 add
878 $ hg -R testdelete/nested2 add
879 adding testdelete/nested2/foo (glob)
879 adding testdelete/nested2/foo (glob)
880 $ hg -R testdelete/nested ci -m test
880 $ hg -R testdelete/nested ci -m test
881 $ hg -R testdelete/nested2 ci -m test
881 $ hg -R testdelete/nested2 ci -m test
882 $ echo nested = nested > testdelete/.hgsub
882 $ echo nested = nested > testdelete/.hgsub
883 $ echo nested2 = nested2 >> testdelete/.hgsub
883 $ echo nested2 = nested2 >> testdelete/.hgsub
884 $ hg -R testdelete add
884 $ hg -R testdelete add
885 adding testdelete/.hgsub (glob)
885 adding testdelete/.hgsub (glob)
886 $ hg -R testdelete ci -m "nested 1 & 2 added"
886 $ hg -R testdelete ci -m "nested 1 & 2 added"
887 $ echo nested = nested > testdelete/.hgsub
887 $ echo nested = nested > testdelete/.hgsub
888 $ hg -R testdelete ci -m "nested 2 deleted"
888 $ hg -R testdelete ci -m "nested 2 deleted"
889 $ cat testdelete/.hgsubstate
889 $ cat testdelete/.hgsubstate
890 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
890 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
891 $ hg -R testdelete remove testdelete/.hgsub
891 $ hg -R testdelete remove testdelete/.hgsub
892 $ hg -R testdelete ci -m ".hgsub deleted"
892 $ hg -R testdelete ci -m ".hgsub deleted"
893 $ cat testdelete/.hgsubstate
893 $ cat testdelete/.hgsubstate
894 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
894 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
895
895
896 test repository cloning
896 test repository cloning
897
897
898 $ mkdir mercurial mercurial2
898 $ mkdir mercurial mercurial2
899 $ hg init nested_absolute
899 $ hg init nested_absolute
900 $ echo test > nested_absolute/foo
900 $ echo test > nested_absolute/foo
901 $ hg -R nested_absolute add
901 $ hg -R nested_absolute add
902 adding nested_absolute/foo (glob)
902 adding nested_absolute/foo (glob)
903 $ hg -R nested_absolute ci -mtest
903 $ hg -R nested_absolute ci -mtest
904 $ cd mercurial
904 $ cd mercurial
905 $ hg init nested_relative
905 $ hg init nested_relative
906 $ echo test2 > nested_relative/foo2
906 $ echo test2 > nested_relative/foo2
907 $ hg -R nested_relative add
907 $ hg -R nested_relative add
908 adding nested_relative/foo2 (glob)
908 adding nested_relative/foo2 (glob)
909 $ hg -R nested_relative ci -mtest2
909 $ hg -R nested_relative ci -mtest2
910 $ hg init main
910 $ hg init main
911 $ echo "nested_relative = ../nested_relative" > main/.hgsub
911 $ echo "nested_relative = ../nested_relative" > main/.hgsub
912 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
912 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
913 $ hg -R main add
913 $ hg -R main add
914 adding main/.hgsub (glob)
914 adding main/.hgsub (glob)
915 $ hg -R main ci -m "add subrepos"
915 $ hg -R main ci -m "add subrepos"
916 $ cd ..
916 $ cd ..
917 $ hg clone mercurial/main mercurial2/main
917 $ hg clone mercurial/main mercurial2/main
918 updating to branch default
918 updating to branch default
919 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
919 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
920 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
920 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
921 > mercurial2/main/nested_relative/.hg/hgrc
921 > mercurial2/main/nested_relative/.hg/hgrc
922 [paths]
922 [paths]
923 default = $TESTTMP/mercurial/nested_absolute
923 default = $TESTTMP/mercurial/nested_absolute
924 [paths]
924 [paths]
925 default = $TESTTMP/mercurial/nested_relative
925 default = $TESTTMP/mercurial/nested_relative
926 $ rm -rf mercurial mercurial2
926 $ rm -rf mercurial mercurial2
927
927
928 Issue1977: multirepo push should fail if subrepo push fails
928 Issue1977: multirepo push should fail if subrepo push fails
929
929
930 $ hg init repo
930 $ hg init repo
931 $ hg init repo/s
931 $ hg init repo/s
932 $ echo a > repo/s/a
932 $ echo a > repo/s/a
933 $ hg -R repo/s ci -Am0
933 $ hg -R repo/s ci -Am0
934 adding a
934 adding a
935 $ echo s = s > repo/.hgsub
935 $ echo s = s > repo/.hgsub
936 $ hg -R repo ci -Am1
936 $ hg -R repo ci -Am1
937 adding .hgsub
937 adding .hgsub
938 $ hg clone repo repo2
938 $ hg clone repo repo2
939 updating to branch default
939 updating to branch default
940 cloning subrepo s from $TESTTMP/repo/s
940 cloning subrepo s from $TESTTMP/repo/s
941 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
941 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
942 $ hg -q -R repo2 pull -u
942 $ hg -q -R repo2 pull -u
943 $ echo 1 > repo2/s/a
943 $ echo 1 > repo2/s/a
944 $ hg -R repo2/s ci -m2
944 $ hg -R repo2/s ci -m2
945 $ hg -q -R repo2/s push
945 $ hg -q -R repo2/s push
946 $ hg -R repo2/s up -C 0
946 $ hg -R repo2/s up -C 0
947 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
947 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
948 $ echo 2 > repo2/s/b
948 $ echo 2 > repo2/s/b
949 $ hg -R repo2/s ci -m3 -A
949 $ hg -R repo2/s ci -m3 -A
950 adding b
950 adding b
951 created new head
951 created new head
952 $ hg -R repo2 ci -m3
952 $ hg -R repo2 ci -m3
953 $ hg -q -R repo2 push
953 $ hg -q -R repo2 push
954 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
954 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
955 (merge or see 'hg help push' for details about pushing new heads)
955 (merge or see 'hg help push' for details about pushing new heads)
956 [255]
956 [255]
957 $ hg -R repo update
957 $ hg -R repo update
958 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
958 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
959
959
960 test if untracked file is not overwritten
960 test if untracked file is not overwritten
961
961
962 (this also tests that updated .hgsubstate is treated as "modified",
962 (this also tests that updated .hgsubstate is treated as "modified",
963 when 'merge.update()' is aborted before 'merge.recordupdates()', even
963 when 'merge.update()' is aborted before 'merge.recordupdates()', even
964 if none of mode, size and timestamp of it isn't changed on the
964 if none of mode, size and timestamp of it isn't changed on the
965 filesystem (see also issue4583))
965 filesystem (see also issue4583))
966
966
967 $ echo issue3276_ok > repo/s/b
967 $ echo issue3276_ok > repo/s/b
968 $ hg -R repo2 push -f -q
968 $ hg -R repo2 push -f -q
969 $ touch -t 200001010000 repo/.hgsubstate
969 $ touch -t 200001010000 repo/.hgsubstate
970
970
971 $ cat >> repo/.hg/hgrc <<EOF
971 $ cat >> repo/.hg/hgrc <<EOF
972 > [fakedirstatewritetime]
972 > [fakedirstatewritetime]
973 > # emulate invoking dirstate.write() via repo.status()
973 > # emulate invoking dirstate.write() via repo.status()
974 > # at 2000-01-01 00:00
974 > # at 2000-01-01 00:00
975 > fakenow = 200001010000
975 > fakenow = 200001010000
976 >
976 >
977 > [extensions]
977 > [extensions]
978 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
978 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
979 > EOF
979 > EOF
980 $ hg -R repo update
980 $ hg -R repo update
981 b: untracked file differs
981 b: untracked file differs
982 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
982 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
983 [255]
983 [255]
984 $ cat >> repo/.hg/hgrc <<EOF
984 $ cat >> repo/.hg/hgrc <<EOF
985 > [extensions]
985 > [extensions]
986 > fakedirstatewritetime = !
986 > fakedirstatewritetime = !
987 > EOF
987 > EOF
988
988
989 $ cat repo/s/b
989 $ cat repo/s/b
990 issue3276_ok
990 issue3276_ok
991 $ rm repo/s/b
991 $ rm repo/s/b
992 $ touch -t 200001010000 repo/.hgsubstate
992 $ touch -t 200001010000 repo/.hgsubstate
993 $ hg -R repo revert --all
993 $ hg -R repo revert --all
994 reverting repo/.hgsubstate (glob)
994 reverting repo/.hgsubstate (glob)
995 reverting subrepo s
995 reverting subrepo s
996 $ hg -R repo update
996 $ hg -R repo update
997 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
997 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
998 $ cat repo/s/b
998 $ cat repo/s/b
999 2
999 2
1000 $ rm -rf repo2 repo
1000 $ rm -rf repo2 repo
1001
1001
1002
1002
1003 Issue1852 subrepos with relative paths always push/pull relative to default
1003 Issue1852 subrepos with relative paths always push/pull relative to default
1004
1004
1005 Prepare a repo with subrepo
1005 Prepare a repo with subrepo
1006
1006
1007 $ hg init issue1852a
1007 $ hg init issue1852a
1008 $ cd issue1852a
1008 $ cd issue1852a
1009 $ hg init sub/repo
1009 $ hg init sub/repo
1010 $ echo test > sub/repo/foo
1010 $ echo test > sub/repo/foo
1011 $ hg -R sub/repo add sub/repo/foo
1011 $ hg -R sub/repo add sub/repo/foo
1012 $ echo sub/repo = sub/repo > .hgsub
1012 $ echo sub/repo = sub/repo > .hgsub
1013 $ hg add .hgsub
1013 $ hg add .hgsub
1014 $ hg ci -mtest
1014 $ hg ci -mtest
1015 committing subrepository sub/repo (glob)
1015 committing subrepository sub/repo (glob)
1016 $ echo test >> sub/repo/foo
1016 $ echo test >> sub/repo/foo
1017 $ hg ci -mtest
1017 $ hg ci -mtest
1018 committing subrepository sub/repo (glob)
1018 committing subrepository sub/repo (glob)
1019 $ hg cat sub/repo/foo
1019 $ hg cat sub/repo/foo
1020 test
1020 test
1021 test
1021 test
1022 $ mkdir -p tmp/sub/repo
1022 $ mkdir -p tmp/sub/repo
1023 $ hg cat -r 0 --output tmp/%p_p sub/repo/foo
1023 $ hg cat -r 0 --output tmp/%p_p sub/repo/foo
1024 $ cat tmp/sub/repo/foo_p
1024 $ cat tmp/sub/repo/foo_p
1025 test
1025 test
1026 $ mv sub/repo sub_
1026 $ mv sub/repo sub_
1027 $ hg cat sub/repo/baz
1027 $ hg cat sub/repo/baz
1028 skipping missing subrepository: sub/repo
1028 skipping missing subrepository: sub/repo
1029 [1]
1029 [1]
1030 $ rm -rf sub/repo
1030 $ rm -rf sub/repo
1031 $ mv sub_ sub/repo
1031 $ mv sub_ sub/repo
1032 $ cd ..
1032 $ cd ..
1033
1033
1034 Create repo without default path, pull top repo, and see what happens on update
1034 Create repo without default path, pull top repo, and see what happens on update
1035
1035
1036 $ hg init issue1852b
1036 $ hg init issue1852b
1037 $ hg -R issue1852b pull issue1852a
1037 $ hg -R issue1852b pull issue1852a
1038 pulling from issue1852a
1038 pulling from issue1852a
1039 requesting all changes
1039 requesting all changes
1040 adding changesets
1040 adding changesets
1041 adding manifests
1041 adding manifests
1042 adding file changes
1042 adding file changes
1043 added 2 changesets with 3 changes to 2 files
1043 added 2 changesets with 3 changes to 2 files
1044 (run 'hg update' to get a working copy)
1044 (run 'hg update' to get a working copy)
1045 $ hg -R issue1852b update
1045 $ hg -R issue1852b update
1046 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
1046 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
1047 [255]
1047 [255]
1048
1048
1049 Ensure a full traceback, not just the SubrepoAbort part
1049 Ensure a full traceback, not just the SubrepoAbort part
1050
1050
1051 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort'
1051 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort'
1052 raise error.Abort(_("default path for subrepository not found"))
1052 raise error.Abort(_("default path for subrepository not found"))
1053
1053
1054 Pull -u now doesn't help
1054 Pull -u now doesn't help
1055
1055
1056 $ hg -R issue1852b pull -u issue1852a
1056 $ hg -R issue1852b pull -u issue1852a
1057 pulling from issue1852a
1057 pulling from issue1852a
1058 searching for changes
1058 searching for changes
1059 no changes found
1059 no changes found
1060
1060
1061 Try the same, but with pull -u
1061 Try the same, but with pull -u
1062
1062
1063 $ hg init issue1852c
1063 $ hg init issue1852c
1064 $ hg -R issue1852c pull -r0 -u issue1852a
1064 $ hg -R issue1852c pull -r0 -u issue1852a
1065 pulling from issue1852a
1065 pulling from issue1852a
1066 adding changesets
1066 adding changesets
1067 adding manifests
1067 adding manifests
1068 adding file changes
1068 adding file changes
1069 added 1 changesets with 2 changes to 2 files
1069 added 1 changesets with 2 changes to 2 files
1070 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
1070 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
1071 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1071 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1072
1072
1073 Try to push from the other side
1073 Try to push from the other side
1074
1074
1075 $ hg -R issue1852a push `pwd`/issue1852c
1075 $ hg -R issue1852a push `pwd`/issue1852c
1076 pushing to $TESTTMP/issue1852c (glob)
1076 pushing to $TESTTMP/issue1852c (glob)
1077 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
1077 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
1078 searching for changes
1078 searching for changes
1079 no changes found
1079 no changes found
1080 searching for changes
1080 searching for changes
1081 adding changesets
1081 adding changesets
1082 adding manifests
1082 adding manifests
1083 adding file changes
1083 adding file changes
1084 added 1 changesets with 1 changes to 1 files
1084 added 1 changesets with 1 changes to 1 files
1085
1085
1086 Incoming and outgoing should not use the default path:
1086 Incoming and outgoing should not use the default path:
1087
1087
1088 $ hg clone -q issue1852a issue1852d
1088 $ hg clone -q issue1852a issue1852d
1089 $ hg -R issue1852d outgoing --subrepos issue1852c
1089 $ hg -R issue1852d outgoing --subrepos issue1852c
1090 comparing with issue1852c
1090 comparing with issue1852c
1091 searching for changes
1091 searching for changes
1092 no changes found
1092 no changes found
1093 comparing with issue1852c/sub/repo
1093 comparing with issue1852c/sub/repo
1094 searching for changes
1094 searching for changes
1095 no changes found
1095 no changes found
1096 [1]
1096 [1]
1097 $ hg -R issue1852d incoming --subrepos issue1852c
1097 $ hg -R issue1852d incoming --subrepos issue1852c
1098 comparing with issue1852c
1098 comparing with issue1852c
1099 searching for changes
1099 searching for changes
1100 no changes found
1100 no changes found
1101 comparing with issue1852c/sub/repo
1101 comparing with issue1852c/sub/repo
1102 searching for changes
1102 searching for changes
1103 no changes found
1103 no changes found
1104 [1]
1104 [1]
1105
1105
1106 Check that merge of a new subrepo doesn't write the uncommitted state to
1106 Check that merge of a new subrepo doesn't write the uncommitted state to
1107 .hgsubstate (issue4622)
1107 .hgsubstate (issue4622)
1108
1108
1109 $ hg init issue1852a/addedsub
1109 $ hg init issue1852a/addedsub
1110 $ echo zzz > issue1852a/addedsub/zz.txt
1110 $ echo zzz > issue1852a/addedsub/zz.txt
1111 $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ"
1111 $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ"
1112
1112
1113 $ hg clone issue1852a/addedsub issue1852d/addedsub
1113 $ hg clone issue1852a/addedsub issue1852d/addedsub
1114 updating to branch default
1114 updating to branch default
1115 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1115 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1116
1116
1117 $ echo def > issue1852a/sub/repo/foo
1117 $ echo def > issue1852a/sub/repo/foo
1118 $ hg -R issue1852a ci -SAm 'tweaked subrepo'
1118 $ hg -R issue1852a ci -SAm 'tweaked subrepo'
1119 adding tmp/sub/repo/foo_p
1119 adding tmp/sub/repo/foo_p
1120 committing subrepository sub/repo (glob)
1120 committing subrepository sub/repo (glob)
1121
1121
1122 $ echo 'addedsub = addedsub' >> issue1852d/.hgsub
1122 $ echo 'addedsub = addedsub' >> issue1852d/.hgsub
1123 $ echo xyz > issue1852d/sub/repo/foo
1123 $ echo xyz > issue1852d/sub/repo/foo
1124 $ hg -R issue1852d pull -u
1124 $ hg -R issue1852d pull -u
1125 pulling from $TESTTMP/issue1852a (glob)
1125 pulling from $TESTTMP/issue1852a (glob)
1126 searching for changes
1126 searching for changes
1127 adding changesets
1127 adding changesets
1128 adding manifests
1128 adding manifests
1129 adding file changes
1129 adding file changes
1130 added 1 changesets with 2 changes to 2 files
1130 added 1 changesets with 2 changes to 2 files
1131 subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c)
1131 subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c)
1132 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1132 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1133 pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob)
1133 pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob)
1134 searching for changes
1134 searching for changes
1135 adding changesets
1135 adding changesets
1136 adding manifests
1136 adding manifests
1137 adding file changes
1137 adding file changes
1138 added 1 changesets with 1 changes to 1 files
1138 added 1 changesets with 1 changes to 1 files
1139 subrepository sources for sub/repo differ (glob)
1139 subrepository sources for sub/repo differ (glob)
1140 use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l
1140 use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l
1141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1142 $ cat issue1852d/.hgsubstate
1142 $ cat issue1852d/.hgsubstate
1143 f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo
1143 f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo
1144
1144
1145 Check status of files when none of them belong to the first
1145 Check status of files when none of them belong to the first
1146 subrepository:
1146 subrepository:
1147
1147
1148 $ hg init subrepo-status
1148 $ hg init subrepo-status
1149 $ cd subrepo-status
1149 $ cd subrepo-status
1150 $ hg init subrepo-1
1150 $ hg init subrepo-1
1151 $ hg init subrepo-2
1151 $ hg init subrepo-2
1152 $ cd subrepo-2
1152 $ cd subrepo-2
1153 $ touch file
1153 $ touch file
1154 $ hg add file
1154 $ hg add file
1155 $ cd ..
1155 $ cd ..
1156 $ echo subrepo-1 = subrepo-1 > .hgsub
1156 $ echo subrepo-1 = subrepo-1 > .hgsub
1157 $ echo subrepo-2 = subrepo-2 >> .hgsub
1157 $ echo subrepo-2 = subrepo-2 >> .hgsub
1158 $ hg add .hgsub
1158 $ hg add .hgsub
1159 $ hg ci -m 'Added subrepos'
1159 $ hg ci -m 'Added subrepos'
1160 committing subrepository subrepo-2
1160 committing subrepository subrepo-2
1161 $ hg st subrepo-2/file
1161 $ hg st subrepo-2/file
1162
1162
1163 Check that share works with subrepo
1163 Check that share works with subrepo
1164 $ hg --config extensions.share= share . ../shared
1164 $ hg --config extensions.share= share . ../shared
1165 updating working directory
1165 updating working directory
1166 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
1166 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
1167 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1167 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1168 $ test -f ../shared/subrepo-1/.hg/sharedpath
1168 $ test -f ../shared/subrepo-1/.hg/sharedpath
1169 [1]
1169 [1]
1170 $ hg -R ../shared in
1170 $ hg -R ../shared in
1171 abort: repository default not found!
1171 abort: repository default not found!
1172 [255]
1172 [255]
1173 $ hg -R ../shared/subrepo-2 showconfig paths
1173 $ hg -R ../shared/subrepo-2 showconfig paths
1174 paths.default=$TESTTMP/subrepo-status/subrepo-2
1174 paths.default=$TESTTMP/subrepo-status/subrepo-2
1175 $ hg -R ../shared/subrepo-1 sum --remote
1175 $ hg -R ../shared/subrepo-1 sum --remote
1176 parent: -1:000000000000 tip (empty repository)
1176 parent: -1:000000000000 tip (empty repository)
1177 branch: default
1177 branch: default
1178 commit: (clean)
1178 commit: (clean)
1179 update: (current)
1179 update: (current)
1180 remote: (synced)
1180 remote: (synced)
1181
1181
1182 Check hg update --clean
1182 Check hg update --clean
1183 $ cd $TESTTMP/t
1183 $ cd $TESTTMP/t
1184 $ rm -r t/t.orig
1184 $ rm -r t/t.orig
1185 $ hg status -S --all
1185 $ hg status -S --all
1186 C .hgsub
1186 C .hgsub
1187 C .hgsubstate
1187 C .hgsubstate
1188 C a
1188 C a
1189 C s/.hgsub
1189 C s/.hgsub
1190 C s/.hgsubstate
1190 C s/.hgsubstate
1191 C s/a
1191 C s/a
1192 C s/ss/a
1192 C s/ss/a
1193 C t/t
1193 C t/t
1194 $ echo c1 > s/a
1194 $ echo c1 > s/a
1195 $ cd s
1195 $ cd s
1196 $ echo c1 > b
1196 $ echo c1 > b
1197 $ echo c1 > c
1197 $ echo c1 > c
1198 $ hg add b
1198 $ hg add b
1199 $ cd ..
1199 $ cd ..
1200 $ hg status -S
1200 $ hg status -S
1201 M s/a
1201 M s/a
1202 A s/b
1202 A s/b
1203 ? s/c
1203 ? s/c
1204 $ hg update -C
1204 $ hg update -C
1205 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1205 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1206 2 other heads for branch "default"
1206 2 other heads for branch "default"
1207 $ hg status -S
1207 $ hg status -S
1208 ? s/b
1208 ? s/b
1209 ? s/c
1209 ? s/c
1210
1210
1211 Sticky subrepositories, no changes
1211 Sticky subrepositories, no changes
1212 $ cd $TESTTMP/t
1212 $ cd $TESTTMP/t
1213 $ hg id
1213 $ hg id
1214 925c17564ef8 tip
1214 925c17564ef8 tip
1215 $ hg -R s id
1215 $ hg -R s id
1216 12a213df6fa9 tip
1216 12a213df6fa9 tip
1217 $ hg -R t id
1217 $ hg -R t id
1218 52c0adc0515a tip
1218 52c0adc0515a tip
1219 $ hg update 11
1219 $ hg update 11
1220 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1220 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1221 $ hg id
1221 $ hg id
1222 365661e5936a
1222 365661e5936a
1223 $ hg -R s id
1223 $ hg -R s id
1224 fc627a69481f
1224 fc627a69481f
1225 $ hg -R t id
1225 $ hg -R t id
1226 e95bcfa18a35
1226 e95bcfa18a35
1227
1227
1228 Sticky subrepositories, file changes
1228 Sticky subrepositories, file changes
1229 $ touch s/f1
1229 $ touch s/f1
1230 $ touch t/f1
1230 $ touch t/f1
1231 $ hg add -S s/f1
1231 $ hg add -S s/f1
1232 $ hg add -S t/f1
1232 $ hg add -S t/f1
1233 $ hg id
1233 $ hg id
1234 365661e5936a+
1234 365661e5936a+
1235 $ hg -R s id
1235 $ hg -R s id
1236 fc627a69481f+
1236 fc627a69481f+
1237 $ hg -R t id
1237 $ hg -R t id
1238 e95bcfa18a35+
1238 e95bcfa18a35+
1239 $ hg update tip
1239 $ hg update tip
1240 subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9)
1240 subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9)
1241 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1241 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1242 subrepository sources for s differ
1242 subrepository sources for s differ
1243 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l
1243 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l
1244 subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a)
1244 subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a)
1245 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1245 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1246 subrepository sources for t differ
1246 subrepository sources for t differ
1247 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l
1247 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l
1248 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1248 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1249 $ hg id
1249 $ hg id
1250 925c17564ef8+ tip
1250 925c17564ef8+ tip
1251 $ hg -R s id
1251 $ hg -R s id
1252 fc627a69481f+
1252 fc627a69481f+
1253 $ hg -R t id
1253 $ hg -R t id
1254 e95bcfa18a35+
1254 e95bcfa18a35+
1255 $ hg update --clean tip
1255 $ hg update --clean tip
1256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1257
1257
1258 Sticky subrepository, revision updates
1258 Sticky subrepository, revision updates
1259 $ hg id
1259 $ hg id
1260 925c17564ef8 tip
1260 925c17564ef8 tip
1261 $ hg -R s id
1261 $ hg -R s id
1262 12a213df6fa9 tip
1262 12a213df6fa9 tip
1263 $ hg -R t id
1263 $ hg -R t id
1264 52c0adc0515a tip
1264 52c0adc0515a tip
1265 $ cd s
1265 $ cd s
1266 $ hg update -r -2
1266 $ hg update -r -2
1267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1268 $ cd ../t
1268 $ cd ../t
1269 $ hg update -r 2
1269 $ hg update -r 2
1270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1271 $ cd ..
1271 $ cd ..
1272 $ hg update 10
1272 $ hg update 10
1273 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1273 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1274 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1274 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1275 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c)
1275 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c)
1276 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1276 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1277 subrepository sources for t differ (in checked out version)
1277 subrepository sources for t differ (in checked out version)
1278 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l
1278 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l
1279 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1279 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1280 $ hg id
1280 $ hg id
1281 e45c8b14af55+
1281 e45c8b14af55+
1282 $ hg -R s id
1282 $ hg -R s id
1283 02dcf1d70411
1283 02dcf1d70411
1284 $ hg -R t id
1284 $ hg -R t id
1285 7af322bc1198
1285 7af322bc1198
1286
1286
1287 Sticky subrepository, file changes and revision updates
1287 Sticky subrepository, file changes and revision updates
1288 $ touch s/f1
1288 $ touch s/f1
1289 $ touch t/f1
1289 $ touch t/f1
1290 $ hg add -S s/f1
1290 $ hg add -S s/f1
1291 $ hg add -S t/f1
1291 $ hg add -S t/f1
1292 $ hg id
1292 $ hg id
1293 e45c8b14af55+
1293 e45c8b14af55+
1294 $ hg -R s id
1294 $ hg -R s id
1295 02dcf1d70411+
1295 02dcf1d70411+
1296 $ hg -R t id
1296 $ hg -R t id
1297 7af322bc1198+
1297 7af322bc1198+
1298 $ hg update tip
1298 $ hg update tip
1299 subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9)
1299 subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9)
1300 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1300 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1301 subrepository sources for s differ
1301 subrepository sources for s differ
1302 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l
1302 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l
1303 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a)
1303 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a)
1304 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1304 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1305 subrepository sources for t differ
1305 subrepository sources for t differ
1306 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l
1306 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l
1307 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1307 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1308 $ hg id
1308 $ hg id
1309 925c17564ef8+ tip
1309 925c17564ef8+ tip
1310 $ hg -R s id
1310 $ hg -R s id
1311 02dcf1d70411+
1311 02dcf1d70411+
1312 $ hg -R t id
1312 $ hg -R t id
1313 7af322bc1198+
1313 7af322bc1198+
1314
1314
1315 Sticky repository, update --clean
1315 Sticky repository, update --clean
1316 $ hg update --clean tip
1316 $ hg update --clean tip
1317 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1317 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1318 $ hg id
1318 $ hg id
1319 925c17564ef8 tip
1319 925c17564ef8 tip
1320 $ hg -R s id
1320 $ hg -R s id
1321 12a213df6fa9 tip
1321 12a213df6fa9 tip
1322 $ hg -R t id
1322 $ hg -R t id
1323 52c0adc0515a tip
1323 52c0adc0515a tip
1324
1324
1325 Test subrepo already at intended revision:
1325 Test subrepo already at intended revision:
1326 $ cd s
1326 $ cd s
1327 $ hg update fc627a69481f
1327 $ hg update fc627a69481f
1328 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1328 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1329 $ cd ..
1329 $ cd ..
1330 $ hg update 11
1330 $ hg update 11
1331 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1331 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1332 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1332 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
1333 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1333 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1334 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1334 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1335 $ hg id -n
1335 $ hg id -n
1336 11+
1336 11+
1337 $ hg -R s id
1337 $ hg -R s id
1338 fc627a69481f
1338 fc627a69481f
1339 $ hg -R t id
1339 $ hg -R t id
1340 e95bcfa18a35
1340 e95bcfa18a35
1341
1341
1342 Test that removing .hgsubstate doesn't break anything:
1342 Test that removing .hgsubstate doesn't break anything:
1343
1343
1344 $ hg rm -f .hgsubstate
1344 $ hg rm -f .hgsubstate
1345 $ hg ci -mrm
1345 $ hg ci -mrm
1346 nothing changed
1346 nothing changed
1347 [1]
1347 [1]
1348 $ hg log -vr tip
1348 $ hg log -vr tip
1349 changeset: 13:925c17564ef8
1349 changeset: 13:925c17564ef8
1350 tag: tip
1350 tag: tip
1351 user: test
1351 user: test
1352 date: Thu Jan 01 00:00:00 1970 +0000
1352 date: Thu Jan 01 00:00:00 1970 +0000
1353 files: .hgsubstate
1353 files: .hgsubstate
1354 description:
1354 description:
1355 13
1355 13
1356
1356
1357
1357
1358
1358
1359 Test that removing .hgsub removes .hgsubstate:
1359 Test that removing .hgsub removes .hgsubstate:
1360
1360
1361 $ hg rm .hgsub
1361 $ hg rm .hgsub
1362 $ hg ci -mrm2
1362 $ hg ci -mrm2
1363 created new head
1363 created new head
1364 $ hg log -vr tip
1364 $ hg log -vr tip
1365 changeset: 14:2400bccd50af
1365 changeset: 14:2400bccd50af
1366 tag: tip
1366 tag: tip
1367 parent: 11:365661e5936a
1367 parent: 11:365661e5936a
1368 user: test
1368 user: test
1369 date: Thu Jan 01 00:00:00 1970 +0000
1369 date: Thu Jan 01 00:00:00 1970 +0000
1370 files: .hgsub .hgsubstate
1370 files: .hgsub .hgsubstate
1371 description:
1371 description:
1372 rm2
1372 rm2
1373
1373
1374
1374
1375 Test issue3153: diff -S with deleted subrepos
1375 Test issue3153: diff -S with deleted subrepos
1376
1376
1377 $ hg diff --nodates -S -c .
1377 $ hg diff --nodates -S -c .
1378 diff -r 365661e5936a -r 2400bccd50af .hgsub
1378 diff -r 365661e5936a -r 2400bccd50af .hgsub
1379 --- a/.hgsub
1379 --- a/.hgsub
1380 +++ /dev/null
1380 +++ /dev/null
1381 @@ -1,2 +0,0 @@
1381 @@ -1,2 +0,0 @@
1382 -s = s
1382 -s = s
1383 -t = t
1383 -t = t
1384 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
1384 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
1385 --- a/.hgsubstate
1385 --- a/.hgsubstate
1386 +++ /dev/null
1386 +++ /dev/null
1387 @@ -1,2 +0,0 @@
1387 @@ -1,2 +0,0 @@
1388 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1388 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1389 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
1389 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
1390
1390
1391 Test behavior of add for explicit path in subrepo:
1391 Test behavior of add for explicit path in subrepo:
1392 $ cd ..
1392 $ cd ..
1393 $ hg init explicit
1393 $ hg init explicit
1394 $ cd explicit
1394 $ cd explicit
1395 $ echo s = s > .hgsub
1395 $ echo s = s > .hgsub
1396 $ hg add .hgsub
1396 $ hg add .hgsub
1397 $ hg init s
1397 $ hg init s
1398 $ hg ci -m0
1398 $ hg ci -m0
1399 Adding with an explicit path in a subrepo adds the file
1399 Adding with an explicit path in a subrepo adds the file
1400 $ echo c1 > f1
1400 $ echo c1 > f1
1401 $ echo c2 > s/f2
1401 $ echo c2 > s/f2
1402 $ hg st -S
1402 $ hg st -S
1403 ? f1
1403 ? f1
1404 ? s/f2
1404 ? s/f2
1405 $ hg add s/f2
1405 $ hg add s/f2
1406 $ hg st -S
1406 $ hg st -S
1407 A s/f2
1407 A s/f2
1408 ? f1
1408 ? f1
1409 $ hg ci -R s -m0
1409 $ hg ci -R s -m0
1410 $ hg ci -Am1
1410 $ hg ci -Am1
1411 adding f1
1411 adding f1
1412 Adding with an explicit path in a subrepo with -S has the same behavior
1412 Adding with an explicit path in a subrepo with -S has the same behavior
1413 $ echo c3 > f3
1413 $ echo c3 > f3
1414 $ echo c4 > s/f4
1414 $ echo c4 > s/f4
1415 $ hg st -S
1415 $ hg st -S
1416 ? f3
1416 ? f3
1417 ? s/f4
1417 ? s/f4
1418 $ hg add -S s/f4
1418 $ hg add -S s/f4
1419 $ hg st -S
1419 $ hg st -S
1420 A s/f4
1420 A s/f4
1421 ? f3
1421 ? f3
1422 $ hg ci -R s -m1
1422 $ hg ci -R s -m1
1423 $ hg ci -Ama2
1423 $ hg ci -Ama2
1424 adding f3
1424 adding f3
1425 Adding without a path or pattern silently ignores subrepos
1425 Adding without a path or pattern silently ignores subrepos
1426 $ echo c5 > f5
1426 $ echo c5 > f5
1427 $ echo c6 > s/f6
1427 $ echo c6 > s/f6
1428 $ echo c7 > s/f7
1428 $ echo c7 > s/f7
1429 $ hg st -S
1429 $ hg st -S
1430 ? f5
1430 ? f5
1431 ? s/f6
1431 ? s/f6
1432 ? s/f7
1432 ? s/f7
1433 $ hg add
1433 $ hg add
1434 adding f5
1434 adding f5
1435 $ hg st -S
1435 $ hg st -S
1436 A f5
1436 A f5
1437 ? s/f6
1437 ? s/f6
1438 ? s/f7
1438 ? s/f7
1439 $ hg ci -R s -Am2
1439 $ hg ci -R s -Am2
1440 adding f6
1440 adding f6
1441 adding f7
1441 adding f7
1442 $ hg ci -m3
1442 $ hg ci -m3
1443 Adding without a path or pattern with -S also adds files in subrepos
1443 Adding without a path or pattern with -S also adds files in subrepos
1444 $ echo c8 > f8
1444 $ echo c8 > f8
1445 $ echo c9 > s/f9
1445 $ echo c9 > s/f9
1446 $ echo c10 > s/f10
1446 $ echo c10 > s/f10
1447 $ hg st -S
1447 $ hg st -S
1448 ? f8
1448 ? f8
1449 ? s/f10
1449 ? s/f10
1450 ? s/f9
1450 ? s/f9
1451 $ hg add -S
1451 $ hg add -S
1452 adding f8
1452 adding f8
1453 adding s/f10 (glob)
1453 adding s/f10 (glob)
1454 adding s/f9 (glob)
1454 adding s/f9 (glob)
1455 $ hg st -S
1455 $ hg st -S
1456 A f8
1456 A f8
1457 A s/f10
1457 A s/f10
1458 A s/f9
1458 A s/f9
1459 $ hg ci -R s -m3
1459 $ hg ci -R s -m3
1460 $ hg ci -m4
1460 $ hg ci -m4
1461 Adding with a pattern silently ignores subrepos
1461 Adding with a pattern silently ignores subrepos
1462 $ echo c11 > fm11
1462 $ echo c11 > fm11
1463 $ echo c12 > fn12
1463 $ echo c12 > fn12
1464 $ echo c13 > s/fm13
1464 $ echo c13 > s/fm13
1465 $ echo c14 > s/fn14
1465 $ echo c14 > s/fn14
1466 $ hg st -S
1466 $ hg st -S
1467 ? fm11
1467 ? fm11
1468 ? fn12
1468 ? fn12
1469 ? s/fm13
1469 ? s/fm13
1470 ? s/fn14
1470 ? s/fn14
1471 $ hg add 'glob:**fm*'
1471 $ hg add 'glob:**fm*'
1472 adding fm11
1472 adding fm11
1473 $ hg st -S
1473 $ hg st -S
1474 A fm11
1474 A fm11
1475 ? fn12
1475 ? fn12
1476 ? s/fm13
1476 ? s/fm13
1477 ? s/fn14
1477 ? s/fn14
1478 $ hg ci -R s -Am4
1478 $ hg ci -R s -Am4
1479 adding fm13
1479 adding fm13
1480 adding fn14
1480 adding fn14
1481 $ hg ci -Am5
1481 $ hg ci -Am5
1482 adding fn12
1482 adding fn12
1483 Adding with a pattern with -S also adds matches in subrepos
1483 Adding with a pattern with -S also adds matches in subrepos
1484 $ echo c15 > fm15
1484 $ echo c15 > fm15
1485 $ echo c16 > fn16
1485 $ echo c16 > fn16
1486 $ echo c17 > s/fm17
1486 $ echo c17 > s/fm17
1487 $ echo c18 > s/fn18
1487 $ echo c18 > s/fn18
1488 $ hg st -S
1488 $ hg st -S
1489 ? fm15
1489 ? fm15
1490 ? fn16
1490 ? fn16
1491 ? s/fm17
1491 ? s/fm17
1492 ? s/fn18
1492 ? s/fn18
1493 $ hg add -S 'glob:**fm*'
1493 $ hg add -S 'glob:**fm*'
1494 adding fm15
1494 adding fm15
1495 adding s/fm17 (glob)
1495 adding s/fm17 (glob)
1496 $ hg st -S
1496 $ hg st -S
1497 A fm15
1497 A fm15
1498 A s/fm17
1498 A s/fm17
1499 ? fn16
1499 ? fn16
1500 ? s/fn18
1500 ? s/fn18
1501 $ hg ci -R s -Am5
1501 $ hg ci -R s -Am5
1502 adding fn18
1502 adding fn18
1503 $ hg ci -Am6
1503 $ hg ci -Am6
1504 adding fn16
1504 adding fn16
1505
1505
1506 Test behavior of forget for explicit path in subrepo:
1506 Test behavior of forget for explicit path in subrepo:
1507 Forgetting an explicit path in a subrepo untracks the file
1507 Forgetting an explicit path in a subrepo untracks the file
1508 $ echo c19 > s/f19
1508 $ echo c19 > s/f19
1509 $ hg add s/f19
1509 $ hg add s/f19
1510 $ hg st -S
1510 $ hg st -S
1511 A s/f19
1511 A s/f19
1512 $ hg forget s/f19
1512 $ hg forget s/f19
1513 $ hg st -S
1513 $ hg st -S
1514 ? s/f19
1514 ? s/f19
1515 $ rm s/f19
1515 $ rm s/f19
1516 $ cd ..
1516 $ cd ..
1517
1517
1518 Courtesy phases synchronisation to publishing server does not block the push
1518 Courtesy phases synchronisation to publishing server does not block the push
1519 (issue3781)
1519 (issue3781)
1520
1520
1521 $ cp -R main issue3781
1521 $ cp -R main issue3781
1522 $ cp -R main issue3781-dest
1522 $ cp -R main issue3781-dest
1523 $ cd issue3781-dest/s
1523 $ cd issue3781-dest/s
1524 $ hg phase tip # show we have draft changeset
1524 $ hg phase tip # show we have draft changeset
1525 5: draft
1525 5: draft
1526 $ chmod a-w .hg/store/phaseroots # prevent phase push
1526 $ chmod a-w .hg/store/phaseroots # prevent phase push
1527 $ cd ../../issue3781
1527 $ cd ../../issue3781
1528 $ cat >> .hg/hgrc << EOF
1528 $ cat >> .hg/hgrc << EOF
1529 > [paths]
1529 > [paths]
1530 > default=../issue3781-dest/
1530 > default=../issue3781-dest/
1531 > EOF
1531 > EOF
1532 $ hg push --config devel.legacy.exchange=bundle1
1532 $ hg push --config devel.legacy.exchange=bundle1
1533 pushing to $TESTTMP/issue3781-dest (glob)
1533 pushing to $TESTTMP/issue3781-dest (glob)
1534 pushing subrepo s to $TESTTMP/issue3781-dest/s
1534 pushing subrepo s to $TESTTMP/issue3781-dest/s
1535 searching for changes
1535 searching for changes
1536 no changes found
1536 no changes found
1537 searching for changes
1537 searching for changes
1538 no changes found
1538 no changes found
1539 [1]
1539 [1]
1540 # clean the push cache
1540 # clean the push cache
1541 $ rm s/.hg/cache/storehash/*
1541 $ rm s/.hg/cache/storehash/*
1542 $ hg push # bundle2+
1542 $ hg push # bundle2+
1543 pushing to $TESTTMP/issue3781-dest (glob)
1543 pushing to $TESTTMP/issue3781-dest (glob)
1544 pushing subrepo s to $TESTTMP/issue3781-dest/s
1544 pushing subrepo s to $TESTTMP/issue3781-dest/s
1545 searching for changes
1545 searching for changes
1546 no changes found
1546 no changes found
1547 searching for changes
1547 searching for changes
1548 no changes found
1548 no changes found
1549 [1]
1549 [1]
1550 $ cd ..
1550 $ cd ..
1551
1551
1552 Test phase choice for newly created commit with "phases.subrepochecks"
1552 Test phase choice for newly created commit with "phases.subrepochecks"
1553 configuration
1553 configuration
1554
1554
1555 $ cd t
1555 $ cd t
1556 $ hg update -q -r 12
1556 $ hg update -q -r 12
1557
1557
1558 $ cat >> s/ss/.hg/hgrc <<EOF
1558 $ cat >> s/ss/.hg/hgrc <<EOF
1559 > [phases]
1559 > [phases]
1560 > new-commit = secret
1560 > new-commit = secret
1561 > EOF
1561 > EOF
1562 $ cat >> s/.hg/hgrc <<EOF
1562 $ cat >> s/.hg/hgrc <<EOF
1563 > [phases]
1563 > [phases]
1564 > new-commit = draft
1564 > new-commit = draft
1565 > EOF
1565 > EOF
1566 $ echo phasecheck1 >> s/ss/a
1566 $ echo phasecheck1 >> s/ss/a
1567 $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1
1567 $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1
1568 committing subrepository ss
1568 committing subrepository ss
1569 transaction abort!
1569 transaction abort!
1570 rollback completed
1570 rollback completed
1571 abort: can't commit in draft phase conflicting secret from subrepository ss
1571 abort: can't commit in draft phase conflicting secret from subrepository ss
1572 [255]
1572 [255]
1573 $ echo phasecheck2 >> s/ss/a
1573 $ echo phasecheck2 >> s/ss/a
1574 $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2
1574 $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2
1575 committing subrepository ss
1575 committing subrepository ss
1576 $ hg -R s/ss phase tip
1576 $ hg -R s/ss phase tip
1577 3: secret
1577 3: secret
1578 $ hg -R s phase tip
1578 $ hg -R s phase tip
1579 6: draft
1579 6: draft
1580 $ echo phasecheck3 >> s/ss/a
1580 $ echo phasecheck3 >> s/ss/a
1581 $ hg -R s commit -S -m phasecheck3
1581 $ hg -R s commit -S -m phasecheck3
1582 committing subrepository ss
1582 committing subrepository ss
1583 warning: changes are committed in secret phase from subrepository ss
1583 warning: changes are committed in secret phase from subrepository ss
1584 $ hg -R s/ss phase tip
1584 $ hg -R s/ss phase tip
1585 4: secret
1585 4: secret
1586 $ hg -R s phase tip
1586 $ hg -R s phase tip
1587 7: secret
1587 7: secret
1588
1588
1589 $ cat >> t/.hg/hgrc <<EOF
1589 $ cat >> t/.hg/hgrc <<EOF
1590 > [phases]
1590 > [phases]
1591 > new-commit = draft
1591 > new-commit = draft
1592 > EOF
1592 > EOF
1593 $ cat >> .hg/hgrc <<EOF
1593 $ cat >> .hg/hgrc <<EOF
1594 > [phases]
1594 > [phases]
1595 > new-commit = public
1595 > new-commit = public
1596 > EOF
1596 > EOF
1597 $ echo phasecheck4 >> s/ss/a
1597 $ echo phasecheck4 >> s/ss/a
1598 $ echo phasecheck4 >> t/t
1598 $ echo phasecheck4 >> t/t
1599 $ hg commit -S -m phasecheck4
1599 $ hg commit -S -m phasecheck4
1600 committing subrepository s
1600 committing subrepository s
1601 committing subrepository s/ss (glob)
1601 committing subrepository s/ss (glob)
1602 warning: changes are committed in secret phase from subrepository ss
1602 warning: changes are committed in secret phase from subrepository ss
1603 committing subrepository t
1603 committing subrepository t
1604 warning: changes are committed in secret phase from subrepository s
1604 warning: changes are committed in secret phase from subrepository s
1605 created new head
1605 created new head
1606 $ hg -R s/ss phase tip
1606 $ hg -R s/ss phase tip
1607 5: secret
1607 5: secret
1608 $ hg -R s phase tip
1608 $ hg -R s phase tip
1609 8: secret
1609 8: secret
1610 $ hg -R t phase tip
1610 $ hg -R t phase tip
1611 6: draft
1611 6: draft
1612 $ hg phase tip
1612 $ hg phase tip
1613 15: secret
1613 15: secret
1614
1614
1615 $ cd ..
1615 $ cd ..
1616
1616
1617
1617
1618 Test that commit --secret works on both repo and subrepo (issue4182)
1618 Test that commit --secret works on both repo and subrepo (issue4182)
1619
1619
1620 $ cd main
1620 $ cd main
1621 $ echo secret >> b
1621 $ echo secret >> b
1622 $ echo secret >> s/b
1622 $ echo secret >> s/b
1623 $ hg commit --secret --subrepo -m "secret"
1623 $ hg commit --secret --subrepo -m "secret"
1624 committing subrepository s
1624 committing subrepository s
1625 $ hg phase -r .
1625 $ hg phase -r .
1626 6: secret
1626 6: secret
1627 $ cd s
1627 $ cd s
1628 $ hg phase -r .
1628 $ hg phase -r .
1629 6: secret
1629 6: secret
1630 $ cd ../../
1630 $ cd ../../
1631
1631
1632 Test "subrepos" template keyword
1632 Test "subrepos" template keyword
1633
1633
1634 $ cd t
1634 $ cd t
1635 $ hg update -q 15
1635 $ hg update -q 15
1636 $ cat > .hgsub <<EOF
1636 $ cat > .hgsub <<EOF
1637 > s = s
1637 > s = s
1638 > EOF
1638 > EOF
1639 $ hg commit -m "16"
1639 $ hg commit -m "16"
1640 warning: changes are committed in secret phase from subrepository s
1640 warning: changes are committed in secret phase from subrepository s
1641
1641
1642 (addition of ".hgsub" itself)
1642 (addition of ".hgsub" itself)
1643
1643
1644 $ hg diff --nodates -c 1 .hgsubstate
1644 $ hg diff --nodates -c 1 .hgsubstate
1645 diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate
1645 diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate
1646 --- /dev/null
1646 --- /dev/null
1647 +++ b/.hgsubstate
1647 +++ b/.hgsubstate
1648 @@ -0,0 +1,1 @@
1648 @@ -0,0 +1,1 @@
1649 +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1649 +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1650 $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1650 $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1651 f7b1eb17ad24 000000000000
1651 f7b1eb17ad24 000000000000
1652 s
1652 s
1653
1653
1654 (modification of existing entry)
1654 (modification of existing entry)
1655
1655
1656 $ hg diff --nodates -c 2 .hgsubstate
1656 $ hg diff --nodates -c 2 .hgsubstate
1657 diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate
1657 diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate
1658 --- a/.hgsubstate
1658 --- a/.hgsubstate
1659 +++ b/.hgsubstate
1659 +++ b/.hgsubstate
1660 @@ -1,1 +1,1 @@
1660 @@ -1,1 +1,1 @@
1661 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1661 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1662 +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s
1662 +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s
1663 $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1663 $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1664 7cf8cfea66e4 000000000000
1664 7cf8cfea66e4 000000000000
1665 s
1665 s
1666
1666
1667 (addition of entry)
1667 (addition of entry)
1668
1668
1669 $ hg diff --nodates -c 5 .hgsubstate
1669 $ hg diff --nodates -c 5 .hgsubstate
1670 diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate
1670 diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate
1671 --- a/.hgsubstate
1671 --- a/.hgsubstate
1672 +++ b/.hgsubstate
1672 +++ b/.hgsubstate
1673 @@ -1,1 +1,2 @@
1673 @@ -1,1 +1,2 @@
1674 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1674 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1675 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1675 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1676 $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1676 $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1677 7cf8cfea66e4 000000000000
1677 7cf8cfea66e4 000000000000
1678 t
1678 t
1679
1679
1680 (removal of existing entry)
1680 (removal of existing entry)
1681
1681
1682 $ hg diff --nodates -c 16 .hgsubstate
1682 $ hg diff --nodates -c 16 .hgsubstate
1683 diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate
1683 diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate
1684 --- a/.hgsubstate
1684 --- a/.hgsubstate
1685 +++ b/.hgsubstate
1685 +++ b/.hgsubstate
1686 @@ -1,2 +1,1 @@
1686 @@ -1,2 +1,1 @@
1687 0731af8ca9423976d3743119d0865097c07bdc1b s
1687 0731af8ca9423976d3743119d0865097c07bdc1b s
1688 -e202dc79b04c88a636ea8913d9182a1346d9b3dc t
1688 -e202dc79b04c88a636ea8913d9182a1346d9b3dc t
1689 $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1689 $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1690 8bec38d2bd0b 000000000000
1690 8bec38d2bd0b 000000000000
1691 t
1691 t
1692
1692
1693 (merging)
1693 (merging)
1694
1694
1695 $ hg diff --nodates -c 9 .hgsubstate
1695 $ hg diff --nodates -c 9 .hgsubstate
1696 diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate
1696 diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate
1697 --- a/.hgsubstate
1697 --- a/.hgsubstate
1698 +++ b/.hgsubstate
1698 +++ b/.hgsubstate
1699 @@ -1,1 +1,2 @@
1699 @@ -1,1 +1,2 @@
1700 fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1700 fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1701 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1701 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1702 $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1702 $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1703 f6affe3fbfaa 1f14a2e2d3ec
1703 f6affe3fbfaa 1f14a2e2d3ec
1704 t
1704 t
1705
1705
1706 (removal of ".hgsub" itself)
1706 (removal of ".hgsub" itself)
1707
1707
1708 $ hg diff --nodates -c 8 .hgsubstate
1708 $ hg diff --nodates -c 8 .hgsubstate
1709 diff -r f94576341bcf -r 96615c1dad2d .hgsubstate
1709 diff -r f94576341bcf -r 96615c1dad2d .hgsubstate
1710 --- a/.hgsubstate
1710 --- a/.hgsubstate
1711 +++ /dev/null
1711 +++ /dev/null
1712 @@ -1,2 +0,0 @@
1712 @@ -1,2 +0,0 @@
1713 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1713 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1714 -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t
1714 -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t
1715 $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1715 $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1716 f94576341bcf 000000000000
1716 f94576341bcf 000000000000
1717
1717
1718 Test that '[paths]' is configured correctly at subrepo creation
1718 Test that '[paths]' is configured correctly at subrepo creation
1719
1719
1720 $ cd $TESTTMP/tc
1720 $ cd $TESTTMP/tc
1721 $ cat > .hgsub <<EOF
1721 $ cat > .hgsub <<EOF
1722 > # to clear bogus subrepo path 'bogus=[boguspath'
1722 > # to clear bogus subrepo path 'bogus=[boguspath'
1723 > s = s
1723 > s = s
1724 > t = t
1724 > t = t
1725 > EOF
1725 > EOF
1726 $ hg update -q --clean null
1726 $ hg update -q --clean null
1727 $ rm -rf s t
1727 $ rm -rf s t
1728 $ cat >> .hg/hgrc <<EOF
1728 $ cat >> .hg/hgrc <<EOF
1729 > [paths]
1729 > [paths]
1730 > default-push = /foo/bar
1730 > default-push = /foo/bar
1731 > EOF
1731 > EOF
1732 $ hg update -q
1732 $ hg update -q
1733 $ cat s/.hg/hgrc
1733 $ cat s/.hg/hgrc
1734 [paths]
1734 [paths]
1735 default = $TESTTMP/t/s
1735 default = $TESTTMP/t/s
1736 default-push = /foo/bar/s
1736 default-push = /foo/bar/s
1737 $ cat s/ss/.hg/hgrc
1737 $ cat s/ss/.hg/hgrc
1738 [paths]
1738 [paths]
1739 default = $TESTTMP/t/s/ss
1739 default = $TESTTMP/t/s/ss
1740 default-push = /foo/bar/s/ss
1740 default-push = /foo/bar/s/ss
1741 $ cat t/.hg/hgrc
1741 $ cat t/.hg/hgrc
1742 [paths]
1742 [paths]
1743 default = $TESTTMP/t/t
1743 default = $TESTTMP/t/t
1744 default-push = /foo/bar/t
1744 default-push = /foo/bar/t
1745
1745
1746 $ cd $TESTTMP/t
1746 $ cd $TESTTMP/t
1747 $ hg up -qC 0
1747 $ hg up -qC 0
1748 $ echo 'bar' > bar.txt
1748 $ echo 'bar' > bar.txt
1749 $ hg ci -Am 'branch before subrepo add'
1749 $ hg ci -Am 'branch before subrepo add'
1750 adding bar.txt
1750 adding bar.txt
1751 created new head
1751 created new head
1752 $ hg merge -r "first(subrepo('s'))"
1752 $ hg merge -r "first(subrepo('s'))"
1753 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1753 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1754 (branch merge, don't forget to commit)
1754 (branch merge, don't forget to commit)
1755 $ hg status -S -X '.hgsub*'
1755 $ hg status -S -X '.hgsub*'
1756 A s/a
1756 A s/a
1757 ? s/b
1757 ? s/b
1758 ? s/c
1758 ? s/c
1759 ? s/f1
1759 ? s/f1
1760 $ hg status -S --rev 'p2()'
1760 $ hg status -S --rev 'p2()'
1761 A bar.txt
1761 A bar.txt
1762 ? s/b
1762 ? s/b
1763 ? s/c
1763 ? s/c
1764 ? s/f1
1764 ? s/f1
1765 $ hg diff -S -X '.hgsub*' --nodates
1765 $ hg diff -S -X '.hgsub*' --nodates
1766 diff -r 000000000000 s/a
1766 diff -r 000000000000 s/a
1767 --- /dev/null
1767 --- /dev/null
1768 +++ b/s/a
1768 +++ b/s/a
1769 @@ -0,0 +1,1 @@
1769 @@ -0,0 +1,1 @@
1770 +a
1770 +a
1771 $ hg diff -S --rev 'p2()' --nodates
1771 $ hg diff -S --rev 'p2()' --nodates
1772 diff -r 7cf8cfea66e4 bar.txt
1772 diff -r 7cf8cfea66e4 bar.txt
1773 --- /dev/null
1773 --- /dev/null
1774 +++ b/bar.txt
1774 +++ b/bar.txt
1775 @@ -0,0 +1,1 @@
1775 @@ -0,0 +1,1 @@
1776 +bar
1776 +bar
1777
1777
1778 $ cd ..
1778 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now