##// END OF EJS Templates
tests: clean up many print statements to be print functions instead...
Augie Fackler -
r33687:24849d53 default
parent child Browse files
Show More
@@ -1,426 +1,426 b''
1 #require tic
1 #require tic
2
2
3 Set up a repo
3 Set up a repo
4
4
5 $ cp $HGRCPATH $HGRCPATH.pretest
5 $ cp $HGRCPATH $HGRCPATH.pretest
6 $ cat <<EOF >> $HGRCPATH
6 $ cat <<EOF >> $HGRCPATH
7 > [ui]
7 > [ui]
8 > interactive = true
8 > interactive = true
9 > interface = curses
9 > interface = curses
10 > [experimental]
10 > [experimental]
11 > crecordtest = testModeCommands
11 > crecordtest = testModeCommands
12 > EOF
12 > EOF
13
13
14 Record with noeol at eof (issue5268)
14 Record with noeol at eof (issue5268)
15 $ hg init noeol
15 $ hg init noeol
16 $ cd noeol
16 $ cd noeol
17 $ printf '0' > a
17 $ printf '0' > a
18 $ printf '0\n' > b
18 $ printf '0\n' > b
19 $ hg ci -Aqm initial
19 $ hg ci -Aqm initial
20 $ printf '1\n0' > a
20 $ printf '1\n0' > a
21 $ printf '1\n0\n' > b
21 $ printf '1\n0\n' > b
22 $ cat <<EOF >testModeCommands
22 $ cat <<EOF >testModeCommands
23 > c
23 > c
24 > EOF
24 > EOF
25 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "add hunks" -d "0 0"
25 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "add hunks" -d "0 0"
26 $ cd ..
26 $ cd ..
27
27
28 Normal repo
28 Normal repo
29 $ hg init a
29 $ hg init a
30 $ cd a
30 $ cd a
31
31
32 Committing some changes but stopping on the way
32 Committing some changes but stopping on the way
33
33
34 $ echo "a" > a
34 $ echo "a" > a
35 $ hg add a
35 $ hg add a
36 $ cat <<EOF >testModeCommands
36 $ cat <<EOF >testModeCommands
37 > TOGGLE
37 > TOGGLE
38 > X
38 > X
39 > EOF
39 > EOF
40 $ hg commit -i -m "a" -d "0 0"
40 $ hg commit -i -m "a" -d "0 0"
41 no changes to record
41 no changes to record
42 [1]
42 [1]
43 $ hg tip
43 $ hg tip
44 changeset: -1:000000000000
44 changeset: -1:000000000000
45 tag: tip
45 tag: tip
46 user:
46 user:
47 date: Thu Jan 01 00:00:00 1970 +0000
47 date: Thu Jan 01 00:00:00 1970 +0000
48
48
49
49
50 Committing some changes
50 Committing some changes
51
51
52 $ cat <<EOF >testModeCommands
52 $ cat <<EOF >testModeCommands
53 > X
53 > X
54 > EOF
54 > EOF
55 $ hg commit -i -m "a" -d "0 0"
55 $ hg commit -i -m "a" -d "0 0"
56 $ hg tip
56 $ hg tip
57 changeset: 0:cb9a9f314b8b
57 changeset: 0:cb9a9f314b8b
58 tag: tip
58 tag: tip
59 user: test
59 user: test
60 date: Thu Jan 01 00:00:00 1970 +0000
60 date: Thu Jan 01 00:00:00 1970 +0000
61 summary: a
61 summary: a
62
62
63 Check that commit -i works with no changes
63 Check that commit -i works with no changes
64 $ hg commit -i
64 $ hg commit -i
65 no changes to record
65 no changes to record
66 [1]
66 [1]
67
67
68 Committing only one file
68 Committing only one file
69
69
70 $ echo "a" >> a
70 $ echo "a" >> a
71 >>> open('b', 'wb').write("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")
71 >>> open('b', 'wb').write("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")
72 $ hg add b
72 $ hg add b
73 $ cat <<EOF >testModeCommands
73 $ cat <<EOF >testModeCommands
74 > TOGGLE
74 > TOGGLE
75 > KEY_DOWN
75 > KEY_DOWN
76 > X
76 > X
77 > EOF
77 > EOF
78 $ hg commit -i -m "one file" -d "0 0"
78 $ hg commit -i -m "one file" -d "0 0"
79 $ hg tip
79 $ hg tip
80 changeset: 1:fb2705a663ea
80 changeset: 1:fb2705a663ea
81 tag: tip
81 tag: tip
82 user: test
82 user: test
83 date: Thu Jan 01 00:00:00 1970 +0000
83 date: Thu Jan 01 00:00:00 1970 +0000
84 summary: one file
84 summary: one file
85
85
86 $ hg cat -r tip a
86 $ hg cat -r tip a
87 a
87 a
88 $ cat a
88 $ cat a
89 a
89 a
90 a
90 a
91
91
92 Committing only one hunk while aborting edition of hunk
92 Committing only one hunk while aborting edition of hunk
93
93
94 - Untoggle all the hunks, go down to the second file
94 - Untoggle all the hunks, go down to the second file
95 - unfold it
95 - unfold it
96 - go down to second hunk (1 for the first hunk, 1 for the first hunkline, 1 for the second hunk, 1 for the second hunklike)
96 - go down to second hunk (1 for the first hunk, 1 for the first hunkline, 1 for the second hunk, 1 for the second hunklike)
97 - toggle the second hunk
97 - toggle the second hunk
98 - toggle on and off the amend mode (to check that it toggles off)
98 - toggle on and off the amend mode (to check that it toggles off)
99 - edit the hunk and quit the editor immediately with non-zero status
99 - edit the hunk and quit the editor immediately with non-zero status
100 - commit
100 - commit
101
101
102 $ printf "printf 'editor ran\n'; exit 1" > editor.sh
102 $ printf "printf 'editor ran\n'; exit 1" > editor.sh
103 $ echo "x" > c
103 $ echo "x" > c
104 $ cat b >> c
104 $ cat b >> c
105 $ echo "y" >> c
105 $ echo "y" >> c
106 $ mv c b
106 $ mv c b
107 $ cat <<EOF >testModeCommands
107 $ cat <<EOF >testModeCommands
108 > A
108 > A
109 > KEY_DOWN
109 > KEY_DOWN
110 > f
110 > f
111 > KEY_DOWN
111 > KEY_DOWN
112 > KEY_DOWN
112 > KEY_DOWN
113 > KEY_DOWN
113 > KEY_DOWN
114 > KEY_DOWN
114 > KEY_DOWN
115 > TOGGLE
115 > TOGGLE
116 > a
116 > a
117 > a
117 > a
118 > e
118 > e
119 > X
119 > X
120 > EOF
120 > EOF
121 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "one hunk" -d "0 0"
121 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "one hunk" -d "0 0"
122 editor ran
122 editor ran
123 $ rm editor.sh
123 $ rm editor.sh
124 $ hg tip
124 $ hg tip
125 changeset: 2:7d10dfe755a8
125 changeset: 2:7d10dfe755a8
126 tag: tip
126 tag: tip
127 user: test
127 user: test
128 date: Thu Jan 01 00:00:00 1970 +0000
128 date: Thu Jan 01 00:00:00 1970 +0000
129 summary: one hunk
129 summary: one hunk
130
130
131 $ hg cat -r tip b
131 $ hg cat -r tip b
132 1
132 1
133 2
133 2
134 3
134 3
135 4
135 4
136 5
136 5
137 6
137 6
138 7
138 7
139 8
139 8
140 9
140 9
141 10
141 10
142 y
142 y
143 $ cat b
143 $ cat b
144 x
144 x
145 1
145 1
146 2
146 2
147 3
147 3
148 4
148 4
149 5
149 5
150 6
150 6
151 7
151 7
152 8
152 8
153 9
153 9
154 10
154 10
155 y
155 y
156 $ hg commit -m "other hunks"
156 $ hg commit -m "other hunks"
157 $ hg tip
157 $ hg tip
158 changeset: 3:a6735021574d
158 changeset: 3:a6735021574d
159 tag: tip
159 tag: tip
160 user: test
160 user: test
161 date: Thu Jan 01 00:00:00 1970 +0000
161 date: Thu Jan 01 00:00:00 1970 +0000
162 summary: other hunks
162 summary: other hunks
163
163
164 $ hg cat -r tip b
164 $ hg cat -r tip b
165 x
165 x
166 1
166 1
167 2
167 2
168 3
168 3
169 4
169 4
170 5
170 5
171 6
171 6
172 7
172 7
173 8
173 8
174 9
174 9
175 10
175 10
176 y
176 y
177
177
178 Newly added files can be selected with the curses interface
178 Newly added files can be selected with the curses interface
179
179
180 $ hg update -C .
180 $ hg update -C .
181 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
182 $ echo "hello" > x
182 $ echo "hello" > x
183 $ hg add x
183 $ hg add x
184 $ cat <<EOF >testModeCommands
184 $ cat <<EOF >testModeCommands
185 > TOGGLE
185 > TOGGLE
186 > TOGGLE
186 > TOGGLE
187 > X
187 > X
188 > EOF
188 > EOF
189 $ hg st
189 $ hg st
190 A x
190 A x
191 ? testModeCommands
191 ? testModeCommands
192 $ hg commit -i -m "newly added file" -d "0 0"
192 $ hg commit -i -m "newly added file" -d "0 0"
193 $ hg st
193 $ hg st
194 ? testModeCommands
194 ? testModeCommands
195
195
196 Amend option works
196 Amend option works
197 $ echo "hello world" > x
197 $ echo "hello world" > x
198 $ hg diff -c .
198 $ hg diff -c .
199 diff -r a6735021574d -r 2b0e9be4d336 x
199 diff -r a6735021574d -r 2b0e9be4d336 x
200 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
200 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
201 +++ b/x Thu Jan 01 00:00:00 1970 +0000
201 +++ b/x Thu Jan 01 00:00:00 1970 +0000
202 @@ -0,0 +1,1 @@
202 @@ -0,0 +1,1 @@
203 +hello
203 +hello
204 $ cat <<EOF >testModeCommands
204 $ cat <<EOF >testModeCommands
205 > a
205 > a
206 > X
206 > X
207 > EOF
207 > EOF
208 $ hg commit -i -m "newly added file" -d "0 0"
208 $ hg commit -i -m "newly added file" -d "0 0"
209 saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-28bbe4e2-amend.hg (glob)
209 saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-28bbe4e2-amend.hg (glob)
210 $ hg diff -c .
210 $ hg diff -c .
211 diff -r a6735021574d -r c1d239d165ae x
211 diff -r a6735021574d -r c1d239d165ae x
212 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
212 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
213 +++ b/x Thu Jan 01 00:00:00 1970 +0000
213 +++ b/x Thu Jan 01 00:00:00 1970 +0000
214 @@ -0,0 +1,1 @@
214 @@ -0,0 +1,1 @@
215 +hello world
215 +hello world
216
216
217 Editing a hunk puts you back on that hunk when done editing (issue5041)
217 Editing a hunk puts you back on that hunk when done editing (issue5041)
218 To do that, we change two lines in a file, pretend to edit the second line,
218 To do that, we change two lines in a file, pretend to edit the second line,
219 exit, toggle the line selected at the end of the edit and commit.
219 exit, toggle the line selected at the end of the edit and commit.
220 The first line should be recorded if we were put on the second line at the end
220 The first line should be recorded if we were put on the second line at the end
221 of the edit.
221 of the edit.
222
222
223 $ hg update -C .
223 $ hg update -C .
224 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
224 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
225 $ echo "foo" > x
225 $ echo "foo" > x
226 $ echo "hello world" >> x
226 $ echo "hello world" >> x
227 $ echo "bar" >> x
227 $ echo "bar" >> x
228 $ cat <<EOF >testModeCommands
228 $ cat <<EOF >testModeCommands
229 > f
229 > f
230 > KEY_DOWN
230 > KEY_DOWN
231 > KEY_DOWN
231 > KEY_DOWN
232 > KEY_DOWN
232 > KEY_DOWN
233 > KEY_DOWN
233 > KEY_DOWN
234 > e
234 > e
235 > TOGGLE
235 > TOGGLE
236 > X
236 > X
237 > EOF
237 > EOF
238 $ printf "printf 'editor ran\n'; exit 0" > editor.sh
238 $ printf "printf 'editor ran\n'; exit 0" > editor.sh
239 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "edit hunk" -d "0 0"
239 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "edit hunk" -d "0 0"
240 editor ran
240 editor ran
241 $ hg cat -r . x
241 $ hg cat -r . x
242 foo
242 foo
243 hello world
243 hello world
244
244
245 Testing the review option. The entire final filtered patch should show
245 Testing the review option. The entire final filtered patch should show
246 up in the editor and be editable. We will unselect the second file and
246 up in the editor and be editable. We will unselect the second file and
247 the first hunk of the third file. During review, we will decide that
247 the first hunk of the third file. During review, we will decide that
248 "lower" sounds better than "bottom", and the final commit should
248 "lower" sounds better than "bottom", and the final commit should
249 reflect this edition.
249 reflect this edition.
250
250
251 $ hg update -C .
251 $ hg update -C .
252 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
252 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 $ echo "top" > c
253 $ echo "top" > c
254 $ cat x >> c
254 $ cat x >> c
255 $ echo "bottom" >> c
255 $ echo "bottom" >> c
256 $ mv c x
256 $ mv c x
257 $ echo "third a" >> a
257 $ echo "third a" >> a
258 $ echo "we will unselect this" >> b
258 $ echo "we will unselect this" >> b
259
259
260 $ cat > editor.sh <<EOF
260 $ cat > editor.sh <<EOF
261 > cat "\$1"
261 > cat "\$1"
262 > cat "\$1" | sed s/bottom/lower/ > tmp
262 > cat "\$1" | sed s/bottom/lower/ > tmp
263 > mv tmp "\$1"
263 > mv tmp "\$1"
264 > EOF
264 > EOF
265 $ cat > testModeCommands <<EOF
265 $ cat > testModeCommands <<EOF
266 > KEY_DOWN
266 > KEY_DOWN
267 > TOGGLE
267 > TOGGLE
268 > KEY_DOWN
268 > KEY_DOWN
269 > f
269 > f
270 > KEY_DOWN
270 > KEY_DOWN
271 > TOGGLE
271 > TOGGLE
272 > R
272 > R
273 > EOF
273 > EOF
274
274
275 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "review hunks" -d "0 0"
275 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "review hunks" -d "0 0"
276 # To remove '-' lines, make them ' ' lines (context).
276 # To remove '-' lines, make them ' ' lines (context).
277 # To remove '+' lines, delete them.
277 # To remove '+' lines, delete them.
278 # Lines starting with # will be removed from the patch.
278 # Lines starting with # will be removed from the patch.
279 #
279 #
280 # If the patch applies cleanly, the edited patch will immediately
280 # If the patch applies cleanly, the edited patch will immediately
281 # be finalised. If it does not apply cleanly, rejects files will be
281 # be finalised. If it does not apply cleanly, rejects files will be
282 # generated. You can use those when you try again.
282 # generated. You can use those when you try again.
283 diff --git a/a b/a
283 diff --git a/a b/a
284 --- a/a
284 --- a/a
285 +++ b/a
285 +++ b/a
286 @@ -1,2 +1,3 @@
286 @@ -1,2 +1,3 @@
287 a
287 a
288 a
288 a
289 +third a
289 +third a
290 diff --git a/x b/x
290 diff --git a/x b/x
291 --- a/x
291 --- a/x
292 +++ b/x
292 +++ b/x
293 @@ -1,2 +1,3 @@
293 @@ -1,2 +1,3 @@
294 foo
294 foo
295 hello world
295 hello world
296 +bottom
296 +bottom
297
297
298 $ hg cat -r . a
298 $ hg cat -r . a
299 a
299 a
300 a
300 a
301 third a
301 third a
302
302
303 $ hg cat -r . b
303 $ hg cat -r . b
304 x
304 x
305 1
305 1
306 2
306 2
307 3
307 3
308 4
308 4
309 5
309 5
310 6
310 6
311 7
311 7
312 8
312 8
313 9
313 9
314 10
314 10
315 y
315 y
316
316
317 $ hg cat -r . x
317 $ hg cat -r . x
318 foo
318 foo
319 hello world
319 hello world
320 lower
320 lower
321
321
322 Check spacemovesdown
322 Check spacemovesdown
323
323
324 $ cat <<EOF >> $HGRCPATH
324 $ cat <<EOF >> $HGRCPATH
325 > [experimental]
325 > [experimental]
326 > spacemovesdown = true
326 > spacemovesdown = true
327 > EOF
327 > EOF
328 $ cat <<EOF >testModeCommands
328 $ cat <<EOF >testModeCommands
329 > TOGGLE
329 > TOGGLE
330 > TOGGLE
330 > TOGGLE
331 > X
331 > X
332 > EOF
332 > EOF
333 $ hg status -q
333 $ hg status -q
334 M b
334 M b
335 M x
335 M x
336 $ hg commit -i -m "nothing to commit?" -d "0 0"
336 $ hg commit -i -m "nothing to commit?" -d "0 0"
337 no changes to record
337 no changes to record
338 [1]
338 [1]
339
339
340 Check ui.interface logic for the chunkselector
340 Check ui.interface logic for the chunkselector
341
341
342 The default interface is text
342 The default interface is text
343 $ cp $HGRCPATH.pretest $HGRCPATH
343 $ cp $HGRCPATH.pretest $HGRCPATH
344 $ chunkselectorinterface() {
344 $ chunkselectorinterface() {
345 > $PYTHON <<EOF
345 > $PYTHON <<EOF
346 > from mercurial import hg, ui;\
346 > from mercurial import hg, ui;\
347 > repo = hg.repository(ui.ui.load(), ".");\
347 > repo = hg.repository(ui.ui.load(), ".");\
348 > print repo.ui.interface("chunkselector")
348 > print(repo.ui.interface("chunkselector"))
349 > EOF
349 > EOF
350 > }
350 > }
351 $ chunkselectorinterface
351 $ chunkselectorinterface
352 text
352 text
353
353
354 If only the default is set, we'll use that for the feature, too
354 If only the default is set, we'll use that for the feature, too
355 $ cp $HGRCPATH.pretest $HGRCPATH
355 $ cp $HGRCPATH.pretest $HGRCPATH
356 $ cat <<EOF >> $HGRCPATH
356 $ cat <<EOF >> $HGRCPATH
357 > [ui]
357 > [ui]
358 > interface = curses
358 > interface = curses
359 > EOF
359 > EOF
360 $ chunkselectorinterface
360 $ chunkselectorinterface
361 curses
361 curses
362
362
363 It is possible to override the default interface with a feature specific
363 It is possible to override the default interface with a feature specific
364 interface
364 interface
365 $ cp $HGRCPATH.pretest $HGRCPATH
365 $ cp $HGRCPATH.pretest $HGRCPATH
366 $ cat <<EOF >> $HGRCPATH
366 $ cat <<EOF >> $HGRCPATH
367 > [ui]
367 > [ui]
368 > interface = text
368 > interface = text
369 > interface.chunkselector = curses
369 > interface.chunkselector = curses
370 > EOF
370 > EOF
371
371
372 $ chunkselectorinterface
372 $ chunkselectorinterface
373 curses
373 curses
374
374
375 $ cp $HGRCPATH.pretest $HGRCPATH
375 $ cp $HGRCPATH.pretest $HGRCPATH
376 $ cat <<EOF >> $HGRCPATH
376 $ cat <<EOF >> $HGRCPATH
377 > [ui]
377 > [ui]
378 > interface = curses
378 > interface = curses
379 > interface.chunkselector = text
379 > interface.chunkselector = text
380 > EOF
380 > EOF
381
381
382 $ chunkselectorinterface
382 $ chunkselectorinterface
383 text
383 text
384
384
385 If a bad interface name is given, we use the default value (with a nice
385 If a bad interface name is given, we use the default value (with a nice
386 error message to suggest that the configuration needs to be fixed)
386 error message to suggest that the configuration needs to be fixed)
387
387
388 $ cp $HGRCPATH.pretest $HGRCPATH
388 $ cp $HGRCPATH.pretest $HGRCPATH
389 $ cat <<EOF >> $HGRCPATH
389 $ cat <<EOF >> $HGRCPATH
390 > [ui]
390 > [ui]
391 > interface = blah
391 > interface = blah
392 > EOF
392 > EOF
393 $ chunkselectorinterface
393 $ chunkselectorinterface
394 invalid value for ui.interface: blah (using text)
394 invalid value for ui.interface: blah (using text)
395 text
395 text
396
396
397 $ cp $HGRCPATH.pretest $HGRCPATH
397 $ cp $HGRCPATH.pretest $HGRCPATH
398 $ cat <<EOF >> $HGRCPATH
398 $ cat <<EOF >> $HGRCPATH
399 > [ui]
399 > [ui]
400 > interface = curses
400 > interface = curses
401 > interface.chunkselector = blah
401 > interface.chunkselector = blah
402 > EOF
402 > EOF
403 $ chunkselectorinterface
403 $ chunkselectorinterface
404 invalid value for ui.interface.chunkselector: blah (using curses)
404 invalid value for ui.interface.chunkselector: blah (using curses)
405 curses
405 curses
406
406
407 $ cp $HGRCPATH.pretest $HGRCPATH
407 $ cp $HGRCPATH.pretest $HGRCPATH
408 $ cat <<EOF >> $HGRCPATH
408 $ cat <<EOF >> $HGRCPATH
409 > [ui]
409 > [ui]
410 > interface = blah
410 > interface = blah
411 > interface.chunkselector = curses
411 > interface.chunkselector = curses
412 > EOF
412 > EOF
413 $ chunkselectorinterface
413 $ chunkselectorinterface
414 invalid value for ui.interface: blah
414 invalid value for ui.interface: blah
415 curses
415 curses
416
416
417 $ cp $HGRCPATH.pretest $HGRCPATH
417 $ cp $HGRCPATH.pretest $HGRCPATH
418 $ cat <<EOF >> $HGRCPATH
418 $ cat <<EOF >> $HGRCPATH
419 > [ui]
419 > [ui]
420 > interface = blah
420 > interface = blah
421 > interface.chunkselector = blah
421 > interface.chunkselector = blah
422 > EOF
422 > EOF
423 $ chunkselectorinterface
423 $ chunkselectorinterface
424 invalid value for ui.interface: blah
424 invalid value for ui.interface: blah
425 invalid value for ui.interface.chunkselector: blah (using text)
425 invalid value for ui.interface.chunkselector: blah (using text)
426 text
426 text
@@ -1,131 +1,131 b''
1 # reproduce issue2264, issue2516
1 # reproduce issue2264, issue2516
2
2
3 create test repo
3 create test repo
4 $ cat <<EOF >> $HGRCPATH
4 $ cat <<EOF >> $HGRCPATH
5 > [extensions]
5 > [extensions]
6 > transplant =
6 > transplant =
7 > EOF
7 > EOF
8 $ hg init repo
8 $ hg init repo
9 $ cd repo
9 $ cd repo
10 $ template="{rev} {desc|firstline} [{branch}]\n"
10 $ template="{rev} {desc|firstline} [{branch}]\n"
11
11
12 # we need to start out with two changesets on the default branch
12 # we need to start out with two changesets on the default branch
13 # in order to avoid the cute little optimization where transplant
13 # in order to avoid the cute little optimization where transplant
14 # pulls rather than transplants
14 # pulls rather than transplants
15 add initial changesets
15 add initial changesets
16 $ echo feature1 > file1
16 $ echo feature1 > file1
17 $ hg ci -Am"feature 1"
17 $ hg ci -Am"feature 1"
18 adding file1
18 adding file1
19 $ echo feature2 >> file2
19 $ echo feature2 >> file2
20 $ hg ci -Am"feature 2"
20 $ hg ci -Am"feature 2"
21 adding file2
21 adding file2
22
22
23 # The changes to 'bugfix' are enough to show the bug: in fact, with only
23 # The changes to 'bugfix' are enough to show the bug: in fact, with only
24 # those changes, it's a very noisy crash ("RuntimeError: nothing
24 # those changes, it's a very noisy crash ("RuntimeError: nothing
25 # committed after transplant"). But if we modify a second file in the
25 # committed after transplant"). But if we modify a second file in the
26 # transplanted changesets, the bug is much more subtle: transplant
26 # transplanted changesets, the bug is much more subtle: transplant
27 # silently drops the second change to 'bugfix' on the floor, and we only
27 # silently drops the second change to 'bugfix' on the floor, and we only
28 # see it when we run 'hg status' after transplanting. Subtle data loss
28 # see it when we run 'hg status' after transplanting. Subtle data loss
29 # bugs are worse than crashes, so reproduce the subtle case here.
29 # bugs are worse than crashes, so reproduce the subtle case here.
30 commit bug fixes on bug fix branch
30 commit bug fixes on bug fix branch
31 $ hg branch fixes
31 $ hg branch fixes
32 marked working directory as branch fixes
32 marked working directory as branch fixes
33 (branches are permanent and global, did you want a bookmark?)
33 (branches are permanent and global, did you want a bookmark?)
34 $ echo fix1 > bugfix
34 $ echo fix1 > bugfix
35 $ echo fix1 >> file1
35 $ echo fix1 >> file1
36 $ hg ci -Am"fix 1"
36 $ hg ci -Am"fix 1"
37 adding bugfix
37 adding bugfix
38 $ echo fix2 > bugfix
38 $ echo fix2 > bugfix
39 $ echo fix2 >> file1
39 $ echo fix2 >> file1
40 $ hg ci -Am"fix 2"
40 $ hg ci -Am"fix 2"
41 $ hg log -G --template="$template"
41 $ hg log -G --template="$template"
42 @ 3 fix 2 [fixes]
42 @ 3 fix 2 [fixes]
43 |
43 |
44 o 2 fix 1 [fixes]
44 o 2 fix 1 [fixes]
45 |
45 |
46 o 1 feature 2 [default]
46 o 1 feature 2 [default]
47 |
47 |
48 o 0 feature 1 [default]
48 o 0 feature 1 [default]
49
49
50 transplant bug fixes onto release branch
50 transplant bug fixes onto release branch
51 $ hg update 0
51 $ hg update 0
52 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
52 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
53 $ hg branch release
53 $ hg branch release
54 marked working directory as branch release
54 marked working directory as branch release
55 $ hg transplant 2 3
55 $ hg transplant 2 3
56 applying [0-9a-f]{12} (re)
56 applying [0-9a-f]{12} (re)
57 [0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
57 [0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
58 applying [0-9a-f]{12} (re)
58 applying [0-9a-f]{12} (re)
59 [0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
59 [0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
60 $ hg log -G --template="$template"
60 $ hg log -G --template="$template"
61 @ 5 fix 2 [release]
61 @ 5 fix 2 [release]
62 |
62 |
63 o 4 fix 1 [release]
63 o 4 fix 1 [release]
64 |
64 |
65 | o 3 fix 2 [fixes]
65 | o 3 fix 2 [fixes]
66 | |
66 | |
67 | o 2 fix 1 [fixes]
67 | o 2 fix 1 [fixes]
68 | |
68 | |
69 | o 1 feature 2 [default]
69 | o 1 feature 2 [default]
70 |/
70 |/
71 o 0 feature 1 [default]
71 o 0 feature 1 [default]
72
72
73 $ hg status
73 $ hg status
74 $ hg status --rev 0:4
74 $ hg status --rev 0:4
75 M file1
75 M file1
76 A bugfix
76 A bugfix
77 $ hg status --rev 4:5
77 $ hg status --rev 4:5
78 M bugfix
78 M bugfix
79 M file1
79 M file1
80
80
81 now test that we fixed the bug for all scripts/extensions
81 now test that we fixed the bug for all scripts/extensions
82 $ cat > $TESTTMP/committwice.py <<__EOF__
82 $ cat > $TESTTMP/committwice.py <<__EOF__
83 > from mercurial import ui, hg, match, node
83 > from mercurial import ui, hg, match, node
84 > from time import sleep
84 > from time import sleep
85 >
85 >
86 > def replacebyte(fn, b):
86 > def replacebyte(fn, b):
87 > f = open(fn, "rb+")
87 > f = open(fn, "rb+")
88 > f.seek(0, 0)
88 > f.seek(0, 0)
89 > f.write(b)
89 > f.write(b)
90 > f.close()
90 > f.close()
91 >
91 >
92 > def printfiles(repo, rev):
92 > def printfiles(repo, rev):
93 > print "revision %s files: %s" % (rev, repo[rev].files())
93 > print("revision %s files: %s" % (rev, repo[rev].files()))
94 >
94 >
95 > repo = hg.repository(ui.ui.load(), '.')
95 > repo = hg.repository(ui.ui.load(), '.')
96 > assert len(repo) == 6, \
96 > assert len(repo) == 6, \
97 > "initial: len(repo): %d, expected: 6" % len(repo)
97 > "initial: len(repo): %d, expected: 6" % len(repo)
98 >
98 >
99 > replacebyte("bugfix", "u")
99 > replacebyte("bugfix", "u")
100 > sleep(2)
100 > sleep(2)
101 > try:
101 > try:
102 > print "PRE: len(repo): %d" % len(repo)
102 > print("PRE: len(repo): %d" % len(repo))
103 > wlock = repo.wlock()
103 > wlock = repo.wlock()
104 > lock = repo.lock()
104 > lock = repo.lock()
105 > replacebyte("file1", "x")
105 > replacebyte("file1", "x")
106 > repo.commit(text="x", user="test", date=(0, 0))
106 > repo.commit(text="x", user="test", date=(0, 0))
107 > replacebyte("file1", "y")
107 > replacebyte("file1", "y")
108 > repo.commit(text="y", user="test", date=(0, 0))
108 > repo.commit(text="y", user="test", date=(0, 0))
109 > print "POST: len(repo): %d" % len(repo)
109 > print("POST: len(repo): %d" % len(repo))
110 > finally:
110 > finally:
111 > lock.release()
111 > lock.release()
112 > wlock.release()
112 > wlock.release()
113 > printfiles(repo, 6)
113 > printfiles(repo, 6)
114 > printfiles(repo, 7)
114 > printfiles(repo, 7)
115 > __EOF__
115 > __EOF__
116 $ $PYTHON $TESTTMP/committwice.py
116 $ $PYTHON $TESTTMP/committwice.py
117 PRE: len(repo): 6
117 PRE: len(repo): 6
118 POST: len(repo): 8
118 POST: len(repo): 8
119 revision 6 files: ['bugfix', 'file1']
119 revision 6 files: ['bugfix', 'file1']
120 revision 7 files: ['file1']
120 revision 7 files: ['file1']
121
121
122 Do a size-preserving modification outside of that process
122 Do a size-preserving modification outside of that process
123 $ echo abcd > bugfix
123 $ echo abcd > bugfix
124 $ hg status
124 $ hg status
125 M bugfix
125 M bugfix
126 $ hg log --template "{rev} {desc} {files}\n" -r5:
126 $ hg log --template "{rev} {desc} {files}\n" -r5:
127 5 fix 2 bugfix file1
127 5 fix 2 bugfix file1
128 6 x bugfix file1
128 6 x bugfix file1
129 7 y file1
129 7 y file1
130
130
131 $ cd ..
131 $ cd ..
@@ -1,320 +1,320 b''
1 $ cat > correct.py <<EOF
1 $ cat > correct.py <<EOF
2 > def toto(arg1, arg2):
2 > def toto(arg1, arg2):
3 > del arg2
3 > del arg2
4 > return (5 + 6, 9)
4 > return (5 + 6, 9)
5 > EOF
5 > EOF
6 $ cat > wrong.py <<EOF
6 $ cat > wrong.py <<EOF
7 > def toto( arg1, arg2):
7 > def toto( arg1, arg2):
8 > del(arg2)
8 > del(arg2)
9 > return ( 5+6, 9)
9 > return ( 5+6, 9)
10 > EOF
10 > EOF
11 $ cat > quote.py <<EOF
11 $ cat > quote.py <<EOF
12 > # let's use quote in comments
12 > # let's use quote in comments
13 > (''' ( 4x5 )
13 > (''' ( 4x5 )
14 > but """\\''' and finally''',
14 > but """\\''' and finally''',
15 > """let's fool checkpatch""", '1+2',
15 > """let's fool checkpatch""", '1+2',
16 > '"""', 42+1, """and
16 > '"""', 42+1, """and
17 > ( 4-1 ) """, "( 1+1 )\" and ")
17 > ( 4-1 ) """, "( 1+1 )\" and ")
18 > a, '\\\\\\\\', "\\\\\\" x-2", "c-1"
18 > a, '\\\\\\\\', "\\\\\\" x-2", "c-1"
19 > EOF
19 > EOF
20 $ cat > classstyle.py <<EOF
20 $ cat > classstyle.py <<EOF
21 > class newstyle_class(object):
21 > class newstyle_class(object):
22 > pass
22 > pass
23 >
23 >
24 > class oldstyle_class:
24 > class oldstyle_class:
25 > pass
25 > pass
26 >
26 >
27 > class empty():
27 > class empty():
28 > pass
28 > pass
29 >
29 >
30 > no_class = 1:
30 > no_class = 1:
31 > pass
31 > pass
32 > EOF
32 > EOF
33 $ check_code="$TESTDIR"/../contrib/check-code.py
33 $ check_code="$TESTDIR"/../contrib/check-code.py
34 $ "$check_code" ./wrong.py ./correct.py ./quote.py ./classstyle.py
34 $ "$check_code" ./wrong.py ./correct.py ./quote.py ./classstyle.py
35 ./wrong.py:1:
35 ./wrong.py:1:
36 > def toto( arg1, arg2):
36 > def toto( arg1, arg2):
37 gratuitous whitespace in () or []
37 gratuitous whitespace in () or []
38 ./wrong.py:2:
38 ./wrong.py:2:
39 > del(arg2)
39 > del(arg2)
40 Python keyword is not a function
40 Python keyword is not a function
41 ./wrong.py:3:
41 ./wrong.py:3:
42 > return ( 5+6, 9)
42 > return ( 5+6, 9)
43 gratuitous whitespace in () or []
43 gratuitous whitespace in () or []
44 missing whitespace in expression
44 missing whitespace in expression
45 ./quote.py:5:
45 ./quote.py:5:
46 > '"""', 42+1, """and
46 > '"""', 42+1, """and
47 missing whitespace in expression
47 missing whitespace in expression
48 ./classstyle.py:4:
48 ./classstyle.py:4:
49 > class oldstyle_class:
49 > class oldstyle_class:
50 old-style class, use class foo(object)
50 old-style class, use class foo(object)
51 ./classstyle.py:7:
51 ./classstyle.py:7:
52 > class empty():
52 > class empty():
53 class foo() creates old style object, use class foo(object)
53 class foo() creates old style object, use class foo(object)
54 [1]
54 [1]
55 $ cat > python3-compat.py << EOF
55 $ cat > python3-compat.py << EOF
56 > foo <> bar
56 > foo <> bar
57 > reduce(lambda a, b: a + b, [1, 2, 3, 4])
57 > reduce(lambda a, b: a + b, [1, 2, 3, 4])
58 > dict(key=value)
58 > dict(key=value)
59 > EOF
59 > EOF
60 $ "$check_code" python3-compat.py
60 $ "$check_code" python3-compat.py
61 python3-compat.py:1:
61 python3-compat.py:1:
62 > foo <> bar
62 > foo <> bar
63 <> operator is not available in Python 3+, use !=
63 <> operator is not available in Python 3+, use !=
64 python3-compat.py:2:
64 python3-compat.py:2:
65 > reduce(lambda a, b: a + b, [1, 2, 3, 4])
65 > reduce(lambda a, b: a + b, [1, 2, 3, 4])
66 reduce is not available in Python 3+
66 reduce is not available in Python 3+
67 python3-compat.py:3:
67 python3-compat.py:3:
68 > dict(key=value)
68 > dict(key=value)
69 dict() is different in Py2 and 3 and is slower than {}
69 dict() is different in Py2 and 3 and is slower than {}
70 [1]
70 [1]
71
71
72 $ cat > foo.c <<EOF
72 $ cat > foo.c <<EOF
73 > void narf() {
73 > void narf() {
74 > strcpy(foo, bar);
74 > strcpy(foo, bar);
75 > // strcpy_s is okay, but this comment is not
75 > // strcpy_s is okay, but this comment is not
76 > strcpy_s(foo, bar);
76 > strcpy_s(foo, bar);
77 > }
77 > }
78 > EOF
78 > EOF
79 $ "$check_code" ./foo.c
79 $ "$check_code" ./foo.c
80 ./foo.c:2:
80 ./foo.c:2:
81 > strcpy(foo, bar);
81 > strcpy(foo, bar);
82 don't use strcpy, use strlcpy or memcpy
82 don't use strcpy, use strlcpy or memcpy
83 ./foo.c:3:
83 ./foo.c:3:
84 > // strcpy_s is okay, but this comment is not
84 > // strcpy_s is okay, but this comment is not
85 don't use //-style comments
85 don't use //-style comments
86 [1]
86 [1]
87
87
88 $ cat > is-op.py <<EOF
88 $ cat > is-op.py <<EOF
89 > # is-operator comparing number or string literal
89 > # is-operator comparing number or string literal
90 > x = None
90 > x = None
91 > y = x is 'foo'
91 > y = x is 'foo'
92 > y = x is "foo"
92 > y = x is "foo"
93 > y = x is 5346
93 > y = x is 5346
94 > y = x is -6
94 > y = x is -6
95 > y = x is not 'foo'
95 > y = x is not 'foo'
96 > y = x is not "foo"
96 > y = x is not "foo"
97 > y = x is not 5346
97 > y = x is not 5346
98 > y = x is not -6
98 > y = x is not -6
99 > EOF
99 > EOF
100
100
101 $ "$check_code" ./is-op.py
101 $ "$check_code" ./is-op.py
102 ./is-op.py:3:
102 ./is-op.py:3:
103 > y = x is 'foo'
103 > y = x is 'foo'
104 object comparison with literal
104 object comparison with literal
105 ./is-op.py:4:
105 ./is-op.py:4:
106 > y = x is "foo"
106 > y = x is "foo"
107 object comparison with literal
107 object comparison with literal
108 ./is-op.py:5:
108 ./is-op.py:5:
109 > y = x is 5346
109 > y = x is 5346
110 object comparison with literal
110 object comparison with literal
111 ./is-op.py:6:
111 ./is-op.py:6:
112 > y = x is -6
112 > y = x is -6
113 object comparison with literal
113 object comparison with literal
114 ./is-op.py:7:
114 ./is-op.py:7:
115 > y = x is not 'foo'
115 > y = x is not 'foo'
116 object comparison with literal
116 object comparison with literal
117 ./is-op.py:8:
117 ./is-op.py:8:
118 > y = x is not "foo"
118 > y = x is not "foo"
119 object comparison with literal
119 object comparison with literal
120 ./is-op.py:9:
120 ./is-op.py:9:
121 > y = x is not 5346
121 > y = x is not 5346
122 object comparison with literal
122 object comparison with literal
123 ./is-op.py:10:
123 ./is-op.py:10:
124 > y = x is not -6
124 > y = x is not -6
125 object comparison with literal
125 object comparison with literal
126 [1]
126 [1]
127
127
128 $ cat > for-nolineno.py <<EOF
128 $ cat > for-nolineno.py <<EOF
129 > except:
129 > except:
130 > EOF
130 > EOF
131 $ "$check_code" for-nolineno.py --nolineno
131 $ "$check_code" for-nolineno.py --nolineno
132 for-nolineno.py:0:
132 for-nolineno.py:0:
133 > except:
133 > except:
134 naked except clause
134 naked except clause
135 [1]
135 [1]
136
136
137 $ cat > warning.t <<EOF
137 $ cat > warning.t <<EOF
138 > $ function warnonly {
138 > $ function warnonly {
139 > > }
139 > > }
140 > $ diff -N aaa
140 > $ diff -N aaa
141 > $ function onwarn {}
141 > $ function onwarn {}
142 > EOF
142 > EOF
143 $ "$check_code" warning.t
143 $ "$check_code" warning.t
144 $ "$check_code" --warn warning.t
144 $ "$check_code" --warn warning.t
145 warning.t:1:
145 warning.t:1:
146 > $ function warnonly {
146 > $ function warnonly {
147 warning: don't use 'function', use old style
147 warning: don't use 'function', use old style
148 warning.t:3:
148 warning.t:3:
149 > $ diff -N aaa
149 > $ diff -N aaa
150 warning: don't use 'diff -N'
150 warning: don't use 'diff -N'
151 warning.t:4:
151 warning.t:4:
152 > $ function onwarn {}
152 > $ function onwarn {}
153 warning: don't use 'function', use old style
153 warning: don't use 'function', use old style
154 [1]
154 [1]
155 $ cat > error.t <<EOF
155 $ cat > error.t <<EOF
156 > $ [ foo == bar ]
156 > $ [ foo == bar ]
157 > EOF
157 > EOF
158 $ "$check_code" error.t
158 $ "$check_code" error.t
159 error.t:1:
159 error.t:1:
160 > $ [ foo == bar ]
160 > $ [ foo == bar ]
161 [ foo == bar ] is a bashism, use [ foo = bar ] instead
161 [ foo == bar ] is a bashism, use [ foo = bar ] instead
162 [1]
162 [1]
163 $ rm error.t
163 $ rm error.t
164 $ cat > raise-format.py <<EOF
164 $ cat > raise-format.py <<EOF
165 > raise SomeException, message
165 > raise SomeException, message
166 > # this next line is okay
166 > # this next line is okay
167 > raise SomeException(arg1, arg2)
167 > raise SomeException(arg1, arg2)
168 > EOF
168 > EOF
169 $ "$check_code" not-existing.py raise-format.py
169 $ "$check_code" not-existing.py raise-format.py
170 Skipping*not-existing.py* (glob)
170 Skipping*not-existing.py* (glob)
171 raise-format.py:1:
171 raise-format.py:1:
172 > raise SomeException, message
172 > raise SomeException, message
173 don't use old-style two-argument raise, use Exception(message)
173 don't use old-style two-argument raise, use Exception(message)
174 [1]
174 [1]
175
175
176 $ cat > rst.py <<EOF
176 $ cat > rst.py <<EOF
177 > """problematic rst text
177 > """problematic rst text
178 >
178 >
179 > .. note::
179 > .. note::
180 > wrong
180 > wrong
181 > """
181 > """
182 >
182 >
183 > '''
183 > '''
184 >
184 >
185 > .. note::
185 > .. note::
186 >
186 >
187 > valid
187 > valid
188 >
188 >
189 > new text
189 > new text
190 >
190 >
191 > .. note::
191 > .. note::
192 >
192 >
193 > also valid
193 > also valid
194 > '''
194 > '''
195 >
195 >
196 > """mixed
196 > """mixed
197 >
197 >
198 > .. note::
198 > .. note::
199 >
199 >
200 > good
200 > good
201 >
201 >
202 > .. note::
202 > .. note::
203 > plus bad
203 > plus bad
204 > """
204 > """
205 > EOF
205 > EOF
206 $ $check_code -w rst.py
206 $ $check_code -w rst.py
207 rst.py:3:
207 rst.py:3:
208 > .. note::
208 > .. note::
209 warning: add two newlines after '.. note::'
209 warning: add two newlines after '.. note::'
210 rst.py:26:
210 rst.py:26:
211 > .. note::
211 > .. note::
212 warning: add two newlines after '.. note::'
212 warning: add two newlines after '.. note::'
213 [1]
213 [1]
214
214
215 $ cat > ./map-inside-gettext.py <<EOF
215 $ cat > ./map-inside-gettext.py <<EOF
216 > print _("map inside gettext %s" % v)
216 > print(_("map inside gettext %s" % v))
217 >
217 >
218 > print _("concatenating " " by " " space %s" % v)
218 > print(_("concatenating " " by " " space %s" % v))
219 > print _("concatenating " + " by " + " '+' %s" % v)
219 > print(_("concatenating " + " by " + " '+' %s" % v))
220 >
220 >
221 > print _("mapping operation in different line %s"
221 > print(_("mapping operation in different line %s"
222 > % v)
222 > % v))
223 >
223 >
224 > print _(
224 > print(_(
225 > "leading spaces inside of '(' %s" % v)
225 > "leading spaces inside of '(' %s" % v))
226 > EOF
226 > EOF
227 $ "$check_code" ./map-inside-gettext.py
227 $ "$check_code" ./map-inside-gettext.py
228 ./map-inside-gettext.py:1:
228 ./map-inside-gettext.py:1:
229 > print _("map inside gettext %s" % v)
229 > print(_("map inside gettext %s" % v))
230 don't use % inside _()
230 don't use % inside _()
231 ./map-inside-gettext.py:3:
231 ./map-inside-gettext.py:3:
232 > print _("concatenating " " by " " space %s" % v)
232 > print(_("concatenating " " by " " space %s" % v))
233 don't use % inside _()
233 don't use % inside _()
234 ./map-inside-gettext.py:4:
234 ./map-inside-gettext.py:4:
235 > print _("concatenating " + " by " + " '+' %s" % v)
235 > print(_("concatenating " + " by " + " '+' %s" % v))
236 don't use % inside _()
236 don't use % inside _()
237 ./map-inside-gettext.py:6:
237 ./map-inside-gettext.py:6:
238 > print _("mapping operation in different line %s"
238 > print(_("mapping operation in different line %s"
239 don't use % inside _()
239 don't use % inside _()
240 ./map-inside-gettext.py:9:
240 ./map-inside-gettext.py:9:
241 > print _(
241 > print(_(
242 don't use % inside _()
242 don't use % inside _()
243 [1]
243 [1]
244
244
245 web templates
245 web templates
246
246
247 $ mkdir -p mercurial/templates
247 $ mkdir -p mercurial/templates
248 $ cat > mercurial/templates/example.tmpl <<EOF
248 $ cat > mercurial/templates/example.tmpl <<EOF
249 > {desc}
249 > {desc}
250 > {desc|escape}
250 > {desc|escape}
251 > {desc|firstline}
251 > {desc|firstline}
252 > {desc|websub}
252 > {desc|websub}
253 > EOF
253 > EOF
254
254
255 $ "$check_code" --warnings mercurial/templates/example.tmpl
255 $ "$check_code" --warnings mercurial/templates/example.tmpl
256 mercurial/templates/example.tmpl:2:
256 mercurial/templates/example.tmpl:2:
257 > {desc|escape}
257 > {desc|escape}
258 warning: follow desc keyword with either firstline or websub
258 warning: follow desc keyword with either firstline or websub
259 [1]
259 [1]
260
260
261 'string join across lines with no space' detection
261 'string join across lines with no space' detection
262
262
263 $ cat > stringjoin.py <<EOF
263 $ cat > stringjoin.py <<EOF
264 > foo = (' foo'
264 > foo = (' foo'
265 > 'bar foo.'
265 > 'bar foo.'
266 > 'bar foo:'
266 > 'bar foo:'
267 > 'bar foo@'
267 > 'bar foo@'
268 > 'bar foo%'
268 > 'bar foo%'
269 > 'bar foo*'
269 > 'bar foo*'
270 > 'bar foo+'
270 > 'bar foo+'
271 > 'bar foo-'
271 > 'bar foo-'
272 > 'bar')
272 > 'bar')
273 > EOF
273 > EOF
274
274
275 'missing _() in ui message' detection
275 'missing _() in ui message' detection
276
276
277 $ cat > uigettext.py <<EOF
277 $ cat > uigettext.py <<EOF
278 > ui.status("% 10s %05d % -3.2f %*s %%"
278 > ui.status("% 10s %05d % -3.2f %*s %%"
279 > # this use '\\\\' instead of '\\', because the latter in
279 > # this use '\\\\' instead of '\\', because the latter in
280 > # heredoc on shell becomes just '\'
280 > # heredoc on shell becomes just '\'
281 > '\\\\ \n \t \0'
281 > '\\\\ \n \t \0'
282 > """12345
282 > """12345
283 > """
283 > """
284 > '''.:*+-=
284 > '''.:*+-=
285 > ''' "%-6d \n 123456 .:*+-= foobar")
285 > ''' "%-6d \n 123456 .:*+-= foobar")
286 > EOF
286 > EOF
287
287
288 (Checking multiple invalid files at once examines whether caching
288 (Checking multiple invalid files at once examines whether caching
289 translation table for repquote() works as expected or not. All files
289 translation table for repquote() works as expected or not. All files
290 should break rules depending on result of repquote(), in this case)
290 should break rules depending on result of repquote(), in this case)
291
291
292 $ "$check_code" stringjoin.py uigettext.py
292 $ "$check_code" stringjoin.py uigettext.py
293 stringjoin.py:1:
293 stringjoin.py:1:
294 > foo = (' foo'
294 > foo = (' foo'
295 string join across lines with no space
295 string join across lines with no space
296 stringjoin.py:2:
296 stringjoin.py:2:
297 > 'bar foo.'
297 > 'bar foo.'
298 string join across lines with no space
298 string join across lines with no space
299 stringjoin.py:3:
299 stringjoin.py:3:
300 > 'bar foo:'
300 > 'bar foo:'
301 string join across lines with no space
301 string join across lines with no space
302 stringjoin.py:4:
302 stringjoin.py:4:
303 > 'bar foo@'
303 > 'bar foo@'
304 string join across lines with no space
304 string join across lines with no space
305 stringjoin.py:5:
305 stringjoin.py:5:
306 > 'bar foo%'
306 > 'bar foo%'
307 string join across lines with no space
307 string join across lines with no space
308 stringjoin.py:6:
308 stringjoin.py:6:
309 > 'bar foo*'
309 > 'bar foo*'
310 string join across lines with no space
310 string join across lines with no space
311 stringjoin.py:7:
311 stringjoin.py:7:
312 > 'bar foo+'
312 > 'bar foo+'
313 string join across lines with no space
313 string join across lines with no space
314 stringjoin.py:8:
314 stringjoin.py:8:
315 > 'bar foo-'
315 > 'bar foo-'
316 string join across lines with no space
316 string join across lines with no space
317 uigettext.py:1:
317 uigettext.py:1:
318 > ui.status("% 10s %05d % -3.2f %*s %%"
318 > ui.status("% 10s %05d % -3.2f %*s %%"
319 missing _() in ui message (use () to hide false-positives)
319 missing _() in ui message (use () to hide false-positives)
320 [1]
320 [1]
@@ -1,654 +1,654 b''
1 #require cvs
1 #require cvs
2
2
3 $ cvscall()
3 $ cvscall()
4 > {
4 > {
5 > cvs -f "$@"
5 > cvs -f "$@"
6 > }
6 > }
7 $ hgcat()
7 $ hgcat()
8 > {
8 > {
9 > hg --cwd src-hg cat -r tip "$1"
9 > hg --cwd src-hg cat -r tip "$1"
10 > }
10 > }
11 $ echo "[extensions]" >> $HGRCPATH
11 $ echo "[extensions]" >> $HGRCPATH
12 $ echo "convert = " >> $HGRCPATH
12 $ echo "convert = " >> $HGRCPATH
13 $ cat > cvshooks.py <<EOF
13 $ cat > cvshooks.py <<EOF
14 > def cvslog(ui,repo,hooktype,log):
14 > def cvslog(ui,repo,hooktype,log):
15 > print "%s hook: %d entries"%(hooktype,len(log))
15 > print("%s hook: %d entries"%(hooktype,len(log)))
16 >
16 >
17 > def cvschangesets(ui,repo,hooktype,changesets):
17 > def cvschangesets(ui,repo,hooktype,changesets):
18 > print "%s hook: %d changesets"%(hooktype,len(changesets))
18 > print("%s hook: %d changesets"%(hooktype,len(changesets)))
19 > EOF
19 > EOF
20 $ hookpath=`pwd`
20 $ hookpath=`pwd`
21 $ cat <<EOF >> $HGRCPATH
21 $ cat <<EOF >> $HGRCPATH
22 > [hooks]
22 > [hooks]
23 > cvslog = python:$hookpath/cvshooks.py:cvslog
23 > cvslog = python:$hookpath/cvshooks.py:cvslog
24 > cvschangesets = python:$hookpath/cvshooks.py:cvschangesets
24 > cvschangesets = python:$hookpath/cvshooks.py:cvschangesets
25 > EOF
25 > EOF
26
26
27 create cvs repository
27 create cvs repository
28
28
29 $ mkdir cvsrepo
29 $ mkdir cvsrepo
30 $ cd cvsrepo
30 $ cd cvsrepo
31 $ CVSROOT=`pwd`
31 $ CVSROOT=`pwd`
32 $ export CVSROOT
32 $ export CVSROOT
33 $ CVS_OPTIONS=-f
33 $ CVS_OPTIONS=-f
34 $ export CVS_OPTIONS
34 $ export CVS_OPTIONS
35 $ cd ..
35 $ cd ..
36 $ rmdir cvsrepo
36 $ rmdir cvsrepo
37 $ cvscall -q -d "$CVSROOT" init
37 $ cvscall -q -d "$CVSROOT" init
38
38
39 create source directory
39 create source directory
40
40
41 $ mkdir src-temp
41 $ mkdir src-temp
42 $ cd src-temp
42 $ cd src-temp
43 $ echo a > a
43 $ echo a > a
44 $ mkdir b
44 $ mkdir b
45 $ cd b
45 $ cd b
46 $ echo c > c
46 $ echo c > c
47 $ cd ..
47 $ cd ..
48
48
49 import source directory
49 import source directory
50
50
51 $ cvscall -q import -m import src INITIAL start
51 $ cvscall -q import -m import src INITIAL start
52 N src/a
52 N src/a
53 N src/b/c
53 N src/b/c
54
54
55 No conflicts created by this import
55 No conflicts created by this import
56
56
57 $ cd ..
57 $ cd ..
58
58
59 checkout source directory
59 checkout source directory
60
60
61 $ cvscall -q checkout src
61 $ cvscall -q checkout src
62 U src/a
62 U src/a
63 U src/b/c
63 U src/b/c
64
64
65 commit a new revision changing b/c
65 commit a new revision changing b/c
66
66
67 $ cd src
67 $ cd src
68 $ sleep 1
68 $ sleep 1
69 $ echo c >> b/c
69 $ echo c >> b/c
70 $ cvscall -q commit -mci0 . | grep '<--'
70 $ cvscall -q commit -mci0 . | grep '<--'
71 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
71 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
72 $ cd ..
72 $ cd ..
73
73
74 convert fresh repo and also check localtimezone option
74 convert fresh repo and also check localtimezone option
75
75
76 NOTE: This doesn't check all time zones -- it merely determines that
76 NOTE: This doesn't check all time zones -- it merely determines that
77 the configuration option is taking effect.
77 the configuration option is taking effect.
78
78
79 An arbitrary (U.S.) time zone is used here. TZ=US/Hawaii is selected
79 An arbitrary (U.S.) time zone is used here. TZ=US/Hawaii is selected
80 since it does not use DST (unlike other U.S. time zones) and is always
80 since it does not use DST (unlike other U.S. time zones) and is always
81 a fixed difference from UTC.
81 a fixed difference from UTC.
82
82
83 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
83 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
84 initializing destination src-hg repository
84 initializing destination src-hg repository
85 connecting to $TESTTMP/cvsrepo
85 connecting to $TESTTMP/cvsrepo
86 scanning source...
86 scanning source...
87 collecting CVS rlog
87 collecting CVS rlog
88 5 log entries
88 5 log entries
89 cvslog hook: 5 entries
89 cvslog hook: 5 entries
90 creating changesets
90 creating changesets
91 3 changeset entries
91 3 changeset entries
92 cvschangesets hook: 3 changesets
92 cvschangesets hook: 3 changesets
93 sorting...
93 sorting...
94 converting...
94 converting...
95 2 Initial revision
95 2 Initial revision
96 1 ci0
96 1 ci0
97 0 import
97 0 import
98 updating tags
98 updating tags
99 $ hgcat a
99 $ hgcat a
100 a
100 a
101 $ hgcat b/c
101 $ hgcat b/c
102 c
102 c
103 c
103 c
104
104
105 convert fresh repo with --filemap
105 convert fresh repo with --filemap
106
106
107 $ echo include b/c > filemap
107 $ echo include b/c > filemap
108 $ hg convert --filemap filemap src src-filemap
108 $ hg convert --filemap filemap src src-filemap
109 initializing destination src-filemap repository
109 initializing destination src-filemap repository
110 connecting to $TESTTMP/cvsrepo
110 connecting to $TESTTMP/cvsrepo
111 scanning source...
111 scanning source...
112 collecting CVS rlog
112 collecting CVS rlog
113 5 log entries
113 5 log entries
114 cvslog hook: 5 entries
114 cvslog hook: 5 entries
115 creating changesets
115 creating changesets
116 3 changeset entries
116 3 changeset entries
117 cvschangesets hook: 3 changesets
117 cvschangesets hook: 3 changesets
118 sorting...
118 sorting...
119 converting...
119 converting...
120 2 Initial revision
120 2 Initial revision
121 1 ci0
121 1 ci0
122 0 import
122 0 import
123 filtering out empty revision
123 filtering out empty revision
124 repository tip rolled back to revision 1 (undo convert)
124 repository tip rolled back to revision 1 (undo convert)
125 updating tags
125 updating tags
126 $ hgcat b/c
126 $ hgcat b/c
127 c
127 c
128 c
128 c
129 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
129 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
130 2 update tags files: .hgtags
130 2 update tags files: .hgtags
131 1 ci0 files: b/c
131 1 ci0 files: b/c
132 0 Initial revision files: b/c
132 0 Initial revision files: b/c
133
133
134 convert full repository (issue1649)
134 convert full repository (issue1649)
135
135
136 $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT
136 $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT
137 U srcfull/src/a
137 U srcfull/src/a
138 U srcfull/src/b/c
138 U srcfull/src/b/c
139 $ ls srcfull
139 $ ls srcfull
140 CVS
140 CVS
141 CVSROOT
141 CVSROOT
142 src
142 src
143 $ hg convert srcfull srcfull-hg \
143 $ hg convert srcfull srcfull-hg \
144 > | grep -v 'log entries' | grep -v 'hook:' \
144 > | grep -v 'log entries' | grep -v 'hook:' \
145 > | grep -v '^[0-3] .*' # filter instable changeset order
145 > | grep -v '^[0-3] .*' # filter instable changeset order
146 initializing destination srcfull-hg repository
146 initializing destination srcfull-hg repository
147 connecting to $TESTTMP/cvsrepo
147 connecting to $TESTTMP/cvsrepo
148 scanning source...
148 scanning source...
149 collecting CVS rlog
149 collecting CVS rlog
150 creating changesets
150 creating changesets
151 4 changeset entries
151 4 changeset entries
152 sorting...
152 sorting...
153 converting...
153 converting...
154 updating tags
154 updating tags
155 $ hg cat -r tip --cwd srcfull-hg src/a
155 $ hg cat -r tip --cwd srcfull-hg src/a
156 a
156 a
157 $ hg cat -r tip --cwd srcfull-hg src/b/c
157 $ hg cat -r tip --cwd srcfull-hg src/b/c
158 c
158 c
159 c
159 c
160
160
161 commit new file revisions
161 commit new file revisions
162
162
163 $ cd src
163 $ cd src
164 $ echo a >> a
164 $ echo a >> a
165 $ echo c >> b/c
165 $ echo c >> b/c
166 $ cvscall -q commit -mci1 . | grep '<--'
166 $ cvscall -q commit -mci1 . | grep '<--'
167 $TESTTMP/cvsrepo/src/a,v <-- a
167 $TESTTMP/cvsrepo/src/a,v <-- a
168 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
168 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
169 $ cd ..
169 $ cd ..
170
170
171 convert again
171 convert again
172
172
173 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
173 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
174 connecting to $TESTTMP/cvsrepo
174 connecting to $TESTTMP/cvsrepo
175 scanning source...
175 scanning source...
176 collecting CVS rlog
176 collecting CVS rlog
177 7 log entries
177 7 log entries
178 cvslog hook: 7 entries
178 cvslog hook: 7 entries
179 creating changesets
179 creating changesets
180 4 changeset entries
180 4 changeset entries
181 cvschangesets hook: 4 changesets
181 cvschangesets hook: 4 changesets
182 sorting...
182 sorting...
183 converting...
183 converting...
184 0 ci1
184 0 ci1
185 $ hgcat a
185 $ hgcat a
186 a
186 a
187 a
187 a
188 $ hgcat b/c
188 $ hgcat b/c
189 c
189 c
190 c
190 c
191 c
191 c
192
192
193 convert again with --filemap
193 convert again with --filemap
194
194
195 $ hg convert --filemap filemap src src-filemap
195 $ hg convert --filemap filemap src src-filemap
196 connecting to $TESTTMP/cvsrepo
196 connecting to $TESTTMP/cvsrepo
197 scanning source...
197 scanning source...
198 collecting CVS rlog
198 collecting CVS rlog
199 7 log entries
199 7 log entries
200 cvslog hook: 7 entries
200 cvslog hook: 7 entries
201 creating changesets
201 creating changesets
202 4 changeset entries
202 4 changeset entries
203 cvschangesets hook: 4 changesets
203 cvschangesets hook: 4 changesets
204 sorting...
204 sorting...
205 converting...
205 converting...
206 0 ci1
206 0 ci1
207 $ hgcat b/c
207 $ hgcat b/c
208 c
208 c
209 c
209 c
210 c
210 c
211 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
211 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
212 3 ci1 files: b/c
212 3 ci1 files: b/c
213 2 update tags files: .hgtags
213 2 update tags files: .hgtags
214 1 ci0 files: b/c
214 1 ci0 files: b/c
215 0 Initial revision files: b/c
215 0 Initial revision files: b/c
216
216
217 commit branch
217 commit branch
218
218
219 $ cd src
219 $ cd src
220 $ cvs -q update -r1.1 b/c
220 $ cvs -q update -r1.1 b/c
221 U b/c
221 U b/c
222 $ cvs -q tag -b branch
222 $ cvs -q tag -b branch
223 T a
223 T a
224 T b/c
224 T b/c
225 $ cvs -q update -r branch > /dev/null
225 $ cvs -q update -r branch > /dev/null
226 $ sleep 1
226 $ sleep 1
227 $ echo d >> b/c
227 $ echo d >> b/c
228 $ cvs -q commit -mci2 . | grep '<--'
228 $ cvs -q commit -mci2 . | grep '<--'
229 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
229 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
230 $ cd ..
230 $ cd ..
231
231
232 convert again
232 convert again
233
233
234 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
234 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
235 connecting to $TESTTMP/cvsrepo
235 connecting to $TESTTMP/cvsrepo
236 scanning source...
236 scanning source...
237 collecting CVS rlog
237 collecting CVS rlog
238 8 log entries
238 8 log entries
239 cvslog hook: 8 entries
239 cvslog hook: 8 entries
240 creating changesets
240 creating changesets
241 5 changeset entries
241 5 changeset entries
242 cvschangesets hook: 5 changesets
242 cvschangesets hook: 5 changesets
243 sorting...
243 sorting...
244 converting...
244 converting...
245 0 ci2
245 0 ci2
246 $ hgcat b/c
246 $ hgcat b/c
247 c
247 c
248 d
248 d
249
249
250 convert again with --filemap
250 convert again with --filemap
251
251
252 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True --filemap filemap src src-filemap
252 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True --filemap filemap src src-filemap
253 connecting to $TESTTMP/cvsrepo
253 connecting to $TESTTMP/cvsrepo
254 scanning source...
254 scanning source...
255 collecting CVS rlog
255 collecting CVS rlog
256 8 log entries
256 8 log entries
257 cvslog hook: 8 entries
257 cvslog hook: 8 entries
258 creating changesets
258 creating changesets
259 5 changeset entries
259 5 changeset entries
260 cvschangesets hook: 5 changesets
260 cvschangesets hook: 5 changesets
261 sorting...
261 sorting...
262 converting...
262 converting...
263 0 ci2
263 0 ci2
264 $ hgcat b/c
264 $ hgcat b/c
265 c
265 c
266 d
266 d
267 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
267 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
268 4 ci2 files: b/c
268 4 ci2 files: b/c
269 3 ci1 files: b/c
269 3 ci1 files: b/c
270 2 update tags files: .hgtags
270 2 update tags files: .hgtags
271 1 ci0 files: b/c
271 1 ci0 files: b/c
272 0 Initial revision files: b/c
272 0 Initial revision files: b/c
273
273
274 commit a new revision with funny log message
274 commit a new revision with funny log message
275
275
276 $ cd src
276 $ cd src
277 $ sleep 1
277 $ sleep 1
278 $ echo e >> a
278 $ echo e >> a
279 $ cvscall -q commit -m'funny
279 $ cvscall -q commit -m'funny
280 > ----------------------------
280 > ----------------------------
281 > log message' . | grep '<--' |\
281 > log message' . | grep '<--' |\
282 > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
282 > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
283 checking in src/a,v
283 checking in src/a,v
284
284
285 commit new file revisions with some fuzz
285 commit new file revisions with some fuzz
286
286
287 $ sleep 1
287 $ sleep 1
288 $ echo f >> a
288 $ echo f >> a
289 $ cvscall -q commit -mfuzzy . | grep '<--'
289 $ cvscall -q commit -mfuzzy . | grep '<--'
290 $TESTTMP/cvsrepo/src/a,v <-- a
290 $TESTTMP/cvsrepo/src/a,v <-- a
291 $ sleep 4 # the two changes will be split if fuzz < 4
291 $ sleep 4 # the two changes will be split if fuzz < 4
292 $ echo g >> b/c
292 $ echo g >> b/c
293 $ cvscall -q commit -mfuzzy . | grep '<--'
293 $ cvscall -q commit -mfuzzy . | grep '<--'
294 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
294 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
295 $ cd ..
295 $ cd ..
296
296
297 convert again
297 convert again
298
298
299 $ TZ=US/Hawaii hg convert --config convert.cvsps.fuzz=2 --config convert.localtimezone=True src src-hg
299 $ TZ=US/Hawaii hg convert --config convert.cvsps.fuzz=2 --config convert.localtimezone=True src src-hg
300 connecting to $TESTTMP/cvsrepo
300 connecting to $TESTTMP/cvsrepo
301 scanning source...
301 scanning source...
302 collecting CVS rlog
302 collecting CVS rlog
303 11 log entries
303 11 log entries
304 cvslog hook: 11 entries
304 cvslog hook: 11 entries
305 creating changesets
305 creating changesets
306 8 changeset entries
306 8 changeset entries
307 cvschangesets hook: 8 changesets
307 cvschangesets hook: 8 changesets
308 sorting...
308 sorting...
309 converting...
309 converting...
310 2 funny
310 2 funny
311 1 fuzzy
311 1 fuzzy
312 0 fuzzy
312 0 fuzzy
313 $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} date: {date|date} files: {files}\n'
313 $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} date: {date|date} files: {files}\n'
314 o 8 (branch) fuzzy date: * -1000 files: b/c (glob)
314 o 8 (branch) fuzzy date: * -1000 files: b/c (glob)
315 |
315 |
316 o 7 (branch) fuzzy date: * -1000 files: a (glob)
316 o 7 (branch) fuzzy date: * -1000 files: a (glob)
317 |
317 |
318 o 6 (branch) funny
318 o 6 (branch) funny
319 | ----------------------------
319 | ----------------------------
320 | log message date: * -1000 files: a (glob)
320 | log message date: * -1000 files: a (glob)
321 o 5 (branch) ci2 date: * -1000 files: b/c (glob)
321 o 5 (branch) ci2 date: * -1000 files: b/c (glob)
322
322
323 o 4 () ci1 date: * -1000 files: a b/c (glob)
323 o 4 () ci1 date: * -1000 files: a b/c (glob)
324 |
324 |
325 o 3 () update tags date: * +0000 files: .hgtags (glob)
325 o 3 () update tags date: * +0000 files: .hgtags (glob)
326 |
326 |
327 | o 2 (INITIAL) import date: * -1000 files: (glob)
327 | o 2 (INITIAL) import date: * -1000 files: (glob)
328 | |
328 | |
329 o | 1 () ci0 date: * -1000 files: b/c (glob)
329 o | 1 () ci0 date: * -1000 files: b/c (glob)
330 |/
330 |/
331 o 0 () Initial revision date: * -1000 files: a b/c (glob)
331 o 0 () Initial revision date: * -1000 files: a b/c (glob)
332
332
333
333
334 testing debugcvsps
334 testing debugcvsps
335
335
336 $ cd src
336 $ cd src
337 $ hg debugcvsps --fuzz=2 -x >/dev/null
337 $ hg debugcvsps --fuzz=2 -x >/dev/null
338
338
339 commit a new revision changing a and removing b/c
339 commit a new revision changing a and removing b/c
340
340
341 $ cvscall -q update -A
341 $ cvscall -q update -A
342 U a
342 U a
343 U b/c
343 U b/c
344 $ sleep 1
344 $ sleep 1
345 $ echo h >> a
345 $ echo h >> a
346 $ cvscall -Q remove -f b/c
346 $ cvscall -Q remove -f b/c
347 $ cvscall -q commit -mci | grep '<--'
347 $ cvscall -q commit -mci | grep '<--'
348 $TESTTMP/cvsrepo/src/a,v <-- a
348 $TESTTMP/cvsrepo/src/a,v <-- a
349 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
349 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
350
350
351 update and verify the cvsps cache
351 update and verify the cvsps cache
352
352
353 $ hg debugcvsps --fuzz=2 -u
353 $ hg debugcvsps --fuzz=2 -u
354 collecting CVS rlog
354 collecting CVS rlog
355 13 log entries
355 13 log entries
356 cvslog hook: 13 entries
356 cvslog hook: 13 entries
357 creating changesets
357 creating changesets
358 11 changeset entries
358 11 changeset entries
359 cvschangesets hook: 11 changesets
359 cvschangesets hook: 11 changesets
360 ---------------------
360 ---------------------
361 PatchSet 1
361 PatchSet 1
362 Date: * (glob)
362 Date: * (glob)
363 Author: * (glob)
363 Author: * (glob)
364 Branch: HEAD
364 Branch: HEAD
365 Tag: (none)
365 Tag: (none)
366 Branchpoints: INITIAL
366 Branchpoints: INITIAL
367 Log:
367 Log:
368 Initial revision
368 Initial revision
369
369
370 Members:
370 Members:
371 a:INITIAL->1.1
371 a:INITIAL->1.1
372
372
373 ---------------------
373 ---------------------
374 PatchSet 2
374 PatchSet 2
375 Date: * (glob)
375 Date: * (glob)
376 Author: * (glob)
376 Author: * (glob)
377 Branch: HEAD
377 Branch: HEAD
378 Tag: (none)
378 Tag: (none)
379 Branchpoints: INITIAL, branch
379 Branchpoints: INITIAL, branch
380 Log:
380 Log:
381 Initial revision
381 Initial revision
382
382
383 Members:
383 Members:
384 b/c:INITIAL->1.1
384 b/c:INITIAL->1.1
385
385
386 ---------------------
386 ---------------------
387 PatchSet 3
387 PatchSet 3
388 Date: * (glob)
388 Date: * (glob)
389 Author: * (glob)
389 Author: * (glob)
390 Branch: INITIAL
390 Branch: INITIAL
391 Tag: start
391 Tag: start
392 Log:
392 Log:
393 import
393 import
394
394
395 Members:
395 Members:
396 a:1.1->1.1.1.1
396 a:1.1->1.1.1.1
397 b/c:1.1->1.1.1.1
397 b/c:1.1->1.1.1.1
398
398
399 ---------------------
399 ---------------------
400 PatchSet 4
400 PatchSet 4
401 Date: * (glob)
401 Date: * (glob)
402 Author: * (glob)
402 Author: * (glob)
403 Branch: HEAD
403 Branch: HEAD
404 Tag: (none)
404 Tag: (none)
405 Log:
405 Log:
406 ci0
406 ci0
407
407
408 Members:
408 Members:
409 b/c:1.1->1.2
409 b/c:1.1->1.2
410
410
411 ---------------------
411 ---------------------
412 PatchSet 5
412 PatchSet 5
413 Date: * (glob)
413 Date: * (glob)
414 Author: * (glob)
414 Author: * (glob)
415 Branch: HEAD
415 Branch: HEAD
416 Tag: (none)
416 Tag: (none)
417 Branchpoints: branch
417 Branchpoints: branch
418 Log:
418 Log:
419 ci1
419 ci1
420
420
421 Members:
421 Members:
422 a:1.1->1.2
422 a:1.1->1.2
423
423
424 ---------------------
424 ---------------------
425 PatchSet 6
425 PatchSet 6
426 Date: * (glob)
426 Date: * (glob)
427 Author: * (glob)
427 Author: * (glob)
428 Branch: HEAD
428 Branch: HEAD
429 Tag: (none)
429 Tag: (none)
430 Log:
430 Log:
431 ci1
431 ci1
432
432
433 Members:
433 Members:
434 b/c:1.2->1.3
434 b/c:1.2->1.3
435
435
436 ---------------------
436 ---------------------
437 PatchSet 7
437 PatchSet 7
438 Date: * (glob)
438 Date: * (glob)
439 Author: * (glob)
439 Author: * (glob)
440 Branch: branch
440 Branch: branch
441 Tag: (none)
441 Tag: (none)
442 Log:
442 Log:
443 ci2
443 ci2
444
444
445 Members:
445 Members:
446 b/c:1.1->1.1.2.1
446 b/c:1.1->1.1.2.1
447
447
448 ---------------------
448 ---------------------
449 PatchSet 8
449 PatchSet 8
450 Date: * (glob)
450 Date: * (glob)
451 Author: * (glob)
451 Author: * (glob)
452 Branch: branch
452 Branch: branch
453 Tag: (none)
453 Tag: (none)
454 Log:
454 Log:
455 funny
455 funny
456 ----------------------------
456 ----------------------------
457 log message
457 log message
458
458
459 Members:
459 Members:
460 a:1.2->1.2.2.1
460 a:1.2->1.2.2.1
461
461
462 ---------------------
462 ---------------------
463 PatchSet 9
463 PatchSet 9
464 Date: * (glob)
464 Date: * (glob)
465 Author: * (glob)
465 Author: * (glob)
466 Branch: branch
466 Branch: branch
467 Tag: (none)
467 Tag: (none)
468 Log:
468 Log:
469 fuzzy
469 fuzzy
470
470
471 Members:
471 Members:
472 a:1.2.2.1->1.2.2.2
472 a:1.2.2.1->1.2.2.2
473
473
474 ---------------------
474 ---------------------
475 PatchSet 10
475 PatchSet 10
476 Date: * (glob)
476 Date: * (glob)
477 Author: * (glob)
477 Author: * (glob)
478 Branch: branch
478 Branch: branch
479 Tag: (none)
479 Tag: (none)
480 Log:
480 Log:
481 fuzzy
481 fuzzy
482
482
483 Members:
483 Members:
484 b/c:1.1.2.1->1.1.2.2
484 b/c:1.1.2.1->1.1.2.2
485
485
486 ---------------------
486 ---------------------
487 PatchSet 11
487 PatchSet 11
488 Date: * (glob)
488 Date: * (glob)
489 Author: * (glob)
489 Author: * (glob)
490 Branch: HEAD
490 Branch: HEAD
491 Tag: (none)
491 Tag: (none)
492 Log:
492 Log:
493 ci
493 ci
494
494
495 Members:
495 Members:
496 a:1.2->1.3
496 a:1.2->1.3
497 b/c:1.3->1.4(DEAD)
497 b/c:1.3->1.4(DEAD)
498
498
499
499
500 $ cd ..
500 $ cd ..
501
501
502 Test transcoding CVS log messages (issue5597)
502 Test transcoding CVS log messages (issue5597)
503 =============================================
503 =============================================
504
504
505 To emulate commit messages in (non-ascii) multiple encodings portably,
505 To emulate commit messages in (non-ascii) multiple encodings portably,
506 this test scenario writes CVS history file (*,v file) directly via
506 this test scenario writes CVS history file (*,v file) directly via
507 python code.
507 python code.
508
508
509 Commit messages of version 1.2 - 1.4 use u3042 in 3 encodings below.
509 Commit messages of version 1.2 - 1.4 use u3042 in 3 encodings below.
510
510
511 |encoding |byte sequence | decodable as: |
511 |encoding |byte sequence | decodable as: |
512 | | | utf-8 euc-jp cp932 |
512 | | | utf-8 euc-jp cp932 |
513 +----------+--------------+--------------------+
513 +----------+--------------+--------------------+
514 |utf-8 |\xe3\x81\x82 | o x x |
514 |utf-8 |\xe3\x81\x82 | o x x |
515 |euc-jp |\xa4\xa2 | x o o |
515 |euc-jp |\xa4\xa2 | x o o |
516 |cp932 |\x82\xa0 | x x o |
516 |cp932 |\x82\xa0 | x x o |
517
517
518 $ mkdir -p cvsrepo/transcoding
518 $ mkdir -p cvsrepo/transcoding
519 $ python <<EOF
519 $ python <<EOF
520 > fp = open('cvsrepo/transcoding/file,v', 'w')
520 > fp = open('cvsrepo/transcoding/file,v', 'w')
521 > fp.write(('''
521 > fp.write(('''
522 > head 1.4;
522 > head 1.4;
523 > access;
523 > access;
524 > symbols
524 > symbols
525 > start:1.1.1.1 INITIAL:1.1.1;
525 > start:1.1.1.1 INITIAL:1.1.1;
526 > locks; strict;
526 > locks; strict;
527 > comment @# @;
527 > comment @# @;
528 >
528 >
529 >
529 >
530 > 1.4
530 > 1.4
531 > date 2017.07.10.00.00.04; author nobody; state Exp;
531 > date 2017.07.10.00.00.04; author nobody; state Exp;
532 > branches;
532 > branches;
533 > next 1.3;
533 > next 1.3;
534 > commitid 10059635D016A510FFA;
534 > commitid 10059635D016A510FFA;
535 >
535 >
536 > 1.3
536 > 1.3
537 > date 2017.07.10.00.00.03; author nobody; state Exp;
537 > date 2017.07.10.00.00.03; author nobody; state Exp;
538 > branches;
538 > branches;
539 > next 1.2;
539 > next 1.2;
540 > commitid 10059635CFF6A4FF34E;
540 > commitid 10059635CFF6A4FF34E;
541 >
541 >
542 > 1.2
542 > 1.2
543 > date 2017.07.10.00.00.02; author nobody; state Exp;
543 > date 2017.07.10.00.00.02; author nobody; state Exp;
544 > branches;
544 > branches;
545 > next 1.1;
545 > next 1.1;
546 > commitid 10059635CFD6A4D5095;
546 > commitid 10059635CFD6A4D5095;
547 >
547 >
548 > 1.1
548 > 1.1
549 > date 2017.07.10.00.00.01; author nobody; state Exp;
549 > date 2017.07.10.00.00.01; author nobody; state Exp;
550 > branches
550 > branches
551 > 1.1.1.1;
551 > 1.1.1.1;
552 > next ;
552 > next ;
553 > commitid 10059635CFB6A4A3C33;
553 > commitid 10059635CFB6A4A3C33;
554 >
554 >
555 > 1.1.1.1
555 > 1.1.1.1
556 > date 2017.07.10.00.00.01; author nobody; state Exp;
556 > date 2017.07.10.00.00.01; author nobody; state Exp;
557 > branches;
557 > branches;
558 > next ;
558 > next ;
559 > commitid 10059635CFB6A4A3C33;
559 > commitid 10059635CFB6A4A3C33;
560 >
560 >
561 >
561 >
562 > desc
562 > desc
563 > @@
563 > @@
564 >
564 >
565 >
565 >
566 > 1.4
566 > 1.4
567 > log
567 > log
568 > @''' + u'\u3042'.encode('cp932') + ''' (cp932)
568 > @''' + u'\u3042'.encode('cp932') + ''' (cp932)
569 > @
569 > @
570 > text
570 > text
571 > @1
571 > @1
572 > 2
572 > 2
573 > 3
573 > 3
574 > 4
574 > 4
575 > @
575 > @
576 >
576 >
577 >
577 >
578 > 1.3
578 > 1.3
579 > log
579 > log
580 > @''' + u'\u3042'.encode('euc-jp') + ''' (euc-jp)
580 > @''' + u'\u3042'.encode('euc-jp') + ''' (euc-jp)
581 > @
581 > @
582 > text
582 > text
583 > @d4 1
583 > @d4 1
584 > @
584 > @
585 >
585 >
586 >
586 >
587 > 1.2
587 > 1.2
588 > log
588 > log
589 > @''' + u'\u3042'.encode('utf-8') + ''' (utf-8)
589 > @''' + u'\u3042'.encode('utf-8') + ''' (utf-8)
590 > @
590 > @
591 > text
591 > text
592 > @d3 1
592 > @d3 1
593 > @
593 > @
594 >
594 >
595 >
595 >
596 > 1.1
596 > 1.1
597 > log
597 > log
598 > @Initial revision
598 > @Initial revision
599 > @
599 > @
600 > text
600 > text
601 > @d2 1
601 > @d2 1
602 > @
602 > @
603 >
603 >
604 >
604 >
605 > 1.1.1.1
605 > 1.1.1.1
606 > log
606 > log
607 > @import
607 > @import
608 > @
608 > @
609 > text
609 > text
610 > @@
610 > @@
611 > ''').lstrip())
611 > ''').lstrip())
612 > EOF
612 > EOF
613
613
614 $ cvscall -q checkout transcoding
614 $ cvscall -q checkout transcoding
615 U transcoding/file
615 U transcoding/file
616
616
617 Test converting in normal case
617 Test converting in normal case
618 ------------------------------
618 ------------------------------
619
619
620 (filtering by grep in order to check only form of debug messages)
620 (filtering by grep in order to check only form of debug messages)
621
621
622 $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp,cp932 -q --debug transcoding transcoding-hg | grep 'transcoding by'
622 $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp,cp932 -q --debug transcoding transcoding-hg | grep 'transcoding by'
623 transcoding by utf-8: 1.1 of file
623 transcoding by utf-8: 1.1 of file
624 transcoding by utf-8: 1.1.1.1 of file
624 transcoding by utf-8: 1.1.1.1 of file
625 transcoding by utf-8: 1.2 of file
625 transcoding by utf-8: 1.2 of file
626 transcoding by euc-jp: 1.3 of file
626 transcoding by euc-jp: 1.3 of file
627 transcoding by cp932: 1.4 of file
627 transcoding by cp932: 1.4 of file
628 $ hg -R transcoding-hg --encoding utf-8 log -T "{rev}: {desc}\n"
628 $ hg -R transcoding-hg --encoding utf-8 log -T "{rev}: {desc}\n"
629 5: update tags
629 5: update tags
630 4: import
630 4: import
631 3: \xe3\x81\x82 (cp932) (esc)
631 3: \xe3\x81\x82 (cp932) (esc)
632 2: \xe3\x81\x82 (euc-jp) (esc)
632 2: \xe3\x81\x82 (euc-jp) (esc)
633 1: \xe3\x81\x82 (utf-8) (esc)
633 1: \xe3\x81\x82 (utf-8) (esc)
634 0: Initial revision
634 0: Initial revision
635 $ rm -rf transcoding-hg
635 $ rm -rf transcoding-hg
636
636
637 Test converting in error cases
637 Test converting in error cases
638 ------------------------------
638 ------------------------------
639
639
640 unknown encoding in convert.cvsps.logencoding
640 unknown encoding in convert.cvsps.logencoding
641
641
642 $ hg convert --config convert.cvsps.logencoding=foobar -q transcoding transcoding-hg
642 $ hg convert --config convert.cvsps.logencoding=foobar -q transcoding transcoding-hg
643 abort: unknown encoding: foobar
643 abort: unknown encoding: foobar
644 (check convert.cvsps.logencoding configuration)
644 (check convert.cvsps.logencoding configuration)
645 [255]
645 [255]
646 $ rm -rf transcoding-hg
646 $ rm -rf transcoding-hg
647
647
648 no acceptable encoding in convert.cvsps.logencoding
648 no acceptable encoding in convert.cvsps.logencoding
649
649
650 $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp -q transcoding transcoding-hg
650 $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp -q transcoding transcoding-hg
651 abort: no encoding can transcode CVS log message for 1.4 of file
651 abort: no encoding can transcode CVS log message for 1.4 of file
652 (check convert.cvsps.logencoding configuration)
652 (check convert.cvsps.logencoding configuration)
653 [255]
653 [255]
654 $ rm -rf transcoding-hg
654 $ rm -rf transcoding-hg
@@ -1,561 +1,561 b''
1 Test EOL extension
1 Test EOL extension
2
2
3 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
4 > [diff]
4 > [diff]
5 > git = True
5 > git = True
6 > EOF
6 > EOF
7
7
8 Set up helpers
8 Set up helpers
9
9
10 $ cat > switch-eol.py <<EOF
10 $ cat > switch-eol.py <<EOF
11 > import sys
11 > import sys
12 > try:
12 > try:
13 > import os, msvcrt
13 > import os, msvcrt
14 > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
14 > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
15 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
15 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
16 > except ImportError:
16 > except ImportError:
17 > pass
17 > pass
18 > (old, new) = sys.argv[1] == 'LF' and ('\n', '\r\n') or ('\r\n', '\n')
18 > (old, new) = sys.argv[1] == 'LF' and ('\n', '\r\n') or ('\r\n', '\n')
19 > print "%% switching encoding from %r to %r" % (old, new)
19 > print("%% switching encoding from %r to %r" % (old, new))
20 > for path in sys.argv[2:]:
20 > for path in sys.argv[2:]:
21 > data = file(path, 'rb').read()
21 > data = file(path, 'rb').read()
22 > data = data.replace(old, new)
22 > data = data.replace(old, new)
23 > file(path, 'wb').write(data)
23 > file(path, 'wb').write(data)
24 > EOF
24 > EOF
25
25
26 $ seteol () {
26 $ seteol () {
27 > if [ $1 = "LF" ]; then
27 > if [ $1 = "LF" ]; then
28 > EOL='\n'
28 > EOL='\n'
29 > else
29 > else
30 > EOL='\r\n'
30 > EOL='\r\n'
31 > fi
31 > fi
32 > }
32 > }
33
33
34 $ makerepo () {
34 $ makerepo () {
35 > seteol $1
35 > seteol $1
36 > echo "% setup $1 repository"
36 > echo "% setup $1 repository"
37 > hg init repo
37 > hg init repo
38 > cd repo
38 > cd repo
39 > cat > .hgeol <<EOF
39 > cat > .hgeol <<EOF
40 > [repository]
40 > [repository]
41 > native = $1
41 > native = $1
42 > [patterns]
42 > [patterns]
43 > mixed.txt = BIN
43 > mixed.txt = BIN
44 > **.txt = native
44 > **.txt = native
45 > EOF
45 > EOF
46 > printf "first${EOL}second${EOL}third${EOL}" > a.txt
46 > printf "first${EOL}second${EOL}third${EOL}" > a.txt
47 > hg commit --addremove -m 'checkin'
47 > hg commit --addremove -m 'checkin'
48 > echo
48 > echo
49 > cd ..
49 > cd ..
50 > }
50 > }
51
51
52 $ dotest () {
52 $ dotest () {
53 > seteol $1
53 > seteol $1
54 > echo "% hg clone repo repo-$1"
54 > echo "% hg clone repo repo-$1"
55 > hg clone --noupdate repo repo-$1
55 > hg clone --noupdate repo repo-$1
56 > cd repo-$1
56 > cd repo-$1
57 > cat > .hg/hgrc <<EOF
57 > cat > .hg/hgrc <<EOF
58 > [extensions]
58 > [extensions]
59 > eol =
59 > eol =
60 > [eol]
60 > [eol]
61 > native = $1
61 > native = $1
62 > EOF
62 > EOF
63 > hg update
63 > hg update
64 > echo '% a.txt'
64 > echo '% a.txt'
65 > cat a.txt
65 > cat a.txt
66 > echo '% hg cat a.txt'
66 > echo '% hg cat a.txt'
67 > hg cat a.txt
67 > hg cat a.txt
68 > printf "fourth${EOL}" >> a.txt
68 > printf "fourth${EOL}" >> a.txt
69 > echo '% a.txt'
69 > echo '% a.txt'
70 > cat a.txt
70 > cat a.txt
71 > hg diff
71 > hg diff
72 > $PYTHON ../switch-eol.py $1 a.txt
72 > $PYTHON ../switch-eol.py $1 a.txt
73 > echo '% hg diff only reports a single changed line:'
73 > echo '% hg diff only reports a single changed line:'
74 > hg diff
74 > hg diff
75 > echo "% reverting back to $1 format"
75 > echo "% reverting back to $1 format"
76 > hg revert a.txt
76 > hg revert a.txt
77 > cat a.txt
77 > cat a.txt
78 > printf "first\r\nsecond\n" > mixed.txt
78 > printf "first\r\nsecond\n" > mixed.txt
79 > hg add mixed.txt
79 > hg add mixed.txt
80 > echo "% hg commit of inconsistent .txt file marked as binary (should work)"
80 > echo "% hg commit of inconsistent .txt file marked as binary (should work)"
81 > hg commit -m 'binary file'
81 > hg commit -m 'binary file'
82 > echo "% hg commit of inconsistent .txt file marked as native (should fail)"
82 > echo "% hg commit of inconsistent .txt file marked as native (should fail)"
83 > printf "first\nsecond\r\nthird\nfourth\r\n" > a.txt
83 > printf "first\nsecond\r\nthird\nfourth\r\n" > a.txt
84 > hg commit -m 'inconsistent file'
84 > hg commit -m 'inconsistent file'
85 > echo "% hg commit --config eol.only-consistent=False (should work)"
85 > echo "% hg commit --config eol.only-consistent=False (should work)"
86 > hg commit --config eol.only-consistent=False -m 'inconsistent file'
86 > hg commit --config eol.only-consistent=False -m 'inconsistent file'
87 > echo "% hg commit of binary .txt file marked as native (binary files always okay)"
87 > echo "% hg commit of binary .txt file marked as native (binary files always okay)"
88 > printf "first${EOL}\0${EOL}third${EOL}" > a.txt
88 > printf "first${EOL}\0${EOL}third${EOL}" > a.txt
89 > hg commit -m 'binary file'
89 > hg commit -m 'binary file'
90 > cd ..
90 > cd ..
91 > rm -r repo-$1
91 > rm -r repo-$1
92 > }
92 > }
93
93
94 $ makemixedrepo () {
94 $ makemixedrepo () {
95 > echo
95 > echo
96 > echo "# setup $1 repository"
96 > echo "# setup $1 repository"
97 > hg init mixed
97 > hg init mixed
98 > cd mixed
98 > cd mixed
99 > printf "foo\r\nbar\r\nbaz\r\n" > win.txt
99 > printf "foo\r\nbar\r\nbaz\r\n" > win.txt
100 > printf "foo\nbar\nbaz\n" > unix.txt
100 > printf "foo\nbar\nbaz\n" > unix.txt
101 > #printf "foo\r\nbar\nbaz\r\n" > mixed.txt
101 > #printf "foo\r\nbar\nbaz\r\n" > mixed.txt
102 > hg commit --addremove -m 'created mixed files'
102 > hg commit --addremove -m 'created mixed files'
103 > echo "# setting repository-native EOLs to $1"
103 > echo "# setting repository-native EOLs to $1"
104 > cat > .hgeol <<EOF
104 > cat > .hgeol <<EOF
105 > [repository]
105 > [repository]
106 > native = $1
106 > native = $1
107 > [patterns]
107 > [patterns]
108 > **.txt = native
108 > **.txt = native
109 > EOF
109 > EOF
110 > hg commit --addremove -m 'added .hgeol'
110 > hg commit --addremove -m 'added .hgeol'
111 > cd ..
111 > cd ..
112 > }
112 > }
113
113
114 $ testmixed () {
114 $ testmixed () {
115 > echo
115 > echo
116 > echo "% hg clone mixed mixed-$1"
116 > echo "% hg clone mixed mixed-$1"
117 > hg clone mixed mixed-$1
117 > hg clone mixed mixed-$1
118 > cd mixed-$1
118 > cd mixed-$1
119 > echo '% hg status (eol extension not yet activated)'
119 > echo '% hg status (eol extension not yet activated)'
120 > hg status
120 > hg status
121 > cat > .hg/hgrc <<EOF
121 > cat > .hg/hgrc <<EOF
122 > [extensions]
122 > [extensions]
123 > eol =
123 > eol =
124 > [eol]
124 > [eol]
125 > native = $1
125 > native = $1
126 > EOF
126 > EOF
127 > echo '% hg status (eol activated)'
127 > echo '% hg status (eol activated)'
128 > hg status
128 > hg status
129 > echo '% hg commit'
129 > echo '% hg commit'
130 > hg commit -m 'synchronized EOLs'
130 > hg commit -m 'synchronized EOLs'
131 > echo '% hg status'
131 > echo '% hg status'
132 > hg status
132 > hg status
133 > cd ..
133 > cd ..
134 > rm -r mixed-$1
134 > rm -r mixed-$1
135 > }
135 > }
136
136
137 Basic tests
137 Basic tests
138
138
139 $ makerepo LF
139 $ makerepo LF
140 % setup LF repository
140 % setup LF repository
141 adding .hgeol
141 adding .hgeol
142 adding a.txt
142 adding a.txt
143
143
144 $ dotest LF
144 $ dotest LF
145 % hg clone repo repo-LF
145 % hg clone repo repo-LF
146 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
146 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 % a.txt
147 % a.txt
148 first
148 first
149 second
149 second
150 third
150 third
151 % hg cat a.txt
151 % hg cat a.txt
152 first
152 first
153 second
153 second
154 third
154 third
155 % a.txt
155 % a.txt
156 first
156 first
157 second
157 second
158 third
158 third
159 fourth
159 fourth
160 diff --git a/a.txt b/a.txt
160 diff --git a/a.txt b/a.txt
161 --- a/a.txt
161 --- a/a.txt
162 +++ b/a.txt
162 +++ b/a.txt
163 @@ -1,3 +1,4 @@
163 @@ -1,3 +1,4 @@
164 first
164 first
165 second
165 second
166 third
166 third
167 +fourth
167 +fourth
168 % switching encoding from '\n' to '\r\n'
168 % switching encoding from '\n' to '\r\n'
169 % hg diff only reports a single changed line:
169 % hg diff only reports a single changed line:
170 diff --git a/a.txt b/a.txt
170 diff --git a/a.txt b/a.txt
171 --- a/a.txt
171 --- a/a.txt
172 +++ b/a.txt
172 +++ b/a.txt
173 @@ -1,3 +1,4 @@
173 @@ -1,3 +1,4 @@
174 first
174 first
175 second
175 second
176 third
176 third
177 +fourth
177 +fourth
178 % reverting back to LF format
178 % reverting back to LF format
179 first
179 first
180 second
180 second
181 third
181 third
182 % hg commit of inconsistent .txt file marked as binary (should work)
182 % hg commit of inconsistent .txt file marked as binary (should work)
183 % hg commit of inconsistent .txt file marked as native (should fail)
183 % hg commit of inconsistent .txt file marked as native (should fail)
184 abort: inconsistent newline style in a.txt
184 abort: inconsistent newline style in a.txt
185
185
186 % hg commit --config eol.only-consistent=False (should work)
186 % hg commit --config eol.only-consistent=False (should work)
187 % hg commit of binary .txt file marked as native (binary files always okay)
187 % hg commit of binary .txt file marked as native (binary files always okay)
188 $ dotest CRLF
188 $ dotest CRLF
189 % hg clone repo repo-CRLF
189 % hg clone repo repo-CRLF
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 % a.txt
191 % a.txt
192 first\r (esc)
192 first\r (esc)
193 second\r (esc)
193 second\r (esc)
194 third\r (esc)
194 third\r (esc)
195 % hg cat a.txt
195 % hg cat a.txt
196 first
196 first
197 second
197 second
198 third
198 third
199 % a.txt
199 % a.txt
200 first\r (esc)
200 first\r (esc)
201 second\r (esc)
201 second\r (esc)
202 third\r (esc)
202 third\r (esc)
203 fourth\r (esc)
203 fourth\r (esc)
204 diff --git a/a.txt b/a.txt
204 diff --git a/a.txt b/a.txt
205 --- a/a.txt
205 --- a/a.txt
206 +++ b/a.txt
206 +++ b/a.txt
207 @@ -1,3 +1,4 @@
207 @@ -1,3 +1,4 @@
208 first
208 first
209 second
209 second
210 third
210 third
211 +fourth
211 +fourth
212 % switching encoding from '\r\n' to '\n'
212 % switching encoding from '\r\n' to '\n'
213 % hg diff only reports a single changed line:
213 % hg diff only reports a single changed line:
214 diff --git a/a.txt b/a.txt
214 diff --git a/a.txt b/a.txt
215 --- a/a.txt
215 --- a/a.txt
216 +++ b/a.txt
216 +++ b/a.txt
217 @@ -1,3 +1,4 @@
217 @@ -1,3 +1,4 @@
218 first
218 first
219 second
219 second
220 third
220 third
221 +fourth
221 +fourth
222 % reverting back to CRLF format
222 % reverting back to CRLF format
223 first\r (esc)
223 first\r (esc)
224 second\r (esc)
224 second\r (esc)
225 third\r (esc)
225 third\r (esc)
226 % hg commit of inconsistent .txt file marked as binary (should work)
226 % hg commit of inconsistent .txt file marked as binary (should work)
227 % hg commit of inconsistent .txt file marked as native (should fail)
227 % hg commit of inconsistent .txt file marked as native (should fail)
228 abort: inconsistent newline style in a.txt
228 abort: inconsistent newline style in a.txt
229
229
230 % hg commit --config eol.only-consistent=False (should work)
230 % hg commit --config eol.only-consistent=False (should work)
231 % hg commit of binary .txt file marked as native (binary files always okay)
231 % hg commit of binary .txt file marked as native (binary files always okay)
232 $ rm -r repo
232 $ rm -r repo
233 $ makerepo CRLF
233 $ makerepo CRLF
234 % setup CRLF repository
234 % setup CRLF repository
235 adding .hgeol
235 adding .hgeol
236 adding a.txt
236 adding a.txt
237
237
238 $ dotest LF
238 $ dotest LF
239 % hg clone repo repo-LF
239 % hg clone repo repo-LF
240 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
241 % a.txt
241 % a.txt
242 first
242 first
243 second
243 second
244 third
244 third
245 % hg cat a.txt
245 % hg cat a.txt
246 first\r (esc)
246 first\r (esc)
247 second\r (esc)
247 second\r (esc)
248 third\r (esc)
248 third\r (esc)
249 % a.txt
249 % a.txt
250 first
250 first
251 second
251 second
252 third
252 third
253 fourth
253 fourth
254 diff --git a/a.txt b/a.txt
254 diff --git a/a.txt b/a.txt
255 --- a/a.txt
255 --- a/a.txt
256 +++ b/a.txt
256 +++ b/a.txt
257 @@ -1,3 +1,4 @@
257 @@ -1,3 +1,4 @@
258 first\r (esc)
258 first\r (esc)
259 second\r (esc)
259 second\r (esc)
260 third\r (esc)
260 third\r (esc)
261 +fourth\r (esc)
261 +fourth\r (esc)
262 % switching encoding from '\n' to '\r\n'
262 % switching encoding from '\n' to '\r\n'
263 % hg diff only reports a single changed line:
263 % hg diff only reports a single changed line:
264 diff --git a/a.txt b/a.txt
264 diff --git a/a.txt b/a.txt
265 --- a/a.txt
265 --- a/a.txt
266 +++ b/a.txt
266 +++ b/a.txt
267 @@ -1,3 +1,4 @@
267 @@ -1,3 +1,4 @@
268 first\r (esc)
268 first\r (esc)
269 second\r (esc)
269 second\r (esc)
270 third\r (esc)
270 third\r (esc)
271 +fourth\r (esc)
271 +fourth\r (esc)
272 % reverting back to LF format
272 % reverting back to LF format
273 first
273 first
274 second
274 second
275 third
275 third
276 % hg commit of inconsistent .txt file marked as binary (should work)
276 % hg commit of inconsistent .txt file marked as binary (should work)
277 % hg commit of inconsistent .txt file marked as native (should fail)
277 % hg commit of inconsistent .txt file marked as native (should fail)
278 abort: inconsistent newline style in a.txt
278 abort: inconsistent newline style in a.txt
279
279
280 % hg commit --config eol.only-consistent=False (should work)
280 % hg commit --config eol.only-consistent=False (should work)
281 % hg commit of binary .txt file marked as native (binary files always okay)
281 % hg commit of binary .txt file marked as native (binary files always okay)
282 $ dotest CRLF
282 $ dotest CRLF
283 % hg clone repo repo-CRLF
283 % hg clone repo repo-CRLF
284 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 % a.txt
285 % a.txt
286 first\r (esc)
286 first\r (esc)
287 second\r (esc)
287 second\r (esc)
288 third\r (esc)
288 third\r (esc)
289 % hg cat a.txt
289 % hg cat a.txt
290 first\r (esc)
290 first\r (esc)
291 second\r (esc)
291 second\r (esc)
292 third\r (esc)
292 third\r (esc)
293 % a.txt
293 % a.txt
294 first\r (esc)
294 first\r (esc)
295 second\r (esc)
295 second\r (esc)
296 third\r (esc)
296 third\r (esc)
297 fourth\r (esc)
297 fourth\r (esc)
298 diff --git a/a.txt b/a.txt
298 diff --git a/a.txt b/a.txt
299 --- a/a.txt
299 --- a/a.txt
300 +++ b/a.txt
300 +++ b/a.txt
301 @@ -1,3 +1,4 @@
301 @@ -1,3 +1,4 @@
302 first\r (esc)
302 first\r (esc)
303 second\r (esc)
303 second\r (esc)
304 third\r (esc)
304 third\r (esc)
305 +fourth\r (esc)
305 +fourth\r (esc)
306 % switching encoding from '\r\n' to '\n'
306 % switching encoding from '\r\n' to '\n'
307 % hg diff only reports a single changed line:
307 % hg diff only reports a single changed line:
308 diff --git a/a.txt b/a.txt
308 diff --git a/a.txt b/a.txt
309 --- a/a.txt
309 --- a/a.txt
310 +++ b/a.txt
310 +++ b/a.txt
311 @@ -1,3 +1,4 @@
311 @@ -1,3 +1,4 @@
312 first\r (esc)
312 first\r (esc)
313 second\r (esc)
313 second\r (esc)
314 third\r (esc)
314 third\r (esc)
315 +fourth\r (esc)
315 +fourth\r (esc)
316 % reverting back to CRLF format
316 % reverting back to CRLF format
317 first\r (esc)
317 first\r (esc)
318 second\r (esc)
318 second\r (esc)
319 third\r (esc)
319 third\r (esc)
320 % hg commit of inconsistent .txt file marked as binary (should work)
320 % hg commit of inconsistent .txt file marked as binary (should work)
321 % hg commit of inconsistent .txt file marked as native (should fail)
321 % hg commit of inconsistent .txt file marked as native (should fail)
322 abort: inconsistent newline style in a.txt
322 abort: inconsistent newline style in a.txt
323
323
324 % hg commit --config eol.only-consistent=False (should work)
324 % hg commit --config eol.only-consistent=False (should work)
325 % hg commit of binary .txt file marked as native (binary files always okay)
325 % hg commit of binary .txt file marked as native (binary files always okay)
326 $ rm -r repo
326 $ rm -r repo
327
327
328 Mixed tests
328 Mixed tests
329
329
330 $ makemixedrepo LF
330 $ makemixedrepo LF
331
331
332 # setup LF repository
332 # setup LF repository
333 adding unix.txt
333 adding unix.txt
334 adding win.txt
334 adding win.txt
335 # setting repository-native EOLs to LF
335 # setting repository-native EOLs to LF
336 adding .hgeol
336 adding .hgeol
337 $ testmixed LF
337 $ testmixed LF
338
338
339 % hg clone mixed mixed-LF
339 % hg clone mixed mixed-LF
340 updating to branch default
340 updating to branch default
341 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
341 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
342 % hg status (eol extension not yet activated)
342 % hg status (eol extension not yet activated)
343 % hg status (eol activated)
343 % hg status (eol activated)
344 M win.txt
344 M win.txt
345 % hg commit
345 % hg commit
346 % hg status
346 % hg status
347 $ testmixed CRLF
347 $ testmixed CRLF
348
348
349 % hg clone mixed mixed-CRLF
349 % hg clone mixed mixed-CRLF
350 updating to branch default
350 updating to branch default
351 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
351 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
352 % hg status (eol extension not yet activated)
352 % hg status (eol extension not yet activated)
353 % hg status (eol activated)
353 % hg status (eol activated)
354 M win.txt
354 M win.txt
355 % hg commit
355 % hg commit
356 % hg status
356 % hg status
357 $ rm -r mixed
357 $ rm -r mixed
358 $ makemixedrepo CRLF
358 $ makemixedrepo CRLF
359
359
360 # setup CRLF repository
360 # setup CRLF repository
361 adding unix.txt
361 adding unix.txt
362 adding win.txt
362 adding win.txt
363 # setting repository-native EOLs to CRLF
363 # setting repository-native EOLs to CRLF
364 adding .hgeol
364 adding .hgeol
365 $ testmixed LF
365 $ testmixed LF
366
366
367 % hg clone mixed mixed-LF
367 % hg clone mixed mixed-LF
368 updating to branch default
368 updating to branch default
369 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
369 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
370 % hg status (eol extension not yet activated)
370 % hg status (eol extension not yet activated)
371 % hg status (eol activated)
371 % hg status (eol activated)
372 M unix.txt
372 M unix.txt
373 % hg commit
373 % hg commit
374 % hg status
374 % hg status
375 $ testmixed CRLF
375 $ testmixed CRLF
376
376
377 % hg clone mixed mixed-CRLF
377 % hg clone mixed mixed-CRLF
378 updating to branch default
378 updating to branch default
379 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
379 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 % hg status (eol extension not yet activated)
380 % hg status (eol extension not yet activated)
381 % hg status (eol activated)
381 % hg status (eol activated)
382 M unix.txt
382 M unix.txt
383 % hg commit
383 % hg commit
384 % hg status
384 % hg status
385 $ rm -r mixed
385 $ rm -r mixed
386
386
387 $ echo '[extensions]' >> $HGRCPATH
387 $ echo '[extensions]' >> $HGRCPATH
388 $ echo 'eol =' >> $HGRCPATH
388 $ echo 'eol =' >> $HGRCPATH
389
389
390 #if unix-permissions
390 #if unix-permissions
391
391
392 Test issue2569 -- eol extension takes write lock on reading:
392 Test issue2569 -- eol extension takes write lock on reading:
393
393
394 $ hg init repo
394 $ hg init repo
395 $ cd repo
395 $ cd repo
396 $ touch .hgeol
396 $ touch .hgeol
397 $ hg status
397 $ hg status
398 ? .hgeol
398 ? .hgeol
399 $ chmod -R -w .hg
399 $ chmod -R -w .hg
400 $ sleep 1
400 $ sleep 1
401 $ touch .hgeol
401 $ touch .hgeol
402 $ hg status --traceback
402 $ hg status --traceback
403 ? .hgeol
403 ? .hgeol
404 $ chmod -R u+w .hg
404 $ chmod -R u+w .hg
405 $ cd ..
405 $ cd ..
406
406
407 #endif
407 #endif
408
408
409 Test cleverencode: and cleverdecode: aliases for win32text extension
409 Test cleverencode: and cleverdecode: aliases for win32text extension
410
410
411 $ cat <<EOF >> $HGRCPATH
411 $ cat <<EOF >> $HGRCPATH
412 > [encode]
412 > [encode]
413 > **.txt = cleverencode:
413 > **.txt = cleverencode:
414 > [decode]
414 > [decode]
415 > **.txt = cleverdecode:
415 > **.txt = cleverdecode:
416 > EOF
416 > EOF
417
417
418 $ hg init win32compat
418 $ hg init win32compat
419 $ cd win32compat
419 $ cd win32compat
420 $ printf "foo\r\nbar\r\nbaz\r\n" > win.txt
420 $ printf "foo\r\nbar\r\nbaz\r\n" > win.txt
421 $ printf "foo\nbar\nbaz\n" > unix.txt
421 $ printf "foo\nbar\nbaz\n" > unix.txt
422 $ hg add
422 $ hg add
423 adding unix.txt
423 adding unix.txt
424 adding win.txt
424 adding win.txt
425 $ hg commit -m checkin
425 $ hg commit -m checkin
426
426
427 Check that both files have LF line-endings in the repository:
427 Check that both files have LF line-endings in the repository:
428
428
429 $ hg cat win.txt
429 $ hg cat win.txt
430 foo
430 foo
431 bar
431 bar
432 baz
432 baz
433 $ hg cat unix.txt
433 $ hg cat unix.txt
434 foo
434 foo
435 bar
435 bar
436 baz
436 baz
437
437
438 Test handling of a broken .hgeol file:
438 Test handling of a broken .hgeol file:
439
439
440 $ touch .hgeol
440 $ touch .hgeol
441 $ hg add .hgeol
441 $ hg add .hgeol
442 $ hg commit -m 'clean version'
442 $ hg commit -m 'clean version'
443 $ echo "bad" > .hgeol
443 $ echo "bad" > .hgeol
444 $ hg status
444 $ hg status
445 warning: ignoring .hgeol file due to parse error at .hgeol:1: bad
445 warning: ignoring .hgeol file due to parse error at .hgeol:1: bad
446 M .hgeol
446 M .hgeol
447 $ hg revert .hgeol
447 $ hg revert .hgeol
448 warning: ignoring .hgeol file due to parse error at .hgeol:1: bad
448 warning: ignoring .hgeol file due to parse error at .hgeol:1: bad
449 $ hg status
449 $ hg status
450 ? .hgeol.orig
450 ? .hgeol.orig
451
451
452 Test eol.only-consistent can be specified in .hgeol
452 Test eol.only-consistent can be specified in .hgeol
453
453
454 $ cd $TESTTMP
454 $ cd $TESTTMP
455 $ hg init only-consistent
455 $ hg init only-consistent
456 $ cd only-consistent
456 $ cd only-consistent
457 $ printf "first\nsecond\r\n" > a.txt
457 $ printf "first\nsecond\r\n" > a.txt
458 $ hg add a.txt
458 $ hg add a.txt
459 $ cat > .hgeol << EOF
459 $ cat > .hgeol << EOF
460 > [eol]
460 > [eol]
461 > only-consistent = True
461 > only-consistent = True
462 > EOF
462 > EOF
463 $ hg commit -m 'inconsistent'
463 $ hg commit -m 'inconsistent'
464 abort: inconsistent newline style in a.txt
464 abort: inconsistent newline style in a.txt
465
465
466 [255]
466 [255]
467 $ cat > .hgeol << EOF
467 $ cat > .hgeol << EOF
468 > [eol]
468 > [eol]
469 > only-consistent = False
469 > only-consistent = False
470 > EOF
470 > EOF
471 $ hg commit -m 'consistent'
471 $ hg commit -m 'consistent'
472
472
473 $ hg init subrepo
473 $ hg init subrepo
474 $ hg -R subrepo pull -qu .
474 $ hg -R subrepo pull -qu .
475 $ echo "subrepo = subrepo" > .hgsub
475 $ echo "subrepo = subrepo" > .hgsub
476 $ hg ci -Am "add subrepo"
476 $ hg ci -Am "add subrepo"
477 adding .hgeol
477 adding .hgeol
478 adding .hgsub
478 adding .hgsub
479 $ hg archive -S ../archive
479 $ hg archive -S ../archive
480 $ find ../archive/* | sort
480 $ find ../archive/* | sort
481 ../archive/a.txt
481 ../archive/a.txt
482 ../archive/subrepo
482 ../archive/subrepo
483 ../archive/subrepo/a.txt
483 ../archive/subrepo/a.txt
484 $ cat ../archive/a.txt ../archive/subrepo/a.txt
484 $ cat ../archive/a.txt ../archive/subrepo/a.txt
485 first\r (esc)
485 first\r (esc)
486 second\r (esc)
486 second\r (esc)
487 first\r (esc)
487 first\r (esc)
488 second\r (esc)
488 second\r (esc)
489
489
490 Test trailing newline
490 Test trailing newline
491
491
492 $ cat >> $HGRCPATH <<EOF
492 $ cat >> $HGRCPATH <<EOF
493 > [extensions]
493 > [extensions]
494 > eol=
494 > eol=
495 > EOF
495 > EOF
496
496
497 setup repository
497 setup repository
498
498
499 $ cd $TESTTMP
499 $ cd $TESTTMP
500 $ hg init trailing
500 $ hg init trailing
501 $ cd trailing
501 $ cd trailing
502 $ cat > .hgeol <<EOF
502 $ cat > .hgeol <<EOF
503 > [patterns]
503 > [patterns]
504 > **.txt = native
504 > **.txt = native
505 > [eol]
505 > [eol]
506 > fix-trailing-newline = False
506 > fix-trailing-newline = False
507 > EOF
507 > EOF
508
508
509 add text without trailing newline
509 add text without trailing newline
510
510
511 $ printf "first\nsecond" > a.txt
511 $ printf "first\nsecond" > a.txt
512 $ hg commit --addremove -m 'checking in'
512 $ hg commit --addremove -m 'checking in'
513 adding .hgeol
513 adding .hgeol
514 adding a.txt
514 adding a.txt
515 $ rm a.txt
515 $ rm a.txt
516 $ hg update -C -q
516 $ hg update -C -q
517 $ cat a.txt
517 $ cat a.txt
518 first
518 first
519 second (no-eol)
519 second (no-eol)
520
520
521 $ cat > .hgeol <<EOF
521 $ cat > .hgeol <<EOF
522 > [patterns]
522 > [patterns]
523 > **.txt = native
523 > **.txt = native
524 > [eol]
524 > [eol]
525 > fix-trailing-newline = True
525 > fix-trailing-newline = True
526 > EOF
526 > EOF
527 $ printf "third\nfourth" > a.txt
527 $ printf "third\nfourth" > a.txt
528 $ hg commit -m 'checking in with newline fix'
528 $ hg commit -m 'checking in with newline fix'
529 $ rm a.txt
529 $ rm a.txt
530 $ hg update -C -q
530 $ hg update -C -q
531 $ cat a.txt
531 $ cat a.txt
532 third
532 third
533 fourth
533 fourth
534
534
535 append a line without trailing newline
535 append a line without trailing newline
536
536
537 $ printf "fifth" >> a.txt
537 $ printf "fifth" >> a.txt
538 $ hg commit -m 'adding another line line'
538 $ hg commit -m 'adding another line line'
539 $ rm a.txt
539 $ rm a.txt
540 $ hg update -C -q
540 $ hg update -C -q
541 $ cat a.txt
541 $ cat a.txt
542 third
542 third
543 fourth
543 fourth
544 fifth
544 fifth
545
545
546 amend of changesets with renamed/deleted files expose new code paths
546 amend of changesets with renamed/deleted files expose new code paths
547
547
548 $ hg mv a.txt b.txt
548 $ hg mv a.txt b.txt
549 $ hg ci --amend -q
549 $ hg ci --amend -q
550 $ hg diff -c.
550 $ hg diff -c.
551 diff --git a/a.txt b/b.txt
551 diff --git a/a.txt b/b.txt
552 rename from a.txt
552 rename from a.txt
553 rename to b.txt
553 rename to b.txt
554 --- a/a.txt
554 --- a/a.txt
555 +++ b/b.txt
555 +++ b/b.txt
556 @@ -1,2 +1,3 @@
556 @@ -1,2 +1,3 @@
557 third
557 third
558 fourth
558 fourth
559 +fifth
559 +fifth
560
560
561 $ cd ..
561 $ cd ..
@@ -1,1706 +1,1706 b''
1 Test basic extension support
1 Test basic extension support
2
2
3 $ cat > foobar.py <<EOF
3 $ cat > foobar.py <<EOF
4 > import os
4 > import os
5 > from mercurial import commands, registrar
5 > from mercurial import commands, registrar
6 > cmdtable = {}
6 > cmdtable = {}
7 > command = registrar.command(cmdtable)
7 > command = registrar.command(cmdtable)
8 > configtable = {}
8 > configtable = {}
9 > configitem = registrar.configitem(configtable)
9 > configitem = registrar.configitem(configtable)
10 > configitem('tests', 'foo', default="Foo")
10 > configitem('tests', 'foo', default="Foo")
11 > def uisetup(ui):
11 > def uisetup(ui):
12 > ui.write("uisetup called\\n")
12 > ui.write("uisetup called\\n")
13 > ui.flush()
13 > ui.flush()
14 > def reposetup(ui, repo):
14 > def reposetup(ui, repo):
15 > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root))
15 > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root))
16 > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!"))
16 > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!"))
17 > ui.flush()
17 > ui.flush()
18 > @command(b'foo', [], 'hg foo')
18 > @command(b'foo', [], 'hg foo')
19 > def foo(ui, *args, **kwargs):
19 > def foo(ui, *args, **kwargs):
20 > foo = ui.config('tests', 'foo')
20 > foo = ui.config('tests', 'foo')
21 > ui.write(foo)
21 > ui.write(foo)
22 > ui.write("\\n")
22 > ui.write("\\n")
23 > @command(b'bar', [], 'hg bar', norepo=True)
23 > @command(b'bar', [], 'hg bar', norepo=True)
24 > def bar(ui, *args, **kwargs):
24 > def bar(ui, *args, **kwargs):
25 > ui.write("Bar\\n")
25 > ui.write("Bar\\n")
26 > EOF
26 > EOF
27 $ abspath=`pwd`/foobar.py
27 $ abspath=`pwd`/foobar.py
28
28
29 $ mkdir barfoo
29 $ mkdir barfoo
30 $ cp foobar.py barfoo/__init__.py
30 $ cp foobar.py barfoo/__init__.py
31 $ barfoopath=`pwd`/barfoo
31 $ barfoopath=`pwd`/barfoo
32
32
33 $ hg init a
33 $ hg init a
34 $ cd a
34 $ cd a
35 $ echo foo > file
35 $ echo foo > file
36 $ hg add file
36 $ hg add file
37 $ hg commit -m 'add file'
37 $ hg commit -m 'add file'
38
38
39 $ echo '[extensions]' >> $HGRCPATH
39 $ echo '[extensions]' >> $HGRCPATH
40 $ echo "foobar = $abspath" >> $HGRCPATH
40 $ echo "foobar = $abspath" >> $HGRCPATH
41 $ hg foo
41 $ hg foo
42 uisetup called
42 uisetup called
43 reposetup called for a
43 reposetup called for a
44 ui == repo.ui
44 ui == repo.ui
45 Foo
45 Foo
46
46
47 $ cd ..
47 $ cd ..
48 $ hg clone a b
48 $ hg clone a b
49 uisetup called
49 uisetup called
50 reposetup called for a
50 reposetup called for a
51 ui == repo.ui
51 ui == repo.ui
52 reposetup called for b
52 reposetup called for b
53 ui == repo.ui
53 ui == repo.ui
54 updating to branch default
54 updating to branch default
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56
56
57 $ hg bar
57 $ hg bar
58 uisetup called
58 uisetup called
59 Bar
59 Bar
60 $ echo 'foobar = !' >> $HGRCPATH
60 $ echo 'foobar = !' >> $HGRCPATH
61
61
62 module/__init__.py-style
62 module/__init__.py-style
63
63
64 $ echo "barfoo = $barfoopath" >> $HGRCPATH
64 $ echo "barfoo = $barfoopath" >> $HGRCPATH
65 $ cd a
65 $ cd a
66 $ hg foo
66 $ hg foo
67 uisetup called
67 uisetup called
68 reposetup called for a
68 reposetup called for a
69 ui == repo.ui
69 ui == repo.ui
70 Foo
70 Foo
71 $ echo 'barfoo = !' >> $HGRCPATH
71 $ echo 'barfoo = !' >> $HGRCPATH
72
72
73 Check that extensions are loaded in phases:
73 Check that extensions are loaded in phases:
74
74
75 $ cat > foo.py <<EOF
75 $ cat > foo.py <<EOF
76 > import os
76 > import os
77 > name = os.path.basename(__file__).rsplit('.', 1)[0]
77 > name = os.path.basename(__file__).rsplit('.', 1)[0]
78 > print "1) %s imported" % name
78 > print("1) %s imported" % name)
79 > def uisetup(ui):
79 > def uisetup(ui):
80 > print "2) %s uisetup" % name
80 > print("2) %s uisetup" % name)
81 > def extsetup():
81 > def extsetup():
82 > print "3) %s extsetup" % name
82 > print("3) %s extsetup" % name)
83 > def reposetup(ui, repo):
83 > def reposetup(ui, repo):
84 > print "4) %s reposetup" % name
84 > print("4) %s reposetup" % name)
85 >
85 >
86 > # custom predicate to check registration of functions at loading
86 > # custom predicate to check registration of functions at loading
87 > from mercurial import (
87 > from mercurial import (
88 > registrar,
88 > registrar,
89 > smartset,
89 > smartset,
90 > )
90 > )
91 > revsetpredicate = registrar.revsetpredicate()
91 > revsetpredicate = registrar.revsetpredicate()
92 > @revsetpredicate(name, safe=True) # safe=True for query via hgweb
92 > @revsetpredicate(name, safe=True) # safe=True for query via hgweb
93 > def custompredicate(repo, subset, x):
93 > def custompredicate(repo, subset, x):
94 > return smartset.baseset([r for r in subset if r in {0}])
94 > return smartset.baseset([r for r in subset if r in {0}])
95 > EOF
95 > EOF
96
96
97 $ cp foo.py bar.py
97 $ cp foo.py bar.py
98 $ echo 'foo = foo.py' >> $HGRCPATH
98 $ echo 'foo = foo.py' >> $HGRCPATH
99 $ echo 'bar = bar.py' >> $HGRCPATH
99 $ echo 'bar = bar.py' >> $HGRCPATH
100
100
101 Check normal command's load order of extensions and registration of functions
101 Check normal command's load order of extensions and registration of functions
102
102
103 $ hg log -r "foo() and bar()" -q
103 $ hg log -r "foo() and bar()" -q
104 1) foo imported
104 1) foo imported
105 1) bar imported
105 1) bar imported
106 2) foo uisetup
106 2) foo uisetup
107 2) bar uisetup
107 2) bar uisetup
108 3) foo extsetup
108 3) foo extsetup
109 3) bar extsetup
109 3) bar extsetup
110 4) foo reposetup
110 4) foo reposetup
111 4) bar reposetup
111 4) bar reposetup
112 0:c24b9ac61126
112 0:c24b9ac61126
113
113
114 Check hgweb's load order of extensions and registration of functions
114 Check hgweb's load order of extensions and registration of functions
115
115
116 $ cat > hgweb.cgi <<EOF
116 $ cat > hgweb.cgi <<EOF
117 > #!$PYTHON
117 > #!$PYTHON
118 > from mercurial import demandimport; demandimport.enable()
118 > from mercurial import demandimport; demandimport.enable()
119 > from mercurial.hgweb import hgweb
119 > from mercurial.hgweb import hgweb
120 > from mercurial.hgweb import wsgicgi
120 > from mercurial.hgweb import wsgicgi
121 > application = hgweb('.', 'test repo')
121 > application = hgweb('.', 'test repo')
122 > wsgicgi.launch(application)
122 > wsgicgi.launch(application)
123 > EOF
123 > EOF
124 $ . "$TESTDIR/cgienv"
124 $ . "$TESTDIR/cgienv"
125
125
126 $ PATH_INFO='/' SCRIPT_NAME='' $PYTHON hgweb.cgi \
126 $ PATH_INFO='/' SCRIPT_NAME='' $PYTHON hgweb.cgi \
127 > | grep '^[0-9]) ' # ignores HTML output
127 > | grep '^[0-9]) ' # ignores HTML output
128 1) foo imported
128 1) foo imported
129 1) bar imported
129 1) bar imported
130 2) foo uisetup
130 2) foo uisetup
131 2) bar uisetup
131 2) bar uisetup
132 3) foo extsetup
132 3) foo extsetup
133 3) bar extsetup
133 3) bar extsetup
134 4) foo reposetup
134 4) foo reposetup
135 4) bar reposetup
135 4) bar reposetup
136
136
137 (check that revset predicate foo() and bar() are available)
137 (check that revset predicate foo() and bar() are available)
138
138
139 #if msys
139 #if msys
140 $ PATH_INFO='//shortlog'
140 $ PATH_INFO='//shortlog'
141 #else
141 #else
142 $ PATH_INFO='/shortlog'
142 $ PATH_INFO='/shortlog'
143 #endif
143 #endif
144 $ export PATH_INFO
144 $ export PATH_INFO
145 $ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' $PYTHON hgweb.cgi \
145 $ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' $PYTHON hgweb.cgi \
146 > | grep '<a href="/rev/[0-9a-z]*">'
146 > | grep '<a href="/rev/[0-9a-z]*">'
147 <a href="/rev/c24b9ac61126">add file</a>
147 <a href="/rev/c24b9ac61126">add file</a>
148
148
149 $ echo 'foo = !' >> $HGRCPATH
149 $ echo 'foo = !' >> $HGRCPATH
150 $ echo 'bar = !' >> $HGRCPATH
150 $ echo 'bar = !' >> $HGRCPATH
151
151
152 Check "from __future__ import absolute_import" support for external libraries
152 Check "from __future__ import absolute_import" support for external libraries
153
153
154 #if windows
154 #if windows
155 $ PATHSEP=";"
155 $ PATHSEP=";"
156 #else
156 #else
157 $ PATHSEP=":"
157 $ PATHSEP=":"
158 #endif
158 #endif
159 $ export PATHSEP
159 $ export PATHSEP
160
160
161 $ mkdir $TESTTMP/libroot
161 $ mkdir $TESTTMP/libroot
162 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py
162 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py
163 $ mkdir $TESTTMP/libroot/mod
163 $ mkdir $TESTTMP/libroot/mod
164 $ touch $TESTTMP/libroot/mod/__init__.py
164 $ touch $TESTTMP/libroot/mod/__init__.py
165 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
165 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
166
166
167 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
167 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
168 > from __future__ import absolute_import
168 > from __future__ import absolute_import
169 > import ambig # should load "libroot/ambig.py"
169 > import ambig # should load "libroot/ambig.py"
170 > s = ambig.s
170 > s = ambig.s
171 > EOF
171 > EOF
172 $ cat > loadabs.py <<EOF
172 $ cat > loadabs.py <<EOF
173 > import mod.ambigabs as ambigabs
173 > import mod.ambigabs as ambigabs
174 > def extsetup():
174 > def extsetup():
175 > print 'ambigabs.s=%s' % ambigabs.s
175 > print('ambigabs.s=%s' % ambigabs.s)
176 > EOF
176 > EOF
177 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
177 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
178 ambigabs.s=libroot/ambig.py
178 ambigabs.s=libroot/ambig.py
179 $TESTTMP/a (glob)
179 $TESTTMP/a (glob)
180
180
181 #if no-py3k
181 #if no-py3k
182 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
182 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
183 > import ambig # should load "libroot/mod/ambig.py"
183 > import ambig # should load "libroot/mod/ambig.py"
184 > s = ambig.s
184 > s = ambig.s
185 > EOF
185 > EOF
186 $ cat > loadrel.py <<EOF
186 $ cat > loadrel.py <<EOF
187 > import mod.ambigrel as ambigrel
187 > import mod.ambigrel as ambigrel
188 > def extsetup():
188 > def extsetup():
189 > print 'ambigrel.s=%s' % ambigrel.s
189 > print('ambigrel.s=%s' % ambigrel.s)
190 > EOF
190 > EOF
191 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root)
191 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root)
192 ambigrel.s=libroot/mod/ambig.py
192 ambigrel.s=libroot/mod/ambig.py
193 $TESTTMP/a (glob)
193 $TESTTMP/a (glob)
194 #endif
194 #endif
195
195
196 Check absolute/relative import of extension specific modules
196 Check absolute/relative import of extension specific modules
197
197
198 $ mkdir $TESTTMP/extroot
198 $ mkdir $TESTTMP/extroot
199 $ cat > $TESTTMP/extroot/bar.py <<EOF
199 $ cat > $TESTTMP/extroot/bar.py <<EOF
200 > s = 'this is extroot.bar'
200 > s = 'this is extroot.bar'
201 > EOF
201 > EOF
202 $ mkdir $TESTTMP/extroot/sub1
202 $ mkdir $TESTTMP/extroot/sub1
203 $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF
203 $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF
204 > s = 'this is extroot.sub1.__init__'
204 > s = 'this is extroot.sub1.__init__'
205 > EOF
205 > EOF
206 $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF
206 $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF
207 > s = 'this is extroot.sub1.baz'
207 > s = 'this is extroot.sub1.baz'
208 > EOF
208 > EOF
209 $ cat > $TESTTMP/extroot/__init__.py <<EOF
209 $ cat > $TESTTMP/extroot/__init__.py <<EOF
210 > s = 'this is extroot.__init__'
210 > s = 'this is extroot.__init__'
211 > import foo
211 > import foo
212 > def extsetup(ui):
212 > def extsetup(ui):
213 > ui.write('(extroot) ', foo.func(), '\n')
213 > ui.write('(extroot) ', foo.func(), '\n')
214 > ui.flush()
214 > ui.flush()
215 > EOF
215 > EOF
216
216
217 $ cat > $TESTTMP/extroot/foo.py <<EOF
217 $ cat > $TESTTMP/extroot/foo.py <<EOF
218 > # test absolute import
218 > # test absolute import
219 > buf = []
219 > buf = []
220 > def func():
220 > def func():
221 > # "not locals" case
221 > # "not locals" case
222 > import extroot.bar
222 > import extroot.bar
223 > buf.append('import extroot.bar in func(): %s' % extroot.bar.s)
223 > buf.append('import extroot.bar in func(): %s' % extroot.bar.s)
224 > return '\n(extroot) '.join(buf)
224 > return '\n(extroot) '.join(buf)
225 > # "fromlist == ('*',)" case
225 > # "fromlist == ('*',)" case
226 > from extroot.bar import *
226 > from extroot.bar import *
227 > buf.append('from extroot.bar import *: %s' % s)
227 > buf.append('from extroot.bar import *: %s' % s)
228 > # "not fromlist" and "if '.' in name" case
228 > # "not fromlist" and "if '.' in name" case
229 > import extroot.sub1.baz
229 > import extroot.sub1.baz
230 > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s)
230 > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s)
231 > # "not fromlist" and NOT "if '.' in name" case
231 > # "not fromlist" and NOT "if '.' in name" case
232 > import extroot
232 > import extroot
233 > buf.append('import extroot: %s' % extroot.s)
233 > buf.append('import extroot: %s' % extroot.s)
234 > # NOT "not fromlist" and NOT "level != -1" case
234 > # NOT "not fromlist" and NOT "level != -1" case
235 > from extroot.bar import s
235 > from extroot.bar import s
236 > buf.append('from extroot.bar import s: %s' % s)
236 > buf.append('from extroot.bar import s: %s' % s)
237 > EOF
237 > EOF
238 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root)
238 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root)
239 (extroot) from extroot.bar import *: this is extroot.bar
239 (extroot) from extroot.bar import *: this is extroot.bar
240 (extroot) import extroot.sub1.baz: this is extroot.sub1.baz
240 (extroot) import extroot.sub1.baz: this is extroot.sub1.baz
241 (extroot) import extroot: this is extroot.__init__
241 (extroot) import extroot: this is extroot.__init__
242 (extroot) from extroot.bar import s: this is extroot.bar
242 (extroot) from extroot.bar import s: this is extroot.bar
243 (extroot) import extroot.bar in func(): this is extroot.bar
243 (extroot) import extroot.bar in func(): this is extroot.bar
244 $TESTTMP/a (glob)
244 $TESTTMP/a (glob)
245
245
246 #if no-py3k
246 #if no-py3k
247 $ rm "$TESTTMP"/extroot/foo.*
247 $ rm "$TESTTMP"/extroot/foo.*
248 $ cat > $TESTTMP/extroot/foo.py <<EOF
248 $ cat > $TESTTMP/extroot/foo.py <<EOF
249 > # test relative import
249 > # test relative import
250 > buf = []
250 > buf = []
251 > def func():
251 > def func():
252 > # "not locals" case
252 > # "not locals" case
253 > import bar
253 > import bar
254 > buf.append('import bar in func(): %s' % bar.s)
254 > buf.append('import bar in func(): %s' % bar.s)
255 > return '\n(extroot) '.join(buf)
255 > return '\n(extroot) '.join(buf)
256 > # "fromlist == ('*',)" case
256 > # "fromlist == ('*',)" case
257 > from bar import *
257 > from bar import *
258 > buf.append('from bar import *: %s' % s)
258 > buf.append('from bar import *: %s' % s)
259 > # "not fromlist" and "if '.' in name" case
259 > # "not fromlist" and "if '.' in name" case
260 > import sub1.baz
260 > import sub1.baz
261 > buf.append('import sub1.baz: %s' % sub1.baz.s)
261 > buf.append('import sub1.baz: %s' % sub1.baz.s)
262 > # "not fromlist" and NOT "if '.' in name" case
262 > # "not fromlist" and NOT "if '.' in name" case
263 > import sub1
263 > import sub1
264 > buf.append('import sub1: %s' % sub1.s)
264 > buf.append('import sub1: %s' % sub1.s)
265 > # NOT "not fromlist" and NOT "level != -1" case
265 > # NOT "not fromlist" and NOT "level != -1" case
266 > from bar import s
266 > from bar import s
267 > buf.append('from bar import s: %s' % s)
267 > buf.append('from bar import s: %s' % s)
268 > EOF
268 > EOF
269 $ hg --config extensions.extroot=$TESTTMP/extroot root
269 $ hg --config extensions.extroot=$TESTTMP/extroot root
270 (extroot) from bar import *: this is extroot.bar
270 (extroot) from bar import *: this is extroot.bar
271 (extroot) import sub1.baz: this is extroot.sub1.baz
271 (extroot) import sub1.baz: this is extroot.sub1.baz
272 (extroot) import sub1: this is extroot.sub1.__init__
272 (extroot) import sub1: this is extroot.sub1.__init__
273 (extroot) from bar import s: this is extroot.bar
273 (extroot) from bar import s: this is extroot.bar
274 (extroot) import bar in func(): this is extroot.bar
274 (extroot) import bar in func(): this is extroot.bar
275 $TESTTMP/a (glob)
275 $TESTTMP/a (glob)
276 #endif
276 #endif
277
277
278 #if demandimport
278 #if demandimport
279
279
280 Examine whether module loading is delayed until actual referring, even
280 Examine whether module loading is delayed until actual referring, even
281 though module is imported with "absolute_import" feature.
281 though module is imported with "absolute_import" feature.
282
282
283 Files below in each packages are used for described purpose:
283 Files below in each packages are used for described purpose:
284
284
285 - "called": examine whether "from MODULE import ATTR" works correctly
285 - "called": examine whether "from MODULE import ATTR" works correctly
286 - "unused": examine whether loading is delayed correctly
286 - "unused": examine whether loading is delayed correctly
287 - "used": examine whether "from PACKAGE import MODULE" works correctly
287 - "used": examine whether "from PACKAGE import MODULE" works correctly
288
288
289 Package hierarchy is needed to examine whether demand importing works
289 Package hierarchy is needed to examine whether demand importing works
290 as expected for "from SUB.PACK.AGE import MODULE".
290 as expected for "from SUB.PACK.AGE import MODULE".
291
291
292 Setup "external library" to be imported with "absolute_import"
292 Setup "external library" to be imported with "absolute_import"
293 feature.
293 feature.
294
294
295 $ mkdir -p $TESTTMP/extlibroot/lsub1/lsub2
295 $ mkdir -p $TESTTMP/extlibroot/lsub1/lsub2
296 $ touch $TESTTMP/extlibroot/__init__.py
296 $ touch $TESTTMP/extlibroot/__init__.py
297 $ touch $TESTTMP/extlibroot/lsub1/__init__.py
297 $ touch $TESTTMP/extlibroot/lsub1/__init__.py
298 $ touch $TESTTMP/extlibroot/lsub1/lsub2/__init__.py
298 $ touch $TESTTMP/extlibroot/lsub1/lsub2/__init__.py
299
299
300 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF
300 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF
301 > def func():
301 > def func():
302 > return "this is extlibroot.lsub1.lsub2.called.func()"
302 > return "this is extlibroot.lsub1.lsub2.called.func()"
303 > EOF
303 > EOF
304 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF
304 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF
305 > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally")
305 > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally")
306 > EOF
306 > EOF
307 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF
307 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF
308 > detail = "this is extlibroot.lsub1.lsub2.used"
308 > detail = "this is extlibroot.lsub1.lsub2.used"
309 > EOF
309 > EOF
310
310
311 Setup sub-package of "external library", which causes instantiation of
311 Setup sub-package of "external library", which causes instantiation of
312 demandmod in "recurse down the module chain" code path. Relative
312 demandmod in "recurse down the module chain" code path. Relative
313 importing with "absolute_import" feature isn't tested, because "level
313 importing with "absolute_import" feature isn't tested, because "level
314 >=1 " doesn't cause instantiation of demandmod.
314 >=1 " doesn't cause instantiation of demandmod.
315
315
316 $ mkdir -p $TESTTMP/extlibroot/recursedown/abs
316 $ mkdir -p $TESTTMP/extlibroot/recursedown/abs
317 $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF
317 $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF
318 > detail = "this is extlibroot.recursedown.abs.used"
318 > detail = "this is extlibroot.recursedown.abs.used"
319 > EOF
319 > EOF
320 $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF
320 $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF
321 > from __future__ import absolute_import
321 > from __future__ import absolute_import
322 > from extlibroot.recursedown.abs.used import detail
322 > from extlibroot.recursedown.abs.used import detail
323 > EOF
323 > EOF
324
324
325 $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy
325 $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy
326 $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF
326 $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF
327 > detail = "this is extlibroot.recursedown.legacy.used"
327 > detail = "this is extlibroot.recursedown.legacy.used"
328 > EOF
328 > EOF
329 $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF
329 $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF
330 > # legacy style (level == -1) import
330 > # legacy style (level == -1) import
331 > from extlibroot.recursedown.legacy.used import detail
331 > from extlibroot.recursedown.legacy.used import detail
332 > EOF
332 > EOF
333
333
334 $ cat > $TESTTMP/extlibroot/recursedown/__init__.py <<EOF
334 $ cat > $TESTTMP/extlibroot/recursedown/__init__.py <<EOF
335 > from __future__ import absolute_import
335 > from __future__ import absolute_import
336 > from extlibroot.recursedown.abs import detail as absdetail
336 > from extlibroot.recursedown.abs import detail as absdetail
337 > from .legacy import detail as legacydetail
337 > from .legacy import detail as legacydetail
338 > EOF
338 > EOF
339
339
340 Setup package that re-exports an attribute of its submodule as the same
340 Setup package that re-exports an attribute of its submodule as the same
341 name. This leaves 'shadowing.used' pointing to 'used.detail', but still
341 name. This leaves 'shadowing.used' pointing to 'used.detail', but still
342 the submodule 'used' should be somehow accessible. (issue5617)
342 the submodule 'used' should be somehow accessible. (issue5617)
343
343
344 $ mkdir -p $TESTTMP/extlibroot/shadowing
344 $ mkdir -p $TESTTMP/extlibroot/shadowing
345 $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF
345 $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF
346 > detail = "this is extlibroot.shadowing.used"
346 > detail = "this is extlibroot.shadowing.used"
347 > EOF
347 > EOF
348 $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF
348 $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF
349 > from __future__ import absolute_import
349 > from __future__ import absolute_import
350 > from extlibroot.shadowing.used import detail
350 > from extlibroot.shadowing.used import detail
351 > EOF
351 > EOF
352 $ cat > $TESTTMP/extlibroot/shadowing/__init__.py <<EOF
352 $ cat > $TESTTMP/extlibroot/shadowing/__init__.py <<EOF
353 > from __future__ import absolute_import
353 > from __future__ import absolute_import
354 > from .used import detail as used
354 > from .used import detail as used
355 > EOF
355 > EOF
356
356
357 Setup extension local modules to be imported with "absolute_import"
357 Setup extension local modules to be imported with "absolute_import"
358 feature.
358 feature.
359
359
360 $ mkdir -p $TESTTMP/absextroot/xsub1/xsub2
360 $ mkdir -p $TESTTMP/absextroot/xsub1/xsub2
361 $ touch $TESTTMP/absextroot/xsub1/__init__.py
361 $ touch $TESTTMP/absextroot/xsub1/__init__.py
362 $ touch $TESTTMP/absextroot/xsub1/xsub2/__init__.py
362 $ touch $TESTTMP/absextroot/xsub1/xsub2/__init__.py
363
363
364 $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF
364 $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF
365 > def func():
365 > def func():
366 > return "this is absextroot.xsub1.xsub2.called.func()"
366 > return "this is absextroot.xsub1.xsub2.called.func()"
367 > EOF
367 > EOF
368 $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF
368 $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF
369 > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally")
369 > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally")
370 > EOF
370 > EOF
371 $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF
371 $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF
372 > detail = "this is absextroot.xsub1.xsub2.used"
372 > detail = "this is absextroot.xsub1.xsub2.used"
373 > EOF
373 > EOF
374
374
375 Setup extension local modules to examine whether demand importing
375 Setup extension local modules to examine whether demand importing
376 works as expected in "level > 1" case.
376 works as expected in "level > 1" case.
377
377
378 $ cat > $TESTTMP/absextroot/relimportee.py <<EOF
378 $ cat > $TESTTMP/absextroot/relimportee.py <<EOF
379 > detail = "this is absextroot.relimportee"
379 > detail = "this is absextroot.relimportee"
380 > EOF
380 > EOF
381 $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF
381 $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF
382 > from __future__ import absolute_import
382 > from __future__ import absolute_import
383 > from ... import relimportee
383 > from ... import relimportee
384 > detail = "this relimporter imports %r" % (relimportee.detail)
384 > detail = "this relimporter imports %r" % (relimportee.detail)
385 > EOF
385 > EOF
386
386
387 Setup modules, which actually import extension local modules at
387 Setup modules, which actually import extension local modules at
388 runtime.
388 runtime.
389
389
390 $ cat > $TESTTMP/absextroot/absolute.py << EOF
390 $ cat > $TESTTMP/absextroot/absolute.py << EOF
391 > from __future__ import absolute_import
391 > from __future__ import absolute_import
392 >
392 >
393 > # import extension local modules absolutely (level = 0)
393 > # import extension local modules absolutely (level = 0)
394 > from absextroot.xsub1.xsub2 import used, unused
394 > from absextroot.xsub1.xsub2 import used, unused
395 > from absextroot.xsub1.xsub2.called import func
395 > from absextroot.xsub1.xsub2.called import func
396 >
396 >
397 > def getresult():
397 > def getresult():
398 > result = []
398 > result = []
399 > result.append(used.detail)
399 > result.append(used.detail)
400 > result.append(func())
400 > result.append(func())
401 > return result
401 > return result
402 > EOF
402 > EOF
403
403
404 $ cat > $TESTTMP/absextroot/relative.py << EOF
404 $ cat > $TESTTMP/absextroot/relative.py << EOF
405 > from __future__ import absolute_import
405 > from __future__ import absolute_import
406 >
406 >
407 > # import extension local modules relatively (level == 1)
407 > # import extension local modules relatively (level == 1)
408 > from .xsub1.xsub2 import used, unused
408 > from .xsub1.xsub2 import used, unused
409 > from .xsub1.xsub2.called import func
409 > from .xsub1.xsub2.called import func
410 >
410 >
411 > # import a module, which implies "importing with level > 1"
411 > # import a module, which implies "importing with level > 1"
412 > from .xsub1.xsub2 import relimporter
412 > from .xsub1.xsub2 import relimporter
413 >
413 >
414 > def getresult():
414 > def getresult():
415 > result = []
415 > result = []
416 > result.append(used.detail)
416 > result.append(used.detail)
417 > result.append(func())
417 > result.append(func())
418 > result.append(relimporter.detail)
418 > result.append(relimporter.detail)
419 > return result
419 > return result
420 > EOF
420 > EOF
421
421
422 Setup main procedure of extension.
422 Setup main procedure of extension.
423
423
424 $ cat > $TESTTMP/absextroot/__init__.py <<EOF
424 $ cat > $TESTTMP/absextroot/__init__.py <<EOF
425 > from __future__ import absolute_import
425 > from __future__ import absolute_import
426 > from mercurial import registrar
426 > from mercurial import registrar
427 > cmdtable = {}
427 > cmdtable = {}
428 > command = registrar.command(cmdtable)
428 > command = registrar.command(cmdtable)
429 >
429 >
430 > # "absolute" and "relative" shouldn't be imported before actual
430 > # "absolute" and "relative" shouldn't be imported before actual
431 > # command execution, because (1) they import same modules, and (2)
431 > # command execution, because (1) they import same modules, and (2)
432 > # preceding import (= instantiate "demandmod" object instead of
432 > # preceding import (= instantiate "demandmod" object instead of
433 > # real "module" object) might hide problem of succeeding import.
433 > # real "module" object) might hide problem of succeeding import.
434 >
434 >
435 > @command(b'showabsolute', [], norepo=True)
435 > @command(b'showabsolute', [], norepo=True)
436 > def showabsolute(ui, *args, **opts):
436 > def showabsolute(ui, *args, **opts):
437 > from absextroot import absolute
437 > from absextroot import absolute
438 > ui.write('ABS: %s\n' % '\nABS: '.join(absolute.getresult()))
438 > ui.write('ABS: %s\n' % '\nABS: '.join(absolute.getresult()))
439 >
439 >
440 > @command(b'showrelative', [], norepo=True)
440 > @command(b'showrelative', [], norepo=True)
441 > def showrelative(ui, *args, **opts):
441 > def showrelative(ui, *args, **opts):
442 > from . import relative
442 > from . import relative
443 > ui.write('REL: %s\n' % '\nREL: '.join(relative.getresult()))
443 > ui.write('REL: %s\n' % '\nREL: '.join(relative.getresult()))
444 >
444 >
445 > # import modules from external library
445 > # import modules from external library
446 > from extlibroot.lsub1.lsub2 import used as lused, unused as lunused
446 > from extlibroot.lsub1.lsub2 import used as lused, unused as lunused
447 > from extlibroot.lsub1.lsub2.called import func as lfunc
447 > from extlibroot.lsub1.lsub2.called import func as lfunc
448 > from extlibroot.recursedown import absdetail, legacydetail
448 > from extlibroot.recursedown import absdetail, legacydetail
449 > from extlibroot.shadowing import proxied
449 > from extlibroot.shadowing import proxied
450 >
450 >
451 > def uisetup(ui):
451 > def uisetup(ui):
452 > result = []
452 > result = []
453 > result.append(lused.detail)
453 > result.append(lused.detail)
454 > result.append(lfunc())
454 > result.append(lfunc())
455 > result.append(absdetail)
455 > result.append(absdetail)
456 > result.append(legacydetail)
456 > result.append(legacydetail)
457 > result.append(proxied.detail)
457 > result.append(proxied.detail)
458 > ui.write('LIB: %s\n' % '\nLIB: '.join(result))
458 > ui.write('LIB: %s\n' % '\nLIB: '.join(result))
459 > EOF
459 > EOF
460
460
461 Examine module importing.
461 Examine module importing.
462
462
463 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute)
463 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute)
464 LIB: this is extlibroot.lsub1.lsub2.used
464 LIB: this is extlibroot.lsub1.lsub2.used
465 LIB: this is extlibroot.lsub1.lsub2.called.func()
465 LIB: this is extlibroot.lsub1.lsub2.called.func()
466 LIB: this is extlibroot.recursedown.abs.used
466 LIB: this is extlibroot.recursedown.abs.used
467 LIB: this is extlibroot.recursedown.legacy.used
467 LIB: this is extlibroot.recursedown.legacy.used
468 LIB: this is extlibroot.shadowing.used
468 LIB: this is extlibroot.shadowing.used
469 ABS: this is absextroot.xsub1.xsub2.used
469 ABS: this is absextroot.xsub1.xsub2.used
470 ABS: this is absextroot.xsub1.xsub2.called.func()
470 ABS: this is absextroot.xsub1.xsub2.called.func()
471
471
472 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative)
472 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative)
473 LIB: this is extlibroot.lsub1.lsub2.used
473 LIB: this is extlibroot.lsub1.lsub2.used
474 LIB: this is extlibroot.lsub1.lsub2.called.func()
474 LIB: this is extlibroot.lsub1.lsub2.called.func()
475 LIB: this is extlibroot.recursedown.abs.used
475 LIB: this is extlibroot.recursedown.abs.used
476 LIB: this is extlibroot.recursedown.legacy.used
476 LIB: this is extlibroot.recursedown.legacy.used
477 LIB: this is extlibroot.shadowing.used
477 LIB: this is extlibroot.shadowing.used
478 REL: this is absextroot.xsub1.xsub2.used
478 REL: this is absextroot.xsub1.xsub2.used
479 REL: this is absextroot.xsub1.xsub2.called.func()
479 REL: this is absextroot.xsub1.xsub2.called.func()
480 REL: this relimporter imports 'this is absextroot.relimportee'
480 REL: this relimporter imports 'this is absextroot.relimportee'
481
481
482 Examine whether sub-module is imported relatively as expected.
482 Examine whether sub-module is imported relatively as expected.
483
483
484 See also issue5208 for detail about example case on Python 3.x.
484 See also issue5208 for detail about example case on Python 3.x.
485
485
486 $ f -q $TESTTMP/extlibroot/lsub1/lsub2/notexist.py
486 $ f -q $TESTTMP/extlibroot/lsub1/lsub2/notexist.py
487 $TESTTMP/extlibroot/lsub1/lsub2/notexist.py: file not found
487 $TESTTMP/extlibroot/lsub1/lsub2/notexist.py: file not found
488
488
489 $ cat > $TESTTMP/notexist.py <<EOF
489 $ cat > $TESTTMP/notexist.py <<EOF
490 > text = 'notexist.py at root is loaded unintentionally\n'
490 > text = 'notexist.py at root is loaded unintentionally\n'
491 > EOF
491 > EOF
492
492
493 $ cat > $TESTTMP/checkrelativity.py <<EOF
493 $ cat > $TESTTMP/checkrelativity.py <<EOF
494 > from mercurial import registrar
494 > from mercurial import registrar
495 > cmdtable = {}
495 > cmdtable = {}
496 > command = registrar.command(cmdtable)
496 > command = registrar.command(cmdtable)
497 >
497 >
498 > # demand import avoids failure of importing notexist here
498 > # demand import avoids failure of importing notexist here
499 > import extlibroot.lsub1.lsub2.notexist
499 > import extlibroot.lsub1.lsub2.notexist
500 >
500 >
501 > @command(b'checkrelativity', [], norepo=True)
501 > @command(b'checkrelativity', [], norepo=True)
502 > def checkrelativity(ui, *args, **opts):
502 > def checkrelativity(ui, *args, **opts):
503 > try:
503 > try:
504 > ui.write(extlibroot.lsub1.lsub2.notexist.text)
504 > ui.write(extlibroot.lsub1.lsub2.notexist.text)
505 > return 1 # unintentional success
505 > return 1 # unintentional success
506 > except ImportError:
506 > except ImportError:
507 > pass # intentional failure
507 > pass # intentional failure
508 > EOF
508 > EOF
509
509
510 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity)
510 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity)
511
511
512 #endif
512 #endif
513
513
514 $ cd ..
514 $ cd ..
515
515
516 hide outer repo
516 hide outer repo
517 $ hg init
517 $ hg init
518
518
519 $ cat > empty.py <<EOF
519 $ cat > empty.py <<EOF
520 > '''empty cmdtable
520 > '''empty cmdtable
521 > '''
521 > '''
522 > cmdtable = {}
522 > cmdtable = {}
523 > EOF
523 > EOF
524 $ emptypath=`pwd`/empty.py
524 $ emptypath=`pwd`/empty.py
525 $ echo "empty = $emptypath" >> $HGRCPATH
525 $ echo "empty = $emptypath" >> $HGRCPATH
526 $ hg help empty
526 $ hg help empty
527 empty extension - empty cmdtable
527 empty extension - empty cmdtable
528
528
529 no commands defined
529 no commands defined
530
530
531
531
532 $ echo 'empty = !' >> $HGRCPATH
532 $ echo 'empty = !' >> $HGRCPATH
533
533
534 $ cat > debugextension.py <<EOF
534 $ cat > debugextension.py <<EOF
535 > '''only debugcommands
535 > '''only debugcommands
536 > '''
536 > '''
537 > from mercurial import registrar
537 > from mercurial import registrar
538 > cmdtable = {}
538 > cmdtable = {}
539 > command = registrar.command(cmdtable)
539 > command = registrar.command(cmdtable)
540 > @command(b'debugfoobar', [], 'hg debugfoobar')
540 > @command(b'debugfoobar', [], 'hg debugfoobar')
541 > def debugfoobar(ui, repo, *args, **opts):
541 > def debugfoobar(ui, repo, *args, **opts):
542 > "yet another debug command"
542 > "yet another debug command"
543 > pass
543 > pass
544 > @command(b'foo', [], 'hg foo')
544 > @command(b'foo', [], 'hg foo')
545 > def foo(ui, repo, *args, **opts):
545 > def foo(ui, repo, *args, **opts):
546 > """yet another foo command
546 > """yet another foo command
547 > This command has been DEPRECATED since forever.
547 > This command has been DEPRECATED since forever.
548 > """
548 > """
549 > pass
549 > pass
550 > EOF
550 > EOF
551 $ debugpath=`pwd`/debugextension.py
551 $ debugpath=`pwd`/debugextension.py
552 $ echo "debugextension = $debugpath" >> $HGRCPATH
552 $ echo "debugextension = $debugpath" >> $HGRCPATH
553
553
554 $ hg help debugextension
554 $ hg help debugextension
555 hg debugextensions
555 hg debugextensions
556
556
557 show information about active extensions
557 show information about active extensions
558
558
559 options:
559 options:
560
560
561 (some details hidden, use --verbose to show complete help)
561 (some details hidden, use --verbose to show complete help)
562
562
563
563
564 $ hg --verbose help debugextension
564 $ hg --verbose help debugextension
565 hg debugextensions
565 hg debugextensions
566
566
567 show information about active extensions
567 show information about active extensions
568
568
569 options:
569 options:
570
570
571 -T --template TEMPLATE display with template (EXPERIMENTAL)
571 -T --template TEMPLATE display with template (EXPERIMENTAL)
572
572
573 global options ([+] can be repeated):
573 global options ([+] can be repeated):
574
574
575 -R --repository REPO repository root directory or name of overlay bundle
575 -R --repository REPO repository root directory or name of overlay bundle
576 file
576 file
577 --cwd DIR change working directory
577 --cwd DIR change working directory
578 -y --noninteractive do not prompt, automatically pick the first choice for
578 -y --noninteractive do not prompt, automatically pick the first choice for
579 all prompts
579 all prompts
580 -q --quiet suppress output
580 -q --quiet suppress output
581 -v --verbose enable additional output
581 -v --verbose enable additional output
582 --color TYPE when to colorize (boolean, always, auto, never, or
582 --color TYPE when to colorize (boolean, always, auto, never, or
583 debug)
583 debug)
584 --config CONFIG [+] set/override config option (use 'section.name=value')
584 --config CONFIG [+] set/override config option (use 'section.name=value')
585 --debug enable debugging output
585 --debug enable debugging output
586 --debugger start debugger
586 --debugger start debugger
587 --encoding ENCODE set the charset encoding (default: ascii)
587 --encoding ENCODE set the charset encoding (default: ascii)
588 --encodingmode MODE set the charset encoding mode (default: strict)
588 --encodingmode MODE set the charset encoding mode (default: strict)
589 --traceback always print a traceback on exception
589 --traceback always print a traceback on exception
590 --time time how long the command takes
590 --time time how long the command takes
591 --profile print command execution profile
591 --profile print command execution profile
592 --version output version information and exit
592 --version output version information and exit
593 -h --help display help and exit
593 -h --help display help and exit
594 --hidden consider hidden changesets
594 --hidden consider hidden changesets
595 --pager TYPE when to paginate (boolean, always, auto, or never)
595 --pager TYPE when to paginate (boolean, always, auto, or never)
596 (default: auto)
596 (default: auto)
597
597
598
598
599
599
600
600
601
601
602
602
603 $ hg --debug help debugextension
603 $ hg --debug help debugextension
604 hg debugextensions
604 hg debugextensions
605
605
606 show information about active extensions
606 show information about active extensions
607
607
608 options:
608 options:
609
609
610 -T --template TEMPLATE display with template (EXPERIMENTAL)
610 -T --template TEMPLATE display with template (EXPERIMENTAL)
611
611
612 global options ([+] can be repeated):
612 global options ([+] can be repeated):
613
613
614 -R --repository REPO repository root directory or name of overlay bundle
614 -R --repository REPO repository root directory or name of overlay bundle
615 file
615 file
616 --cwd DIR change working directory
616 --cwd DIR change working directory
617 -y --noninteractive do not prompt, automatically pick the first choice for
617 -y --noninteractive do not prompt, automatically pick the first choice for
618 all prompts
618 all prompts
619 -q --quiet suppress output
619 -q --quiet suppress output
620 -v --verbose enable additional output
620 -v --verbose enable additional output
621 --color TYPE when to colorize (boolean, always, auto, never, or
621 --color TYPE when to colorize (boolean, always, auto, never, or
622 debug)
622 debug)
623 --config CONFIG [+] set/override config option (use 'section.name=value')
623 --config CONFIG [+] set/override config option (use 'section.name=value')
624 --debug enable debugging output
624 --debug enable debugging output
625 --debugger start debugger
625 --debugger start debugger
626 --encoding ENCODE set the charset encoding (default: ascii)
626 --encoding ENCODE set the charset encoding (default: ascii)
627 --encodingmode MODE set the charset encoding mode (default: strict)
627 --encodingmode MODE set the charset encoding mode (default: strict)
628 --traceback always print a traceback on exception
628 --traceback always print a traceback on exception
629 --time time how long the command takes
629 --time time how long the command takes
630 --profile print command execution profile
630 --profile print command execution profile
631 --version output version information and exit
631 --version output version information and exit
632 -h --help display help and exit
632 -h --help display help and exit
633 --hidden consider hidden changesets
633 --hidden consider hidden changesets
634 --pager TYPE when to paginate (boolean, always, auto, or never)
634 --pager TYPE when to paginate (boolean, always, auto, or never)
635 (default: auto)
635 (default: auto)
636
636
637
637
638
638
639
639
640
640
641 $ echo 'debugextension = !' >> $HGRCPATH
641 $ echo 'debugextension = !' >> $HGRCPATH
642
642
643 Asking for help about a deprecated extension should do something useful:
643 Asking for help about a deprecated extension should do something useful:
644
644
645 $ hg help glog
645 $ hg help glog
646 'glog' is provided by the following extension:
646 'glog' is provided by the following extension:
647
647
648 graphlog command to view revision graphs from a shell (DEPRECATED)
648 graphlog command to view revision graphs from a shell (DEPRECATED)
649
649
650 (use 'hg help extensions' for information on enabling extensions)
650 (use 'hg help extensions' for information on enabling extensions)
651
651
652 Extension module help vs command help:
652 Extension module help vs command help:
653
653
654 $ echo 'extdiff =' >> $HGRCPATH
654 $ echo 'extdiff =' >> $HGRCPATH
655 $ hg help extdiff
655 $ hg help extdiff
656 hg extdiff [OPT]... [FILE]...
656 hg extdiff [OPT]... [FILE]...
657
657
658 use external program to diff repository (or selected files)
658 use external program to diff repository (or selected files)
659
659
660 Show differences between revisions for the specified files, using an
660 Show differences between revisions for the specified files, using an
661 external program. The default program used is diff, with default options
661 external program. The default program used is diff, with default options
662 "-Npru".
662 "-Npru".
663
663
664 To select a different program, use the -p/--program option. The program
664 To select a different program, use the -p/--program option. The program
665 will be passed the names of two directories to compare. To pass additional
665 will be passed the names of two directories to compare. To pass additional
666 options to the program, use -o/--option. These will be passed before the
666 options to the program, use -o/--option. These will be passed before the
667 names of the directories to compare.
667 names of the directories to compare.
668
668
669 When two revision arguments are given, then changes are shown between
669 When two revision arguments are given, then changes are shown between
670 those revisions. If only one revision is specified then that revision is
670 those revisions. If only one revision is specified then that revision is
671 compared to the working directory, and, when no revisions are specified,
671 compared to the working directory, and, when no revisions are specified,
672 the working directory files are compared to its parent.
672 the working directory files are compared to its parent.
673
673
674 (use 'hg help -e extdiff' to show help for the extdiff extension)
674 (use 'hg help -e extdiff' to show help for the extdiff extension)
675
675
676 options ([+] can be repeated):
676 options ([+] can be repeated):
677
677
678 -p --program CMD comparison program to run
678 -p --program CMD comparison program to run
679 -o --option OPT [+] pass option to comparison program
679 -o --option OPT [+] pass option to comparison program
680 -r --rev REV [+] revision
680 -r --rev REV [+] revision
681 -c --change REV change made by revision
681 -c --change REV change made by revision
682 --patch compare patches for two revisions
682 --patch compare patches for two revisions
683 -I --include PATTERN [+] include names matching the given patterns
683 -I --include PATTERN [+] include names matching the given patterns
684 -X --exclude PATTERN [+] exclude names matching the given patterns
684 -X --exclude PATTERN [+] exclude names matching the given patterns
685 -S --subrepos recurse into subrepositories
685 -S --subrepos recurse into subrepositories
686
686
687 (some details hidden, use --verbose to show complete help)
687 (some details hidden, use --verbose to show complete help)
688
688
689
689
690
690
691
691
692
692
693
693
694
694
695
695
696
696
697
697
698 $ hg help --extension extdiff
698 $ hg help --extension extdiff
699 extdiff extension - command to allow external programs to compare revisions
699 extdiff extension - command to allow external programs to compare revisions
700
700
701 The extdiff Mercurial extension allows you to use external programs to compare
701 The extdiff Mercurial extension allows you to use external programs to compare
702 revisions, or revision with working directory. The external diff programs are
702 revisions, or revision with working directory. The external diff programs are
703 called with a configurable set of options and two non-option arguments: paths
703 called with a configurable set of options and two non-option arguments: paths
704 to directories containing snapshots of files to compare.
704 to directories containing snapshots of files to compare.
705
705
706 The extdiff extension also allows you to configure new diff commands, so you
706 The extdiff extension also allows you to configure new diff commands, so you
707 do not need to type 'hg extdiff -p kdiff3' always.
707 do not need to type 'hg extdiff -p kdiff3' always.
708
708
709 [extdiff]
709 [extdiff]
710 # add new command that runs GNU diff(1) in 'context diff' mode
710 # add new command that runs GNU diff(1) in 'context diff' mode
711 cdiff = gdiff -Nprc5
711 cdiff = gdiff -Nprc5
712 ## or the old way:
712 ## or the old way:
713 #cmd.cdiff = gdiff
713 #cmd.cdiff = gdiff
714 #opts.cdiff = -Nprc5
714 #opts.cdiff = -Nprc5
715
715
716 # add new command called meld, runs meld (no need to name twice). If
716 # add new command called meld, runs meld (no need to name twice). If
717 # the meld executable is not available, the meld tool in [merge-tools]
717 # the meld executable is not available, the meld tool in [merge-tools]
718 # will be used, if available
718 # will be used, if available
719 meld =
719 meld =
720
720
721 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
721 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
722 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
722 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
723 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
723 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
724 # your .vimrc
724 # your .vimrc
725 vimdiff = gvim -f "+next" \
725 vimdiff = gvim -f "+next" \
726 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
726 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
727
727
728 Tool arguments can include variables that are expanded at runtime:
728 Tool arguments can include variables that are expanded at runtime:
729
729
730 $parent1, $plabel1 - filename, descriptive label of first parent
730 $parent1, $plabel1 - filename, descriptive label of first parent
731 $child, $clabel - filename, descriptive label of child revision
731 $child, $clabel - filename, descriptive label of child revision
732 $parent2, $plabel2 - filename, descriptive label of second parent
732 $parent2, $plabel2 - filename, descriptive label of second parent
733 $root - repository root
733 $root - repository root
734 $parent is an alias for $parent1.
734 $parent is an alias for $parent1.
735
735
736 The extdiff extension will look in your [diff-tools] and [merge-tools]
736 The extdiff extension will look in your [diff-tools] and [merge-tools]
737 sections for diff tool arguments, when none are specified in [extdiff].
737 sections for diff tool arguments, when none are specified in [extdiff].
738
738
739 [extdiff]
739 [extdiff]
740 kdiff3 =
740 kdiff3 =
741
741
742 [diff-tools]
742 [diff-tools]
743 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
743 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
744
744
745 You can use -I/-X and list of file or directory names like normal 'hg diff'
745 You can use -I/-X and list of file or directory names like normal 'hg diff'
746 command. The extdiff extension makes snapshots of only needed files, so
746 command. The extdiff extension makes snapshots of only needed files, so
747 running the external diff program will actually be pretty fast (at least
747 running the external diff program will actually be pretty fast (at least
748 faster than having to compare the entire tree).
748 faster than having to compare the entire tree).
749
749
750 list of commands:
750 list of commands:
751
751
752 extdiff use external program to diff repository (or selected files)
752 extdiff use external program to diff repository (or selected files)
753
753
754 (use 'hg help -v -e extdiff' to show built-in aliases and global options)
754 (use 'hg help -v -e extdiff' to show built-in aliases and global options)
755
755
756
756
757
757
758
758
759
759
760
760
761
761
762
762
763
763
764
764
765
765
766
766
767
767
768
768
769
769
770
770
771 $ echo 'extdiff = !' >> $HGRCPATH
771 $ echo 'extdiff = !' >> $HGRCPATH
772
772
773 Test help topic with same name as extension
773 Test help topic with same name as extension
774
774
775 $ cat > multirevs.py <<EOF
775 $ cat > multirevs.py <<EOF
776 > from mercurial import commands, registrar
776 > from mercurial import commands, registrar
777 > cmdtable = {}
777 > cmdtable = {}
778 > command = registrar.command(cmdtable)
778 > command = registrar.command(cmdtable)
779 > """multirevs extension
779 > """multirevs extension
780 > Big multi-line module docstring."""
780 > Big multi-line module docstring."""
781 > @command(b'multirevs', [], 'ARG', norepo=True)
781 > @command(b'multirevs', [], 'ARG', norepo=True)
782 > def multirevs(ui, repo, arg, *args, **opts):
782 > def multirevs(ui, repo, arg, *args, **opts):
783 > """multirevs command"""
783 > """multirevs command"""
784 > pass
784 > pass
785 > EOF
785 > EOF
786 $ echo "multirevs = multirevs.py" >> $HGRCPATH
786 $ echo "multirevs = multirevs.py" >> $HGRCPATH
787
787
788 $ hg help multirevs | tail
788 $ hg help multirevs | tail
789 bookmark (this works because the last revision of the revset is used):
789 bookmark (this works because the last revision of the revset is used):
790
790
791 hg update :@
791 hg update :@
792
792
793 - Show diff between tags 1.3 and 1.5 (this works because the first and the
793 - Show diff between tags 1.3 and 1.5 (this works because the first and the
794 last revisions of the revset are used):
794 last revisions of the revset are used):
795
795
796 hg diff -r 1.3::1.5
796 hg diff -r 1.3::1.5
797
797
798 use 'hg help -c multirevs' to see help for the multirevs command
798 use 'hg help -c multirevs' to see help for the multirevs command
799
799
800
800
801
801
802
802
803
803
804
804
805 $ hg help -c multirevs
805 $ hg help -c multirevs
806 hg multirevs ARG
806 hg multirevs ARG
807
807
808 multirevs command
808 multirevs command
809
809
810 (some details hidden, use --verbose to show complete help)
810 (some details hidden, use --verbose to show complete help)
811
811
812
812
813
813
814 $ hg multirevs
814 $ hg multirevs
815 hg multirevs: invalid arguments
815 hg multirevs: invalid arguments
816 hg multirevs ARG
816 hg multirevs ARG
817
817
818 multirevs command
818 multirevs command
819
819
820 (use 'hg multirevs -h' to show more help)
820 (use 'hg multirevs -h' to show more help)
821 [255]
821 [255]
822
822
823
823
824
824
825 $ echo "multirevs = !" >> $HGRCPATH
825 $ echo "multirevs = !" >> $HGRCPATH
826
826
827 Issue811: Problem loading extensions twice (by site and by user)
827 Issue811: Problem loading extensions twice (by site and by user)
828
828
829 $ cat <<EOF >> $HGRCPATH
829 $ cat <<EOF >> $HGRCPATH
830 > mq =
830 > mq =
831 > strip =
831 > strip =
832 > hgext.mq =
832 > hgext.mq =
833 > hgext/mq =
833 > hgext/mq =
834 > EOF
834 > EOF
835
835
836 Show extensions:
836 Show extensions:
837 (note that mq force load strip, also checking it's not loaded twice)
837 (note that mq force load strip, also checking it's not loaded twice)
838
838
839 $ hg debugextensions
839 $ hg debugextensions
840 mq
840 mq
841 strip
841 strip
842
842
843 For extensions, which name matches one of its commands, help
843 For extensions, which name matches one of its commands, help
844 message should ask '-v -e' to get list of built-in aliases
844 message should ask '-v -e' to get list of built-in aliases
845 along with extension help itself
845 along with extension help itself
846
846
847 $ mkdir $TESTTMP/d
847 $ mkdir $TESTTMP/d
848 $ cat > $TESTTMP/d/dodo.py <<EOF
848 $ cat > $TESTTMP/d/dodo.py <<EOF
849 > """
849 > """
850 > This is an awesome 'dodo' extension. It does nothing and
850 > This is an awesome 'dodo' extension. It does nothing and
851 > writes 'Foo foo'
851 > writes 'Foo foo'
852 > """
852 > """
853 > from mercurial import commands, registrar
853 > from mercurial import commands, registrar
854 > cmdtable = {}
854 > cmdtable = {}
855 > command = registrar.command(cmdtable)
855 > command = registrar.command(cmdtable)
856 > @command(b'dodo', [], 'hg dodo')
856 > @command(b'dodo', [], 'hg dodo')
857 > def dodo(ui, *args, **kwargs):
857 > def dodo(ui, *args, **kwargs):
858 > """Does nothing"""
858 > """Does nothing"""
859 > ui.write("I do nothing. Yay\\n")
859 > ui.write("I do nothing. Yay\\n")
860 > @command(b'foofoo', [], 'hg foofoo')
860 > @command(b'foofoo', [], 'hg foofoo')
861 > def foofoo(ui, *args, **kwargs):
861 > def foofoo(ui, *args, **kwargs):
862 > """Writes 'Foo foo'"""
862 > """Writes 'Foo foo'"""
863 > ui.write("Foo foo\\n")
863 > ui.write("Foo foo\\n")
864 > EOF
864 > EOF
865 $ dodopath=$TESTTMP/d/dodo.py
865 $ dodopath=$TESTTMP/d/dodo.py
866
866
867 $ echo "dodo = $dodopath" >> $HGRCPATH
867 $ echo "dodo = $dodopath" >> $HGRCPATH
868
868
869 Make sure that user is asked to enter '-v -e' to get list of built-in aliases
869 Make sure that user is asked to enter '-v -e' to get list of built-in aliases
870 $ hg help -e dodo
870 $ hg help -e dodo
871 dodo extension -
871 dodo extension -
872
872
873 This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo'
873 This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo'
874
874
875 list of commands:
875 list of commands:
876
876
877 dodo Does nothing
877 dodo Does nothing
878 foofoo Writes 'Foo foo'
878 foofoo Writes 'Foo foo'
879
879
880 (use 'hg help -v -e dodo' to show built-in aliases and global options)
880 (use 'hg help -v -e dodo' to show built-in aliases and global options)
881
881
882 Make sure that '-v -e' prints list of built-in aliases along with
882 Make sure that '-v -e' prints list of built-in aliases along with
883 extension help itself
883 extension help itself
884 $ hg help -v -e dodo
884 $ hg help -v -e dodo
885 dodo extension -
885 dodo extension -
886
886
887 This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo'
887 This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo'
888
888
889 list of commands:
889 list of commands:
890
890
891 dodo Does nothing
891 dodo Does nothing
892 foofoo Writes 'Foo foo'
892 foofoo Writes 'Foo foo'
893
893
894 global options ([+] can be repeated):
894 global options ([+] can be repeated):
895
895
896 -R --repository REPO repository root directory or name of overlay bundle
896 -R --repository REPO repository root directory or name of overlay bundle
897 file
897 file
898 --cwd DIR change working directory
898 --cwd DIR change working directory
899 -y --noninteractive do not prompt, automatically pick the first choice for
899 -y --noninteractive do not prompt, automatically pick the first choice for
900 all prompts
900 all prompts
901 -q --quiet suppress output
901 -q --quiet suppress output
902 -v --verbose enable additional output
902 -v --verbose enable additional output
903 --color TYPE when to colorize (boolean, always, auto, never, or
903 --color TYPE when to colorize (boolean, always, auto, never, or
904 debug)
904 debug)
905 --config CONFIG [+] set/override config option (use 'section.name=value')
905 --config CONFIG [+] set/override config option (use 'section.name=value')
906 --debug enable debugging output
906 --debug enable debugging output
907 --debugger start debugger
907 --debugger start debugger
908 --encoding ENCODE set the charset encoding (default: ascii)
908 --encoding ENCODE set the charset encoding (default: ascii)
909 --encodingmode MODE set the charset encoding mode (default: strict)
909 --encodingmode MODE set the charset encoding mode (default: strict)
910 --traceback always print a traceback on exception
910 --traceback always print a traceback on exception
911 --time time how long the command takes
911 --time time how long the command takes
912 --profile print command execution profile
912 --profile print command execution profile
913 --version output version information and exit
913 --version output version information and exit
914 -h --help display help and exit
914 -h --help display help and exit
915 --hidden consider hidden changesets
915 --hidden consider hidden changesets
916 --pager TYPE when to paginate (boolean, always, auto, or never)
916 --pager TYPE when to paginate (boolean, always, auto, or never)
917 (default: auto)
917 (default: auto)
918
918
919 Make sure that single '-v' option shows help and built-ins only for 'dodo' command
919 Make sure that single '-v' option shows help and built-ins only for 'dodo' command
920 $ hg help -v dodo
920 $ hg help -v dodo
921 hg dodo
921 hg dodo
922
922
923 Does nothing
923 Does nothing
924
924
925 (use 'hg help -e dodo' to show help for the dodo extension)
925 (use 'hg help -e dodo' to show help for the dodo extension)
926
926
927 options:
927 options:
928
928
929 --mq operate on patch repository
929 --mq operate on patch repository
930
930
931 global options ([+] can be repeated):
931 global options ([+] can be repeated):
932
932
933 -R --repository REPO repository root directory or name of overlay bundle
933 -R --repository REPO repository root directory or name of overlay bundle
934 file
934 file
935 --cwd DIR change working directory
935 --cwd DIR change working directory
936 -y --noninteractive do not prompt, automatically pick the first choice for
936 -y --noninteractive do not prompt, automatically pick the first choice for
937 all prompts
937 all prompts
938 -q --quiet suppress output
938 -q --quiet suppress output
939 -v --verbose enable additional output
939 -v --verbose enable additional output
940 --color TYPE when to colorize (boolean, always, auto, never, or
940 --color TYPE when to colorize (boolean, always, auto, never, or
941 debug)
941 debug)
942 --config CONFIG [+] set/override config option (use 'section.name=value')
942 --config CONFIG [+] set/override config option (use 'section.name=value')
943 --debug enable debugging output
943 --debug enable debugging output
944 --debugger start debugger
944 --debugger start debugger
945 --encoding ENCODE set the charset encoding (default: ascii)
945 --encoding ENCODE set the charset encoding (default: ascii)
946 --encodingmode MODE set the charset encoding mode (default: strict)
946 --encodingmode MODE set the charset encoding mode (default: strict)
947 --traceback always print a traceback on exception
947 --traceback always print a traceback on exception
948 --time time how long the command takes
948 --time time how long the command takes
949 --profile print command execution profile
949 --profile print command execution profile
950 --version output version information and exit
950 --version output version information and exit
951 -h --help display help and exit
951 -h --help display help and exit
952 --hidden consider hidden changesets
952 --hidden consider hidden changesets
953 --pager TYPE when to paginate (boolean, always, auto, or never)
953 --pager TYPE when to paginate (boolean, always, auto, or never)
954 (default: auto)
954 (default: auto)
955
955
956 In case when extension name doesn't match any of its commands,
956 In case when extension name doesn't match any of its commands,
957 help message should ask for '-v' to get list of built-in aliases
957 help message should ask for '-v' to get list of built-in aliases
958 along with extension help
958 along with extension help
959 $ cat > $TESTTMP/d/dudu.py <<EOF
959 $ cat > $TESTTMP/d/dudu.py <<EOF
960 > """
960 > """
961 > This is an awesome 'dudu' extension. It does something and
961 > This is an awesome 'dudu' extension. It does something and
962 > also writes 'Beep beep'
962 > also writes 'Beep beep'
963 > """
963 > """
964 > from mercurial import commands, registrar
964 > from mercurial import commands, registrar
965 > cmdtable = {}
965 > cmdtable = {}
966 > command = registrar.command(cmdtable)
966 > command = registrar.command(cmdtable)
967 > @command(b'something', [], 'hg something')
967 > @command(b'something', [], 'hg something')
968 > def something(ui, *args, **kwargs):
968 > def something(ui, *args, **kwargs):
969 > """Does something"""
969 > """Does something"""
970 > ui.write("I do something. Yaaay\\n")
970 > ui.write("I do something. Yaaay\\n")
971 > @command(b'beep', [], 'hg beep')
971 > @command(b'beep', [], 'hg beep')
972 > def beep(ui, *args, **kwargs):
972 > def beep(ui, *args, **kwargs):
973 > """Writes 'Beep beep'"""
973 > """Writes 'Beep beep'"""
974 > ui.write("Beep beep\\n")
974 > ui.write("Beep beep\\n")
975 > EOF
975 > EOF
976 $ dudupath=$TESTTMP/d/dudu.py
976 $ dudupath=$TESTTMP/d/dudu.py
977
977
978 $ echo "dudu = $dudupath" >> $HGRCPATH
978 $ echo "dudu = $dudupath" >> $HGRCPATH
979
979
980 $ hg help -e dudu
980 $ hg help -e dudu
981 dudu extension -
981 dudu extension -
982
982
983 This is an awesome 'dudu' extension. It does something and also writes 'Beep
983 This is an awesome 'dudu' extension. It does something and also writes 'Beep
984 beep'
984 beep'
985
985
986 list of commands:
986 list of commands:
987
987
988 beep Writes 'Beep beep'
988 beep Writes 'Beep beep'
989 something Does something
989 something Does something
990
990
991 (use 'hg help -v dudu' to show built-in aliases and global options)
991 (use 'hg help -v dudu' to show built-in aliases and global options)
992
992
993 In case when extension name doesn't match any of its commands,
993 In case when extension name doesn't match any of its commands,
994 help options '-v' and '-v -e' should be equivalent
994 help options '-v' and '-v -e' should be equivalent
995 $ hg help -v dudu
995 $ hg help -v dudu
996 dudu extension -
996 dudu extension -
997
997
998 This is an awesome 'dudu' extension. It does something and also writes 'Beep
998 This is an awesome 'dudu' extension. It does something and also writes 'Beep
999 beep'
999 beep'
1000
1000
1001 list of commands:
1001 list of commands:
1002
1002
1003 beep Writes 'Beep beep'
1003 beep Writes 'Beep beep'
1004 something Does something
1004 something Does something
1005
1005
1006 global options ([+] can be repeated):
1006 global options ([+] can be repeated):
1007
1007
1008 -R --repository REPO repository root directory or name of overlay bundle
1008 -R --repository REPO repository root directory or name of overlay bundle
1009 file
1009 file
1010 --cwd DIR change working directory
1010 --cwd DIR change working directory
1011 -y --noninteractive do not prompt, automatically pick the first choice for
1011 -y --noninteractive do not prompt, automatically pick the first choice for
1012 all prompts
1012 all prompts
1013 -q --quiet suppress output
1013 -q --quiet suppress output
1014 -v --verbose enable additional output
1014 -v --verbose enable additional output
1015 --color TYPE when to colorize (boolean, always, auto, never, or
1015 --color TYPE when to colorize (boolean, always, auto, never, or
1016 debug)
1016 debug)
1017 --config CONFIG [+] set/override config option (use 'section.name=value')
1017 --config CONFIG [+] set/override config option (use 'section.name=value')
1018 --debug enable debugging output
1018 --debug enable debugging output
1019 --debugger start debugger
1019 --debugger start debugger
1020 --encoding ENCODE set the charset encoding (default: ascii)
1020 --encoding ENCODE set the charset encoding (default: ascii)
1021 --encodingmode MODE set the charset encoding mode (default: strict)
1021 --encodingmode MODE set the charset encoding mode (default: strict)
1022 --traceback always print a traceback on exception
1022 --traceback always print a traceback on exception
1023 --time time how long the command takes
1023 --time time how long the command takes
1024 --profile print command execution profile
1024 --profile print command execution profile
1025 --version output version information and exit
1025 --version output version information and exit
1026 -h --help display help and exit
1026 -h --help display help and exit
1027 --hidden consider hidden changesets
1027 --hidden consider hidden changesets
1028 --pager TYPE when to paginate (boolean, always, auto, or never)
1028 --pager TYPE when to paginate (boolean, always, auto, or never)
1029 (default: auto)
1029 (default: auto)
1030
1030
1031 $ hg help -v -e dudu
1031 $ hg help -v -e dudu
1032 dudu extension -
1032 dudu extension -
1033
1033
1034 This is an awesome 'dudu' extension. It does something and also writes 'Beep
1034 This is an awesome 'dudu' extension. It does something and also writes 'Beep
1035 beep'
1035 beep'
1036
1036
1037 list of commands:
1037 list of commands:
1038
1038
1039 beep Writes 'Beep beep'
1039 beep Writes 'Beep beep'
1040 something Does something
1040 something Does something
1041
1041
1042 global options ([+] can be repeated):
1042 global options ([+] can be repeated):
1043
1043
1044 -R --repository REPO repository root directory or name of overlay bundle
1044 -R --repository REPO repository root directory or name of overlay bundle
1045 file
1045 file
1046 --cwd DIR change working directory
1046 --cwd DIR change working directory
1047 -y --noninteractive do not prompt, automatically pick the first choice for
1047 -y --noninteractive do not prompt, automatically pick the first choice for
1048 all prompts
1048 all prompts
1049 -q --quiet suppress output
1049 -q --quiet suppress output
1050 -v --verbose enable additional output
1050 -v --verbose enable additional output
1051 --color TYPE when to colorize (boolean, always, auto, never, or
1051 --color TYPE when to colorize (boolean, always, auto, never, or
1052 debug)
1052 debug)
1053 --config CONFIG [+] set/override config option (use 'section.name=value')
1053 --config CONFIG [+] set/override config option (use 'section.name=value')
1054 --debug enable debugging output
1054 --debug enable debugging output
1055 --debugger start debugger
1055 --debugger start debugger
1056 --encoding ENCODE set the charset encoding (default: ascii)
1056 --encoding ENCODE set the charset encoding (default: ascii)
1057 --encodingmode MODE set the charset encoding mode (default: strict)
1057 --encodingmode MODE set the charset encoding mode (default: strict)
1058 --traceback always print a traceback on exception
1058 --traceback always print a traceback on exception
1059 --time time how long the command takes
1059 --time time how long the command takes
1060 --profile print command execution profile
1060 --profile print command execution profile
1061 --version output version information and exit
1061 --version output version information and exit
1062 -h --help display help and exit
1062 -h --help display help and exit
1063 --hidden consider hidden changesets
1063 --hidden consider hidden changesets
1064 --pager TYPE when to paginate (boolean, always, auto, or never)
1064 --pager TYPE when to paginate (boolean, always, auto, or never)
1065 (default: auto)
1065 (default: auto)
1066
1066
1067 Disabled extension commands:
1067 Disabled extension commands:
1068
1068
1069 $ ORGHGRCPATH=$HGRCPATH
1069 $ ORGHGRCPATH=$HGRCPATH
1070 $ HGRCPATH=
1070 $ HGRCPATH=
1071 $ export HGRCPATH
1071 $ export HGRCPATH
1072 $ hg help email
1072 $ hg help email
1073 'email' is provided by the following extension:
1073 'email' is provided by the following extension:
1074
1074
1075 patchbomb command to send changesets as (a series of) patch emails
1075 patchbomb command to send changesets as (a series of) patch emails
1076
1076
1077 (use 'hg help extensions' for information on enabling extensions)
1077 (use 'hg help extensions' for information on enabling extensions)
1078
1078
1079
1079
1080 $ hg qdel
1080 $ hg qdel
1081 hg: unknown command 'qdel'
1081 hg: unknown command 'qdel'
1082 'qdelete' is provided by the following extension:
1082 'qdelete' is provided by the following extension:
1083
1083
1084 mq manage a stack of patches
1084 mq manage a stack of patches
1085
1085
1086 (use 'hg help extensions' for information on enabling extensions)
1086 (use 'hg help extensions' for information on enabling extensions)
1087 [255]
1087 [255]
1088
1088
1089
1089
1090 $ hg churn
1090 $ hg churn
1091 hg: unknown command 'churn'
1091 hg: unknown command 'churn'
1092 'churn' is provided by the following extension:
1092 'churn' is provided by the following extension:
1093
1093
1094 churn command to display statistics about repository history
1094 churn command to display statistics about repository history
1095
1095
1096 (use 'hg help extensions' for information on enabling extensions)
1096 (use 'hg help extensions' for information on enabling extensions)
1097 [255]
1097 [255]
1098
1098
1099
1099
1100
1100
1101 Disabled extensions:
1101 Disabled extensions:
1102
1102
1103 $ hg help churn
1103 $ hg help churn
1104 churn extension - command to display statistics about repository history
1104 churn extension - command to display statistics about repository history
1105
1105
1106 (use 'hg help extensions' for information on enabling extensions)
1106 (use 'hg help extensions' for information on enabling extensions)
1107
1107
1108 $ hg help patchbomb
1108 $ hg help patchbomb
1109 patchbomb extension - command to send changesets as (a series of) patch emails
1109 patchbomb extension - command to send changesets as (a series of) patch emails
1110
1110
1111 The series is started off with a "[PATCH 0 of N]" introduction, which
1111 The series is started off with a "[PATCH 0 of N]" introduction, which
1112 describes the series as a whole.
1112 describes the series as a whole.
1113
1113
1114 Each patch email has a Subject line of "[PATCH M of N] ...", using the first
1114 Each patch email has a Subject line of "[PATCH M of N] ...", using the first
1115 line of the changeset description as the subject text. The message contains
1115 line of the changeset description as the subject text. The message contains
1116 two or three body parts:
1116 two or three body parts:
1117
1117
1118 - The changeset description.
1118 - The changeset description.
1119 - [Optional] The result of running diffstat on the patch.
1119 - [Optional] The result of running diffstat on the patch.
1120 - The patch itself, as generated by 'hg export'.
1120 - The patch itself, as generated by 'hg export'.
1121
1121
1122 Each message refers to the first in the series using the In-Reply-To and
1122 Each message refers to the first in the series using the In-Reply-To and
1123 References headers, so they will show up as a sequence in threaded mail and
1123 References headers, so they will show up as a sequence in threaded mail and
1124 news readers, and in mail archives.
1124 news readers, and in mail archives.
1125
1125
1126 To configure other defaults, add a section like this to your configuration
1126 To configure other defaults, add a section like this to your configuration
1127 file:
1127 file:
1128
1128
1129 [email]
1129 [email]
1130 from = My Name <my@email>
1130 from = My Name <my@email>
1131 to = recipient1, recipient2, ...
1131 to = recipient1, recipient2, ...
1132 cc = cc1, cc2, ...
1132 cc = cc1, cc2, ...
1133 bcc = bcc1, bcc2, ...
1133 bcc = bcc1, bcc2, ...
1134 reply-to = address1, address2, ...
1134 reply-to = address1, address2, ...
1135
1135
1136 Use "[patchbomb]" as configuration section name if you need to override global
1136 Use "[patchbomb]" as configuration section name if you need to override global
1137 "[email]" address settings.
1137 "[email]" address settings.
1138
1138
1139 Then you can use the 'hg email' command to mail a series of changesets as a
1139 Then you can use the 'hg email' command to mail a series of changesets as a
1140 patchbomb.
1140 patchbomb.
1141
1141
1142 You can also either configure the method option in the email section to be a
1142 You can also either configure the method option in the email section to be a
1143 sendmail compatible mailer or fill out the [smtp] section so that the
1143 sendmail compatible mailer or fill out the [smtp] section so that the
1144 patchbomb extension can automatically send patchbombs directly from the
1144 patchbomb extension can automatically send patchbombs directly from the
1145 commandline. See the [email] and [smtp] sections in hgrc(5) for details.
1145 commandline. See the [email] and [smtp] sections in hgrc(5) for details.
1146
1146
1147 By default, 'hg email' will prompt for a "To" or "CC" header if you do not
1147 By default, 'hg email' will prompt for a "To" or "CC" header if you do not
1148 supply one via configuration or the command line. You can override this to
1148 supply one via configuration or the command line. You can override this to
1149 never prompt by configuring an empty value:
1149 never prompt by configuring an empty value:
1150
1150
1151 [email]
1151 [email]
1152 cc =
1152 cc =
1153
1153
1154 You can control the default inclusion of an introduction message with the
1154 You can control the default inclusion of an introduction message with the
1155 "patchbomb.intro" configuration option. The configuration is always
1155 "patchbomb.intro" configuration option. The configuration is always
1156 overwritten by command line flags like --intro and --desc:
1156 overwritten by command line flags like --intro and --desc:
1157
1157
1158 [patchbomb]
1158 [patchbomb]
1159 intro=auto # include introduction message if more than 1 patch (default)
1159 intro=auto # include introduction message if more than 1 patch (default)
1160 intro=never # never include an introduction message
1160 intro=never # never include an introduction message
1161 intro=always # always include an introduction message
1161 intro=always # always include an introduction message
1162
1162
1163 You can specify a template for flags to be added in subject prefixes. Flags
1163 You can specify a template for flags to be added in subject prefixes. Flags
1164 specified by --flag option are exported as "{flags}" keyword:
1164 specified by --flag option are exported as "{flags}" keyword:
1165
1165
1166 [patchbomb]
1166 [patchbomb]
1167 flagtemplate = "{separate(' ',
1167 flagtemplate = "{separate(' ',
1168 ifeq(branch, 'default', '', branch|upper),
1168 ifeq(branch, 'default', '', branch|upper),
1169 flags)}"
1169 flags)}"
1170
1170
1171 You can set patchbomb to always ask for confirmation by setting
1171 You can set patchbomb to always ask for confirmation by setting
1172 "patchbomb.confirm" to true.
1172 "patchbomb.confirm" to true.
1173
1173
1174 (use 'hg help extensions' for information on enabling extensions)
1174 (use 'hg help extensions' for information on enabling extensions)
1175
1175
1176
1176
1177 Broken disabled extension and command:
1177 Broken disabled extension and command:
1178
1178
1179 $ mkdir hgext
1179 $ mkdir hgext
1180 $ echo > hgext/__init__.py
1180 $ echo > hgext/__init__.py
1181 $ cat > hgext/broken.py <<EOF
1181 $ cat > hgext/broken.py <<EOF
1182 > "broken extension'
1182 > "broken extension'
1183 > EOF
1183 > EOF
1184 $ cat > path.py <<EOF
1184 $ cat > path.py <<EOF
1185 > import os, sys
1185 > import os, sys
1186 > sys.path.insert(0, os.environ['HGEXTPATH'])
1186 > sys.path.insert(0, os.environ['HGEXTPATH'])
1187 > EOF
1187 > EOF
1188 $ HGEXTPATH=`pwd`
1188 $ HGEXTPATH=`pwd`
1189 $ export HGEXTPATH
1189 $ export HGEXTPATH
1190
1190
1191 $ hg --config extensions.path=./path.py help broken
1191 $ hg --config extensions.path=./path.py help broken
1192 broken extension - (no help text available)
1192 broken extension - (no help text available)
1193
1193
1194 (use 'hg help extensions' for information on enabling extensions)
1194 (use 'hg help extensions' for information on enabling extensions)
1195
1195
1196
1196
1197 $ cat > hgext/forest.py <<EOF
1197 $ cat > hgext/forest.py <<EOF
1198 > cmdtable = None
1198 > cmdtable = None
1199 > EOF
1199 > EOF
1200 $ hg --config extensions.path=./path.py help foo > /dev/null
1200 $ hg --config extensions.path=./path.py help foo > /dev/null
1201 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
1201 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
1202 abort: no such help topic: foo
1202 abort: no such help topic: foo
1203 (try 'hg help --keyword foo')
1203 (try 'hg help --keyword foo')
1204 [255]
1204 [255]
1205
1205
1206 $ cat > throw.py <<EOF
1206 $ cat > throw.py <<EOF
1207 > from mercurial import commands, registrar, util
1207 > from mercurial import commands, registrar, util
1208 > cmdtable = {}
1208 > cmdtable = {}
1209 > command = registrar.command(cmdtable)
1209 > command = registrar.command(cmdtable)
1210 > class Bogon(Exception): pass
1210 > class Bogon(Exception): pass
1211 > @command(b'throw', [], 'hg throw', norepo=True)
1211 > @command(b'throw', [], 'hg throw', norepo=True)
1212 > def throw(ui, **opts):
1212 > def throw(ui, **opts):
1213 > """throws an exception"""
1213 > """throws an exception"""
1214 > raise Bogon()
1214 > raise Bogon()
1215 > EOF
1215 > EOF
1216
1216
1217 No declared supported version, extension complains:
1217 No declared supported version, extension complains:
1218 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1218 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1219 ** Unknown exception encountered with possibly-broken third-party extension throw
1219 ** Unknown exception encountered with possibly-broken third-party extension throw
1220 ** which supports versions unknown of Mercurial.
1220 ** which supports versions unknown of Mercurial.
1221 ** Please disable throw and try your action again.
1221 ** Please disable throw and try your action again.
1222 ** If that fixes the bug please report it to the extension author.
1222 ** If that fixes the bug please report it to the extension author.
1223 ** Python * (glob)
1223 ** Python * (glob)
1224 ** Mercurial Distributed SCM * (glob)
1224 ** Mercurial Distributed SCM * (glob)
1225 ** Extensions loaded: throw
1225 ** Extensions loaded: throw
1226
1226
1227 empty declaration of supported version, extension complains:
1227 empty declaration of supported version, extension complains:
1228 $ echo "testedwith = ''" >> throw.py
1228 $ echo "testedwith = ''" >> throw.py
1229 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1229 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1230 ** Unknown exception encountered with possibly-broken third-party extension throw
1230 ** Unknown exception encountered with possibly-broken third-party extension throw
1231 ** which supports versions unknown of Mercurial.
1231 ** which supports versions unknown of Mercurial.
1232 ** Please disable throw and try your action again.
1232 ** Please disable throw and try your action again.
1233 ** If that fixes the bug please report it to the extension author.
1233 ** If that fixes the bug please report it to the extension author.
1234 ** Python * (glob)
1234 ** Python * (glob)
1235 ** Mercurial Distributed SCM (*) (glob)
1235 ** Mercurial Distributed SCM (*) (glob)
1236 ** Extensions loaded: throw
1236 ** Extensions loaded: throw
1237
1237
1238 If the extension specifies a buglink, show that:
1238 If the extension specifies a buglink, show that:
1239 $ echo 'buglink = "http://example.com/bts"' >> throw.py
1239 $ echo 'buglink = "http://example.com/bts"' >> throw.py
1240 $ rm -f throw.pyc throw.pyo
1240 $ rm -f throw.pyc throw.pyo
1241 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1241 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1242 ** Unknown exception encountered with possibly-broken third-party extension throw
1242 ** Unknown exception encountered with possibly-broken third-party extension throw
1243 ** which supports versions unknown of Mercurial.
1243 ** which supports versions unknown of Mercurial.
1244 ** Please disable throw and try your action again.
1244 ** Please disable throw and try your action again.
1245 ** If that fixes the bug please report it to http://example.com/bts
1245 ** If that fixes the bug please report it to http://example.com/bts
1246 ** Python * (glob)
1246 ** Python * (glob)
1247 ** Mercurial Distributed SCM (*) (glob)
1247 ** Mercurial Distributed SCM (*) (glob)
1248 ** Extensions loaded: throw
1248 ** Extensions loaded: throw
1249
1249
1250 If the extensions declare outdated versions, accuse the older extension first:
1250 If the extensions declare outdated versions, accuse the older extension first:
1251 $ echo "from mercurial import util" >> older.py
1251 $ echo "from mercurial import util" >> older.py
1252 $ echo "util.version = lambda:'2.2'" >> older.py
1252 $ echo "util.version = lambda:'2.2'" >> older.py
1253 $ echo "testedwith = '1.9.3'" >> older.py
1253 $ echo "testedwith = '1.9.3'" >> older.py
1254 $ echo "testedwith = '2.1.1'" >> throw.py
1254 $ echo "testedwith = '2.1.1'" >> throw.py
1255 $ rm -f throw.pyc throw.pyo
1255 $ rm -f throw.pyc throw.pyo
1256 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1256 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1257 > throw 2>&1 | egrep '^\*\*'
1257 > throw 2>&1 | egrep '^\*\*'
1258 ** Unknown exception encountered with possibly-broken third-party extension older
1258 ** Unknown exception encountered with possibly-broken third-party extension older
1259 ** which supports versions 1.9 of Mercurial.
1259 ** which supports versions 1.9 of Mercurial.
1260 ** Please disable older and try your action again.
1260 ** Please disable older and try your action again.
1261 ** If that fixes the bug please report it to the extension author.
1261 ** If that fixes the bug please report it to the extension author.
1262 ** Python * (glob)
1262 ** Python * (glob)
1263 ** Mercurial Distributed SCM (version 2.2)
1263 ** Mercurial Distributed SCM (version 2.2)
1264 ** Extensions loaded: throw, older
1264 ** Extensions loaded: throw, older
1265
1265
1266 One extension only tested with older, one only with newer versions:
1266 One extension only tested with older, one only with newer versions:
1267 $ echo "util.version = lambda:'2.1'" >> older.py
1267 $ echo "util.version = lambda:'2.1'" >> older.py
1268 $ rm -f older.pyc older.pyo
1268 $ rm -f older.pyc older.pyo
1269 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1269 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1270 > throw 2>&1 | egrep '^\*\*'
1270 > throw 2>&1 | egrep '^\*\*'
1271 ** Unknown exception encountered with possibly-broken third-party extension older
1271 ** Unknown exception encountered with possibly-broken third-party extension older
1272 ** which supports versions 1.9 of Mercurial.
1272 ** which supports versions 1.9 of Mercurial.
1273 ** Please disable older and try your action again.
1273 ** Please disable older and try your action again.
1274 ** If that fixes the bug please report it to the extension author.
1274 ** If that fixes the bug please report it to the extension author.
1275 ** Python * (glob)
1275 ** Python * (glob)
1276 ** Mercurial Distributed SCM (version 2.1)
1276 ** Mercurial Distributed SCM (version 2.1)
1277 ** Extensions loaded: throw, older
1277 ** Extensions loaded: throw, older
1278
1278
1279 Older extension is tested with current version, the other only with newer:
1279 Older extension is tested with current version, the other only with newer:
1280 $ echo "util.version = lambda:'1.9.3'" >> older.py
1280 $ echo "util.version = lambda:'1.9.3'" >> older.py
1281 $ rm -f older.pyc older.pyo
1281 $ rm -f older.pyc older.pyo
1282 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1282 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1283 > throw 2>&1 | egrep '^\*\*'
1283 > throw 2>&1 | egrep '^\*\*'
1284 ** Unknown exception encountered with possibly-broken third-party extension throw
1284 ** Unknown exception encountered with possibly-broken third-party extension throw
1285 ** which supports versions 2.1 of Mercurial.
1285 ** which supports versions 2.1 of Mercurial.
1286 ** Please disable throw and try your action again.
1286 ** Please disable throw and try your action again.
1287 ** If that fixes the bug please report it to http://example.com/bts
1287 ** If that fixes the bug please report it to http://example.com/bts
1288 ** Python * (glob)
1288 ** Python * (glob)
1289 ** Mercurial Distributed SCM (version 1.9.3)
1289 ** Mercurial Distributed SCM (version 1.9.3)
1290 ** Extensions loaded: throw, older
1290 ** Extensions loaded: throw, older
1291
1291
1292 Ability to point to a different point
1292 Ability to point to a different point
1293 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1293 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1294 > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*'
1294 > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*'
1295 ** unknown exception encountered, please report by visiting
1295 ** unknown exception encountered, please report by visiting
1296 ** Your Local Goat Lenders
1296 ** Your Local Goat Lenders
1297 ** Python * (glob)
1297 ** Python * (glob)
1298 ** Mercurial Distributed SCM (*) (glob)
1298 ** Mercurial Distributed SCM (*) (glob)
1299 ** Extensions loaded: throw, older
1299 ** Extensions loaded: throw, older
1300
1300
1301 Declare the version as supporting this hg version, show regular bts link:
1301 Declare the version as supporting this hg version, show regular bts link:
1302 $ hgver=`hg debuginstall -T '{hgver}'`
1302 $ hgver=`hg debuginstall -T '{hgver}'`
1303 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
1303 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
1304 $ if [ -z "$hgver" ]; then
1304 $ if [ -z "$hgver" ]; then
1305 > echo "unable to fetch a mercurial version. Make sure __version__ is correct";
1305 > echo "unable to fetch a mercurial version. Make sure __version__ is correct";
1306 > fi
1306 > fi
1307 $ rm -f throw.pyc throw.pyo
1307 $ rm -f throw.pyc throw.pyo
1308 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1308 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1309 ** unknown exception encountered, please report by visiting
1309 ** unknown exception encountered, please report by visiting
1310 ** https://mercurial-scm.org/wiki/BugTracker
1310 ** https://mercurial-scm.org/wiki/BugTracker
1311 ** Python * (glob)
1311 ** Python * (glob)
1312 ** Mercurial Distributed SCM (*) (glob)
1312 ** Mercurial Distributed SCM (*) (glob)
1313 ** Extensions loaded: throw
1313 ** Extensions loaded: throw
1314
1314
1315 Patch version is ignored during compatibility check
1315 Patch version is ignored during compatibility check
1316 $ echo "testedwith = '3.2'" >> throw.py
1316 $ echo "testedwith = '3.2'" >> throw.py
1317 $ echo "util.version = lambda:'3.2.2'" >> throw.py
1317 $ echo "util.version = lambda:'3.2.2'" >> throw.py
1318 $ rm -f throw.pyc throw.pyo
1318 $ rm -f throw.pyc throw.pyo
1319 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1319 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1320 ** unknown exception encountered, please report by visiting
1320 ** unknown exception encountered, please report by visiting
1321 ** https://mercurial-scm.org/wiki/BugTracker
1321 ** https://mercurial-scm.org/wiki/BugTracker
1322 ** Python * (glob)
1322 ** Python * (glob)
1323 ** Mercurial Distributed SCM (*) (glob)
1323 ** Mercurial Distributed SCM (*) (glob)
1324 ** Extensions loaded: throw
1324 ** Extensions loaded: throw
1325
1325
1326 Test version number support in 'hg version':
1326 Test version number support in 'hg version':
1327 $ echo '__version__ = (1, 2, 3)' >> throw.py
1327 $ echo '__version__ = (1, 2, 3)' >> throw.py
1328 $ rm -f throw.pyc throw.pyo
1328 $ rm -f throw.pyc throw.pyo
1329 $ hg version -v
1329 $ hg version -v
1330 Mercurial Distributed SCM (version *) (glob)
1330 Mercurial Distributed SCM (version *) (glob)
1331 (see https://mercurial-scm.org for more information)
1331 (see https://mercurial-scm.org for more information)
1332
1332
1333 Copyright (C) 2005-* Matt Mackall and others (glob)
1333 Copyright (C) 2005-* Matt Mackall and others (glob)
1334 This is free software; see the source for copying conditions. There is NO
1334 This is free software; see the source for copying conditions. There is NO
1335 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1335 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1336
1336
1337 Enabled extensions:
1337 Enabled extensions:
1338
1338
1339
1339
1340 $ hg version -v --config extensions.throw=throw.py
1340 $ hg version -v --config extensions.throw=throw.py
1341 Mercurial Distributed SCM (version *) (glob)
1341 Mercurial Distributed SCM (version *) (glob)
1342 (see https://mercurial-scm.org for more information)
1342 (see https://mercurial-scm.org for more information)
1343
1343
1344 Copyright (C) 2005-* Matt Mackall and others (glob)
1344 Copyright (C) 2005-* Matt Mackall and others (glob)
1345 This is free software; see the source for copying conditions. There is NO
1345 This is free software; see the source for copying conditions. There is NO
1346 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1346 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1347
1347
1348 Enabled extensions:
1348 Enabled extensions:
1349
1349
1350 throw external 1.2.3
1350 throw external 1.2.3
1351 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py
1351 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py
1352 $ rm -f throw.pyc throw.pyo
1352 $ rm -f throw.pyc throw.pyo
1353 $ hg version -v --config extensions.throw=throw.py --config extensions.strip=
1353 $ hg version -v --config extensions.throw=throw.py --config extensions.strip=
1354 Mercurial Distributed SCM (version *) (glob)
1354 Mercurial Distributed SCM (version *) (glob)
1355 (see https://mercurial-scm.org for more information)
1355 (see https://mercurial-scm.org for more information)
1356
1356
1357 Copyright (C) 2005-* Matt Mackall and others (glob)
1357 Copyright (C) 2005-* Matt Mackall and others (glob)
1358 This is free software; see the source for copying conditions. There is NO
1358 This is free software; see the source for copying conditions. There is NO
1359 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1359 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1360
1360
1361 Enabled extensions:
1361 Enabled extensions:
1362
1362
1363 throw external 1.twentythree
1363 throw external 1.twentythree
1364 strip internal
1364 strip internal
1365
1365
1366 $ hg version -q --config extensions.throw=throw.py
1366 $ hg version -q --config extensions.throw=throw.py
1367 Mercurial Distributed SCM (version *) (glob)
1367 Mercurial Distributed SCM (version *) (glob)
1368
1368
1369 Test JSON output of version:
1369 Test JSON output of version:
1370
1370
1371 $ hg version -Tjson
1371 $ hg version -Tjson
1372 [
1372 [
1373 {
1373 {
1374 "extensions": [],
1374 "extensions": [],
1375 "ver": "*" (glob)
1375 "ver": "*" (glob)
1376 }
1376 }
1377 ]
1377 ]
1378
1378
1379 $ hg version --config extensions.throw=throw.py -Tjson
1379 $ hg version --config extensions.throw=throw.py -Tjson
1380 [
1380 [
1381 {
1381 {
1382 "extensions": [{"bundled": false, "name": "throw", "ver": "1.twentythree"}],
1382 "extensions": [{"bundled": false, "name": "throw", "ver": "1.twentythree"}],
1383 "ver": "3.2.2"
1383 "ver": "3.2.2"
1384 }
1384 }
1385 ]
1385 ]
1386
1386
1387 $ hg version --config extensions.strip= -Tjson
1387 $ hg version --config extensions.strip= -Tjson
1388 [
1388 [
1389 {
1389 {
1390 "extensions": [{"bundled": true, "name": "strip", "ver": null}],
1390 "extensions": [{"bundled": true, "name": "strip", "ver": null}],
1391 "ver": "*" (glob)
1391 "ver": "*" (glob)
1392 }
1392 }
1393 ]
1393 ]
1394
1394
1395 Test template output of version:
1395 Test template output of version:
1396
1396
1397 $ hg version --config extensions.throw=throw.py --config extensions.strip= \
1397 $ hg version --config extensions.throw=throw.py --config extensions.strip= \
1398 > -T'{extensions % "{name} {pad(ver, 16)} ({if(bundled, "internal", "external")})\n"}'
1398 > -T'{extensions % "{name} {pad(ver, 16)} ({if(bundled, "internal", "external")})\n"}'
1399 throw 1.twentythree (external)
1399 throw 1.twentythree (external)
1400 strip (internal)
1400 strip (internal)
1401
1401
1402 Refuse to load extensions with minimum version requirements
1402 Refuse to load extensions with minimum version requirements
1403
1403
1404 $ cat > minversion1.py << EOF
1404 $ cat > minversion1.py << EOF
1405 > from mercurial import util
1405 > from mercurial import util
1406 > util.version = lambda: '3.5.2'
1406 > util.version = lambda: '3.5.2'
1407 > minimumhgversion = '3.6'
1407 > minimumhgversion = '3.6'
1408 > EOF
1408 > EOF
1409 $ hg --config extensions.minversion=minversion1.py version
1409 $ hg --config extensions.minversion=minversion1.py version
1410 (third party extension minversion requires version 3.6 or newer of Mercurial; disabling)
1410 (third party extension minversion requires version 3.6 or newer of Mercurial; disabling)
1411 Mercurial Distributed SCM (version 3.5.2)
1411 Mercurial Distributed SCM (version 3.5.2)
1412 (see https://mercurial-scm.org for more information)
1412 (see https://mercurial-scm.org for more information)
1413
1413
1414 Copyright (C) 2005-* Matt Mackall and others (glob)
1414 Copyright (C) 2005-* Matt Mackall and others (glob)
1415 This is free software; see the source for copying conditions. There is NO
1415 This is free software; see the source for copying conditions. There is NO
1416 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1416 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1417
1417
1418 $ cat > minversion2.py << EOF
1418 $ cat > minversion2.py << EOF
1419 > from mercurial import util
1419 > from mercurial import util
1420 > util.version = lambda: '3.6'
1420 > util.version = lambda: '3.6'
1421 > minimumhgversion = '3.7'
1421 > minimumhgversion = '3.7'
1422 > EOF
1422 > EOF
1423 $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third'
1423 $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third'
1424 (third party extension minversion requires version 3.7 or newer of Mercurial; disabling)
1424 (third party extension minversion requires version 3.7 or newer of Mercurial; disabling)
1425
1425
1426 Can load version that is only off by point release
1426 Can load version that is only off by point release
1427
1427
1428 $ cat > minversion2.py << EOF
1428 $ cat > minversion2.py << EOF
1429 > from mercurial import util
1429 > from mercurial import util
1430 > util.version = lambda: '3.6.1'
1430 > util.version = lambda: '3.6.1'
1431 > minimumhgversion = '3.6'
1431 > minimumhgversion = '3.6'
1432 > EOF
1432 > EOF
1433 $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third'
1433 $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third'
1434 [1]
1434 [1]
1435
1435
1436 Can load minimum version identical to current
1436 Can load minimum version identical to current
1437
1437
1438 $ cat > minversion3.py << EOF
1438 $ cat > minversion3.py << EOF
1439 > from mercurial import util
1439 > from mercurial import util
1440 > util.version = lambda: '3.5'
1440 > util.version = lambda: '3.5'
1441 > minimumhgversion = '3.5'
1441 > minimumhgversion = '3.5'
1442 > EOF
1442 > EOF
1443 $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third'
1443 $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third'
1444 [1]
1444 [1]
1445
1445
1446 Restore HGRCPATH
1446 Restore HGRCPATH
1447
1447
1448 $ HGRCPATH=$ORGHGRCPATH
1448 $ HGRCPATH=$ORGHGRCPATH
1449 $ export HGRCPATH
1449 $ export HGRCPATH
1450
1450
1451 Commands handling multiple repositories at a time should invoke only
1451 Commands handling multiple repositories at a time should invoke only
1452 "reposetup()" of extensions enabling in the target repository.
1452 "reposetup()" of extensions enabling in the target repository.
1453
1453
1454 $ mkdir reposetup-test
1454 $ mkdir reposetup-test
1455 $ cd reposetup-test
1455 $ cd reposetup-test
1456
1456
1457 $ cat > $TESTTMP/reposetuptest.py <<EOF
1457 $ cat > $TESTTMP/reposetuptest.py <<EOF
1458 > from mercurial import extensions
1458 > from mercurial import extensions
1459 > def reposetup(ui, repo):
1459 > def reposetup(ui, repo):
1460 > ui.write('reposetup() for %s\n' % (repo.root))
1460 > ui.write('reposetup() for %s\n' % (repo.root))
1461 > ui.flush()
1461 > ui.flush()
1462 > EOF
1462 > EOF
1463 $ hg init src
1463 $ hg init src
1464 $ echo a > src/a
1464 $ echo a > src/a
1465 $ hg -R src commit -Am '#0 at src/a'
1465 $ hg -R src commit -Am '#0 at src/a'
1466 adding a
1466 adding a
1467 $ echo '[extensions]' >> src/.hg/hgrc
1467 $ echo '[extensions]' >> src/.hg/hgrc
1468 $ echo '# enable extension locally' >> src/.hg/hgrc
1468 $ echo '# enable extension locally' >> src/.hg/hgrc
1469 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc
1469 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc
1470 $ hg -R src status
1470 $ hg -R src status
1471 reposetup() for $TESTTMP/reposetup-test/src (glob)
1471 reposetup() for $TESTTMP/reposetup-test/src (glob)
1472
1472
1473 $ hg clone -U src clone-dst1
1473 $ hg clone -U src clone-dst1
1474 reposetup() for $TESTTMP/reposetup-test/src (glob)
1474 reposetup() for $TESTTMP/reposetup-test/src (glob)
1475 $ hg init push-dst1
1475 $ hg init push-dst1
1476 $ hg -q -R src push push-dst1
1476 $ hg -q -R src push push-dst1
1477 reposetup() for $TESTTMP/reposetup-test/src (glob)
1477 reposetup() for $TESTTMP/reposetup-test/src (glob)
1478 $ hg init pull-src1
1478 $ hg init pull-src1
1479 $ hg -q -R pull-src1 pull src
1479 $ hg -q -R pull-src1 pull src
1480 reposetup() for $TESTTMP/reposetup-test/src (glob)
1480 reposetup() for $TESTTMP/reposetup-test/src (glob)
1481
1481
1482 $ cat <<EOF >> $HGRCPATH
1482 $ cat <<EOF >> $HGRCPATH
1483 > [extensions]
1483 > [extensions]
1484 > # disable extension globally and explicitly
1484 > # disable extension globally and explicitly
1485 > reposetuptest = !
1485 > reposetuptest = !
1486 > EOF
1486 > EOF
1487 $ hg clone -U src clone-dst2
1487 $ hg clone -U src clone-dst2
1488 reposetup() for $TESTTMP/reposetup-test/src (glob)
1488 reposetup() for $TESTTMP/reposetup-test/src (glob)
1489 $ hg init push-dst2
1489 $ hg init push-dst2
1490 $ hg -q -R src push push-dst2
1490 $ hg -q -R src push push-dst2
1491 reposetup() for $TESTTMP/reposetup-test/src (glob)
1491 reposetup() for $TESTTMP/reposetup-test/src (glob)
1492 $ hg init pull-src2
1492 $ hg init pull-src2
1493 $ hg -q -R pull-src2 pull src
1493 $ hg -q -R pull-src2 pull src
1494 reposetup() for $TESTTMP/reposetup-test/src (glob)
1494 reposetup() for $TESTTMP/reposetup-test/src (glob)
1495
1495
1496 $ cat <<EOF >> $HGRCPATH
1496 $ cat <<EOF >> $HGRCPATH
1497 > [extensions]
1497 > [extensions]
1498 > # enable extension globally
1498 > # enable extension globally
1499 > reposetuptest = $TESTTMP/reposetuptest.py
1499 > reposetuptest = $TESTTMP/reposetuptest.py
1500 > EOF
1500 > EOF
1501 $ hg clone -U src clone-dst3
1501 $ hg clone -U src clone-dst3
1502 reposetup() for $TESTTMP/reposetup-test/src (glob)
1502 reposetup() for $TESTTMP/reposetup-test/src (glob)
1503 reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob)
1503 reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob)
1504 $ hg init push-dst3
1504 $ hg init push-dst3
1505 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
1505 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
1506 $ hg -q -R src push push-dst3
1506 $ hg -q -R src push push-dst3
1507 reposetup() for $TESTTMP/reposetup-test/src (glob)
1507 reposetup() for $TESTTMP/reposetup-test/src (glob)
1508 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
1508 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
1509 $ hg init pull-src3
1509 $ hg init pull-src3
1510 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
1510 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
1511 $ hg -q -R pull-src3 pull src
1511 $ hg -q -R pull-src3 pull src
1512 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
1512 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
1513 reposetup() for $TESTTMP/reposetup-test/src (glob)
1513 reposetup() for $TESTTMP/reposetup-test/src (glob)
1514
1514
1515 $ echo '[extensions]' >> src/.hg/hgrc
1515 $ echo '[extensions]' >> src/.hg/hgrc
1516 $ echo '# disable extension locally' >> src/.hg/hgrc
1516 $ echo '# disable extension locally' >> src/.hg/hgrc
1517 $ echo 'reposetuptest = !' >> src/.hg/hgrc
1517 $ echo 'reposetuptest = !' >> src/.hg/hgrc
1518 $ hg clone -U src clone-dst4
1518 $ hg clone -U src clone-dst4
1519 reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob)
1519 reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob)
1520 $ hg init push-dst4
1520 $ hg init push-dst4
1521 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
1521 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
1522 $ hg -q -R src push push-dst4
1522 $ hg -q -R src push push-dst4
1523 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
1523 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
1524 $ hg init pull-src4
1524 $ hg init pull-src4
1525 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
1525 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
1526 $ hg -q -R pull-src4 pull src
1526 $ hg -q -R pull-src4 pull src
1527 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
1527 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
1528
1528
1529 disabling in command line overlays with all configuration
1529 disabling in command line overlays with all configuration
1530 $ hg --config extensions.reposetuptest=! clone -U src clone-dst5
1530 $ hg --config extensions.reposetuptest=! clone -U src clone-dst5
1531 $ hg --config extensions.reposetuptest=! init push-dst5
1531 $ hg --config extensions.reposetuptest=! init push-dst5
1532 $ hg --config extensions.reposetuptest=! -q -R src push push-dst5
1532 $ hg --config extensions.reposetuptest=! -q -R src push push-dst5
1533 $ hg --config extensions.reposetuptest=! init pull-src5
1533 $ hg --config extensions.reposetuptest=! init pull-src5
1534 $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src
1534 $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src
1535
1535
1536 $ cat <<EOF >> $HGRCPATH
1536 $ cat <<EOF >> $HGRCPATH
1537 > [extensions]
1537 > [extensions]
1538 > # disable extension globally and explicitly
1538 > # disable extension globally and explicitly
1539 > reposetuptest = !
1539 > reposetuptest = !
1540 > EOF
1540 > EOF
1541 $ hg init parent
1541 $ hg init parent
1542 $ hg init parent/sub1
1542 $ hg init parent/sub1
1543 $ echo 1 > parent/sub1/1
1543 $ echo 1 > parent/sub1/1
1544 $ hg -R parent/sub1 commit -Am '#0 at parent/sub1'
1544 $ hg -R parent/sub1 commit -Am '#0 at parent/sub1'
1545 adding 1
1545 adding 1
1546 $ hg init parent/sub2
1546 $ hg init parent/sub2
1547 $ hg init parent/sub2/sub21
1547 $ hg init parent/sub2/sub21
1548 $ echo 21 > parent/sub2/sub21/21
1548 $ echo 21 > parent/sub2/sub21/21
1549 $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21'
1549 $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21'
1550 adding 21
1550 adding 21
1551 $ cat > parent/sub2/.hgsub <<EOF
1551 $ cat > parent/sub2/.hgsub <<EOF
1552 > sub21 = sub21
1552 > sub21 = sub21
1553 > EOF
1553 > EOF
1554 $ hg -R parent/sub2 commit -Am '#0 at parent/sub2'
1554 $ hg -R parent/sub2 commit -Am '#0 at parent/sub2'
1555 adding .hgsub
1555 adding .hgsub
1556 $ hg init parent/sub3
1556 $ hg init parent/sub3
1557 $ echo 3 > parent/sub3/3
1557 $ echo 3 > parent/sub3/3
1558 $ hg -R parent/sub3 commit -Am '#0 at parent/sub3'
1558 $ hg -R parent/sub3 commit -Am '#0 at parent/sub3'
1559 adding 3
1559 adding 3
1560 $ cat > parent/.hgsub <<EOF
1560 $ cat > parent/.hgsub <<EOF
1561 > sub1 = sub1
1561 > sub1 = sub1
1562 > sub2 = sub2
1562 > sub2 = sub2
1563 > sub3 = sub3
1563 > sub3 = sub3
1564 > EOF
1564 > EOF
1565 $ hg -R parent commit -Am '#0 at parent'
1565 $ hg -R parent commit -Am '#0 at parent'
1566 adding .hgsub
1566 adding .hgsub
1567 $ echo '[extensions]' >> parent/.hg/hgrc
1567 $ echo '[extensions]' >> parent/.hg/hgrc
1568 $ echo '# enable extension locally' >> parent/.hg/hgrc
1568 $ echo '# enable extension locally' >> parent/.hg/hgrc
1569 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc
1569 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc
1570 $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc
1570 $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc
1571 $ hg -R parent status -S -A
1571 $ hg -R parent status -S -A
1572 reposetup() for $TESTTMP/reposetup-test/parent (glob)
1572 reposetup() for $TESTTMP/reposetup-test/parent (glob)
1573 reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob)
1573 reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob)
1574 C .hgsub
1574 C .hgsub
1575 C .hgsubstate
1575 C .hgsubstate
1576 C sub1/1
1576 C sub1/1
1577 C sub2/.hgsub
1577 C sub2/.hgsub
1578 C sub2/.hgsubstate
1578 C sub2/.hgsubstate
1579 C sub2/sub21/21
1579 C sub2/sub21/21
1580 C sub3/3
1580 C sub3/3
1581
1581
1582 $ cd ..
1582 $ cd ..
1583
1583
1584 Prohibit registration of commands that don't use @command (issue5137)
1584 Prohibit registration of commands that don't use @command (issue5137)
1585
1585
1586 $ hg init deprecated
1586 $ hg init deprecated
1587 $ cd deprecated
1587 $ cd deprecated
1588
1588
1589 $ cat <<EOF > deprecatedcmd.py
1589 $ cat <<EOF > deprecatedcmd.py
1590 > def deprecatedcmd(repo, ui):
1590 > def deprecatedcmd(repo, ui):
1591 > pass
1591 > pass
1592 > cmdtable = {
1592 > cmdtable = {
1593 > 'deprecatedcmd': (deprecatedcmd, [], ''),
1593 > 'deprecatedcmd': (deprecatedcmd, [], ''),
1594 > }
1594 > }
1595 > EOF
1595 > EOF
1596 $ cat <<EOF > .hg/hgrc
1596 $ cat <<EOF > .hg/hgrc
1597 > [extensions]
1597 > [extensions]
1598 > deprecatedcmd = `pwd`/deprecatedcmd.py
1598 > deprecatedcmd = `pwd`/deprecatedcmd.py
1599 > mq = !
1599 > mq = !
1600 > hgext.mq = !
1600 > hgext.mq = !
1601 > hgext/mq = !
1601 > hgext/mq = !
1602 > EOF
1602 > EOF
1603
1603
1604 $ hg deprecatedcmd > /dev/null
1604 $ hg deprecatedcmd > /dev/null
1605 *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo
1605 *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo
1606 *** (use @command decorator to register 'deprecatedcmd')
1606 *** (use @command decorator to register 'deprecatedcmd')
1607 hg: unknown command 'deprecatedcmd'
1607 hg: unknown command 'deprecatedcmd'
1608 [255]
1608 [255]
1609
1609
1610 the extension shouldn't be loaded at all so the mq works:
1610 the extension shouldn't be loaded at all so the mq works:
1611
1611
1612 $ hg qseries --config extensions.mq= > /dev/null
1612 $ hg qseries --config extensions.mq= > /dev/null
1613 *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo
1613 *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo
1614 *** (use @command decorator to register 'deprecatedcmd')
1614 *** (use @command decorator to register 'deprecatedcmd')
1615
1615
1616 $ cd ..
1616 $ cd ..
1617
1617
1618 Test synopsis and docstring extending
1618 Test synopsis and docstring extending
1619
1619
1620 $ hg init exthelp
1620 $ hg init exthelp
1621 $ cat > exthelp.py <<EOF
1621 $ cat > exthelp.py <<EOF
1622 > from mercurial import commands, extensions
1622 > from mercurial import commands, extensions
1623 > def exbookmarks(orig, *args, **opts):
1623 > def exbookmarks(orig, *args, **opts):
1624 > return orig(*args, **opts)
1624 > return orig(*args, **opts)
1625 > def uisetup(ui):
1625 > def uisetup(ui):
1626 > synopsis = ' GREPME [--foo] [-x]'
1626 > synopsis = ' GREPME [--foo] [-x]'
1627 > docstring = '''
1627 > docstring = '''
1628 > GREPME make sure that this is in the help!
1628 > GREPME make sure that this is in the help!
1629 > '''
1629 > '''
1630 > extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks,
1630 > extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks,
1631 > synopsis, docstring)
1631 > synopsis, docstring)
1632 > EOF
1632 > EOF
1633 $ abspath=`pwd`/exthelp.py
1633 $ abspath=`pwd`/exthelp.py
1634 $ echo '[extensions]' >> $HGRCPATH
1634 $ echo '[extensions]' >> $HGRCPATH
1635 $ echo "exthelp = $abspath" >> $HGRCPATH
1635 $ echo "exthelp = $abspath" >> $HGRCPATH
1636 $ cd exthelp
1636 $ cd exthelp
1637 $ hg help bookmarks | grep GREPME
1637 $ hg help bookmarks | grep GREPME
1638 hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x]
1638 hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x]
1639 GREPME make sure that this is in the help!
1639 GREPME make sure that this is in the help!
1640 $ cd ..
1640 $ cd ..
1641
1641
1642 Show deprecation warning for the use of cmdutil.command
1642 Show deprecation warning for the use of cmdutil.command
1643
1643
1644 $ cat > nonregistrar.py <<EOF
1644 $ cat > nonregistrar.py <<EOF
1645 > from mercurial import cmdutil
1645 > from mercurial import cmdutil
1646 > cmdtable = {}
1646 > cmdtable = {}
1647 > command = cmdutil.command(cmdtable)
1647 > command = cmdutil.command(cmdtable)
1648 > @command(b'foo', [], norepo=True)
1648 > @command(b'foo', [], norepo=True)
1649 > def foo(ui):
1649 > def foo(ui):
1650 > pass
1650 > pass
1651 > EOF
1651 > EOF
1652
1652
1653 $ hg --config extensions.nonregistrar=`pwd`/nonregistrar.py version > /dev/null
1653 $ hg --config extensions.nonregistrar=`pwd`/nonregistrar.py version > /dev/null
1654 devel-warn: cmdutil.command is deprecated, use registrar.command to register 'foo'
1654 devel-warn: cmdutil.command is deprecated, use registrar.command to register 'foo'
1655 (compatibility will be dropped after Mercurial-4.6, update your code.) * (glob)
1655 (compatibility will be dropped after Mercurial-4.6, update your code.) * (glob)
1656
1656
1657 Make sure a broken uisetup doesn't globally break hg:
1657 Make sure a broken uisetup doesn't globally break hg:
1658 $ cat > $TESTTMP/baduisetup.py <<EOF
1658 $ cat > $TESTTMP/baduisetup.py <<EOF
1659 > from mercurial import (
1659 > from mercurial import (
1660 > bdiff,
1660 > bdiff,
1661 > extensions,
1661 > extensions,
1662 > )
1662 > )
1663 >
1663 >
1664 > def blockswrapper(orig, *args, **kwargs):
1664 > def blockswrapper(orig, *args, **kwargs):
1665 > return orig(*args, **kwargs)
1665 > return orig(*args, **kwargs)
1666 >
1666 >
1667 > def uisetup(ui):
1667 > def uisetup(ui):
1668 > extensions.wrapfunction(bdiff, 'blocks', blockswrapper)
1668 > extensions.wrapfunction(bdiff, 'blocks', blockswrapper)
1669 > EOF
1669 > EOF
1670 $ cat >> $HGRCPATH <<EOF
1670 $ cat >> $HGRCPATH <<EOF
1671 > [extensions]
1671 > [extensions]
1672 > baduisetup = $TESTTMP/baduisetup.py
1672 > baduisetup = $TESTTMP/baduisetup.py
1673 > EOF
1673 > EOF
1674
1674
1675 Even though the extension fails during uisetup, hg is still basically usable:
1675 Even though the extension fails during uisetup, hg is still basically usable:
1676 $ hg version
1676 $ hg version
1677 *** failed to set up extension baduisetup: No module named bdiff
1677 *** failed to set up extension baduisetup: No module named bdiff
1678 Mercurial Distributed SCM (version *) (glob)
1678 Mercurial Distributed SCM (version *) (glob)
1679 (see https://mercurial-scm.org for more information)
1679 (see https://mercurial-scm.org for more information)
1680
1680
1681 Copyright (C) 2005-2017 Matt Mackall and others
1681 Copyright (C) 2005-2017 Matt Mackall and others
1682 This is free software; see the source for copying conditions. There is NO
1682 This is free software; see the source for copying conditions. There is NO
1683 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1683 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1684
1684
1685 $ hg version --traceback
1685 $ hg version --traceback
1686 Traceback (most recent call last):
1686 Traceback (most recent call last):
1687 File "*/mercurial/extensions.py", line *, in _runuisetup (glob)
1687 File "*/mercurial/extensions.py", line *, in _runuisetup (glob)
1688 uisetup(ui)
1688 uisetup(ui)
1689 File "$TESTTMP/baduisetup.py", line 10, in uisetup
1689 File "$TESTTMP/baduisetup.py", line 10, in uisetup
1690 extensions.wrapfunction(bdiff, 'blocks', blockswrapper)
1690 extensions.wrapfunction(bdiff, 'blocks', blockswrapper)
1691 File "*/mercurial/extensions.py", line *, in wrapfunction (glob)
1691 File "*/mercurial/extensions.py", line *, in wrapfunction (glob)
1692 origfn = getattr(container, funcname)
1692 origfn = getattr(container, funcname)
1693 File "*/hgdemandimport/demandimportpy2.py", line *, in __getattr__ (glob)
1693 File "*/hgdemandimport/demandimportpy2.py", line *, in __getattr__ (glob)
1694 self._load()
1694 self._load()
1695 File "*/hgdemandimport/demandimportpy2.py", line *, in _load (glob)
1695 File "*/hgdemandimport/demandimportpy2.py", line *, in _load (glob)
1696 mod = _hgextimport(_origimport, head, globals, locals, None, level)
1696 mod = _hgextimport(_origimport, head, globals, locals, None, level)
1697 File "*/hgdemandimport/demandimportpy2.py", line *, in _hgextimport (glob)
1697 File "*/hgdemandimport/demandimportpy2.py", line *, in _hgextimport (glob)
1698 return importfunc(name, globals, *args, **kwargs)
1698 return importfunc(name, globals, *args, **kwargs)
1699 ImportError: No module named bdiff
1699 ImportError: No module named bdiff
1700 *** failed to set up extension baduisetup: No module named bdiff
1700 *** failed to set up extension baduisetup: No module named bdiff
1701 Mercurial Distributed SCM (version *) (glob)
1701 Mercurial Distributed SCM (version *) (glob)
1702 (see https://mercurial-scm.org for more information)
1702 (see https://mercurial-scm.org for more information)
1703
1703
1704 Copyright (C) 2005-2017 Matt Mackall and others
1704 Copyright (C) 2005-2017 Matt Mackall and others
1705 This is free software; see the source for copying conditions. There is NO
1705 This is free software; see the source for copying conditions. There is NO
1706 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1706 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -1,144 +1,145 b''
1 This test makes sure that we don't mark a file as merged with its ancestor
1 This test makes sure that we don't mark a file as merged with its ancestor
2 when we do a merge.
2 when we do a merge.
3
3
4 $ cat <<EOF > merge
4 $ cat <<EOF > merge
5 > from __future__ import print_function
5 > import sys, os
6 > import sys, os
6 > print "merging for", os.path.basename(sys.argv[1])
7 > print("merging for", os.path.basename(sys.argv[1]))
7 > EOF
8 > EOF
8 $ HGMERGE="$PYTHON ../merge"; export HGMERGE
9 $ HGMERGE="$PYTHON ../merge"; export HGMERGE
9
10
10 Creating base:
11 Creating base:
11
12
12 $ hg init a
13 $ hg init a
13 $ cd a
14 $ cd a
14 $ echo 1 > foo
15 $ echo 1 > foo
15 $ echo 1 > bar
16 $ echo 1 > bar
16 $ echo 1 > baz
17 $ echo 1 > baz
17 $ echo 1 > quux
18 $ echo 1 > quux
18 $ hg add foo bar baz quux
19 $ hg add foo bar baz quux
19 $ hg commit -m "base"
20 $ hg commit -m "base"
20
21
21 $ cd ..
22 $ cd ..
22 $ hg clone a b
23 $ hg clone a b
23 updating to branch default
24 updating to branch default
24 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
25
26
26 Creating branch a:
27 Creating branch a:
27
28
28 $ cd a
29 $ cd a
29 $ echo 2a > foo
30 $ echo 2a > foo
30 $ echo 2a > bar
31 $ echo 2a > bar
31 $ hg commit -m "branch a"
32 $ hg commit -m "branch a"
32
33
33 Creating branch b:
34 Creating branch b:
34
35
35 $ cd ..
36 $ cd ..
36 $ cd b
37 $ cd b
37 $ echo 2b > foo
38 $ echo 2b > foo
38 $ echo 2b > baz
39 $ echo 2b > baz
39 $ hg commit -m "branch b"
40 $ hg commit -m "branch b"
40
41
41 We shouldn't have anything but n state here:
42 We shouldn't have anything but n state here:
42
43
43 $ hg debugstate --nodates | grep -v "^n"
44 $ hg debugstate --nodates | grep -v "^n"
44 [1]
45 [1]
45
46
46 Merging:
47 Merging:
47
48
48 $ hg pull ../a
49 $ hg pull ../a
49 pulling from ../a
50 pulling from ../a
50 searching for changes
51 searching for changes
51 adding changesets
52 adding changesets
52 adding manifests
53 adding manifests
53 adding file changes
54 adding file changes
54 added 1 changesets with 2 changes to 2 files (+1 heads)
55 added 1 changesets with 2 changes to 2 files (+1 heads)
55 (run 'hg heads' to see heads, 'hg merge' to merge)
56 (run 'hg heads' to see heads, 'hg merge' to merge)
56
57
57 $ hg merge -v
58 $ hg merge -v
58 resolving manifests
59 resolving manifests
59 getting bar
60 getting bar
60 merging foo
61 merging foo
61 merging for foo
62 merging for foo
62 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
63 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
63 (branch merge, don't forget to commit)
64 (branch merge, don't forget to commit)
64
65
65 $ echo 2m > foo
66 $ echo 2m > foo
66 $ echo 2b > baz
67 $ echo 2b > baz
67 $ echo new > quux
68 $ echo new > quux
68
69
69 $ hg ci -m "merge"
70 $ hg ci -m "merge"
70
71
71 main: we should have a merge here:
72 main: we should have a merge here:
72
73
73 $ hg debugindex --changelog
74 $ hg debugindex --changelog
74 rev offset length ..... linkrev nodeid p1 p2 (re)
75 rev offset length ..... linkrev nodeid p1 p2 (re)
75 0 0 73 ..... 0 cdca01651b96 000000000000 000000000000 (re)
76 0 0 73 ..... 0 cdca01651b96 000000000000 000000000000 (re)
76 1 73 68 ..... 1 f6718a9cb7f3 cdca01651b96 000000000000 (re)
77 1 73 68 ..... 1 f6718a9cb7f3 cdca01651b96 000000000000 (re)
77 2 141 68 ..... 2 bdd988058d16 cdca01651b96 000000000000 (re)
78 2 141 68 ..... 2 bdd988058d16 cdca01651b96 000000000000 (re)
78 3 209 66 ..... 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 (re)
79 3 209 66 ..... 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 (re)
79
80
80 log should show foo and quux changed:
81 log should show foo and quux changed:
81
82
82 $ hg log -v -r tip
83 $ hg log -v -r tip
83 changeset: 3:d8a521142a3c
84 changeset: 3:d8a521142a3c
84 tag: tip
85 tag: tip
85 parent: 1:f6718a9cb7f3
86 parent: 1:f6718a9cb7f3
86 parent: 2:bdd988058d16
87 parent: 2:bdd988058d16
87 user: test
88 user: test
88 date: Thu Jan 01 00:00:00 1970 +0000
89 date: Thu Jan 01 00:00:00 1970 +0000
89 files: foo quux
90 files: foo quux
90 description:
91 description:
91 merge
92 merge
92
93
93
94
94
95
95 foo: we should have a merge here:
96 foo: we should have a merge here:
96
97
97 $ hg debugindex foo
98 $ hg debugindex foo
98 rev offset length ..... linkrev nodeid p1 p2 (re)
99 rev offset length ..... linkrev nodeid p1 p2 (re)
99 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
100 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
100 1 3 4 ..... 1 2ffeddde1b65 b8e02f643373 000000000000 (re)
101 1 3 4 ..... 1 2ffeddde1b65 b8e02f643373 000000000000 (re)
101 2 7 4 ..... 2 33d1fb69067a b8e02f643373 000000000000 (re)
102 2 7 4 ..... 2 33d1fb69067a b8e02f643373 000000000000 (re)
102 3 11 4 ..... 3 aa27919ee430 2ffeddde1b65 33d1fb69067a (re)
103 3 11 4 ..... 3 aa27919ee430 2ffeddde1b65 33d1fb69067a (re)
103
104
104 bar: we should not have a merge here:
105 bar: we should not have a merge here:
105
106
106 $ hg debugindex bar
107 $ hg debugindex bar
107 rev offset length ..... linkrev nodeid p1 p2 (re)
108 rev offset length ..... linkrev nodeid p1 p2 (re)
108 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
109 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
109 1 3 4 ..... 2 33d1fb69067a b8e02f643373 000000000000 (re)
110 1 3 4 ..... 2 33d1fb69067a b8e02f643373 000000000000 (re)
110
111
111 baz: we should not have a merge here:
112 baz: we should not have a merge here:
112
113
113 $ hg debugindex baz
114 $ hg debugindex baz
114 rev offset length ..... linkrev nodeid p1 p2 (re)
115 rev offset length ..... linkrev nodeid p1 p2 (re)
115 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
116 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
116 1 3 4 ..... 1 2ffeddde1b65 b8e02f643373 000000000000 (re)
117 1 3 4 ..... 1 2ffeddde1b65 b8e02f643373 000000000000 (re)
117
118
118 quux: we should not have a merge here:
119 quux: we should not have a merge here:
119
120
120 $ hg debugindex quux
121 $ hg debugindex quux
121 rev offset length ..... linkrev nodeid p1 p2 (re)
122 rev offset length ..... linkrev nodeid p1 p2 (re)
122 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
123 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
123 1 3 5 ..... 3 6128c0f33108 b8e02f643373 000000000000 (re)
124 1 3 5 ..... 3 6128c0f33108 b8e02f643373 000000000000 (re)
124
125
125 Manifest entries should match tips of all files:
126 Manifest entries should match tips of all files:
126
127
127 $ hg manifest --debug
128 $ hg manifest --debug
128 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar
129 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar
129 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz
130 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz
130 aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo
131 aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo
131 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux
132 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux
132
133
133 Everything should be clean now:
134 Everything should be clean now:
134
135
135 $ hg status
136 $ hg status
136
137
137 $ hg verify
138 $ hg verify
138 checking changesets
139 checking changesets
139 checking manifests
140 checking manifests
140 crosschecking files in changesets and manifests
141 crosschecking files in changesets and manifests
141 checking files
142 checking files
142 4 files, 4 changesets, 10 total revisions
143 4 files, 4 changesets, 10 total revisions
143
144
144 $ cd ..
145 $ cd ..
@@ -1,3463 +1,3463 b''
1 @ (34) head
1 @ (34) head
2 |
2 |
3 | o (33) head
3 | o (33) head
4 | |
4 | |
5 o | (32) expand
5 o | (32) expand
6 |\ \
6 |\ \
7 | o \ (31) expand
7 | o \ (31) expand
8 | |\ \
8 | |\ \
9 | | o \ (30) expand
9 | | o \ (30) expand
10 | | |\ \
10 | | |\ \
11 | | | o | (29) regular commit
11 | | | o | (29) regular commit
12 | | | | |
12 | | | | |
13 | | o | | (28) merge zero known
13 | | o | | (28) merge zero known
14 | | |\ \ \
14 | | |\ \ \
15 o | | | | | (27) collapse
15 o | | | | | (27) collapse
16 |/ / / / /
16 |/ / / / /
17 | | o---+ (26) merge one known; far right
17 | | o---+ (26) merge one known; far right
18 | | | | |
18 | | | | |
19 +---o | | (25) merge one known; far left
19 +---o | | (25) merge one known; far left
20 | | | | |
20 | | | | |
21 | | o | | (24) merge one known; immediate right
21 | | o | | (24) merge one known; immediate right
22 | | |\| |
22 | | |\| |
23 | | o | | (23) merge one known; immediate left
23 | | o | | (23) merge one known; immediate left
24 | |/| | |
24 | |/| | |
25 +---o---+ (22) merge two known; one far left, one far right
25 +---o---+ (22) merge two known; one far left, one far right
26 | | / /
26 | | / /
27 o | | | (21) expand
27 o | | | (21) expand
28 |\ \ \ \
28 |\ \ \ \
29 | o---+-+ (20) merge two known; two far right
29 | o---+-+ (20) merge two known; two far right
30 | / / /
30 | / / /
31 o | | | (19) expand
31 o | | | (19) expand
32 |\ \ \ \
32 |\ \ \ \
33 +---+---o (18) merge two known; two far left
33 +---+---o (18) merge two known; two far left
34 | | | |
34 | | | |
35 | o | | (17) expand
35 | o | | (17) expand
36 | |\ \ \
36 | |\ \ \
37 | | o---+ (16) merge two known; one immediate right, one near right
37 | | o---+ (16) merge two known; one immediate right, one near right
38 | | |/ /
38 | | |/ /
39 o | | | (15) expand
39 o | | | (15) expand
40 |\ \ \ \
40 |\ \ \ \
41 | o-----+ (14) merge two known; one immediate right, one far right
41 | o-----+ (14) merge two known; one immediate right, one far right
42 | |/ / /
42 | |/ / /
43 o | | | (13) expand
43 o | | | (13) expand
44 |\ \ \ \
44 |\ \ \ \
45 +---o | | (12) merge two known; one immediate right, one far left
45 +---o | | (12) merge two known; one immediate right, one far left
46 | | |/ /
46 | | |/ /
47 | o | | (11) expand
47 | o | | (11) expand
48 | |\ \ \
48 | |\ \ \
49 | | o---+ (10) merge two known; one immediate left, one near right
49 | | o---+ (10) merge two known; one immediate left, one near right
50 | |/ / /
50 | |/ / /
51 o | | | (9) expand
51 o | | | (9) expand
52 |\ \ \ \
52 |\ \ \ \
53 | o-----+ (8) merge two known; one immediate left, one far right
53 | o-----+ (8) merge two known; one immediate left, one far right
54 |/ / / /
54 |/ / / /
55 o | | | (7) expand
55 o | | | (7) expand
56 |\ \ \ \
56 |\ \ \ \
57 +---o | | (6) merge two known; one immediate left, one far left
57 +---o | | (6) merge two known; one immediate left, one far left
58 | |/ / /
58 | |/ / /
59 | o | | (5) expand
59 | o | | (5) expand
60 | |\ \ \
60 | |\ \ \
61 | | o | | (4) merge two known; one immediate left, one immediate right
61 | | o | | (4) merge two known; one immediate left, one immediate right
62 | |/|/ /
62 | |/|/ /
63 | o / / (3) collapse
63 | o / / (3) collapse
64 |/ / /
64 |/ / /
65 o / / (2) collapse
65 o / / (2) collapse
66 |/ /
66 |/ /
67 o / (1) collapse
67 o / (1) collapse
68 |/
68 |/
69 o (0) root
69 o (0) root
70
70
71
71
72 $ commit()
72 $ commit()
73 > {
73 > {
74 > rev=$1
74 > rev=$1
75 > msg=$2
75 > msg=$2
76 > shift 2
76 > shift 2
77 > if [ "$#" -gt 0 ]; then
77 > if [ "$#" -gt 0 ]; then
78 > hg debugsetparents "$@"
78 > hg debugsetparents "$@"
79 > fi
79 > fi
80 > echo $rev > a
80 > echo $rev > a
81 > hg commit -Aqd "$rev 0" -m "($rev) $msg"
81 > hg commit -Aqd "$rev 0" -m "($rev) $msg"
82 > }
82 > }
83
83
84 $ cat > printrevset.py <<EOF
84 $ cat > printrevset.py <<EOF
85 > from mercurial import extensions, revsetlang, commands, cmdutil
85 > from mercurial import extensions, revsetlang, commands, cmdutil
86 >
86 >
87 > def uisetup(ui):
87 > def uisetup(ui):
88 > def printrevset(orig, ui, repo, *pats, **opts):
88 > def printrevset(orig, ui, repo, *pats, **opts):
89 > if opts.get('print_revset'):
89 > if opts.get('print_revset'):
90 > expr = cmdutil.getgraphlogrevs(repo, pats, opts)[1]
90 > expr = cmdutil.getgraphlogrevs(repo, pats, opts)[1]
91 > if expr:
91 > if expr:
92 > tree = revsetlang.parse(expr)
92 > tree = revsetlang.parse(expr)
93 > else:
93 > else:
94 > tree = []
94 > tree = []
95 > ui.write('%r\n' % (opts.get('rev', []),))
95 > ui.write('%r\n' % (opts.get('rev', []),))
96 > ui.write(revsetlang.prettyformat(tree) + '\n')
96 > ui.write(revsetlang.prettyformat(tree) + '\n')
97 > return 0
97 > return 0
98 > return orig(ui, repo, *pats, **opts)
98 > return orig(ui, repo, *pats, **opts)
99 > entry = extensions.wrapcommand(commands.table, 'log', printrevset)
99 > entry = extensions.wrapcommand(commands.table, 'log', printrevset)
100 > entry[1].append(('', 'print-revset', False,
100 > entry[1].append(('', 'print-revset', False,
101 > 'print generated revset and exit (DEPRECATED)'))
101 > 'print generated revset and exit (DEPRECATED)'))
102 > EOF
102 > EOF
103
103
104 $ echo "[extensions]" >> $HGRCPATH
104 $ echo "[extensions]" >> $HGRCPATH
105 $ echo "printrevset=`pwd`/printrevset.py" >> $HGRCPATH
105 $ echo "printrevset=`pwd`/printrevset.py" >> $HGRCPATH
106
106
107 $ hg init repo
107 $ hg init repo
108 $ cd repo
108 $ cd repo
109
109
110 Empty repo:
110 Empty repo:
111
111
112 $ hg log -G
112 $ hg log -G
113
113
114
114
115 Building DAG:
115 Building DAG:
116
116
117 $ commit 0 "root"
117 $ commit 0 "root"
118 $ commit 1 "collapse" 0
118 $ commit 1 "collapse" 0
119 $ commit 2 "collapse" 1
119 $ commit 2 "collapse" 1
120 $ commit 3 "collapse" 2
120 $ commit 3 "collapse" 2
121 $ commit 4 "merge two known; one immediate left, one immediate right" 1 3
121 $ commit 4 "merge two known; one immediate left, one immediate right" 1 3
122 $ commit 5 "expand" 3 4
122 $ commit 5 "expand" 3 4
123 $ commit 6 "merge two known; one immediate left, one far left" 2 5
123 $ commit 6 "merge two known; one immediate left, one far left" 2 5
124 $ commit 7 "expand" 2 5
124 $ commit 7 "expand" 2 5
125 $ commit 8 "merge two known; one immediate left, one far right" 0 7
125 $ commit 8 "merge two known; one immediate left, one far right" 0 7
126 $ commit 9 "expand" 7 8
126 $ commit 9 "expand" 7 8
127 $ commit 10 "merge two known; one immediate left, one near right" 0 6
127 $ commit 10 "merge two known; one immediate left, one near right" 0 6
128 $ commit 11 "expand" 6 10
128 $ commit 11 "expand" 6 10
129 $ commit 12 "merge two known; one immediate right, one far left" 1 9
129 $ commit 12 "merge two known; one immediate right, one far left" 1 9
130 $ commit 13 "expand" 9 11
130 $ commit 13 "expand" 9 11
131 $ commit 14 "merge two known; one immediate right, one far right" 0 12
131 $ commit 14 "merge two known; one immediate right, one far right" 0 12
132 $ commit 15 "expand" 13 14
132 $ commit 15 "expand" 13 14
133 $ commit 16 "merge two known; one immediate right, one near right" 0 1
133 $ commit 16 "merge two known; one immediate right, one near right" 0 1
134 $ commit 17 "expand" 12 16
134 $ commit 17 "expand" 12 16
135 $ commit 18 "merge two known; two far left" 1 15
135 $ commit 18 "merge two known; two far left" 1 15
136 $ commit 19 "expand" 15 17
136 $ commit 19 "expand" 15 17
137 $ commit 20 "merge two known; two far right" 0 18
137 $ commit 20 "merge two known; two far right" 0 18
138 $ commit 21 "expand" 19 20
138 $ commit 21 "expand" 19 20
139 $ commit 22 "merge two known; one far left, one far right" 18 21
139 $ commit 22 "merge two known; one far left, one far right" 18 21
140 $ commit 23 "merge one known; immediate left" 1 22
140 $ commit 23 "merge one known; immediate left" 1 22
141 $ commit 24 "merge one known; immediate right" 0 23
141 $ commit 24 "merge one known; immediate right" 0 23
142 $ commit 25 "merge one known; far left" 21 24
142 $ commit 25 "merge one known; far left" 21 24
143 $ commit 26 "merge one known; far right" 18 25
143 $ commit 26 "merge one known; far right" 18 25
144 $ commit 27 "collapse" 21
144 $ commit 27 "collapse" 21
145 $ commit 28 "merge zero known" 1 26
145 $ commit 28 "merge zero known" 1 26
146 $ commit 29 "regular commit" 0
146 $ commit 29 "regular commit" 0
147 $ commit 30 "expand" 28 29
147 $ commit 30 "expand" 28 29
148 $ commit 31 "expand" 21 30
148 $ commit 31 "expand" 21 30
149 $ commit 32 "expand" 27 31
149 $ commit 32 "expand" 27 31
150 $ commit 33 "head" 18
150 $ commit 33 "head" 18
151 $ commit 34 "head" 32
151 $ commit 34 "head" 32
152
152
153
153
154 $ hg log -G -q
154 $ hg log -G -q
155 @ 34:fea3ac5810e0
155 @ 34:fea3ac5810e0
156 |
156 |
157 | o 33:68608f5145f9
157 | o 33:68608f5145f9
158 | |
158 | |
159 o | 32:d06dffa21a31
159 o | 32:d06dffa21a31
160 |\ \
160 |\ \
161 | o \ 31:621d83e11f67
161 | o \ 31:621d83e11f67
162 | |\ \
162 | |\ \
163 | | o \ 30:6e11cd4b648f
163 | | o \ 30:6e11cd4b648f
164 | | |\ \
164 | | |\ \
165 | | | o | 29:cd9bb2be7593
165 | | | o | 29:cd9bb2be7593
166 | | | | |
166 | | | | |
167 | | o | | 28:44ecd0b9ae99
167 | | o | | 28:44ecd0b9ae99
168 | | |\ \ \
168 | | |\ \ \
169 o | | | | | 27:886ed638191b
169 o | | | | | 27:886ed638191b
170 |/ / / / /
170 |/ / / / /
171 | | o---+ 26:7f25b6c2f0b9
171 | | o---+ 26:7f25b6c2f0b9
172 | | | | |
172 | | | | |
173 +---o | | 25:91da8ed57247
173 +---o | | 25:91da8ed57247
174 | | | | |
174 | | | | |
175 | | o | | 24:a9c19a3d96b7
175 | | o | | 24:a9c19a3d96b7
176 | | |\| |
176 | | |\| |
177 | | o | | 23:a01cddf0766d
177 | | o | | 23:a01cddf0766d
178 | |/| | |
178 | |/| | |
179 +---o---+ 22:e0d9cccacb5d
179 +---o---+ 22:e0d9cccacb5d
180 | | / /
180 | | / /
181 o | | | 21:d42a756af44d
181 o | | | 21:d42a756af44d
182 |\ \ \ \
182 |\ \ \ \
183 | o---+-+ 20:d30ed6450e32
183 | o---+-+ 20:d30ed6450e32
184 | / / /
184 | / / /
185 o | | | 19:31ddc2c1573b
185 o | | | 19:31ddc2c1573b
186 |\ \ \ \
186 |\ \ \ \
187 +---+---o 18:1aa84d96232a
187 +---+---o 18:1aa84d96232a
188 | | | |
188 | | | |
189 | o | | 17:44765d7c06e0
189 | o | | 17:44765d7c06e0
190 | |\ \ \
190 | |\ \ \
191 | | o---+ 16:3677d192927d
191 | | o---+ 16:3677d192927d
192 | | |/ /
192 | | |/ /
193 o | | | 15:1dda3f72782d
193 o | | | 15:1dda3f72782d
194 |\ \ \ \
194 |\ \ \ \
195 | o-----+ 14:8eac370358ef
195 | o-----+ 14:8eac370358ef
196 | |/ / /
196 | |/ / /
197 o | | | 13:22d8966a97e3
197 o | | | 13:22d8966a97e3
198 |\ \ \ \
198 |\ \ \ \
199 +---o | | 12:86b91144a6e9
199 +---o | | 12:86b91144a6e9
200 | | |/ /
200 | | |/ /
201 | o | | 11:832d76e6bdf2
201 | o | | 11:832d76e6bdf2
202 | |\ \ \
202 | |\ \ \
203 | | o---+ 10:74c64d036d72
203 | | o---+ 10:74c64d036d72
204 | |/ / /
204 | |/ / /
205 o | | | 9:7010c0af0a35
205 o | | | 9:7010c0af0a35
206 |\ \ \ \
206 |\ \ \ \
207 | o-----+ 8:7a0b11f71937
207 | o-----+ 8:7a0b11f71937
208 |/ / / /
208 |/ / / /
209 o | | | 7:b632bb1b1224
209 o | | | 7:b632bb1b1224
210 |\ \ \ \
210 |\ \ \ \
211 +---o | | 6:b105a072e251
211 +---o | | 6:b105a072e251
212 | |/ / /
212 | |/ / /
213 | o | | 5:4409d547b708
213 | o | | 5:4409d547b708
214 | |\ \ \
214 | |\ \ \
215 | | o | | 4:26a8bac39d9f
215 | | o | | 4:26a8bac39d9f
216 | |/|/ /
216 | |/|/ /
217 | o / / 3:27eef8ed80b4
217 | o / / 3:27eef8ed80b4
218 |/ / /
218 |/ / /
219 o / / 2:3d9a33b8d1e1
219 o / / 2:3d9a33b8d1e1
220 |/ /
220 |/ /
221 o / 1:6db2ef61d156
221 o / 1:6db2ef61d156
222 |/
222 |/
223 o 0:e6eb3150255d
223 o 0:e6eb3150255d
224
224
225
225
226 $ hg log -G
226 $ hg log -G
227 @ changeset: 34:fea3ac5810e0
227 @ changeset: 34:fea3ac5810e0
228 | tag: tip
228 | tag: tip
229 | parent: 32:d06dffa21a31
229 | parent: 32:d06dffa21a31
230 | user: test
230 | user: test
231 | date: Thu Jan 01 00:00:34 1970 +0000
231 | date: Thu Jan 01 00:00:34 1970 +0000
232 | summary: (34) head
232 | summary: (34) head
233 |
233 |
234 | o changeset: 33:68608f5145f9
234 | o changeset: 33:68608f5145f9
235 | | parent: 18:1aa84d96232a
235 | | parent: 18:1aa84d96232a
236 | | user: test
236 | | user: test
237 | | date: Thu Jan 01 00:00:33 1970 +0000
237 | | date: Thu Jan 01 00:00:33 1970 +0000
238 | | summary: (33) head
238 | | summary: (33) head
239 | |
239 | |
240 o | changeset: 32:d06dffa21a31
240 o | changeset: 32:d06dffa21a31
241 |\ \ parent: 27:886ed638191b
241 |\ \ parent: 27:886ed638191b
242 | | | parent: 31:621d83e11f67
242 | | | parent: 31:621d83e11f67
243 | | | user: test
243 | | | user: test
244 | | | date: Thu Jan 01 00:00:32 1970 +0000
244 | | | date: Thu Jan 01 00:00:32 1970 +0000
245 | | | summary: (32) expand
245 | | | summary: (32) expand
246 | | |
246 | | |
247 | o | changeset: 31:621d83e11f67
247 | o | changeset: 31:621d83e11f67
248 | |\ \ parent: 21:d42a756af44d
248 | |\ \ parent: 21:d42a756af44d
249 | | | | parent: 30:6e11cd4b648f
249 | | | | parent: 30:6e11cd4b648f
250 | | | | user: test
250 | | | | user: test
251 | | | | date: Thu Jan 01 00:00:31 1970 +0000
251 | | | | date: Thu Jan 01 00:00:31 1970 +0000
252 | | | | summary: (31) expand
252 | | | | summary: (31) expand
253 | | | |
253 | | | |
254 | | o | changeset: 30:6e11cd4b648f
254 | | o | changeset: 30:6e11cd4b648f
255 | | |\ \ parent: 28:44ecd0b9ae99
255 | | |\ \ parent: 28:44ecd0b9ae99
256 | | | | | parent: 29:cd9bb2be7593
256 | | | | | parent: 29:cd9bb2be7593
257 | | | | | user: test
257 | | | | | user: test
258 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
258 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
259 | | | | | summary: (30) expand
259 | | | | | summary: (30) expand
260 | | | | |
260 | | | | |
261 | | | o | changeset: 29:cd9bb2be7593
261 | | | o | changeset: 29:cd9bb2be7593
262 | | | | | parent: 0:e6eb3150255d
262 | | | | | parent: 0:e6eb3150255d
263 | | | | | user: test
263 | | | | | user: test
264 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
264 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
265 | | | | | summary: (29) regular commit
265 | | | | | summary: (29) regular commit
266 | | | | |
266 | | | | |
267 | | o | | changeset: 28:44ecd0b9ae99
267 | | o | | changeset: 28:44ecd0b9ae99
268 | | |\ \ \ parent: 1:6db2ef61d156
268 | | |\ \ \ parent: 1:6db2ef61d156
269 | | | | | | parent: 26:7f25b6c2f0b9
269 | | | | | | parent: 26:7f25b6c2f0b9
270 | | | | | | user: test
270 | | | | | | user: test
271 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
271 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
272 | | | | | | summary: (28) merge zero known
272 | | | | | | summary: (28) merge zero known
273 | | | | | |
273 | | | | | |
274 o | | | | | changeset: 27:886ed638191b
274 o | | | | | changeset: 27:886ed638191b
275 |/ / / / / parent: 21:d42a756af44d
275 |/ / / / / parent: 21:d42a756af44d
276 | | | | | user: test
276 | | | | | user: test
277 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
277 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
278 | | | | | summary: (27) collapse
278 | | | | | summary: (27) collapse
279 | | | | |
279 | | | | |
280 | | o---+ changeset: 26:7f25b6c2f0b9
280 | | o---+ changeset: 26:7f25b6c2f0b9
281 | | | | | parent: 18:1aa84d96232a
281 | | | | | parent: 18:1aa84d96232a
282 | | | | | parent: 25:91da8ed57247
282 | | | | | parent: 25:91da8ed57247
283 | | | | | user: test
283 | | | | | user: test
284 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
284 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
285 | | | | | summary: (26) merge one known; far right
285 | | | | | summary: (26) merge one known; far right
286 | | | | |
286 | | | | |
287 +---o | | changeset: 25:91da8ed57247
287 +---o | | changeset: 25:91da8ed57247
288 | | | | | parent: 21:d42a756af44d
288 | | | | | parent: 21:d42a756af44d
289 | | | | | parent: 24:a9c19a3d96b7
289 | | | | | parent: 24:a9c19a3d96b7
290 | | | | | user: test
290 | | | | | user: test
291 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
291 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
292 | | | | | summary: (25) merge one known; far left
292 | | | | | summary: (25) merge one known; far left
293 | | | | |
293 | | | | |
294 | | o | | changeset: 24:a9c19a3d96b7
294 | | o | | changeset: 24:a9c19a3d96b7
295 | | |\| | parent: 0:e6eb3150255d
295 | | |\| | parent: 0:e6eb3150255d
296 | | | | | parent: 23:a01cddf0766d
296 | | | | | parent: 23:a01cddf0766d
297 | | | | | user: test
297 | | | | | user: test
298 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
298 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
299 | | | | | summary: (24) merge one known; immediate right
299 | | | | | summary: (24) merge one known; immediate right
300 | | | | |
300 | | | | |
301 | | o | | changeset: 23:a01cddf0766d
301 | | o | | changeset: 23:a01cddf0766d
302 | |/| | | parent: 1:6db2ef61d156
302 | |/| | | parent: 1:6db2ef61d156
303 | | | | | parent: 22:e0d9cccacb5d
303 | | | | | parent: 22:e0d9cccacb5d
304 | | | | | user: test
304 | | | | | user: test
305 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
305 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
306 | | | | | summary: (23) merge one known; immediate left
306 | | | | | summary: (23) merge one known; immediate left
307 | | | | |
307 | | | | |
308 +---o---+ changeset: 22:e0d9cccacb5d
308 +---o---+ changeset: 22:e0d9cccacb5d
309 | | | | parent: 18:1aa84d96232a
309 | | | | parent: 18:1aa84d96232a
310 | | / / parent: 21:d42a756af44d
310 | | / / parent: 21:d42a756af44d
311 | | | | user: test
311 | | | | user: test
312 | | | | date: Thu Jan 01 00:00:22 1970 +0000
312 | | | | date: Thu Jan 01 00:00:22 1970 +0000
313 | | | | summary: (22) merge two known; one far left, one far right
313 | | | | summary: (22) merge two known; one far left, one far right
314 | | | |
314 | | | |
315 o | | | changeset: 21:d42a756af44d
315 o | | | changeset: 21:d42a756af44d
316 |\ \ \ \ parent: 19:31ddc2c1573b
316 |\ \ \ \ parent: 19:31ddc2c1573b
317 | | | | | parent: 20:d30ed6450e32
317 | | | | | parent: 20:d30ed6450e32
318 | | | | | user: test
318 | | | | | user: test
319 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
319 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
320 | | | | | summary: (21) expand
320 | | | | | summary: (21) expand
321 | | | | |
321 | | | | |
322 | o---+-+ changeset: 20:d30ed6450e32
322 | o---+-+ changeset: 20:d30ed6450e32
323 | | | | parent: 0:e6eb3150255d
323 | | | | parent: 0:e6eb3150255d
324 | / / / parent: 18:1aa84d96232a
324 | / / / parent: 18:1aa84d96232a
325 | | | | user: test
325 | | | | user: test
326 | | | | date: Thu Jan 01 00:00:20 1970 +0000
326 | | | | date: Thu Jan 01 00:00:20 1970 +0000
327 | | | | summary: (20) merge two known; two far right
327 | | | | summary: (20) merge two known; two far right
328 | | | |
328 | | | |
329 o | | | changeset: 19:31ddc2c1573b
329 o | | | changeset: 19:31ddc2c1573b
330 |\ \ \ \ parent: 15:1dda3f72782d
330 |\ \ \ \ parent: 15:1dda3f72782d
331 | | | | | parent: 17:44765d7c06e0
331 | | | | | parent: 17:44765d7c06e0
332 | | | | | user: test
332 | | | | | user: test
333 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
333 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
334 | | | | | summary: (19) expand
334 | | | | | summary: (19) expand
335 | | | | |
335 | | | | |
336 +---+---o changeset: 18:1aa84d96232a
336 +---+---o changeset: 18:1aa84d96232a
337 | | | | parent: 1:6db2ef61d156
337 | | | | parent: 1:6db2ef61d156
338 | | | | parent: 15:1dda3f72782d
338 | | | | parent: 15:1dda3f72782d
339 | | | | user: test
339 | | | | user: test
340 | | | | date: Thu Jan 01 00:00:18 1970 +0000
340 | | | | date: Thu Jan 01 00:00:18 1970 +0000
341 | | | | summary: (18) merge two known; two far left
341 | | | | summary: (18) merge two known; two far left
342 | | | |
342 | | | |
343 | o | | changeset: 17:44765d7c06e0
343 | o | | changeset: 17:44765d7c06e0
344 | |\ \ \ parent: 12:86b91144a6e9
344 | |\ \ \ parent: 12:86b91144a6e9
345 | | | | | parent: 16:3677d192927d
345 | | | | | parent: 16:3677d192927d
346 | | | | | user: test
346 | | | | | user: test
347 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
347 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
348 | | | | | summary: (17) expand
348 | | | | | summary: (17) expand
349 | | | | |
349 | | | | |
350 | | o---+ changeset: 16:3677d192927d
350 | | o---+ changeset: 16:3677d192927d
351 | | | | | parent: 0:e6eb3150255d
351 | | | | | parent: 0:e6eb3150255d
352 | | |/ / parent: 1:6db2ef61d156
352 | | |/ / parent: 1:6db2ef61d156
353 | | | | user: test
353 | | | | user: test
354 | | | | date: Thu Jan 01 00:00:16 1970 +0000
354 | | | | date: Thu Jan 01 00:00:16 1970 +0000
355 | | | | summary: (16) merge two known; one immediate right, one near right
355 | | | | summary: (16) merge two known; one immediate right, one near right
356 | | | |
356 | | | |
357 o | | | changeset: 15:1dda3f72782d
357 o | | | changeset: 15:1dda3f72782d
358 |\ \ \ \ parent: 13:22d8966a97e3
358 |\ \ \ \ parent: 13:22d8966a97e3
359 | | | | | parent: 14:8eac370358ef
359 | | | | | parent: 14:8eac370358ef
360 | | | | | user: test
360 | | | | | user: test
361 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
361 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
362 | | | | | summary: (15) expand
362 | | | | | summary: (15) expand
363 | | | | |
363 | | | | |
364 | o-----+ changeset: 14:8eac370358ef
364 | o-----+ changeset: 14:8eac370358ef
365 | | | | | parent: 0:e6eb3150255d
365 | | | | | parent: 0:e6eb3150255d
366 | |/ / / parent: 12:86b91144a6e9
366 | |/ / / parent: 12:86b91144a6e9
367 | | | | user: test
367 | | | | user: test
368 | | | | date: Thu Jan 01 00:00:14 1970 +0000
368 | | | | date: Thu Jan 01 00:00:14 1970 +0000
369 | | | | summary: (14) merge two known; one immediate right, one far right
369 | | | | summary: (14) merge two known; one immediate right, one far right
370 | | | |
370 | | | |
371 o | | | changeset: 13:22d8966a97e3
371 o | | | changeset: 13:22d8966a97e3
372 |\ \ \ \ parent: 9:7010c0af0a35
372 |\ \ \ \ parent: 9:7010c0af0a35
373 | | | | | parent: 11:832d76e6bdf2
373 | | | | | parent: 11:832d76e6bdf2
374 | | | | | user: test
374 | | | | | user: test
375 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
375 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
376 | | | | | summary: (13) expand
376 | | | | | summary: (13) expand
377 | | | | |
377 | | | | |
378 +---o | | changeset: 12:86b91144a6e9
378 +---o | | changeset: 12:86b91144a6e9
379 | | |/ / parent: 1:6db2ef61d156
379 | | |/ / parent: 1:6db2ef61d156
380 | | | | parent: 9:7010c0af0a35
380 | | | | parent: 9:7010c0af0a35
381 | | | | user: test
381 | | | | user: test
382 | | | | date: Thu Jan 01 00:00:12 1970 +0000
382 | | | | date: Thu Jan 01 00:00:12 1970 +0000
383 | | | | summary: (12) merge two known; one immediate right, one far left
383 | | | | summary: (12) merge two known; one immediate right, one far left
384 | | | |
384 | | | |
385 | o | | changeset: 11:832d76e6bdf2
385 | o | | changeset: 11:832d76e6bdf2
386 | |\ \ \ parent: 6:b105a072e251
386 | |\ \ \ parent: 6:b105a072e251
387 | | | | | parent: 10:74c64d036d72
387 | | | | | parent: 10:74c64d036d72
388 | | | | | user: test
388 | | | | | user: test
389 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
389 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
390 | | | | | summary: (11) expand
390 | | | | | summary: (11) expand
391 | | | | |
391 | | | | |
392 | | o---+ changeset: 10:74c64d036d72
392 | | o---+ changeset: 10:74c64d036d72
393 | | | | | parent: 0:e6eb3150255d
393 | | | | | parent: 0:e6eb3150255d
394 | |/ / / parent: 6:b105a072e251
394 | |/ / / parent: 6:b105a072e251
395 | | | | user: test
395 | | | | user: test
396 | | | | date: Thu Jan 01 00:00:10 1970 +0000
396 | | | | date: Thu Jan 01 00:00:10 1970 +0000
397 | | | | summary: (10) merge two known; one immediate left, one near right
397 | | | | summary: (10) merge two known; one immediate left, one near right
398 | | | |
398 | | | |
399 o | | | changeset: 9:7010c0af0a35
399 o | | | changeset: 9:7010c0af0a35
400 |\ \ \ \ parent: 7:b632bb1b1224
400 |\ \ \ \ parent: 7:b632bb1b1224
401 | | | | | parent: 8:7a0b11f71937
401 | | | | | parent: 8:7a0b11f71937
402 | | | | | user: test
402 | | | | | user: test
403 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
403 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
404 | | | | | summary: (9) expand
404 | | | | | summary: (9) expand
405 | | | | |
405 | | | | |
406 | o-----+ changeset: 8:7a0b11f71937
406 | o-----+ changeset: 8:7a0b11f71937
407 | | | | | parent: 0:e6eb3150255d
407 | | | | | parent: 0:e6eb3150255d
408 |/ / / / parent: 7:b632bb1b1224
408 |/ / / / parent: 7:b632bb1b1224
409 | | | | user: test
409 | | | | user: test
410 | | | | date: Thu Jan 01 00:00:08 1970 +0000
410 | | | | date: Thu Jan 01 00:00:08 1970 +0000
411 | | | | summary: (8) merge two known; one immediate left, one far right
411 | | | | summary: (8) merge two known; one immediate left, one far right
412 | | | |
412 | | | |
413 o | | | changeset: 7:b632bb1b1224
413 o | | | changeset: 7:b632bb1b1224
414 |\ \ \ \ parent: 2:3d9a33b8d1e1
414 |\ \ \ \ parent: 2:3d9a33b8d1e1
415 | | | | | parent: 5:4409d547b708
415 | | | | | parent: 5:4409d547b708
416 | | | | | user: test
416 | | | | | user: test
417 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
417 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
418 | | | | | summary: (7) expand
418 | | | | | summary: (7) expand
419 | | | | |
419 | | | | |
420 +---o | | changeset: 6:b105a072e251
420 +---o | | changeset: 6:b105a072e251
421 | |/ / / parent: 2:3d9a33b8d1e1
421 | |/ / / parent: 2:3d9a33b8d1e1
422 | | | | parent: 5:4409d547b708
422 | | | | parent: 5:4409d547b708
423 | | | | user: test
423 | | | | user: test
424 | | | | date: Thu Jan 01 00:00:06 1970 +0000
424 | | | | date: Thu Jan 01 00:00:06 1970 +0000
425 | | | | summary: (6) merge two known; one immediate left, one far left
425 | | | | summary: (6) merge two known; one immediate left, one far left
426 | | | |
426 | | | |
427 | o | | changeset: 5:4409d547b708
427 | o | | changeset: 5:4409d547b708
428 | |\ \ \ parent: 3:27eef8ed80b4
428 | |\ \ \ parent: 3:27eef8ed80b4
429 | | | | | parent: 4:26a8bac39d9f
429 | | | | | parent: 4:26a8bac39d9f
430 | | | | | user: test
430 | | | | | user: test
431 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
431 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
432 | | | | | summary: (5) expand
432 | | | | | summary: (5) expand
433 | | | | |
433 | | | | |
434 | | o | | changeset: 4:26a8bac39d9f
434 | | o | | changeset: 4:26a8bac39d9f
435 | |/|/ / parent: 1:6db2ef61d156
435 | |/|/ / parent: 1:6db2ef61d156
436 | | | | parent: 3:27eef8ed80b4
436 | | | | parent: 3:27eef8ed80b4
437 | | | | user: test
437 | | | | user: test
438 | | | | date: Thu Jan 01 00:00:04 1970 +0000
438 | | | | date: Thu Jan 01 00:00:04 1970 +0000
439 | | | | summary: (4) merge two known; one immediate left, one immediate right
439 | | | | summary: (4) merge two known; one immediate left, one immediate right
440 | | | |
440 | | | |
441 | o | | changeset: 3:27eef8ed80b4
441 | o | | changeset: 3:27eef8ed80b4
442 |/ / / user: test
442 |/ / / user: test
443 | | | date: Thu Jan 01 00:00:03 1970 +0000
443 | | | date: Thu Jan 01 00:00:03 1970 +0000
444 | | | summary: (3) collapse
444 | | | summary: (3) collapse
445 | | |
445 | | |
446 o | | changeset: 2:3d9a33b8d1e1
446 o | | changeset: 2:3d9a33b8d1e1
447 |/ / user: test
447 |/ / user: test
448 | | date: Thu Jan 01 00:00:02 1970 +0000
448 | | date: Thu Jan 01 00:00:02 1970 +0000
449 | | summary: (2) collapse
449 | | summary: (2) collapse
450 | |
450 | |
451 o | changeset: 1:6db2ef61d156
451 o | changeset: 1:6db2ef61d156
452 |/ user: test
452 |/ user: test
453 | date: Thu Jan 01 00:00:01 1970 +0000
453 | date: Thu Jan 01 00:00:01 1970 +0000
454 | summary: (1) collapse
454 | summary: (1) collapse
455 |
455 |
456 o changeset: 0:e6eb3150255d
456 o changeset: 0:e6eb3150255d
457 user: test
457 user: test
458 date: Thu Jan 01 00:00:00 1970 +0000
458 date: Thu Jan 01 00:00:00 1970 +0000
459 summary: (0) root
459 summary: (0) root
460
460
461
461
462 File glog:
462 File glog:
463 $ hg log -G a
463 $ hg log -G a
464 @ changeset: 34:fea3ac5810e0
464 @ changeset: 34:fea3ac5810e0
465 | tag: tip
465 | tag: tip
466 | parent: 32:d06dffa21a31
466 | parent: 32:d06dffa21a31
467 | user: test
467 | user: test
468 | date: Thu Jan 01 00:00:34 1970 +0000
468 | date: Thu Jan 01 00:00:34 1970 +0000
469 | summary: (34) head
469 | summary: (34) head
470 |
470 |
471 | o changeset: 33:68608f5145f9
471 | o changeset: 33:68608f5145f9
472 | | parent: 18:1aa84d96232a
472 | | parent: 18:1aa84d96232a
473 | | user: test
473 | | user: test
474 | | date: Thu Jan 01 00:00:33 1970 +0000
474 | | date: Thu Jan 01 00:00:33 1970 +0000
475 | | summary: (33) head
475 | | summary: (33) head
476 | |
476 | |
477 o | changeset: 32:d06dffa21a31
477 o | changeset: 32:d06dffa21a31
478 |\ \ parent: 27:886ed638191b
478 |\ \ parent: 27:886ed638191b
479 | | | parent: 31:621d83e11f67
479 | | | parent: 31:621d83e11f67
480 | | | user: test
480 | | | user: test
481 | | | date: Thu Jan 01 00:00:32 1970 +0000
481 | | | date: Thu Jan 01 00:00:32 1970 +0000
482 | | | summary: (32) expand
482 | | | summary: (32) expand
483 | | |
483 | | |
484 | o | changeset: 31:621d83e11f67
484 | o | changeset: 31:621d83e11f67
485 | |\ \ parent: 21:d42a756af44d
485 | |\ \ parent: 21:d42a756af44d
486 | | | | parent: 30:6e11cd4b648f
486 | | | | parent: 30:6e11cd4b648f
487 | | | | user: test
487 | | | | user: test
488 | | | | date: Thu Jan 01 00:00:31 1970 +0000
488 | | | | date: Thu Jan 01 00:00:31 1970 +0000
489 | | | | summary: (31) expand
489 | | | | summary: (31) expand
490 | | | |
490 | | | |
491 | | o | changeset: 30:6e11cd4b648f
491 | | o | changeset: 30:6e11cd4b648f
492 | | |\ \ parent: 28:44ecd0b9ae99
492 | | |\ \ parent: 28:44ecd0b9ae99
493 | | | | | parent: 29:cd9bb2be7593
493 | | | | | parent: 29:cd9bb2be7593
494 | | | | | user: test
494 | | | | | user: test
495 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
495 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
496 | | | | | summary: (30) expand
496 | | | | | summary: (30) expand
497 | | | | |
497 | | | | |
498 | | | o | changeset: 29:cd9bb2be7593
498 | | | o | changeset: 29:cd9bb2be7593
499 | | | | | parent: 0:e6eb3150255d
499 | | | | | parent: 0:e6eb3150255d
500 | | | | | user: test
500 | | | | | user: test
501 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
501 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
502 | | | | | summary: (29) regular commit
502 | | | | | summary: (29) regular commit
503 | | | | |
503 | | | | |
504 | | o | | changeset: 28:44ecd0b9ae99
504 | | o | | changeset: 28:44ecd0b9ae99
505 | | |\ \ \ parent: 1:6db2ef61d156
505 | | |\ \ \ parent: 1:6db2ef61d156
506 | | | | | | parent: 26:7f25b6c2f0b9
506 | | | | | | parent: 26:7f25b6c2f0b9
507 | | | | | | user: test
507 | | | | | | user: test
508 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
508 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
509 | | | | | | summary: (28) merge zero known
509 | | | | | | summary: (28) merge zero known
510 | | | | | |
510 | | | | | |
511 o | | | | | changeset: 27:886ed638191b
511 o | | | | | changeset: 27:886ed638191b
512 |/ / / / / parent: 21:d42a756af44d
512 |/ / / / / parent: 21:d42a756af44d
513 | | | | | user: test
513 | | | | | user: test
514 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
514 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
515 | | | | | summary: (27) collapse
515 | | | | | summary: (27) collapse
516 | | | | |
516 | | | | |
517 | | o---+ changeset: 26:7f25b6c2f0b9
517 | | o---+ changeset: 26:7f25b6c2f0b9
518 | | | | | parent: 18:1aa84d96232a
518 | | | | | parent: 18:1aa84d96232a
519 | | | | | parent: 25:91da8ed57247
519 | | | | | parent: 25:91da8ed57247
520 | | | | | user: test
520 | | | | | user: test
521 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
521 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
522 | | | | | summary: (26) merge one known; far right
522 | | | | | summary: (26) merge one known; far right
523 | | | | |
523 | | | | |
524 +---o | | changeset: 25:91da8ed57247
524 +---o | | changeset: 25:91da8ed57247
525 | | | | | parent: 21:d42a756af44d
525 | | | | | parent: 21:d42a756af44d
526 | | | | | parent: 24:a9c19a3d96b7
526 | | | | | parent: 24:a9c19a3d96b7
527 | | | | | user: test
527 | | | | | user: test
528 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
528 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
529 | | | | | summary: (25) merge one known; far left
529 | | | | | summary: (25) merge one known; far left
530 | | | | |
530 | | | | |
531 | | o | | changeset: 24:a9c19a3d96b7
531 | | o | | changeset: 24:a9c19a3d96b7
532 | | |\| | parent: 0:e6eb3150255d
532 | | |\| | parent: 0:e6eb3150255d
533 | | | | | parent: 23:a01cddf0766d
533 | | | | | parent: 23:a01cddf0766d
534 | | | | | user: test
534 | | | | | user: test
535 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
535 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
536 | | | | | summary: (24) merge one known; immediate right
536 | | | | | summary: (24) merge one known; immediate right
537 | | | | |
537 | | | | |
538 | | o | | changeset: 23:a01cddf0766d
538 | | o | | changeset: 23:a01cddf0766d
539 | |/| | | parent: 1:6db2ef61d156
539 | |/| | | parent: 1:6db2ef61d156
540 | | | | | parent: 22:e0d9cccacb5d
540 | | | | | parent: 22:e0d9cccacb5d
541 | | | | | user: test
541 | | | | | user: test
542 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
542 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
543 | | | | | summary: (23) merge one known; immediate left
543 | | | | | summary: (23) merge one known; immediate left
544 | | | | |
544 | | | | |
545 +---o---+ changeset: 22:e0d9cccacb5d
545 +---o---+ changeset: 22:e0d9cccacb5d
546 | | | | parent: 18:1aa84d96232a
546 | | | | parent: 18:1aa84d96232a
547 | | / / parent: 21:d42a756af44d
547 | | / / parent: 21:d42a756af44d
548 | | | | user: test
548 | | | | user: test
549 | | | | date: Thu Jan 01 00:00:22 1970 +0000
549 | | | | date: Thu Jan 01 00:00:22 1970 +0000
550 | | | | summary: (22) merge two known; one far left, one far right
550 | | | | summary: (22) merge two known; one far left, one far right
551 | | | |
551 | | | |
552 o | | | changeset: 21:d42a756af44d
552 o | | | changeset: 21:d42a756af44d
553 |\ \ \ \ parent: 19:31ddc2c1573b
553 |\ \ \ \ parent: 19:31ddc2c1573b
554 | | | | | parent: 20:d30ed6450e32
554 | | | | | parent: 20:d30ed6450e32
555 | | | | | user: test
555 | | | | | user: test
556 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
556 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
557 | | | | | summary: (21) expand
557 | | | | | summary: (21) expand
558 | | | | |
558 | | | | |
559 | o---+-+ changeset: 20:d30ed6450e32
559 | o---+-+ changeset: 20:d30ed6450e32
560 | | | | parent: 0:e6eb3150255d
560 | | | | parent: 0:e6eb3150255d
561 | / / / parent: 18:1aa84d96232a
561 | / / / parent: 18:1aa84d96232a
562 | | | | user: test
562 | | | | user: test
563 | | | | date: Thu Jan 01 00:00:20 1970 +0000
563 | | | | date: Thu Jan 01 00:00:20 1970 +0000
564 | | | | summary: (20) merge two known; two far right
564 | | | | summary: (20) merge two known; two far right
565 | | | |
565 | | | |
566 o | | | changeset: 19:31ddc2c1573b
566 o | | | changeset: 19:31ddc2c1573b
567 |\ \ \ \ parent: 15:1dda3f72782d
567 |\ \ \ \ parent: 15:1dda3f72782d
568 | | | | | parent: 17:44765d7c06e0
568 | | | | | parent: 17:44765d7c06e0
569 | | | | | user: test
569 | | | | | user: test
570 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
570 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
571 | | | | | summary: (19) expand
571 | | | | | summary: (19) expand
572 | | | | |
572 | | | | |
573 +---+---o changeset: 18:1aa84d96232a
573 +---+---o changeset: 18:1aa84d96232a
574 | | | | parent: 1:6db2ef61d156
574 | | | | parent: 1:6db2ef61d156
575 | | | | parent: 15:1dda3f72782d
575 | | | | parent: 15:1dda3f72782d
576 | | | | user: test
576 | | | | user: test
577 | | | | date: Thu Jan 01 00:00:18 1970 +0000
577 | | | | date: Thu Jan 01 00:00:18 1970 +0000
578 | | | | summary: (18) merge two known; two far left
578 | | | | summary: (18) merge two known; two far left
579 | | | |
579 | | | |
580 | o | | changeset: 17:44765d7c06e0
580 | o | | changeset: 17:44765d7c06e0
581 | |\ \ \ parent: 12:86b91144a6e9
581 | |\ \ \ parent: 12:86b91144a6e9
582 | | | | | parent: 16:3677d192927d
582 | | | | | parent: 16:3677d192927d
583 | | | | | user: test
583 | | | | | user: test
584 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
584 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
585 | | | | | summary: (17) expand
585 | | | | | summary: (17) expand
586 | | | | |
586 | | | | |
587 | | o---+ changeset: 16:3677d192927d
587 | | o---+ changeset: 16:3677d192927d
588 | | | | | parent: 0:e6eb3150255d
588 | | | | | parent: 0:e6eb3150255d
589 | | |/ / parent: 1:6db2ef61d156
589 | | |/ / parent: 1:6db2ef61d156
590 | | | | user: test
590 | | | | user: test
591 | | | | date: Thu Jan 01 00:00:16 1970 +0000
591 | | | | date: Thu Jan 01 00:00:16 1970 +0000
592 | | | | summary: (16) merge two known; one immediate right, one near right
592 | | | | summary: (16) merge two known; one immediate right, one near right
593 | | | |
593 | | | |
594 o | | | changeset: 15:1dda3f72782d
594 o | | | changeset: 15:1dda3f72782d
595 |\ \ \ \ parent: 13:22d8966a97e3
595 |\ \ \ \ parent: 13:22d8966a97e3
596 | | | | | parent: 14:8eac370358ef
596 | | | | | parent: 14:8eac370358ef
597 | | | | | user: test
597 | | | | | user: test
598 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
598 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
599 | | | | | summary: (15) expand
599 | | | | | summary: (15) expand
600 | | | | |
600 | | | | |
601 | o-----+ changeset: 14:8eac370358ef
601 | o-----+ changeset: 14:8eac370358ef
602 | | | | | parent: 0:e6eb3150255d
602 | | | | | parent: 0:e6eb3150255d
603 | |/ / / parent: 12:86b91144a6e9
603 | |/ / / parent: 12:86b91144a6e9
604 | | | | user: test
604 | | | | user: test
605 | | | | date: Thu Jan 01 00:00:14 1970 +0000
605 | | | | date: Thu Jan 01 00:00:14 1970 +0000
606 | | | | summary: (14) merge two known; one immediate right, one far right
606 | | | | summary: (14) merge two known; one immediate right, one far right
607 | | | |
607 | | | |
608 o | | | changeset: 13:22d8966a97e3
608 o | | | changeset: 13:22d8966a97e3
609 |\ \ \ \ parent: 9:7010c0af0a35
609 |\ \ \ \ parent: 9:7010c0af0a35
610 | | | | | parent: 11:832d76e6bdf2
610 | | | | | parent: 11:832d76e6bdf2
611 | | | | | user: test
611 | | | | | user: test
612 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
612 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
613 | | | | | summary: (13) expand
613 | | | | | summary: (13) expand
614 | | | | |
614 | | | | |
615 +---o | | changeset: 12:86b91144a6e9
615 +---o | | changeset: 12:86b91144a6e9
616 | | |/ / parent: 1:6db2ef61d156
616 | | |/ / parent: 1:6db2ef61d156
617 | | | | parent: 9:7010c0af0a35
617 | | | | parent: 9:7010c0af0a35
618 | | | | user: test
618 | | | | user: test
619 | | | | date: Thu Jan 01 00:00:12 1970 +0000
619 | | | | date: Thu Jan 01 00:00:12 1970 +0000
620 | | | | summary: (12) merge two known; one immediate right, one far left
620 | | | | summary: (12) merge two known; one immediate right, one far left
621 | | | |
621 | | | |
622 | o | | changeset: 11:832d76e6bdf2
622 | o | | changeset: 11:832d76e6bdf2
623 | |\ \ \ parent: 6:b105a072e251
623 | |\ \ \ parent: 6:b105a072e251
624 | | | | | parent: 10:74c64d036d72
624 | | | | | parent: 10:74c64d036d72
625 | | | | | user: test
625 | | | | | user: test
626 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
626 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
627 | | | | | summary: (11) expand
627 | | | | | summary: (11) expand
628 | | | | |
628 | | | | |
629 | | o---+ changeset: 10:74c64d036d72
629 | | o---+ changeset: 10:74c64d036d72
630 | | | | | parent: 0:e6eb3150255d
630 | | | | | parent: 0:e6eb3150255d
631 | |/ / / parent: 6:b105a072e251
631 | |/ / / parent: 6:b105a072e251
632 | | | | user: test
632 | | | | user: test
633 | | | | date: Thu Jan 01 00:00:10 1970 +0000
633 | | | | date: Thu Jan 01 00:00:10 1970 +0000
634 | | | | summary: (10) merge two known; one immediate left, one near right
634 | | | | summary: (10) merge two known; one immediate left, one near right
635 | | | |
635 | | | |
636 o | | | changeset: 9:7010c0af0a35
636 o | | | changeset: 9:7010c0af0a35
637 |\ \ \ \ parent: 7:b632bb1b1224
637 |\ \ \ \ parent: 7:b632bb1b1224
638 | | | | | parent: 8:7a0b11f71937
638 | | | | | parent: 8:7a0b11f71937
639 | | | | | user: test
639 | | | | | user: test
640 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
640 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
641 | | | | | summary: (9) expand
641 | | | | | summary: (9) expand
642 | | | | |
642 | | | | |
643 | o-----+ changeset: 8:7a0b11f71937
643 | o-----+ changeset: 8:7a0b11f71937
644 | | | | | parent: 0:e6eb3150255d
644 | | | | | parent: 0:e6eb3150255d
645 |/ / / / parent: 7:b632bb1b1224
645 |/ / / / parent: 7:b632bb1b1224
646 | | | | user: test
646 | | | | user: test
647 | | | | date: Thu Jan 01 00:00:08 1970 +0000
647 | | | | date: Thu Jan 01 00:00:08 1970 +0000
648 | | | | summary: (8) merge two known; one immediate left, one far right
648 | | | | summary: (8) merge two known; one immediate left, one far right
649 | | | |
649 | | | |
650 o | | | changeset: 7:b632bb1b1224
650 o | | | changeset: 7:b632bb1b1224
651 |\ \ \ \ parent: 2:3d9a33b8d1e1
651 |\ \ \ \ parent: 2:3d9a33b8d1e1
652 | | | | | parent: 5:4409d547b708
652 | | | | | parent: 5:4409d547b708
653 | | | | | user: test
653 | | | | | user: test
654 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
654 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
655 | | | | | summary: (7) expand
655 | | | | | summary: (7) expand
656 | | | | |
656 | | | | |
657 +---o | | changeset: 6:b105a072e251
657 +---o | | changeset: 6:b105a072e251
658 | |/ / / parent: 2:3d9a33b8d1e1
658 | |/ / / parent: 2:3d9a33b8d1e1
659 | | | | parent: 5:4409d547b708
659 | | | | parent: 5:4409d547b708
660 | | | | user: test
660 | | | | user: test
661 | | | | date: Thu Jan 01 00:00:06 1970 +0000
661 | | | | date: Thu Jan 01 00:00:06 1970 +0000
662 | | | | summary: (6) merge two known; one immediate left, one far left
662 | | | | summary: (6) merge two known; one immediate left, one far left
663 | | | |
663 | | | |
664 | o | | changeset: 5:4409d547b708
664 | o | | changeset: 5:4409d547b708
665 | |\ \ \ parent: 3:27eef8ed80b4
665 | |\ \ \ parent: 3:27eef8ed80b4
666 | | | | | parent: 4:26a8bac39d9f
666 | | | | | parent: 4:26a8bac39d9f
667 | | | | | user: test
667 | | | | | user: test
668 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
668 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
669 | | | | | summary: (5) expand
669 | | | | | summary: (5) expand
670 | | | | |
670 | | | | |
671 | | o | | changeset: 4:26a8bac39d9f
671 | | o | | changeset: 4:26a8bac39d9f
672 | |/|/ / parent: 1:6db2ef61d156
672 | |/|/ / parent: 1:6db2ef61d156
673 | | | | parent: 3:27eef8ed80b4
673 | | | | parent: 3:27eef8ed80b4
674 | | | | user: test
674 | | | | user: test
675 | | | | date: Thu Jan 01 00:00:04 1970 +0000
675 | | | | date: Thu Jan 01 00:00:04 1970 +0000
676 | | | | summary: (4) merge two known; one immediate left, one immediate right
676 | | | | summary: (4) merge two known; one immediate left, one immediate right
677 | | | |
677 | | | |
678 | o | | changeset: 3:27eef8ed80b4
678 | o | | changeset: 3:27eef8ed80b4
679 |/ / / user: test
679 |/ / / user: test
680 | | | date: Thu Jan 01 00:00:03 1970 +0000
680 | | | date: Thu Jan 01 00:00:03 1970 +0000
681 | | | summary: (3) collapse
681 | | | summary: (3) collapse
682 | | |
682 | | |
683 o | | changeset: 2:3d9a33b8d1e1
683 o | | changeset: 2:3d9a33b8d1e1
684 |/ / user: test
684 |/ / user: test
685 | | date: Thu Jan 01 00:00:02 1970 +0000
685 | | date: Thu Jan 01 00:00:02 1970 +0000
686 | | summary: (2) collapse
686 | | summary: (2) collapse
687 | |
687 | |
688 o | changeset: 1:6db2ef61d156
688 o | changeset: 1:6db2ef61d156
689 |/ user: test
689 |/ user: test
690 | date: Thu Jan 01 00:00:01 1970 +0000
690 | date: Thu Jan 01 00:00:01 1970 +0000
691 | summary: (1) collapse
691 | summary: (1) collapse
692 |
692 |
693 o changeset: 0:e6eb3150255d
693 o changeset: 0:e6eb3150255d
694 user: test
694 user: test
695 date: Thu Jan 01 00:00:00 1970 +0000
695 date: Thu Jan 01 00:00:00 1970 +0000
696 summary: (0) root
696 summary: (0) root
697
697
698
698
699 File glog per revset:
699 File glog per revset:
700
700
701 $ hg log -G -r 'file("a")'
701 $ hg log -G -r 'file("a")'
702 @ changeset: 34:fea3ac5810e0
702 @ changeset: 34:fea3ac5810e0
703 | tag: tip
703 | tag: tip
704 | parent: 32:d06dffa21a31
704 | parent: 32:d06dffa21a31
705 | user: test
705 | user: test
706 | date: Thu Jan 01 00:00:34 1970 +0000
706 | date: Thu Jan 01 00:00:34 1970 +0000
707 | summary: (34) head
707 | summary: (34) head
708 |
708 |
709 | o changeset: 33:68608f5145f9
709 | o changeset: 33:68608f5145f9
710 | | parent: 18:1aa84d96232a
710 | | parent: 18:1aa84d96232a
711 | | user: test
711 | | user: test
712 | | date: Thu Jan 01 00:00:33 1970 +0000
712 | | date: Thu Jan 01 00:00:33 1970 +0000
713 | | summary: (33) head
713 | | summary: (33) head
714 | |
714 | |
715 o | changeset: 32:d06dffa21a31
715 o | changeset: 32:d06dffa21a31
716 |\ \ parent: 27:886ed638191b
716 |\ \ parent: 27:886ed638191b
717 | | | parent: 31:621d83e11f67
717 | | | parent: 31:621d83e11f67
718 | | | user: test
718 | | | user: test
719 | | | date: Thu Jan 01 00:00:32 1970 +0000
719 | | | date: Thu Jan 01 00:00:32 1970 +0000
720 | | | summary: (32) expand
720 | | | summary: (32) expand
721 | | |
721 | | |
722 | o | changeset: 31:621d83e11f67
722 | o | changeset: 31:621d83e11f67
723 | |\ \ parent: 21:d42a756af44d
723 | |\ \ parent: 21:d42a756af44d
724 | | | | parent: 30:6e11cd4b648f
724 | | | | parent: 30:6e11cd4b648f
725 | | | | user: test
725 | | | | user: test
726 | | | | date: Thu Jan 01 00:00:31 1970 +0000
726 | | | | date: Thu Jan 01 00:00:31 1970 +0000
727 | | | | summary: (31) expand
727 | | | | summary: (31) expand
728 | | | |
728 | | | |
729 | | o | changeset: 30:6e11cd4b648f
729 | | o | changeset: 30:6e11cd4b648f
730 | | |\ \ parent: 28:44ecd0b9ae99
730 | | |\ \ parent: 28:44ecd0b9ae99
731 | | | | | parent: 29:cd9bb2be7593
731 | | | | | parent: 29:cd9bb2be7593
732 | | | | | user: test
732 | | | | | user: test
733 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
733 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
734 | | | | | summary: (30) expand
734 | | | | | summary: (30) expand
735 | | | | |
735 | | | | |
736 | | | o | changeset: 29:cd9bb2be7593
736 | | | o | changeset: 29:cd9bb2be7593
737 | | | | | parent: 0:e6eb3150255d
737 | | | | | parent: 0:e6eb3150255d
738 | | | | | user: test
738 | | | | | user: test
739 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
739 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
740 | | | | | summary: (29) regular commit
740 | | | | | summary: (29) regular commit
741 | | | | |
741 | | | | |
742 | | o | | changeset: 28:44ecd0b9ae99
742 | | o | | changeset: 28:44ecd0b9ae99
743 | | |\ \ \ parent: 1:6db2ef61d156
743 | | |\ \ \ parent: 1:6db2ef61d156
744 | | | | | | parent: 26:7f25b6c2f0b9
744 | | | | | | parent: 26:7f25b6c2f0b9
745 | | | | | | user: test
745 | | | | | | user: test
746 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
746 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
747 | | | | | | summary: (28) merge zero known
747 | | | | | | summary: (28) merge zero known
748 | | | | | |
748 | | | | | |
749 o | | | | | changeset: 27:886ed638191b
749 o | | | | | changeset: 27:886ed638191b
750 |/ / / / / parent: 21:d42a756af44d
750 |/ / / / / parent: 21:d42a756af44d
751 | | | | | user: test
751 | | | | | user: test
752 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
752 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
753 | | | | | summary: (27) collapse
753 | | | | | summary: (27) collapse
754 | | | | |
754 | | | | |
755 | | o---+ changeset: 26:7f25b6c2f0b9
755 | | o---+ changeset: 26:7f25b6c2f0b9
756 | | | | | parent: 18:1aa84d96232a
756 | | | | | parent: 18:1aa84d96232a
757 | | | | | parent: 25:91da8ed57247
757 | | | | | parent: 25:91da8ed57247
758 | | | | | user: test
758 | | | | | user: test
759 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
759 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
760 | | | | | summary: (26) merge one known; far right
760 | | | | | summary: (26) merge one known; far right
761 | | | | |
761 | | | | |
762 +---o | | changeset: 25:91da8ed57247
762 +---o | | changeset: 25:91da8ed57247
763 | | | | | parent: 21:d42a756af44d
763 | | | | | parent: 21:d42a756af44d
764 | | | | | parent: 24:a9c19a3d96b7
764 | | | | | parent: 24:a9c19a3d96b7
765 | | | | | user: test
765 | | | | | user: test
766 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
766 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
767 | | | | | summary: (25) merge one known; far left
767 | | | | | summary: (25) merge one known; far left
768 | | | | |
768 | | | | |
769 | | o | | changeset: 24:a9c19a3d96b7
769 | | o | | changeset: 24:a9c19a3d96b7
770 | | |\| | parent: 0:e6eb3150255d
770 | | |\| | parent: 0:e6eb3150255d
771 | | | | | parent: 23:a01cddf0766d
771 | | | | | parent: 23:a01cddf0766d
772 | | | | | user: test
772 | | | | | user: test
773 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
773 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
774 | | | | | summary: (24) merge one known; immediate right
774 | | | | | summary: (24) merge one known; immediate right
775 | | | | |
775 | | | | |
776 | | o | | changeset: 23:a01cddf0766d
776 | | o | | changeset: 23:a01cddf0766d
777 | |/| | | parent: 1:6db2ef61d156
777 | |/| | | parent: 1:6db2ef61d156
778 | | | | | parent: 22:e0d9cccacb5d
778 | | | | | parent: 22:e0d9cccacb5d
779 | | | | | user: test
779 | | | | | user: test
780 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
780 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
781 | | | | | summary: (23) merge one known; immediate left
781 | | | | | summary: (23) merge one known; immediate left
782 | | | | |
782 | | | | |
783 +---o---+ changeset: 22:e0d9cccacb5d
783 +---o---+ changeset: 22:e0d9cccacb5d
784 | | | | parent: 18:1aa84d96232a
784 | | | | parent: 18:1aa84d96232a
785 | | / / parent: 21:d42a756af44d
785 | | / / parent: 21:d42a756af44d
786 | | | | user: test
786 | | | | user: test
787 | | | | date: Thu Jan 01 00:00:22 1970 +0000
787 | | | | date: Thu Jan 01 00:00:22 1970 +0000
788 | | | | summary: (22) merge two known; one far left, one far right
788 | | | | summary: (22) merge two known; one far left, one far right
789 | | | |
789 | | | |
790 o | | | changeset: 21:d42a756af44d
790 o | | | changeset: 21:d42a756af44d
791 |\ \ \ \ parent: 19:31ddc2c1573b
791 |\ \ \ \ parent: 19:31ddc2c1573b
792 | | | | | parent: 20:d30ed6450e32
792 | | | | | parent: 20:d30ed6450e32
793 | | | | | user: test
793 | | | | | user: test
794 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
794 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
795 | | | | | summary: (21) expand
795 | | | | | summary: (21) expand
796 | | | | |
796 | | | | |
797 | o---+-+ changeset: 20:d30ed6450e32
797 | o---+-+ changeset: 20:d30ed6450e32
798 | | | | parent: 0:e6eb3150255d
798 | | | | parent: 0:e6eb3150255d
799 | / / / parent: 18:1aa84d96232a
799 | / / / parent: 18:1aa84d96232a
800 | | | | user: test
800 | | | | user: test
801 | | | | date: Thu Jan 01 00:00:20 1970 +0000
801 | | | | date: Thu Jan 01 00:00:20 1970 +0000
802 | | | | summary: (20) merge two known; two far right
802 | | | | summary: (20) merge two known; two far right
803 | | | |
803 | | | |
804 o | | | changeset: 19:31ddc2c1573b
804 o | | | changeset: 19:31ddc2c1573b
805 |\ \ \ \ parent: 15:1dda3f72782d
805 |\ \ \ \ parent: 15:1dda3f72782d
806 | | | | | parent: 17:44765d7c06e0
806 | | | | | parent: 17:44765d7c06e0
807 | | | | | user: test
807 | | | | | user: test
808 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
808 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
809 | | | | | summary: (19) expand
809 | | | | | summary: (19) expand
810 | | | | |
810 | | | | |
811 +---+---o changeset: 18:1aa84d96232a
811 +---+---o changeset: 18:1aa84d96232a
812 | | | | parent: 1:6db2ef61d156
812 | | | | parent: 1:6db2ef61d156
813 | | | | parent: 15:1dda3f72782d
813 | | | | parent: 15:1dda3f72782d
814 | | | | user: test
814 | | | | user: test
815 | | | | date: Thu Jan 01 00:00:18 1970 +0000
815 | | | | date: Thu Jan 01 00:00:18 1970 +0000
816 | | | | summary: (18) merge two known; two far left
816 | | | | summary: (18) merge two known; two far left
817 | | | |
817 | | | |
818 | o | | changeset: 17:44765d7c06e0
818 | o | | changeset: 17:44765d7c06e0
819 | |\ \ \ parent: 12:86b91144a6e9
819 | |\ \ \ parent: 12:86b91144a6e9
820 | | | | | parent: 16:3677d192927d
820 | | | | | parent: 16:3677d192927d
821 | | | | | user: test
821 | | | | | user: test
822 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
822 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
823 | | | | | summary: (17) expand
823 | | | | | summary: (17) expand
824 | | | | |
824 | | | | |
825 | | o---+ changeset: 16:3677d192927d
825 | | o---+ changeset: 16:3677d192927d
826 | | | | | parent: 0:e6eb3150255d
826 | | | | | parent: 0:e6eb3150255d
827 | | |/ / parent: 1:6db2ef61d156
827 | | |/ / parent: 1:6db2ef61d156
828 | | | | user: test
828 | | | | user: test
829 | | | | date: Thu Jan 01 00:00:16 1970 +0000
829 | | | | date: Thu Jan 01 00:00:16 1970 +0000
830 | | | | summary: (16) merge two known; one immediate right, one near right
830 | | | | summary: (16) merge two known; one immediate right, one near right
831 | | | |
831 | | | |
832 o | | | changeset: 15:1dda3f72782d
832 o | | | changeset: 15:1dda3f72782d
833 |\ \ \ \ parent: 13:22d8966a97e3
833 |\ \ \ \ parent: 13:22d8966a97e3
834 | | | | | parent: 14:8eac370358ef
834 | | | | | parent: 14:8eac370358ef
835 | | | | | user: test
835 | | | | | user: test
836 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
836 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
837 | | | | | summary: (15) expand
837 | | | | | summary: (15) expand
838 | | | | |
838 | | | | |
839 | o-----+ changeset: 14:8eac370358ef
839 | o-----+ changeset: 14:8eac370358ef
840 | | | | | parent: 0:e6eb3150255d
840 | | | | | parent: 0:e6eb3150255d
841 | |/ / / parent: 12:86b91144a6e9
841 | |/ / / parent: 12:86b91144a6e9
842 | | | | user: test
842 | | | | user: test
843 | | | | date: Thu Jan 01 00:00:14 1970 +0000
843 | | | | date: Thu Jan 01 00:00:14 1970 +0000
844 | | | | summary: (14) merge two known; one immediate right, one far right
844 | | | | summary: (14) merge two known; one immediate right, one far right
845 | | | |
845 | | | |
846 o | | | changeset: 13:22d8966a97e3
846 o | | | changeset: 13:22d8966a97e3
847 |\ \ \ \ parent: 9:7010c0af0a35
847 |\ \ \ \ parent: 9:7010c0af0a35
848 | | | | | parent: 11:832d76e6bdf2
848 | | | | | parent: 11:832d76e6bdf2
849 | | | | | user: test
849 | | | | | user: test
850 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
850 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
851 | | | | | summary: (13) expand
851 | | | | | summary: (13) expand
852 | | | | |
852 | | | | |
853 +---o | | changeset: 12:86b91144a6e9
853 +---o | | changeset: 12:86b91144a6e9
854 | | |/ / parent: 1:6db2ef61d156
854 | | |/ / parent: 1:6db2ef61d156
855 | | | | parent: 9:7010c0af0a35
855 | | | | parent: 9:7010c0af0a35
856 | | | | user: test
856 | | | | user: test
857 | | | | date: Thu Jan 01 00:00:12 1970 +0000
857 | | | | date: Thu Jan 01 00:00:12 1970 +0000
858 | | | | summary: (12) merge two known; one immediate right, one far left
858 | | | | summary: (12) merge two known; one immediate right, one far left
859 | | | |
859 | | | |
860 | o | | changeset: 11:832d76e6bdf2
860 | o | | changeset: 11:832d76e6bdf2
861 | |\ \ \ parent: 6:b105a072e251
861 | |\ \ \ parent: 6:b105a072e251
862 | | | | | parent: 10:74c64d036d72
862 | | | | | parent: 10:74c64d036d72
863 | | | | | user: test
863 | | | | | user: test
864 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
864 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
865 | | | | | summary: (11) expand
865 | | | | | summary: (11) expand
866 | | | | |
866 | | | | |
867 | | o---+ changeset: 10:74c64d036d72
867 | | o---+ changeset: 10:74c64d036d72
868 | | | | | parent: 0:e6eb3150255d
868 | | | | | parent: 0:e6eb3150255d
869 | |/ / / parent: 6:b105a072e251
869 | |/ / / parent: 6:b105a072e251
870 | | | | user: test
870 | | | | user: test
871 | | | | date: Thu Jan 01 00:00:10 1970 +0000
871 | | | | date: Thu Jan 01 00:00:10 1970 +0000
872 | | | | summary: (10) merge two known; one immediate left, one near right
872 | | | | summary: (10) merge two known; one immediate left, one near right
873 | | | |
873 | | | |
874 o | | | changeset: 9:7010c0af0a35
874 o | | | changeset: 9:7010c0af0a35
875 |\ \ \ \ parent: 7:b632bb1b1224
875 |\ \ \ \ parent: 7:b632bb1b1224
876 | | | | | parent: 8:7a0b11f71937
876 | | | | | parent: 8:7a0b11f71937
877 | | | | | user: test
877 | | | | | user: test
878 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
878 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
879 | | | | | summary: (9) expand
879 | | | | | summary: (9) expand
880 | | | | |
880 | | | | |
881 | o-----+ changeset: 8:7a0b11f71937
881 | o-----+ changeset: 8:7a0b11f71937
882 | | | | | parent: 0:e6eb3150255d
882 | | | | | parent: 0:e6eb3150255d
883 |/ / / / parent: 7:b632bb1b1224
883 |/ / / / parent: 7:b632bb1b1224
884 | | | | user: test
884 | | | | user: test
885 | | | | date: Thu Jan 01 00:00:08 1970 +0000
885 | | | | date: Thu Jan 01 00:00:08 1970 +0000
886 | | | | summary: (8) merge two known; one immediate left, one far right
886 | | | | summary: (8) merge two known; one immediate left, one far right
887 | | | |
887 | | | |
888 o | | | changeset: 7:b632bb1b1224
888 o | | | changeset: 7:b632bb1b1224
889 |\ \ \ \ parent: 2:3d9a33b8d1e1
889 |\ \ \ \ parent: 2:3d9a33b8d1e1
890 | | | | | parent: 5:4409d547b708
890 | | | | | parent: 5:4409d547b708
891 | | | | | user: test
891 | | | | | user: test
892 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
892 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
893 | | | | | summary: (7) expand
893 | | | | | summary: (7) expand
894 | | | | |
894 | | | | |
895 +---o | | changeset: 6:b105a072e251
895 +---o | | changeset: 6:b105a072e251
896 | |/ / / parent: 2:3d9a33b8d1e1
896 | |/ / / parent: 2:3d9a33b8d1e1
897 | | | | parent: 5:4409d547b708
897 | | | | parent: 5:4409d547b708
898 | | | | user: test
898 | | | | user: test
899 | | | | date: Thu Jan 01 00:00:06 1970 +0000
899 | | | | date: Thu Jan 01 00:00:06 1970 +0000
900 | | | | summary: (6) merge two known; one immediate left, one far left
900 | | | | summary: (6) merge two known; one immediate left, one far left
901 | | | |
901 | | | |
902 | o | | changeset: 5:4409d547b708
902 | o | | changeset: 5:4409d547b708
903 | |\ \ \ parent: 3:27eef8ed80b4
903 | |\ \ \ parent: 3:27eef8ed80b4
904 | | | | | parent: 4:26a8bac39d9f
904 | | | | | parent: 4:26a8bac39d9f
905 | | | | | user: test
905 | | | | | user: test
906 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
906 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
907 | | | | | summary: (5) expand
907 | | | | | summary: (5) expand
908 | | | | |
908 | | | | |
909 | | o | | changeset: 4:26a8bac39d9f
909 | | o | | changeset: 4:26a8bac39d9f
910 | |/|/ / parent: 1:6db2ef61d156
910 | |/|/ / parent: 1:6db2ef61d156
911 | | | | parent: 3:27eef8ed80b4
911 | | | | parent: 3:27eef8ed80b4
912 | | | | user: test
912 | | | | user: test
913 | | | | date: Thu Jan 01 00:00:04 1970 +0000
913 | | | | date: Thu Jan 01 00:00:04 1970 +0000
914 | | | | summary: (4) merge two known; one immediate left, one immediate right
914 | | | | summary: (4) merge two known; one immediate left, one immediate right
915 | | | |
915 | | | |
916 | o | | changeset: 3:27eef8ed80b4
916 | o | | changeset: 3:27eef8ed80b4
917 |/ / / user: test
917 |/ / / user: test
918 | | | date: Thu Jan 01 00:00:03 1970 +0000
918 | | | date: Thu Jan 01 00:00:03 1970 +0000
919 | | | summary: (3) collapse
919 | | | summary: (3) collapse
920 | | |
920 | | |
921 o | | changeset: 2:3d9a33b8d1e1
921 o | | changeset: 2:3d9a33b8d1e1
922 |/ / user: test
922 |/ / user: test
923 | | date: Thu Jan 01 00:00:02 1970 +0000
923 | | date: Thu Jan 01 00:00:02 1970 +0000
924 | | summary: (2) collapse
924 | | summary: (2) collapse
925 | |
925 | |
926 o | changeset: 1:6db2ef61d156
926 o | changeset: 1:6db2ef61d156
927 |/ user: test
927 |/ user: test
928 | date: Thu Jan 01 00:00:01 1970 +0000
928 | date: Thu Jan 01 00:00:01 1970 +0000
929 | summary: (1) collapse
929 | summary: (1) collapse
930 |
930 |
931 o changeset: 0:e6eb3150255d
931 o changeset: 0:e6eb3150255d
932 user: test
932 user: test
933 date: Thu Jan 01 00:00:00 1970 +0000
933 date: Thu Jan 01 00:00:00 1970 +0000
934 summary: (0) root
934 summary: (0) root
935
935
936
936
937
937
938 File glog per revset (only merges):
938 File glog per revset (only merges):
939
939
940 $ hg log -G -r 'file("a")' -m
940 $ hg log -G -r 'file("a")' -m
941 o changeset: 32:d06dffa21a31
941 o changeset: 32:d06dffa21a31
942 |\ parent: 27:886ed638191b
942 |\ parent: 27:886ed638191b
943 | : parent: 31:621d83e11f67
943 | : parent: 31:621d83e11f67
944 | : user: test
944 | : user: test
945 | : date: Thu Jan 01 00:00:32 1970 +0000
945 | : date: Thu Jan 01 00:00:32 1970 +0000
946 | : summary: (32) expand
946 | : summary: (32) expand
947 | :
947 | :
948 o : changeset: 31:621d83e11f67
948 o : changeset: 31:621d83e11f67
949 |\: parent: 21:d42a756af44d
949 |\: parent: 21:d42a756af44d
950 | : parent: 30:6e11cd4b648f
950 | : parent: 30:6e11cd4b648f
951 | : user: test
951 | : user: test
952 | : date: Thu Jan 01 00:00:31 1970 +0000
952 | : date: Thu Jan 01 00:00:31 1970 +0000
953 | : summary: (31) expand
953 | : summary: (31) expand
954 | :
954 | :
955 o : changeset: 30:6e11cd4b648f
955 o : changeset: 30:6e11cd4b648f
956 |\ \ parent: 28:44ecd0b9ae99
956 |\ \ parent: 28:44ecd0b9ae99
957 | ~ : parent: 29:cd9bb2be7593
957 | ~ : parent: 29:cd9bb2be7593
958 | : user: test
958 | : user: test
959 | : date: Thu Jan 01 00:00:30 1970 +0000
959 | : date: Thu Jan 01 00:00:30 1970 +0000
960 | : summary: (30) expand
960 | : summary: (30) expand
961 | /
961 | /
962 o : changeset: 28:44ecd0b9ae99
962 o : changeset: 28:44ecd0b9ae99
963 |\ \ parent: 1:6db2ef61d156
963 |\ \ parent: 1:6db2ef61d156
964 | ~ : parent: 26:7f25b6c2f0b9
964 | ~ : parent: 26:7f25b6c2f0b9
965 | : user: test
965 | : user: test
966 | : date: Thu Jan 01 00:00:28 1970 +0000
966 | : date: Thu Jan 01 00:00:28 1970 +0000
967 | : summary: (28) merge zero known
967 | : summary: (28) merge zero known
968 | /
968 | /
969 o : changeset: 26:7f25b6c2f0b9
969 o : changeset: 26:7f25b6c2f0b9
970 |\ \ parent: 18:1aa84d96232a
970 |\ \ parent: 18:1aa84d96232a
971 | | : parent: 25:91da8ed57247
971 | | : parent: 25:91da8ed57247
972 | | : user: test
972 | | : user: test
973 | | : date: Thu Jan 01 00:00:26 1970 +0000
973 | | : date: Thu Jan 01 00:00:26 1970 +0000
974 | | : summary: (26) merge one known; far right
974 | | : summary: (26) merge one known; far right
975 | | :
975 | | :
976 | o : changeset: 25:91da8ed57247
976 | o : changeset: 25:91da8ed57247
977 | |\: parent: 21:d42a756af44d
977 | |\: parent: 21:d42a756af44d
978 | | : parent: 24:a9c19a3d96b7
978 | | : parent: 24:a9c19a3d96b7
979 | | : user: test
979 | | : user: test
980 | | : date: Thu Jan 01 00:00:25 1970 +0000
980 | | : date: Thu Jan 01 00:00:25 1970 +0000
981 | | : summary: (25) merge one known; far left
981 | | : summary: (25) merge one known; far left
982 | | :
982 | | :
983 | o : changeset: 24:a9c19a3d96b7
983 | o : changeset: 24:a9c19a3d96b7
984 | |\ \ parent: 0:e6eb3150255d
984 | |\ \ parent: 0:e6eb3150255d
985 | | ~ : parent: 23:a01cddf0766d
985 | | ~ : parent: 23:a01cddf0766d
986 | | : user: test
986 | | : user: test
987 | | : date: Thu Jan 01 00:00:24 1970 +0000
987 | | : date: Thu Jan 01 00:00:24 1970 +0000
988 | | : summary: (24) merge one known; immediate right
988 | | : summary: (24) merge one known; immediate right
989 | | /
989 | | /
990 | o : changeset: 23:a01cddf0766d
990 | o : changeset: 23:a01cddf0766d
991 | |\ \ parent: 1:6db2ef61d156
991 | |\ \ parent: 1:6db2ef61d156
992 | | ~ : parent: 22:e0d9cccacb5d
992 | | ~ : parent: 22:e0d9cccacb5d
993 | | : user: test
993 | | : user: test
994 | | : date: Thu Jan 01 00:00:23 1970 +0000
994 | | : date: Thu Jan 01 00:00:23 1970 +0000
995 | | : summary: (23) merge one known; immediate left
995 | | : summary: (23) merge one known; immediate left
996 | | /
996 | | /
997 | o : changeset: 22:e0d9cccacb5d
997 | o : changeset: 22:e0d9cccacb5d
998 |/:/ parent: 18:1aa84d96232a
998 |/:/ parent: 18:1aa84d96232a
999 | : parent: 21:d42a756af44d
999 | : parent: 21:d42a756af44d
1000 | : user: test
1000 | : user: test
1001 | : date: Thu Jan 01 00:00:22 1970 +0000
1001 | : date: Thu Jan 01 00:00:22 1970 +0000
1002 | : summary: (22) merge two known; one far left, one far right
1002 | : summary: (22) merge two known; one far left, one far right
1003 | :
1003 | :
1004 | o changeset: 21:d42a756af44d
1004 | o changeset: 21:d42a756af44d
1005 | |\ parent: 19:31ddc2c1573b
1005 | |\ parent: 19:31ddc2c1573b
1006 | | | parent: 20:d30ed6450e32
1006 | | | parent: 20:d30ed6450e32
1007 | | | user: test
1007 | | | user: test
1008 | | | date: Thu Jan 01 00:00:21 1970 +0000
1008 | | | date: Thu Jan 01 00:00:21 1970 +0000
1009 | | | summary: (21) expand
1009 | | | summary: (21) expand
1010 | | |
1010 | | |
1011 +---o changeset: 20:d30ed6450e32
1011 +---o changeset: 20:d30ed6450e32
1012 | | | parent: 0:e6eb3150255d
1012 | | | parent: 0:e6eb3150255d
1013 | | ~ parent: 18:1aa84d96232a
1013 | | ~ parent: 18:1aa84d96232a
1014 | | user: test
1014 | | user: test
1015 | | date: Thu Jan 01 00:00:20 1970 +0000
1015 | | date: Thu Jan 01 00:00:20 1970 +0000
1016 | | summary: (20) merge two known; two far right
1016 | | summary: (20) merge two known; two far right
1017 | |
1017 | |
1018 | o changeset: 19:31ddc2c1573b
1018 | o changeset: 19:31ddc2c1573b
1019 | |\ parent: 15:1dda3f72782d
1019 | |\ parent: 15:1dda3f72782d
1020 | | | parent: 17:44765d7c06e0
1020 | | | parent: 17:44765d7c06e0
1021 | | | user: test
1021 | | | user: test
1022 | | | date: Thu Jan 01 00:00:19 1970 +0000
1022 | | | date: Thu Jan 01 00:00:19 1970 +0000
1023 | | | summary: (19) expand
1023 | | | summary: (19) expand
1024 | | |
1024 | | |
1025 o | | changeset: 18:1aa84d96232a
1025 o | | changeset: 18:1aa84d96232a
1026 |\| | parent: 1:6db2ef61d156
1026 |\| | parent: 1:6db2ef61d156
1027 ~ | | parent: 15:1dda3f72782d
1027 ~ | | parent: 15:1dda3f72782d
1028 | | user: test
1028 | | user: test
1029 | | date: Thu Jan 01 00:00:18 1970 +0000
1029 | | date: Thu Jan 01 00:00:18 1970 +0000
1030 | | summary: (18) merge two known; two far left
1030 | | summary: (18) merge two known; two far left
1031 / /
1031 / /
1032 | o changeset: 17:44765d7c06e0
1032 | o changeset: 17:44765d7c06e0
1033 | |\ parent: 12:86b91144a6e9
1033 | |\ parent: 12:86b91144a6e9
1034 | | | parent: 16:3677d192927d
1034 | | | parent: 16:3677d192927d
1035 | | | user: test
1035 | | | user: test
1036 | | | date: Thu Jan 01 00:00:17 1970 +0000
1036 | | | date: Thu Jan 01 00:00:17 1970 +0000
1037 | | | summary: (17) expand
1037 | | | summary: (17) expand
1038 | | |
1038 | | |
1039 | | o changeset: 16:3677d192927d
1039 | | o changeset: 16:3677d192927d
1040 | | |\ parent: 0:e6eb3150255d
1040 | | |\ parent: 0:e6eb3150255d
1041 | | ~ ~ parent: 1:6db2ef61d156
1041 | | ~ ~ parent: 1:6db2ef61d156
1042 | | user: test
1042 | | user: test
1043 | | date: Thu Jan 01 00:00:16 1970 +0000
1043 | | date: Thu Jan 01 00:00:16 1970 +0000
1044 | | summary: (16) merge two known; one immediate right, one near right
1044 | | summary: (16) merge two known; one immediate right, one near right
1045 | |
1045 | |
1046 o | changeset: 15:1dda3f72782d
1046 o | changeset: 15:1dda3f72782d
1047 |\ \ parent: 13:22d8966a97e3
1047 |\ \ parent: 13:22d8966a97e3
1048 | | | parent: 14:8eac370358ef
1048 | | | parent: 14:8eac370358ef
1049 | | | user: test
1049 | | | user: test
1050 | | | date: Thu Jan 01 00:00:15 1970 +0000
1050 | | | date: Thu Jan 01 00:00:15 1970 +0000
1051 | | | summary: (15) expand
1051 | | | summary: (15) expand
1052 | | |
1052 | | |
1053 | o | changeset: 14:8eac370358ef
1053 | o | changeset: 14:8eac370358ef
1054 | |\| parent: 0:e6eb3150255d
1054 | |\| parent: 0:e6eb3150255d
1055 | ~ | parent: 12:86b91144a6e9
1055 | ~ | parent: 12:86b91144a6e9
1056 | | user: test
1056 | | user: test
1057 | | date: Thu Jan 01 00:00:14 1970 +0000
1057 | | date: Thu Jan 01 00:00:14 1970 +0000
1058 | | summary: (14) merge two known; one immediate right, one far right
1058 | | summary: (14) merge two known; one immediate right, one far right
1059 | /
1059 | /
1060 o | changeset: 13:22d8966a97e3
1060 o | changeset: 13:22d8966a97e3
1061 |\ \ parent: 9:7010c0af0a35
1061 |\ \ parent: 9:7010c0af0a35
1062 | | | parent: 11:832d76e6bdf2
1062 | | | parent: 11:832d76e6bdf2
1063 | | | user: test
1063 | | | user: test
1064 | | | date: Thu Jan 01 00:00:13 1970 +0000
1064 | | | date: Thu Jan 01 00:00:13 1970 +0000
1065 | | | summary: (13) expand
1065 | | | summary: (13) expand
1066 | | |
1066 | | |
1067 +---o changeset: 12:86b91144a6e9
1067 +---o changeset: 12:86b91144a6e9
1068 | | | parent: 1:6db2ef61d156
1068 | | | parent: 1:6db2ef61d156
1069 | | ~ parent: 9:7010c0af0a35
1069 | | ~ parent: 9:7010c0af0a35
1070 | | user: test
1070 | | user: test
1071 | | date: Thu Jan 01 00:00:12 1970 +0000
1071 | | date: Thu Jan 01 00:00:12 1970 +0000
1072 | | summary: (12) merge two known; one immediate right, one far left
1072 | | summary: (12) merge two known; one immediate right, one far left
1073 | |
1073 | |
1074 | o changeset: 11:832d76e6bdf2
1074 | o changeset: 11:832d76e6bdf2
1075 | |\ parent: 6:b105a072e251
1075 | |\ parent: 6:b105a072e251
1076 | | | parent: 10:74c64d036d72
1076 | | | parent: 10:74c64d036d72
1077 | | | user: test
1077 | | | user: test
1078 | | | date: Thu Jan 01 00:00:11 1970 +0000
1078 | | | date: Thu Jan 01 00:00:11 1970 +0000
1079 | | | summary: (11) expand
1079 | | | summary: (11) expand
1080 | | |
1080 | | |
1081 | | o changeset: 10:74c64d036d72
1081 | | o changeset: 10:74c64d036d72
1082 | |/| parent: 0:e6eb3150255d
1082 | |/| parent: 0:e6eb3150255d
1083 | | ~ parent: 6:b105a072e251
1083 | | ~ parent: 6:b105a072e251
1084 | | user: test
1084 | | user: test
1085 | | date: Thu Jan 01 00:00:10 1970 +0000
1085 | | date: Thu Jan 01 00:00:10 1970 +0000
1086 | | summary: (10) merge two known; one immediate left, one near right
1086 | | summary: (10) merge two known; one immediate left, one near right
1087 | |
1087 | |
1088 o | changeset: 9:7010c0af0a35
1088 o | changeset: 9:7010c0af0a35
1089 |\ \ parent: 7:b632bb1b1224
1089 |\ \ parent: 7:b632bb1b1224
1090 | | | parent: 8:7a0b11f71937
1090 | | | parent: 8:7a0b11f71937
1091 | | | user: test
1091 | | | user: test
1092 | | | date: Thu Jan 01 00:00:09 1970 +0000
1092 | | | date: Thu Jan 01 00:00:09 1970 +0000
1093 | | | summary: (9) expand
1093 | | | summary: (9) expand
1094 | | |
1094 | | |
1095 | o | changeset: 8:7a0b11f71937
1095 | o | changeset: 8:7a0b11f71937
1096 |/| | parent: 0:e6eb3150255d
1096 |/| | parent: 0:e6eb3150255d
1097 | ~ | parent: 7:b632bb1b1224
1097 | ~ | parent: 7:b632bb1b1224
1098 | | user: test
1098 | | user: test
1099 | | date: Thu Jan 01 00:00:08 1970 +0000
1099 | | date: Thu Jan 01 00:00:08 1970 +0000
1100 | | summary: (8) merge two known; one immediate left, one far right
1100 | | summary: (8) merge two known; one immediate left, one far right
1101 | /
1101 | /
1102 o | changeset: 7:b632bb1b1224
1102 o | changeset: 7:b632bb1b1224
1103 |\ \ parent: 2:3d9a33b8d1e1
1103 |\ \ parent: 2:3d9a33b8d1e1
1104 | ~ | parent: 5:4409d547b708
1104 | ~ | parent: 5:4409d547b708
1105 | | user: test
1105 | | user: test
1106 | | date: Thu Jan 01 00:00:07 1970 +0000
1106 | | date: Thu Jan 01 00:00:07 1970 +0000
1107 | | summary: (7) expand
1107 | | summary: (7) expand
1108 | /
1108 | /
1109 | o changeset: 6:b105a072e251
1109 | o changeset: 6:b105a072e251
1110 |/| parent: 2:3d9a33b8d1e1
1110 |/| parent: 2:3d9a33b8d1e1
1111 | ~ parent: 5:4409d547b708
1111 | ~ parent: 5:4409d547b708
1112 | user: test
1112 | user: test
1113 | date: Thu Jan 01 00:00:06 1970 +0000
1113 | date: Thu Jan 01 00:00:06 1970 +0000
1114 | summary: (6) merge two known; one immediate left, one far left
1114 | summary: (6) merge two known; one immediate left, one far left
1115 |
1115 |
1116 o changeset: 5:4409d547b708
1116 o changeset: 5:4409d547b708
1117 |\ parent: 3:27eef8ed80b4
1117 |\ parent: 3:27eef8ed80b4
1118 | ~ parent: 4:26a8bac39d9f
1118 | ~ parent: 4:26a8bac39d9f
1119 | user: test
1119 | user: test
1120 | date: Thu Jan 01 00:00:05 1970 +0000
1120 | date: Thu Jan 01 00:00:05 1970 +0000
1121 | summary: (5) expand
1121 | summary: (5) expand
1122 |
1122 |
1123 o changeset: 4:26a8bac39d9f
1123 o changeset: 4:26a8bac39d9f
1124 |\ parent: 1:6db2ef61d156
1124 |\ parent: 1:6db2ef61d156
1125 ~ ~ parent: 3:27eef8ed80b4
1125 ~ ~ parent: 3:27eef8ed80b4
1126 user: test
1126 user: test
1127 date: Thu Jan 01 00:00:04 1970 +0000
1127 date: Thu Jan 01 00:00:04 1970 +0000
1128 summary: (4) merge two known; one immediate left, one immediate right
1128 summary: (4) merge two known; one immediate left, one immediate right
1129
1129
1130
1130
1131
1131
1132 Empty revision range - display nothing:
1132 Empty revision range - display nothing:
1133 $ hg log -G -r 1..0
1133 $ hg log -G -r 1..0
1134
1134
1135 $ cd ..
1135 $ cd ..
1136
1136
1137 #if no-outer-repo
1137 #if no-outer-repo
1138
1138
1139 From outer space:
1139 From outer space:
1140 $ hg log -G -l1 repo
1140 $ hg log -G -l1 repo
1141 @ changeset: 34:fea3ac5810e0
1141 @ changeset: 34:fea3ac5810e0
1142 | tag: tip
1142 | tag: tip
1143 ~ parent: 32:d06dffa21a31
1143 ~ parent: 32:d06dffa21a31
1144 user: test
1144 user: test
1145 date: Thu Jan 01 00:00:34 1970 +0000
1145 date: Thu Jan 01 00:00:34 1970 +0000
1146 summary: (34) head
1146 summary: (34) head
1147
1147
1148 $ hg log -G -l1 repo/a
1148 $ hg log -G -l1 repo/a
1149 @ changeset: 34:fea3ac5810e0
1149 @ changeset: 34:fea3ac5810e0
1150 | tag: tip
1150 | tag: tip
1151 ~ parent: 32:d06dffa21a31
1151 ~ parent: 32:d06dffa21a31
1152 user: test
1152 user: test
1153 date: Thu Jan 01 00:00:34 1970 +0000
1153 date: Thu Jan 01 00:00:34 1970 +0000
1154 summary: (34) head
1154 summary: (34) head
1155
1155
1156 $ hg log -G -l1 repo/missing
1156 $ hg log -G -l1 repo/missing
1157
1157
1158 #endif
1158 #endif
1159
1159
1160 File log with revs != cset revs:
1160 File log with revs != cset revs:
1161 $ hg init flog
1161 $ hg init flog
1162 $ cd flog
1162 $ cd flog
1163 $ echo one >one
1163 $ echo one >one
1164 $ hg add one
1164 $ hg add one
1165 $ hg commit -mone
1165 $ hg commit -mone
1166 $ echo two >two
1166 $ echo two >two
1167 $ hg add two
1167 $ hg add two
1168 $ hg commit -mtwo
1168 $ hg commit -mtwo
1169 $ echo more >two
1169 $ echo more >two
1170 $ hg commit -mmore
1170 $ hg commit -mmore
1171 $ hg log -G two
1171 $ hg log -G two
1172 @ changeset: 2:12c28321755b
1172 @ changeset: 2:12c28321755b
1173 | tag: tip
1173 | tag: tip
1174 | user: test
1174 | user: test
1175 | date: Thu Jan 01 00:00:00 1970 +0000
1175 | date: Thu Jan 01 00:00:00 1970 +0000
1176 | summary: more
1176 | summary: more
1177 |
1177 |
1178 o changeset: 1:5ac72c0599bf
1178 o changeset: 1:5ac72c0599bf
1179 | user: test
1179 | user: test
1180 ~ date: Thu Jan 01 00:00:00 1970 +0000
1180 ~ date: Thu Jan 01 00:00:00 1970 +0000
1181 summary: two
1181 summary: two
1182
1182
1183
1183
1184 Issue1896: File log with explicit style
1184 Issue1896: File log with explicit style
1185 $ hg log -G --style=default one
1185 $ hg log -G --style=default one
1186 o changeset: 0:3d578b4a1f53
1186 o changeset: 0:3d578b4a1f53
1187 user: test
1187 user: test
1188 date: Thu Jan 01 00:00:00 1970 +0000
1188 date: Thu Jan 01 00:00:00 1970 +0000
1189 summary: one
1189 summary: one
1190
1190
1191 Issue2395: glog --style header and footer
1191 Issue2395: glog --style header and footer
1192 $ hg log -G --style=xml one
1192 $ hg log -G --style=xml one
1193 <?xml version="1.0"?>
1193 <?xml version="1.0"?>
1194 <log>
1194 <log>
1195 o <logentry revision="0" node="3d578b4a1f537d5fcf7301bfa9c0b97adfaa6fb1">
1195 o <logentry revision="0" node="3d578b4a1f537d5fcf7301bfa9c0b97adfaa6fb1">
1196 <author email="test">test</author>
1196 <author email="test">test</author>
1197 <date>1970-01-01T00:00:00+00:00</date>
1197 <date>1970-01-01T00:00:00+00:00</date>
1198 <msg xml:space="preserve">one</msg>
1198 <msg xml:space="preserve">one</msg>
1199 </logentry>
1199 </logentry>
1200 </log>
1200 </log>
1201
1201
1202 $ cd ..
1202 $ cd ..
1203
1203
1204 Incoming and outgoing:
1204 Incoming and outgoing:
1205
1205
1206 $ hg clone -U -r31 repo repo2
1206 $ hg clone -U -r31 repo repo2
1207 adding changesets
1207 adding changesets
1208 adding manifests
1208 adding manifests
1209 adding file changes
1209 adding file changes
1210 added 31 changesets with 31 changes to 1 files
1210 added 31 changesets with 31 changes to 1 files
1211 $ cd repo2
1211 $ cd repo2
1212
1212
1213 $ hg incoming --graph ../repo
1213 $ hg incoming --graph ../repo
1214 comparing with ../repo
1214 comparing with ../repo
1215 searching for changes
1215 searching for changes
1216 o changeset: 34:fea3ac5810e0
1216 o changeset: 34:fea3ac5810e0
1217 | tag: tip
1217 | tag: tip
1218 | parent: 32:d06dffa21a31
1218 | parent: 32:d06dffa21a31
1219 | user: test
1219 | user: test
1220 | date: Thu Jan 01 00:00:34 1970 +0000
1220 | date: Thu Jan 01 00:00:34 1970 +0000
1221 | summary: (34) head
1221 | summary: (34) head
1222 |
1222 |
1223 | o changeset: 33:68608f5145f9
1223 | o changeset: 33:68608f5145f9
1224 | parent: 18:1aa84d96232a
1224 | parent: 18:1aa84d96232a
1225 | user: test
1225 | user: test
1226 | date: Thu Jan 01 00:00:33 1970 +0000
1226 | date: Thu Jan 01 00:00:33 1970 +0000
1227 | summary: (33) head
1227 | summary: (33) head
1228 |
1228 |
1229 o changeset: 32:d06dffa21a31
1229 o changeset: 32:d06dffa21a31
1230 | parent: 27:886ed638191b
1230 | parent: 27:886ed638191b
1231 | parent: 31:621d83e11f67
1231 | parent: 31:621d83e11f67
1232 | user: test
1232 | user: test
1233 | date: Thu Jan 01 00:00:32 1970 +0000
1233 | date: Thu Jan 01 00:00:32 1970 +0000
1234 | summary: (32) expand
1234 | summary: (32) expand
1235 |
1235 |
1236 o changeset: 27:886ed638191b
1236 o changeset: 27:886ed638191b
1237 parent: 21:d42a756af44d
1237 parent: 21:d42a756af44d
1238 user: test
1238 user: test
1239 date: Thu Jan 01 00:00:27 1970 +0000
1239 date: Thu Jan 01 00:00:27 1970 +0000
1240 summary: (27) collapse
1240 summary: (27) collapse
1241
1241
1242 $ cd ..
1242 $ cd ..
1243
1243
1244 $ hg -R repo outgoing --graph repo2
1244 $ hg -R repo outgoing --graph repo2
1245 comparing with repo2
1245 comparing with repo2
1246 searching for changes
1246 searching for changes
1247 @ changeset: 34:fea3ac5810e0
1247 @ changeset: 34:fea3ac5810e0
1248 | tag: tip
1248 | tag: tip
1249 | parent: 32:d06dffa21a31
1249 | parent: 32:d06dffa21a31
1250 | user: test
1250 | user: test
1251 | date: Thu Jan 01 00:00:34 1970 +0000
1251 | date: Thu Jan 01 00:00:34 1970 +0000
1252 | summary: (34) head
1252 | summary: (34) head
1253 |
1253 |
1254 | o changeset: 33:68608f5145f9
1254 | o changeset: 33:68608f5145f9
1255 | parent: 18:1aa84d96232a
1255 | parent: 18:1aa84d96232a
1256 | user: test
1256 | user: test
1257 | date: Thu Jan 01 00:00:33 1970 +0000
1257 | date: Thu Jan 01 00:00:33 1970 +0000
1258 | summary: (33) head
1258 | summary: (33) head
1259 |
1259 |
1260 o changeset: 32:d06dffa21a31
1260 o changeset: 32:d06dffa21a31
1261 | parent: 27:886ed638191b
1261 | parent: 27:886ed638191b
1262 | parent: 31:621d83e11f67
1262 | parent: 31:621d83e11f67
1263 | user: test
1263 | user: test
1264 | date: Thu Jan 01 00:00:32 1970 +0000
1264 | date: Thu Jan 01 00:00:32 1970 +0000
1265 | summary: (32) expand
1265 | summary: (32) expand
1266 |
1266 |
1267 o changeset: 27:886ed638191b
1267 o changeset: 27:886ed638191b
1268 parent: 21:d42a756af44d
1268 parent: 21:d42a756af44d
1269 user: test
1269 user: test
1270 date: Thu Jan 01 00:00:27 1970 +0000
1270 date: Thu Jan 01 00:00:27 1970 +0000
1271 summary: (27) collapse
1271 summary: (27) collapse
1272
1272
1273
1273
1274 File + limit with revs != cset revs:
1274 File + limit with revs != cset revs:
1275 $ cd repo
1275 $ cd repo
1276 $ touch b
1276 $ touch b
1277 $ hg ci -Aqm0
1277 $ hg ci -Aqm0
1278 $ hg log -G -l2 a
1278 $ hg log -G -l2 a
1279 o changeset: 34:fea3ac5810e0
1279 o changeset: 34:fea3ac5810e0
1280 | parent: 32:d06dffa21a31
1280 | parent: 32:d06dffa21a31
1281 ~ user: test
1281 ~ user: test
1282 date: Thu Jan 01 00:00:34 1970 +0000
1282 date: Thu Jan 01 00:00:34 1970 +0000
1283 summary: (34) head
1283 summary: (34) head
1284
1284
1285 o changeset: 33:68608f5145f9
1285 o changeset: 33:68608f5145f9
1286 | parent: 18:1aa84d96232a
1286 | parent: 18:1aa84d96232a
1287 ~ user: test
1287 ~ user: test
1288 date: Thu Jan 01 00:00:33 1970 +0000
1288 date: Thu Jan 01 00:00:33 1970 +0000
1289 summary: (33) head
1289 summary: (33) head
1290
1290
1291
1291
1292 File + limit + -ra:b, (b - a) < limit:
1292 File + limit + -ra:b, (b - a) < limit:
1293 $ hg log -G -l3000 -r32:tip a
1293 $ hg log -G -l3000 -r32:tip a
1294 o changeset: 34:fea3ac5810e0
1294 o changeset: 34:fea3ac5810e0
1295 | parent: 32:d06dffa21a31
1295 | parent: 32:d06dffa21a31
1296 | user: test
1296 | user: test
1297 | date: Thu Jan 01 00:00:34 1970 +0000
1297 | date: Thu Jan 01 00:00:34 1970 +0000
1298 | summary: (34) head
1298 | summary: (34) head
1299 |
1299 |
1300 | o changeset: 33:68608f5145f9
1300 | o changeset: 33:68608f5145f9
1301 | | parent: 18:1aa84d96232a
1301 | | parent: 18:1aa84d96232a
1302 | ~ user: test
1302 | ~ user: test
1303 | date: Thu Jan 01 00:00:33 1970 +0000
1303 | date: Thu Jan 01 00:00:33 1970 +0000
1304 | summary: (33) head
1304 | summary: (33) head
1305 |
1305 |
1306 o changeset: 32:d06dffa21a31
1306 o changeset: 32:d06dffa21a31
1307 |\ parent: 27:886ed638191b
1307 |\ parent: 27:886ed638191b
1308 ~ ~ parent: 31:621d83e11f67
1308 ~ ~ parent: 31:621d83e11f67
1309 user: test
1309 user: test
1310 date: Thu Jan 01 00:00:32 1970 +0000
1310 date: Thu Jan 01 00:00:32 1970 +0000
1311 summary: (32) expand
1311 summary: (32) expand
1312
1312
1313
1313
1314 Point out a common and an uncommon unshown parent
1314 Point out a common and an uncommon unshown parent
1315
1315
1316 $ hg log -G -r 'rev(8) or rev(9)'
1316 $ hg log -G -r 'rev(8) or rev(9)'
1317 o changeset: 9:7010c0af0a35
1317 o changeset: 9:7010c0af0a35
1318 |\ parent: 7:b632bb1b1224
1318 |\ parent: 7:b632bb1b1224
1319 | ~ parent: 8:7a0b11f71937
1319 | ~ parent: 8:7a0b11f71937
1320 | user: test
1320 | user: test
1321 | date: Thu Jan 01 00:00:09 1970 +0000
1321 | date: Thu Jan 01 00:00:09 1970 +0000
1322 | summary: (9) expand
1322 | summary: (9) expand
1323 |
1323 |
1324 o changeset: 8:7a0b11f71937
1324 o changeset: 8:7a0b11f71937
1325 |\ parent: 0:e6eb3150255d
1325 |\ parent: 0:e6eb3150255d
1326 ~ ~ parent: 7:b632bb1b1224
1326 ~ ~ parent: 7:b632bb1b1224
1327 user: test
1327 user: test
1328 date: Thu Jan 01 00:00:08 1970 +0000
1328 date: Thu Jan 01 00:00:08 1970 +0000
1329 summary: (8) merge two known; one immediate left, one far right
1329 summary: (8) merge two known; one immediate left, one far right
1330
1330
1331
1331
1332 File + limit + -ra:b, b < tip:
1332 File + limit + -ra:b, b < tip:
1333
1333
1334 $ hg log -G -l1 -r32:34 a
1334 $ hg log -G -l1 -r32:34 a
1335 o changeset: 34:fea3ac5810e0
1335 o changeset: 34:fea3ac5810e0
1336 | parent: 32:d06dffa21a31
1336 | parent: 32:d06dffa21a31
1337 ~ user: test
1337 ~ user: test
1338 date: Thu Jan 01 00:00:34 1970 +0000
1338 date: Thu Jan 01 00:00:34 1970 +0000
1339 summary: (34) head
1339 summary: (34) head
1340
1340
1341
1341
1342 file(File) + limit + -ra:b, b < tip:
1342 file(File) + limit + -ra:b, b < tip:
1343
1343
1344 $ hg log -G -l1 -r32:34 -r 'file("a")'
1344 $ hg log -G -l1 -r32:34 -r 'file("a")'
1345 o changeset: 34:fea3ac5810e0
1345 o changeset: 34:fea3ac5810e0
1346 | parent: 32:d06dffa21a31
1346 | parent: 32:d06dffa21a31
1347 ~ user: test
1347 ~ user: test
1348 date: Thu Jan 01 00:00:34 1970 +0000
1348 date: Thu Jan 01 00:00:34 1970 +0000
1349 summary: (34) head
1349 summary: (34) head
1350
1350
1351
1351
1352 limit(file(File) and a::b), b < tip:
1352 limit(file(File) and a::b), b < tip:
1353
1353
1354 $ hg log -G -r 'limit(file("a") and 32::34, 1)'
1354 $ hg log -G -r 'limit(file("a") and 32::34, 1)'
1355 o changeset: 32:d06dffa21a31
1355 o changeset: 32:d06dffa21a31
1356 |\ parent: 27:886ed638191b
1356 |\ parent: 27:886ed638191b
1357 ~ ~ parent: 31:621d83e11f67
1357 ~ ~ parent: 31:621d83e11f67
1358 user: test
1358 user: test
1359 date: Thu Jan 01 00:00:32 1970 +0000
1359 date: Thu Jan 01 00:00:32 1970 +0000
1360 summary: (32) expand
1360 summary: (32) expand
1361
1361
1362
1362
1363 File + limit + -ra:b, b < tip:
1363 File + limit + -ra:b, b < tip:
1364
1364
1365 $ hg log -G -r 'limit(file("a") and 34::32, 1)'
1365 $ hg log -G -r 'limit(file("a") and 34::32, 1)'
1366
1366
1367 File + limit + -ra:b, b < tip, (b - a) < limit:
1367 File + limit + -ra:b, b < tip, (b - a) < limit:
1368
1368
1369 $ hg log -G -l10 -r33:34 a
1369 $ hg log -G -l10 -r33:34 a
1370 o changeset: 34:fea3ac5810e0
1370 o changeset: 34:fea3ac5810e0
1371 | parent: 32:d06dffa21a31
1371 | parent: 32:d06dffa21a31
1372 ~ user: test
1372 ~ user: test
1373 date: Thu Jan 01 00:00:34 1970 +0000
1373 date: Thu Jan 01 00:00:34 1970 +0000
1374 summary: (34) head
1374 summary: (34) head
1375
1375
1376 o changeset: 33:68608f5145f9
1376 o changeset: 33:68608f5145f9
1377 | parent: 18:1aa84d96232a
1377 | parent: 18:1aa84d96232a
1378 ~ user: test
1378 ~ user: test
1379 date: Thu Jan 01 00:00:33 1970 +0000
1379 date: Thu Jan 01 00:00:33 1970 +0000
1380 summary: (33) head
1380 summary: (33) head
1381
1381
1382
1382
1383 Do not crash or produce strange graphs if history is buggy
1383 Do not crash or produce strange graphs if history is buggy
1384
1384
1385 $ hg branch branch
1385 $ hg branch branch
1386 marked working directory as branch branch
1386 marked working directory as branch branch
1387 (branches are permanent and global, did you want a bookmark?)
1387 (branches are permanent and global, did you want a bookmark?)
1388 $ commit 36 "buggy merge: identical parents" 35 35
1388 $ commit 36 "buggy merge: identical parents" 35 35
1389 $ hg log -G -l5
1389 $ hg log -G -l5
1390 @ changeset: 36:08a19a744424
1390 @ changeset: 36:08a19a744424
1391 | branch: branch
1391 | branch: branch
1392 | tag: tip
1392 | tag: tip
1393 | parent: 35:9159c3644c5e
1393 | parent: 35:9159c3644c5e
1394 | parent: 35:9159c3644c5e
1394 | parent: 35:9159c3644c5e
1395 | user: test
1395 | user: test
1396 | date: Thu Jan 01 00:00:36 1970 +0000
1396 | date: Thu Jan 01 00:00:36 1970 +0000
1397 | summary: (36) buggy merge: identical parents
1397 | summary: (36) buggy merge: identical parents
1398 |
1398 |
1399 o changeset: 35:9159c3644c5e
1399 o changeset: 35:9159c3644c5e
1400 | user: test
1400 | user: test
1401 | date: Thu Jan 01 00:00:00 1970 +0000
1401 | date: Thu Jan 01 00:00:00 1970 +0000
1402 | summary: 0
1402 | summary: 0
1403 |
1403 |
1404 o changeset: 34:fea3ac5810e0
1404 o changeset: 34:fea3ac5810e0
1405 | parent: 32:d06dffa21a31
1405 | parent: 32:d06dffa21a31
1406 | user: test
1406 | user: test
1407 | date: Thu Jan 01 00:00:34 1970 +0000
1407 | date: Thu Jan 01 00:00:34 1970 +0000
1408 | summary: (34) head
1408 | summary: (34) head
1409 |
1409 |
1410 | o changeset: 33:68608f5145f9
1410 | o changeset: 33:68608f5145f9
1411 | | parent: 18:1aa84d96232a
1411 | | parent: 18:1aa84d96232a
1412 | ~ user: test
1412 | ~ user: test
1413 | date: Thu Jan 01 00:00:33 1970 +0000
1413 | date: Thu Jan 01 00:00:33 1970 +0000
1414 | summary: (33) head
1414 | summary: (33) head
1415 |
1415 |
1416 o changeset: 32:d06dffa21a31
1416 o changeset: 32:d06dffa21a31
1417 |\ parent: 27:886ed638191b
1417 |\ parent: 27:886ed638191b
1418 ~ ~ parent: 31:621d83e11f67
1418 ~ ~ parent: 31:621d83e11f67
1419 user: test
1419 user: test
1420 date: Thu Jan 01 00:00:32 1970 +0000
1420 date: Thu Jan 01 00:00:32 1970 +0000
1421 summary: (32) expand
1421 summary: (32) expand
1422
1422
1423
1423
1424 Test log -G options
1424 Test log -G options
1425
1425
1426 $ testlog() {
1426 $ testlog() {
1427 > hg log -G --print-revset "$@"
1427 > hg log -G --print-revset "$@"
1428 > hg log --template 'nodetag {rev}\n' "$@" | grep nodetag \
1428 > hg log --template 'nodetag {rev}\n' "$@" | grep nodetag \
1429 > | sed 's/.*nodetag/nodetag/' > log.nodes
1429 > | sed 's/.*nodetag/nodetag/' > log.nodes
1430 > hg log -G --template 'nodetag {rev}\n' "$@" | grep nodetag \
1430 > hg log -G --template 'nodetag {rev}\n' "$@" | grep nodetag \
1431 > | sed 's/.*nodetag/nodetag/' > glog.nodes
1431 > | sed 's/.*nodetag/nodetag/' > glog.nodes
1432 > (cmp log.nodes glog.nodes || diff -u log.nodes glog.nodes) \
1432 > (cmp log.nodes glog.nodes || diff -u log.nodes glog.nodes) \
1433 > | grep '^[-+@ ]' || :
1433 > | grep '^[-+@ ]' || :
1434 > }
1434 > }
1435
1435
1436 glog always reorders nodes which explains the difference with log
1436 glog always reorders nodes which explains the difference with log
1437
1437
1438 $ testlog -r 27 -r 25 -r 21 -r 34 -r 32 -r 31
1438 $ testlog -r 27 -r 25 -r 21 -r 34 -r 32 -r 31
1439 ['27', '25', '21', '34', '32', '31']
1439 ['27', '25', '21', '34', '32', '31']
1440 []
1440 []
1441 --- log.nodes * (glob)
1441 --- log.nodes * (glob)
1442 +++ glog.nodes * (glob)
1442 +++ glog.nodes * (glob)
1443 @@ -1,6 +1,6 @@
1443 @@ -1,6 +1,6 @@
1444 -nodetag 27
1444 -nodetag 27
1445 -nodetag 25
1445 -nodetag 25
1446 -nodetag 21
1446 -nodetag 21
1447 nodetag 34
1447 nodetag 34
1448 nodetag 32
1448 nodetag 32
1449 nodetag 31
1449 nodetag 31
1450 +nodetag 27
1450 +nodetag 27
1451 +nodetag 25
1451 +nodetag 25
1452 +nodetag 21
1452 +nodetag 21
1453 $ testlog -u test -u not-a-user
1453 $ testlog -u test -u not-a-user
1454 []
1454 []
1455 (group
1455 (group
1456 (group
1456 (group
1457 (or
1457 (or
1458 (list
1458 (list
1459 (func
1459 (func
1460 ('symbol', 'user')
1460 ('symbol', 'user')
1461 ('string', 'test'))
1461 ('string', 'test'))
1462 (func
1462 (func
1463 ('symbol', 'user')
1463 ('symbol', 'user')
1464 ('string', 'not-a-user'))))))
1464 ('string', 'not-a-user'))))))
1465 $ testlog -b not-a-branch
1465 $ testlog -b not-a-branch
1466 abort: unknown revision 'not-a-branch'!
1466 abort: unknown revision 'not-a-branch'!
1467 abort: unknown revision 'not-a-branch'!
1467 abort: unknown revision 'not-a-branch'!
1468 abort: unknown revision 'not-a-branch'!
1468 abort: unknown revision 'not-a-branch'!
1469 $ testlog -b 35 -b 36 --only-branch branch
1469 $ testlog -b 35 -b 36 --only-branch branch
1470 []
1470 []
1471 (group
1471 (group
1472 (group
1472 (group
1473 (or
1473 (or
1474 (list
1474 (list
1475 (func
1475 (func
1476 ('symbol', 'branch')
1476 ('symbol', 'branch')
1477 ('string', 'default'))
1477 ('string', 'default'))
1478 (func
1478 (func
1479 ('symbol', 'branch')
1479 ('symbol', 'branch')
1480 ('string', 'branch'))
1480 ('string', 'branch'))
1481 (func
1481 (func
1482 ('symbol', 'branch')
1482 ('symbol', 'branch')
1483 ('string', 'branch'))))))
1483 ('string', 'branch'))))))
1484 $ testlog -k expand -k merge
1484 $ testlog -k expand -k merge
1485 []
1485 []
1486 (group
1486 (group
1487 (group
1487 (group
1488 (or
1488 (or
1489 (list
1489 (list
1490 (func
1490 (func
1491 ('symbol', 'keyword')
1491 ('symbol', 'keyword')
1492 ('string', 'expand'))
1492 ('string', 'expand'))
1493 (func
1493 (func
1494 ('symbol', 'keyword')
1494 ('symbol', 'keyword')
1495 ('string', 'merge'))))))
1495 ('string', 'merge'))))))
1496 $ testlog --only-merges
1496 $ testlog --only-merges
1497 []
1497 []
1498 (group
1498 (group
1499 (func
1499 (func
1500 ('symbol', 'merge')
1500 ('symbol', 'merge')
1501 None))
1501 None))
1502 $ testlog --no-merges
1502 $ testlog --no-merges
1503 []
1503 []
1504 (group
1504 (group
1505 (not
1505 (not
1506 (func
1506 (func
1507 ('symbol', 'merge')
1507 ('symbol', 'merge')
1508 None)))
1508 None)))
1509 $ testlog --date '2 0 to 4 0'
1509 $ testlog --date '2 0 to 4 0'
1510 []
1510 []
1511 (group
1511 (group
1512 (func
1512 (func
1513 ('symbol', 'date')
1513 ('symbol', 'date')
1514 ('string', '2 0 to 4 0')))
1514 ('string', '2 0 to 4 0')))
1515 $ hg log -G -d 'brace ) in a date'
1515 $ hg log -G -d 'brace ) in a date'
1516 hg: parse error: invalid date: 'brace ) in a date'
1516 hg: parse error: invalid date: 'brace ) in a date'
1517 [255]
1517 [255]
1518 $ testlog --prune 31 --prune 32
1518 $ testlog --prune 31 --prune 32
1519 []
1519 []
1520 (group
1520 (group
1521 (group
1521 (group
1522 (and
1522 (and
1523 (not
1523 (not
1524 (group
1524 (group
1525 (or
1525 (or
1526 (list
1526 (list
1527 ('string', '31')
1527 ('string', '31')
1528 (func
1528 (func
1529 ('symbol', 'ancestors')
1529 ('symbol', 'ancestors')
1530 ('string', '31'))))))
1530 ('string', '31'))))))
1531 (not
1531 (not
1532 (group
1532 (group
1533 (or
1533 (or
1534 (list
1534 (list
1535 ('string', '32')
1535 ('string', '32')
1536 (func
1536 (func
1537 ('symbol', 'ancestors')
1537 ('symbol', 'ancestors')
1538 ('string', '32')))))))))
1538 ('string', '32')))))))))
1539
1539
1540 Dedicated repo for --follow and paths filtering. The g is crafted to
1540 Dedicated repo for --follow and paths filtering. The g is crafted to
1541 have 2 filelog topological heads in a linear changeset graph.
1541 have 2 filelog topological heads in a linear changeset graph.
1542
1542
1543 $ cd ..
1543 $ cd ..
1544 $ hg init follow
1544 $ hg init follow
1545 $ cd follow
1545 $ cd follow
1546 $ testlog --follow
1546 $ testlog --follow
1547 []
1547 []
1548 []
1548 []
1549 $ testlog -rnull
1549 $ testlog -rnull
1550 ['null']
1550 ['null']
1551 []
1551 []
1552 $ echo a > a
1552 $ echo a > a
1553 $ echo aa > aa
1553 $ echo aa > aa
1554 $ echo f > f
1554 $ echo f > f
1555 $ hg ci -Am "add a" a aa f
1555 $ hg ci -Am "add a" a aa f
1556 $ hg cp a b
1556 $ hg cp a b
1557 $ hg cp f g
1557 $ hg cp f g
1558 $ hg ci -m "copy a b"
1558 $ hg ci -m "copy a b"
1559 $ mkdir dir
1559 $ mkdir dir
1560 $ hg mv b dir
1560 $ hg mv b dir
1561 $ echo g >> g
1561 $ echo g >> g
1562 $ echo f >> f
1562 $ echo f >> f
1563 $ hg ci -m "mv b dir/b"
1563 $ hg ci -m "mv b dir/b"
1564 $ hg mv a b
1564 $ hg mv a b
1565 $ hg cp -f f g
1565 $ hg cp -f f g
1566 $ echo a > d
1566 $ echo a > d
1567 $ hg add d
1567 $ hg add d
1568 $ hg ci -m "mv a b; add d"
1568 $ hg ci -m "mv a b; add d"
1569 $ hg mv dir/b e
1569 $ hg mv dir/b e
1570 $ hg ci -m "mv dir/b e"
1570 $ hg ci -m "mv dir/b e"
1571 $ hg log -G --template '({rev}) {desc|firstline}\n'
1571 $ hg log -G --template '({rev}) {desc|firstline}\n'
1572 @ (4) mv dir/b e
1572 @ (4) mv dir/b e
1573 |
1573 |
1574 o (3) mv a b; add d
1574 o (3) mv a b; add d
1575 |
1575 |
1576 o (2) mv b dir/b
1576 o (2) mv b dir/b
1577 |
1577 |
1578 o (1) copy a b
1578 o (1) copy a b
1579 |
1579 |
1580 o (0) add a
1580 o (0) add a
1581
1581
1582
1582
1583 $ testlog a
1583 $ testlog a
1584 []
1584 []
1585 (group
1585 (group
1586 (group
1586 (group
1587 (func
1587 (func
1588 ('symbol', 'filelog')
1588 ('symbol', 'filelog')
1589 ('string', 'a'))))
1589 ('string', 'a'))))
1590 $ testlog a b
1590 $ testlog a b
1591 []
1591 []
1592 (group
1592 (group
1593 (group
1593 (group
1594 (or
1594 (or
1595 (list
1595 (list
1596 (func
1596 (func
1597 ('symbol', 'filelog')
1597 ('symbol', 'filelog')
1598 ('string', 'a'))
1598 ('string', 'a'))
1599 (func
1599 (func
1600 ('symbol', 'filelog')
1600 ('symbol', 'filelog')
1601 ('string', 'b'))))))
1601 ('string', 'b'))))))
1602
1602
1603 Test falling back to slow path for non-existing files
1603 Test falling back to slow path for non-existing files
1604
1604
1605 $ testlog a c
1605 $ testlog a c
1606 []
1606 []
1607 (group
1607 (group
1608 (func
1608 (func
1609 ('symbol', '_matchfiles')
1609 ('symbol', '_matchfiles')
1610 (list
1610 (list
1611 ('string', 'r:')
1611 ('string', 'r:')
1612 ('string', 'd:relpath')
1612 ('string', 'd:relpath')
1613 ('string', 'p:a')
1613 ('string', 'p:a')
1614 ('string', 'p:c'))))
1614 ('string', 'p:c'))))
1615
1615
1616 Test multiple --include/--exclude/paths
1616 Test multiple --include/--exclude/paths
1617
1617
1618 $ testlog --include a --include e --exclude b --exclude e a e
1618 $ testlog --include a --include e --exclude b --exclude e a e
1619 []
1619 []
1620 (group
1620 (group
1621 (func
1621 (func
1622 ('symbol', '_matchfiles')
1622 ('symbol', '_matchfiles')
1623 (list
1623 (list
1624 ('string', 'r:')
1624 ('string', 'r:')
1625 ('string', 'd:relpath')
1625 ('string', 'd:relpath')
1626 ('string', 'p:a')
1626 ('string', 'p:a')
1627 ('string', 'p:e')
1627 ('string', 'p:e')
1628 ('string', 'i:a')
1628 ('string', 'i:a')
1629 ('string', 'i:e')
1629 ('string', 'i:e')
1630 ('string', 'x:b')
1630 ('string', 'x:b')
1631 ('string', 'x:e'))))
1631 ('string', 'x:e'))))
1632
1632
1633 Test glob expansion of pats
1633 Test glob expansion of pats
1634
1634
1635 $ expandglobs=`$PYTHON -c "import mercurial.util; \
1635 $ expandglobs=`$PYTHON -c "import mercurial.util; \
1636 > print mercurial.util.expandglobs and 'true' or 'false'"`
1636 > print(mercurial.util.expandglobs and 'true' or 'false')"`
1637 $ if [ $expandglobs = "true" ]; then
1637 $ if [ $expandglobs = "true" ]; then
1638 > testlog 'a*';
1638 > testlog 'a*';
1639 > else
1639 > else
1640 > testlog a*;
1640 > testlog a*;
1641 > fi;
1641 > fi;
1642 []
1642 []
1643 (group
1643 (group
1644 (group
1644 (group
1645 (func
1645 (func
1646 ('symbol', 'filelog')
1646 ('symbol', 'filelog')
1647 ('string', 'aa'))))
1647 ('string', 'aa'))))
1648
1648
1649 Test --follow on a non-existent directory
1649 Test --follow on a non-existent directory
1650
1650
1651 $ testlog -f dir
1651 $ testlog -f dir
1652 abort: cannot follow file not in parent revision: "dir"
1652 abort: cannot follow file not in parent revision: "dir"
1653 abort: cannot follow file not in parent revision: "dir"
1653 abort: cannot follow file not in parent revision: "dir"
1654 abort: cannot follow file not in parent revision: "dir"
1654 abort: cannot follow file not in parent revision: "dir"
1655
1655
1656 Test --follow on a directory
1656 Test --follow on a directory
1657
1657
1658 $ hg up -q '.^'
1658 $ hg up -q '.^'
1659 $ testlog -f dir
1659 $ testlog -f dir
1660 []
1660 []
1661 (group
1661 (group
1662 (and
1662 (and
1663 (func
1663 (func
1664 ('symbol', 'ancestors')
1664 ('symbol', 'ancestors')
1665 ('symbol', '.'))
1665 ('symbol', '.'))
1666 (func
1666 (func
1667 ('symbol', '_matchfiles')
1667 ('symbol', '_matchfiles')
1668 (list
1668 (list
1669 ('string', 'r:')
1669 ('string', 'r:')
1670 ('string', 'd:relpath')
1670 ('string', 'd:relpath')
1671 ('string', 'p:dir')))))
1671 ('string', 'p:dir')))))
1672 $ hg up -q tip
1672 $ hg up -q tip
1673
1673
1674 Test --follow on file not in parent revision
1674 Test --follow on file not in parent revision
1675
1675
1676 $ testlog -f a
1676 $ testlog -f a
1677 abort: cannot follow file not in parent revision: "a"
1677 abort: cannot follow file not in parent revision: "a"
1678 abort: cannot follow file not in parent revision: "a"
1678 abort: cannot follow file not in parent revision: "a"
1679 abort: cannot follow file not in parent revision: "a"
1679 abort: cannot follow file not in parent revision: "a"
1680
1680
1681 Test --follow and patterns
1681 Test --follow and patterns
1682
1682
1683 $ testlog -f 'glob:*'
1683 $ testlog -f 'glob:*'
1684 []
1684 []
1685 (group
1685 (group
1686 (and
1686 (and
1687 (func
1687 (func
1688 ('symbol', 'ancestors')
1688 ('symbol', 'ancestors')
1689 ('symbol', '.'))
1689 ('symbol', '.'))
1690 (func
1690 (func
1691 ('symbol', '_matchfiles')
1691 ('symbol', '_matchfiles')
1692 (list
1692 (list
1693 ('string', 'r:')
1693 ('string', 'r:')
1694 ('string', 'd:relpath')
1694 ('string', 'd:relpath')
1695 ('string', 'p:glob:*')))))
1695 ('string', 'p:glob:*')))))
1696
1696
1697 Test --follow on a single rename
1697 Test --follow on a single rename
1698
1698
1699 $ hg up -q 2
1699 $ hg up -q 2
1700 $ testlog -f a
1700 $ testlog -f a
1701 []
1701 []
1702 (group
1702 (group
1703 (group
1703 (group
1704 (func
1704 (func
1705 ('symbol', 'follow')
1705 ('symbol', 'follow')
1706 ('string', 'a'))))
1706 ('string', 'a'))))
1707
1707
1708 Test --follow and multiple renames
1708 Test --follow and multiple renames
1709
1709
1710 $ hg up -q tip
1710 $ hg up -q tip
1711 $ testlog -f e
1711 $ testlog -f e
1712 []
1712 []
1713 (group
1713 (group
1714 (group
1714 (group
1715 (func
1715 (func
1716 ('symbol', 'follow')
1716 ('symbol', 'follow')
1717 ('string', 'e'))))
1717 ('string', 'e'))))
1718
1718
1719 Test --follow and multiple filelog heads
1719 Test --follow and multiple filelog heads
1720
1720
1721 $ hg up -q 2
1721 $ hg up -q 2
1722 $ testlog -f g
1722 $ testlog -f g
1723 []
1723 []
1724 (group
1724 (group
1725 (group
1725 (group
1726 (func
1726 (func
1727 ('symbol', 'follow')
1727 ('symbol', 'follow')
1728 ('string', 'g'))))
1728 ('string', 'g'))))
1729 $ cat log.nodes
1729 $ cat log.nodes
1730 nodetag 2
1730 nodetag 2
1731 nodetag 1
1731 nodetag 1
1732 nodetag 0
1732 nodetag 0
1733 $ hg up -q tip
1733 $ hg up -q tip
1734 $ testlog -f g
1734 $ testlog -f g
1735 []
1735 []
1736 (group
1736 (group
1737 (group
1737 (group
1738 (func
1738 (func
1739 ('symbol', 'follow')
1739 ('symbol', 'follow')
1740 ('string', 'g'))))
1740 ('string', 'g'))))
1741 $ cat log.nodes
1741 $ cat log.nodes
1742 nodetag 3
1742 nodetag 3
1743 nodetag 2
1743 nodetag 2
1744 nodetag 0
1744 nodetag 0
1745
1745
1746 Test --follow and multiple files
1746 Test --follow and multiple files
1747
1747
1748 $ testlog -f g e
1748 $ testlog -f g e
1749 []
1749 []
1750 (group
1750 (group
1751 (group
1751 (group
1752 (or
1752 (or
1753 (list
1753 (list
1754 (func
1754 (func
1755 ('symbol', 'follow')
1755 ('symbol', 'follow')
1756 ('string', 'g'))
1756 ('string', 'g'))
1757 (func
1757 (func
1758 ('symbol', 'follow')
1758 ('symbol', 'follow')
1759 ('string', 'e'))))))
1759 ('string', 'e'))))))
1760 $ cat log.nodes
1760 $ cat log.nodes
1761 nodetag 4
1761 nodetag 4
1762 nodetag 3
1762 nodetag 3
1763 nodetag 2
1763 nodetag 2
1764 nodetag 1
1764 nodetag 1
1765 nodetag 0
1765 nodetag 0
1766
1766
1767 Test --follow null parent
1767 Test --follow null parent
1768
1768
1769 $ hg up -q null
1769 $ hg up -q null
1770 $ testlog -f
1770 $ testlog -f
1771 []
1771 []
1772 []
1772 []
1773
1773
1774 Test --follow-first
1774 Test --follow-first
1775
1775
1776 $ hg up -q 3
1776 $ hg up -q 3
1777 $ echo ee > e
1777 $ echo ee > e
1778 $ hg ci -Am "add another e" e
1778 $ hg ci -Am "add another e" e
1779 created new head
1779 created new head
1780 $ hg merge --tool internal:other 4
1780 $ hg merge --tool internal:other 4
1781 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
1781 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
1782 (branch merge, don't forget to commit)
1782 (branch merge, don't forget to commit)
1783 $ echo merge > e
1783 $ echo merge > e
1784 $ hg ci -m "merge 5 and 4"
1784 $ hg ci -m "merge 5 and 4"
1785 $ testlog --follow-first
1785 $ testlog --follow-first
1786 []
1786 []
1787 (group
1787 (group
1788 (func
1788 (func
1789 ('symbol', '_firstancestors')
1789 ('symbol', '_firstancestors')
1790 (func
1790 (func
1791 ('symbol', 'rev')
1791 ('symbol', 'rev')
1792 ('symbol', '6'))))
1792 ('symbol', '6'))))
1793
1793
1794 Cannot compare with log --follow-first FILE as it never worked
1794 Cannot compare with log --follow-first FILE as it never worked
1795
1795
1796 $ hg log -G --print-revset --follow-first e
1796 $ hg log -G --print-revset --follow-first e
1797 []
1797 []
1798 (group
1798 (group
1799 (group
1799 (group
1800 (func
1800 (func
1801 ('symbol', '_followfirst')
1801 ('symbol', '_followfirst')
1802 ('string', 'e'))))
1802 ('string', 'e'))))
1803 $ hg log -G --follow-first e --template '{rev} {desc|firstline}\n'
1803 $ hg log -G --follow-first e --template '{rev} {desc|firstline}\n'
1804 @ 6 merge 5 and 4
1804 @ 6 merge 5 and 4
1805 |\
1805 |\
1806 | ~
1806 | ~
1807 o 5 add another e
1807 o 5 add another e
1808 |
1808 |
1809 ~
1809 ~
1810
1810
1811 Test --copies
1811 Test --copies
1812
1812
1813 $ hg log -G --copies --template "{rev} {desc|firstline} \
1813 $ hg log -G --copies --template "{rev} {desc|firstline} \
1814 > copies: {file_copies_switch}\n"
1814 > copies: {file_copies_switch}\n"
1815 @ 6 merge 5 and 4 copies:
1815 @ 6 merge 5 and 4 copies:
1816 |\
1816 |\
1817 | o 5 add another e copies:
1817 | o 5 add another e copies:
1818 | |
1818 | |
1819 o | 4 mv dir/b e copies: e (dir/b)
1819 o | 4 mv dir/b e copies: e (dir/b)
1820 |/
1820 |/
1821 o 3 mv a b; add d copies: b (a)g (f)
1821 o 3 mv a b; add d copies: b (a)g (f)
1822 |
1822 |
1823 o 2 mv b dir/b copies: dir/b (b)
1823 o 2 mv b dir/b copies: dir/b (b)
1824 |
1824 |
1825 o 1 copy a b copies: b (a)g (f)
1825 o 1 copy a b copies: b (a)g (f)
1826 |
1826 |
1827 o 0 add a copies:
1827 o 0 add a copies:
1828
1828
1829 Test "set:..." and parent revision
1829 Test "set:..." and parent revision
1830
1830
1831 $ hg up -q 4
1831 $ hg up -q 4
1832 $ testlog "set:copied()"
1832 $ testlog "set:copied()"
1833 []
1833 []
1834 (group
1834 (group
1835 (func
1835 (func
1836 ('symbol', '_matchfiles')
1836 ('symbol', '_matchfiles')
1837 (list
1837 (list
1838 ('string', 'r:')
1838 ('string', 'r:')
1839 ('string', 'd:relpath')
1839 ('string', 'd:relpath')
1840 ('string', 'p:set:copied()'))))
1840 ('string', 'p:set:copied()'))))
1841 $ testlog --include "set:copied()"
1841 $ testlog --include "set:copied()"
1842 []
1842 []
1843 (group
1843 (group
1844 (func
1844 (func
1845 ('symbol', '_matchfiles')
1845 ('symbol', '_matchfiles')
1846 (list
1846 (list
1847 ('string', 'r:')
1847 ('string', 'r:')
1848 ('string', 'd:relpath')
1848 ('string', 'd:relpath')
1849 ('string', 'i:set:copied()'))))
1849 ('string', 'i:set:copied()'))))
1850 $ testlog -r "sort(file('set:copied()'), -rev)"
1850 $ testlog -r "sort(file('set:copied()'), -rev)"
1851 ["sort(file('set:copied()'), -rev)"]
1851 ["sort(file('set:copied()'), -rev)"]
1852 []
1852 []
1853
1853
1854 Test --removed
1854 Test --removed
1855
1855
1856 $ testlog --removed
1856 $ testlog --removed
1857 []
1857 []
1858 []
1858 []
1859 $ testlog --removed a
1859 $ testlog --removed a
1860 []
1860 []
1861 (group
1861 (group
1862 (func
1862 (func
1863 ('symbol', '_matchfiles')
1863 ('symbol', '_matchfiles')
1864 (list
1864 (list
1865 ('string', 'r:')
1865 ('string', 'r:')
1866 ('string', 'd:relpath')
1866 ('string', 'd:relpath')
1867 ('string', 'p:a'))))
1867 ('string', 'p:a'))))
1868 $ testlog --removed --follow a
1868 $ testlog --removed --follow a
1869 []
1869 []
1870 (group
1870 (group
1871 (and
1871 (and
1872 (func
1872 (func
1873 ('symbol', 'ancestors')
1873 ('symbol', 'ancestors')
1874 ('symbol', '.'))
1874 ('symbol', '.'))
1875 (func
1875 (func
1876 ('symbol', '_matchfiles')
1876 ('symbol', '_matchfiles')
1877 (list
1877 (list
1878 ('string', 'r:')
1878 ('string', 'r:')
1879 ('string', 'd:relpath')
1879 ('string', 'd:relpath')
1880 ('string', 'p:a')))))
1880 ('string', 'p:a')))))
1881
1881
1882 Test --patch and --stat with --follow and --follow-first
1882 Test --patch and --stat with --follow and --follow-first
1883
1883
1884 $ hg up -q 3
1884 $ hg up -q 3
1885 $ hg log -G --git --patch b
1885 $ hg log -G --git --patch b
1886 o changeset: 1:216d4c92cf98
1886 o changeset: 1:216d4c92cf98
1887 | user: test
1887 | user: test
1888 ~ date: Thu Jan 01 00:00:00 1970 +0000
1888 ~ date: Thu Jan 01 00:00:00 1970 +0000
1889 summary: copy a b
1889 summary: copy a b
1890
1890
1891 diff --git a/a b/b
1891 diff --git a/a b/b
1892 copy from a
1892 copy from a
1893 copy to b
1893 copy to b
1894
1894
1895
1895
1896 $ hg log -G --git --stat b
1896 $ hg log -G --git --stat b
1897 o changeset: 1:216d4c92cf98
1897 o changeset: 1:216d4c92cf98
1898 | user: test
1898 | user: test
1899 ~ date: Thu Jan 01 00:00:00 1970 +0000
1899 ~ date: Thu Jan 01 00:00:00 1970 +0000
1900 summary: copy a b
1900 summary: copy a b
1901
1901
1902 b | 0
1902 b | 0
1903 1 files changed, 0 insertions(+), 0 deletions(-)
1903 1 files changed, 0 insertions(+), 0 deletions(-)
1904
1904
1905
1905
1906 $ hg log -G --git --patch --follow b
1906 $ hg log -G --git --patch --follow b
1907 o changeset: 1:216d4c92cf98
1907 o changeset: 1:216d4c92cf98
1908 | user: test
1908 | user: test
1909 | date: Thu Jan 01 00:00:00 1970 +0000
1909 | date: Thu Jan 01 00:00:00 1970 +0000
1910 | summary: copy a b
1910 | summary: copy a b
1911 |
1911 |
1912 | diff --git a/a b/b
1912 | diff --git a/a b/b
1913 | copy from a
1913 | copy from a
1914 | copy to b
1914 | copy to b
1915 |
1915 |
1916 o changeset: 0:f8035bb17114
1916 o changeset: 0:f8035bb17114
1917 user: test
1917 user: test
1918 date: Thu Jan 01 00:00:00 1970 +0000
1918 date: Thu Jan 01 00:00:00 1970 +0000
1919 summary: add a
1919 summary: add a
1920
1920
1921 diff --git a/a b/a
1921 diff --git a/a b/a
1922 new file mode 100644
1922 new file mode 100644
1923 --- /dev/null
1923 --- /dev/null
1924 +++ b/a
1924 +++ b/a
1925 @@ -0,0 +1,1 @@
1925 @@ -0,0 +1,1 @@
1926 +a
1926 +a
1927
1927
1928
1928
1929 $ hg log -G --git --stat --follow b
1929 $ hg log -G --git --stat --follow b
1930 o changeset: 1:216d4c92cf98
1930 o changeset: 1:216d4c92cf98
1931 | user: test
1931 | user: test
1932 | date: Thu Jan 01 00:00:00 1970 +0000
1932 | date: Thu Jan 01 00:00:00 1970 +0000
1933 | summary: copy a b
1933 | summary: copy a b
1934 |
1934 |
1935 | b | 0
1935 | b | 0
1936 | 1 files changed, 0 insertions(+), 0 deletions(-)
1936 | 1 files changed, 0 insertions(+), 0 deletions(-)
1937 |
1937 |
1938 o changeset: 0:f8035bb17114
1938 o changeset: 0:f8035bb17114
1939 user: test
1939 user: test
1940 date: Thu Jan 01 00:00:00 1970 +0000
1940 date: Thu Jan 01 00:00:00 1970 +0000
1941 summary: add a
1941 summary: add a
1942
1942
1943 a | 1 +
1943 a | 1 +
1944 1 files changed, 1 insertions(+), 0 deletions(-)
1944 1 files changed, 1 insertions(+), 0 deletions(-)
1945
1945
1946
1946
1947 $ hg up -q 6
1947 $ hg up -q 6
1948 $ hg log -G --git --patch --follow-first e
1948 $ hg log -G --git --patch --follow-first e
1949 @ changeset: 6:fc281d8ff18d
1949 @ changeset: 6:fc281d8ff18d
1950 |\ tag: tip
1950 |\ tag: tip
1951 | ~ parent: 5:99b31f1c2782
1951 | ~ parent: 5:99b31f1c2782
1952 | parent: 4:17d952250a9d
1952 | parent: 4:17d952250a9d
1953 | user: test
1953 | user: test
1954 | date: Thu Jan 01 00:00:00 1970 +0000
1954 | date: Thu Jan 01 00:00:00 1970 +0000
1955 | summary: merge 5 and 4
1955 | summary: merge 5 and 4
1956 |
1956 |
1957 | diff --git a/e b/e
1957 | diff --git a/e b/e
1958 | --- a/e
1958 | --- a/e
1959 | +++ b/e
1959 | +++ b/e
1960 | @@ -1,1 +1,1 @@
1960 | @@ -1,1 +1,1 @@
1961 | -ee
1961 | -ee
1962 | +merge
1962 | +merge
1963 |
1963 |
1964 o changeset: 5:99b31f1c2782
1964 o changeset: 5:99b31f1c2782
1965 | parent: 3:5918b8d165d1
1965 | parent: 3:5918b8d165d1
1966 ~ user: test
1966 ~ user: test
1967 date: Thu Jan 01 00:00:00 1970 +0000
1967 date: Thu Jan 01 00:00:00 1970 +0000
1968 summary: add another e
1968 summary: add another e
1969
1969
1970 diff --git a/e b/e
1970 diff --git a/e b/e
1971 new file mode 100644
1971 new file mode 100644
1972 --- /dev/null
1972 --- /dev/null
1973 +++ b/e
1973 +++ b/e
1974 @@ -0,0 +1,1 @@
1974 @@ -0,0 +1,1 @@
1975 +ee
1975 +ee
1976
1976
1977
1977
1978 Test old-style --rev
1978 Test old-style --rev
1979
1979
1980 $ hg tag 'foo-bar'
1980 $ hg tag 'foo-bar'
1981 $ testlog -r 'foo-bar'
1981 $ testlog -r 'foo-bar'
1982 ['foo-bar']
1982 ['foo-bar']
1983 []
1983 []
1984
1984
1985 Test --follow and forward --rev
1985 Test --follow and forward --rev
1986
1986
1987 $ hg up -q 6
1987 $ hg up -q 6
1988 $ echo g > g
1988 $ echo g > g
1989 $ hg ci -Am 'add g' g
1989 $ hg ci -Am 'add g' g
1990 created new head
1990 created new head
1991 $ hg up -q 2
1991 $ hg up -q 2
1992 $ hg log -G --template "{rev} {desc|firstline}\n"
1992 $ hg log -G --template "{rev} {desc|firstline}\n"
1993 o 8 add g
1993 o 8 add g
1994 |
1994 |
1995 | o 7 Added tag foo-bar for changeset fc281d8ff18d
1995 | o 7 Added tag foo-bar for changeset fc281d8ff18d
1996 |/
1996 |/
1997 o 6 merge 5 and 4
1997 o 6 merge 5 and 4
1998 |\
1998 |\
1999 | o 5 add another e
1999 | o 5 add another e
2000 | |
2000 | |
2001 o | 4 mv dir/b e
2001 o | 4 mv dir/b e
2002 |/
2002 |/
2003 o 3 mv a b; add d
2003 o 3 mv a b; add d
2004 |
2004 |
2005 @ 2 mv b dir/b
2005 @ 2 mv b dir/b
2006 |
2006 |
2007 o 1 copy a b
2007 o 1 copy a b
2008 |
2008 |
2009 o 0 add a
2009 o 0 add a
2010
2010
2011 $ hg archive -r 7 archive
2011 $ hg archive -r 7 archive
2012 $ grep changessincelatesttag archive/.hg_archival.txt
2012 $ grep changessincelatesttag archive/.hg_archival.txt
2013 changessincelatesttag: 1
2013 changessincelatesttag: 1
2014 $ rm -r archive
2014 $ rm -r archive
2015
2015
2016 changessincelatesttag with no prior tag
2016 changessincelatesttag with no prior tag
2017 $ hg archive -r 4 archive
2017 $ hg archive -r 4 archive
2018 $ grep changessincelatesttag archive/.hg_archival.txt
2018 $ grep changessincelatesttag archive/.hg_archival.txt
2019 changessincelatesttag: 5
2019 changessincelatesttag: 5
2020
2020
2021 $ hg export 'all()'
2021 $ hg export 'all()'
2022 # HG changeset patch
2022 # HG changeset patch
2023 # User test
2023 # User test
2024 # Date 0 0
2024 # Date 0 0
2025 # Thu Jan 01 00:00:00 1970 +0000
2025 # Thu Jan 01 00:00:00 1970 +0000
2026 # Node ID f8035bb17114da16215af3436ec5222428ace8ee
2026 # Node ID f8035bb17114da16215af3436ec5222428ace8ee
2027 # Parent 0000000000000000000000000000000000000000
2027 # Parent 0000000000000000000000000000000000000000
2028 add a
2028 add a
2029
2029
2030 diff -r 000000000000 -r f8035bb17114 a
2030 diff -r 000000000000 -r f8035bb17114 a
2031 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2031 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2032 +++ b/a Thu Jan 01 00:00:00 1970 +0000
2032 +++ b/a Thu Jan 01 00:00:00 1970 +0000
2033 @@ -0,0 +1,1 @@
2033 @@ -0,0 +1,1 @@
2034 +a
2034 +a
2035 diff -r 000000000000 -r f8035bb17114 aa
2035 diff -r 000000000000 -r f8035bb17114 aa
2036 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2036 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2037 +++ b/aa Thu Jan 01 00:00:00 1970 +0000
2037 +++ b/aa Thu Jan 01 00:00:00 1970 +0000
2038 @@ -0,0 +1,1 @@
2038 @@ -0,0 +1,1 @@
2039 +aa
2039 +aa
2040 diff -r 000000000000 -r f8035bb17114 f
2040 diff -r 000000000000 -r f8035bb17114 f
2041 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2041 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2042 +++ b/f Thu Jan 01 00:00:00 1970 +0000
2042 +++ b/f Thu Jan 01 00:00:00 1970 +0000
2043 @@ -0,0 +1,1 @@
2043 @@ -0,0 +1,1 @@
2044 +f
2044 +f
2045 # HG changeset patch
2045 # HG changeset patch
2046 # User test
2046 # User test
2047 # Date 0 0
2047 # Date 0 0
2048 # Thu Jan 01 00:00:00 1970 +0000
2048 # Thu Jan 01 00:00:00 1970 +0000
2049 # Node ID 216d4c92cf98ff2b4641d508b76b529f3d424c92
2049 # Node ID 216d4c92cf98ff2b4641d508b76b529f3d424c92
2050 # Parent f8035bb17114da16215af3436ec5222428ace8ee
2050 # Parent f8035bb17114da16215af3436ec5222428ace8ee
2051 copy a b
2051 copy a b
2052
2052
2053 diff -r f8035bb17114 -r 216d4c92cf98 b
2053 diff -r f8035bb17114 -r 216d4c92cf98 b
2054 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2054 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2055 +++ b/b Thu Jan 01 00:00:00 1970 +0000
2055 +++ b/b Thu Jan 01 00:00:00 1970 +0000
2056 @@ -0,0 +1,1 @@
2056 @@ -0,0 +1,1 @@
2057 +a
2057 +a
2058 diff -r f8035bb17114 -r 216d4c92cf98 g
2058 diff -r f8035bb17114 -r 216d4c92cf98 g
2059 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2059 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2060 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2060 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2061 @@ -0,0 +1,1 @@
2061 @@ -0,0 +1,1 @@
2062 +f
2062 +f
2063 # HG changeset patch
2063 # HG changeset patch
2064 # User test
2064 # User test
2065 # Date 0 0
2065 # Date 0 0
2066 # Thu Jan 01 00:00:00 1970 +0000
2066 # Thu Jan 01 00:00:00 1970 +0000
2067 # Node ID bb573313a9e8349099b6ea2b2fb1fc7f424446f3
2067 # Node ID bb573313a9e8349099b6ea2b2fb1fc7f424446f3
2068 # Parent 216d4c92cf98ff2b4641d508b76b529f3d424c92
2068 # Parent 216d4c92cf98ff2b4641d508b76b529f3d424c92
2069 mv b dir/b
2069 mv b dir/b
2070
2070
2071 diff -r 216d4c92cf98 -r bb573313a9e8 b
2071 diff -r 216d4c92cf98 -r bb573313a9e8 b
2072 --- a/b Thu Jan 01 00:00:00 1970 +0000
2072 --- a/b Thu Jan 01 00:00:00 1970 +0000
2073 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2073 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2074 @@ -1,1 +0,0 @@
2074 @@ -1,1 +0,0 @@
2075 -a
2075 -a
2076 diff -r 216d4c92cf98 -r bb573313a9e8 dir/b
2076 diff -r 216d4c92cf98 -r bb573313a9e8 dir/b
2077 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2077 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2078 +++ b/dir/b Thu Jan 01 00:00:00 1970 +0000
2078 +++ b/dir/b Thu Jan 01 00:00:00 1970 +0000
2079 @@ -0,0 +1,1 @@
2079 @@ -0,0 +1,1 @@
2080 +a
2080 +a
2081 diff -r 216d4c92cf98 -r bb573313a9e8 f
2081 diff -r 216d4c92cf98 -r bb573313a9e8 f
2082 --- a/f Thu Jan 01 00:00:00 1970 +0000
2082 --- a/f Thu Jan 01 00:00:00 1970 +0000
2083 +++ b/f Thu Jan 01 00:00:00 1970 +0000
2083 +++ b/f Thu Jan 01 00:00:00 1970 +0000
2084 @@ -1,1 +1,2 @@
2084 @@ -1,1 +1,2 @@
2085 f
2085 f
2086 +f
2086 +f
2087 diff -r 216d4c92cf98 -r bb573313a9e8 g
2087 diff -r 216d4c92cf98 -r bb573313a9e8 g
2088 --- a/g Thu Jan 01 00:00:00 1970 +0000
2088 --- a/g Thu Jan 01 00:00:00 1970 +0000
2089 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2089 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2090 @@ -1,1 +1,2 @@
2090 @@ -1,1 +1,2 @@
2091 f
2091 f
2092 +g
2092 +g
2093 # HG changeset patch
2093 # HG changeset patch
2094 # User test
2094 # User test
2095 # Date 0 0
2095 # Date 0 0
2096 # Thu Jan 01 00:00:00 1970 +0000
2096 # Thu Jan 01 00:00:00 1970 +0000
2097 # Node ID 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2097 # Node ID 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2098 # Parent bb573313a9e8349099b6ea2b2fb1fc7f424446f3
2098 # Parent bb573313a9e8349099b6ea2b2fb1fc7f424446f3
2099 mv a b; add d
2099 mv a b; add d
2100
2100
2101 diff -r bb573313a9e8 -r 5918b8d165d1 a
2101 diff -r bb573313a9e8 -r 5918b8d165d1 a
2102 --- a/a Thu Jan 01 00:00:00 1970 +0000
2102 --- a/a Thu Jan 01 00:00:00 1970 +0000
2103 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2103 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2104 @@ -1,1 +0,0 @@
2104 @@ -1,1 +0,0 @@
2105 -a
2105 -a
2106 diff -r bb573313a9e8 -r 5918b8d165d1 b
2106 diff -r bb573313a9e8 -r 5918b8d165d1 b
2107 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2107 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2108 +++ b/b Thu Jan 01 00:00:00 1970 +0000
2108 +++ b/b Thu Jan 01 00:00:00 1970 +0000
2109 @@ -0,0 +1,1 @@
2109 @@ -0,0 +1,1 @@
2110 +a
2110 +a
2111 diff -r bb573313a9e8 -r 5918b8d165d1 d
2111 diff -r bb573313a9e8 -r 5918b8d165d1 d
2112 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2112 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2113 +++ b/d Thu Jan 01 00:00:00 1970 +0000
2113 +++ b/d Thu Jan 01 00:00:00 1970 +0000
2114 @@ -0,0 +1,1 @@
2114 @@ -0,0 +1,1 @@
2115 +a
2115 +a
2116 diff -r bb573313a9e8 -r 5918b8d165d1 g
2116 diff -r bb573313a9e8 -r 5918b8d165d1 g
2117 --- a/g Thu Jan 01 00:00:00 1970 +0000
2117 --- a/g Thu Jan 01 00:00:00 1970 +0000
2118 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2118 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2119 @@ -1,2 +1,2 @@
2119 @@ -1,2 +1,2 @@
2120 f
2120 f
2121 -g
2121 -g
2122 +f
2122 +f
2123 # HG changeset patch
2123 # HG changeset patch
2124 # User test
2124 # User test
2125 # Date 0 0
2125 # Date 0 0
2126 # Thu Jan 01 00:00:00 1970 +0000
2126 # Thu Jan 01 00:00:00 1970 +0000
2127 # Node ID 17d952250a9d03cc3dc77b199ab60e959b9b0260
2127 # Node ID 17d952250a9d03cc3dc77b199ab60e959b9b0260
2128 # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2128 # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2129 mv dir/b e
2129 mv dir/b e
2130
2130
2131 diff -r 5918b8d165d1 -r 17d952250a9d dir/b
2131 diff -r 5918b8d165d1 -r 17d952250a9d dir/b
2132 --- a/dir/b Thu Jan 01 00:00:00 1970 +0000
2132 --- a/dir/b Thu Jan 01 00:00:00 1970 +0000
2133 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2133 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2134 @@ -1,1 +0,0 @@
2134 @@ -1,1 +0,0 @@
2135 -a
2135 -a
2136 diff -r 5918b8d165d1 -r 17d952250a9d e
2136 diff -r 5918b8d165d1 -r 17d952250a9d e
2137 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2137 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2138 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2138 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2139 @@ -0,0 +1,1 @@
2139 @@ -0,0 +1,1 @@
2140 +a
2140 +a
2141 # HG changeset patch
2141 # HG changeset patch
2142 # User test
2142 # User test
2143 # Date 0 0
2143 # Date 0 0
2144 # Thu Jan 01 00:00:00 1970 +0000
2144 # Thu Jan 01 00:00:00 1970 +0000
2145 # Node ID 99b31f1c2782e2deb1723cef08930f70fc84b37b
2145 # Node ID 99b31f1c2782e2deb1723cef08930f70fc84b37b
2146 # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2146 # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2147 add another e
2147 add another e
2148
2148
2149 diff -r 5918b8d165d1 -r 99b31f1c2782 e
2149 diff -r 5918b8d165d1 -r 99b31f1c2782 e
2150 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2150 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2151 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2151 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2152 @@ -0,0 +1,1 @@
2152 @@ -0,0 +1,1 @@
2153 +ee
2153 +ee
2154 # HG changeset patch
2154 # HG changeset patch
2155 # User test
2155 # User test
2156 # Date 0 0
2156 # Date 0 0
2157 # Thu Jan 01 00:00:00 1970 +0000
2157 # Thu Jan 01 00:00:00 1970 +0000
2158 # Node ID fc281d8ff18d999ad6497b3d27390bcd695dcc73
2158 # Node ID fc281d8ff18d999ad6497b3d27390bcd695dcc73
2159 # Parent 99b31f1c2782e2deb1723cef08930f70fc84b37b
2159 # Parent 99b31f1c2782e2deb1723cef08930f70fc84b37b
2160 # Parent 17d952250a9d03cc3dc77b199ab60e959b9b0260
2160 # Parent 17d952250a9d03cc3dc77b199ab60e959b9b0260
2161 merge 5 and 4
2161 merge 5 and 4
2162
2162
2163 diff -r 99b31f1c2782 -r fc281d8ff18d dir/b
2163 diff -r 99b31f1c2782 -r fc281d8ff18d dir/b
2164 --- a/dir/b Thu Jan 01 00:00:00 1970 +0000
2164 --- a/dir/b Thu Jan 01 00:00:00 1970 +0000
2165 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2165 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2166 @@ -1,1 +0,0 @@
2166 @@ -1,1 +0,0 @@
2167 -a
2167 -a
2168 diff -r 99b31f1c2782 -r fc281d8ff18d e
2168 diff -r 99b31f1c2782 -r fc281d8ff18d e
2169 --- a/e Thu Jan 01 00:00:00 1970 +0000
2169 --- a/e Thu Jan 01 00:00:00 1970 +0000
2170 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2170 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2171 @@ -1,1 +1,1 @@
2171 @@ -1,1 +1,1 @@
2172 -ee
2172 -ee
2173 +merge
2173 +merge
2174 # HG changeset patch
2174 # HG changeset patch
2175 # User test
2175 # User test
2176 # Date 0 0
2176 # Date 0 0
2177 # Thu Jan 01 00:00:00 1970 +0000
2177 # Thu Jan 01 00:00:00 1970 +0000
2178 # Node ID 02dbb8e276b8ab7abfd07cab50c901647e75c2dd
2178 # Node ID 02dbb8e276b8ab7abfd07cab50c901647e75c2dd
2179 # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73
2179 # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73
2180 Added tag foo-bar for changeset fc281d8ff18d
2180 Added tag foo-bar for changeset fc281d8ff18d
2181
2181
2182 diff -r fc281d8ff18d -r 02dbb8e276b8 .hgtags
2182 diff -r fc281d8ff18d -r 02dbb8e276b8 .hgtags
2183 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2183 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2184 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2184 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2185 @@ -0,0 +1,1 @@
2185 @@ -0,0 +1,1 @@
2186 +fc281d8ff18d999ad6497b3d27390bcd695dcc73 foo-bar
2186 +fc281d8ff18d999ad6497b3d27390bcd695dcc73 foo-bar
2187 # HG changeset patch
2187 # HG changeset patch
2188 # User test
2188 # User test
2189 # Date 0 0
2189 # Date 0 0
2190 # Thu Jan 01 00:00:00 1970 +0000
2190 # Thu Jan 01 00:00:00 1970 +0000
2191 # Node ID 24c2e826ddebf80f9dcd60b856bdb8e6715c5449
2191 # Node ID 24c2e826ddebf80f9dcd60b856bdb8e6715c5449
2192 # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73
2192 # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73
2193 add g
2193 add g
2194
2194
2195 diff -r fc281d8ff18d -r 24c2e826ddeb g
2195 diff -r fc281d8ff18d -r 24c2e826ddeb g
2196 --- a/g Thu Jan 01 00:00:00 1970 +0000
2196 --- a/g Thu Jan 01 00:00:00 1970 +0000
2197 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2197 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2198 @@ -1,2 +1,1 @@
2198 @@ -1,2 +1,1 @@
2199 -f
2199 -f
2200 -f
2200 -f
2201 +g
2201 +g
2202 $ testlog --follow -r6 -r8 -r5 -r7 -r4
2202 $ testlog --follow -r6 -r8 -r5 -r7 -r4
2203 ['6', '8', '5', '7', '4']
2203 ['6', '8', '5', '7', '4']
2204 (group
2204 (group
2205 (func
2205 (func
2206 ('symbol', 'descendants')
2206 ('symbol', 'descendants')
2207 (func
2207 (func
2208 ('symbol', 'rev')
2208 ('symbol', 'rev')
2209 ('symbol', '6'))))
2209 ('symbol', '6'))))
2210
2210
2211 Test --follow-first and forward --rev
2211 Test --follow-first and forward --rev
2212
2212
2213 $ testlog --follow-first -r6 -r8 -r5 -r7 -r4
2213 $ testlog --follow-first -r6 -r8 -r5 -r7 -r4
2214 ['6', '8', '5', '7', '4']
2214 ['6', '8', '5', '7', '4']
2215 (group
2215 (group
2216 (func
2216 (func
2217 ('symbol', '_firstdescendants')
2217 ('symbol', '_firstdescendants')
2218 (func
2218 (func
2219 ('symbol', 'rev')
2219 ('symbol', 'rev')
2220 ('symbol', '6'))))
2220 ('symbol', '6'))))
2221 --- log.nodes * (glob)
2221 --- log.nodes * (glob)
2222 +++ glog.nodes * (glob)
2222 +++ glog.nodes * (glob)
2223 @@ -1,3 +1,3 @@
2223 @@ -1,3 +1,3 @@
2224 -nodetag 6
2224 -nodetag 6
2225 nodetag 8
2225 nodetag 8
2226 nodetag 7
2226 nodetag 7
2227 +nodetag 6
2227 +nodetag 6
2228
2228
2229 Test --follow and backward --rev
2229 Test --follow and backward --rev
2230
2230
2231 $ testlog --follow -r6 -r5 -r7 -r8 -r4
2231 $ testlog --follow -r6 -r5 -r7 -r8 -r4
2232 ['6', '5', '7', '8', '4']
2232 ['6', '5', '7', '8', '4']
2233 (group
2233 (group
2234 (func
2234 (func
2235 ('symbol', 'ancestors')
2235 ('symbol', 'ancestors')
2236 (func
2236 (func
2237 ('symbol', 'rev')
2237 ('symbol', 'rev')
2238 ('symbol', '6'))))
2238 ('symbol', '6'))))
2239
2239
2240 Test --follow-first and backward --rev
2240 Test --follow-first and backward --rev
2241
2241
2242 $ testlog --follow-first -r6 -r5 -r7 -r8 -r4
2242 $ testlog --follow-first -r6 -r5 -r7 -r8 -r4
2243 ['6', '5', '7', '8', '4']
2243 ['6', '5', '7', '8', '4']
2244 (group
2244 (group
2245 (func
2245 (func
2246 ('symbol', '_firstancestors')
2246 ('symbol', '_firstancestors')
2247 (func
2247 (func
2248 ('symbol', 'rev')
2248 ('symbol', 'rev')
2249 ('symbol', '6'))))
2249 ('symbol', '6'))))
2250
2250
2251 Test --follow with --rev of graphlog extension
2251 Test --follow with --rev of graphlog extension
2252
2252
2253 $ hg --config extensions.graphlog= glog -qfr1
2253 $ hg --config extensions.graphlog= glog -qfr1
2254 o 1:216d4c92cf98
2254 o 1:216d4c92cf98
2255 |
2255 |
2256 o 0:f8035bb17114
2256 o 0:f8035bb17114
2257
2257
2258
2258
2259 Test subdir
2259 Test subdir
2260
2260
2261 $ hg up -q 3
2261 $ hg up -q 3
2262 $ cd dir
2262 $ cd dir
2263 $ testlog .
2263 $ testlog .
2264 []
2264 []
2265 (group
2265 (group
2266 (func
2266 (func
2267 ('symbol', '_matchfiles')
2267 ('symbol', '_matchfiles')
2268 (list
2268 (list
2269 ('string', 'r:')
2269 ('string', 'r:')
2270 ('string', 'd:relpath')
2270 ('string', 'd:relpath')
2271 ('string', 'p:.'))))
2271 ('string', 'p:.'))))
2272 $ testlog ../b
2272 $ testlog ../b
2273 []
2273 []
2274 (group
2274 (group
2275 (group
2275 (group
2276 (func
2276 (func
2277 ('symbol', 'filelog')
2277 ('symbol', 'filelog')
2278 ('string', '../b'))))
2278 ('string', '../b'))))
2279 $ testlog -f ../b
2279 $ testlog -f ../b
2280 []
2280 []
2281 (group
2281 (group
2282 (group
2282 (group
2283 (func
2283 (func
2284 ('symbol', 'follow')
2284 ('symbol', 'follow')
2285 ('string', 'b'))))
2285 ('string', 'b'))))
2286 $ cd ..
2286 $ cd ..
2287
2287
2288 Test --hidden
2288 Test --hidden
2289 (enable obsolete)
2289 (enable obsolete)
2290
2290
2291 $ cat >> $HGRCPATH << EOF
2291 $ cat >> $HGRCPATH << EOF
2292 > [experimental]
2292 > [experimental]
2293 > evolution=createmarkers
2293 > evolution=createmarkers
2294 > EOF
2294 > EOF
2295
2295
2296 $ hg debugobsolete `hg id --debug -i -r 8`
2296 $ hg debugobsolete `hg id --debug -i -r 8`
2297 obsoleted 1 changesets
2297 obsoleted 1 changesets
2298 $ testlog
2298 $ testlog
2299 []
2299 []
2300 []
2300 []
2301 $ testlog --hidden
2301 $ testlog --hidden
2302 []
2302 []
2303 []
2303 []
2304 $ hg log -G --template '{rev} {desc}\n'
2304 $ hg log -G --template '{rev} {desc}\n'
2305 o 7 Added tag foo-bar for changeset fc281d8ff18d
2305 o 7 Added tag foo-bar for changeset fc281d8ff18d
2306 |
2306 |
2307 o 6 merge 5 and 4
2307 o 6 merge 5 and 4
2308 |\
2308 |\
2309 | o 5 add another e
2309 | o 5 add another e
2310 | |
2310 | |
2311 o | 4 mv dir/b e
2311 o | 4 mv dir/b e
2312 |/
2312 |/
2313 @ 3 mv a b; add d
2313 @ 3 mv a b; add d
2314 |
2314 |
2315 o 2 mv b dir/b
2315 o 2 mv b dir/b
2316 |
2316 |
2317 o 1 copy a b
2317 o 1 copy a b
2318 |
2318 |
2319 o 0 add a
2319 o 0 add a
2320
2320
2321
2321
2322 A template without trailing newline should do something sane
2322 A template without trailing newline should do something sane
2323
2323
2324 $ hg log -G -r ::2 --template '{rev} {desc}'
2324 $ hg log -G -r ::2 --template '{rev} {desc}'
2325 o 2 mv b dir/b
2325 o 2 mv b dir/b
2326 |
2326 |
2327 o 1 copy a b
2327 o 1 copy a b
2328 |
2328 |
2329 o 0 add a
2329 o 0 add a
2330
2330
2331
2331
2332 Extra newlines must be preserved
2332 Extra newlines must be preserved
2333
2333
2334 $ hg log -G -r ::2 --template '\n{rev} {desc}\n\n'
2334 $ hg log -G -r ::2 --template '\n{rev} {desc}\n\n'
2335 o
2335 o
2336 | 2 mv b dir/b
2336 | 2 mv b dir/b
2337 |
2337 |
2338 o
2338 o
2339 | 1 copy a b
2339 | 1 copy a b
2340 |
2340 |
2341 o
2341 o
2342 0 add a
2342 0 add a
2343
2343
2344
2344
2345 The almost-empty template should do something sane too ...
2345 The almost-empty template should do something sane too ...
2346
2346
2347 $ hg log -G -r ::2 --template '\n'
2347 $ hg log -G -r ::2 --template '\n'
2348 o
2348 o
2349 |
2349 |
2350 o
2350 o
2351 |
2351 |
2352 o
2352 o
2353
2353
2354
2354
2355 issue3772
2355 issue3772
2356
2356
2357 $ hg log -G -r :null
2357 $ hg log -G -r :null
2358 o changeset: 0:f8035bb17114
2358 o changeset: 0:f8035bb17114
2359 | user: test
2359 | user: test
2360 | date: Thu Jan 01 00:00:00 1970 +0000
2360 | date: Thu Jan 01 00:00:00 1970 +0000
2361 | summary: add a
2361 | summary: add a
2362 |
2362 |
2363 o changeset: -1:000000000000
2363 o changeset: -1:000000000000
2364 user:
2364 user:
2365 date: Thu Jan 01 00:00:00 1970 +0000
2365 date: Thu Jan 01 00:00:00 1970 +0000
2366
2366
2367 $ hg log -G -r null:null
2367 $ hg log -G -r null:null
2368 o changeset: -1:000000000000
2368 o changeset: -1:000000000000
2369 user:
2369 user:
2370 date: Thu Jan 01 00:00:00 1970 +0000
2370 date: Thu Jan 01 00:00:00 1970 +0000
2371
2371
2372
2372
2373 should not draw line down to null due to the magic of fullreposet
2373 should not draw line down to null due to the magic of fullreposet
2374
2374
2375 $ hg log -G -r 'all()' | tail -6
2375 $ hg log -G -r 'all()' | tail -6
2376 |
2376 |
2377 o changeset: 0:f8035bb17114
2377 o changeset: 0:f8035bb17114
2378 user: test
2378 user: test
2379 date: Thu Jan 01 00:00:00 1970 +0000
2379 date: Thu Jan 01 00:00:00 1970 +0000
2380 summary: add a
2380 summary: add a
2381
2381
2382
2382
2383 $ hg log -G -r 'branch(default)' | tail -6
2383 $ hg log -G -r 'branch(default)' | tail -6
2384 |
2384 |
2385 o changeset: 0:f8035bb17114
2385 o changeset: 0:f8035bb17114
2386 user: test
2386 user: test
2387 date: Thu Jan 01 00:00:00 1970 +0000
2387 date: Thu Jan 01 00:00:00 1970 +0000
2388 summary: add a
2388 summary: add a
2389
2389
2390
2390
2391 working-directory revision
2391 working-directory revision
2392
2392
2393 $ hg log -G -qr '. + wdir()'
2393 $ hg log -G -qr '. + wdir()'
2394 o 2147483647:ffffffffffff
2394 o 2147483647:ffffffffffff
2395 |
2395 |
2396 @ 3:5918b8d165d1
2396 @ 3:5918b8d165d1
2397 |
2397 |
2398 ~
2398 ~
2399
2399
2400 node template with changeset_printer:
2400 node template with changeset_printer:
2401
2401
2402 $ hg log -Gqr 5:7 --config ui.graphnodetemplate='"{rev}"'
2402 $ hg log -Gqr 5:7 --config ui.graphnodetemplate='"{rev}"'
2403 7 7:02dbb8e276b8
2403 7 7:02dbb8e276b8
2404 |
2404 |
2405 6 6:fc281d8ff18d
2405 6 6:fc281d8ff18d
2406 |\
2406 |\
2407 | ~
2407 | ~
2408 5 5:99b31f1c2782
2408 5 5:99b31f1c2782
2409 |
2409 |
2410 ~
2410 ~
2411
2411
2412 node template with changeset_templater (shared cache variable):
2412 node template with changeset_templater (shared cache variable):
2413
2413
2414 $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \
2414 $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \
2415 > --config ui.graphnodetemplate='{ifeq(latesttagdistance, 0, "#", graphnode)}'
2415 > --config ui.graphnodetemplate='{ifeq(latesttagdistance, 0, "#", graphnode)}'
2416 o 7 foo-bar+1
2416 o 7 foo-bar+1
2417 |
2417 |
2418 # 6 foo-bar+0
2418 # 6 foo-bar+0
2419 |\
2419 |\
2420 | ~
2420 | ~
2421 o 5 null+5
2421 o 5 null+5
2422 |
2422 |
2423 ~
2423 ~
2424
2424
2425 label() should just work in node template:
2425 label() should just work in node template:
2426
2426
2427 $ hg log -Gqr 7 --config extensions.color= --color=debug \
2427 $ hg log -Gqr 7 --config extensions.color= --color=debug \
2428 > --config ui.graphnodetemplate='{label("branch.{branch}", rev)}'
2428 > --config ui.graphnodetemplate='{label("branch.{branch}", rev)}'
2429 [branch.default|7] [log.node|7:02dbb8e276b8]
2429 [branch.default|7] [log.node|7:02dbb8e276b8]
2430 |
2430 |
2431 ~
2431 ~
2432
2432
2433 $ cd ..
2433 $ cd ..
2434
2434
2435 change graph edge styling
2435 change graph edge styling
2436
2436
2437 $ cd repo
2437 $ cd repo
2438 $ cat << EOF >> $HGRCPATH
2438 $ cat << EOF >> $HGRCPATH
2439 > [experimental]
2439 > [experimental]
2440 > graphstyle.parent = |
2440 > graphstyle.parent = |
2441 > graphstyle.grandparent = :
2441 > graphstyle.grandparent = :
2442 > graphstyle.missing =
2442 > graphstyle.missing =
2443 > EOF
2443 > EOF
2444 $ hg log -G -r 'file("a")' -m
2444 $ hg log -G -r 'file("a")' -m
2445 @ changeset: 36:08a19a744424
2445 @ changeset: 36:08a19a744424
2446 : branch: branch
2446 : branch: branch
2447 : tag: tip
2447 : tag: tip
2448 : parent: 35:9159c3644c5e
2448 : parent: 35:9159c3644c5e
2449 : parent: 35:9159c3644c5e
2449 : parent: 35:9159c3644c5e
2450 : user: test
2450 : user: test
2451 : date: Thu Jan 01 00:00:36 1970 +0000
2451 : date: Thu Jan 01 00:00:36 1970 +0000
2452 : summary: (36) buggy merge: identical parents
2452 : summary: (36) buggy merge: identical parents
2453 :
2453 :
2454 o changeset: 32:d06dffa21a31
2454 o changeset: 32:d06dffa21a31
2455 |\ parent: 27:886ed638191b
2455 |\ parent: 27:886ed638191b
2456 | : parent: 31:621d83e11f67
2456 | : parent: 31:621d83e11f67
2457 | : user: test
2457 | : user: test
2458 | : date: Thu Jan 01 00:00:32 1970 +0000
2458 | : date: Thu Jan 01 00:00:32 1970 +0000
2459 | : summary: (32) expand
2459 | : summary: (32) expand
2460 | :
2460 | :
2461 o : changeset: 31:621d83e11f67
2461 o : changeset: 31:621d83e11f67
2462 |\: parent: 21:d42a756af44d
2462 |\: parent: 21:d42a756af44d
2463 | : parent: 30:6e11cd4b648f
2463 | : parent: 30:6e11cd4b648f
2464 | : user: test
2464 | : user: test
2465 | : date: Thu Jan 01 00:00:31 1970 +0000
2465 | : date: Thu Jan 01 00:00:31 1970 +0000
2466 | : summary: (31) expand
2466 | : summary: (31) expand
2467 | :
2467 | :
2468 o : changeset: 30:6e11cd4b648f
2468 o : changeset: 30:6e11cd4b648f
2469 |\ \ parent: 28:44ecd0b9ae99
2469 |\ \ parent: 28:44ecd0b9ae99
2470 | ~ : parent: 29:cd9bb2be7593
2470 | ~ : parent: 29:cd9bb2be7593
2471 | : user: test
2471 | : user: test
2472 | : date: Thu Jan 01 00:00:30 1970 +0000
2472 | : date: Thu Jan 01 00:00:30 1970 +0000
2473 | : summary: (30) expand
2473 | : summary: (30) expand
2474 | /
2474 | /
2475 o : changeset: 28:44ecd0b9ae99
2475 o : changeset: 28:44ecd0b9ae99
2476 |\ \ parent: 1:6db2ef61d156
2476 |\ \ parent: 1:6db2ef61d156
2477 | ~ : parent: 26:7f25b6c2f0b9
2477 | ~ : parent: 26:7f25b6c2f0b9
2478 | : user: test
2478 | : user: test
2479 | : date: Thu Jan 01 00:00:28 1970 +0000
2479 | : date: Thu Jan 01 00:00:28 1970 +0000
2480 | : summary: (28) merge zero known
2480 | : summary: (28) merge zero known
2481 | /
2481 | /
2482 o : changeset: 26:7f25b6c2f0b9
2482 o : changeset: 26:7f25b6c2f0b9
2483 |\ \ parent: 18:1aa84d96232a
2483 |\ \ parent: 18:1aa84d96232a
2484 | | : parent: 25:91da8ed57247
2484 | | : parent: 25:91da8ed57247
2485 | | : user: test
2485 | | : user: test
2486 | | : date: Thu Jan 01 00:00:26 1970 +0000
2486 | | : date: Thu Jan 01 00:00:26 1970 +0000
2487 | | : summary: (26) merge one known; far right
2487 | | : summary: (26) merge one known; far right
2488 | | :
2488 | | :
2489 | o : changeset: 25:91da8ed57247
2489 | o : changeset: 25:91da8ed57247
2490 | |\: parent: 21:d42a756af44d
2490 | |\: parent: 21:d42a756af44d
2491 | | : parent: 24:a9c19a3d96b7
2491 | | : parent: 24:a9c19a3d96b7
2492 | | : user: test
2492 | | : user: test
2493 | | : date: Thu Jan 01 00:00:25 1970 +0000
2493 | | : date: Thu Jan 01 00:00:25 1970 +0000
2494 | | : summary: (25) merge one known; far left
2494 | | : summary: (25) merge one known; far left
2495 | | :
2495 | | :
2496 | o : changeset: 24:a9c19a3d96b7
2496 | o : changeset: 24:a9c19a3d96b7
2497 | |\ \ parent: 0:e6eb3150255d
2497 | |\ \ parent: 0:e6eb3150255d
2498 | | ~ : parent: 23:a01cddf0766d
2498 | | ~ : parent: 23:a01cddf0766d
2499 | | : user: test
2499 | | : user: test
2500 | | : date: Thu Jan 01 00:00:24 1970 +0000
2500 | | : date: Thu Jan 01 00:00:24 1970 +0000
2501 | | : summary: (24) merge one known; immediate right
2501 | | : summary: (24) merge one known; immediate right
2502 | | /
2502 | | /
2503 | o : changeset: 23:a01cddf0766d
2503 | o : changeset: 23:a01cddf0766d
2504 | |\ \ parent: 1:6db2ef61d156
2504 | |\ \ parent: 1:6db2ef61d156
2505 | | ~ : parent: 22:e0d9cccacb5d
2505 | | ~ : parent: 22:e0d9cccacb5d
2506 | | : user: test
2506 | | : user: test
2507 | | : date: Thu Jan 01 00:00:23 1970 +0000
2507 | | : date: Thu Jan 01 00:00:23 1970 +0000
2508 | | : summary: (23) merge one known; immediate left
2508 | | : summary: (23) merge one known; immediate left
2509 | | /
2509 | | /
2510 | o : changeset: 22:e0d9cccacb5d
2510 | o : changeset: 22:e0d9cccacb5d
2511 |/:/ parent: 18:1aa84d96232a
2511 |/:/ parent: 18:1aa84d96232a
2512 | : parent: 21:d42a756af44d
2512 | : parent: 21:d42a756af44d
2513 | : user: test
2513 | : user: test
2514 | : date: Thu Jan 01 00:00:22 1970 +0000
2514 | : date: Thu Jan 01 00:00:22 1970 +0000
2515 | : summary: (22) merge two known; one far left, one far right
2515 | : summary: (22) merge two known; one far left, one far right
2516 | :
2516 | :
2517 | o changeset: 21:d42a756af44d
2517 | o changeset: 21:d42a756af44d
2518 | |\ parent: 19:31ddc2c1573b
2518 | |\ parent: 19:31ddc2c1573b
2519 | | | parent: 20:d30ed6450e32
2519 | | | parent: 20:d30ed6450e32
2520 | | | user: test
2520 | | | user: test
2521 | | | date: Thu Jan 01 00:00:21 1970 +0000
2521 | | | date: Thu Jan 01 00:00:21 1970 +0000
2522 | | | summary: (21) expand
2522 | | | summary: (21) expand
2523 | | |
2523 | | |
2524 +---o changeset: 20:d30ed6450e32
2524 +---o changeset: 20:d30ed6450e32
2525 | | | parent: 0:e6eb3150255d
2525 | | | parent: 0:e6eb3150255d
2526 | | ~ parent: 18:1aa84d96232a
2526 | | ~ parent: 18:1aa84d96232a
2527 | | user: test
2527 | | user: test
2528 | | date: Thu Jan 01 00:00:20 1970 +0000
2528 | | date: Thu Jan 01 00:00:20 1970 +0000
2529 | | summary: (20) merge two known; two far right
2529 | | summary: (20) merge two known; two far right
2530 | |
2530 | |
2531 | o changeset: 19:31ddc2c1573b
2531 | o changeset: 19:31ddc2c1573b
2532 | |\ parent: 15:1dda3f72782d
2532 | |\ parent: 15:1dda3f72782d
2533 | | | parent: 17:44765d7c06e0
2533 | | | parent: 17:44765d7c06e0
2534 | | | user: test
2534 | | | user: test
2535 | | | date: Thu Jan 01 00:00:19 1970 +0000
2535 | | | date: Thu Jan 01 00:00:19 1970 +0000
2536 | | | summary: (19) expand
2536 | | | summary: (19) expand
2537 | | |
2537 | | |
2538 o | | changeset: 18:1aa84d96232a
2538 o | | changeset: 18:1aa84d96232a
2539 |\| | parent: 1:6db2ef61d156
2539 |\| | parent: 1:6db2ef61d156
2540 ~ | | parent: 15:1dda3f72782d
2540 ~ | | parent: 15:1dda3f72782d
2541 | | user: test
2541 | | user: test
2542 | | date: Thu Jan 01 00:00:18 1970 +0000
2542 | | date: Thu Jan 01 00:00:18 1970 +0000
2543 | | summary: (18) merge two known; two far left
2543 | | summary: (18) merge two known; two far left
2544 / /
2544 / /
2545 | o changeset: 17:44765d7c06e0
2545 | o changeset: 17:44765d7c06e0
2546 | |\ parent: 12:86b91144a6e9
2546 | |\ parent: 12:86b91144a6e9
2547 | | | parent: 16:3677d192927d
2547 | | | parent: 16:3677d192927d
2548 | | | user: test
2548 | | | user: test
2549 | | | date: Thu Jan 01 00:00:17 1970 +0000
2549 | | | date: Thu Jan 01 00:00:17 1970 +0000
2550 | | | summary: (17) expand
2550 | | | summary: (17) expand
2551 | | |
2551 | | |
2552 | | o changeset: 16:3677d192927d
2552 | | o changeset: 16:3677d192927d
2553 | | |\ parent: 0:e6eb3150255d
2553 | | |\ parent: 0:e6eb3150255d
2554 | | ~ ~ parent: 1:6db2ef61d156
2554 | | ~ ~ parent: 1:6db2ef61d156
2555 | | user: test
2555 | | user: test
2556 | | date: Thu Jan 01 00:00:16 1970 +0000
2556 | | date: Thu Jan 01 00:00:16 1970 +0000
2557 | | summary: (16) merge two known; one immediate right, one near right
2557 | | summary: (16) merge two known; one immediate right, one near right
2558 | |
2558 | |
2559 o | changeset: 15:1dda3f72782d
2559 o | changeset: 15:1dda3f72782d
2560 |\ \ parent: 13:22d8966a97e3
2560 |\ \ parent: 13:22d8966a97e3
2561 | | | parent: 14:8eac370358ef
2561 | | | parent: 14:8eac370358ef
2562 | | | user: test
2562 | | | user: test
2563 | | | date: Thu Jan 01 00:00:15 1970 +0000
2563 | | | date: Thu Jan 01 00:00:15 1970 +0000
2564 | | | summary: (15) expand
2564 | | | summary: (15) expand
2565 | | |
2565 | | |
2566 | o | changeset: 14:8eac370358ef
2566 | o | changeset: 14:8eac370358ef
2567 | |\| parent: 0:e6eb3150255d
2567 | |\| parent: 0:e6eb3150255d
2568 | ~ | parent: 12:86b91144a6e9
2568 | ~ | parent: 12:86b91144a6e9
2569 | | user: test
2569 | | user: test
2570 | | date: Thu Jan 01 00:00:14 1970 +0000
2570 | | date: Thu Jan 01 00:00:14 1970 +0000
2571 | | summary: (14) merge two known; one immediate right, one far right
2571 | | summary: (14) merge two known; one immediate right, one far right
2572 | /
2572 | /
2573 o | changeset: 13:22d8966a97e3
2573 o | changeset: 13:22d8966a97e3
2574 |\ \ parent: 9:7010c0af0a35
2574 |\ \ parent: 9:7010c0af0a35
2575 | | | parent: 11:832d76e6bdf2
2575 | | | parent: 11:832d76e6bdf2
2576 | | | user: test
2576 | | | user: test
2577 | | | date: Thu Jan 01 00:00:13 1970 +0000
2577 | | | date: Thu Jan 01 00:00:13 1970 +0000
2578 | | | summary: (13) expand
2578 | | | summary: (13) expand
2579 | | |
2579 | | |
2580 +---o changeset: 12:86b91144a6e9
2580 +---o changeset: 12:86b91144a6e9
2581 | | | parent: 1:6db2ef61d156
2581 | | | parent: 1:6db2ef61d156
2582 | | ~ parent: 9:7010c0af0a35
2582 | | ~ parent: 9:7010c0af0a35
2583 | | user: test
2583 | | user: test
2584 | | date: Thu Jan 01 00:00:12 1970 +0000
2584 | | date: Thu Jan 01 00:00:12 1970 +0000
2585 | | summary: (12) merge two known; one immediate right, one far left
2585 | | summary: (12) merge two known; one immediate right, one far left
2586 | |
2586 | |
2587 | o changeset: 11:832d76e6bdf2
2587 | o changeset: 11:832d76e6bdf2
2588 | |\ parent: 6:b105a072e251
2588 | |\ parent: 6:b105a072e251
2589 | | | parent: 10:74c64d036d72
2589 | | | parent: 10:74c64d036d72
2590 | | | user: test
2590 | | | user: test
2591 | | | date: Thu Jan 01 00:00:11 1970 +0000
2591 | | | date: Thu Jan 01 00:00:11 1970 +0000
2592 | | | summary: (11) expand
2592 | | | summary: (11) expand
2593 | | |
2593 | | |
2594 | | o changeset: 10:74c64d036d72
2594 | | o changeset: 10:74c64d036d72
2595 | |/| parent: 0:e6eb3150255d
2595 | |/| parent: 0:e6eb3150255d
2596 | | ~ parent: 6:b105a072e251
2596 | | ~ parent: 6:b105a072e251
2597 | | user: test
2597 | | user: test
2598 | | date: Thu Jan 01 00:00:10 1970 +0000
2598 | | date: Thu Jan 01 00:00:10 1970 +0000
2599 | | summary: (10) merge two known; one immediate left, one near right
2599 | | summary: (10) merge two known; one immediate left, one near right
2600 | |
2600 | |
2601 o | changeset: 9:7010c0af0a35
2601 o | changeset: 9:7010c0af0a35
2602 |\ \ parent: 7:b632bb1b1224
2602 |\ \ parent: 7:b632bb1b1224
2603 | | | parent: 8:7a0b11f71937
2603 | | | parent: 8:7a0b11f71937
2604 | | | user: test
2604 | | | user: test
2605 | | | date: Thu Jan 01 00:00:09 1970 +0000
2605 | | | date: Thu Jan 01 00:00:09 1970 +0000
2606 | | | summary: (9) expand
2606 | | | summary: (9) expand
2607 | | |
2607 | | |
2608 | o | changeset: 8:7a0b11f71937
2608 | o | changeset: 8:7a0b11f71937
2609 |/| | parent: 0:e6eb3150255d
2609 |/| | parent: 0:e6eb3150255d
2610 | ~ | parent: 7:b632bb1b1224
2610 | ~ | parent: 7:b632bb1b1224
2611 | | user: test
2611 | | user: test
2612 | | date: Thu Jan 01 00:00:08 1970 +0000
2612 | | date: Thu Jan 01 00:00:08 1970 +0000
2613 | | summary: (8) merge two known; one immediate left, one far right
2613 | | summary: (8) merge two known; one immediate left, one far right
2614 | /
2614 | /
2615 o | changeset: 7:b632bb1b1224
2615 o | changeset: 7:b632bb1b1224
2616 |\ \ parent: 2:3d9a33b8d1e1
2616 |\ \ parent: 2:3d9a33b8d1e1
2617 | ~ | parent: 5:4409d547b708
2617 | ~ | parent: 5:4409d547b708
2618 | | user: test
2618 | | user: test
2619 | | date: Thu Jan 01 00:00:07 1970 +0000
2619 | | date: Thu Jan 01 00:00:07 1970 +0000
2620 | | summary: (7) expand
2620 | | summary: (7) expand
2621 | /
2621 | /
2622 | o changeset: 6:b105a072e251
2622 | o changeset: 6:b105a072e251
2623 |/| parent: 2:3d9a33b8d1e1
2623 |/| parent: 2:3d9a33b8d1e1
2624 | ~ parent: 5:4409d547b708
2624 | ~ parent: 5:4409d547b708
2625 | user: test
2625 | user: test
2626 | date: Thu Jan 01 00:00:06 1970 +0000
2626 | date: Thu Jan 01 00:00:06 1970 +0000
2627 | summary: (6) merge two known; one immediate left, one far left
2627 | summary: (6) merge two known; one immediate left, one far left
2628 |
2628 |
2629 o changeset: 5:4409d547b708
2629 o changeset: 5:4409d547b708
2630 |\ parent: 3:27eef8ed80b4
2630 |\ parent: 3:27eef8ed80b4
2631 | ~ parent: 4:26a8bac39d9f
2631 | ~ parent: 4:26a8bac39d9f
2632 | user: test
2632 | user: test
2633 | date: Thu Jan 01 00:00:05 1970 +0000
2633 | date: Thu Jan 01 00:00:05 1970 +0000
2634 | summary: (5) expand
2634 | summary: (5) expand
2635 |
2635 |
2636 o changeset: 4:26a8bac39d9f
2636 o changeset: 4:26a8bac39d9f
2637 |\ parent: 1:6db2ef61d156
2637 |\ parent: 1:6db2ef61d156
2638 ~ ~ parent: 3:27eef8ed80b4
2638 ~ ~ parent: 3:27eef8ed80b4
2639 user: test
2639 user: test
2640 date: Thu Jan 01 00:00:04 1970 +0000
2640 date: Thu Jan 01 00:00:04 1970 +0000
2641 summary: (4) merge two known; one immediate left, one immediate right
2641 summary: (4) merge two known; one immediate left, one immediate right
2642
2642
2643
2643
2644 Setting HGPLAIN ignores graphmod styling:
2644 Setting HGPLAIN ignores graphmod styling:
2645
2645
2646 $ HGPLAIN=1 hg log -G -r 'file("a")' -m
2646 $ HGPLAIN=1 hg log -G -r 'file("a")' -m
2647 @ changeset: 36:08a19a744424
2647 @ changeset: 36:08a19a744424
2648 | branch: branch
2648 | branch: branch
2649 | tag: tip
2649 | tag: tip
2650 | parent: 35:9159c3644c5e
2650 | parent: 35:9159c3644c5e
2651 | parent: 35:9159c3644c5e
2651 | parent: 35:9159c3644c5e
2652 | user: test
2652 | user: test
2653 | date: Thu Jan 01 00:00:36 1970 +0000
2653 | date: Thu Jan 01 00:00:36 1970 +0000
2654 | summary: (36) buggy merge: identical parents
2654 | summary: (36) buggy merge: identical parents
2655 |
2655 |
2656 o changeset: 32:d06dffa21a31
2656 o changeset: 32:d06dffa21a31
2657 |\ parent: 27:886ed638191b
2657 |\ parent: 27:886ed638191b
2658 | | parent: 31:621d83e11f67
2658 | | parent: 31:621d83e11f67
2659 | | user: test
2659 | | user: test
2660 | | date: Thu Jan 01 00:00:32 1970 +0000
2660 | | date: Thu Jan 01 00:00:32 1970 +0000
2661 | | summary: (32) expand
2661 | | summary: (32) expand
2662 | |
2662 | |
2663 o | changeset: 31:621d83e11f67
2663 o | changeset: 31:621d83e11f67
2664 |\| parent: 21:d42a756af44d
2664 |\| parent: 21:d42a756af44d
2665 | | parent: 30:6e11cd4b648f
2665 | | parent: 30:6e11cd4b648f
2666 | | user: test
2666 | | user: test
2667 | | date: Thu Jan 01 00:00:31 1970 +0000
2667 | | date: Thu Jan 01 00:00:31 1970 +0000
2668 | | summary: (31) expand
2668 | | summary: (31) expand
2669 | |
2669 | |
2670 o | changeset: 30:6e11cd4b648f
2670 o | changeset: 30:6e11cd4b648f
2671 |\ \ parent: 28:44ecd0b9ae99
2671 |\ \ parent: 28:44ecd0b9ae99
2672 | | | parent: 29:cd9bb2be7593
2672 | | | parent: 29:cd9bb2be7593
2673 | | | user: test
2673 | | | user: test
2674 | | | date: Thu Jan 01 00:00:30 1970 +0000
2674 | | | date: Thu Jan 01 00:00:30 1970 +0000
2675 | | | summary: (30) expand
2675 | | | summary: (30) expand
2676 | | |
2676 | | |
2677 o | | changeset: 28:44ecd0b9ae99
2677 o | | changeset: 28:44ecd0b9ae99
2678 |\ \ \ parent: 1:6db2ef61d156
2678 |\ \ \ parent: 1:6db2ef61d156
2679 | | | | parent: 26:7f25b6c2f0b9
2679 | | | | parent: 26:7f25b6c2f0b9
2680 | | | | user: test
2680 | | | | user: test
2681 | | | | date: Thu Jan 01 00:00:28 1970 +0000
2681 | | | | date: Thu Jan 01 00:00:28 1970 +0000
2682 | | | | summary: (28) merge zero known
2682 | | | | summary: (28) merge zero known
2683 | | | |
2683 | | | |
2684 o | | | changeset: 26:7f25b6c2f0b9
2684 o | | | changeset: 26:7f25b6c2f0b9
2685 |\ \ \ \ parent: 18:1aa84d96232a
2685 |\ \ \ \ parent: 18:1aa84d96232a
2686 | | | | | parent: 25:91da8ed57247
2686 | | | | | parent: 25:91da8ed57247
2687 | | | | | user: test
2687 | | | | | user: test
2688 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
2688 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
2689 | | | | | summary: (26) merge one known; far right
2689 | | | | | summary: (26) merge one known; far right
2690 | | | | |
2690 | | | | |
2691 | o-----+ changeset: 25:91da8ed57247
2691 | o-----+ changeset: 25:91da8ed57247
2692 | | | | | parent: 21:d42a756af44d
2692 | | | | | parent: 21:d42a756af44d
2693 | | | | | parent: 24:a9c19a3d96b7
2693 | | | | | parent: 24:a9c19a3d96b7
2694 | | | | | user: test
2694 | | | | | user: test
2695 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
2695 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
2696 | | | | | summary: (25) merge one known; far left
2696 | | | | | summary: (25) merge one known; far left
2697 | | | | |
2697 | | | | |
2698 | o | | | changeset: 24:a9c19a3d96b7
2698 | o | | | changeset: 24:a9c19a3d96b7
2699 | |\ \ \ \ parent: 0:e6eb3150255d
2699 | |\ \ \ \ parent: 0:e6eb3150255d
2700 | | | | | | parent: 23:a01cddf0766d
2700 | | | | | | parent: 23:a01cddf0766d
2701 | | | | | | user: test
2701 | | | | | | user: test
2702 | | | | | | date: Thu Jan 01 00:00:24 1970 +0000
2702 | | | | | | date: Thu Jan 01 00:00:24 1970 +0000
2703 | | | | | | summary: (24) merge one known; immediate right
2703 | | | | | | summary: (24) merge one known; immediate right
2704 | | | | | |
2704 | | | | | |
2705 | o---+ | | changeset: 23:a01cddf0766d
2705 | o---+ | | changeset: 23:a01cddf0766d
2706 | | | | | | parent: 1:6db2ef61d156
2706 | | | | | | parent: 1:6db2ef61d156
2707 | | | | | | parent: 22:e0d9cccacb5d
2707 | | | | | | parent: 22:e0d9cccacb5d
2708 | | | | | | user: test
2708 | | | | | | user: test
2709 | | | | | | date: Thu Jan 01 00:00:23 1970 +0000
2709 | | | | | | date: Thu Jan 01 00:00:23 1970 +0000
2710 | | | | | | summary: (23) merge one known; immediate left
2710 | | | | | | summary: (23) merge one known; immediate left
2711 | | | | | |
2711 | | | | | |
2712 | o-------+ changeset: 22:e0d9cccacb5d
2712 | o-------+ changeset: 22:e0d9cccacb5d
2713 | | | | | | parent: 18:1aa84d96232a
2713 | | | | | | parent: 18:1aa84d96232a
2714 |/ / / / / parent: 21:d42a756af44d
2714 |/ / / / / parent: 21:d42a756af44d
2715 | | | | | user: test
2715 | | | | | user: test
2716 | | | | | date: Thu Jan 01 00:00:22 1970 +0000
2716 | | | | | date: Thu Jan 01 00:00:22 1970 +0000
2717 | | | | | summary: (22) merge two known; one far left, one far right
2717 | | | | | summary: (22) merge two known; one far left, one far right
2718 | | | | |
2718 | | | | |
2719 | | | | o changeset: 21:d42a756af44d
2719 | | | | o changeset: 21:d42a756af44d
2720 | | | | |\ parent: 19:31ddc2c1573b
2720 | | | | |\ parent: 19:31ddc2c1573b
2721 | | | | | | parent: 20:d30ed6450e32
2721 | | | | | | parent: 20:d30ed6450e32
2722 | | | | | | user: test
2722 | | | | | | user: test
2723 | | | | | | date: Thu Jan 01 00:00:21 1970 +0000
2723 | | | | | | date: Thu Jan 01 00:00:21 1970 +0000
2724 | | | | | | summary: (21) expand
2724 | | | | | | summary: (21) expand
2725 | | | | | |
2725 | | | | | |
2726 +-+-------o changeset: 20:d30ed6450e32
2726 +-+-------o changeset: 20:d30ed6450e32
2727 | | | | | parent: 0:e6eb3150255d
2727 | | | | | parent: 0:e6eb3150255d
2728 | | | | | parent: 18:1aa84d96232a
2728 | | | | | parent: 18:1aa84d96232a
2729 | | | | | user: test
2729 | | | | | user: test
2730 | | | | | date: Thu Jan 01 00:00:20 1970 +0000
2730 | | | | | date: Thu Jan 01 00:00:20 1970 +0000
2731 | | | | | summary: (20) merge two known; two far right
2731 | | | | | summary: (20) merge two known; two far right
2732 | | | | |
2732 | | | | |
2733 | | | | o changeset: 19:31ddc2c1573b
2733 | | | | o changeset: 19:31ddc2c1573b
2734 | | | | |\ parent: 15:1dda3f72782d
2734 | | | | |\ parent: 15:1dda3f72782d
2735 | | | | | | parent: 17:44765d7c06e0
2735 | | | | | | parent: 17:44765d7c06e0
2736 | | | | | | user: test
2736 | | | | | | user: test
2737 | | | | | | date: Thu Jan 01 00:00:19 1970 +0000
2737 | | | | | | date: Thu Jan 01 00:00:19 1970 +0000
2738 | | | | | | summary: (19) expand
2738 | | | | | | summary: (19) expand
2739 | | | | | |
2739 | | | | | |
2740 o---+---+ | changeset: 18:1aa84d96232a
2740 o---+---+ | changeset: 18:1aa84d96232a
2741 | | | | | parent: 1:6db2ef61d156
2741 | | | | | parent: 1:6db2ef61d156
2742 / / / / / parent: 15:1dda3f72782d
2742 / / / / / parent: 15:1dda3f72782d
2743 | | | | | user: test
2743 | | | | | user: test
2744 | | | | | date: Thu Jan 01 00:00:18 1970 +0000
2744 | | | | | date: Thu Jan 01 00:00:18 1970 +0000
2745 | | | | | summary: (18) merge two known; two far left
2745 | | | | | summary: (18) merge two known; two far left
2746 | | | | |
2746 | | | | |
2747 | | | | o changeset: 17:44765d7c06e0
2747 | | | | o changeset: 17:44765d7c06e0
2748 | | | | |\ parent: 12:86b91144a6e9
2748 | | | | |\ parent: 12:86b91144a6e9
2749 | | | | | | parent: 16:3677d192927d
2749 | | | | | | parent: 16:3677d192927d
2750 | | | | | | user: test
2750 | | | | | | user: test
2751 | | | | | | date: Thu Jan 01 00:00:17 1970 +0000
2751 | | | | | | date: Thu Jan 01 00:00:17 1970 +0000
2752 | | | | | | summary: (17) expand
2752 | | | | | | summary: (17) expand
2753 | | | | | |
2753 | | | | | |
2754 +-+-------o changeset: 16:3677d192927d
2754 +-+-------o changeset: 16:3677d192927d
2755 | | | | | parent: 0:e6eb3150255d
2755 | | | | | parent: 0:e6eb3150255d
2756 | | | | | parent: 1:6db2ef61d156
2756 | | | | | parent: 1:6db2ef61d156
2757 | | | | | user: test
2757 | | | | | user: test
2758 | | | | | date: Thu Jan 01 00:00:16 1970 +0000
2758 | | | | | date: Thu Jan 01 00:00:16 1970 +0000
2759 | | | | | summary: (16) merge two known; one immediate right, one near right
2759 | | | | | summary: (16) merge two known; one immediate right, one near right
2760 | | | | |
2760 | | | | |
2761 | | | o | changeset: 15:1dda3f72782d
2761 | | | o | changeset: 15:1dda3f72782d
2762 | | | |\ \ parent: 13:22d8966a97e3
2762 | | | |\ \ parent: 13:22d8966a97e3
2763 | | | | | | parent: 14:8eac370358ef
2763 | | | | | | parent: 14:8eac370358ef
2764 | | | | | | user: test
2764 | | | | | | user: test
2765 | | | | | | date: Thu Jan 01 00:00:15 1970 +0000
2765 | | | | | | date: Thu Jan 01 00:00:15 1970 +0000
2766 | | | | | | summary: (15) expand
2766 | | | | | | summary: (15) expand
2767 | | | | | |
2767 | | | | | |
2768 +-------o | changeset: 14:8eac370358ef
2768 +-------o | changeset: 14:8eac370358ef
2769 | | | | |/ parent: 0:e6eb3150255d
2769 | | | | |/ parent: 0:e6eb3150255d
2770 | | | | | parent: 12:86b91144a6e9
2770 | | | | | parent: 12:86b91144a6e9
2771 | | | | | user: test
2771 | | | | | user: test
2772 | | | | | date: Thu Jan 01 00:00:14 1970 +0000
2772 | | | | | date: Thu Jan 01 00:00:14 1970 +0000
2773 | | | | | summary: (14) merge two known; one immediate right, one far right
2773 | | | | | summary: (14) merge two known; one immediate right, one far right
2774 | | | | |
2774 | | | | |
2775 | | | o | changeset: 13:22d8966a97e3
2775 | | | o | changeset: 13:22d8966a97e3
2776 | | | |\ \ parent: 9:7010c0af0a35
2776 | | | |\ \ parent: 9:7010c0af0a35
2777 | | | | | | parent: 11:832d76e6bdf2
2777 | | | | | | parent: 11:832d76e6bdf2
2778 | | | | | | user: test
2778 | | | | | | user: test
2779 | | | | | | date: Thu Jan 01 00:00:13 1970 +0000
2779 | | | | | | date: Thu Jan 01 00:00:13 1970 +0000
2780 | | | | | | summary: (13) expand
2780 | | | | | | summary: (13) expand
2781 | | | | | |
2781 | | | | | |
2782 | +---+---o changeset: 12:86b91144a6e9
2782 | +---+---o changeset: 12:86b91144a6e9
2783 | | | | | parent: 1:6db2ef61d156
2783 | | | | | parent: 1:6db2ef61d156
2784 | | | | | parent: 9:7010c0af0a35
2784 | | | | | parent: 9:7010c0af0a35
2785 | | | | | user: test
2785 | | | | | user: test
2786 | | | | | date: Thu Jan 01 00:00:12 1970 +0000
2786 | | | | | date: Thu Jan 01 00:00:12 1970 +0000
2787 | | | | | summary: (12) merge two known; one immediate right, one far left
2787 | | | | | summary: (12) merge two known; one immediate right, one far left
2788 | | | | |
2788 | | | | |
2789 | | | | o changeset: 11:832d76e6bdf2
2789 | | | | o changeset: 11:832d76e6bdf2
2790 | | | | |\ parent: 6:b105a072e251
2790 | | | | |\ parent: 6:b105a072e251
2791 | | | | | | parent: 10:74c64d036d72
2791 | | | | | | parent: 10:74c64d036d72
2792 | | | | | | user: test
2792 | | | | | | user: test
2793 | | | | | | date: Thu Jan 01 00:00:11 1970 +0000
2793 | | | | | | date: Thu Jan 01 00:00:11 1970 +0000
2794 | | | | | | summary: (11) expand
2794 | | | | | | summary: (11) expand
2795 | | | | | |
2795 | | | | | |
2796 +---------o changeset: 10:74c64d036d72
2796 +---------o changeset: 10:74c64d036d72
2797 | | | | |/ parent: 0:e6eb3150255d
2797 | | | | |/ parent: 0:e6eb3150255d
2798 | | | | | parent: 6:b105a072e251
2798 | | | | | parent: 6:b105a072e251
2799 | | | | | user: test
2799 | | | | | user: test
2800 | | | | | date: Thu Jan 01 00:00:10 1970 +0000
2800 | | | | | date: Thu Jan 01 00:00:10 1970 +0000
2801 | | | | | summary: (10) merge two known; one immediate left, one near right
2801 | | | | | summary: (10) merge two known; one immediate left, one near right
2802 | | | | |
2802 | | | | |
2803 | | | o | changeset: 9:7010c0af0a35
2803 | | | o | changeset: 9:7010c0af0a35
2804 | | | |\ \ parent: 7:b632bb1b1224
2804 | | | |\ \ parent: 7:b632bb1b1224
2805 | | | | | | parent: 8:7a0b11f71937
2805 | | | | | | parent: 8:7a0b11f71937
2806 | | | | | | user: test
2806 | | | | | | user: test
2807 | | | | | | date: Thu Jan 01 00:00:09 1970 +0000
2807 | | | | | | date: Thu Jan 01 00:00:09 1970 +0000
2808 | | | | | | summary: (9) expand
2808 | | | | | | summary: (9) expand
2809 | | | | | |
2809 | | | | | |
2810 +-------o | changeset: 8:7a0b11f71937
2810 +-------o | changeset: 8:7a0b11f71937
2811 | | | |/ / parent: 0:e6eb3150255d
2811 | | | |/ / parent: 0:e6eb3150255d
2812 | | | | | parent: 7:b632bb1b1224
2812 | | | | | parent: 7:b632bb1b1224
2813 | | | | | user: test
2813 | | | | | user: test
2814 | | | | | date: Thu Jan 01 00:00:08 1970 +0000
2814 | | | | | date: Thu Jan 01 00:00:08 1970 +0000
2815 | | | | | summary: (8) merge two known; one immediate left, one far right
2815 | | | | | summary: (8) merge two known; one immediate left, one far right
2816 | | | | |
2816 | | | | |
2817 | | | o | changeset: 7:b632bb1b1224
2817 | | | o | changeset: 7:b632bb1b1224
2818 | | | |\ \ parent: 2:3d9a33b8d1e1
2818 | | | |\ \ parent: 2:3d9a33b8d1e1
2819 | | | | | | parent: 5:4409d547b708
2819 | | | | | | parent: 5:4409d547b708
2820 | | | | | | user: test
2820 | | | | | | user: test
2821 | | | | | | date: Thu Jan 01 00:00:07 1970 +0000
2821 | | | | | | date: Thu Jan 01 00:00:07 1970 +0000
2822 | | | | | | summary: (7) expand
2822 | | | | | | summary: (7) expand
2823 | | | | | |
2823 | | | | | |
2824 | | | +---o changeset: 6:b105a072e251
2824 | | | +---o changeset: 6:b105a072e251
2825 | | | | |/ parent: 2:3d9a33b8d1e1
2825 | | | | |/ parent: 2:3d9a33b8d1e1
2826 | | | | | parent: 5:4409d547b708
2826 | | | | | parent: 5:4409d547b708
2827 | | | | | user: test
2827 | | | | | user: test
2828 | | | | | date: Thu Jan 01 00:00:06 1970 +0000
2828 | | | | | date: Thu Jan 01 00:00:06 1970 +0000
2829 | | | | | summary: (6) merge two known; one immediate left, one far left
2829 | | | | | summary: (6) merge two known; one immediate left, one far left
2830 | | | | |
2830 | | | | |
2831 | | | o | changeset: 5:4409d547b708
2831 | | | o | changeset: 5:4409d547b708
2832 | | | |\ \ parent: 3:27eef8ed80b4
2832 | | | |\ \ parent: 3:27eef8ed80b4
2833 | | | | | | parent: 4:26a8bac39d9f
2833 | | | | | | parent: 4:26a8bac39d9f
2834 | | | | | | user: test
2834 | | | | | | user: test
2835 | | | | | | date: Thu Jan 01 00:00:05 1970 +0000
2835 | | | | | | date: Thu Jan 01 00:00:05 1970 +0000
2836 | | | | | | summary: (5) expand
2836 | | | | | | summary: (5) expand
2837 | | | | | |
2837 | | | | | |
2838 | +---o | | changeset: 4:26a8bac39d9f
2838 | +---o | | changeset: 4:26a8bac39d9f
2839 | | | |/ / parent: 1:6db2ef61d156
2839 | | | |/ / parent: 1:6db2ef61d156
2840 | | | | | parent: 3:27eef8ed80b4
2840 | | | | | parent: 3:27eef8ed80b4
2841 | | | | | user: test
2841 | | | | | user: test
2842 | | | | | date: Thu Jan 01 00:00:04 1970 +0000
2842 | | | | | date: Thu Jan 01 00:00:04 1970 +0000
2843 | | | | | summary: (4) merge two known; one immediate left, one immediate right
2843 | | | | | summary: (4) merge two known; one immediate left, one immediate right
2844 | | | | |
2844 | | | | |
2845
2845
2846 .. unless HGPLAINEXCEPT=graph is set:
2846 .. unless HGPLAINEXCEPT=graph is set:
2847
2847
2848 $ HGPLAIN=1 HGPLAINEXCEPT=graph hg log -G -r 'file("a")' -m
2848 $ HGPLAIN=1 HGPLAINEXCEPT=graph hg log -G -r 'file("a")' -m
2849 @ changeset: 36:08a19a744424
2849 @ changeset: 36:08a19a744424
2850 : branch: branch
2850 : branch: branch
2851 : tag: tip
2851 : tag: tip
2852 : parent: 35:9159c3644c5e
2852 : parent: 35:9159c3644c5e
2853 : parent: 35:9159c3644c5e
2853 : parent: 35:9159c3644c5e
2854 : user: test
2854 : user: test
2855 : date: Thu Jan 01 00:00:36 1970 +0000
2855 : date: Thu Jan 01 00:00:36 1970 +0000
2856 : summary: (36) buggy merge: identical parents
2856 : summary: (36) buggy merge: identical parents
2857 :
2857 :
2858 o changeset: 32:d06dffa21a31
2858 o changeset: 32:d06dffa21a31
2859 |\ parent: 27:886ed638191b
2859 |\ parent: 27:886ed638191b
2860 | : parent: 31:621d83e11f67
2860 | : parent: 31:621d83e11f67
2861 | : user: test
2861 | : user: test
2862 | : date: Thu Jan 01 00:00:32 1970 +0000
2862 | : date: Thu Jan 01 00:00:32 1970 +0000
2863 | : summary: (32) expand
2863 | : summary: (32) expand
2864 | :
2864 | :
2865 o : changeset: 31:621d83e11f67
2865 o : changeset: 31:621d83e11f67
2866 |\: parent: 21:d42a756af44d
2866 |\: parent: 21:d42a756af44d
2867 | : parent: 30:6e11cd4b648f
2867 | : parent: 30:6e11cd4b648f
2868 | : user: test
2868 | : user: test
2869 | : date: Thu Jan 01 00:00:31 1970 +0000
2869 | : date: Thu Jan 01 00:00:31 1970 +0000
2870 | : summary: (31) expand
2870 | : summary: (31) expand
2871 | :
2871 | :
2872 o : changeset: 30:6e11cd4b648f
2872 o : changeset: 30:6e11cd4b648f
2873 |\ \ parent: 28:44ecd0b9ae99
2873 |\ \ parent: 28:44ecd0b9ae99
2874 | ~ : parent: 29:cd9bb2be7593
2874 | ~ : parent: 29:cd9bb2be7593
2875 | : user: test
2875 | : user: test
2876 | : date: Thu Jan 01 00:00:30 1970 +0000
2876 | : date: Thu Jan 01 00:00:30 1970 +0000
2877 | : summary: (30) expand
2877 | : summary: (30) expand
2878 | /
2878 | /
2879 o : changeset: 28:44ecd0b9ae99
2879 o : changeset: 28:44ecd0b9ae99
2880 |\ \ parent: 1:6db2ef61d156
2880 |\ \ parent: 1:6db2ef61d156
2881 | ~ : parent: 26:7f25b6c2f0b9
2881 | ~ : parent: 26:7f25b6c2f0b9
2882 | : user: test
2882 | : user: test
2883 | : date: Thu Jan 01 00:00:28 1970 +0000
2883 | : date: Thu Jan 01 00:00:28 1970 +0000
2884 | : summary: (28) merge zero known
2884 | : summary: (28) merge zero known
2885 | /
2885 | /
2886 o : changeset: 26:7f25b6c2f0b9
2886 o : changeset: 26:7f25b6c2f0b9
2887 |\ \ parent: 18:1aa84d96232a
2887 |\ \ parent: 18:1aa84d96232a
2888 | | : parent: 25:91da8ed57247
2888 | | : parent: 25:91da8ed57247
2889 | | : user: test
2889 | | : user: test
2890 | | : date: Thu Jan 01 00:00:26 1970 +0000
2890 | | : date: Thu Jan 01 00:00:26 1970 +0000
2891 | | : summary: (26) merge one known; far right
2891 | | : summary: (26) merge one known; far right
2892 | | :
2892 | | :
2893 | o : changeset: 25:91da8ed57247
2893 | o : changeset: 25:91da8ed57247
2894 | |\: parent: 21:d42a756af44d
2894 | |\: parent: 21:d42a756af44d
2895 | | : parent: 24:a9c19a3d96b7
2895 | | : parent: 24:a9c19a3d96b7
2896 | | : user: test
2896 | | : user: test
2897 | | : date: Thu Jan 01 00:00:25 1970 +0000
2897 | | : date: Thu Jan 01 00:00:25 1970 +0000
2898 | | : summary: (25) merge one known; far left
2898 | | : summary: (25) merge one known; far left
2899 | | :
2899 | | :
2900 | o : changeset: 24:a9c19a3d96b7
2900 | o : changeset: 24:a9c19a3d96b7
2901 | |\ \ parent: 0:e6eb3150255d
2901 | |\ \ parent: 0:e6eb3150255d
2902 | | ~ : parent: 23:a01cddf0766d
2902 | | ~ : parent: 23:a01cddf0766d
2903 | | : user: test
2903 | | : user: test
2904 | | : date: Thu Jan 01 00:00:24 1970 +0000
2904 | | : date: Thu Jan 01 00:00:24 1970 +0000
2905 | | : summary: (24) merge one known; immediate right
2905 | | : summary: (24) merge one known; immediate right
2906 | | /
2906 | | /
2907 | o : changeset: 23:a01cddf0766d
2907 | o : changeset: 23:a01cddf0766d
2908 | |\ \ parent: 1:6db2ef61d156
2908 | |\ \ parent: 1:6db2ef61d156
2909 | | ~ : parent: 22:e0d9cccacb5d
2909 | | ~ : parent: 22:e0d9cccacb5d
2910 | | : user: test
2910 | | : user: test
2911 | | : date: Thu Jan 01 00:00:23 1970 +0000
2911 | | : date: Thu Jan 01 00:00:23 1970 +0000
2912 | | : summary: (23) merge one known; immediate left
2912 | | : summary: (23) merge one known; immediate left
2913 | | /
2913 | | /
2914 | o : changeset: 22:e0d9cccacb5d
2914 | o : changeset: 22:e0d9cccacb5d
2915 |/:/ parent: 18:1aa84d96232a
2915 |/:/ parent: 18:1aa84d96232a
2916 | : parent: 21:d42a756af44d
2916 | : parent: 21:d42a756af44d
2917 | : user: test
2917 | : user: test
2918 | : date: Thu Jan 01 00:00:22 1970 +0000
2918 | : date: Thu Jan 01 00:00:22 1970 +0000
2919 | : summary: (22) merge two known; one far left, one far right
2919 | : summary: (22) merge two known; one far left, one far right
2920 | :
2920 | :
2921 | o changeset: 21:d42a756af44d
2921 | o changeset: 21:d42a756af44d
2922 | |\ parent: 19:31ddc2c1573b
2922 | |\ parent: 19:31ddc2c1573b
2923 | | | parent: 20:d30ed6450e32
2923 | | | parent: 20:d30ed6450e32
2924 | | | user: test
2924 | | | user: test
2925 | | | date: Thu Jan 01 00:00:21 1970 +0000
2925 | | | date: Thu Jan 01 00:00:21 1970 +0000
2926 | | | summary: (21) expand
2926 | | | summary: (21) expand
2927 | | |
2927 | | |
2928 +---o changeset: 20:d30ed6450e32
2928 +---o changeset: 20:d30ed6450e32
2929 | | | parent: 0:e6eb3150255d
2929 | | | parent: 0:e6eb3150255d
2930 | | ~ parent: 18:1aa84d96232a
2930 | | ~ parent: 18:1aa84d96232a
2931 | | user: test
2931 | | user: test
2932 | | date: Thu Jan 01 00:00:20 1970 +0000
2932 | | date: Thu Jan 01 00:00:20 1970 +0000
2933 | | summary: (20) merge two known; two far right
2933 | | summary: (20) merge two known; two far right
2934 | |
2934 | |
2935 | o changeset: 19:31ddc2c1573b
2935 | o changeset: 19:31ddc2c1573b
2936 | |\ parent: 15:1dda3f72782d
2936 | |\ parent: 15:1dda3f72782d
2937 | | | parent: 17:44765d7c06e0
2937 | | | parent: 17:44765d7c06e0
2938 | | | user: test
2938 | | | user: test
2939 | | | date: Thu Jan 01 00:00:19 1970 +0000
2939 | | | date: Thu Jan 01 00:00:19 1970 +0000
2940 | | | summary: (19) expand
2940 | | | summary: (19) expand
2941 | | |
2941 | | |
2942 o | | changeset: 18:1aa84d96232a
2942 o | | changeset: 18:1aa84d96232a
2943 |\| | parent: 1:6db2ef61d156
2943 |\| | parent: 1:6db2ef61d156
2944 ~ | | parent: 15:1dda3f72782d
2944 ~ | | parent: 15:1dda3f72782d
2945 | | user: test
2945 | | user: test
2946 | | date: Thu Jan 01 00:00:18 1970 +0000
2946 | | date: Thu Jan 01 00:00:18 1970 +0000
2947 | | summary: (18) merge two known; two far left
2947 | | summary: (18) merge two known; two far left
2948 / /
2948 / /
2949 | o changeset: 17:44765d7c06e0
2949 | o changeset: 17:44765d7c06e0
2950 | |\ parent: 12:86b91144a6e9
2950 | |\ parent: 12:86b91144a6e9
2951 | | | parent: 16:3677d192927d
2951 | | | parent: 16:3677d192927d
2952 | | | user: test
2952 | | | user: test
2953 | | | date: Thu Jan 01 00:00:17 1970 +0000
2953 | | | date: Thu Jan 01 00:00:17 1970 +0000
2954 | | | summary: (17) expand
2954 | | | summary: (17) expand
2955 | | |
2955 | | |
2956 | | o changeset: 16:3677d192927d
2956 | | o changeset: 16:3677d192927d
2957 | | |\ parent: 0:e6eb3150255d
2957 | | |\ parent: 0:e6eb3150255d
2958 | | ~ ~ parent: 1:6db2ef61d156
2958 | | ~ ~ parent: 1:6db2ef61d156
2959 | | user: test
2959 | | user: test
2960 | | date: Thu Jan 01 00:00:16 1970 +0000
2960 | | date: Thu Jan 01 00:00:16 1970 +0000
2961 | | summary: (16) merge two known; one immediate right, one near right
2961 | | summary: (16) merge two known; one immediate right, one near right
2962 | |
2962 | |
2963 o | changeset: 15:1dda3f72782d
2963 o | changeset: 15:1dda3f72782d
2964 |\ \ parent: 13:22d8966a97e3
2964 |\ \ parent: 13:22d8966a97e3
2965 | | | parent: 14:8eac370358ef
2965 | | | parent: 14:8eac370358ef
2966 | | | user: test
2966 | | | user: test
2967 | | | date: Thu Jan 01 00:00:15 1970 +0000
2967 | | | date: Thu Jan 01 00:00:15 1970 +0000
2968 | | | summary: (15) expand
2968 | | | summary: (15) expand
2969 | | |
2969 | | |
2970 | o | changeset: 14:8eac370358ef
2970 | o | changeset: 14:8eac370358ef
2971 | |\| parent: 0:e6eb3150255d
2971 | |\| parent: 0:e6eb3150255d
2972 | ~ | parent: 12:86b91144a6e9
2972 | ~ | parent: 12:86b91144a6e9
2973 | | user: test
2973 | | user: test
2974 | | date: Thu Jan 01 00:00:14 1970 +0000
2974 | | date: Thu Jan 01 00:00:14 1970 +0000
2975 | | summary: (14) merge two known; one immediate right, one far right
2975 | | summary: (14) merge two known; one immediate right, one far right
2976 | /
2976 | /
2977 o | changeset: 13:22d8966a97e3
2977 o | changeset: 13:22d8966a97e3
2978 |\ \ parent: 9:7010c0af0a35
2978 |\ \ parent: 9:7010c0af0a35
2979 | | | parent: 11:832d76e6bdf2
2979 | | | parent: 11:832d76e6bdf2
2980 | | | user: test
2980 | | | user: test
2981 | | | date: Thu Jan 01 00:00:13 1970 +0000
2981 | | | date: Thu Jan 01 00:00:13 1970 +0000
2982 | | | summary: (13) expand
2982 | | | summary: (13) expand
2983 | | |
2983 | | |
2984 +---o changeset: 12:86b91144a6e9
2984 +---o changeset: 12:86b91144a6e9
2985 | | | parent: 1:6db2ef61d156
2985 | | | parent: 1:6db2ef61d156
2986 | | ~ parent: 9:7010c0af0a35
2986 | | ~ parent: 9:7010c0af0a35
2987 | | user: test
2987 | | user: test
2988 | | date: Thu Jan 01 00:00:12 1970 +0000
2988 | | date: Thu Jan 01 00:00:12 1970 +0000
2989 | | summary: (12) merge two known; one immediate right, one far left
2989 | | summary: (12) merge two known; one immediate right, one far left
2990 | |
2990 | |
2991 | o changeset: 11:832d76e6bdf2
2991 | o changeset: 11:832d76e6bdf2
2992 | |\ parent: 6:b105a072e251
2992 | |\ parent: 6:b105a072e251
2993 | | | parent: 10:74c64d036d72
2993 | | | parent: 10:74c64d036d72
2994 | | | user: test
2994 | | | user: test
2995 | | | date: Thu Jan 01 00:00:11 1970 +0000
2995 | | | date: Thu Jan 01 00:00:11 1970 +0000
2996 | | | summary: (11) expand
2996 | | | summary: (11) expand
2997 | | |
2997 | | |
2998 | | o changeset: 10:74c64d036d72
2998 | | o changeset: 10:74c64d036d72
2999 | |/| parent: 0:e6eb3150255d
2999 | |/| parent: 0:e6eb3150255d
3000 | | ~ parent: 6:b105a072e251
3000 | | ~ parent: 6:b105a072e251
3001 | | user: test
3001 | | user: test
3002 | | date: Thu Jan 01 00:00:10 1970 +0000
3002 | | date: Thu Jan 01 00:00:10 1970 +0000
3003 | | summary: (10) merge two known; one immediate left, one near right
3003 | | summary: (10) merge two known; one immediate left, one near right
3004 | |
3004 | |
3005 o | changeset: 9:7010c0af0a35
3005 o | changeset: 9:7010c0af0a35
3006 |\ \ parent: 7:b632bb1b1224
3006 |\ \ parent: 7:b632bb1b1224
3007 | | | parent: 8:7a0b11f71937
3007 | | | parent: 8:7a0b11f71937
3008 | | | user: test
3008 | | | user: test
3009 | | | date: Thu Jan 01 00:00:09 1970 +0000
3009 | | | date: Thu Jan 01 00:00:09 1970 +0000
3010 | | | summary: (9) expand
3010 | | | summary: (9) expand
3011 | | |
3011 | | |
3012 | o | changeset: 8:7a0b11f71937
3012 | o | changeset: 8:7a0b11f71937
3013 |/| | parent: 0:e6eb3150255d
3013 |/| | parent: 0:e6eb3150255d
3014 | ~ | parent: 7:b632bb1b1224
3014 | ~ | parent: 7:b632bb1b1224
3015 | | user: test
3015 | | user: test
3016 | | date: Thu Jan 01 00:00:08 1970 +0000
3016 | | date: Thu Jan 01 00:00:08 1970 +0000
3017 | | summary: (8) merge two known; one immediate left, one far right
3017 | | summary: (8) merge two known; one immediate left, one far right
3018 | /
3018 | /
3019 o | changeset: 7:b632bb1b1224
3019 o | changeset: 7:b632bb1b1224
3020 |\ \ parent: 2:3d9a33b8d1e1
3020 |\ \ parent: 2:3d9a33b8d1e1
3021 | ~ | parent: 5:4409d547b708
3021 | ~ | parent: 5:4409d547b708
3022 | | user: test
3022 | | user: test
3023 | | date: Thu Jan 01 00:00:07 1970 +0000
3023 | | date: Thu Jan 01 00:00:07 1970 +0000
3024 | | summary: (7) expand
3024 | | summary: (7) expand
3025 | /
3025 | /
3026 | o changeset: 6:b105a072e251
3026 | o changeset: 6:b105a072e251
3027 |/| parent: 2:3d9a33b8d1e1
3027 |/| parent: 2:3d9a33b8d1e1
3028 | ~ parent: 5:4409d547b708
3028 | ~ parent: 5:4409d547b708
3029 | user: test
3029 | user: test
3030 | date: Thu Jan 01 00:00:06 1970 +0000
3030 | date: Thu Jan 01 00:00:06 1970 +0000
3031 | summary: (6) merge two known; one immediate left, one far left
3031 | summary: (6) merge two known; one immediate left, one far left
3032 |
3032 |
3033 o changeset: 5:4409d547b708
3033 o changeset: 5:4409d547b708
3034 |\ parent: 3:27eef8ed80b4
3034 |\ parent: 3:27eef8ed80b4
3035 | ~ parent: 4:26a8bac39d9f
3035 | ~ parent: 4:26a8bac39d9f
3036 | user: test
3036 | user: test
3037 | date: Thu Jan 01 00:00:05 1970 +0000
3037 | date: Thu Jan 01 00:00:05 1970 +0000
3038 | summary: (5) expand
3038 | summary: (5) expand
3039 |
3039 |
3040 o changeset: 4:26a8bac39d9f
3040 o changeset: 4:26a8bac39d9f
3041 |\ parent: 1:6db2ef61d156
3041 |\ parent: 1:6db2ef61d156
3042 ~ ~ parent: 3:27eef8ed80b4
3042 ~ ~ parent: 3:27eef8ed80b4
3043 user: test
3043 user: test
3044 date: Thu Jan 01 00:00:04 1970 +0000
3044 date: Thu Jan 01 00:00:04 1970 +0000
3045 summary: (4) merge two known; one immediate left, one immediate right
3045 summary: (4) merge two known; one immediate left, one immediate right
3046
3046
3047 Draw only part of a grandparent line differently with "<N><char>"; only the
3047 Draw only part of a grandparent line differently with "<N><char>"; only the
3048 last N lines (for positive N) or everything but the first N lines (for
3048 last N lines (for positive N) or everything but the first N lines (for
3049 negative N) along the current node use the style, the rest of the edge uses
3049 negative N) along the current node use the style, the rest of the edge uses
3050 the parent edge styling.
3050 the parent edge styling.
3051
3051
3052 Last 3 lines:
3052 Last 3 lines:
3053
3053
3054 $ cat << EOF >> $HGRCPATH
3054 $ cat << EOF >> $HGRCPATH
3055 > [experimental]
3055 > [experimental]
3056 > graphstyle.parent = !
3056 > graphstyle.parent = !
3057 > graphstyle.grandparent = 3.
3057 > graphstyle.grandparent = 3.
3058 > graphstyle.missing =
3058 > graphstyle.missing =
3059 > EOF
3059 > EOF
3060 $ hg log -G -r '36:18 & file("a")' -m
3060 $ hg log -G -r '36:18 & file("a")' -m
3061 @ changeset: 36:08a19a744424
3061 @ changeset: 36:08a19a744424
3062 ! branch: branch
3062 ! branch: branch
3063 ! tag: tip
3063 ! tag: tip
3064 ! parent: 35:9159c3644c5e
3064 ! parent: 35:9159c3644c5e
3065 ! parent: 35:9159c3644c5e
3065 ! parent: 35:9159c3644c5e
3066 ! user: test
3066 ! user: test
3067 . date: Thu Jan 01 00:00:36 1970 +0000
3067 . date: Thu Jan 01 00:00:36 1970 +0000
3068 . summary: (36) buggy merge: identical parents
3068 . summary: (36) buggy merge: identical parents
3069 .
3069 .
3070 o changeset: 32:d06dffa21a31
3070 o changeset: 32:d06dffa21a31
3071 !\ parent: 27:886ed638191b
3071 !\ parent: 27:886ed638191b
3072 ! ! parent: 31:621d83e11f67
3072 ! ! parent: 31:621d83e11f67
3073 ! ! user: test
3073 ! ! user: test
3074 ! . date: Thu Jan 01 00:00:32 1970 +0000
3074 ! . date: Thu Jan 01 00:00:32 1970 +0000
3075 ! . summary: (32) expand
3075 ! . summary: (32) expand
3076 ! .
3076 ! .
3077 o ! changeset: 31:621d83e11f67
3077 o ! changeset: 31:621d83e11f67
3078 !\! parent: 21:d42a756af44d
3078 !\! parent: 21:d42a756af44d
3079 ! ! parent: 30:6e11cd4b648f
3079 ! ! parent: 30:6e11cd4b648f
3080 ! ! user: test
3080 ! ! user: test
3081 ! ! date: Thu Jan 01 00:00:31 1970 +0000
3081 ! ! date: Thu Jan 01 00:00:31 1970 +0000
3082 ! ! summary: (31) expand
3082 ! ! summary: (31) expand
3083 ! !
3083 ! !
3084 o ! changeset: 30:6e11cd4b648f
3084 o ! changeset: 30:6e11cd4b648f
3085 !\ \ parent: 28:44ecd0b9ae99
3085 !\ \ parent: 28:44ecd0b9ae99
3086 ! ~ ! parent: 29:cd9bb2be7593
3086 ! ~ ! parent: 29:cd9bb2be7593
3087 ! ! user: test
3087 ! ! user: test
3088 ! ! date: Thu Jan 01 00:00:30 1970 +0000
3088 ! ! date: Thu Jan 01 00:00:30 1970 +0000
3089 ! ! summary: (30) expand
3089 ! ! summary: (30) expand
3090 ! /
3090 ! /
3091 o ! changeset: 28:44ecd0b9ae99
3091 o ! changeset: 28:44ecd0b9ae99
3092 !\ \ parent: 1:6db2ef61d156
3092 !\ \ parent: 1:6db2ef61d156
3093 ! ~ ! parent: 26:7f25b6c2f0b9
3093 ! ~ ! parent: 26:7f25b6c2f0b9
3094 ! ! user: test
3094 ! ! user: test
3095 ! ! date: Thu Jan 01 00:00:28 1970 +0000
3095 ! ! date: Thu Jan 01 00:00:28 1970 +0000
3096 ! ! summary: (28) merge zero known
3096 ! ! summary: (28) merge zero known
3097 ! /
3097 ! /
3098 o ! changeset: 26:7f25b6c2f0b9
3098 o ! changeset: 26:7f25b6c2f0b9
3099 !\ \ parent: 18:1aa84d96232a
3099 !\ \ parent: 18:1aa84d96232a
3100 ! ! ! parent: 25:91da8ed57247
3100 ! ! ! parent: 25:91da8ed57247
3101 ! ! ! user: test
3101 ! ! ! user: test
3102 ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
3102 ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
3103 ! ! ! summary: (26) merge one known; far right
3103 ! ! ! summary: (26) merge one known; far right
3104 ! ! !
3104 ! ! !
3105 ! o ! changeset: 25:91da8ed57247
3105 ! o ! changeset: 25:91da8ed57247
3106 ! !\! parent: 21:d42a756af44d
3106 ! !\! parent: 21:d42a756af44d
3107 ! ! ! parent: 24:a9c19a3d96b7
3107 ! ! ! parent: 24:a9c19a3d96b7
3108 ! ! ! user: test
3108 ! ! ! user: test
3109 ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
3109 ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
3110 ! ! ! summary: (25) merge one known; far left
3110 ! ! ! summary: (25) merge one known; far left
3111 ! ! !
3111 ! ! !
3112 ! o ! changeset: 24:a9c19a3d96b7
3112 ! o ! changeset: 24:a9c19a3d96b7
3113 ! !\ \ parent: 0:e6eb3150255d
3113 ! !\ \ parent: 0:e6eb3150255d
3114 ! ! ~ ! parent: 23:a01cddf0766d
3114 ! ! ~ ! parent: 23:a01cddf0766d
3115 ! ! ! user: test
3115 ! ! ! user: test
3116 ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
3116 ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
3117 ! ! ! summary: (24) merge one known; immediate right
3117 ! ! ! summary: (24) merge one known; immediate right
3118 ! ! /
3118 ! ! /
3119 ! o ! changeset: 23:a01cddf0766d
3119 ! o ! changeset: 23:a01cddf0766d
3120 ! !\ \ parent: 1:6db2ef61d156
3120 ! !\ \ parent: 1:6db2ef61d156
3121 ! ! ~ ! parent: 22:e0d9cccacb5d
3121 ! ! ~ ! parent: 22:e0d9cccacb5d
3122 ! ! ! user: test
3122 ! ! ! user: test
3123 ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
3123 ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
3124 ! ! ! summary: (23) merge one known; immediate left
3124 ! ! ! summary: (23) merge one known; immediate left
3125 ! ! /
3125 ! ! /
3126 ! o ! changeset: 22:e0d9cccacb5d
3126 ! o ! changeset: 22:e0d9cccacb5d
3127 !/!/ parent: 18:1aa84d96232a
3127 !/!/ parent: 18:1aa84d96232a
3128 ! ! parent: 21:d42a756af44d
3128 ! ! parent: 21:d42a756af44d
3129 ! ! user: test
3129 ! ! user: test
3130 ! ! date: Thu Jan 01 00:00:22 1970 +0000
3130 ! ! date: Thu Jan 01 00:00:22 1970 +0000
3131 ! ! summary: (22) merge two known; one far left, one far right
3131 ! ! summary: (22) merge two known; one far left, one far right
3132 ! !
3132 ! !
3133 ! o changeset: 21:d42a756af44d
3133 ! o changeset: 21:d42a756af44d
3134 ! !\ parent: 19:31ddc2c1573b
3134 ! !\ parent: 19:31ddc2c1573b
3135 ! ! ! parent: 20:d30ed6450e32
3135 ! ! ! parent: 20:d30ed6450e32
3136 ! ! ! user: test
3136 ! ! ! user: test
3137 ! ! ! date: Thu Jan 01 00:00:21 1970 +0000
3137 ! ! ! date: Thu Jan 01 00:00:21 1970 +0000
3138 ! ! ! summary: (21) expand
3138 ! ! ! summary: (21) expand
3139 ! ! !
3139 ! ! !
3140 +---o changeset: 20:d30ed6450e32
3140 +---o changeset: 20:d30ed6450e32
3141 ! ! | parent: 0:e6eb3150255d
3141 ! ! | parent: 0:e6eb3150255d
3142 ! ! ~ parent: 18:1aa84d96232a
3142 ! ! ~ parent: 18:1aa84d96232a
3143 ! ! user: test
3143 ! ! user: test
3144 ! ! date: Thu Jan 01 00:00:20 1970 +0000
3144 ! ! date: Thu Jan 01 00:00:20 1970 +0000
3145 ! ! summary: (20) merge two known; two far right
3145 ! ! summary: (20) merge two known; two far right
3146 ! !
3146 ! !
3147 ! o changeset: 19:31ddc2c1573b
3147 ! o changeset: 19:31ddc2c1573b
3148 ! |\ parent: 15:1dda3f72782d
3148 ! |\ parent: 15:1dda3f72782d
3149 ! ~ ~ parent: 17:44765d7c06e0
3149 ! ~ ~ parent: 17:44765d7c06e0
3150 ! user: test
3150 ! user: test
3151 ! date: Thu Jan 01 00:00:19 1970 +0000
3151 ! date: Thu Jan 01 00:00:19 1970 +0000
3152 ! summary: (19) expand
3152 ! summary: (19) expand
3153 !
3153 !
3154 o changeset: 18:1aa84d96232a
3154 o changeset: 18:1aa84d96232a
3155 |\ parent: 1:6db2ef61d156
3155 |\ parent: 1:6db2ef61d156
3156 ~ ~ parent: 15:1dda3f72782d
3156 ~ ~ parent: 15:1dda3f72782d
3157 user: test
3157 user: test
3158 date: Thu Jan 01 00:00:18 1970 +0000
3158 date: Thu Jan 01 00:00:18 1970 +0000
3159 summary: (18) merge two known; two far left
3159 summary: (18) merge two known; two far left
3160
3160
3161 All but the first 3 lines:
3161 All but the first 3 lines:
3162
3162
3163 $ cat << EOF >> $HGRCPATH
3163 $ cat << EOF >> $HGRCPATH
3164 > [experimental]
3164 > [experimental]
3165 > graphstyle.parent = !
3165 > graphstyle.parent = !
3166 > graphstyle.grandparent = -3.
3166 > graphstyle.grandparent = -3.
3167 > graphstyle.missing =
3167 > graphstyle.missing =
3168 > EOF
3168 > EOF
3169 $ hg log -G -r '36:18 & file("a")' -m
3169 $ hg log -G -r '36:18 & file("a")' -m
3170 @ changeset: 36:08a19a744424
3170 @ changeset: 36:08a19a744424
3171 ! branch: branch
3171 ! branch: branch
3172 ! tag: tip
3172 ! tag: tip
3173 . parent: 35:9159c3644c5e
3173 . parent: 35:9159c3644c5e
3174 . parent: 35:9159c3644c5e
3174 . parent: 35:9159c3644c5e
3175 . user: test
3175 . user: test
3176 . date: Thu Jan 01 00:00:36 1970 +0000
3176 . date: Thu Jan 01 00:00:36 1970 +0000
3177 . summary: (36) buggy merge: identical parents
3177 . summary: (36) buggy merge: identical parents
3178 .
3178 .
3179 o changeset: 32:d06dffa21a31
3179 o changeset: 32:d06dffa21a31
3180 !\ parent: 27:886ed638191b
3180 !\ parent: 27:886ed638191b
3181 ! ! parent: 31:621d83e11f67
3181 ! ! parent: 31:621d83e11f67
3182 ! . user: test
3182 ! . user: test
3183 ! . date: Thu Jan 01 00:00:32 1970 +0000
3183 ! . date: Thu Jan 01 00:00:32 1970 +0000
3184 ! . summary: (32) expand
3184 ! . summary: (32) expand
3185 ! .
3185 ! .
3186 o ! changeset: 31:621d83e11f67
3186 o ! changeset: 31:621d83e11f67
3187 !\! parent: 21:d42a756af44d
3187 !\! parent: 21:d42a756af44d
3188 ! ! parent: 30:6e11cd4b648f
3188 ! ! parent: 30:6e11cd4b648f
3189 ! ! user: test
3189 ! ! user: test
3190 ! ! date: Thu Jan 01 00:00:31 1970 +0000
3190 ! ! date: Thu Jan 01 00:00:31 1970 +0000
3191 ! ! summary: (31) expand
3191 ! ! summary: (31) expand
3192 ! !
3192 ! !
3193 o ! changeset: 30:6e11cd4b648f
3193 o ! changeset: 30:6e11cd4b648f
3194 !\ \ parent: 28:44ecd0b9ae99
3194 !\ \ parent: 28:44ecd0b9ae99
3195 ! ~ ! parent: 29:cd9bb2be7593
3195 ! ~ ! parent: 29:cd9bb2be7593
3196 ! ! user: test
3196 ! ! user: test
3197 ! ! date: Thu Jan 01 00:00:30 1970 +0000
3197 ! ! date: Thu Jan 01 00:00:30 1970 +0000
3198 ! ! summary: (30) expand
3198 ! ! summary: (30) expand
3199 ! /
3199 ! /
3200 o ! changeset: 28:44ecd0b9ae99
3200 o ! changeset: 28:44ecd0b9ae99
3201 !\ \ parent: 1:6db2ef61d156
3201 !\ \ parent: 1:6db2ef61d156
3202 ! ~ ! parent: 26:7f25b6c2f0b9
3202 ! ~ ! parent: 26:7f25b6c2f0b9
3203 ! ! user: test
3203 ! ! user: test
3204 ! ! date: Thu Jan 01 00:00:28 1970 +0000
3204 ! ! date: Thu Jan 01 00:00:28 1970 +0000
3205 ! ! summary: (28) merge zero known
3205 ! ! summary: (28) merge zero known
3206 ! /
3206 ! /
3207 o ! changeset: 26:7f25b6c2f0b9
3207 o ! changeset: 26:7f25b6c2f0b9
3208 !\ \ parent: 18:1aa84d96232a
3208 !\ \ parent: 18:1aa84d96232a
3209 ! ! ! parent: 25:91da8ed57247
3209 ! ! ! parent: 25:91da8ed57247
3210 ! ! ! user: test
3210 ! ! ! user: test
3211 ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
3211 ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
3212 ! ! ! summary: (26) merge one known; far right
3212 ! ! ! summary: (26) merge one known; far right
3213 ! ! !
3213 ! ! !
3214 ! o ! changeset: 25:91da8ed57247
3214 ! o ! changeset: 25:91da8ed57247
3215 ! !\! parent: 21:d42a756af44d
3215 ! !\! parent: 21:d42a756af44d
3216 ! ! ! parent: 24:a9c19a3d96b7
3216 ! ! ! parent: 24:a9c19a3d96b7
3217 ! ! ! user: test
3217 ! ! ! user: test
3218 ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
3218 ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
3219 ! ! ! summary: (25) merge one known; far left
3219 ! ! ! summary: (25) merge one known; far left
3220 ! ! !
3220 ! ! !
3221 ! o ! changeset: 24:a9c19a3d96b7
3221 ! o ! changeset: 24:a9c19a3d96b7
3222 ! !\ \ parent: 0:e6eb3150255d
3222 ! !\ \ parent: 0:e6eb3150255d
3223 ! ! ~ ! parent: 23:a01cddf0766d
3223 ! ! ~ ! parent: 23:a01cddf0766d
3224 ! ! ! user: test
3224 ! ! ! user: test
3225 ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
3225 ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
3226 ! ! ! summary: (24) merge one known; immediate right
3226 ! ! ! summary: (24) merge one known; immediate right
3227 ! ! /
3227 ! ! /
3228 ! o ! changeset: 23:a01cddf0766d
3228 ! o ! changeset: 23:a01cddf0766d
3229 ! !\ \ parent: 1:6db2ef61d156
3229 ! !\ \ parent: 1:6db2ef61d156
3230 ! ! ~ ! parent: 22:e0d9cccacb5d
3230 ! ! ~ ! parent: 22:e0d9cccacb5d
3231 ! ! ! user: test
3231 ! ! ! user: test
3232 ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
3232 ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
3233 ! ! ! summary: (23) merge one known; immediate left
3233 ! ! ! summary: (23) merge one known; immediate left
3234 ! ! /
3234 ! ! /
3235 ! o ! changeset: 22:e0d9cccacb5d
3235 ! o ! changeset: 22:e0d9cccacb5d
3236 !/!/ parent: 18:1aa84d96232a
3236 !/!/ parent: 18:1aa84d96232a
3237 ! ! parent: 21:d42a756af44d
3237 ! ! parent: 21:d42a756af44d
3238 ! ! user: test
3238 ! ! user: test
3239 ! ! date: Thu Jan 01 00:00:22 1970 +0000
3239 ! ! date: Thu Jan 01 00:00:22 1970 +0000
3240 ! ! summary: (22) merge two known; one far left, one far right
3240 ! ! summary: (22) merge two known; one far left, one far right
3241 ! !
3241 ! !
3242 ! o changeset: 21:d42a756af44d
3242 ! o changeset: 21:d42a756af44d
3243 ! !\ parent: 19:31ddc2c1573b
3243 ! !\ parent: 19:31ddc2c1573b
3244 ! ! ! parent: 20:d30ed6450e32
3244 ! ! ! parent: 20:d30ed6450e32
3245 ! ! ! user: test
3245 ! ! ! user: test
3246 ! ! ! date: Thu Jan 01 00:00:21 1970 +0000
3246 ! ! ! date: Thu Jan 01 00:00:21 1970 +0000
3247 ! ! ! summary: (21) expand
3247 ! ! ! summary: (21) expand
3248 ! ! !
3248 ! ! !
3249 +---o changeset: 20:d30ed6450e32
3249 +---o changeset: 20:d30ed6450e32
3250 ! ! | parent: 0:e6eb3150255d
3250 ! ! | parent: 0:e6eb3150255d
3251 ! ! ~ parent: 18:1aa84d96232a
3251 ! ! ~ parent: 18:1aa84d96232a
3252 ! ! user: test
3252 ! ! user: test
3253 ! ! date: Thu Jan 01 00:00:20 1970 +0000
3253 ! ! date: Thu Jan 01 00:00:20 1970 +0000
3254 ! ! summary: (20) merge two known; two far right
3254 ! ! summary: (20) merge two known; two far right
3255 ! !
3255 ! !
3256 ! o changeset: 19:31ddc2c1573b
3256 ! o changeset: 19:31ddc2c1573b
3257 ! |\ parent: 15:1dda3f72782d
3257 ! |\ parent: 15:1dda3f72782d
3258 ! ~ ~ parent: 17:44765d7c06e0
3258 ! ~ ~ parent: 17:44765d7c06e0
3259 ! user: test
3259 ! user: test
3260 ! date: Thu Jan 01 00:00:19 1970 +0000
3260 ! date: Thu Jan 01 00:00:19 1970 +0000
3261 ! summary: (19) expand
3261 ! summary: (19) expand
3262 !
3262 !
3263 o changeset: 18:1aa84d96232a
3263 o changeset: 18:1aa84d96232a
3264 |\ parent: 1:6db2ef61d156
3264 |\ parent: 1:6db2ef61d156
3265 ~ ~ parent: 15:1dda3f72782d
3265 ~ ~ parent: 15:1dda3f72782d
3266 user: test
3266 user: test
3267 date: Thu Jan 01 00:00:18 1970 +0000
3267 date: Thu Jan 01 00:00:18 1970 +0000
3268 summary: (18) merge two known; two far left
3268 summary: (18) merge two known; two far left
3269
3269
3270 $ cd ..
3270 $ cd ..
3271
3271
3272 Change graph shorten, test better with graphstyle.missing not none
3272 Change graph shorten, test better with graphstyle.missing not none
3273
3273
3274 $ cd repo
3274 $ cd repo
3275 $ cat << EOF >> $HGRCPATH
3275 $ cat << EOF >> $HGRCPATH
3276 > [experimental]
3276 > [experimental]
3277 > graphstyle.parent = |
3277 > graphstyle.parent = |
3278 > graphstyle.grandparent = :
3278 > graphstyle.grandparent = :
3279 > graphstyle.missing = '
3279 > graphstyle.missing = '
3280 > graphshorten = true
3280 > graphshorten = true
3281 > EOF
3281 > EOF
3282 $ hg log -G -r 'file("a")' -m -T '{rev} {desc}'
3282 $ hg log -G -r 'file("a")' -m -T '{rev} {desc}'
3283 @ 36 (36) buggy merge: identical parents
3283 @ 36 (36) buggy merge: identical parents
3284 o 32 (32) expand
3284 o 32 (32) expand
3285 |\
3285 |\
3286 o : 31 (31) expand
3286 o : 31 (31) expand
3287 |\:
3287 |\:
3288 o : 30 (30) expand
3288 o : 30 (30) expand
3289 |\ \
3289 |\ \
3290 o \ \ 28 (28) merge zero known
3290 o \ \ 28 (28) merge zero known
3291 |\ \ \
3291 |\ \ \
3292 o \ \ \ 26 (26) merge one known; far right
3292 o \ \ \ 26 (26) merge one known; far right
3293 |\ \ \ \
3293 |\ \ \ \
3294 | o-----+ 25 (25) merge one known; far left
3294 | o-----+ 25 (25) merge one known; far left
3295 | o ' ' : 24 (24) merge one known; immediate right
3295 | o ' ' : 24 (24) merge one known; immediate right
3296 | |\ \ \ \
3296 | |\ \ \ \
3297 | o---+ ' : 23 (23) merge one known; immediate left
3297 | o---+ ' : 23 (23) merge one known; immediate left
3298 | o-------+ 22 (22) merge two known; one far left, one far right
3298 | o-------+ 22 (22) merge two known; one far left, one far right
3299 |/ / / / /
3299 |/ / / / /
3300 | ' ' ' o 21 (21) expand
3300 | ' ' ' o 21 (21) expand
3301 | ' ' ' |\
3301 | ' ' ' |\
3302 +-+-------o 20 (20) merge two known; two far right
3302 +-+-------o 20 (20) merge two known; two far right
3303 | ' ' ' o 19 (19) expand
3303 | ' ' ' o 19 (19) expand
3304 | ' ' ' |\
3304 | ' ' ' |\
3305 o---+---+ | 18 (18) merge two known; two far left
3305 o---+---+ | 18 (18) merge two known; two far left
3306 / / / / /
3306 / / / / /
3307 ' ' ' | o 17 (17) expand
3307 ' ' ' | o 17 (17) expand
3308 ' ' ' | |\
3308 ' ' ' | |\
3309 +-+-------o 16 (16) merge two known; one immediate right, one near right
3309 +-+-------o 16 (16) merge two known; one immediate right, one near right
3310 ' ' ' o | 15 (15) expand
3310 ' ' ' o | 15 (15) expand
3311 ' ' ' |\ \
3311 ' ' ' |\ \
3312 +-------o | 14 (14) merge two known; one immediate right, one far right
3312 +-------o | 14 (14) merge two known; one immediate right, one far right
3313 ' ' ' | |/
3313 ' ' ' | |/
3314 ' ' ' o | 13 (13) expand
3314 ' ' ' o | 13 (13) expand
3315 ' ' ' |\ \
3315 ' ' ' |\ \
3316 ' +---+---o 12 (12) merge two known; one immediate right, one far left
3316 ' +---+---o 12 (12) merge two known; one immediate right, one far left
3317 ' ' ' | o 11 (11) expand
3317 ' ' ' | o 11 (11) expand
3318 ' ' ' | |\
3318 ' ' ' | |\
3319 +---------o 10 (10) merge two known; one immediate left, one near right
3319 +---------o 10 (10) merge two known; one immediate left, one near right
3320 ' ' ' | |/
3320 ' ' ' | |/
3321 ' ' ' o | 9 (9) expand
3321 ' ' ' o | 9 (9) expand
3322 ' ' ' |\ \
3322 ' ' ' |\ \
3323 +-------o | 8 (8) merge two known; one immediate left, one far right
3323 +-------o | 8 (8) merge two known; one immediate left, one far right
3324 ' ' ' |/ /
3324 ' ' ' |/ /
3325 ' ' ' o | 7 (7) expand
3325 ' ' ' o | 7 (7) expand
3326 ' ' ' |\ \
3326 ' ' ' |\ \
3327 ' ' ' +---o 6 (6) merge two known; one immediate left, one far left
3327 ' ' ' +---o 6 (6) merge two known; one immediate left, one far left
3328 ' ' ' | '/
3328 ' ' ' | '/
3329 ' ' ' o ' 5 (5) expand
3329 ' ' ' o ' 5 (5) expand
3330 ' ' ' |\ \
3330 ' ' ' |\ \
3331 ' +---o ' ' 4 (4) merge two known; one immediate left, one immediate right
3331 ' +---o ' ' 4 (4) merge two known; one immediate left, one immediate right
3332 ' ' ' '/ /
3332 ' ' ' '/ /
3333
3333
3334 behavior with newlines
3334 behavior with newlines
3335
3335
3336 $ hg log -G -r ::2 -T '{rev} {desc}'
3336 $ hg log -G -r ::2 -T '{rev} {desc}'
3337 o 2 (2) collapse
3337 o 2 (2) collapse
3338 o 1 (1) collapse
3338 o 1 (1) collapse
3339 o 0 (0) root
3339 o 0 (0) root
3340
3340
3341 $ hg log -G -r ::2 -T '{rev} {desc}\n'
3341 $ hg log -G -r ::2 -T '{rev} {desc}\n'
3342 o 2 (2) collapse
3342 o 2 (2) collapse
3343 o 1 (1) collapse
3343 o 1 (1) collapse
3344 o 0 (0) root
3344 o 0 (0) root
3345
3345
3346 $ hg log -G -r ::2 -T '{rev} {desc}\n\n'
3346 $ hg log -G -r ::2 -T '{rev} {desc}\n\n'
3347 o 2 (2) collapse
3347 o 2 (2) collapse
3348 |
3348 |
3349 o 1 (1) collapse
3349 o 1 (1) collapse
3350 |
3350 |
3351 o 0 (0) root
3351 o 0 (0) root
3352
3352
3353
3353
3354 $ hg log -G -r ::2 -T '\n{rev} {desc}'
3354 $ hg log -G -r ::2 -T '\n{rev} {desc}'
3355 o
3355 o
3356 | 2 (2) collapse
3356 | 2 (2) collapse
3357 o
3357 o
3358 | 1 (1) collapse
3358 | 1 (1) collapse
3359 o
3359 o
3360 0 (0) root
3360 0 (0) root
3361
3361
3362 $ hg log -G -r ::2 -T '{rev} {desc}\n\n\n'
3362 $ hg log -G -r ::2 -T '{rev} {desc}\n\n\n'
3363 o 2 (2) collapse
3363 o 2 (2) collapse
3364 |
3364 |
3365 |
3365 |
3366 o 1 (1) collapse
3366 o 1 (1) collapse
3367 |
3367 |
3368 |
3368 |
3369 o 0 (0) root
3369 o 0 (0) root
3370
3370
3371
3371
3372 $ cd ..
3372 $ cd ..
3373
3373
3374 When inserting extra line nodes to handle more than 2 parents, ensure that
3374 When inserting extra line nodes to handle more than 2 parents, ensure that
3375 the right node styles are used (issue5174):
3375 the right node styles are used (issue5174):
3376
3376
3377 $ hg init repo-issue5174
3377 $ hg init repo-issue5174
3378 $ cd repo-issue5174
3378 $ cd repo-issue5174
3379 $ echo a > f0
3379 $ echo a > f0
3380 $ hg ci -Aqm 0
3380 $ hg ci -Aqm 0
3381 $ echo a > f1
3381 $ echo a > f1
3382 $ hg ci -Aqm 1
3382 $ hg ci -Aqm 1
3383 $ echo a > f2
3383 $ echo a > f2
3384 $ hg ci -Aqm 2
3384 $ hg ci -Aqm 2
3385 $ hg co ".^"
3385 $ hg co ".^"
3386 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3386 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3387 $ echo a > f3
3387 $ echo a > f3
3388 $ hg ci -Aqm 3
3388 $ hg ci -Aqm 3
3389 $ hg co ".^^"
3389 $ hg co ".^^"
3390 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
3390 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
3391 $ echo a > f4
3391 $ echo a > f4
3392 $ hg ci -Aqm 4
3392 $ hg ci -Aqm 4
3393 $ hg merge -r 2
3393 $ hg merge -r 2
3394 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3394 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3395 (branch merge, don't forget to commit)
3395 (branch merge, don't forget to commit)
3396 $ hg ci -qm 5
3396 $ hg ci -qm 5
3397 $ hg merge -r 3
3397 $ hg merge -r 3
3398 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3398 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3399 (branch merge, don't forget to commit)
3399 (branch merge, don't forget to commit)
3400 $ hg ci -qm 6
3400 $ hg ci -qm 6
3401 $ hg log -G -r '0 | 1 | 2 | 6'
3401 $ hg log -G -r '0 | 1 | 2 | 6'
3402 @ changeset: 6:851fe89689ad
3402 @ changeset: 6:851fe89689ad
3403 :\ tag: tip
3403 :\ tag: tip
3404 : : parent: 5:4f1e3cf15f5d
3404 : : parent: 5:4f1e3cf15f5d
3405 : : parent: 3:b74ba7084d2d
3405 : : parent: 3:b74ba7084d2d
3406 : : user: test
3406 : : user: test
3407 : : date: Thu Jan 01 00:00:00 1970 +0000
3407 : : date: Thu Jan 01 00:00:00 1970 +0000
3408 : : summary: 6
3408 : : summary: 6
3409 : :
3409 : :
3410 : \
3410 : \
3411 : :\
3411 : :\
3412 : o : changeset: 2:3e6599df4cce
3412 : o : changeset: 2:3e6599df4cce
3413 : :/ user: test
3413 : :/ user: test
3414 : : date: Thu Jan 01 00:00:00 1970 +0000
3414 : : date: Thu Jan 01 00:00:00 1970 +0000
3415 : : summary: 2
3415 : : summary: 2
3416 : :
3416 : :
3417 : o changeset: 1:bd9a55143933
3417 : o changeset: 1:bd9a55143933
3418 :/ user: test
3418 :/ user: test
3419 : date: Thu Jan 01 00:00:00 1970 +0000
3419 : date: Thu Jan 01 00:00:00 1970 +0000
3420 : summary: 1
3420 : summary: 1
3421 :
3421 :
3422 o changeset: 0:870a5edc339c
3422 o changeset: 0:870a5edc339c
3423 user: test
3423 user: test
3424 date: Thu Jan 01 00:00:00 1970 +0000
3424 date: Thu Jan 01 00:00:00 1970 +0000
3425 summary: 0
3425 summary: 0
3426
3426
3427
3427
3428 $ cd ..
3428 $ cd ..
3429
3429
3430 Multiple roots (issue5440):
3430 Multiple roots (issue5440):
3431
3431
3432 $ hg init multiroots
3432 $ hg init multiroots
3433 $ cd multiroots
3433 $ cd multiroots
3434 $ cat <<EOF > .hg/hgrc
3434 $ cat <<EOF > .hg/hgrc
3435 > [ui]
3435 > [ui]
3436 > logtemplate = '{rev} {desc}\n\n'
3436 > logtemplate = '{rev} {desc}\n\n'
3437 > EOF
3437 > EOF
3438
3438
3439 $ touch foo
3439 $ touch foo
3440 $ hg ci -Aqm foo
3440 $ hg ci -Aqm foo
3441 $ hg co -q null
3441 $ hg co -q null
3442 $ touch bar
3442 $ touch bar
3443 $ hg ci -Aqm bar
3443 $ hg ci -Aqm bar
3444
3444
3445 $ hg log -Gr null:
3445 $ hg log -Gr null:
3446 @ 1 bar
3446 @ 1 bar
3447 |
3447 |
3448 | o 0 foo
3448 | o 0 foo
3449 |/
3449 |/
3450 o -1
3450 o -1
3451
3451
3452 $ hg log -Gr null+0
3452 $ hg log -Gr null+0
3453 o 0 foo
3453 o 0 foo
3454 |
3454 |
3455 o -1
3455 o -1
3456
3456
3457 $ hg log -Gr null+1
3457 $ hg log -Gr null+1
3458 @ 1 bar
3458 @ 1 bar
3459 |
3459 |
3460 o -1
3460 o -1
3461
3461
3462
3462
3463 $ cd ..
3463 $ cd ..
@@ -1,426 +1,427 b''
1 #require hardlink
1 #require hardlink
2
2
3 $ cat > nlinks.py <<EOF
3 $ cat > nlinks.py <<EOF
4 > from __future__ import print_function
4 > import sys
5 > import sys
5 > from mercurial import util
6 > from mercurial import util
6 > for f in sorted(sys.stdin.readlines()):
7 > for f in sorted(sys.stdin.readlines()):
7 > f = f[:-1]
8 > f = f[:-1]
8 > print util.nlinks(f), f
9 > print(util.nlinks(f), f)
9 > EOF
10 > EOF
10
11
11 $ nlinksdir()
12 $ nlinksdir()
12 > {
13 > {
13 > find "$@" -type f | $PYTHON $TESTTMP/nlinks.py
14 > find "$@" -type f | $PYTHON $TESTTMP/nlinks.py
14 > }
15 > }
15
16
16 Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux):
17 Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux):
17
18
18 $ cat > linkcp.py <<EOF
19 $ cat > linkcp.py <<EOF
19 > from mercurial import util
20 > from mercurial import util
20 > import sys
21 > import sys
21 > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True)
22 > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True)
22 > EOF
23 > EOF
23
24
24 $ linkcp()
25 $ linkcp()
25 > {
26 > {
26 > $PYTHON $TESTTMP/linkcp.py $1 $2
27 > $PYTHON $TESTTMP/linkcp.py $1 $2
27 > }
28 > }
28
29
29 Prepare repo r1:
30 Prepare repo r1:
30
31
31 $ hg init r1
32 $ hg init r1
32 $ cd r1
33 $ cd r1
33
34
34 $ echo c1 > f1
35 $ echo c1 > f1
35 $ hg add f1
36 $ hg add f1
36 $ hg ci -m0
37 $ hg ci -m0
37
38
38 $ mkdir d1
39 $ mkdir d1
39 $ cd d1
40 $ cd d1
40 $ echo c2 > f2
41 $ echo c2 > f2
41 $ hg add f2
42 $ hg add f2
42 $ hg ci -m1
43 $ hg ci -m1
43 $ cd ../..
44 $ cd ../..
44
45
45 $ nlinksdir r1/.hg/store
46 $ nlinksdir r1/.hg/store
46 1 r1/.hg/store/00changelog.i
47 1 r1/.hg/store/00changelog.i
47 1 r1/.hg/store/00manifest.i
48 1 r1/.hg/store/00manifest.i
48 1 r1/.hg/store/data/d1/f2.i
49 1 r1/.hg/store/data/d1/f2.i
49 1 r1/.hg/store/data/f1.i
50 1 r1/.hg/store/data/f1.i
50 1 r1/.hg/store/fncache
51 1 r1/.hg/store/fncache
51 1 r1/.hg/store/phaseroots
52 1 r1/.hg/store/phaseroots
52 1 r1/.hg/store/undo
53 1 r1/.hg/store/undo
53 1 r1/.hg/store/undo.backup.fncache
54 1 r1/.hg/store/undo.backup.fncache
54 1 r1/.hg/store/undo.backupfiles
55 1 r1/.hg/store/undo.backupfiles
55 1 r1/.hg/store/undo.phaseroots
56 1 r1/.hg/store/undo.phaseroots
56
57
57
58
58 Create hardlinked clone r2:
59 Create hardlinked clone r2:
59
60
60 $ hg clone -U --debug r1 r2 --config progress.debug=true
61 $ hg clone -U --debug r1 r2 --config progress.debug=true
61 linking: 1
62 linking: 1
62 linking: 2
63 linking: 2
63 linking: 3
64 linking: 3
64 linking: 4
65 linking: 4
65 linking: 5
66 linking: 5
66 linking: 6
67 linking: 6
67 linking: 7
68 linking: 7
68 linked 7 files
69 linked 7 files
69
70
70 Create non-hardlinked clone r3:
71 Create non-hardlinked clone r3:
71
72
72 $ hg clone --pull r1 r3
73 $ hg clone --pull r1 r3
73 requesting all changes
74 requesting all changes
74 adding changesets
75 adding changesets
75 adding manifests
76 adding manifests
76 adding file changes
77 adding file changes
77 added 2 changesets with 2 changes to 2 files
78 added 2 changesets with 2 changes to 2 files
78 updating to branch default
79 updating to branch default
79 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
80
81
81
82
82 Repos r1 and r2 should now contain hardlinked files:
83 Repos r1 and r2 should now contain hardlinked files:
83
84
84 $ nlinksdir r1/.hg/store
85 $ nlinksdir r1/.hg/store
85 2 r1/.hg/store/00changelog.i
86 2 r1/.hg/store/00changelog.i
86 2 r1/.hg/store/00manifest.i
87 2 r1/.hg/store/00manifest.i
87 2 r1/.hg/store/data/d1/f2.i
88 2 r1/.hg/store/data/d1/f2.i
88 2 r1/.hg/store/data/f1.i
89 2 r1/.hg/store/data/f1.i
89 2 r1/.hg/store/fncache
90 2 r1/.hg/store/fncache
90 1 r1/.hg/store/phaseroots
91 1 r1/.hg/store/phaseroots
91 1 r1/.hg/store/undo
92 1 r1/.hg/store/undo
92 1 r1/.hg/store/undo.backup.fncache
93 1 r1/.hg/store/undo.backup.fncache
93 1 r1/.hg/store/undo.backupfiles
94 1 r1/.hg/store/undo.backupfiles
94 1 r1/.hg/store/undo.phaseroots
95 1 r1/.hg/store/undo.phaseroots
95
96
96 $ nlinksdir r2/.hg/store
97 $ nlinksdir r2/.hg/store
97 2 r2/.hg/store/00changelog.i
98 2 r2/.hg/store/00changelog.i
98 2 r2/.hg/store/00manifest.i
99 2 r2/.hg/store/00manifest.i
99 2 r2/.hg/store/data/d1/f2.i
100 2 r2/.hg/store/data/d1/f2.i
100 2 r2/.hg/store/data/f1.i
101 2 r2/.hg/store/data/f1.i
101 2 r2/.hg/store/fncache
102 2 r2/.hg/store/fncache
102
103
103 Repo r3 should not be hardlinked:
104 Repo r3 should not be hardlinked:
104
105
105 $ nlinksdir r3/.hg/store
106 $ nlinksdir r3/.hg/store
106 1 r3/.hg/store/00changelog.i
107 1 r3/.hg/store/00changelog.i
107 1 r3/.hg/store/00manifest.i
108 1 r3/.hg/store/00manifest.i
108 1 r3/.hg/store/data/d1/f2.i
109 1 r3/.hg/store/data/d1/f2.i
109 1 r3/.hg/store/data/f1.i
110 1 r3/.hg/store/data/f1.i
110 1 r3/.hg/store/fncache
111 1 r3/.hg/store/fncache
111 1 r3/.hg/store/phaseroots
112 1 r3/.hg/store/phaseroots
112 1 r3/.hg/store/undo
113 1 r3/.hg/store/undo
113 1 r3/.hg/store/undo.backupfiles
114 1 r3/.hg/store/undo.backupfiles
114 1 r3/.hg/store/undo.phaseroots
115 1 r3/.hg/store/undo.phaseroots
115
116
116
117
117 Create a non-inlined filelog in r3:
118 Create a non-inlined filelog in r3:
118
119
119 $ cd r3/d1
120 $ cd r3/d1
120 >>> f = open('data1', 'wb')
121 >>> f = open('data1', 'wb')
121 >>> for x in range(10000):
122 >>> for x in range(10000):
122 ... f.write("%s\n" % str(x))
123 ... f.write("%s\n" % str(x))
123 >>> f.close()
124 >>> f.close()
124 $ for j in 0 1 2 3 4 5 6 7 8 9; do
125 $ for j in 0 1 2 3 4 5 6 7 8 9; do
125 > cat data1 >> f2
126 > cat data1 >> f2
126 > hg commit -m$j
127 > hg commit -m$j
127 > done
128 > done
128 $ cd ../..
129 $ cd ../..
129
130
130 $ nlinksdir r3/.hg/store
131 $ nlinksdir r3/.hg/store
131 1 r3/.hg/store/00changelog.i
132 1 r3/.hg/store/00changelog.i
132 1 r3/.hg/store/00manifest.i
133 1 r3/.hg/store/00manifest.i
133 1 r3/.hg/store/data/d1/f2.d
134 1 r3/.hg/store/data/d1/f2.d
134 1 r3/.hg/store/data/d1/f2.i
135 1 r3/.hg/store/data/d1/f2.i
135 1 r3/.hg/store/data/f1.i
136 1 r3/.hg/store/data/f1.i
136 1 r3/.hg/store/fncache
137 1 r3/.hg/store/fncache
137 1 r3/.hg/store/phaseroots
138 1 r3/.hg/store/phaseroots
138 1 r3/.hg/store/undo
139 1 r3/.hg/store/undo
139 1 r3/.hg/store/undo.backup.fncache
140 1 r3/.hg/store/undo.backup.fncache
140 1 r3/.hg/store/undo.backup.phaseroots
141 1 r3/.hg/store/undo.backup.phaseroots
141 1 r3/.hg/store/undo.backupfiles
142 1 r3/.hg/store/undo.backupfiles
142 1 r3/.hg/store/undo.phaseroots
143 1 r3/.hg/store/undo.phaseroots
143
144
144 Push to repo r1 should break up most hardlinks in r2:
145 Push to repo r1 should break up most hardlinks in r2:
145
146
146 $ hg -R r2 verify
147 $ hg -R r2 verify
147 checking changesets
148 checking changesets
148 checking manifests
149 checking manifests
149 crosschecking files in changesets and manifests
150 crosschecking files in changesets and manifests
150 checking files
151 checking files
151 2 files, 2 changesets, 2 total revisions
152 2 files, 2 changesets, 2 total revisions
152
153
153 $ cd r3
154 $ cd r3
154 $ hg push
155 $ hg push
155 pushing to $TESTTMP/r1 (glob)
156 pushing to $TESTTMP/r1 (glob)
156 searching for changes
157 searching for changes
157 adding changesets
158 adding changesets
158 adding manifests
159 adding manifests
159 adding file changes
160 adding file changes
160 added 10 changesets with 10 changes to 1 files
161 added 10 changesets with 10 changes to 1 files
161
162
162 $ cd ..
163 $ cd ..
163
164
164 $ nlinksdir r2/.hg/store
165 $ nlinksdir r2/.hg/store
165 1 r2/.hg/store/00changelog.i
166 1 r2/.hg/store/00changelog.i
166 1 r2/.hg/store/00manifest.i
167 1 r2/.hg/store/00manifest.i
167 1 r2/.hg/store/data/d1/f2.i
168 1 r2/.hg/store/data/d1/f2.i
168 2 r2/.hg/store/data/f1.i
169 2 r2/.hg/store/data/f1.i
169 [12] r2/\.hg/store/fncache (re)
170 [12] r2/\.hg/store/fncache (re)
170
171
171 #if hardlink-whitelisted
172 #if hardlink-whitelisted
172 $ nlinksdir r2/.hg/store/fncache
173 $ nlinksdir r2/.hg/store/fncache
173 2 r2/.hg/store/fncache
174 2 r2/.hg/store/fncache
174 #endif
175 #endif
175
176
176 $ hg -R r2 verify
177 $ hg -R r2 verify
177 checking changesets
178 checking changesets
178 checking manifests
179 checking manifests
179 crosschecking files in changesets and manifests
180 crosschecking files in changesets and manifests
180 checking files
181 checking files
181 2 files, 2 changesets, 2 total revisions
182 2 files, 2 changesets, 2 total revisions
182
183
183
184
184 $ cd r1
185 $ cd r1
185 $ hg up
186 $ hg up
186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
187
188
188 Committing a change to f1 in r1 must break up hardlink f1.i in r2:
189 Committing a change to f1 in r1 must break up hardlink f1.i in r2:
189
190
190 $ echo c1c1 >> f1
191 $ echo c1c1 >> f1
191 $ hg ci -m00
192 $ hg ci -m00
192 $ cd ..
193 $ cd ..
193
194
194 $ nlinksdir r2/.hg/store
195 $ nlinksdir r2/.hg/store
195 1 r2/.hg/store/00changelog.i
196 1 r2/.hg/store/00changelog.i
196 1 r2/.hg/store/00manifest.i
197 1 r2/.hg/store/00manifest.i
197 1 r2/.hg/store/data/d1/f2.i
198 1 r2/.hg/store/data/d1/f2.i
198 1 r2/.hg/store/data/f1.i
199 1 r2/.hg/store/data/f1.i
199 [12] r2/\.hg/store/fncache (re)
200 [12] r2/\.hg/store/fncache (re)
200
201
201 #if hardlink-whitelisted
202 #if hardlink-whitelisted
202 $ nlinksdir r2/.hg/store/fncache
203 $ nlinksdir r2/.hg/store/fncache
203 2 r2/.hg/store/fncache
204 2 r2/.hg/store/fncache
204 #endif
205 #endif
205
206
206 Create a file which exec permissions we will change
207 Create a file which exec permissions we will change
207 $ cd r3
208 $ cd r3
208 $ echo "echo hello world" > f3
209 $ echo "echo hello world" > f3
209 $ hg add f3
210 $ hg add f3
210 $ hg ci -mf3
211 $ hg ci -mf3
211 $ cd ..
212 $ cd ..
212
213
213 $ cd r3
214 $ cd r3
214 $ hg tip --template '{rev}:{node|short}\n'
215 $ hg tip --template '{rev}:{node|short}\n'
215 12:d3b77733a28a
216 12:d3b77733a28a
216 $ echo bla > f1
217 $ echo bla > f1
217 $ chmod +x f3
218 $ chmod +x f3
218 $ hg ci -m1
219 $ hg ci -m1
219 $ cd ..
220 $ cd ..
220
221
221 Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'):
222 Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'):
222
223
223 $ linkcp r3 r4
224 $ linkcp r3 r4
224
225
225 'checklink' is produced by hardlinking a symlink, which is undefined whether
226 'checklink' is produced by hardlinking a symlink, which is undefined whether
226 the symlink should be followed or not. It does behave differently on Linux and
227 the symlink should be followed or not. It does behave differently on Linux and
227 BSD. Just remove it so the test pass on both platforms.
228 BSD. Just remove it so the test pass on both platforms.
228
229
229 $ rm -f r4/.hg/cache/checklink
230 $ rm -f r4/.hg/cache/checklink
230
231
231 r4 has hardlinks in the working dir (not just inside .hg):
232 r4 has hardlinks in the working dir (not just inside .hg):
232
233
233 $ nlinksdir r4
234 $ nlinksdir r4
234 2 r4/.hg/00changelog.i
235 2 r4/.hg/00changelog.i
235 2 r4/.hg/branch
236 2 r4/.hg/branch
236 2 r4/.hg/cache/branch2-base
237 2 r4/.hg/cache/branch2-base
237 2 r4/.hg/cache/branch2-served
238 2 r4/.hg/cache/branch2-served
238 2 r4/.hg/cache/checkisexec (execbit !)
239 2 r4/.hg/cache/checkisexec (execbit !)
239 ? r4/.hg/cache/checklink-target (glob) (symlink !)
240 ? r4/.hg/cache/checklink-target (glob) (symlink !)
240 2 r4/.hg/cache/checknoexec (execbit !)
241 2 r4/.hg/cache/checknoexec (execbit !)
241 2 r4/.hg/cache/rbc-names-v1
242 2 r4/.hg/cache/rbc-names-v1
242 2 r4/.hg/cache/rbc-revs-v1
243 2 r4/.hg/cache/rbc-revs-v1
243 2 r4/.hg/dirstate
244 2 r4/.hg/dirstate
244 2 r4/.hg/fsmonitor.state (fsmonitor !)
245 2 r4/.hg/fsmonitor.state (fsmonitor !)
245 2 r4/.hg/hgrc
246 2 r4/.hg/hgrc
246 2 r4/.hg/last-message.txt
247 2 r4/.hg/last-message.txt
247 2 r4/.hg/requires
248 2 r4/.hg/requires
248 2 r4/.hg/store/00changelog.i
249 2 r4/.hg/store/00changelog.i
249 2 r4/.hg/store/00manifest.i
250 2 r4/.hg/store/00manifest.i
250 2 r4/.hg/store/data/d1/f2.d
251 2 r4/.hg/store/data/d1/f2.d
251 2 r4/.hg/store/data/d1/f2.i
252 2 r4/.hg/store/data/d1/f2.i
252 2 r4/.hg/store/data/f1.i
253 2 r4/.hg/store/data/f1.i
253 2 r4/.hg/store/data/f3.i
254 2 r4/.hg/store/data/f3.i
254 2 r4/.hg/store/fncache
255 2 r4/.hg/store/fncache
255 2 r4/.hg/store/phaseroots
256 2 r4/.hg/store/phaseroots
256 2 r4/.hg/store/undo
257 2 r4/.hg/store/undo
257 2 r4/.hg/store/undo.backup.fncache
258 2 r4/.hg/store/undo.backup.fncache
258 2 r4/.hg/store/undo.backup.phaseroots
259 2 r4/.hg/store/undo.backup.phaseroots
259 2 r4/.hg/store/undo.backupfiles
260 2 r4/.hg/store/undo.backupfiles
260 2 r4/.hg/store/undo.phaseroots
261 2 r4/.hg/store/undo.phaseroots
261 [24] r4/\.hg/undo\.backup\.dirstate (re)
262 [24] r4/\.hg/undo\.backup\.dirstate (re)
262 2 r4/.hg/undo.bookmarks
263 2 r4/.hg/undo.bookmarks
263 2 r4/.hg/undo.branch
264 2 r4/.hg/undo.branch
264 2 r4/.hg/undo.desc
265 2 r4/.hg/undo.desc
265 [24] r4/\.hg/undo\.dirstate (re)
266 [24] r4/\.hg/undo\.dirstate (re)
266 2 r4/d1/data1
267 2 r4/d1/data1
267 2 r4/d1/f2
268 2 r4/d1/f2
268 2 r4/f1
269 2 r4/f1
269 2 r4/f3
270 2 r4/f3
270
271
271 Update back to revision 12 in r4 should break hardlink of file f1 and f3:
272 Update back to revision 12 in r4 should break hardlink of file f1 and f3:
272 #if hardlink-whitelisted
273 #if hardlink-whitelisted
273 $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate
274 $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate
274 4 r4/.hg/undo.backup.dirstate
275 4 r4/.hg/undo.backup.dirstate
275 4 r4/.hg/undo.dirstate
276 4 r4/.hg/undo.dirstate
276 #endif
277 #endif
277
278
278
279
279 $ hg -R r4 up 12
280 $ hg -R r4 up 12
280 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !)
281 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !)
281 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !)
282 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !)
282
283
283 $ nlinksdir r4
284 $ nlinksdir r4
284 2 r4/.hg/00changelog.i
285 2 r4/.hg/00changelog.i
285 1 r4/.hg/branch
286 1 r4/.hg/branch
286 2 r4/.hg/cache/branch2-base
287 2 r4/.hg/cache/branch2-base
287 2 r4/.hg/cache/branch2-served
288 2 r4/.hg/cache/branch2-served
288 2 r4/.hg/cache/checkisexec (execbit !)
289 2 r4/.hg/cache/checkisexec (execbit !)
289 2 r4/.hg/cache/checklink-target (symlink !)
290 2 r4/.hg/cache/checklink-target (symlink !)
290 2 r4/.hg/cache/checknoexec (execbit !)
291 2 r4/.hg/cache/checknoexec (execbit !)
291 2 r4/.hg/cache/rbc-names-v1
292 2 r4/.hg/cache/rbc-names-v1
292 2 r4/.hg/cache/rbc-revs-v1
293 2 r4/.hg/cache/rbc-revs-v1
293 1 r4/.hg/dirstate
294 1 r4/.hg/dirstate
294 1 r4/.hg/fsmonitor.state (fsmonitor !)
295 1 r4/.hg/fsmonitor.state (fsmonitor !)
295 2 r4/.hg/hgrc
296 2 r4/.hg/hgrc
296 2 r4/.hg/last-message.txt
297 2 r4/.hg/last-message.txt
297 2 r4/.hg/requires
298 2 r4/.hg/requires
298 2 r4/.hg/store/00changelog.i
299 2 r4/.hg/store/00changelog.i
299 2 r4/.hg/store/00manifest.i
300 2 r4/.hg/store/00manifest.i
300 2 r4/.hg/store/data/d1/f2.d
301 2 r4/.hg/store/data/d1/f2.d
301 2 r4/.hg/store/data/d1/f2.i
302 2 r4/.hg/store/data/d1/f2.i
302 2 r4/.hg/store/data/f1.i
303 2 r4/.hg/store/data/f1.i
303 2 r4/.hg/store/data/f3.i
304 2 r4/.hg/store/data/f3.i
304 2 r4/.hg/store/fncache
305 2 r4/.hg/store/fncache
305 2 r4/.hg/store/phaseroots
306 2 r4/.hg/store/phaseroots
306 2 r4/.hg/store/undo
307 2 r4/.hg/store/undo
307 2 r4/.hg/store/undo.backup.fncache
308 2 r4/.hg/store/undo.backup.fncache
308 2 r4/.hg/store/undo.backup.phaseroots
309 2 r4/.hg/store/undo.backup.phaseroots
309 2 r4/.hg/store/undo.backupfiles
310 2 r4/.hg/store/undo.backupfiles
310 2 r4/.hg/store/undo.phaseroots
311 2 r4/.hg/store/undo.phaseroots
311 [24] r4/\.hg/undo\.backup\.dirstate (re)
312 [24] r4/\.hg/undo\.backup\.dirstate (re)
312 2 r4/.hg/undo.bookmarks
313 2 r4/.hg/undo.bookmarks
313 2 r4/.hg/undo.branch
314 2 r4/.hg/undo.branch
314 2 r4/.hg/undo.desc
315 2 r4/.hg/undo.desc
315 [24] r4/\.hg/undo\.dirstate (re)
316 [24] r4/\.hg/undo\.dirstate (re)
316 2 r4/d1/data1
317 2 r4/d1/data1
317 2 r4/d1/f2
318 2 r4/d1/f2
318 1 r4/f1
319 1 r4/f1
319 1 r4/f3 (execbit !)
320 1 r4/f3 (execbit !)
320 2 r4/f3 (no-execbit !)
321 2 r4/f3 (no-execbit !)
321
322
322 #if hardlink-whitelisted
323 #if hardlink-whitelisted
323 $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate
324 $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate
324 4 r4/.hg/undo.backup.dirstate
325 4 r4/.hg/undo.backup.dirstate
325 4 r4/.hg/undo.dirstate
326 4 r4/.hg/undo.dirstate
326 #endif
327 #endif
327
328
328 Test hardlinking outside hg:
329 Test hardlinking outside hg:
329
330
330 $ mkdir x
331 $ mkdir x
331 $ echo foo > x/a
332 $ echo foo > x/a
332
333
333 $ linkcp x y
334 $ linkcp x y
334 $ echo bar >> y/a
335 $ echo bar >> y/a
335
336
336 No diff if hardlink:
337 No diff if hardlink:
337
338
338 $ diff x/a y/a
339 $ diff x/a y/a
339
340
340 Test mq hardlinking:
341 Test mq hardlinking:
341
342
342 $ echo "[extensions]" >> $HGRCPATH
343 $ echo "[extensions]" >> $HGRCPATH
343 $ echo "mq=" >> $HGRCPATH
344 $ echo "mq=" >> $HGRCPATH
344
345
345 $ hg init a
346 $ hg init a
346 $ cd a
347 $ cd a
347
348
348 $ hg qimport -n foo - << EOF
349 $ hg qimport -n foo - << EOF
349 > # HG changeset patch
350 > # HG changeset patch
350 > # Date 1 0
351 > # Date 1 0
351 > diff -r 2588a8b53d66 a
352 > diff -r 2588a8b53d66 a
352 > --- /dev/null Thu Jan 01 00:00:00 1970 +0000
353 > --- /dev/null Thu Jan 01 00:00:00 1970 +0000
353 > +++ b/a Wed Jul 23 15:54:29 2008 +0200
354 > +++ b/a Wed Jul 23 15:54:29 2008 +0200
354 > @@ -0,0 +1,1 @@
355 > @@ -0,0 +1,1 @@
355 > +a
356 > +a
356 > EOF
357 > EOF
357 adding foo to series file
358 adding foo to series file
358
359
359 $ hg qpush
360 $ hg qpush
360 applying foo
361 applying foo
361 now at: foo
362 now at: foo
362
363
363 $ cd ..
364 $ cd ..
364 $ linkcp a b
365 $ linkcp a b
365 $ cd b
366 $ cd b
366
367
367 $ hg qimport -n bar - << EOF
368 $ hg qimport -n bar - << EOF
368 > # HG changeset patch
369 > # HG changeset patch
369 > # Date 2 0
370 > # Date 2 0
370 > diff -r 2588a8b53d66 a
371 > diff -r 2588a8b53d66 a
371 > --- /dev/null Thu Jan 01 00:00:00 1970 +0000
372 > --- /dev/null Thu Jan 01 00:00:00 1970 +0000
372 > +++ b/b Wed Jul 23 15:54:29 2008 +0200
373 > +++ b/b Wed Jul 23 15:54:29 2008 +0200
373 > @@ -0,0 +1,1 @@
374 > @@ -0,0 +1,1 @@
374 > +b
375 > +b
375 > EOF
376 > EOF
376 adding bar to series file
377 adding bar to series file
377
378
378 $ hg qpush
379 $ hg qpush
379 applying bar
380 applying bar
380 now at: bar
381 now at: bar
381
382
382 $ cat .hg/patches/status
383 $ cat .hg/patches/status
383 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
384 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
384 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar
385 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar
385
386
386 $ cat .hg/patches/series
387 $ cat .hg/patches/series
387 foo
388 foo
388 bar
389 bar
389
390
390 $ cat ../a/.hg/patches/status
391 $ cat ../a/.hg/patches/status
391 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
392 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
392
393
393 $ cat ../a/.hg/patches/series
394 $ cat ../a/.hg/patches/series
394 foo
395 foo
395
396
396 Test tags hardlinking:
397 Test tags hardlinking:
397
398
398 $ hg qdel -r qbase:qtip
399 $ hg qdel -r qbase:qtip
399 patch foo finalized without changeset message
400 patch foo finalized without changeset message
400 patch bar finalized without changeset message
401 patch bar finalized without changeset message
401
402
402 $ hg tag -l lfoo
403 $ hg tag -l lfoo
403 $ hg tag foo
404 $ hg tag foo
404
405
405 $ cd ..
406 $ cd ..
406 $ linkcp b c
407 $ linkcp b c
407 $ cd c
408 $ cd c
408
409
409 $ hg tag -l -r 0 lbar
410 $ hg tag -l -r 0 lbar
410 $ hg tag -r 0 bar
411 $ hg tag -r 0 bar
411
412
412 $ cat .hgtags
413 $ cat .hgtags
413 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
414 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
414 430ed4828a74fa4047bc816a25500f7472ab4bfe bar
415 430ed4828a74fa4047bc816a25500f7472ab4bfe bar
415
416
416 $ cat .hg/localtags
417 $ cat .hg/localtags
417 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
418 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
418 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar
419 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar
419
420
420 $ cat ../b/.hgtags
421 $ cat ../b/.hgtags
421 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
422 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
422
423
423 $ cat ../b/.hg/localtags
424 $ cat ../b/.hg/localtags
424 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
425 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
425
426
426 $ cd ..
427 $ cd ..
@@ -1,3367 +1,3367 b''
1 Short help:
1 Short help:
2
2
3 $ hg
3 $ hg
4 Mercurial Distributed SCM
4 Mercurial Distributed SCM
5
5
6 basic commands:
6 basic commands:
7
7
8 add add the specified files on the next commit
8 add add the specified files on the next commit
9 annotate show changeset information by line for each file
9 annotate show changeset information by line for each file
10 clone make a copy of an existing repository
10 clone make a copy of an existing repository
11 commit commit the specified files or all outstanding changes
11 commit commit the specified files or all outstanding changes
12 diff diff repository (or selected files)
12 diff diff repository (or selected files)
13 export dump the header and diffs for one or more changesets
13 export dump the header and diffs for one or more changesets
14 forget forget the specified files on the next commit
14 forget forget the specified files on the next commit
15 init create a new repository in the given directory
15 init create a new repository in the given directory
16 log show revision history of entire repository or files
16 log show revision history of entire repository or files
17 merge merge another revision into working directory
17 merge merge another revision into working directory
18 pull pull changes from the specified source
18 pull pull changes from the specified source
19 push push changes to the specified destination
19 push push changes to the specified destination
20 remove remove the specified files on the next commit
20 remove remove the specified files on the next commit
21 serve start stand-alone webserver
21 serve start stand-alone webserver
22 status show changed files in the working directory
22 status show changed files in the working directory
23 summary summarize working directory state
23 summary summarize working directory state
24 update update working directory (or switch revisions)
24 update update working directory (or switch revisions)
25
25
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27
27
28 $ hg -q
28 $ hg -q
29 add add the specified files on the next commit
29 add add the specified files on the next commit
30 annotate show changeset information by line for each file
30 annotate show changeset information by line for each file
31 clone make a copy of an existing repository
31 clone make a copy of an existing repository
32 commit commit the specified files or all outstanding changes
32 commit commit the specified files or all outstanding changes
33 diff diff repository (or selected files)
33 diff diff repository (or selected files)
34 export dump the header and diffs for one or more changesets
34 export dump the header and diffs for one or more changesets
35 forget forget the specified files on the next commit
35 forget forget the specified files on the next commit
36 init create a new repository in the given directory
36 init create a new repository in the given directory
37 log show revision history of entire repository or files
37 log show revision history of entire repository or files
38 merge merge another revision into working directory
38 merge merge another revision into working directory
39 pull pull changes from the specified source
39 pull pull changes from the specified source
40 push push changes to the specified destination
40 push push changes to the specified destination
41 remove remove the specified files on the next commit
41 remove remove the specified files on the next commit
42 serve start stand-alone webserver
42 serve start stand-alone webserver
43 status show changed files in the working directory
43 status show changed files in the working directory
44 summary summarize working directory state
44 summary summarize working directory state
45 update update working directory (or switch revisions)
45 update update working directory (or switch revisions)
46
46
47 $ hg help
47 $ hg help
48 Mercurial Distributed SCM
48 Mercurial Distributed SCM
49
49
50 list of commands:
50 list of commands:
51
51
52 add add the specified files on the next commit
52 add add the specified files on the next commit
53 addremove add all new files, delete all missing files
53 addremove add all new files, delete all missing files
54 annotate show changeset information by line for each file
54 annotate show changeset information by line for each file
55 archive create an unversioned archive of a repository revision
55 archive create an unversioned archive of a repository revision
56 backout reverse effect of earlier changeset
56 backout reverse effect of earlier changeset
57 bisect subdivision search of changesets
57 bisect subdivision search of changesets
58 bookmarks create a new bookmark or list existing bookmarks
58 bookmarks create a new bookmark or list existing bookmarks
59 branch set or show the current branch name
59 branch set or show the current branch name
60 branches list repository named branches
60 branches list repository named branches
61 bundle create a bundle file
61 bundle create a bundle file
62 cat output the current or given revision of files
62 cat output the current or given revision of files
63 clone make a copy of an existing repository
63 clone make a copy of an existing repository
64 commit commit the specified files or all outstanding changes
64 commit commit the specified files or all outstanding changes
65 config show combined config settings from all hgrc files
65 config show combined config settings from all hgrc files
66 copy mark files as copied for the next commit
66 copy mark files as copied for the next commit
67 diff diff repository (or selected files)
67 diff diff repository (or selected files)
68 export dump the header and diffs for one or more changesets
68 export dump the header and diffs for one or more changesets
69 files list tracked files
69 files list tracked files
70 forget forget the specified files on the next commit
70 forget forget the specified files on the next commit
71 graft copy changes from other branches onto the current branch
71 graft copy changes from other branches onto the current branch
72 grep search revision history for a pattern in specified files
72 grep search revision history for a pattern in specified files
73 heads show branch heads
73 heads show branch heads
74 help show help for a given topic or a help overview
74 help show help for a given topic or a help overview
75 identify identify the working directory or specified revision
75 identify identify the working directory or specified revision
76 import import an ordered set of patches
76 import import an ordered set of patches
77 incoming show new changesets found in source
77 incoming show new changesets found in source
78 init create a new repository in the given directory
78 init create a new repository in the given directory
79 log show revision history of entire repository or files
79 log show revision history of entire repository or files
80 manifest output the current or given revision of the project manifest
80 manifest output the current or given revision of the project manifest
81 merge merge another revision into working directory
81 merge merge another revision into working directory
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 paths show aliases for remote repositories
83 paths show aliases for remote repositories
84 phase set or show the current phase name
84 phase set or show the current phase name
85 pull pull changes from the specified source
85 pull pull changes from the specified source
86 push push changes to the specified destination
86 push push changes to the specified destination
87 recover roll back an interrupted transaction
87 recover roll back an interrupted transaction
88 remove remove the specified files on the next commit
88 remove remove the specified files on the next commit
89 rename rename files; equivalent of copy + remove
89 rename rename files; equivalent of copy + remove
90 resolve redo merges or set/view the merge status of files
90 resolve redo merges or set/view the merge status of files
91 revert restore files to their checkout state
91 revert restore files to their checkout state
92 root print the root (top) of the current working directory
92 root print the root (top) of the current working directory
93 serve start stand-alone webserver
93 serve start stand-alone webserver
94 status show changed files in the working directory
94 status show changed files in the working directory
95 summary summarize working directory state
95 summary summarize working directory state
96 tag add one or more tags for the current or given revision
96 tag add one or more tags for the current or given revision
97 tags list repository tags
97 tags list repository tags
98 unbundle apply one or more bundle files
98 unbundle apply one or more bundle files
99 update update working directory (or switch revisions)
99 update update working directory (or switch revisions)
100 verify verify the integrity of the repository
100 verify verify the integrity of the repository
101 version output version and copyright information
101 version output version and copyright information
102
102
103 additional help topics:
103 additional help topics:
104
104
105 bundlespec Bundle File Formats
105 bundlespec Bundle File Formats
106 color Colorizing Outputs
106 color Colorizing Outputs
107 config Configuration Files
107 config Configuration Files
108 dates Date Formats
108 dates Date Formats
109 diffs Diff Formats
109 diffs Diff Formats
110 environment Environment Variables
110 environment Environment Variables
111 extensions Using Additional Features
111 extensions Using Additional Features
112 filesets Specifying File Sets
112 filesets Specifying File Sets
113 glossary Glossary
113 glossary Glossary
114 hgignore Syntax for Mercurial Ignore Files
114 hgignore Syntax for Mercurial Ignore Files
115 hgweb Configuring hgweb
115 hgweb Configuring hgweb
116 internals Technical implementation topics
116 internals Technical implementation topics
117 merge-tools Merge Tools
117 merge-tools Merge Tools
118 pager Pager Support
118 pager Pager Support
119 patterns File Name Patterns
119 patterns File Name Patterns
120 phases Working with Phases
120 phases Working with Phases
121 revisions Specifying Revisions
121 revisions Specifying Revisions
122 scripting Using Mercurial from scripts and automation
122 scripting Using Mercurial from scripts and automation
123 subrepos Subrepositories
123 subrepos Subrepositories
124 templating Template Usage
124 templating Template Usage
125 urls URL Paths
125 urls URL Paths
126
126
127 (use 'hg help -v' to show built-in aliases and global options)
127 (use 'hg help -v' to show built-in aliases and global options)
128
128
129 $ hg -q help
129 $ hg -q help
130 add add the specified files on the next commit
130 add add the specified files on the next commit
131 addremove add all new files, delete all missing files
131 addremove add all new files, delete all missing files
132 annotate show changeset information by line for each file
132 annotate show changeset information by line for each file
133 archive create an unversioned archive of a repository revision
133 archive create an unversioned archive of a repository revision
134 backout reverse effect of earlier changeset
134 backout reverse effect of earlier changeset
135 bisect subdivision search of changesets
135 bisect subdivision search of changesets
136 bookmarks create a new bookmark or list existing bookmarks
136 bookmarks create a new bookmark or list existing bookmarks
137 branch set or show the current branch name
137 branch set or show the current branch name
138 branches list repository named branches
138 branches list repository named branches
139 bundle create a bundle file
139 bundle create a bundle file
140 cat output the current or given revision of files
140 cat output the current or given revision of files
141 clone make a copy of an existing repository
141 clone make a copy of an existing repository
142 commit commit the specified files or all outstanding changes
142 commit commit the specified files or all outstanding changes
143 config show combined config settings from all hgrc files
143 config show combined config settings from all hgrc files
144 copy mark files as copied for the next commit
144 copy mark files as copied for the next commit
145 diff diff repository (or selected files)
145 diff diff repository (or selected files)
146 export dump the header and diffs for one or more changesets
146 export dump the header and diffs for one or more changesets
147 files list tracked files
147 files list tracked files
148 forget forget the specified files on the next commit
148 forget forget the specified files on the next commit
149 graft copy changes from other branches onto the current branch
149 graft copy changes from other branches onto the current branch
150 grep search revision history for a pattern in specified files
150 grep search revision history for a pattern in specified files
151 heads show branch heads
151 heads show branch heads
152 help show help for a given topic or a help overview
152 help show help for a given topic or a help overview
153 identify identify the working directory or specified revision
153 identify identify the working directory or specified revision
154 import import an ordered set of patches
154 import import an ordered set of patches
155 incoming show new changesets found in source
155 incoming show new changesets found in source
156 init create a new repository in the given directory
156 init create a new repository in the given directory
157 log show revision history of entire repository or files
157 log show revision history of entire repository or files
158 manifest output the current or given revision of the project manifest
158 manifest output the current or given revision of the project manifest
159 merge merge another revision into working directory
159 merge merge another revision into working directory
160 outgoing show changesets not found in the destination
160 outgoing show changesets not found in the destination
161 paths show aliases for remote repositories
161 paths show aliases for remote repositories
162 phase set or show the current phase name
162 phase set or show the current phase name
163 pull pull changes from the specified source
163 pull pull changes from the specified source
164 push push changes to the specified destination
164 push push changes to the specified destination
165 recover roll back an interrupted transaction
165 recover roll back an interrupted transaction
166 remove remove the specified files on the next commit
166 remove remove the specified files on the next commit
167 rename rename files; equivalent of copy + remove
167 rename rename files; equivalent of copy + remove
168 resolve redo merges or set/view the merge status of files
168 resolve redo merges or set/view the merge status of files
169 revert restore files to their checkout state
169 revert restore files to their checkout state
170 root print the root (top) of the current working directory
170 root print the root (top) of the current working directory
171 serve start stand-alone webserver
171 serve start stand-alone webserver
172 status show changed files in the working directory
172 status show changed files in the working directory
173 summary summarize working directory state
173 summary summarize working directory state
174 tag add one or more tags for the current or given revision
174 tag add one or more tags for the current or given revision
175 tags list repository tags
175 tags list repository tags
176 unbundle apply one or more bundle files
176 unbundle apply one or more bundle files
177 update update working directory (or switch revisions)
177 update update working directory (or switch revisions)
178 verify verify the integrity of the repository
178 verify verify the integrity of the repository
179 version output version and copyright information
179 version output version and copyright information
180
180
181 additional help topics:
181 additional help topics:
182
182
183 bundlespec Bundle File Formats
183 bundlespec Bundle File Formats
184 color Colorizing Outputs
184 color Colorizing Outputs
185 config Configuration Files
185 config Configuration Files
186 dates Date Formats
186 dates Date Formats
187 diffs Diff Formats
187 diffs Diff Formats
188 environment Environment Variables
188 environment Environment Variables
189 extensions Using Additional Features
189 extensions Using Additional Features
190 filesets Specifying File Sets
190 filesets Specifying File Sets
191 glossary Glossary
191 glossary Glossary
192 hgignore Syntax for Mercurial Ignore Files
192 hgignore Syntax for Mercurial Ignore Files
193 hgweb Configuring hgweb
193 hgweb Configuring hgweb
194 internals Technical implementation topics
194 internals Technical implementation topics
195 merge-tools Merge Tools
195 merge-tools Merge Tools
196 pager Pager Support
196 pager Pager Support
197 patterns File Name Patterns
197 patterns File Name Patterns
198 phases Working with Phases
198 phases Working with Phases
199 revisions Specifying Revisions
199 revisions Specifying Revisions
200 scripting Using Mercurial from scripts and automation
200 scripting Using Mercurial from scripts and automation
201 subrepos Subrepositories
201 subrepos Subrepositories
202 templating Template Usage
202 templating Template Usage
203 urls URL Paths
203 urls URL Paths
204
204
205 Test extension help:
205 Test extension help:
206 $ hg help extensions --config extensions.rebase= --config extensions.children=
206 $ hg help extensions --config extensions.rebase= --config extensions.children=
207 Using Additional Features
207 Using Additional Features
208 """""""""""""""""""""""""
208 """""""""""""""""""""""""
209
209
210 Mercurial has the ability to add new features through the use of
210 Mercurial has the ability to add new features through the use of
211 extensions. Extensions may add new commands, add options to existing
211 extensions. Extensions may add new commands, add options to existing
212 commands, change the default behavior of commands, or implement hooks.
212 commands, change the default behavior of commands, or implement hooks.
213
213
214 To enable the "foo" extension, either shipped with Mercurial or in the
214 To enable the "foo" extension, either shipped with Mercurial or in the
215 Python search path, create an entry for it in your configuration file,
215 Python search path, create an entry for it in your configuration file,
216 like this:
216 like this:
217
217
218 [extensions]
218 [extensions]
219 foo =
219 foo =
220
220
221 You may also specify the full path to an extension:
221 You may also specify the full path to an extension:
222
222
223 [extensions]
223 [extensions]
224 myfeature = ~/.hgext/myfeature.py
224 myfeature = ~/.hgext/myfeature.py
225
225
226 See 'hg help config' for more information on configuration files.
226 See 'hg help config' for more information on configuration files.
227
227
228 Extensions are not loaded by default for a variety of reasons: they can
228 Extensions are not loaded by default for a variety of reasons: they can
229 increase startup overhead; they may be meant for advanced usage only; they
229 increase startup overhead; they may be meant for advanced usage only; they
230 may provide potentially dangerous abilities (such as letting you destroy
230 may provide potentially dangerous abilities (such as letting you destroy
231 or modify history); they might not be ready for prime time; or they may
231 or modify history); they might not be ready for prime time; or they may
232 alter some usual behaviors of stock Mercurial. It is thus up to the user
232 alter some usual behaviors of stock Mercurial. It is thus up to the user
233 to activate extensions as needed.
233 to activate extensions as needed.
234
234
235 To explicitly disable an extension enabled in a configuration file of
235 To explicitly disable an extension enabled in a configuration file of
236 broader scope, prepend its path with !:
236 broader scope, prepend its path with !:
237
237
238 [extensions]
238 [extensions]
239 # disabling extension bar residing in /path/to/extension/bar.py
239 # disabling extension bar residing in /path/to/extension/bar.py
240 bar = !/path/to/extension/bar.py
240 bar = !/path/to/extension/bar.py
241 # ditto, but no path was supplied for extension baz
241 # ditto, but no path was supplied for extension baz
242 baz = !
242 baz = !
243
243
244 enabled extensions:
244 enabled extensions:
245
245
246 children command to display child changesets (DEPRECATED)
246 children command to display child changesets (DEPRECATED)
247 rebase command to move sets of revisions to a different ancestor
247 rebase command to move sets of revisions to a different ancestor
248
248
249 disabled extensions:
249 disabled extensions:
250
250
251 acl hooks for controlling repository access
251 acl hooks for controlling repository access
252 blackbox log repository events to a blackbox for debugging
252 blackbox log repository events to a blackbox for debugging
253 bugzilla hooks for integrating with the Bugzilla bug tracker
253 bugzilla hooks for integrating with the Bugzilla bug tracker
254 censor erase file content at a given revision
254 censor erase file content at a given revision
255 churn command to display statistics about repository history
255 churn command to display statistics about repository history
256 clonebundles advertise pre-generated bundles to seed clones
256 clonebundles advertise pre-generated bundles to seed clones
257 convert import revisions from foreign VCS repositories into
257 convert import revisions from foreign VCS repositories into
258 Mercurial
258 Mercurial
259 eol automatically manage newlines in repository files
259 eol automatically manage newlines in repository files
260 extdiff command to allow external programs to compare revisions
260 extdiff command to allow external programs to compare revisions
261 factotum http authentication with factotum
261 factotum http authentication with factotum
262 gpg commands to sign and verify changesets
262 gpg commands to sign and verify changesets
263 hgk browse the repository in a graphical way
263 hgk browse the repository in a graphical way
264 highlight syntax highlighting for hgweb (requires Pygments)
264 highlight syntax highlighting for hgweb (requires Pygments)
265 histedit interactive history editing
265 histedit interactive history editing
266 keyword expand keywords in tracked files
266 keyword expand keywords in tracked files
267 largefiles track large binary files
267 largefiles track large binary files
268 mq manage a stack of patches
268 mq manage a stack of patches
269 notify hooks for sending email push notifications
269 notify hooks for sending email push notifications
270 patchbomb command to send changesets as (a series of) patch emails
270 patchbomb command to send changesets as (a series of) patch emails
271 purge command to delete untracked files from the working
271 purge command to delete untracked files from the working
272 directory
272 directory
273 relink recreates hardlinks between repository clones
273 relink recreates hardlinks between repository clones
274 schemes extend schemes with shortcuts to repository swarms
274 schemes extend schemes with shortcuts to repository swarms
275 share share a common history between several working directories
275 share share a common history between several working directories
276 shelve save and restore changes to the working directory
276 shelve save and restore changes to the working directory
277 strip strip changesets and their descendants from history
277 strip strip changesets and their descendants from history
278 transplant command to transplant changesets from another branch
278 transplant command to transplant changesets from another branch
279 win32mbcs allow the use of MBCS paths with problematic encodings
279 win32mbcs allow the use of MBCS paths with problematic encodings
280 zeroconf discover and advertise repositories on the local network
280 zeroconf discover and advertise repositories on the local network
281
281
282 Verify that extension keywords appear in help templates
282 Verify that extension keywords appear in help templates
283
283
284 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
284 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
285
285
286 Test short command list with verbose option
286 Test short command list with verbose option
287
287
288 $ hg -v help shortlist
288 $ hg -v help shortlist
289 Mercurial Distributed SCM
289 Mercurial Distributed SCM
290
290
291 basic commands:
291 basic commands:
292
292
293 add add the specified files on the next commit
293 add add the specified files on the next commit
294 annotate, blame
294 annotate, blame
295 show changeset information by line for each file
295 show changeset information by line for each file
296 clone make a copy of an existing repository
296 clone make a copy of an existing repository
297 commit, ci commit the specified files or all outstanding changes
297 commit, ci commit the specified files or all outstanding changes
298 diff diff repository (or selected files)
298 diff diff repository (or selected files)
299 export dump the header and diffs for one or more changesets
299 export dump the header and diffs for one or more changesets
300 forget forget the specified files on the next commit
300 forget forget the specified files on the next commit
301 init create a new repository in the given directory
301 init create a new repository in the given directory
302 log, history show revision history of entire repository or files
302 log, history show revision history of entire repository or files
303 merge merge another revision into working directory
303 merge merge another revision into working directory
304 pull pull changes from the specified source
304 pull pull changes from the specified source
305 push push changes to the specified destination
305 push push changes to the specified destination
306 remove, rm remove the specified files on the next commit
306 remove, rm remove the specified files on the next commit
307 serve start stand-alone webserver
307 serve start stand-alone webserver
308 status, st show changed files in the working directory
308 status, st show changed files in the working directory
309 summary, sum summarize working directory state
309 summary, sum summarize working directory state
310 update, up, checkout, co
310 update, up, checkout, co
311 update working directory (or switch revisions)
311 update working directory (or switch revisions)
312
312
313 global options ([+] can be repeated):
313 global options ([+] can be repeated):
314
314
315 -R --repository REPO repository root directory or name of overlay bundle
315 -R --repository REPO repository root directory or name of overlay bundle
316 file
316 file
317 --cwd DIR change working directory
317 --cwd DIR change working directory
318 -y --noninteractive do not prompt, automatically pick the first choice for
318 -y --noninteractive do not prompt, automatically pick the first choice for
319 all prompts
319 all prompts
320 -q --quiet suppress output
320 -q --quiet suppress output
321 -v --verbose enable additional output
321 -v --verbose enable additional output
322 --color TYPE when to colorize (boolean, always, auto, never, or
322 --color TYPE when to colorize (boolean, always, auto, never, or
323 debug)
323 debug)
324 --config CONFIG [+] set/override config option (use 'section.name=value')
324 --config CONFIG [+] set/override config option (use 'section.name=value')
325 --debug enable debugging output
325 --debug enable debugging output
326 --debugger start debugger
326 --debugger start debugger
327 --encoding ENCODE set the charset encoding (default: ascii)
327 --encoding ENCODE set the charset encoding (default: ascii)
328 --encodingmode MODE set the charset encoding mode (default: strict)
328 --encodingmode MODE set the charset encoding mode (default: strict)
329 --traceback always print a traceback on exception
329 --traceback always print a traceback on exception
330 --time time how long the command takes
330 --time time how long the command takes
331 --profile print command execution profile
331 --profile print command execution profile
332 --version output version information and exit
332 --version output version information and exit
333 -h --help display help and exit
333 -h --help display help and exit
334 --hidden consider hidden changesets
334 --hidden consider hidden changesets
335 --pager TYPE when to paginate (boolean, always, auto, or never)
335 --pager TYPE when to paginate (boolean, always, auto, or never)
336 (default: auto)
336 (default: auto)
337
337
338 (use 'hg help' for the full list of commands)
338 (use 'hg help' for the full list of commands)
339
339
340 $ hg add -h
340 $ hg add -h
341 hg add [OPTION]... [FILE]...
341 hg add [OPTION]... [FILE]...
342
342
343 add the specified files on the next commit
343 add the specified files on the next commit
344
344
345 Schedule files to be version controlled and added to the repository.
345 Schedule files to be version controlled and added to the repository.
346
346
347 The files will be added to the repository at the next commit. To undo an
347 The files will be added to the repository at the next commit. To undo an
348 add before that, see 'hg forget'.
348 add before that, see 'hg forget'.
349
349
350 If no names are given, add all files to the repository (except files
350 If no names are given, add all files to the repository (except files
351 matching ".hgignore").
351 matching ".hgignore").
352
352
353 Returns 0 if all files are successfully added.
353 Returns 0 if all files are successfully added.
354
354
355 options ([+] can be repeated):
355 options ([+] can be repeated):
356
356
357 -I --include PATTERN [+] include names matching the given patterns
357 -I --include PATTERN [+] include names matching the given patterns
358 -X --exclude PATTERN [+] exclude names matching the given patterns
358 -X --exclude PATTERN [+] exclude names matching the given patterns
359 -S --subrepos recurse into subrepositories
359 -S --subrepos recurse into subrepositories
360 -n --dry-run do not perform actions, just print output
360 -n --dry-run do not perform actions, just print output
361
361
362 (some details hidden, use --verbose to show complete help)
362 (some details hidden, use --verbose to show complete help)
363
363
364 Verbose help for add
364 Verbose help for add
365
365
366 $ hg add -hv
366 $ hg add -hv
367 hg add [OPTION]... [FILE]...
367 hg add [OPTION]... [FILE]...
368
368
369 add the specified files on the next commit
369 add the specified files on the next commit
370
370
371 Schedule files to be version controlled and added to the repository.
371 Schedule files to be version controlled and added to the repository.
372
372
373 The files will be added to the repository at the next commit. To undo an
373 The files will be added to the repository at the next commit. To undo an
374 add before that, see 'hg forget'.
374 add before that, see 'hg forget'.
375
375
376 If no names are given, add all files to the repository (except files
376 If no names are given, add all files to the repository (except files
377 matching ".hgignore").
377 matching ".hgignore").
378
378
379 Examples:
379 Examples:
380
380
381 - New (unknown) files are added automatically by 'hg add':
381 - New (unknown) files are added automatically by 'hg add':
382
382
383 $ ls
383 $ ls
384 foo.c
384 foo.c
385 $ hg status
385 $ hg status
386 ? foo.c
386 ? foo.c
387 $ hg add
387 $ hg add
388 adding foo.c
388 adding foo.c
389 $ hg status
389 $ hg status
390 A foo.c
390 A foo.c
391
391
392 - Specific files to be added can be specified:
392 - Specific files to be added can be specified:
393
393
394 $ ls
394 $ ls
395 bar.c foo.c
395 bar.c foo.c
396 $ hg status
396 $ hg status
397 ? bar.c
397 ? bar.c
398 ? foo.c
398 ? foo.c
399 $ hg add bar.c
399 $ hg add bar.c
400 $ hg status
400 $ hg status
401 A bar.c
401 A bar.c
402 ? foo.c
402 ? foo.c
403
403
404 Returns 0 if all files are successfully added.
404 Returns 0 if all files are successfully added.
405
405
406 options ([+] can be repeated):
406 options ([+] can be repeated):
407
407
408 -I --include PATTERN [+] include names matching the given patterns
408 -I --include PATTERN [+] include names matching the given patterns
409 -X --exclude PATTERN [+] exclude names matching the given patterns
409 -X --exclude PATTERN [+] exclude names matching the given patterns
410 -S --subrepos recurse into subrepositories
410 -S --subrepos recurse into subrepositories
411 -n --dry-run do not perform actions, just print output
411 -n --dry-run do not perform actions, just print output
412
412
413 global options ([+] can be repeated):
413 global options ([+] can be repeated):
414
414
415 -R --repository REPO repository root directory or name of overlay bundle
415 -R --repository REPO repository root directory or name of overlay bundle
416 file
416 file
417 --cwd DIR change working directory
417 --cwd DIR change working directory
418 -y --noninteractive do not prompt, automatically pick the first choice for
418 -y --noninteractive do not prompt, automatically pick the first choice for
419 all prompts
419 all prompts
420 -q --quiet suppress output
420 -q --quiet suppress output
421 -v --verbose enable additional output
421 -v --verbose enable additional output
422 --color TYPE when to colorize (boolean, always, auto, never, or
422 --color TYPE when to colorize (boolean, always, auto, never, or
423 debug)
423 debug)
424 --config CONFIG [+] set/override config option (use 'section.name=value')
424 --config CONFIG [+] set/override config option (use 'section.name=value')
425 --debug enable debugging output
425 --debug enable debugging output
426 --debugger start debugger
426 --debugger start debugger
427 --encoding ENCODE set the charset encoding (default: ascii)
427 --encoding ENCODE set the charset encoding (default: ascii)
428 --encodingmode MODE set the charset encoding mode (default: strict)
428 --encodingmode MODE set the charset encoding mode (default: strict)
429 --traceback always print a traceback on exception
429 --traceback always print a traceback on exception
430 --time time how long the command takes
430 --time time how long the command takes
431 --profile print command execution profile
431 --profile print command execution profile
432 --version output version information and exit
432 --version output version information and exit
433 -h --help display help and exit
433 -h --help display help and exit
434 --hidden consider hidden changesets
434 --hidden consider hidden changesets
435 --pager TYPE when to paginate (boolean, always, auto, or never)
435 --pager TYPE when to paginate (boolean, always, auto, or never)
436 (default: auto)
436 (default: auto)
437
437
438 Test the textwidth config option
438 Test the textwidth config option
439
439
440 $ hg root -h --config ui.textwidth=50
440 $ hg root -h --config ui.textwidth=50
441 hg root
441 hg root
442
442
443 print the root (top) of the current working
443 print the root (top) of the current working
444 directory
444 directory
445
445
446 Print the root directory of the current
446 Print the root directory of the current
447 repository.
447 repository.
448
448
449 Returns 0 on success.
449 Returns 0 on success.
450
450
451 (some details hidden, use --verbose to show
451 (some details hidden, use --verbose to show
452 complete help)
452 complete help)
453
453
454 Test help option with version option
454 Test help option with version option
455
455
456 $ hg add -h --version
456 $ hg add -h --version
457 Mercurial Distributed SCM (version *) (glob)
457 Mercurial Distributed SCM (version *) (glob)
458 (see https://mercurial-scm.org for more information)
458 (see https://mercurial-scm.org for more information)
459
459
460 Copyright (C) 2005-* Matt Mackall and others (glob)
460 Copyright (C) 2005-* Matt Mackall and others (glob)
461 This is free software; see the source for copying conditions. There is NO
461 This is free software; see the source for copying conditions. There is NO
462 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
462 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
463
463
464 $ hg add --skjdfks
464 $ hg add --skjdfks
465 hg add: option --skjdfks not recognized
465 hg add: option --skjdfks not recognized
466 hg add [OPTION]... [FILE]...
466 hg add [OPTION]... [FILE]...
467
467
468 add the specified files on the next commit
468 add the specified files on the next commit
469
469
470 options ([+] can be repeated):
470 options ([+] can be repeated):
471
471
472 -I --include PATTERN [+] include names matching the given patterns
472 -I --include PATTERN [+] include names matching the given patterns
473 -X --exclude PATTERN [+] exclude names matching the given patterns
473 -X --exclude PATTERN [+] exclude names matching the given patterns
474 -S --subrepos recurse into subrepositories
474 -S --subrepos recurse into subrepositories
475 -n --dry-run do not perform actions, just print output
475 -n --dry-run do not perform actions, just print output
476
476
477 (use 'hg add -h' to show more help)
477 (use 'hg add -h' to show more help)
478 [255]
478 [255]
479
479
480 Test ambiguous command help
480 Test ambiguous command help
481
481
482 $ hg help ad
482 $ hg help ad
483 list of commands:
483 list of commands:
484
484
485 add add the specified files on the next commit
485 add add the specified files on the next commit
486 addremove add all new files, delete all missing files
486 addremove add all new files, delete all missing files
487
487
488 (use 'hg help -v ad' to show built-in aliases and global options)
488 (use 'hg help -v ad' to show built-in aliases and global options)
489
489
490 Test command without options
490 Test command without options
491
491
492 $ hg help verify
492 $ hg help verify
493 hg verify
493 hg verify
494
494
495 verify the integrity of the repository
495 verify the integrity of the repository
496
496
497 Verify the integrity of the current repository.
497 Verify the integrity of the current repository.
498
498
499 This will perform an extensive check of the repository's integrity,
499 This will perform an extensive check of the repository's integrity,
500 validating the hashes and checksums of each entry in the changelog,
500 validating the hashes and checksums of each entry in the changelog,
501 manifest, and tracked files, as well as the integrity of their crosslinks
501 manifest, and tracked files, as well as the integrity of their crosslinks
502 and indices.
502 and indices.
503
503
504 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
504 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
505 information about recovery from corruption of the repository.
505 information about recovery from corruption of the repository.
506
506
507 Returns 0 on success, 1 if errors are encountered.
507 Returns 0 on success, 1 if errors are encountered.
508
508
509 (some details hidden, use --verbose to show complete help)
509 (some details hidden, use --verbose to show complete help)
510
510
511 $ hg help diff
511 $ hg help diff
512 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
512 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
513
513
514 diff repository (or selected files)
514 diff repository (or selected files)
515
515
516 Show differences between revisions for the specified files.
516 Show differences between revisions for the specified files.
517
517
518 Differences between files are shown using the unified diff format.
518 Differences between files are shown using the unified diff format.
519
519
520 Note:
520 Note:
521 'hg diff' may generate unexpected results for merges, as it will
521 'hg diff' may generate unexpected results for merges, as it will
522 default to comparing against the working directory's first parent
522 default to comparing against the working directory's first parent
523 changeset if no revisions are specified.
523 changeset if no revisions are specified.
524
524
525 When two revision arguments are given, then changes are shown between
525 When two revision arguments are given, then changes are shown between
526 those revisions. If only one revision is specified then that revision is
526 those revisions. If only one revision is specified then that revision is
527 compared to the working directory, and, when no revisions are specified,
527 compared to the working directory, and, when no revisions are specified,
528 the working directory files are compared to its first parent.
528 the working directory files are compared to its first parent.
529
529
530 Alternatively you can specify -c/--change with a revision to see the
530 Alternatively you can specify -c/--change with a revision to see the
531 changes in that changeset relative to its first parent.
531 changes in that changeset relative to its first parent.
532
532
533 Without the -a/--text option, diff will avoid generating diffs of files it
533 Without the -a/--text option, diff will avoid generating diffs of files it
534 detects as binary. With -a, diff will generate a diff anyway, probably
534 detects as binary. With -a, diff will generate a diff anyway, probably
535 with undesirable results.
535 with undesirable results.
536
536
537 Use the -g/--git option to generate diffs in the git extended diff format.
537 Use the -g/--git option to generate diffs in the git extended diff format.
538 For more information, read 'hg help diffs'.
538 For more information, read 'hg help diffs'.
539
539
540 Returns 0 on success.
540 Returns 0 on success.
541
541
542 options ([+] can be repeated):
542 options ([+] can be repeated):
543
543
544 -r --rev REV [+] revision
544 -r --rev REV [+] revision
545 -c --change REV change made by revision
545 -c --change REV change made by revision
546 -a --text treat all files as text
546 -a --text treat all files as text
547 -g --git use git extended diff format
547 -g --git use git extended diff format
548 --binary generate binary diffs in git mode (default)
548 --binary generate binary diffs in git mode (default)
549 --nodates omit dates from diff headers
549 --nodates omit dates from diff headers
550 --noprefix omit a/ and b/ prefixes from filenames
550 --noprefix omit a/ and b/ prefixes from filenames
551 -p --show-function show which function each change is in
551 -p --show-function show which function each change is in
552 --reverse produce a diff that undoes the changes
552 --reverse produce a diff that undoes the changes
553 -w --ignore-all-space ignore white space when comparing lines
553 -w --ignore-all-space ignore white space when comparing lines
554 -b --ignore-space-change ignore changes in the amount of white space
554 -b --ignore-space-change ignore changes in the amount of white space
555 -B --ignore-blank-lines ignore changes whose lines are all blank
555 -B --ignore-blank-lines ignore changes whose lines are all blank
556 -U --unified NUM number of lines of context to show
556 -U --unified NUM number of lines of context to show
557 --stat output diffstat-style summary of changes
557 --stat output diffstat-style summary of changes
558 --root DIR produce diffs relative to subdirectory
558 --root DIR produce diffs relative to subdirectory
559 -I --include PATTERN [+] include names matching the given patterns
559 -I --include PATTERN [+] include names matching the given patterns
560 -X --exclude PATTERN [+] exclude names matching the given patterns
560 -X --exclude PATTERN [+] exclude names matching the given patterns
561 -S --subrepos recurse into subrepositories
561 -S --subrepos recurse into subrepositories
562
562
563 (some details hidden, use --verbose to show complete help)
563 (some details hidden, use --verbose to show complete help)
564
564
565 $ hg help status
565 $ hg help status
566 hg status [OPTION]... [FILE]...
566 hg status [OPTION]... [FILE]...
567
567
568 aliases: st
568 aliases: st
569
569
570 show changed files in the working directory
570 show changed files in the working directory
571
571
572 Show status of files in the repository. If names are given, only files
572 Show status of files in the repository. If names are given, only files
573 that match are shown. Files that are clean or ignored or the source of a
573 that match are shown. Files that are clean or ignored or the source of a
574 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
574 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
575 -C/--copies or -A/--all are given. Unless options described with "show
575 -C/--copies or -A/--all are given. Unless options described with "show
576 only ..." are given, the options -mardu are used.
576 only ..." are given, the options -mardu are used.
577
577
578 Option -q/--quiet hides untracked (unknown and ignored) files unless
578 Option -q/--quiet hides untracked (unknown and ignored) files unless
579 explicitly requested with -u/--unknown or -i/--ignored.
579 explicitly requested with -u/--unknown or -i/--ignored.
580
580
581 Note:
581 Note:
582 'hg status' may appear to disagree with diff if permissions have
582 'hg status' may appear to disagree with diff if permissions have
583 changed or a merge has occurred. The standard diff format does not
583 changed or a merge has occurred. The standard diff format does not
584 report permission changes and diff only reports changes relative to one
584 report permission changes and diff only reports changes relative to one
585 merge parent.
585 merge parent.
586
586
587 If one revision is given, it is used as the base revision. If two
587 If one revision is given, it is used as the base revision. If two
588 revisions are given, the differences between them are shown. The --change
588 revisions are given, the differences between them are shown. The --change
589 option can also be used as a shortcut to list the changed files of a
589 option can also be used as a shortcut to list the changed files of a
590 revision from its first parent.
590 revision from its first parent.
591
591
592 The codes used to show the status of files are:
592 The codes used to show the status of files are:
593
593
594 M = modified
594 M = modified
595 A = added
595 A = added
596 R = removed
596 R = removed
597 C = clean
597 C = clean
598 ! = missing (deleted by non-hg command, but still tracked)
598 ! = missing (deleted by non-hg command, but still tracked)
599 ? = not tracked
599 ? = not tracked
600 I = ignored
600 I = ignored
601 = origin of the previous file (with --copies)
601 = origin of the previous file (with --copies)
602
602
603 Returns 0 on success.
603 Returns 0 on success.
604
604
605 options ([+] can be repeated):
605 options ([+] can be repeated):
606
606
607 -A --all show status of all files
607 -A --all show status of all files
608 -m --modified show only modified files
608 -m --modified show only modified files
609 -a --added show only added files
609 -a --added show only added files
610 -r --removed show only removed files
610 -r --removed show only removed files
611 -d --deleted show only deleted (but tracked) files
611 -d --deleted show only deleted (but tracked) files
612 -c --clean show only files without changes
612 -c --clean show only files without changes
613 -u --unknown show only unknown (not tracked) files
613 -u --unknown show only unknown (not tracked) files
614 -i --ignored show only ignored files
614 -i --ignored show only ignored files
615 -n --no-status hide status prefix
615 -n --no-status hide status prefix
616 -C --copies show source of copied files
616 -C --copies show source of copied files
617 -0 --print0 end filenames with NUL, for use with xargs
617 -0 --print0 end filenames with NUL, for use with xargs
618 --rev REV [+] show difference from revision
618 --rev REV [+] show difference from revision
619 --change REV list the changed files of a revision
619 --change REV list the changed files of a revision
620 -I --include PATTERN [+] include names matching the given patterns
620 -I --include PATTERN [+] include names matching the given patterns
621 -X --exclude PATTERN [+] exclude names matching the given patterns
621 -X --exclude PATTERN [+] exclude names matching the given patterns
622 -S --subrepos recurse into subrepositories
622 -S --subrepos recurse into subrepositories
623
623
624 (some details hidden, use --verbose to show complete help)
624 (some details hidden, use --verbose to show complete help)
625
625
626 $ hg -q help status
626 $ hg -q help status
627 hg status [OPTION]... [FILE]...
627 hg status [OPTION]... [FILE]...
628
628
629 show changed files in the working directory
629 show changed files in the working directory
630
630
631 $ hg help foo
631 $ hg help foo
632 abort: no such help topic: foo
632 abort: no such help topic: foo
633 (try 'hg help --keyword foo')
633 (try 'hg help --keyword foo')
634 [255]
634 [255]
635
635
636 $ hg skjdfks
636 $ hg skjdfks
637 hg: unknown command 'skjdfks'
637 hg: unknown command 'skjdfks'
638 Mercurial Distributed SCM
638 Mercurial Distributed SCM
639
639
640 basic commands:
640 basic commands:
641
641
642 add add the specified files on the next commit
642 add add the specified files on the next commit
643 annotate show changeset information by line for each file
643 annotate show changeset information by line for each file
644 clone make a copy of an existing repository
644 clone make a copy of an existing repository
645 commit commit the specified files or all outstanding changes
645 commit commit the specified files or all outstanding changes
646 diff diff repository (or selected files)
646 diff diff repository (or selected files)
647 export dump the header and diffs for one or more changesets
647 export dump the header and diffs for one or more changesets
648 forget forget the specified files on the next commit
648 forget forget the specified files on the next commit
649 init create a new repository in the given directory
649 init create a new repository in the given directory
650 log show revision history of entire repository or files
650 log show revision history of entire repository or files
651 merge merge another revision into working directory
651 merge merge another revision into working directory
652 pull pull changes from the specified source
652 pull pull changes from the specified source
653 push push changes to the specified destination
653 push push changes to the specified destination
654 remove remove the specified files on the next commit
654 remove remove the specified files on the next commit
655 serve start stand-alone webserver
655 serve start stand-alone webserver
656 status show changed files in the working directory
656 status show changed files in the working directory
657 summary summarize working directory state
657 summary summarize working directory state
658 update update working directory (or switch revisions)
658 update update working directory (or switch revisions)
659
659
660 (use 'hg help' for the full list of commands or 'hg -v' for details)
660 (use 'hg help' for the full list of commands or 'hg -v' for details)
661 [255]
661 [255]
662
662
663 Typoed command gives suggestion
663 Typoed command gives suggestion
664 $ hg puls
664 $ hg puls
665 hg: unknown command 'puls'
665 hg: unknown command 'puls'
666 (did you mean one of pull, push?)
666 (did you mean one of pull, push?)
667 [255]
667 [255]
668
668
669 Not enabled extension gets suggested
669 Not enabled extension gets suggested
670
670
671 $ hg rebase
671 $ hg rebase
672 hg: unknown command 'rebase'
672 hg: unknown command 'rebase'
673 'rebase' is provided by the following extension:
673 'rebase' is provided by the following extension:
674
674
675 rebase command to move sets of revisions to a different ancestor
675 rebase command to move sets of revisions to a different ancestor
676
676
677 (use 'hg help extensions' for information on enabling extensions)
677 (use 'hg help extensions' for information on enabling extensions)
678 [255]
678 [255]
679
679
680 Disabled extension gets suggested
680 Disabled extension gets suggested
681 $ hg --config extensions.rebase=! rebase
681 $ hg --config extensions.rebase=! rebase
682 hg: unknown command 'rebase'
682 hg: unknown command 'rebase'
683 'rebase' is provided by the following extension:
683 'rebase' is provided by the following extension:
684
684
685 rebase command to move sets of revisions to a different ancestor
685 rebase command to move sets of revisions to a different ancestor
686
686
687 (use 'hg help extensions' for information on enabling extensions)
687 (use 'hg help extensions' for information on enabling extensions)
688 [255]
688 [255]
689
689
690 Make sure that we don't run afoul of the help system thinking that
690 Make sure that we don't run afoul of the help system thinking that
691 this is a section and erroring out weirdly.
691 this is a section and erroring out weirdly.
692
692
693 $ hg .log
693 $ hg .log
694 hg: unknown command '.log'
694 hg: unknown command '.log'
695 (did you mean log?)
695 (did you mean log?)
696 [255]
696 [255]
697
697
698 $ hg log.
698 $ hg log.
699 hg: unknown command 'log.'
699 hg: unknown command 'log.'
700 (did you mean log?)
700 (did you mean log?)
701 [255]
701 [255]
702 $ hg pu.lh
702 $ hg pu.lh
703 hg: unknown command 'pu.lh'
703 hg: unknown command 'pu.lh'
704 (did you mean one of pull, push?)
704 (did you mean one of pull, push?)
705 [255]
705 [255]
706
706
707 $ cat > helpext.py <<EOF
707 $ cat > helpext.py <<EOF
708 > import os
708 > import os
709 > from mercurial import commands, registrar
709 > from mercurial import commands, registrar
710 >
710 >
711 > cmdtable = {}
711 > cmdtable = {}
712 > command = registrar.command(cmdtable)
712 > command = registrar.command(cmdtable)
713 >
713 >
714 > @command(b'nohelp',
714 > @command(b'nohelp',
715 > [(b'', b'longdesc', 3, b'x'*90),
715 > [(b'', b'longdesc', 3, b'x'*90),
716 > (b'n', b'', None, b'normal desc'),
716 > (b'n', b'', None, b'normal desc'),
717 > (b'', b'newline', b'', b'line1\nline2')],
717 > (b'', b'newline', b'', b'line1\nline2')],
718 > b'hg nohelp',
718 > b'hg nohelp',
719 > norepo=True)
719 > norepo=True)
720 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
720 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
721 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
721 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
722 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
722 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
723 > def nohelp(ui, *args, **kwargs):
723 > def nohelp(ui, *args, **kwargs):
724 > pass
724 > pass
725 >
725 >
726 > def uisetup(ui):
726 > def uisetup(ui):
727 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
727 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
728 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
728 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
729 >
729 >
730 > EOF
730 > EOF
731 $ echo '[extensions]' >> $HGRCPATH
731 $ echo '[extensions]' >> $HGRCPATH
732 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
732 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
733
733
734 Test for aliases
734 Test for aliases
735
735
736 $ hg help hgalias
736 $ hg help hgalias
737 hg hgalias [--remote]
737 hg hgalias [--remote]
738
738
739 alias for: hg summary
739 alias for: hg summary
740
740
741 summarize working directory state
741 summarize working directory state
742
742
743 This generates a brief summary of the working directory state, including
743 This generates a brief summary of the working directory state, including
744 parents, branch, commit status, phase and available updates.
744 parents, branch, commit status, phase and available updates.
745
745
746 With the --remote option, this will check the default paths for incoming
746 With the --remote option, this will check the default paths for incoming
747 and outgoing changes. This can be time-consuming.
747 and outgoing changes. This can be time-consuming.
748
748
749 Returns 0 on success.
749 Returns 0 on success.
750
750
751 defined by: helpext
751 defined by: helpext
752
752
753 options:
753 options:
754
754
755 --remote check for push and pull
755 --remote check for push and pull
756
756
757 (some details hidden, use --verbose to show complete help)
757 (some details hidden, use --verbose to show complete help)
758
758
759 $ hg help shellalias
759 $ hg help shellalias
760 hg shellalias
760 hg shellalias
761
761
762 shell alias for:
762 shell alias for:
763
763
764 echo hi
764 echo hi
765
765
766 defined by: helpext
766 defined by: helpext
767
767
768 (some details hidden, use --verbose to show complete help)
768 (some details hidden, use --verbose to show complete help)
769
769
770 Test command with no help text
770 Test command with no help text
771
771
772 $ hg help nohelp
772 $ hg help nohelp
773 hg nohelp
773 hg nohelp
774
774
775 (no help text available)
775 (no help text available)
776
776
777 options:
777 options:
778
778
779 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
779 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
780 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
780 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
781 -n -- normal desc
781 -n -- normal desc
782 --newline VALUE line1 line2
782 --newline VALUE line1 line2
783
783
784 (some details hidden, use --verbose to show complete help)
784 (some details hidden, use --verbose to show complete help)
785
785
786 $ hg help -k nohelp
786 $ hg help -k nohelp
787 Commands:
787 Commands:
788
788
789 nohelp hg nohelp
789 nohelp hg nohelp
790
790
791 Extension Commands:
791 Extension Commands:
792
792
793 nohelp (no help text available)
793 nohelp (no help text available)
794
794
795 Test that default list of commands omits extension commands
795 Test that default list of commands omits extension commands
796
796
797 $ hg help
797 $ hg help
798 Mercurial Distributed SCM
798 Mercurial Distributed SCM
799
799
800 list of commands:
800 list of commands:
801
801
802 add add the specified files on the next commit
802 add add the specified files on the next commit
803 addremove add all new files, delete all missing files
803 addremove add all new files, delete all missing files
804 annotate show changeset information by line for each file
804 annotate show changeset information by line for each file
805 archive create an unversioned archive of a repository revision
805 archive create an unversioned archive of a repository revision
806 backout reverse effect of earlier changeset
806 backout reverse effect of earlier changeset
807 bisect subdivision search of changesets
807 bisect subdivision search of changesets
808 bookmarks create a new bookmark or list existing bookmarks
808 bookmarks create a new bookmark or list existing bookmarks
809 branch set or show the current branch name
809 branch set or show the current branch name
810 branches list repository named branches
810 branches list repository named branches
811 bundle create a bundle file
811 bundle create a bundle file
812 cat output the current or given revision of files
812 cat output the current or given revision of files
813 clone make a copy of an existing repository
813 clone make a copy of an existing repository
814 commit commit the specified files or all outstanding changes
814 commit commit the specified files or all outstanding changes
815 config show combined config settings from all hgrc files
815 config show combined config settings from all hgrc files
816 copy mark files as copied for the next commit
816 copy mark files as copied for the next commit
817 diff diff repository (or selected files)
817 diff diff repository (or selected files)
818 export dump the header and diffs for one or more changesets
818 export dump the header and diffs for one or more changesets
819 files list tracked files
819 files list tracked files
820 forget forget the specified files on the next commit
820 forget forget the specified files on the next commit
821 graft copy changes from other branches onto the current branch
821 graft copy changes from other branches onto the current branch
822 grep search revision history for a pattern in specified files
822 grep search revision history for a pattern in specified files
823 heads show branch heads
823 heads show branch heads
824 help show help for a given topic or a help overview
824 help show help for a given topic or a help overview
825 identify identify the working directory or specified revision
825 identify identify the working directory or specified revision
826 import import an ordered set of patches
826 import import an ordered set of patches
827 incoming show new changesets found in source
827 incoming show new changesets found in source
828 init create a new repository in the given directory
828 init create a new repository in the given directory
829 log show revision history of entire repository or files
829 log show revision history of entire repository or files
830 manifest output the current or given revision of the project manifest
830 manifest output the current or given revision of the project manifest
831 merge merge another revision into working directory
831 merge merge another revision into working directory
832 outgoing show changesets not found in the destination
832 outgoing show changesets not found in the destination
833 paths show aliases for remote repositories
833 paths show aliases for remote repositories
834 phase set or show the current phase name
834 phase set or show the current phase name
835 pull pull changes from the specified source
835 pull pull changes from the specified source
836 push push changes to the specified destination
836 push push changes to the specified destination
837 recover roll back an interrupted transaction
837 recover roll back an interrupted transaction
838 remove remove the specified files on the next commit
838 remove remove the specified files on the next commit
839 rename rename files; equivalent of copy + remove
839 rename rename files; equivalent of copy + remove
840 resolve redo merges or set/view the merge status of files
840 resolve redo merges or set/view the merge status of files
841 revert restore files to their checkout state
841 revert restore files to their checkout state
842 root print the root (top) of the current working directory
842 root print the root (top) of the current working directory
843 serve start stand-alone webserver
843 serve start stand-alone webserver
844 status show changed files in the working directory
844 status show changed files in the working directory
845 summary summarize working directory state
845 summary summarize working directory state
846 tag add one or more tags for the current or given revision
846 tag add one or more tags for the current or given revision
847 tags list repository tags
847 tags list repository tags
848 unbundle apply one or more bundle files
848 unbundle apply one or more bundle files
849 update update working directory (or switch revisions)
849 update update working directory (or switch revisions)
850 verify verify the integrity of the repository
850 verify verify the integrity of the repository
851 version output version and copyright information
851 version output version and copyright information
852
852
853 enabled extensions:
853 enabled extensions:
854
854
855 helpext (no help text available)
855 helpext (no help text available)
856
856
857 additional help topics:
857 additional help topics:
858
858
859 bundlespec Bundle File Formats
859 bundlespec Bundle File Formats
860 color Colorizing Outputs
860 color Colorizing Outputs
861 config Configuration Files
861 config Configuration Files
862 dates Date Formats
862 dates Date Formats
863 diffs Diff Formats
863 diffs Diff Formats
864 environment Environment Variables
864 environment Environment Variables
865 extensions Using Additional Features
865 extensions Using Additional Features
866 filesets Specifying File Sets
866 filesets Specifying File Sets
867 glossary Glossary
867 glossary Glossary
868 hgignore Syntax for Mercurial Ignore Files
868 hgignore Syntax for Mercurial Ignore Files
869 hgweb Configuring hgweb
869 hgweb Configuring hgweb
870 internals Technical implementation topics
870 internals Technical implementation topics
871 merge-tools Merge Tools
871 merge-tools Merge Tools
872 pager Pager Support
872 pager Pager Support
873 patterns File Name Patterns
873 patterns File Name Patterns
874 phases Working with Phases
874 phases Working with Phases
875 revisions Specifying Revisions
875 revisions Specifying Revisions
876 scripting Using Mercurial from scripts and automation
876 scripting Using Mercurial from scripts and automation
877 subrepos Subrepositories
877 subrepos Subrepositories
878 templating Template Usage
878 templating Template Usage
879 urls URL Paths
879 urls URL Paths
880
880
881 (use 'hg help -v' to show built-in aliases and global options)
881 (use 'hg help -v' to show built-in aliases and global options)
882
882
883
883
884 Test list of internal help commands
884 Test list of internal help commands
885
885
886 $ hg help debug
886 $ hg help debug
887 debug commands (internal and unsupported):
887 debug commands (internal and unsupported):
888
888
889 debugancestor
889 debugancestor
890 find the ancestor revision of two revisions in a given index
890 find the ancestor revision of two revisions in a given index
891 debugapplystreamclonebundle
891 debugapplystreamclonebundle
892 apply a stream clone bundle file
892 apply a stream clone bundle file
893 debugbuilddag
893 debugbuilddag
894 builds a repo with a given DAG from scratch in the current
894 builds a repo with a given DAG from scratch in the current
895 empty repo
895 empty repo
896 debugbundle lists the contents of a bundle
896 debugbundle lists the contents of a bundle
897 debugcheckstate
897 debugcheckstate
898 validate the correctness of the current dirstate
898 validate the correctness of the current dirstate
899 debugcolor show available color, effects or style
899 debugcolor show available color, effects or style
900 debugcommands
900 debugcommands
901 list all available commands and options
901 list all available commands and options
902 debugcomplete
902 debugcomplete
903 returns the completion list associated with the given command
903 returns the completion list associated with the given command
904 debugcreatestreamclonebundle
904 debugcreatestreamclonebundle
905 create a stream clone bundle file
905 create a stream clone bundle file
906 debugdag format the changelog or an index DAG as a concise textual
906 debugdag format the changelog or an index DAG as a concise textual
907 description
907 description
908 debugdata dump the contents of a data file revision
908 debugdata dump the contents of a data file revision
909 debugdate parse and display a date
909 debugdate parse and display a date
910 debugdeltachain
910 debugdeltachain
911 dump information about delta chains in a revlog
911 dump information about delta chains in a revlog
912 debugdirstate
912 debugdirstate
913 show the contents of the current dirstate
913 show the contents of the current dirstate
914 debugdiscovery
914 debugdiscovery
915 runs the changeset discovery protocol in isolation
915 runs the changeset discovery protocol in isolation
916 debugextensions
916 debugextensions
917 show information about active extensions
917 show information about active extensions
918 debugfileset parse and apply a fileset specification
918 debugfileset parse and apply a fileset specification
919 debugfsinfo show information detected about current filesystem
919 debugfsinfo show information detected about current filesystem
920 debuggetbundle
920 debuggetbundle
921 retrieves a bundle from a repo
921 retrieves a bundle from a repo
922 debugignore display the combined ignore pattern and information about
922 debugignore display the combined ignore pattern and information about
923 ignored files
923 ignored files
924 debugindex dump the contents of an index file
924 debugindex dump the contents of an index file
925 debugindexdot
925 debugindexdot
926 dump an index DAG as a graphviz dot file
926 dump an index DAG as a graphviz dot file
927 debuginstall test Mercurial installation
927 debuginstall test Mercurial installation
928 debugknown test whether node ids are known to a repo
928 debugknown test whether node ids are known to a repo
929 debuglocks show or modify state of locks
929 debuglocks show or modify state of locks
930 debugmergestate
930 debugmergestate
931 print merge state
931 print merge state
932 debugnamecomplete
932 debugnamecomplete
933 complete "names" - tags, open branch names, bookmark names
933 complete "names" - tags, open branch names, bookmark names
934 debugobsolete
934 debugobsolete
935 create arbitrary obsolete marker
935 create arbitrary obsolete marker
936 debugoptADV (no help text available)
936 debugoptADV (no help text available)
937 debugoptDEP (no help text available)
937 debugoptDEP (no help text available)
938 debugoptEXP (no help text available)
938 debugoptEXP (no help text available)
939 debugpathcomplete
939 debugpathcomplete
940 complete part or all of a tracked path
940 complete part or all of a tracked path
941 debugpickmergetool
941 debugpickmergetool
942 examine which merge tool is chosen for specified file
942 examine which merge tool is chosen for specified file
943 debugpushkey access the pushkey key/value protocol
943 debugpushkey access the pushkey key/value protocol
944 debugpvec (no help text available)
944 debugpvec (no help text available)
945 debugrebuilddirstate
945 debugrebuilddirstate
946 rebuild the dirstate as it would look like for the given
946 rebuild the dirstate as it would look like for the given
947 revision
947 revision
948 debugrebuildfncache
948 debugrebuildfncache
949 rebuild the fncache file
949 rebuild the fncache file
950 debugrename dump rename information
950 debugrename dump rename information
951 debugrevlog show data and statistics about a revlog
951 debugrevlog show data and statistics about a revlog
952 debugrevspec parse and apply a revision specification
952 debugrevspec parse and apply a revision specification
953 debugsetparents
953 debugsetparents
954 manually set the parents of the current working directory
954 manually set the parents of the current working directory
955 debugssl test a secure connection to a server
955 debugssl test a secure connection to a server
956 debugsub (no help text available)
956 debugsub (no help text available)
957 debugsuccessorssets
957 debugsuccessorssets
958 show set of successors for revision
958 show set of successors for revision
959 debugtemplate
959 debugtemplate
960 parse and apply a template
960 parse and apply a template
961 debugupdatecaches
961 debugupdatecaches
962 warm all known caches in the repository
962 warm all known caches in the repository
963 debugupgraderepo
963 debugupgraderepo
964 upgrade a repository to use different features
964 upgrade a repository to use different features
965 debugwalk show how files match on given patterns
965 debugwalk show how files match on given patterns
966 debugwireargs
966 debugwireargs
967 (no help text available)
967 (no help text available)
968
968
969 (use 'hg help -v debug' to show built-in aliases and global options)
969 (use 'hg help -v debug' to show built-in aliases and global options)
970
970
971 internals topic renders index of available sub-topics
971 internals topic renders index of available sub-topics
972
972
973 $ hg help internals
973 $ hg help internals
974 Technical implementation topics
974 Technical implementation topics
975 """""""""""""""""""""""""""""""
975 """""""""""""""""""""""""""""""
976
976
977 To access a subtopic, use "hg help internals.{subtopic-name}"
977 To access a subtopic, use "hg help internals.{subtopic-name}"
978
978
979 bundles Bundles
979 bundles Bundles
980 censor Censor
980 censor Censor
981 changegroups Changegroups
981 changegroups Changegroups
982 requirements Repository Requirements
982 requirements Repository Requirements
983 revlogs Revision Logs
983 revlogs Revision Logs
984 wireprotocol Wire Protocol
984 wireprotocol Wire Protocol
985
985
986 sub-topics can be accessed
986 sub-topics can be accessed
987
987
988 $ hg help internals.changegroups
988 $ hg help internals.changegroups
989 Changegroups
989 Changegroups
990 """"""""""""
990 """"""""""""
991
991
992 Changegroups are representations of repository revlog data, specifically
992 Changegroups are representations of repository revlog data, specifically
993 the changelog data, root/flat manifest data, treemanifest data, and
993 the changelog data, root/flat manifest data, treemanifest data, and
994 filelogs.
994 filelogs.
995
995
996 There are 3 versions of changegroups: "1", "2", and "3". From a high-
996 There are 3 versions of changegroups: "1", "2", and "3". From a high-
997 level, versions "1" and "2" are almost exactly the same, with the only
997 level, versions "1" and "2" are almost exactly the same, with the only
998 difference being an additional item in the *delta header*. Version "3"
998 difference being an additional item in the *delta header*. Version "3"
999 adds support for revlog flags in the *delta header* and optionally
999 adds support for revlog flags in the *delta header* and optionally
1000 exchanging treemanifests (enabled by setting an option on the
1000 exchanging treemanifests (enabled by setting an option on the
1001 "changegroup" part in the bundle2).
1001 "changegroup" part in the bundle2).
1002
1002
1003 Changegroups when not exchanging treemanifests consist of 3 logical
1003 Changegroups when not exchanging treemanifests consist of 3 logical
1004 segments:
1004 segments:
1005
1005
1006 +---------------------------------+
1006 +---------------------------------+
1007 | | | |
1007 | | | |
1008 | changeset | manifest | filelogs |
1008 | changeset | manifest | filelogs |
1009 | | | |
1009 | | | |
1010 | | | |
1010 | | | |
1011 +---------------------------------+
1011 +---------------------------------+
1012
1012
1013 When exchanging treemanifests, there are 4 logical segments:
1013 When exchanging treemanifests, there are 4 logical segments:
1014
1014
1015 +-------------------------------------------------+
1015 +-------------------------------------------------+
1016 | | | | |
1016 | | | | |
1017 | changeset | root | treemanifests | filelogs |
1017 | changeset | root | treemanifests | filelogs |
1018 | | manifest | | |
1018 | | manifest | | |
1019 | | | | |
1019 | | | | |
1020 +-------------------------------------------------+
1020 +-------------------------------------------------+
1021
1021
1022 The principle building block of each segment is a *chunk*. A *chunk* is a
1022 The principle building block of each segment is a *chunk*. A *chunk* is a
1023 framed piece of data:
1023 framed piece of data:
1024
1024
1025 +---------------------------------------+
1025 +---------------------------------------+
1026 | | |
1026 | | |
1027 | length | data |
1027 | length | data |
1028 | (4 bytes) | (<length - 4> bytes) |
1028 | (4 bytes) | (<length - 4> bytes) |
1029 | | |
1029 | | |
1030 +---------------------------------------+
1030 +---------------------------------------+
1031
1031
1032 All integers are big-endian signed integers. Each chunk starts with a
1032 All integers are big-endian signed integers. Each chunk starts with a
1033 32-bit integer indicating the length of the entire chunk (including the
1033 32-bit integer indicating the length of the entire chunk (including the
1034 length field itself).
1034 length field itself).
1035
1035
1036 There is a special case chunk that has a value of 0 for the length
1036 There is a special case chunk that has a value of 0 for the length
1037 ("0x00000000"). We call this an *empty chunk*.
1037 ("0x00000000"). We call this an *empty chunk*.
1038
1038
1039 Delta Groups
1039 Delta Groups
1040 ============
1040 ============
1041
1041
1042 A *delta group* expresses the content of a revlog as a series of deltas,
1042 A *delta group* expresses the content of a revlog as a series of deltas,
1043 or patches against previous revisions.
1043 or patches against previous revisions.
1044
1044
1045 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1045 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1046 to signal the end of the delta group:
1046 to signal the end of the delta group:
1047
1047
1048 +------------------------------------------------------------------------+
1048 +------------------------------------------------------------------------+
1049 | | | | | |
1049 | | | | | |
1050 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1050 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1051 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1051 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1052 | | | | | |
1052 | | | | | |
1053 +------------------------------------------------------------------------+
1053 +------------------------------------------------------------------------+
1054
1054
1055 Each *chunk*'s data consists of the following:
1055 Each *chunk*'s data consists of the following:
1056
1056
1057 +---------------------------------------+
1057 +---------------------------------------+
1058 | | |
1058 | | |
1059 | delta header | delta data |
1059 | delta header | delta data |
1060 | (various by version) | (various) |
1060 | (various by version) | (various) |
1061 | | |
1061 | | |
1062 +---------------------------------------+
1062 +---------------------------------------+
1063
1063
1064 The *delta data* is a series of *delta*s that describe a diff from an
1064 The *delta data* is a series of *delta*s that describe a diff from an
1065 existing entry (either that the recipient already has, or previously
1065 existing entry (either that the recipient already has, or previously
1066 specified in the bundle/changegroup).
1066 specified in the bundle/changegroup).
1067
1067
1068 The *delta header* is different between versions "1", "2", and "3" of the
1068 The *delta header* is different between versions "1", "2", and "3" of the
1069 changegroup format.
1069 changegroup format.
1070
1070
1071 Version 1 (headerlen=80):
1071 Version 1 (headerlen=80):
1072
1072
1073 +------------------------------------------------------+
1073 +------------------------------------------------------+
1074 | | | | |
1074 | | | | |
1075 | node | p1 node | p2 node | link node |
1075 | node | p1 node | p2 node | link node |
1076 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1076 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1077 | | | | |
1077 | | | | |
1078 +------------------------------------------------------+
1078 +------------------------------------------------------+
1079
1079
1080 Version 2 (headerlen=100):
1080 Version 2 (headerlen=100):
1081
1081
1082 +------------------------------------------------------------------+
1082 +------------------------------------------------------------------+
1083 | | | | | |
1083 | | | | | |
1084 | node | p1 node | p2 node | base node | link node |
1084 | node | p1 node | p2 node | base node | link node |
1085 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1085 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1086 | | | | | |
1086 | | | | | |
1087 +------------------------------------------------------------------+
1087 +------------------------------------------------------------------+
1088
1088
1089 Version 3 (headerlen=102):
1089 Version 3 (headerlen=102):
1090
1090
1091 +------------------------------------------------------------------------------+
1091 +------------------------------------------------------------------------------+
1092 | | | | | | |
1092 | | | | | | |
1093 | node | p1 node | p2 node | base node | link node | flags |
1093 | node | p1 node | p2 node | base node | link node | flags |
1094 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1094 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1095 | | | | | | |
1095 | | | | | | |
1096 +------------------------------------------------------------------------------+
1096 +------------------------------------------------------------------------------+
1097
1097
1098 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1098 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1099 contain a series of *delta*s, densely packed (no separators). These deltas
1099 contain a series of *delta*s, densely packed (no separators). These deltas
1100 describe a diff from an existing entry (either that the recipient already
1100 describe a diff from an existing entry (either that the recipient already
1101 has, or previously specified in the bundle/changegroup). The format is
1101 has, or previously specified in the bundle/changegroup). The format is
1102 described more fully in "hg help internals.bdiff", but briefly:
1102 described more fully in "hg help internals.bdiff", but briefly:
1103
1103
1104 +---------------------------------------------------------------+
1104 +---------------------------------------------------------------+
1105 | | | | |
1105 | | | | |
1106 | start offset | end offset | new length | content |
1106 | start offset | end offset | new length | content |
1107 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1107 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1108 | | | | |
1108 | | | | |
1109 +---------------------------------------------------------------+
1109 +---------------------------------------------------------------+
1110
1110
1111 Please note that the length field in the delta data does *not* include
1111 Please note that the length field in the delta data does *not* include
1112 itself.
1112 itself.
1113
1113
1114 In version 1, the delta is always applied against the previous node from
1114 In version 1, the delta is always applied against the previous node from
1115 the changegroup or the first parent if this is the first entry in the
1115 the changegroup or the first parent if this is the first entry in the
1116 changegroup.
1116 changegroup.
1117
1117
1118 In version 2 and up, the delta base node is encoded in the entry in the
1118 In version 2 and up, the delta base node is encoded in the entry in the
1119 changegroup. This allows the delta to be expressed against any parent,
1119 changegroup. This allows the delta to be expressed against any parent,
1120 which can result in smaller deltas and more efficient encoding of data.
1120 which can result in smaller deltas and more efficient encoding of data.
1121
1121
1122 Changeset Segment
1122 Changeset Segment
1123 =================
1123 =================
1124
1124
1125 The *changeset segment* consists of a single *delta group* holding
1125 The *changeset segment* consists of a single *delta group* holding
1126 changelog data. The *empty chunk* at the end of the *delta group* denotes
1126 changelog data. The *empty chunk* at the end of the *delta group* denotes
1127 the boundary to the *manifest segment*.
1127 the boundary to the *manifest segment*.
1128
1128
1129 Manifest Segment
1129 Manifest Segment
1130 ================
1130 ================
1131
1131
1132 The *manifest segment* consists of a single *delta group* holding manifest
1132 The *manifest segment* consists of a single *delta group* holding manifest
1133 data. If treemanifests are in use, it contains only the manifest for the
1133 data. If treemanifests are in use, it contains only the manifest for the
1134 root directory of the repository. Otherwise, it contains the entire
1134 root directory of the repository. Otherwise, it contains the entire
1135 manifest data. The *empty chunk* at the end of the *delta group* denotes
1135 manifest data. The *empty chunk* at the end of the *delta group* denotes
1136 the boundary to the next segment (either the *treemanifests segment* or
1136 the boundary to the next segment (either the *treemanifests segment* or
1137 the *filelogs segment*, depending on version and the request options).
1137 the *filelogs segment*, depending on version and the request options).
1138
1138
1139 Treemanifests Segment
1139 Treemanifests Segment
1140 ---------------------
1140 ---------------------
1141
1141
1142 The *treemanifests segment* only exists in changegroup version "3", and
1142 The *treemanifests segment* only exists in changegroup version "3", and
1143 only if the 'treemanifest' param is part of the bundle2 changegroup part
1143 only if the 'treemanifest' param is part of the bundle2 changegroup part
1144 (it is not possible to use changegroup version 3 outside of bundle2).
1144 (it is not possible to use changegroup version 3 outside of bundle2).
1145 Aside from the filenames in the *treemanifests segment* containing a
1145 Aside from the filenames in the *treemanifests segment* containing a
1146 trailing "/" character, it behaves identically to the *filelogs segment*
1146 trailing "/" character, it behaves identically to the *filelogs segment*
1147 (see below). The final sub-segment is followed by an *empty chunk*
1147 (see below). The final sub-segment is followed by an *empty chunk*
1148 (logically, a sub-segment with filename size 0). This denotes the boundary
1148 (logically, a sub-segment with filename size 0). This denotes the boundary
1149 to the *filelogs segment*.
1149 to the *filelogs segment*.
1150
1150
1151 Filelogs Segment
1151 Filelogs Segment
1152 ================
1152 ================
1153
1153
1154 The *filelogs segment* consists of multiple sub-segments, each
1154 The *filelogs segment* consists of multiple sub-segments, each
1155 corresponding to an individual file whose data is being described:
1155 corresponding to an individual file whose data is being described:
1156
1156
1157 +--------------------------------------------------+
1157 +--------------------------------------------------+
1158 | | | | | |
1158 | | | | | |
1159 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1159 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1160 | | | | | (4 bytes) |
1160 | | | | | (4 bytes) |
1161 | | | | | |
1161 | | | | | |
1162 +--------------------------------------------------+
1162 +--------------------------------------------------+
1163
1163
1164 The final filelog sub-segment is followed by an *empty chunk* (logically,
1164 The final filelog sub-segment is followed by an *empty chunk* (logically,
1165 a sub-segment with filename size 0). This denotes the end of the segment
1165 a sub-segment with filename size 0). This denotes the end of the segment
1166 and of the overall changegroup.
1166 and of the overall changegroup.
1167
1167
1168 Each filelog sub-segment consists of the following:
1168 Each filelog sub-segment consists of the following:
1169
1169
1170 +------------------------------------------------------+
1170 +------------------------------------------------------+
1171 | | | |
1171 | | | |
1172 | filename length | filename | delta group |
1172 | filename length | filename | delta group |
1173 | (4 bytes) | (<length - 4> bytes) | (various) |
1173 | (4 bytes) | (<length - 4> bytes) | (various) |
1174 | | | |
1174 | | | |
1175 +------------------------------------------------------+
1175 +------------------------------------------------------+
1176
1176
1177 That is, a *chunk* consisting of the filename (not terminated or padded)
1177 That is, a *chunk* consisting of the filename (not terminated or padded)
1178 followed by N chunks constituting the *delta group* for this file. The
1178 followed by N chunks constituting the *delta group* for this file. The
1179 *empty chunk* at the end of each *delta group* denotes the boundary to the
1179 *empty chunk* at the end of each *delta group* denotes the boundary to the
1180 next filelog sub-segment.
1180 next filelog sub-segment.
1181
1181
1182 Test list of commands with command with no help text
1182 Test list of commands with command with no help text
1183
1183
1184 $ hg help helpext
1184 $ hg help helpext
1185 helpext extension - no help text available
1185 helpext extension - no help text available
1186
1186
1187 list of commands:
1187 list of commands:
1188
1188
1189 nohelp (no help text available)
1189 nohelp (no help text available)
1190
1190
1191 (use 'hg help -v helpext' to show built-in aliases and global options)
1191 (use 'hg help -v helpext' to show built-in aliases and global options)
1192
1192
1193
1193
1194 test advanced, deprecated and experimental options are hidden in command help
1194 test advanced, deprecated and experimental options are hidden in command help
1195 $ hg help debugoptADV
1195 $ hg help debugoptADV
1196 hg debugoptADV
1196 hg debugoptADV
1197
1197
1198 (no help text available)
1198 (no help text available)
1199
1199
1200 options:
1200 options:
1201
1201
1202 (some details hidden, use --verbose to show complete help)
1202 (some details hidden, use --verbose to show complete help)
1203 $ hg help debugoptDEP
1203 $ hg help debugoptDEP
1204 hg debugoptDEP
1204 hg debugoptDEP
1205
1205
1206 (no help text available)
1206 (no help text available)
1207
1207
1208 options:
1208 options:
1209
1209
1210 (some details hidden, use --verbose to show complete help)
1210 (some details hidden, use --verbose to show complete help)
1211
1211
1212 $ hg help debugoptEXP
1212 $ hg help debugoptEXP
1213 hg debugoptEXP
1213 hg debugoptEXP
1214
1214
1215 (no help text available)
1215 (no help text available)
1216
1216
1217 options:
1217 options:
1218
1218
1219 (some details hidden, use --verbose to show complete help)
1219 (some details hidden, use --verbose to show complete help)
1220
1220
1221 test advanced, deprecated and experimental options are shown with -v
1221 test advanced, deprecated and experimental options are shown with -v
1222 $ hg help -v debugoptADV | grep aopt
1222 $ hg help -v debugoptADV | grep aopt
1223 --aopt option is (ADVANCED)
1223 --aopt option is (ADVANCED)
1224 $ hg help -v debugoptDEP | grep dopt
1224 $ hg help -v debugoptDEP | grep dopt
1225 --dopt option is (DEPRECATED)
1225 --dopt option is (DEPRECATED)
1226 $ hg help -v debugoptEXP | grep eopt
1226 $ hg help -v debugoptEXP | grep eopt
1227 --eopt option is (EXPERIMENTAL)
1227 --eopt option is (EXPERIMENTAL)
1228
1228
1229 #if gettext
1229 #if gettext
1230 test deprecated option is hidden with translation with untranslated description
1230 test deprecated option is hidden with translation with untranslated description
1231 (use many globy for not failing on changed transaction)
1231 (use many globy for not failing on changed transaction)
1232 $ LANGUAGE=sv hg help debugoptDEP
1232 $ LANGUAGE=sv hg help debugoptDEP
1233 hg debugoptDEP
1233 hg debugoptDEP
1234
1234
1235 (*) (glob)
1235 (*) (glob)
1236
1236
1237 options:
1237 options:
1238
1238
1239 (some details hidden, use --verbose to show complete help)
1239 (some details hidden, use --verbose to show complete help)
1240 #endif
1240 #endif
1241
1241
1242 Test commands that collide with topics (issue4240)
1242 Test commands that collide with topics (issue4240)
1243
1243
1244 $ hg config -hq
1244 $ hg config -hq
1245 hg config [-u] [NAME]...
1245 hg config [-u] [NAME]...
1246
1246
1247 show combined config settings from all hgrc files
1247 show combined config settings from all hgrc files
1248 $ hg showconfig -hq
1248 $ hg showconfig -hq
1249 hg config [-u] [NAME]...
1249 hg config [-u] [NAME]...
1250
1250
1251 show combined config settings from all hgrc files
1251 show combined config settings from all hgrc files
1252
1252
1253 Test a help topic
1253 Test a help topic
1254
1254
1255 $ hg help dates
1255 $ hg help dates
1256 Date Formats
1256 Date Formats
1257 """"""""""""
1257 """"""""""""
1258
1258
1259 Some commands allow the user to specify a date, e.g.:
1259 Some commands allow the user to specify a date, e.g.:
1260
1260
1261 - backout, commit, import, tag: Specify the commit date.
1261 - backout, commit, import, tag: Specify the commit date.
1262 - log, revert, update: Select revision(s) by date.
1262 - log, revert, update: Select revision(s) by date.
1263
1263
1264 Many date formats are valid. Here are some examples:
1264 Many date formats are valid. Here are some examples:
1265
1265
1266 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1266 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1267 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1267 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1268 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1268 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1269 - "Dec 6" (midnight)
1269 - "Dec 6" (midnight)
1270 - "13:18" (today assumed)
1270 - "13:18" (today assumed)
1271 - "3:39" (3:39AM assumed)
1271 - "3:39" (3:39AM assumed)
1272 - "3:39pm" (15:39)
1272 - "3:39pm" (15:39)
1273 - "2006-12-06 13:18:29" (ISO 8601 format)
1273 - "2006-12-06 13:18:29" (ISO 8601 format)
1274 - "2006-12-6 13:18"
1274 - "2006-12-6 13:18"
1275 - "2006-12-6"
1275 - "2006-12-6"
1276 - "12-6"
1276 - "12-6"
1277 - "12/6"
1277 - "12/6"
1278 - "12/6/6" (Dec 6 2006)
1278 - "12/6/6" (Dec 6 2006)
1279 - "today" (midnight)
1279 - "today" (midnight)
1280 - "yesterday" (midnight)
1280 - "yesterday" (midnight)
1281 - "now" - right now
1281 - "now" - right now
1282
1282
1283 Lastly, there is Mercurial's internal format:
1283 Lastly, there is Mercurial's internal format:
1284
1284
1285 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1285 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1286
1286
1287 This is the internal representation format for dates. The first number is
1287 This is the internal representation format for dates. The first number is
1288 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1288 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1289 is the offset of the local timezone, in seconds west of UTC (negative if
1289 is the offset of the local timezone, in seconds west of UTC (negative if
1290 the timezone is east of UTC).
1290 the timezone is east of UTC).
1291
1291
1292 The log command also accepts date ranges:
1292 The log command also accepts date ranges:
1293
1293
1294 - "<DATE" - at or before a given date/time
1294 - "<DATE" - at or before a given date/time
1295 - ">DATE" - on or after a given date/time
1295 - ">DATE" - on or after a given date/time
1296 - "DATE to DATE" - a date range, inclusive
1296 - "DATE to DATE" - a date range, inclusive
1297 - "-DAYS" - within a given number of days of today
1297 - "-DAYS" - within a given number of days of today
1298
1298
1299 Test repeated config section name
1299 Test repeated config section name
1300
1300
1301 $ hg help config.host
1301 $ hg help config.host
1302 "http_proxy.host"
1302 "http_proxy.host"
1303 Host name and (optional) port of the proxy server, for example
1303 Host name and (optional) port of the proxy server, for example
1304 "myproxy:8000".
1304 "myproxy:8000".
1305
1305
1306 "smtp.host"
1306 "smtp.host"
1307 Host name of mail server, e.g. "mail.example.com".
1307 Host name of mail server, e.g. "mail.example.com".
1308
1308
1309 Unrelated trailing paragraphs shouldn't be included
1309 Unrelated trailing paragraphs shouldn't be included
1310
1310
1311 $ hg help config.extramsg | grep '^$'
1311 $ hg help config.extramsg | grep '^$'
1312
1312
1313
1313
1314 Test capitalized section name
1314 Test capitalized section name
1315
1315
1316 $ hg help scripting.HGPLAIN > /dev/null
1316 $ hg help scripting.HGPLAIN > /dev/null
1317
1317
1318 Help subsection:
1318 Help subsection:
1319
1319
1320 $ hg help config.charsets |grep "Email example:" > /dev/null
1320 $ hg help config.charsets |grep "Email example:" > /dev/null
1321 [1]
1321 [1]
1322
1322
1323 Show nested definitions
1323 Show nested definitions
1324 ("profiling.type"[break]"ls"[break]"stat"[break])
1324 ("profiling.type"[break]"ls"[break]"stat"[break])
1325
1325
1326 $ hg help config.type | egrep '^$'|wc -l
1326 $ hg help config.type | egrep '^$'|wc -l
1327 \s*3 (re)
1327 \s*3 (re)
1328
1328
1329 Separate sections from subsections
1329 Separate sections from subsections
1330
1330
1331 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1331 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1332 "format"
1332 "format"
1333 --------
1333 --------
1334
1334
1335 "usegeneraldelta"
1335 "usegeneraldelta"
1336
1336
1337 "dotencode"
1337 "dotencode"
1338
1338
1339 "usefncache"
1339 "usefncache"
1340
1340
1341 "usestore"
1341 "usestore"
1342
1342
1343 "profiling"
1343 "profiling"
1344 -----------
1344 -----------
1345
1345
1346 "format"
1346 "format"
1347
1347
1348 "progress"
1348 "progress"
1349 ----------
1349 ----------
1350
1350
1351 "format"
1351 "format"
1352
1352
1353
1353
1354 Last item in help config.*:
1354 Last item in help config.*:
1355
1355
1356 $ hg help config.`hg help config|grep '^ "'| \
1356 $ hg help config.`hg help config|grep '^ "'| \
1357 > tail -1|sed 's![ "]*!!g'`| \
1357 > tail -1|sed 's![ "]*!!g'`| \
1358 > grep 'hg help -c config' > /dev/null
1358 > grep 'hg help -c config' > /dev/null
1359 [1]
1359 [1]
1360
1360
1361 note to use help -c for general hg help config:
1361 note to use help -c for general hg help config:
1362
1362
1363 $ hg help config |grep 'hg help -c config' > /dev/null
1363 $ hg help config |grep 'hg help -c config' > /dev/null
1364
1364
1365 Test templating help
1365 Test templating help
1366
1366
1367 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1367 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1368 desc String. The text of the changeset description.
1368 desc String. The text of the changeset description.
1369 diffstat String. Statistics of changes with the following format:
1369 diffstat String. Statistics of changes with the following format:
1370 firstline Any text. Returns the first line of text.
1370 firstline Any text. Returns the first line of text.
1371 nonempty Any text. Returns '(none)' if the string is empty.
1371 nonempty Any text. Returns '(none)' if the string is empty.
1372
1372
1373 Test deprecated items
1373 Test deprecated items
1374
1374
1375 $ hg help -v templating | grep currentbookmark
1375 $ hg help -v templating | grep currentbookmark
1376 currentbookmark
1376 currentbookmark
1377 $ hg help templating | (grep currentbookmark || true)
1377 $ hg help templating | (grep currentbookmark || true)
1378
1378
1379 Test help hooks
1379 Test help hooks
1380
1380
1381 $ cat > helphook1.py <<EOF
1381 $ cat > helphook1.py <<EOF
1382 > from mercurial import help
1382 > from mercurial import help
1383 >
1383 >
1384 > def rewrite(ui, topic, doc):
1384 > def rewrite(ui, topic, doc):
1385 > return doc + '\nhelphook1\n'
1385 > return doc + '\nhelphook1\n'
1386 >
1386 >
1387 > def extsetup(ui):
1387 > def extsetup(ui):
1388 > help.addtopichook('revisions', rewrite)
1388 > help.addtopichook('revisions', rewrite)
1389 > EOF
1389 > EOF
1390 $ cat > helphook2.py <<EOF
1390 $ cat > helphook2.py <<EOF
1391 > from mercurial import help
1391 > from mercurial import help
1392 >
1392 >
1393 > def rewrite(ui, topic, doc):
1393 > def rewrite(ui, topic, doc):
1394 > return doc + '\nhelphook2\n'
1394 > return doc + '\nhelphook2\n'
1395 >
1395 >
1396 > def extsetup(ui):
1396 > def extsetup(ui):
1397 > help.addtopichook('revisions', rewrite)
1397 > help.addtopichook('revisions', rewrite)
1398 > EOF
1398 > EOF
1399 $ echo '[extensions]' >> $HGRCPATH
1399 $ echo '[extensions]' >> $HGRCPATH
1400 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1400 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1401 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1401 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1402 $ hg help revsets | grep helphook
1402 $ hg help revsets | grep helphook
1403 helphook1
1403 helphook1
1404 helphook2
1404 helphook2
1405
1405
1406 help -c should only show debug --debug
1406 help -c should only show debug --debug
1407
1407
1408 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1408 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1409 [1]
1409 [1]
1410
1410
1411 help -c should only show deprecated for -v
1411 help -c should only show deprecated for -v
1412
1412
1413 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1413 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1414 [1]
1414 [1]
1415
1415
1416 Test -s / --system
1416 Test -s / --system
1417
1417
1418 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1418 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1419 > wc -l | sed -e 's/ //g'
1419 > wc -l | sed -e 's/ //g'
1420 0
1420 0
1421 $ hg help config.files --system unix | grep 'USER' | \
1421 $ hg help config.files --system unix | grep 'USER' | \
1422 > wc -l | sed -e 's/ //g'
1422 > wc -l | sed -e 's/ //g'
1423 0
1423 0
1424
1424
1425 Test -e / -c / -k combinations
1425 Test -e / -c / -k combinations
1426
1426
1427 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1427 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1428 Commands:
1428 Commands:
1429 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1429 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1430 Extensions:
1430 Extensions:
1431 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1431 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1432 Topics:
1432 Topics:
1433 Commands:
1433 Commands:
1434 Extensions:
1434 Extensions:
1435 Extension Commands:
1435 Extension Commands:
1436 $ hg help -c schemes
1436 $ hg help -c schemes
1437 abort: no such help topic: schemes
1437 abort: no such help topic: schemes
1438 (try 'hg help --keyword schemes')
1438 (try 'hg help --keyword schemes')
1439 [255]
1439 [255]
1440 $ hg help -e schemes |head -1
1440 $ hg help -e schemes |head -1
1441 schemes extension - extend schemes with shortcuts to repository swarms
1441 schemes extension - extend schemes with shortcuts to repository swarms
1442 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1442 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1443 Commands:
1443 Commands:
1444 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1444 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1445 Extensions:
1445 Extensions:
1446 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1446 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1447 Extensions:
1447 Extensions:
1448 Commands:
1448 Commands:
1449 $ hg help -c commit > /dev/null
1449 $ hg help -c commit > /dev/null
1450 $ hg help -e -c commit > /dev/null
1450 $ hg help -e -c commit > /dev/null
1451 $ hg help -e commit > /dev/null
1451 $ hg help -e commit > /dev/null
1452 abort: no such help topic: commit
1452 abort: no such help topic: commit
1453 (try 'hg help --keyword commit')
1453 (try 'hg help --keyword commit')
1454 [255]
1454 [255]
1455
1455
1456 Test keyword search help
1456 Test keyword search help
1457
1457
1458 $ cat > prefixedname.py <<EOF
1458 $ cat > prefixedname.py <<EOF
1459 > '''matched against word "clone"
1459 > '''matched against word "clone"
1460 > '''
1460 > '''
1461 > EOF
1461 > EOF
1462 $ echo '[extensions]' >> $HGRCPATH
1462 $ echo '[extensions]' >> $HGRCPATH
1463 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1463 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1464 $ hg help -k clone
1464 $ hg help -k clone
1465 Topics:
1465 Topics:
1466
1466
1467 config Configuration Files
1467 config Configuration Files
1468 extensions Using Additional Features
1468 extensions Using Additional Features
1469 glossary Glossary
1469 glossary Glossary
1470 phases Working with Phases
1470 phases Working with Phases
1471 subrepos Subrepositories
1471 subrepos Subrepositories
1472 urls URL Paths
1472 urls URL Paths
1473
1473
1474 Commands:
1474 Commands:
1475
1475
1476 bookmarks create a new bookmark or list existing bookmarks
1476 bookmarks create a new bookmark or list existing bookmarks
1477 clone make a copy of an existing repository
1477 clone make a copy of an existing repository
1478 paths show aliases for remote repositories
1478 paths show aliases for remote repositories
1479 update update working directory (or switch revisions)
1479 update update working directory (or switch revisions)
1480
1480
1481 Extensions:
1481 Extensions:
1482
1482
1483 clonebundles advertise pre-generated bundles to seed clones
1483 clonebundles advertise pre-generated bundles to seed clones
1484 prefixedname matched against word "clone"
1484 prefixedname matched against word "clone"
1485 relink recreates hardlinks between repository clones
1485 relink recreates hardlinks between repository clones
1486
1486
1487 Extension Commands:
1487 Extension Commands:
1488
1488
1489 qclone clone main and patch repository at same time
1489 qclone clone main and patch repository at same time
1490
1490
1491 Test unfound topic
1491 Test unfound topic
1492
1492
1493 $ hg help nonexistingtopicthatwillneverexisteverever
1493 $ hg help nonexistingtopicthatwillneverexisteverever
1494 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1494 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1495 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1495 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1496 [255]
1496 [255]
1497
1497
1498 Test unfound keyword
1498 Test unfound keyword
1499
1499
1500 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1500 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1501 abort: no matches
1501 abort: no matches
1502 (try 'hg help' for a list of topics)
1502 (try 'hg help' for a list of topics)
1503 [255]
1503 [255]
1504
1504
1505 Test omit indicating for help
1505 Test omit indicating for help
1506
1506
1507 $ cat > addverboseitems.py <<EOF
1507 $ cat > addverboseitems.py <<EOF
1508 > '''extension to test omit indicating.
1508 > '''extension to test omit indicating.
1509 >
1509 >
1510 > This paragraph is never omitted (for extension)
1510 > This paragraph is never omitted (for extension)
1511 >
1511 >
1512 > .. container:: verbose
1512 > .. container:: verbose
1513 >
1513 >
1514 > This paragraph is omitted,
1514 > This paragraph is omitted,
1515 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1515 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1516 >
1516 >
1517 > This paragraph is never omitted, too (for extension)
1517 > This paragraph is never omitted, too (for extension)
1518 > '''
1518 > '''
1519 >
1519 >
1520 > from mercurial import help, commands
1520 > from mercurial import help, commands
1521 > testtopic = """This paragraph is never omitted (for topic).
1521 > testtopic = """This paragraph is never omitted (for topic).
1522 >
1522 >
1523 > .. container:: verbose
1523 > .. container:: verbose
1524 >
1524 >
1525 > This paragraph is omitted,
1525 > This paragraph is omitted,
1526 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1526 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1527 >
1527 >
1528 > This paragraph is never omitted, too (for topic)
1528 > This paragraph is never omitted, too (for topic)
1529 > """
1529 > """
1530 > def extsetup(ui):
1530 > def extsetup(ui):
1531 > help.helptable.append((["topic-containing-verbose"],
1531 > help.helptable.append((["topic-containing-verbose"],
1532 > "This is the topic to test omit indicating.",
1532 > "This is the topic to test omit indicating.",
1533 > lambda ui: testtopic))
1533 > lambda ui: testtopic))
1534 > EOF
1534 > EOF
1535 $ echo '[extensions]' >> $HGRCPATH
1535 $ echo '[extensions]' >> $HGRCPATH
1536 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1536 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1537 $ hg help addverboseitems
1537 $ hg help addverboseitems
1538 addverboseitems extension - extension to test omit indicating.
1538 addverboseitems extension - extension to test omit indicating.
1539
1539
1540 This paragraph is never omitted (for extension)
1540 This paragraph is never omitted (for extension)
1541
1541
1542 This paragraph is never omitted, too (for extension)
1542 This paragraph is never omitted, too (for extension)
1543
1543
1544 (some details hidden, use --verbose to show complete help)
1544 (some details hidden, use --verbose to show complete help)
1545
1545
1546 no commands defined
1546 no commands defined
1547 $ hg help -v addverboseitems
1547 $ hg help -v addverboseitems
1548 addverboseitems extension - extension to test omit indicating.
1548 addverboseitems extension - extension to test omit indicating.
1549
1549
1550 This paragraph is never omitted (for extension)
1550 This paragraph is never omitted (for extension)
1551
1551
1552 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1552 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1553 extension)
1553 extension)
1554
1554
1555 This paragraph is never omitted, too (for extension)
1555 This paragraph is never omitted, too (for extension)
1556
1556
1557 no commands defined
1557 no commands defined
1558 $ hg help topic-containing-verbose
1558 $ hg help topic-containing-verbose
1559 This is the topic to test omit indicating.
1559 This is the topic to test omit indicating.
1560 """"""""""""""""""""""""""""""""""""""""""
1560 """"""""""""""""""""""""""""""""""""""""""
1561
1561
1562 This paragraph is never omitted (for topic).
1562 This paragraph is never omitted (for topic).
1563
1563
1564 This paragraph is never omitted, too (for topic)
1564 This paragraph is never omitted, too (for topic)
1565
1565
1566 (some details hidden, use --verbose to show complete help)
1566 (some details hidden, use --verbose to show complete help)
1567 $ hg help -v topic-containing-verbose
1567 $ hg help -v topic-containing-verbose
1568 This is the topic to test omit indicating.
1568 This is the topic to test omit indicating.
1569 """"""""""""""""""""""""""""""""""""""""""
1569 """"""""""""""""""""""""""""""""""""""""""
1570
1570
1571 This paragraph is never omitted (for topic).
1571 This paragraph is never omitted (for topic).
1572
1572
1573 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1573 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1574 topic)
1574 topic)
1575
1575
1576 This paragraph is never omitted, too (for topic)
1576 This paragraph is never omitted, too (for topic)
1577
1577
1578 Test section lookup
1578 Test section lookup
1579
1579
1580 $ hg help revset.merge
1580 $ hg help revset.merge
1581 "merge()"
1581 "merge()"
1582 Changeset is a merge changeset.
1582 Changeset is a merge changeset.
1583
1583
1584 $ hg help glossary.dag
1584 $ hg help glossary.dag
1585 DAG
1585 DAG
1586 The repository of changesets of a distributed version control system
1586 The repository of changesets of a distributed version control system
1587 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1587 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1588 of nodes and edges, where nodes correspond to changesets and edges
1588 of nodes and edges, where nodes correspond to changesets and edges
1589 imply a parent -> child relation. This graph can be visualized by
1589 imply a parent -> child relation. This graph can be visualized by
1590 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1590 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1591 limited by the requirement for children to have at most two parents.
1591 limited by the requirement for children to have at most two parents.
1592
1592
1593
1593
1594 $ hg help hgrc.paths
1594 $ hg help hgrc.paths
1595 "paths"
1595 "paths"
1596 -------
1596 -------
1597
1597
1598 Assigns symbolic names and behavior to repositories.
1598 Assigns symbolic names and behavior to repositories.
1599
1599
1600 Options are symbolic names defining the URL or directory that is the
1600 Options are symbolic names defining the URL or directory that is the
1601 location of the repository. Example:
1601 location of the repository. Example:
1602
1602
1603 [paths]
1603 [paths]
1604 my_server = https://example.com/my_repo
1604 my_server = https://example.com/my_repo
1605 local_path = /home/me/repo
1605 local_path = /home/me/repo
1606
1606
1607 These symbolic names can be used from the command line. To pull from
1607 These symbolic names can be used from the command line. To pull from
1608 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1608 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1609 local_path'.
1609 local_path'.
1610
1610
1611 Options containing colons (":") denote sub-options that can influence
1611 Options containing colons (":") denote sub-options that can influence
1612 behavior for that specific path. Example:
1612 behavior for that specific path. Example:
1613
1613
1614 [paths]
1614 [paths]
1615 my_server = https://example.com/my_path
1615 my_server = https://example.com/my_path
1616 my_server:pushurl = ssh://example.com/my_path
1616 my_server:pushurl = ssh://example.com/my_path
1617
1617
1618 The following sub-options can be defined:
1618 The following sub-options can be defined:
1619
1619
1620 "pushurl"
1620 "pushurl"
1621 The URL to use for push operations. If not defined, the location
1621 The URL to use for push operations. If not defined, the location
1622 defined by the path's main entry is used.
1622 defined by the path's main entry is used.
1623
1623
1624 "pushrev"
1624 "pushrev"
1625 A revset defining which revisions to push by default.
1625 A revset defining which revisions to push by default.
1626
1626
1627 When 'hg push' is executed without a "-r" argument, the revset defined
1627 When 'hg push' is executed without a "-r" argument, the revset defined
1628 by this sub-option is evaluated to determine what to push.
1628 by this sub-option is evaluated to determine what to push.
1629
1629
1630 For example, a value of "." will push the working directory's revision
1630 For example, a value of "." will push the working directory's revision
1631 by default.
1631 by default.
1632
1632
1633 Revsets specifying bookmarks will not result in the bookmark being
1633 Revsets specifying bookmarks will not result in the bookmark being
1634 pushed.
1634 pushed.
1635
1635
1636 The following special named paths exist:
1636 The following special named paths exist:
1637
1637
1638 "default"
1638 "default"
1639 The URL or directory to use when no source or remote is specified.
1639 The URL or directory to use when no source or remote is specified.
1640
1640
1641 'hg clone' will automatically define this path to the location the
1641 'hg clone' will automatically define this path to the location the
1642 repository was cloned from.
1642 repository was cloned from.
1643
1643
1644 "default-push"
1644 "default-push"
1645 (deprecated) The URL or directory for the default 'hg push' location.
1645 (deprecated) The URL or directory for the default 'hg push' location.
1646 "default:pushurl" should be used instead.
1646 "default:pushurl" should be used instead.
1647
1647
1648 $ hg help glossary.mcguffin
1648 $ hg help glossary.mcguffin
1649 abort: help section not found: glossary.mcguffin
1649 abort: help section not found: glossary.mcguffin
1650 [255]
1650 [255]
1651
1651
1652 $ hg help glossary.mc.guffin
1652 $ hg help glossary.mc.guffin
1653 abort: help section not found: glossary.mc.guffin
1653 abort: help section not found: glossary.mc.guffin
1654 [255]
1654 [255]
1655
1655
1656 $ hg help template.files
1656 $ hg help template.files
1657 files List of strings. All files modified, added, or removed by
1657 files List of strings. All files modified, added, or removed by
1658 this changeset.
1658 this changeset.
1659 files(pattern)
1659 files(pattern)
1660 All files of the current changeset matching the pattern. See
1660 All files of the current changeset matching the pattern. See
1661 'hg help patterns'.
1661 'hg help patterns'.
1662
1662
1663 Test section lookup by translated message
1663 Test section lookup by translated message
1664
1664
1665 str.lower() instead of encoding.lower(str) on translated message might
1665 str.lower() instead of encoding.lower(str) on translated message might
1666 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1666 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1667 as the second or later byte of multi-byte character.
1667 as the second or later byte of multi-byte character.
1668
1668
1669 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1669 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1670 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1670 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1671 replacement makes message meaningless.
1671 replacement makes message meaningless.
1672
1672
1673 This tests that section lookup by translated string isn't broken by
1673 This tests that section lookup by translated string isn't broken by
1674 such str.lower().
1674 such str.lower().
1675
1675
1676 $ $PYTHON <<EOF
1676 $ $PYTHON <<EOF
1677 > def escape(s):
1677 > def escape(s):
1678 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1678 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1679 > # translation of "record" in ja_JP.cp932
1679 > # translation of "record" in ja_JP.cp932
1680 > upper = "\x8bL\x98^"
1680 > upper = "\x8bL\x98^"
1681 > # str.lower()-ed section name should be treated as different one
1681 > # str.lower()-ed section name should be treated as different one
1682 > lower = "\x8bl\x98^"
1682 > lower = "\x8bl\x98^"
1683 > with open('ambiguous.py', 'w') as fp:
1683 > with open('ambiguous.py', 'w') as fp:
1684 > fp.write("""# ambiguous section names in ja_JP.cp932
1684 > fp.write("""# ambiguous section names in ja_JP.cp932
1685 > u'''summary of extension
1685 > u'''summary of extension
1686 >
1686 >
1687 > %s
1687 > %s
1688 > ----
1688 > ----
1689 >
1689 >
1690 > Upper name should show only this message
1690 > Upper name should show only this message
1691 >
1691 >
1692 > %s
1692 > %s
1693 > ----
1693 > ----
1694 >
1694 >
1695 > Lower name should show only this message
1695 > Lower name should show only this message
1696 >
1696 >
1697 > subsequent section
1697 > subsequent section
1698 > ------------------
1698 > ------------------
1699 >
1699 >
1700 > This should be hidden at 'hg help ambiguous' with section name.
1700 > This should be hidden at 'hg help ambiguous' with section name.
1701 > '''
1701 > '''
1702 > """ % (escape(upper), escape(lower)))
1702 > """ % (escape(upper), escape(lower)))
1703 > EOF
1703 > EOF
1704
1704
1705 $ cat >> $HGRCPATH <<EOF
1705 $ cat >> $HGRCPATH <<EOF
1706 > [extensions]
1706 > [extensions]
1707 > ambiguous = ./ambiguous.py
1707 > ambiguous = ./ambiguous.py
1708 > EOF
1708 > EOF
1709
1709
1710 $ $PYTHON <<EOF | sh
1710 $ $PYTHON <<EOF | sh
1711 > upper = "\x8bL\x98^"
1711 > upper = "\x8bL\x98^"
1712 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1712 > print("hg --encoding cp932 help -e ambiguous.%s" % upper)
1713 > EOF
1713 > EOF
1714 \x8bL\x98^ (esc)
1714 \x8bL\x98^ (esc)
1715 ----
1715 ----
1716
1716
1717 Upper name should show only this message
1717 Upper name should show only this message
1718
1718
1719
1719
1720 $ $PYTHON <<EOF | sh
1720 $ $PYTHON <<EOF | sh
1721 > lower = "\x8bl\x98^"
1721 > lower = "\x8bl\x98^"
1722 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1722 > print("hg --encoding cp932 help -e ambiguous.%s" % lower)
1723 > EOF
1723 > EOF
1724 \x8bl\x98^ (esc)
1724 \x8bl\x98^ (esc)
1725 ----
1725 ----
1726
1726
1727 Lower name should show only this message
1727 Lower name should show only this message
1728
1728
1729
1729
1730 $ cat >> $HGRCPATH <<EOF
1730 $ cat >> $HGRCPATH <<EOF
1731 > [extensions]
1731 > [extensions]
1732 > ambiguous = !
1732 > ambiguous = !
1733 > EOF
1733 > EOF
1734
1734
1735 Show help content of disabled extensions
1735 Show help content of disabled extensions
1736
1736
1737 $ cat >> $HGRCPATH <<EOF
1737 $ cat >> $HGRCPATH <<EOF
1738 > [extensions]
1738 > [extensions]
1739 > ambiguous = !./ambiguous.py
1739 > ambiguous = !./ambiguous.py
1740 > EOF
1740 > EOF
1741 $ hg help -e ambiguous
1741 $ hg help -e ambiguous
1742 ambiguous extension - (no help text available)
1742 ambiguous extension - (no help text available)
1743
1743
1744 (use 'hg help extensions' for information on enabling extensions)
1744 (use 'hg help extensions' for information on enabling extensions)
1745
1745
1746 Test dynamic list of merge tools only shows up once
1746 Test dynamic list of merge tools only shows up once
1747 $ hg help merge-tools
1747 $ hg help merge-tools
1748 Merge Tools
1748 Merge Tools
1749 """""""""""
1749 """""""""""
1750
1750
1751 To merge files Mercurial uses merge tools.
1751 To merge files Mercurial uses merge tools.
1752
1752
1753 A merge tool combines two different versions of a file into a merged file.
1753 A merge tool combines two different versions of a file into a merged file.
1754 Merge tools are given the two files and the greatest common ancestor of
1754 Merge tools are given the two files and the greatest common ancestor of
1755 the two file versions, so they can determine the changes made on both
1755 the two file versions, so they can determine the changes made on both
1756 branches.
1756 branches.
1757
1757
1758 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1758 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1759 backout' and in several extensions.
1759 backout' and in several extensions.
1760
1760
1761 Usually, the merge tool tries to automatically reconcile the files by
1761 Usually, the merge tool tries to automatically reconcile the files by
1762 combining all non-overlapping changes that occurred separately in the two
1762 combining all non-overlapping changes that occurred separately in the two
1763 different evolutions of the same initial base file. Furthermore, some
1763 different evolutions of the same initial base file. Furthermore, some
1764 interactive merge programs make it easier to manually resolve conflicting
1764 interactive merge programs make it easier to manually resolve conflicting
1765 merges, either in a graphical way, or by inserting some conflict markers.
1765 merges, either in a graphical way, or by inserting some conflict markers.
1766 Mercurial does not include any interactive merge programs but relies on
1766 Mercurial does not include any interactive merge programs but relies on
1767 external tools for that.
1767 external tools for that.
1768
1768
1769 Available merge tools
1769 Available merge tools
1770 =====================
1770 =====================
1771
1771
1772 External merge tools and their properties are configured in the merge-
1772 External merge tools and their properties are configured in the merge-
1773 tools configuration section - see hgrc(5) - but they can often just be
1773 tools configuration section - see hgrc(5) - but they can often just be
1774 named by their executable.
1774 named by their executable.
1775
1775
1776 A merge tool is generally usable if its executable can be found on the
1776 A merge tool is generally usable if its executable can be found on the
1777 system and if it can handle the merge. The executable is found if it is an
1777 system and if it can handle the merge. The executable is found if it is an
1778 absolute or relative executable path or the name of an application in the
1778 absolute or relative executable path or the name of an application in the
1779 executable search path. The tool is assumed to be able to handle the merge
1779 executable search path. The tool is assumed to be able to handle the merge
1780 if it can handle symlinks if the file is a symlink, if it can handle
1780 if it can handle symlinks if the file is a symlink, if it can handle
1781 binary files if the file is binary, and if a GUI is available if the tool
1781 binary files if the file is binary, and if a GUI is available if the tool
1782 requires a GUI.
1782 requires a GUI.
1783
1783
1784 There are some internal merge tools which can be used. The internal merge
1784 There are some internal merge tools which can be used. The internal merge
1785 tools are:
1785 tools are:
1786
1786
1787 ":dump"
1787 ":dump"
1788 Creates three versions of the files to merge, containing the contents of
1788 Creates three versions of the files to merge, containing the contents of
1789 local, other and base. These files can then be used to perform a merge
1789 local, other and base. These files can then be used to perform a merge
1790 manually. If the file to be merged is named "a.txt", these files will
1790 manually. If the file to be merged is named "a.txt", these files will
1791 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1791 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1792 they will be placed in the same directory as "a.txt".
1792 they will be placed in the same directory as "a.txt".
1793
1793
1794 This implies permerge. Therefore, files aren't dumped, if premerge runs
1794 This implies permerge. Therefore, files aren't dumped, if premerge runs
1795 successfully. Use :forcedump to forcibly write files out.
1795 successfully. Use :forcedump to forcibly write files out.
1796
1796
1797 ":fail"
1797 ":fail"
1798 Rather than attempting to merge files that were modified on both
1798 Rather than attempting to merge files that were modified on both
1799 branches, it marks them as unresolved. The resolve command must be used
1799 branches, it marks them as unresolved. The resolve command must be used
1800 to resolve these conflicts.
1800 to resolve these conflicts.
1801
1801
1802 ":forcedump"
1802 ":forcedump"
1803 Creates three versions of the files as same as :dump, but omits
1803 Creates three versions of the files as same as :dump, but omits
1804 premerge.
1804 premerge.
1805
1805
1806 ":local"
1806 ":local"
1807 Uses the local 'p1()' version of files as the merged version.
1807 Uses the local 'p1()' version of files as the merged version.
1808
1808
1809 ":merge"
1809 ":merge"
1810 Uses the internal non-interactive simple merge algorithm for merging
1810 Uses the internal non-interactive simple merge algorithm for merging
1811 files. It will fail if there are any conflicts and leave markers in the
1811 files. It will fail if there are any conflicts and leave markers in the
1812 partially merged file. Markers will have two sections, one for each side
1812 partially merged file. Markers will have two sections, one for each side
1813 of merge.
1813 of merge.
1814
1814
1815 ":merge-local"
1815 ":merge-local"
1816 Like :merge, but resolve all conflicts non-interactively in favor of the
1816 Like :merge, but resolve all conflicts non-interactively in favor of the
1817 local 'p1()' changes.
1817 local 'p1()' changes.
1818
1818
1819 ":merge-other"
1819 ":merge-other"
1820 Like :merge, but resolve all conflicts non-interactively in favor of the
1820 Like :merge, but resolve all conflicts non-interactively in favor of the
1821 other 'p2()' changes.
1821 other 'p2()' changes.
1822
1822
1823 ":merge3"
1823 ":merge3"
1824 Uses the internal non-interactive simple merge algorithm for merging
1824 Uses the internal non-interactive simple merge algorithm for merging
1825 files. It will fail if there are any conflicts and leave markers in the
1825 files. It will fail if there are any conflicts and leave markers in the
1826 partially merged file. Marker will have three sections, one from each
1826 partially merged file. Marker will have three sections, one from each
1827 side of the merge and one for the base content.
1827 side of the merge and one for the base content.
1828
1828
1829 ":other"
1829 ":other"
1830 Uses the other 'p2()' version of files as the merged version.
1830 Uses the other 'p2()' version of files as the merged version.
1831
1831
1832 ":prompt"
1832 ":prompt"
1833 Asks the user which of the local 'p1()' or the other 'p2()' version to
1833 Asks the user which of the local 'p1()' or the other 'p2()' version to
1834 keep as the merged version.
1834 keep as the merged version.
1835
1835
1836 ":tagmerge"
1836 ":tagmerge"
1837 Uses the internal tag merge algorithm (experimental).
1837 Uses the internal tag merge algorithm (experimental).
1838
1838
1839 ":union"
1839 ":union"
1840 Uses the internal non-interactive simple merge algorithm for merging
1840 Uses the internal non-interactive simple merge algorithm for merging
1841 files. It will use both left and right sides for conflict regions. No
1841 files. It will use both left and right sides for conflict regions. No
1842 markers are inserted.
1842 markers are inserted.
1843
1843
1844 Internal tools are always available and do not require a GUI but will by
1844 Internal tools are always available and do not require a GUI but will by
1845 default not handle symlinks or binary files.
1845 default not handle symlinks or binary files.
1846
1846
1847 Choosing a merge tool
1847 Choosing a merge tool
1848 =====================
1848 =====================
1849
1849
1850 Mercurial uses these rules when deciding which merge tool to use:
1850 Mercurial uses these rules when deciding which merge tool to use:
1851
1851
1852 1. If a tool has been specified with the --tool option to merge or
1852 1. If a tool has been specified with the --tool option to merge or
1853 resolve, it is used. If it is the name of a tool in the merge-tools
1853 resolve, it is used. If it is the name of a tool in the merge-tools
1854 configuration, its configuration is used. Otherwise the specified tool
1854 configuration, its configuration is used. Otherwise the specified tool
1855 must be executable by the shell.
1855 must be executable by the shell.
1856 2. If the "HGMERGE" environment variable is present, its value is used and
1856 2. If the "HGMERGE" environment variable is present, its value is used and
1857 must be executable by the shell.
1857 must be executable by the shell.
1858 3. If the filename of the file to be merged matches any of the patterns in
1858 3. If the filename of the file to be merged matches any of the patterns in
1859 the merge-patterns configuration section, the first usable merge tool
1859 the merge-patterns configuration section, the first usable merge tool
1860 corresponding to a matching pattern is used. Here, binary capabilities
1860 corresponding to a matching pattern is used. Here, binary capabilities
1861 of the merge tool are not considered.
1861 of the merge tool are not considered.
1862 4. If ui.merge is set it will be considered next. If the value is not the
1862 4. If ui.merge is set it will be considered next. If the value is not the
1863 name of a configured tool, the specified value is used and must be
1863 name of a configured tool, the specified value is used and must be
1864 executable by the shell. Otherwise the named tool is used if it is
1864 executable by the shell. Otherwise the named tool is used if it is
1865 usable.
1865 usable.
1866 5. If any usable merge tools are present in the merge-tools configuration
1866 5. If any usable merge tools are present in the merge-tools configuration
1867 section, the one with the highest priority is used.
1867 section, the one with the highest priority is used.
1868 6. If a program named "hgmerge" can be found on the system, it is used -
1868 6. If a program named "hgmerge" can be found on the system, it is used -
1869 but it will by default not be used for symlinks and binary files.
1869 but it will by default not be used for symlinks and binary files.
1870 7. If the file to be merged is not binary and is not a symlink, then
1870 7. If the file to be merged is not binary and is not a symlink, then
1871 internal ":merge" is used.
1871 internal ":merge" is used.
1872 8. Otherwise, ":prompt" is used.
1872 8. Otherwise, ":prompt" is used.
1873
1873
1874 Note:
1874 Note:
1875 After selecting a merge program, Mercurial will by default attempt to
1875 After selecting a merge program, Mercurial will by default attempt to
1876 merge the files using a simple merge algorithm first. Only if it
1876 merge the files using a simple merge algorithm first. Only if it
1877 doesn't succeed because of conflicting changes Mercurial will actually
1877 doesn't succeed because of conflicting changes Mercurial will actually
1878 execute the merge program. Whether to use the simple merge algorithm
1878 execute the merge program. Whether to use the simple merge algorithm
1879 first can be controlled by the premerge setting of the merge tool.
1879 first can be controlled by the premerge setting of the merge tool.
1880 Premerge is enabled by default unless the file is binary or a symlink.
1880 Premerge is enabled by default unless the file is binary or a symlink.
1881
1881
1882 See the merge-tools and ui sections of hgrc(5) for details on the
1882 See the merge-tools and ui sections of hgrc(5) for details on the
1883 configuration of merge tools.
1883 configuration of merge tools.
1884
1884
1885 Compression engines listed in `hg help bundlespec`
1885 Compression engines listed in `hg help bundlespec`
1886
1886
1887 $ hg help bundlespec | grep gzip
1887 $ hg help bundlespec | grep gzip
1888 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1888 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1889 An algorithm that produces smaller bundles than "gzip".
1889 An algorithm that produces smaller bundles than "gzip".
1890 This engine will likely produce smaller bundles than "gzip" but will be
1890 This engine will likely produce smaller bundles than "gzip" but will be
1891 "gzip"
1891 "gzip"
1892 better compression than "gzip". It also frequently yields better (?)
1892 better compression than "gzip". It also frequently yields better (?)
1893
1893
1894 Test usage of section marks in help documents
1894 Test usage of section marks in help documents
1895
1895
1896 $ cd "$TESTDIR"/../doc
1896 $ cd "$TESTDIR"/../doc
1897 $ $PYTHON check-seclevel.py
1897 $ $PYTHON check-seclevel.py
1898 $ cd $TESTTMP
1898 $ cd $TESTTMP
1899
1899
1900 #if serve
1900 #if serve
1901
1901
1902 Test the help pages in hgweb.
1902 Test the help pages in hgweb.
1903
1903
1904 Dish up an empty repo; serve it cold.
1904 Dish up an empty repo; serve it cold.
1905
1905
1906 $ hg init "$TESTTMP/test"
1906 $ hg init "$TESTTMP/test"
1907 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1907 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1908 $ cat hg.pid >> $DAEMON_PIDS
1908 $ cat hg.pid >> $DAEMON_PIDS
1909
1909
1910 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1910 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1911 200 Script output follows
1911 200 Script output follows
1912
1912
1913 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1913 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1914 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1914 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1915 <head>
1915 <head>
1916 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1916 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1917 <meta name="robots" content="index, nofollow" />
1917 <meta name="robots" content="index, nofollow" />
1918 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1918 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1919 <script type="text/javascript" src="/static/mercurial.js"></script>
1919 <script type="text/javascript" src="/static/mercurial.js"></script>
1920
1920
1921 <title>Help: Index</title>
1921 <title>Help: Index</title>
1922 </head>
1922 </head>
1923 <body>
1923 <body>
1924
1924
1925 <div class="container">
1925 <div class="container">
1926 <div class="menu">
1926 <div class="menu">
1927 <div class="logo">
1927 <div class="logo">
1928 <a href="https://mercurial-scm.org/">
1928 <a href="https://mercurial-scm.org/">
1929 <img src="/static/hglogo.png" alt="mercurial" /></a>
1929 <img src="/static/hglogo.png" alt="mercurial" /></a>
1930 </div>
1930 </div>
1931 <ul>
1931 <ul>
1932 <li><a href="/shortlog">log</a></li>
1932 <li><a href="/shortlog">log</a></li>
1933 <li><a href="/graph">graph</a></li>
1933 <li><a href="/graph">graph</a></li>
1934 <li><a href="/tags">tags</a></li>
1934 <li><a href="/tags">tags</a></li>
1935 <li><a href="/bookmarks">bookmarks</a></li>
1935 <li><a href="/bookmarks">bookmarks</a></li>
1936 <li><a href="/branches">branches</a></li>
1936 <li><a href="/branches">branches</a></li>
1937 </ul>
1937 </ul>
1938 <ul>
1938 <ul>
1939 <li class="active">help</li>
1939 <li class="active">help</li>
1940 </ul>
1940 </ul>
1941 </div>
1941 </div>
1942
1942
1943 <div class="main">
1943 <div class="main">
1944 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1944 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1945
1945
1946 <form class="search" action="/log">
1946 <form class="search" action="/log">
1947
1947
1948 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
1948 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
1949 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1949 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1950 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1950 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1951 </form>
1951 </form>
1952 <table class="bigtable">
1952 <table class="bigtable">
1953 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1953 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1954
1954
1955 <tr><td>
1955 <tr><td>
1956 <a href="/help/bundlespec">
1956 <a href="/help/bundlespec">
1957 bundlespec
1957 bundlespec
1958 </a>
1958 </a>
1959 </td><td>
1959 </td><td>
1960 Bundle File Formats
1960 Bundle File Formats
1961 </td></tr>
1961 </td></tr>
1962 <tr><td>
1962 <tr><td>
1963 <a href="/help/color">
1963 <a href="/help/color">
1964 color
1964 color
1965 </a>
1965 </a>
1966 </td><td>
1966 </td><td>
1967 Colorizing Outputs
1967 Colorizing Outputs
1968 </td></tr>
1968 </td></tr>
1969 <tr><td>
1969 <tr><td>
1970 <a href="/help/config">
1970 <a href="/help/config">
1971 config
1971 config
1972 </a>
1972 </a>
1973 </td><td>
1973 </td><td>
1974 Configuration Files
1974 Configuration Files
1975 </td></tr>
1975 </td></tr>
1976 <tr><td>
1976 <tr><td>
1977 <a href="/help/dates">
1977 <a href="/help/dates">
1978 dates
1978 dates
1979 </a>
1979 </a>
1980 </td><td>
1980 </td><td>
1981 Date Formats
1981 Date Formats
1982 </td></tr>
1982 </td></tr>
1983 <tr><td>
1983 <tr><td>
1984 <a href="/help/diffs">
1984 <a href="/help/diffs">
1985 diffs
1985 diffs
1986 </a>
1986 </a>
1987 </td><td>
1987 </td><td>
1988 Diff Formats
1988 Diff Formats
1989 </td></tr>
1989 </td></tr>
1990 <tr><td>
1990 <tr><td>
1991 <a href="/help/environment">
1991 <a href="/help/environment">
1992 environment
1992 environment
1993 </a>
1993 </a>
1994 </td><td>
1994 </td><td>
1995 Environment Variables
1995 Environment Variables
1996 </td></tr>
1996 </td></tr>
1997 <tr><td>
1997 <tr><td>
1998 <a href="/help/extensions">
1998 <a href="/help/extensions">
1999 extensions
1999 extensions
2000 </a>
2000 </a>
2001 </td><td>
2001 </td><td>
2002 Using Additional Features
2002 Using Additional Features
2003 </td></tr>
2003 </td></tr>
2004 <tr><td>
2004 <tr><td>
2005 <a href="/help/filesets">
2005 <a href="/help/filesets">
2006 filesets
2006 filesets
2007 </a>
2007 </a>
2008 </td><td>
2008 </td><td>
2009 Specifying File Sets
2009 Specifying File Sets
2010 </td></tr>
2010 </td></tr>
2011 <tr><td>
2011 <tr><td>
2012 <a href="/help/glossary">
2012 <a href="/help/glossary">
2013 glossary
2013 glossary
2014 </a>
2014 </a>
2015 </td><td>
2015 </td><td>
2016 Glossary
2016 Glossary
2017 </td></tr>
2017 </td></tr>
2018 <tr><td>
2018 <tr><td>
2019 <a href="/help/hgignore">
2019 <a href="/help/hgignore">
2020 hgignore
2020 hgignore
2021 </a>
2021 </a>
2022 </td><td>
2022 </td><td>
2023 Syntax for Mercurial Ignore Files
2023 Syntax for Mercurial Ignore Files
2024 </td></tr>
2024 </td></tr>
2025 <tr><td>
2025 <tr><td>
2026 <a href="/help/hgweb">
2026 <a href="/help/hgweb">
2027 hgweb
2027 hgweb
2028 </a>
2028 </a>
2029 </td><td>
2029 </td><td>
2030 Configuring hgweb
2030 Configuring hgweb
2031 </td></tr>
2031 </td></tr>
2032 <tr><td>
2032 <tr><td>
2033 <a href="/help/internals">
2033 <a href="/help/internals">
2034 internals
2034 internals
2035 </a>
2035 </a>
2036 </td><td>
2036 </td><td>
2037 Technical implementation topics
2037 Technical implementation topics
2038 </td></tr>
2038 </td></tr>
2039 <tr><td>
2039 <tr><td>
2040 <a href="/help/merge-tools">
2040 <a href="/help/merge-tools">
2041 merge-tools
2041 merge-tools
2042 </a>
2042 </a>
2043 </td><td>
2043 </td><td>
2044 Merge Tools
2044 Merge Tools
2045 </td></tr>
2045 </td></tr>
2046 <tr><td>
2046 <tr><td>
2047 <a href="/help/pager">
2047 <a href="/help/pager">
2048 pager
2048 pager
2049 </a>
2049 </a>
2050 </td><td>
2050 </td><td>
2051 Pager Support
2051 Pager Support
2052 </td></tr>
2052 </td></tr>
2053 <tr><td>
2053 <tr><td>
2054 <a href="/help/patterns">
2054 <a href="/help/patterns">
2055 patterns
2055 patterns
2056 </a>
2056 </a>
2057 </td><td>
2057 </td><td>
2058 File Name Patterns
2058 File Name Patterns
2059 </td></tr>
2059 </td></tr>
2060 <tr><td>
2060 <tr><td>
2061 <a href="/help/phases">
2061 <a href="/help/phases">
2062 phases
2062 phases
2063 </a>
2063 </a>
2064 </td><td>
2064 </td><td>
2065 Working with Phases
2065 Working with Phases
2066 </td></tr>
2066 </td></tr>
2067 <tr><td>
2067 <tr><td>
2068 <a href="/help/revisions">
2068 <a href="/help/revisions">
2069 revisions
2069 revisions
2070 </a>
2070 </a>
2071 </td><td>
2071 </td><td>
2072 Specifying Revisions
2072 Specifying Revisions
2073 </td></tr>
2073 </td></tr>
2074 <tr><td>
2074 <tr><td>
2075 <a href="/help/scripting">
2075 <a href="/help/scripting">
2076 scripting
2076 scripting
2077 </a>
2077 </a>
2078 </td><td>
2078 </td><td>
2079 Using Mercurial from scripts and automation
2079 Using Mercurial from scripts and automation
2080 </td></tr>
2080 </td></tr>
2081 <tr><td>
2081 <tr><td>
2082 <a href="/help/subrepos">
2082 <a href="/help/subrepos">
2083 subrepos
2083 subrepos
2084 </a>
2084 </a>
2085 </td><td>
2085 </td><td>
2086 Subrepositories
2086 Subrepositories
2087 </td></tr>
2087 </td></tr>
2088 <tr><td>
2088 <tr><td>
2089 <a href="/help/templating">
2089 <a href="/help/templating">
2090 templating
2090 templating
2091 </a>
2091 </a>
2092 </td><td>
2092 </td><td>
2093 Template Usage
2093 Template Usage
2094 </td></tr>
2094 </td></tr>
2095 <tr><td>
2095 <tr><td>
2096 <a href="/help/urls">
2096 <a href="/help/urls">
2097 urls
2097 urls
2098 </a>
2098 </a>
2099 </td><td>
2099 </td><td>
2100 URL Paths
2100 URL Paths
2101 </td></tr>
2101 </td></tr>
2102 <tr><td>
2102 <tr><td>
2103 <a href="/help/topic-containing-verbose">
2103 <a href="/help/topic-containing-verbose">
2104 topic-containing-verbose
2104 topic-containing-verbose
2105 </a>
2105 </a>
2106 </td><td>
2106 </td><td>
2107 This is the topic to test omit indicating.
2107 This is the topic to test omit indicating.
2108 </td></tr>
2108 </td></tr>
2109
2109
2110
2110
2111 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2111 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2112
2112
2113 <tr><td>
2113 <tr><td>
2114 <a href="/help/add">
2114 <a href="/help/add">
2115 add
2115 add
2116 </a>
2116 </a>
2117 </td><td>
2117 </td><td>
2118 add the specified files on the next commit
2118 add the specified files on the next commit
2119 </td></tr>
2119 </td></tr>
2120 <tr><td>
2120 <tr><td>
2121 <a href="/help/annotate">
2121 <a href="/help/annotate">
2122 annotate
2122 annotate
2123 </a>
2123 </a>
2124 </td><td>
2124 </td><td>
2125 show changeset information by line for each file
2125 show changeset information by line for each file
2126 </td></tr>
2126 </td></tr>
2127 <tr><td>
2127 <tr><td>
2128 <a href="/help/clone">
2128 <a href="/help/clone">
2129 clone
2129 clone
2130 </a>
2130 </a>
2131 </td><td>
2131 </td><td>
2132 make a copy of an existing repository
2132 make a copy of an existing repository
2133 </td></tr>
2133 </td></tr>
2134 <tr><td>
2134 <tr><td>
2135 <a href="/help/commit">
2135 <a href="/help/commit">
2136 commit
2136 commit
2137 </a>
2137 </a>
2138 </td><td>
2138 </td><td>
2139 commit the specified files or all outstanding changes
2139 commit the specified files or all outstanding changes
2140 </td></tr>
2140 </td></tr>
2141 <tr><td>
2141 <tr><td>
2142 <a href="/help/diff">
2142 <a href="/help/diff">
2143 diff
2143 diff
2144 </a>
2144 </a>
2145 </td><td>
2145 </td><td>
2146 diff repository (or selected files)
2146 diff repository (or selected files)
2147 </td></tr>
2147 </td></tr>
2148 <tr><td>
2148 <tr><td>
2149 <a href="/help/export">
2149 <a href="/help/export">
2150 export
2150 export
2151 </a>
2151 </a>
2152 </td><td>
2152 </td><td>
2153 dump the header and diffs for one or more changesets
2153 dump the header and diffs for one or more changesets
2154 </td></tr>
2154 </td></tr>
2155 <tr><td>
2155 <tr><td>
2156 <a href="/help/forget">
2156 <a href="/help/forget">
2157 forget
2157 forget
2158 </a>
2158 </a>
2159 </td><td>
2159 </td><td>
2160 forget the specified files on the next commit
2160 forget the specified files on the next commit
2161 </td></tr>
2161 </td></tr>
2162 <tr><td>
2162 <tr><td>
2163 <a href="/help/init">
2163 <a href="/help/init">
2164 init
2164 init
2165 </a>
2165 </a>
2166 </td><td>
2166 </td><td>
2167 create a new repository in the given directory
2167 create a new repository in the given directory
2168 </td></tr>
2168 </td></tr>
2169 <tr><td>
2169 <tr><td>
2170 <a href="/help/log">
2170 <a href="/help/log">
2171 log
2171 log
2172 </a>
2172 </a>
2173 </td><td>
2173 </td><td>
2174 show revision history of entire repository or files
2174 show revision history of entire repository or files
2175 </td></tr>
2175 </td></tr>
2176 <tr><td>
2176 <tr><td>
2177 <a href="/help/merge">
2177 <a href="/help/merge">
2178 merge
2178 merge
2179 </a>
2179 </a>
2180 </td><td>
2180 </td><td>
2181 merge another revision into working directory
2181 merge another revision into working directory
2182 </td></tr>
2182 </td></tr>
2183 <tr><td>
2183 <tr><td>
2184 <a href="/help/pull">
2184 <a href="/help/pull">
2185 pull
2185 pull
2186 </a>
2186 </a>
2187 </td><td>
2187 </td><td>
2188 pull changes from the specified source
2188 pull changes from the specified source
2189 </td></tr>
2189 </td></tr>
2190 <tr><td>
2190 <tr><td>
2191 <a href="/help/push">
2191 <a href="/help/push">
2192 push
2192 push
2193 </a>
2193 </a>
2194 </td><td>
2194 </td><td>
2195 push changes to the specified destination
2195 push changes to the specified destination
2196 </td></tr>
2196 </td></tr>
2197 <tr><td>
2197 <tr><td>
2198 <a href="/help/remove">
2198 <a href="/help/remove">
2199 remove
2199 remove
2200 </a>
2200 </a>
2201 </td><td>
2201 </td><td>
2202 remove the specified files on the next commit
2202 remove the specified files on the next commit
2203 </td></tr>
2203 </td></tr>
2204 <tr><td>
2204 <tr><td>
2205 <a href="/help/serve">
2205 <a href="/help/serve">
2206 serve
2206 serve
2207 </a>
2207 </a>
2208 </td><td>
2208 </td><td>
2209 start stand-alone webserver
2209 start stand-alone webserver
2210 </td></tr>
2210 </td></tr>
2211 <tr><td>
2211 <tr><td>
2212 <a href="/help/status">
2212 <a href="/help/status">
2213 status
2213 status
2214 </a>
2214 </a>
2215 </td><td>
2215 </td><td>
2216 show changed files in the working directory
2216 show changed files in the working directory
2217 </td></tr>
2217 </td></tr>
2218 <tr><td>
2218 <tr><td>
2219 <a href="/help/summary">
2219 <a href="/help/summary">
2220 summary
2220 summary
2221 </a>
2221 </a>
2222 </td><td>
2222 </td><td>
2223 summarize working directory state
2223 summarize working directory state
2224 </td></tr>
2224 </td></tr>
2225 <tr><td>
2225 <tr><td>
2226 <a href="/help/update">
2226 <a href="/help/update">
2227 update
2227 update
2228 </a>
2228 </a>
2229 </td><td>
2229 </td><td>
2230 update working directory (or switch revisions)
2230 update working directory (or switch revisions)
2231 </td></tr>
2231 </td></tr>
2232
2232
2233
2233
2234
2234
2235 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2235 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2236
2236
2237 <tr><td>
2237 <tr><td>
2238 <a href="/help/addremove">
2238 <a href="/help/addremove">
2239 addremove
2239 addremove
2240 </a>
2240 </a>
2241 </td><td>
2241 </td><td>
2242 add all new files, delete all missing files
2242 add all new files, delete all missing files
2243 </td></tr>
2243 </td></tr>
2244 <tr><td>
2244 <tr><td>
2245 <a href="/help/archive">
2245 <a href="/help/archive">
2246 archive
2246 archive
2247 </a>
2247 </a>
2248 </td><td>
2248 </td><td>
2249 create an unversioned archive of a repository revision
2249 create an unversioned archive of a repository revision
2250 </td></tr>
2250 </td></tr>
2251 <tr><td>
2251 <tr><td>
2252 <a href="/help/backout">
2252 <a href="/help/backout">
2253 backout
2253 backout
2254 </a>
2254 </a>
2255 </td><td>
2255 </td><td>
2256 reverse effect of earlier changeset
2256 reverse effect of earlier changeset
2257 </td></tr>
2257 </td></tr>
2258 <tr><td>
2258 <tr><td>
2259 <a href="/help/bisect">
2259 <a href="/help/bisect">
2260 bisect
2260 bisect
2261 </a>
2261 </a>
2262 </td><td>
2262 </td><td>
2263 subdivision search of changesets
2263 subdivision search of changesets
2264 </td></tr>
2264 </td></tr>
2265 <tr><td>
2265 <tr><td>
2266 <a href="/help/bookmarks">
2266 <a href="/help/bookmarks">
2267 bookmarks
2267 bookmarks
2268 </a>
2268 </a>
2269 </td><td>
2269 </td><td>
2270 create a new bookmark or list existing bookmarks
2270 create a new bookmark or list existing bookmarks
2271 </td></tr>
2271 </td></tr>
2272 <tr><td>
2272 <tr><td>
2273 <a href="/help/branch">
2273 <a href="/help/branch">
2274 branch
2274 branch
2275 </a>
2275 </a>
2276 </td><td>
2276 </td><td>
2277 set or show the current branch name
2277 set or show the current branch name
2278 </td></tr>
2278 </td></tr>
2279 <tr><td>
2279 <tr><td>
2280 <a href="/help/branches">
2280 <a href="/help/branches">
2281 branches
2281 branches
2282 </a>
2282 </a>
2283 </td><td>
2283 </td><td>
2284 list repository named branches
2284 list repository named branches
2285 </td></tr>
2285 </td></tr>
2286 <tr><td>
2286 <tr><td>
2287 <a href="/help/bundle">
2287 <a href="/help/bundle">
2288 bundle
2288 bundle
2289 </a>
2289 </a>
2290 </td><td>
2290 </td><td>
2291 create a bundle file
2291 create a bundle file
2292 </td></tr>
2292 </td></tr>
2293 <tr><td>
2293 <tr><td>
2294 <a href="/help/cat">
2294 <a href="/help/cat">
2295 cat
2295 cat
2296 </a>
2296 </a>
2297 </td><td>
2297 </td><td>
2298 output the current or given revision of files
2298 output the current or given revision of files
2299 </td></tr>
2299 </td></tr>
2300 <tr><td>
2300 <tr><td>
2301 <a href="/help/config">
2301 <a href="/help/config">
2302 config
2302 config
2303 </a>
2303 </a>
2304 </td><td>
2304 </td><td>
2305 show combined config settings from all hgrc files
2305 show combined config settings from all hgrc files
2306 </td></tr>
2306 </td></tr>
2307 <tr><td>
2307 <tr><td>
2308 <a href="/help/copy">
2308 <a href="/help/copy">
2309 copy
2309 copy
2310 </a>
2310 </a>
2311 </td><td>
2311 </td><td>
2312 mark files as copied for the next commit
2312 mark files as copied for the next commit
2313 </td></tr>
2313 </td></tr>
2314 <tr><td>
2314 <tr><td>
2315 <a href="/help/files">
2315 <a href="/help/files">
2316 files
2316 files
2317 </a>
2317 </a>
2318 </td><td>
2318 </td><td>
2319 list tracked files
2319 list tracked files
2320 </td></tr>
2320 </td></tr>
2321 <tr><td>
2321 <tr><td>
2322 <a href="/help/graft">
2322 <a href="/help/graft">
2323 graft
2323 graft
2324 </a>
2324 </a>
2325 </td><td>
2325 </td><td>
2326 copy changes from other branches onto the current branch
2326 copy changes from other branches onto the current branch
2327 </td></tr>
2327 </td></tr>
2328 <tr><td>
2328 <tr><td>
2329 <a href="/help/grep">
2329 <a href="/help/grep">
2330 grep
2330 grep
2331 </a>
2331 </a>
2332 </td><td>
2332 </td><td>
2333 search revision history for a pattern in specified files
2333 search revision history for a pattern in specified files
2334 </td></tr>
2334 </td></tr>
2335 <tr><td>
2335 <tr><td>
2336 <a href="/help/heads">
2336 <a href="/help/heads">
2337 heads
2337 heads
2338 </a>
2338 </a>
2339 </td><td>
2339 </td><td>
2340 show branch heads
2340 show branch heads
2341 </td></tr>
2341 </td></tr>
2342 <tr><td>
2342 <tr><td>
2343 <a href="/help/help">
2343 <a href="/help/help">
2344 help
2344 help
2345 </a>
2345 </a>
2346 </td><td>
2346 </td><td>
2347 show help for a given topic or a help overview
2347 show help for a given topic or a help overview
2348 </td></tr>
2348 </td></tr>
2349 <tr><td>
2349 <tr><td>
2350 <a href="/help/hgalias">
2350 <a href="/help/hgalias">
2351 hgalias
2351 hgalias
2352 </a>
2352 </a>
2353 </td><td>
2353 </td><td>
2354 summarize working directory state
2354 summarize working directory state
2355 </td></tr>
2355 </td></tr>
2356 <tr><td>
2356 <tr><td>
2357 <a href="/help/identify">
2357 <a href="/help/identify">
2358 identify
2358 identify
2359 </a>
2359 </a>
2360 </td><td>
2360 </td><td>
2361 identify the working directory or specified revision
2361 identify the working directory or specified revision
2362 </td></tr>
2362 </td></tr>
2363 <tr><td>
2363 <tr><td>
2364 <a href="/help/import">
2364 <a href="/help/import">
2365 import
2365 import
2366 </a>
2366 </a>
2367 </td><td>
2367 </td><td>
2368 import an ordered set of patches
2368 import an ordered set of patches
2369 </td></tr>
2369 </td></tr>
2370 <tr><td>
2370 <tr><td>
2371 <a href="/help/incoming">
2371 <a href="/help/incoming">
2372 incoming
2372 incoming
2373 </a>
2373 </a>
2374 </td><td>
2374 </td><td>
2375 show new changesets found in source
2375 show new changesets found in source
2376 </td></tr>
2376 </td></tr>
2377 <tr><td>
2377 <tr><td>
2378 <a href="/help/manifest">
2378 <a href="/help/manifest">
2379 manifest
2379 manifest
2380 </a>
2380 </a>
2381 </td><td>
2381 </td><td>
2382 output the current or given revision of the project manifest
2382 output the current or given revision of the project manifest
2383 </td></tr>
2383 </td></tr>
2384 <tr><td>
2384 <tr><td>
2385 <a href="/help/nohelp">
2385 <a href="/help/nohelp">
2386 nohelp
2386 nohelp
2387 </a>
2387 </a>
2388 </td><td>
2388 </td><td>
2389 (no help text available)
2389 (no help text available)
2390 </td></tr>
2390 </td></tr>
2391 <tr><td>
2391 <tr><td>
2392 <a href="/help/outgoing">
2392 <a href="/help/outgoing">
2393 outgoing
2393 outgoing
2394 </a>
2394 </a>
2395 </td><td>
2395 </td><td>
2396 show changesets not found in the destination
2396 show changesets not found in the destination
2397 </td></tr>
2397 </td></tr>
2398 <tr><td>
2398 <tr><td>
2399 <a href="/help/paths">
2399 <a href="/help/paths">
2400 paths
2400 paths
2401 </a>
2401 </a>
2402 </td><td>
2402 </td><td>
2403 show aliases for remote repositories
2403 show aliases for remote repositories
2404 </td></tr>
2404 </td></tr>
2405 <tr><td>
2405 <tr><td>
2406 <a href="/help/phase">
2406 <a href="/help/phase">
2407 phase
2407 phase
2408 </a>
2408 </a>
2409 </td><td>
2409 </td><td>
2410 set or show the current phase name
2410 set or show the current phase name
2411 </td></tr>
2411 </td></tr>
2412 <tr><td>
2412 <tr><td>
2413 <a href="/help/recover">
2413 <a href="/help/recover">
2414 recover
2414 recover
2415 </a>
2415 </a>
2416 </td><td>
2416 </td><td>
2417 roll back an interrupted transaction
2417 roll back an interrupted transaction
2418 </td></tr>
2418 </td></tr>
2419 <tr><td>
2419 <tr><td>
2420 <a href="/help/rename">
2420 <a href="/help/rename">
2421 rename
2421 rename
2422 </a>
2422 </a>
2423 </td><td>
2423 </td><td>
2424 rename files; equivalent of copy + remove
2424 rename files; equivalent of copy + remove
2425 </td></tr>
2425 </td></tr>
2426 <tr><td>
2426 <tr><td>
2427 <a href="/help/resolve">
2427 <a href="/help/resolve">
2428 resolve
2428 resolve
2429 </a>
2429 </a>
2430 </td><td>
2430 </td><td>
2431 redo merges or set/view the merge status of files
2431 redo merges or set/view the merge status of files
2432 </td></tr>
2432 </td></tr>
2433 <tr><td>
2433 <tr><td>
2434 <a href="/help/revert">
2434 <a href="/help/revert">
2435 revert
2435 revert
2436 </a>
2436 </a>
2437 </td><td>
2437 </td><td>
2438 restore files to their checkout state
2438 restore files to their checkout state
2439 </td></tr>
2439 </td></tr>
2440 <tr><td>
2440 <tr><td>
2441 <a href="/help/root">
2441 <a href="/help/root">
2442 root
2442 root
2443 </a>
2443 </a>
2444 </td><td>
2444 </td><td>
2445 print the root (top) of the current working directory
2445 print the root (top) of the current working directory
2446 </td></tr>
2446 </td></tr>
2447 <tr><td>
2447 <tr><td>
2448 <a href="/help/shellalias">
2448 <a href="/help/shellalias">
2449 shellalias
2449 shellalias
2450 </a>
2450 </a>
2451 </td><td>
2451 </td><td>
2452 (no help text available)
2452 (no help text available)
2453 </td></tr>
2453 </td></tr>
2454 <tr><td>
2454 <tr><td>
2455 <a href="/help/tag">
2455 <a href="/help/tag">
2456 tag
2456 tag
2457 </a>
2457 </a>
2458 </td><td>
2458 </td><td>
2459 add one or more tags for the current or given revision
2459 add one or more tags for the current or given revision
2460 </td></tr>
2460 </td></tr>
2461 <tr><td>
2461 <tr><td>
2462 <a href="/help/tags">
2462 <a href="/help/tags">
2463 tags
2463 tags
2464 </a>
2464 </a>
2465 </td><td>
2465 </td><td>
2466 list repository tags
2466 list repository tags
2467 </td></tr>
2467 </td></tr>
2468 <tr><td>
2468 <tr><td>
2469 <a href="/help/unbundle">
2469 <a href="/help/unbundle">
2470 unbundle
2470 unbundle
2471 </a>
2471 </a>
2472 </td><td>
2472 </td><td>
2473 apply one or more bundle files
2473 apply one or more bundle files
2474 </td></tr>
2474 </td></tr>
2475 <tr><td>
2475 <tr><td>
2476 <a href="/help/verify">
2476 <a href="/help/verify">
2477 verify
2477 verify
2478 </a>
2478 </a>
2479 </td><td>
2479 </td><td>
2480 verify the integrity of the repository
2480 verify the integrity of the repository
2481 </td></tr>
2481 </td></tr>
2482 <tr><td>
2482 <tr><td>
2483 <a href="/help/version">
2483 <a href="/help/version">
2484 version
2484 version
2485 </a>
2485 </a>
2486 </td><td>
2486 </td><td>
2487 output version and copyright information
2487 output version and copyright information
2488 </td></tr>
2488 </td></tr>
2489
2489
2490
2490
2491 </table>
2491 </table>
2492 </div>
2492 </div>
2493 </div>
2493 </div>
2494
2494
2495
2495
2496
2496
2497 </body>
2497 </body>
2498 </html>
2498 </html>
2499
2499
2500
2500
2501 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2501 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2502 200 Script output follows
2502 200 Script output follows
2503
2503
2504 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2504 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2505 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2505 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2506 <head>
2506 <head>
2507 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2507 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2508 <meta name="robots" content="index, nofollow" />
2508 <meta name="robots" content="index, nofollow" />
2509 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2509 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2510 <script type="text/javascript" src="/static/mercurial.js"></script>
2510 <script type="text/javascript" src="/static/mercurial.js"></script>
2511
2511
2512 <title>Help: add</title>
2512 <title>Help: add</title>
2513 </head>
2513 </head>
2514 <body>
2514 <body>
2515
2515
2516 <div class="container">
2516 <div class="container">
2517 <div class="menu">
2517 <div class="menu">
2518 <div class="logo">
2518 <div class="logo">
2519 <a href="https://mercurial-scm.org/">
2519 <a href="https://mercurial-scm.org/">
2520 <img src="/static/hglogo.png" alt="mercurial" /></a>
2520 <img src="/static/hglogo.png" alt="mercurial" /></a>
2521 </div>
2521 </div>
2522 <ul>
2522 <ul>
2523 <li><a href="/shortlog">log</a></li>
2523 <li><a href="/shortlog">log</a></li>
2524 <li><a href="/graph">graph</a></li>
2524 <li><a href="/graph">graph</a></li>
2525 <li><a href="/tags">tags</a></li>
2525 <li><a href="/tags">tags</a></li>
2526 <li><a href="/bookmarks">bookmarks</a></li>
2526 <li><a href="/bookmarks">bookmarks</a></li>
2527 <li><a href="/branches">branches</a></li>
2527 <li><a href="/branches">branches</a></li>
2528 </ul>
2528 </ul>
2529 <ul>
2529 <ul>
2530 <li class="active"><a href="/help">help</a></li>
2530 <li class="active"><a href="/help">help</a></li>
2531 </ul>
2531 </ul>
2532 </div>
2532 </div>
2533
2533
2534 <div class="main">
2534 <div class="main">
2535 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2535 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2536 <h3>Help: add</h3>
2536 <h3>Help: add</h3>
2537
2537
2538 <form class="search" action="/log">
2538 <form class="search" action="/log">
2539
2539
2540 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2540 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2541 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2541 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2542 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2542 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2543 </form>
2543 </form>
2544 <div id="doc">
2544 <div id="doc">
2545 <p>
2545 <p>
2546 hg add [OPTION]... [FILE]...
2546 hg add [OPTION]... [FILE]...
2547 </p>
2547 </p>
2548 <p>
2548 <p>
2549 add the specified files on the next commit
2549 add the specified files on the next commit
2550 </p>
2550 </p>
2551 <p>
2551 <p>
2552 Schedule files to be version controlled and added to the
2552 Schedule files to be version controlled and added to the
2553 repository.
2553 repository.
2554 </p>
2554 </p>
2555 <p>
2555 <p>
2556 The files will be added to the repository at the next commit. To
2556 The files will be added to the repository at the next commit. To
2557 undo an add before that, see 'hg forget'.
2557 undo an add before that, see 'hg forget'.
2558 </p>
2558 </p>
2559 <p>
2559 <p>
2560 If no names are given, add all files to the repository (except
2560 If no names are given, add all files to the repository (except
2561 files matching &quot;.hgignore&quot;).
2561 files matching &quot;.hgignore&quot;).
2562 </p>
2562 </p>
2563 <p>
2563 <p>
2564 Examples:
2564 Examples:
2565 </p>
2565 </p>
2566 <ul>
2566 <ul>
2567 <li> New (unknown) files are added automatically by 'hg add':
2567 <li> New (unknown) files are added automatically by 'hg add':
2568 <pre>
2568 <pre>
2569 \$ ls (re)
2569 \$ ls (re)
2570 foo.c
2570 foo.c
2571 \$ hg status (re)
2571 \$ hg status (re)
2572 ? foo.c
2572 ? foo.c
2573 \$ hg add (re)
2573 \$ hg add (re)
2574 adding foo.c
2574 adding foo.c
2575 \$ hg status (re)
2575 \$ hg status (re)
2576 A foo.c
2576 A foo.c
2577 </pre>
2577 </pre>
2578 <li> Specific files to be added can be specified:
2578 <li> Specific files to be added can be specified:
2579 <pre>
2579 <pre>
2580 \$ ls (re)
2580 \$ ls (re)
2581 bar.c foo.c
2581 bar.c foo.c
2582 \$ hg status (re)
2582 \$ hg status (re)
2583 ? bar.c
2583 ? bar.c
2584 ? foo.c
2584 ? foo.c
2585 \$ hg add bar.c (re)
2585 \$ hg add bar.c (re)
2586 \$ hg status (re)
2586 \$ hg status (re)
2587 A bar.c
2587 A bar.c
2588 ? foo.c
2588 ? foo.c
2589 </pre>
2589 </pre>
2590 </ul>
2590 </ul>
2591 <p>
2591 <p>
2592 Returns 0 if all files are successfully added.
2592 Returns 0 if all files are successfully added.
2593 </p>
2593 </p>
2594 <p>
2594 <p>
2595 options ([+] can be repeated):
2595 options ([+] can be repeated):
2596 </p>
2596 </p>
2597 <table>
2597 <table>
2598 <tr><td>-I</td>
2598 <tr><td>-I</td>
2599 <td>--include PATTERN [+]</td>
2599 <td>--include PATTERN [+]</td>
2600 <td>include names matching the given patterns</td></tr>
2600 <td>include names matching the given patterns</td></tr>
2601 <tr><td>-X</td>
2601 <tr><td>-X</td>
2602 <td>--exclude PATTERN [+]</td>
2602 <td>--exclude PATTERN [+]</td>
2603 <td>exclude names matching the given patterns</td></tr>
2603 <td>exclude names matching the given patterns</td></tr>
2604 <tr><td>-S</td>
2604 <tr><td>-S</td>
2605 <td>--subrepos</td>
2605 <td>--subrepos</td>
2606 <td>recurse into subrepositories</td></tr>
2606 <td>recurse into subrepositories</td></tr>
2607 <tr><td>-n</td>
2607 <tr><td>-n</td>
2608 <td>--dry-run</td>
2608 <td>--dry-run</td>
2609 <td>do not perform actions, just print output</td></tr>
2609 <td>do not perform actions, just print output</td></tr>
2610 </table>
2610 </table>
2611 <p>
2611 <p>
2612 global options ([+] can be repeated):
2612 global options ([+] can be repeated):
2613 </p>
2613 </p>
2614 <table>
2614 <table>
2615 <tr><td>-R</td>
2615 <tr><td>-R</td>
2616 <td>--repository REPO</td>
2616 <td>--repository REPO</td>
2617 <td>repository root directory or name of overlay bundle file</td></tr>
2617 <td>repository root directory or name of overlay bundle file</td></tr>
2618 <tr><td></td>
2618 <tr><td></td>
2619 <td>--cwd DIR</td>
2619 <td>--cwd DIR</td>
2620 <td>change working directory</td></tr>
2620 <td>change working directory</td></tr>
2621 <tr><td>-y</td>
2621 <tr><td>-y</td>
2622 <td>--noninteractive</td>
2622 <td>--noninteractive</td>
2623 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2623 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2624 <tr><td>-q</td>
2624 <tr><td>-q</td>
2625 <td>--quiet</td>
2625 <td>--quiet</td>
2626 <td>suppress output</td></tr>
2626 <td>suppress output</td></tr>
2627 <tr><td>-v</td>
2627 <tr><td>-v</td>
2628 <td>--verbose</td>
2628 <td>--verbose</td>
2629 <td>enable additional output</td></tr>
2629 <td>enable additional output</td></tr>
2630 <tr><td></td>
2630 <tr><td></td>
2631 <td>--color TYPE</td>
2631 <td>--color TYPE</td>
2632 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2632 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2633 <tr><td></td>
2633 <tr><td></td>
2634 <td>--config CONFIG [+]</td>
2634 <td>--config CONFIG [+]</td>
2635 <td>set/override config option (use 'section.name=value')</td></tr>
2635 <td>set/override config option (use 'section.name=value')</td></tr>
2636 <tr><td></td>
2636 <tr><td></td>
2637 <td>--debug</td>
2637 <td>--debug</td>
2638 <td>enable debugging output</td></tr>
2638 <td>enable debugging output</td></tr>
2639 <tr><td></td>
2639 <tr><td></td>
2640 <td>--debugger</td>
2640 <td>--debugger</td>
2641 <td>start debugger</td></tr>
2641 <td>start debugger</td></tr>
2642 <tr><td></td>
2642 <tr><td></td>
2643 <td>--encoding ENCODE</td>
2643 <td>--encoding ENCODE</td>
2644 <td>set the charset encoding (default: ascii)</td></tr>
2644 <td>set the charset encoding (default: ascii)</td></tr>
2645 <tr><td></td>
2645 <tr><td></td>
2646 <td>--encodingmode MODE</td>
2646 <td>--encodingmode MODE</td>
2647 <td>set the charset encoding mode (default: strict)</td></tr>
2647 <td>set the charset encoding mode (default: strict)</td></tr>
2648 <tr><td></td>
2648 <tr><td></td>
2649 <td>--traceback</td>
2649 <td>--traceback</td>
2650 <td>always print a traceback on exception</td></tr>
2650 <td>always print a traceback on exception</td></tr>
2651 <tr><td></td>
2651 <tr><td></td>
2652 <td>--time</td>
2652 <td>--time</td>
2653 <td>time how long the command takes</td></tr>
2653 <td>time how long the command takes</td></tr>
2654 <tr><td></td>
2654 <tr><td></td>
2655 <td>--profile</td>
2655 <td>--profile</td>
2656 <td>print command execution profile</td></tr>
2656 <td>print command execution profile</td></tr>
2657 <tr><td></td>
2657 <tr><td></td>
2658 <td>--version</td>
2658 <td>--version</td>
2659 <td>output version information and exit</td></tr>
2659 <td>output version information and exit</td></tr>
2660 <tr><td>-h</td>
2660 <tr><td>-h</td>
2661 <td>--help</td>
2661 <td>--help</td>
2662 <td>display help and exit</td></tr>
2662 <td>display help and exit</td></tr>
2663 <tr><td></td>
2663 <tr><td></td>
2664 <td>--hidden</td>
2664 <td>--hidden</td>
2665 <td>consider hidden changesets</td></tr>
2665 <td>consider hidden changesets</td></tr>
2666 <tr><td></td>
2666 <tr><td></td>
2667 <td>--pager TYPE</td>
2667 <td>--pager TYPE</td>
2668 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2668 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2669 </table>
2669 </table>
2670
2670
2671 </div>
2671 </div>
2672 </div>
2672 </div>
2673 </div>
2673 </div>
2674
2674
2675
2675
2676
2676
2677 </body>
2677 </body>
2678 </html>
2678 </html>
2679
2679
2680
2680
2681 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2681 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2682 200 Script output follows
2682 200 Script output follows
2683
2683
2684 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2684 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2685 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2685 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2686 <head>
2686 <head>
2687 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2687 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2688 <meta name="robots" content="index, nofollow" />
2688 <meta name="robots" content="index, nofollow" />
2689 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2689 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2690 <script type="text/javascript" src="/static/mercurial.js"></script>
2690 <script type="text/javascript" src="/static/mercurial.js"></script>
2691
2691
2692 <title>Help: remove</title>
2692 <title>Help: remove</title>
2693 </head>
2693 </head>
2694 <body>
2694 <body>
2695
2695
2696 <div class="container">
2696 <div class="container">
2697 <div class="menu">
2697 <div class="menu">
2698 <div class="logo">
2698 <div class="logo">
2699 <a href="https://mercurial-scm.org/">
2699 <a href="https://mercurial-scm.org/">
2700 <img src="/static/hglogo.png" alt="mercurial" /></a>
2700 <img src="/static/hglogo.png" alt="mercurial" /></a>
2701 </div>
2701 </div>
2702 <ul>
2702 <ul>
2703 <li><a href="/shortlog">log</a></li>
2703 <li><a href="/shortlog">log</a></li>
2704 <li><a href="/graph">graph</a></li>
2704 <li><a href="/graph">graph</a></li>
2705 <li><a href="/tags">tags</a></li>
2705 <li><a href="/tags">tags</a></li>
2706 <li><a href="/bookmarks">bookmarks</a></li>
2706 <li><a href="/bookmarks">bookmarks</a></li>
2707 <li><a href="/branches">branches</a></li>
2707 <li><a href="/branches">branches</a></li>
2708 </ul>
2708 </ul>
2709 <ul>
2709 <ul>
2710 <li class="active"><a href="/help">help</a></li>
2710 <li class="active"><a href="/help">help</a></li>
2711 </ul>
2711 </ul>
2712 </div>
2712 </div>
2713
2713
2714 <div class="main">
2714 <div class="main">
2715 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2715 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2716 <h3>Help: remove</h3>
2716 <h3>Help: remove</h3>
2717
2717
2718 <form class="search" action="/log">
2718 <form class="search" action="/log">
2719
2719
2720 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2720 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2721 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2721 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2722 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2722 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2723 </form>
2723 </form>
2724 <div id="doc">
2724 <div id="doc">
2725 <p>
2725 <p>
2726 hg remove [OPTION]... FILE...
2726 hg remove [OPTION]... FILE...
2727 </p>
2727 </p>
2728 <p>
2728 <p>
2729 aliases: rm
2729 aliases: rm
2730 </p>
2730 </p>
2731 <p>
2731 <p>
2732 remove the specified files on the next commit
2732 remove the specified files on the next commit
2733 </p>
2733 </p>
2734 <p>
2734 <p>
2735 Schedule the indicated files for removal from the current branch.
2735 Schedule the indicated files for removal from the current branch.
2736 </p>
2736 </p>
2737 <p>
2737 <p>
2738 This command schedules the files to be removed at the next commit.
2738 This command schedules the files to be removed at the next commit.
2739 To undo a remove before that, see 'hg revert'. To undo added
2739 To undo a remove before that, see 'hg revert'. To undo added
2740 files, see 'hg forget'.
2740 files, see 'hg forget'.
2741 </p>
2741 </p>
2742 <p>
2742 <p>
2743 -A/--after can be used to remove only files that have already
2743 -A/--after can be used to remove only files that have already
2744 been deleted, -f/--force can be used to force deletion, and -Af
2744 been deleted, -f/--force can be used to force deletion, and -Af
2745 can be used to remove files from the next revision without
2745 can be used to remove files from the next revision without
2746 deleting them from the working directory.
2746 deleting them from the working directory.
2747 </p>
2747 </p>
2748 <p>
2748 <p>
2749 The following table details the behavior of remove for different
2749 The following table details the behavior of remove for different
2750 file states (columns) and option combinations (rows). The file
2750 file states (columns) and option combinations (rows). The file
2751 states are Added [A], Clean [C], Modified [M] and Missing [!]
2751 states are Added [A], Clean [C], Modified [M] and Missing [!]
2752 (as reported by 'hg status'). The actions are Warn, Remove
2752 (as reported by 'hg status'). The actions are Warn, Remove
2753 (from branch) and Delete (from disk):
2753 (from branch) and Delete (from disk):
2754 </p>
2754 </p>
2755 <table>
2755 <table>
2756 <tr><td>opt/state</td>
2756 <tr><td>opt/state</td>
2757 <td>A</td>
2757 <td>A</td>
2758 <td>C</td>
2758 <td>C</td>
2759 <td>M</td>
2759 <td>M</td>
2760 <td>!</td></tr>
2760 <td>!</td></tr>
2761 <tr><td>none</td>
2761 <tr><td>none</td>
2762 <td>W</td>
2762 <td>W</td>
2763 <td>RD</td>
2763 <td>RD</td>
2764 <td>W</td>
2764 <td>W</td>
2765 <td>R</td></tr>
2765 <td>R</td></tr>
2766 <tr><td>-f</td>
2766 <tr><td>-f</td>
2767 <td>R</td>
2767 <td>R</td>
2768 <td>RD</td>
2768 <td>RD</td>
2769 <td>RD</td>
2769 <td>RD</td>
2770 <td>R</td></tr>
2770 <td>R</td></tr>
2771 <tr><td>-A</td>
2771 <tr><td>-A</td>
2772 <td>W</td>
2772 <td>W</td>
2773 <td>W</td>
2773 <td>W</td>
2774 <td>W</td>
2774 <td>W</td>
2775 <td>R</td></tr>
2775 <td>R</td></tr>
2776 <tr><td>-Af</td>
2776 <tr><td>-Af</td>
2777 <td>R</td>
2777 <td>R</td>
2778 <td>R</td>
2778 <td>R</td>
2779 <td>R</td>
2779 <td>R</td>
2780 <td>R</td></tr>
2780 <td>R</td></tr>
2781 </table>
2781 </table>
2782 <p>
2782 <p>
2783 <b>Note:</b>
2783 <b>Note:</b>
2784 </p>
2784 </p>
2785 <p>
2785 <p>
2786 'hg remove' never deletes files in Added [A] state from the
2786 'hg remove' never deletes files in Added [A] state from the
2787 working directory, not even if &quot;--force&quot; is specified.
2787 working directory, not even if &quot;--force&quot; is specified.
2788 </p>
2788 </p>
2789 <p>
2789 <p>
2790 Returns 0 on success, 1 if any warnings encountered.
2790 Returns 0 on success, 1 if any warnings encountered.
2791 </p>
2791 </p>
2792 <p>
2792 <p>
2793 options ([+] can be repeated):
2793 options ([+] can be repeated):
2794 </p>
2794 </p>
2795 <table>
2795 <table>
2796 <tr><td>-A</td>
2796 <tr><td>-A</td>
2797 <td>--after</td>
2797 <td>--after</td>
2798 <td>record delete for missing files</td></tr>
2798 <td>record delete for missing files</td></tr>
2799 <tr><td>-f</td>
2799 <tr><td>-f</td>
2800 <td>--force</td>
2800 <td>--force</td>
2801 <td>forget added files, delete modified files</td></tr>
2801 <td>forget added files, delete modified files</td></tr>
2802 <tr><td>-S</td>
2802 <tr><td>-S</td>
2803 <td>--subrepos</td>
2803 <td>--subrepos</td>
2804 <td>recurse into subrepositories</td></tr>
2804 <td>recurse into subrepositories</td></tr>
2805 <tr><td>-I</td>
2805 <tr><td>-I</td>
2806 <td>--include PATTERN [+]</td>
2806 <td>--include PATTERN [+]</td>
2807 <td>include names matching the given patterns</td></tr>
2807 <td>include names matching the given patterns</td></tr>
2808 <tr><td>-X</td>
2808 <tr><td>-X</td>
2809 <td>--exclude PATTERN [+]</td>
2809 <td>--exclude PATTERN [+]</td>
2810 <td>exclude names matching the given patterns</td></tr>
2810 <td>exclude names matching the given patterns</td></tr>
2811 </table>
2811 </table>
2812 <p>
2812 <p>
2813 global options ([+] can be repeated):
2813 global options ([+] can be repeated):
2814 </p>
2814 </p>
2815 <table>
2815 <table>
2816 <tr><td>-R</td>
2816 <tr><td>-R</td>
2817 <td>--repository REPO</td>
2817 <td>--repository REPO</td>
2818 <td>repository root directory or name of overlay bundle file</td></tr>
2818 <td>repository root directory or name of overlay bundle file</td></tr>
2819 <tr><td></td>
2819 <tr><td></td>
2820 <td>--cwd DIR</td>
2820 <td>--cwd DIR</td>
2821 <td>change working directory</td></tr>
2821 <td>change working directory</td></tr>
2822 <tr><td>-y</td>
2822 <tr><td>-y</td>
2823 <td>--noninteractive</td>
2823 <td>--noninteractive</td>
2824 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2824 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2825 <tr><td>-q</td>
2825 <tr><td>-q</td>
2826 <td>--quiet</td>
2826 <td>--quiet</td>
2827 <td>suppress output</td></tr>
2827 <td>suppress output</td></tr>
2828 <tr><td>-v</td>
2828 <tr><td>-v</td>
2829 <td>--verbose</td>
2829 <td>--verbose</td>
2830 <td>enable additional output</td></tr>
2830 <td>enable additional output</td></tr>
2831 <tr><td></td>
2831 <tr><td></td>
2832 <td>--color TYPE</td>
2832 <td>--color TYPE</td>
2833 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2833 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2834 <tr><td></td>
2834 <tr><td></td>
2835 <td>--config CONFIG [+]</td>
2835 <td>--config CONFIG [+]</td>
2836 <td>set/override config option (use 'section.name=value')</td></tr>
2836 <td>set/override config option (use 'section.name=value')</td></tr>
2837 <tr><td></td>
2837 <tr><td></td>
2838 <td>--debug</td>
2838 <td>--debug</td>
2839 <td>enable debugging output</td></tr>
2839 <td>enable debugging output</td></tr>
2840 <tr><td></td>
2840 <tr><td></td>
2841 <td>--debugger</td>
2841 <td>--debugger</td>
2842 <td>start debugger</td></tr>
2842 <td>start debugger</td></tr>
2843 <tr><td></td>
2843 <tr><td></td>
2844 <td>--encoding ENCODE</td>
2844 <td>--encoding ENCODE</td>
2845 <td>set the charset encoding (default: ascii)</td></tr>
2845 <td>set the charset encoding (default: ascii)</td></tr>
2846 <tr><td></td>
2846 <tr><td></td>
2847 <td>--encodingmode MODE</td>
2847 <td>--encodingmode MODE</td>
2848 <td>set the charset encoding mode (default: strict)</td></tr>
2848 <td>set the charset encoding mode (default: strict)</td></tr>
2849 <tr><td></td>
2849 <tr><td></td>
2850 <td>--traceback</td>
2850 <td>--traceback</td>
2851 <td>always print a traceback on exception</td></tr>
2851 <td>always print a traceback on exception</td></tr>
2852 <tr><td></td>
2852 <tr><td></td>
2853 <td>--time</td>
2853 <td>--time</td>
2854 <td>time how long the command takes</td></tr>
2854 <td>time how long the command takes</td></tr>
2855 <tr><td></td>
2855 <tr><td></td>
2856 <td>--profile</td>
2856 <td>--profile</td>
2857 <td>print command execution profile</td></tr>
2857 <td>print command execution profile</td></tr>
2858 <tr><td></td>
2858 <tr><td></td>
2859 <td>--version</td>
2859 <td>--version</td>
2860 <td>output version information and exit</td></tr>
2860 <td>output version information and exit</td></tr>
2861 <tr><td>-h</td>
2861 <tr><td>-h</td>
2862 <td>--help</td>
2862 <td>--help</td>
2863 <td>display help and exit</td></tr>
2863 <td>display help and exit</td></tr>
2864 <tr><td></td>
2864 <tr><td></td>
2865 <td>--hidden</td>
2865 <td>--hidden</td>
2866 <td>consider hidden changesets</td></tr>
2866 <td>consider hidden changesets</td></tr>
2867 <tr><td></td>
2867 <tr><td></td>
2868 <td>--pager TYPE</td>
2868 <td>--pager TYPE</td>
2869 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2869 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2870 </table>
2870 </table>
2871
2871
2872 </div>
2872 </div>
2873 </div>
2873 </div>
2874 </div>
2874 </div>
2875
2875
2876
2876
2877
2877
2878 </body>
2878 </body>
2879 </html>
2879 </html>
2880
2880
2881
2881
2882 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2882 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2883 200 Script output follows
2883 200 Script output follows
2884
2884
2885 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2885 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2886 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2886 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2887 <head>
2887 <head>
2888 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2888 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2889 <meta name="robots" content="index, nofollow" />
2889 <meta name="robots" content="index, nofollow" />
2890 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2890 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2891 <script type="text/javascript" src="/static/mercurial.js"></script>
2891 <script type="text/javascript" src="/static/mercurial.js"></script>
2892
2892
2893 <title>Help: dates</title>
2893 <title>Help: dates</title>
2894 </head>
2894 </head>
2895 <body>
2895 <body>
2896
2896
2897 <div class="container">
2897 <div class="container">
2898 <div class="menu">
2898 <div class="menu">
2899 <div class="logo">
2899 <div class="logo">
2900 <a href="https://mercurial-scm.org/">
2900 <a href="https://mercurial-scm.org/">
2901 <img src="/static/hglogo.png" alt="mercurial" /></a>
2901 <img src="/static/hglogo.png" alt="mercurial" /></a>
2902 </div>
2902 </div>
2903 <ul>
2903 <ul>
2904 <li><a href="/shortlog">log</a></li>
2904 <li><a href="/shortlog">log</a></li>
2905 <li><a href="/graph">graph</a></li>
2905 <li><a href="/graph">graph</a></li>
2906 <li><a href="/tags">tags</a></li>
2906 <li><a href="/tags">tags</a></li>
2907 <li><a href="/bookmarks">bookmarks</a></li>
2907 <li><a href="/bookmarks">bookmarks</a></li>
2908 <li><a href="/branches">branches</a></li>
2908 <li><a href="/branches">branches</a></li>
2909 </ul>
2909 </ul>
2910 <ul>
2910 <ul>
2911 <li class="active"><a href="/help">help</a></li>
2911 <li class="active"><a href="/help">help</a></li>
2912 </ul>
2912 </ul>
2913 </div>
2913 </div>
2914
2914
2915 <div class="main">
2915 <div class="main">
2916 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2916 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2917 <h3>Help: dates</h3>
2917 <h3>Help: dates</h3>
2918
2918
2919 <form class="search" action="/log">
2919 <form class="search" action="/log">
2920
2920
2921 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2921 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2922 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2922 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2923 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2923 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2924 </form>
2924 </form>
2925 <div id="doc">
2925 <div id="doc">
2926 <h1>Date Formats</h1>
2926 <h1>Date Formats</h1>
2927 <p>
2927 <p>
2928 Some commands allow the user to specify a date, e.g.:
2928 Some commands allow the user to specify a date, e.g.:
2929 </p>
2929 </p>
2930 <ul>
2930 <ul>
2931 <li> backout, commit, import, tag: Specify the commit date.
2931 <li> backout, commit, import, tag: Specify the commit date.
2932 <li> log, revert, update: Select revision(s) by date.
2932 <li> log, revert, update: Select revision(s) by date.
2933 </ul>
2933 </ul>
2934 <p>
2934 <p>
2935 Many date formats are valid. Here are some examples:
2935 Many date formats are valid. Here are some examples:
2936 </p>
2936 </p>
2937 <ul>
2937 <ul>
2938 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2938 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2939 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2939 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2940 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2940 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2941 <li> &quot;Dec 6&quot; (midnight)
2941 <li> &quot;Dec 6&quot; (midnight)
2942 <li> &quot;13:18&quot; (today assumed)
2942 <li> &quot;13:18&quot; (today assumed)
2943 <li> &quot;3:39&quot; (3:39AM assumed)
2943 <li> &quot;3:39&quot; (3:39AM assumed)
2944 <li> &quot;3:39pm&quot; (15:39)
2944 <li> &quot;3:39pm&quot; (15:39)
2945 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2945 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2946 <li> &quot;2006-12-6 13:18&quot;
2946 <li> &quot;2006-12-6 13:18&quot;
2947 <li> &quot;2006-12-6&quot;
2947 <li> &quot;2006-12-6&quot;
2948 <li> &quot;12-6&quot;
2948 <li> &quot;12-6&quot;
2949 <li> &quot;12/6&quot;
2949 <li> &quot;12/6&quot;
2950 <li> &quot;12/6/6&quot; (Dec 6 2006)
2950 <li> &quot;12/6/6&quot; (Dec 6 2006)
2951 <li> &quot;today&quot; (midnight)
2951 <li> &quot;today&quot; (midnight)
2952 <li> &quot;yesterday&quot; (midnight)
2952 <li> &quot;yesterday&quot; (midnight)
2953 <li> &quot;now&quot; - right now
2953 <li> &quot;now&quot; - right now
2954 </ul>
2954 </ul>
2955 <p>
2955 <p>
2956 Lastly, there is Mercurial's internal format:
2956 Lastly, there is Mercurial's internal format:
2957 </p>
2957 </p>
2958 <ul>
2958 <ul>
2959 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
2959 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
2960 </ul>
2960 </ul>
2961 <p>
2961 <p>
2962 This is the internal representation format for dates. The first number
2962 This is the internal representation format for dates. The first number
2963 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
2963 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
2964 second is the offset of the local timezone, in seconds west of UTC
2964 second is the offset of the local timezone, in seconds west of UTC
2965 (negative if the timezone is east of UTC).
2965 (negative if the timezone is east of UTC).
2966 </p>
2966 </p>
2967 <p>
2967 <p>
2968 The log command also accepts date ranges:
2968 The log command also accepts date ranges:
2969 </p>
2969 </p>
2970 <ul>
2970 <ul>
2971 <li> &quot;&lt;DATE&quot; - at or before a given date/time
2971 <li> &quot;&lt;DATE&quot; - at or before a given date/time
2972 <li> &quot;&gt;DATE&quot; - on or after a given date/time
2972 <li> &quot;&gt;DATE&quot; - on or after a given date/time
2973 <li> &quot;DATE to DATE&quot; - a date range, inclusive
2973 <li> &quot;DATE to DATE&quot; - a date range, inclusive
2974 <li> &quot;-DAYS&quot; - within a given number of days of today
2974 <li> &quot;-DAYS&quot; - within a given number of days of today
2975 </ul>
2975 </ul>
2976
2976
2977 </div>
2977 </div>
2978 </div>
2978 </div>
2979 </div>
2979 </div>
2980
2980
2981
2981
2982
2982
2983 </body>
2983 </body>
2984 </html>
2984 </html>
2985
2985
2986
2986
2987 Sub-topic indexes rendered properly
2987 Sub-topic indexes rendered properly
2988
2988
2989 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
2989 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
2990 200 Script output follows
2990 200 Script output follows
2991
2991
2992 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2992 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2993 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2993 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2994 <head>
2994 <head>
2995 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2995 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2996 <meta name="robots" content="index, nofollow" />
2996 <meta name="robots" content="index, nofollow" />
2997 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2997 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2998 <script type="text/javascript" src="/static/mercurial.js"></script>
2998 <script type="text/javascript" src="/static/mercurial.js"></script>
2999
2999
3000 <title>Help: internals</title>
3000 <title>Help: internals</title>
3001 </head>
3001 </head>
3002 <body>
3002 <body>
3003
3003
3004 <div class="container">
3004 <div class="container">
3005 <div class="menu">
3005 <div class="menu">
3006 <div class="logo">
3006 <div class="logo">
3007 <a href="https://mercurial-scm.org/">
3007 <a href="https://mercurial-scm.org/">
3008 <img src="/static/hglogo.png" alt="mercurial" /></a>
3008 <img src="/static/hglogo.png" alt="mercurial" /></a>
3009 </div>
3009 </div>
3010 <ul>
3010 <ul>
3011 <li><a href="/shortlog">log</a></li>
3011 <li><a href="/shortlog">log</a></li>
3012 <li><a href="/graph">graph</a></li>
3012 <li><a href="/graph">graph</a></li>
3013 <li><a href="/tags">tags</a></li>
3013 <li><a href="/tags">tags</a></li>
3014 <li><a href="/bookmarks">bookmarks</a></li>
3014 <li><a href="/bookmarks">bookmarks</a></li>
3015 <li><a href="/branches">branches</a></li>
3015 <li><a href="/branches">branches</a></li>
3016 </ul>
3016 </ul>
3017 <ul>
3017 <ul>
3018 <li><a href="/help">help</a></li>
3018 <li><a href="/help">help</a></li>
3019 </ul>
3019 </ul>
3020 </div>
3020 </div>
3021
3021
3022 <div class="main">
3022 <div class="main">
3023 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3023 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3024
3024
3025 <form class="search" action="/log">
3025 <form class="search" action="/log">
3026
3026
3027 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3027 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3028 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3028 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3029 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3029 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3030 </form>
3030 </form>
3031 <table class="bigtable">
3031 <table class="bigtable">
3032 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3032 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3033
3033
3034 <tr><td>
3034 <tr><td>
3035 <a href="/help/internals.bundles">
3035 <a href="/help/internals.bundles">
3036 bundles
3036 bundles
3037 </a>
3037 </a>
3038 </td><td>
3038 </td><td>
3039 Bundles
3039 Bundles
3040 </td></tr>
3040 </td></tr>
3041 <tr><td>
3041 <tr><td>
3042 <a href="/help/internals.censor">
3042 <a href="/help/internals.censor">
3043 censor
3043 censor
3044 </a>
3044 </a>
3045 </td><td>
3045 </td><td>
3046 Censor
3046 Censor
3047 </td></tr>
3047 </td></tr>
3048 <tr><td>
3048 <tr><td>
3049 <a href="/help/internals.changegroups">
3049 <a href="/help/internals.changegroups">
3050 changegroups
3050 changegroups
3051 </a>
3051 </a>
3052 </td><td>
3052 </td><td>
3053 Changegroups
3053 Changegroups
3054 </td></tr>
3054 </td></tr>
3055 <tr><td>
3055 <tr><td>
3056 <a href="/help/internals.requirements">
3056 <a href="/help/internals.requirements">
3057 requirements
3057 requirements
3058 </a>
3058 </a>
3059 </td><td>
3059 </td><td>
3060 Repository Requirements
3060 Repository Requirements
3061 </td></tr>
3061 </td></tr>
3062 <tr><td>
3062 <tr><td>
3063 <a href="/help/internals.revlogs">
3063 <a href="/help/internals.revlogs">
3064 revlogs
3064 revlogs
3065 </a>
3065 </a>
3066 </td><td>
3066 </td><td>
3067 Revision Logs
3067 Revision Logs
3068 </td></tr>
3068 </td></tr>
3069 <tr><td>
3069 <tr><td>
3070 <a href="/help/internals.wireprotocol">
3070 <a href="/help/internals.wireprotocol">
3071 wireprotocol
3071 wireprotocol
3072 </a>
3072 </a>
3073 </td><td>
3073 </td><td>
3074 Wire Protocol
3074 Wire Protocol
3075 </td></tr>
3075 </td></tr>
3076
3076
3077
3077
3078
3078
3079
3079
3080
3080
3081 </table>
3081 </table>
3082 </div>
3082 </div>
3083 </div>
3083 </div>
3084
3084
3085
3085
3086
3086
3087 </body>
3087 </body>
3088 </html>
3088 </html>
3089
3089
3090
3090
3091 Sub-topic topics rendered properly
3091 Sub-topic topics rendered properly
3092
3092
3093 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3093 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3094 200 Script output follows
3094 200 Script output follows
3095
3095
3096 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3096 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3097 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3097 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3098 <head>
3098 <head>
3099 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3099 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3100 <meta name="robots" content="index, nofollow" />
3100 <meta name="robots" content="index, nofollow" />
3101 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3101 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3102 <script type="text/javascript" src="/static/mercurial.js"></script>
3102 <script type="text/javascript" src="/static/mercurial.js"></script>
3103
3103
3104 <title>Help: internals.changegroups</title>
3104 <title>Help: internals.changegroups</title>
3105 </head>
3105 </head>
3106 <body>
3106 <body>
3107
3107
3108 <div class="container">
3108 <div class="container">
3109 <div class="menu">
3109 <div class="menu">
3110 <div class="logo">
3110 <div class="logo">
3111 <a href="https://mercurial-scm.org/">
3111 <a href="https://mercurial-scm.org/">
3112 <img src="/static/hglogo.png" alt="mercurial" /></a>
3112 <img src="/static/hglogo.png" alt="mercurial" /></a>
3113 </div>
3113 </div>
3114 <ul>
3114 <ul>
3115 <li><a href="/shortlog">log</a></li>
3115 <li><a href="/shortlog">log</a></li>
3116 <li><a href="/graph">graph</a></li>
3116 <li><a href="/graph">graph</a></li>
3117 <li><a href="/tags">tags</a></li>
3117 <li><a href="/tags">tags</a></li>
3118 <li><a href="/bookmarks">bookmarks</a></li>
3118 <li><a href="/bookmarks">bookmarks</a></li>
3119 <li><a href="/branches">branches</a></li>
3119 <li><a href="/branches">branches</a></li>
3120 </ul>
3120 </ul>
3121 <ul>
3121 <ul>
3122 <li class="active"><a href="/help">help</a></li>
3122 <li class="active"><a href="/help">help</a></li>
3123 </ul>
3123 </ul>
3124 </div>
3124 </div>
3125
3125
3126 <div class="main">
3126 <div class="main">
3127 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3127 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3128 <h3>Help: internals.changegroups</h3>
3128 <h3>Help: internals.changegroups</h3>
3129
3129
3130 <form class="search" action="/log">
3130 <form class="search" action="/log">
3131
3131
3132 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3132 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3133 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3133 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3134 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3134 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3135 </form>
3135 </form>
3136 <div id="doc">
3136 <div id="doc">
3137 <h1>Changegroups</h1>
3137 <h1>Changegroups</h1>
3138 <p>
3138 <p>
3139 Changegroups are representations of repository revlog data, specifically
3139 Changegroups are representations of repository revlog data, specifically
3140 the changelog data, root/flat manifest data, treemanifest data, and
3140 the changelog data, root/flat manifest data, treemanifest data, and
3141 filelogs.
3141 filelogs.
3142 </p>
3142 </p>
3143 <p>
3143 <p>
3144 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3144 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3145 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3145 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3146 only difference being an additional item in the *delta header*. Version
3146 only difference being an additional item in the *delta header*. Version
3147 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3147 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3148 exchanging treemanifests (enabled by setting an option on the
3148 exchanging treemanifests (enabled by setting an option on the
3149 &quot;changegroup&quot; part in the bundle2).
3149 &quot;changegroup&quot; part in the bundle2).
3150 </p>
3150 </p>
3151 <p>
3151 <p>
3152 Changegroups when not exchanging treemanifests consist of 3 logical
3152 Changegroups when not exchanging treemanifests consist of 3 logical
3153 segments:
3153 segments:
3154 </p>
3154 </p>
3155 <pre>
3155 <pre>
3156 +---------------------------------+
3156 +---------------------------------+
3157 | | | |
3157 | | | |
3158 | changeset | manifest | filelogs |
3158 | changeset | manifest | filelogs |
3159 | | | |
3159 | | | |
3160 | | | |
3160 | | | |
3161 +---------------------------------+
3161 +---------------------------------+
3162 </pre>
3162 </pre>
3163 <p>
3163 <p>
3164 When exchanging treemanifests, there are 4 logical segments:
3164 When exchanging treemanifests, there are 4 logical segments:
3165 </p>
3165 </p>
3166 <pre>
3166 <pre>
3167 +-------------------------------------------------+
3167 +-------------------------------------------------+
3168 | | | | |
3168 | | | | |
3169 | changeset | root | treemanifests | filelogs |
3169 | changeset | root | treemanifests | filelogs |
3170 | | manifest | | |
3170 | | manifest | | |
3171 | | | | |
3171 | | | | |
3172 +-------------------------------------------------+
3172 +-------------------------------------------------+
3173 </pre>
3173 </pre>
3174 <p>
3174 <p>
3175 The principle building block of each segment is a *chunk*. A *chunk*
3175 The principle building block of each segment is a *chunk*. A *chunk*
3176 is a framed piece of data:
3176 is a framed piece of data:
3177 </p>
3177 </p>
3178 <pre>
3178 <pre>
3179 +---------------------------------------+
3179 +---------------------------------------+
3180 | | |
3180 | | |
3181 | length | data |
3181 | length | data |
3182 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3182 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3183 | | |
3183 | | |
3184 +---------------------------------------+
3184 +---------------------------------------+
3185 </pre>
3185 </pre>
3186 <p>
3186 <p>
3187 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3187 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3188 integer indicating the length of the entire chunk (including the length field
3188 integer indicating the length of the entire chunk (including the length field
3189 itself).
3189 itself).
3190 </p>
3190 </p>
3191 <p>
3191 <p>
3192 There is a special case chunk that has a value of 0 for the length
3192 There is a special case chunk that has a value of 0 for the length
3193 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3193 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3194 </p>
3194 </p>
3195 <h2>Delta Groups</h2>
3195 <h2>Delta Groups</h2>
3196 <p>
3196 <p>
3197 A *delta group* expresses the content of a revlog as a series of deltas,
3197 A *delta group* expresses the content of a revlog as a series of deltas,
3198 or patches against previous revisions.
3198 or patches against previous revisions.
3199 </p>
3199 </p>
3200 <p>
3200 <p>
3201 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3201 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3202 to signal the end of the delta group:
3202 to signal the end of the delta group:
3203 </p>
3203 </p>
3204 <pre>
3204 <pre>
3205 +------------------------------------------------------------------------+
3205 +------------------------------------------------------------------------+
3206 | | | | | |
3206 | | | | | |
3207 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3207 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3208 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3208 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3209 | | | | | |
3209 | | | | | |
3210 +------------------------------------------------------------------------+
3210 +------------------------------------------------------------------------+
3211 </pre>
3211 </pre>
3212 <p>
3212 <p>
3213 Each *chunk*'s data consists of the following:
3213 Each *chunk*'s data consists of the following:
3214 </p>
3214 </p>
3215 <pre>
3215 <pre>
3216 +---------------------------------------+
3216 +---------------------------------------+
3217 | | |
3217 | | |
3218 | delta header | delta data |
3218 | delta header | delta data |
3219 | (various by version) | (various) |
3219 | (various by version) | (various) |
3220 | | |
3220 | | |
3221 +---------------------------------------+
3221 +---------------------------------------+
3222 </pre>
3222 </pre>
3223 <p>
3223 <p>
3224 The *delta data* is a series of *delta*s that describe a diff from an existing
3224 The *delta data* is a series of *delta*s that describe a diff from an existing
3225 entry (either that the recipient already has, or previously specified in the
3225 entry (either that the recipient already has, or previously specified in the
3226 bundle/changegroup).
3226 bundle/changegroup).
3227 </p>
3227 </p>
3228 <p>
3228 <p>
3229 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3229 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3230 &quot;3&quot; of the changegroup format.
3230 &quot;3&quot; of the changegroup format.
3231 </p>
3231 </p>
3232 <p>
3232 <p>
3233 Version 1 (headerlen=80):
3233 Version 1 (headerlen=80):
3234 </p>
3234 </p>
3235 <pre>
3235 <pre>
3236 +------------------------------------------------------+
3236 +------------------------------------------------------+
3237 | | | | |
3237 | | | | |
3238 | node | p1 node | p2 node | link node |
3238 | node | p1 node | p2 node | link node |
3239 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3239 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3240 | | | | |
3240 | | | | |
3241 +------------------------------------------------------+
3241 +------------------------------------------------------+
3242 </pre>
3242 </pre>
3243 <p>
3243 <p>
3244 Version 2 (headerlen=100):
3244 Version 2 (headerlen=100):
3245 </p>
3245 </p>
3246 <pre>
3246 <pre>
3247 +------------------------------------------------------------------+
3247 +------------------------------------------------------------------+
3248 | | | | | |
3248 | | | | | |
3249 | node | p1 node | p2 node | base node | link node |
3249 | node | p1 node | p2 node | base node | link node |
3250 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3250 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3251 | | | | | |
3251 | | | | | |
3252 +------------------------------------------------------------------+
3252 +------------------------------------------------------------------+
3253 </pre>
3253 </pre>
3254 <p>
3254 <p>
3255 Version 3 (headerlen=102):
3255 Version 3 (headerlen=102):
3256 </p>
3256 </p>
3257 <pre>
3257 <pre>
3258 +------------------------------------------------------------------------------+
3258 +------------------------------------------------------------------------------+
3259 | | | | | | |
3259 | | | | | | |
3260 | node | p1 node | p2 node | base node | link node | flags |
3260 | node | p1 node | p2 node | base node | link node | flags |
3261 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3261 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3262 | | | | | | |
3262 | | | | | | |
3263 +------------------------------------------------------------------------------+
3263 +------------------------------------------------------------------------------+
3264 </pre>
3264 </pre>
3265 <p>
3265 <p>
3266 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3266 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3267 series of *delta*s, densely packed (no separators). These deltas describe a diff
3267 series of *delta*s, densely packed (no separators). These deltas describe a diff
3268 from an existing entry (either that the recipient already has, or previously
3268 from an existing entry (either that the recipient already has, or previously
3269 specified in the bundle/changegroup). The format is described more fully in
3269 specified in the bundle/changegroup). The format is described more fully in
3270 &quot;hg help internals.bdiff&quot;, but briefly:
3270 &quot;hg help internals.bdiff&quot;, but briefly:
3271 </p>
3271 </p>
3272 <pre>
3272 <pre>
3273 +---------------------------------------------------------------+
3273 +---------------------------------------------------------------+
3274 | | | | |
3274 | | | | |
3275 | start offset | end offset | new length | content |
3275 | start offset | end offset | new length | content |
3276 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3276 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3277 | | | | |
3277 | | | | |
3278 +---------------------------------------------------------------+
3278 +---------------------------------------------------------------+
3279 </pre>
3279 </pre>
3280 <p>
3280 <p>
3281 Please note that the length field in the delta data does *not* include itself.
3281 Please note that the length field in the delta data does *not* include itself.
3282 </p>
3282 </p>
3283 <p>
3283 <p>
3284 In version 1, the delta is always applied against the previous node from
3284 In version 1, the delta is always applied against the previous node from
3285 the changegroup or the first parent if this is the first entry in the
3285 the changegroup or the first parent if this is the first entry in the
3286 changegroup.
3286 changegroup.
3287 </p>
3287 </p>
3288 <p>
3288 <p>
3289 In version 2 and up, the delta base node is encoded in the entry in the
3289 In version 2 and up, the delta base node is encoded in the entry in the
3290 changegroup. This allows the delta to be expressed against any parent,
3290 changegroup. This allows the delta to be expressed against any parent,
3291 which can result in smaller deltas and more efficient encoding of data.
3291 which can result in smaller deltas and more efficient encoding of data.
3292 </p>
3292 </p>
3293 <h2>Changeset Segment</h2>
3293 <h2>Changeset Segment</h2>
3294 <p>
3294 <p>
3295 The *changeset segment* consists of a single *delta group* holding
3295 The *changeset segment* consists of a single *delta group* holding
3296 changelog data. The *empty chunk* at the end of the *delta group* denotes
3296 changelog data. The *empty chunk* at the end of the *delta group* denotes
3297 the boundary to the *manifest segment*.
3297 the boundary to the *manifest segment*.
3298 </p>
3298 </p>
3299 <h2>Manifest Segment</h2>
3299 <h2>Manifest Segment</h2>
3300 <p>
3300 <p>
3301 The *manifest segment* consists of a single *delta group* holding manifest
3301 The *manifest segment* consists of a single *delta group* holding manifest
3302 data. If treemanifests are in use, it contains only the manifest for the
3302 data. If treemanifests are in use, it contains only the manifest for the
3303 root directory of the repository. Otherwise, it contains the entire
3303 root directory of the repository. Otherwise, it contains the entire
3304 manifest data. The *empty chunk* at the end of the *delta group* denotes
3304 manifest data. The *empty chunk* at the end of the *delta group* denotes
3305 the boundary to the next segment (either the *treemanifests segment* or the
3305 the boundary to the next segment (either the *treemanifests segment* or the
3306 *filelogs segment*, depending on version and the request options).
3306 *filelogs segment*, depending on version and the request options).
3307 </p>
3307 </p>
3308 <h3>Treemanifests Segment</h3>
3308 <h3>Treemanifests Segment</h3>
3309 <p>
3309 <p>
3310 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3310 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3311 only if the 'treemanifest' param is part of the bundle2 changegroup part
3311 only if the 'treemanifest' param is part of the bundle2 changegroup part
3312 (it is not possible to use changegroup version 3 outside of bundle2).
3312 (it is not possible to use changegroup version 3 outside of bundle2).
3313 Aside from the filenames in the *treemanifests segment* containing a
3313 Aside from the filenames in the *treemanifests segment* containing a
3314 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3314 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3315 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3315 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3316 a sub-segment with filename size 0). This denotes the boundary to the
3316 a sub-segment with filename size 0). This denotes the boundary to the
3317 *filelogs segment*.
3317 *filelogs segment*.
3318 </p>
3318 </p>
3319 <h2>Filelogs Segment</h2>
3319 <h2>Filelogs Segment</h2>
3320 <p>
3320 <p>
3321 The *filelogs segment* consists of multiple sub-segments, each
3321 The *filelogs segment* consists of multiple sub-segments, each
3322 corresponding to an individual file whose data is being described:
3322 corresponding to an individual file whose data is being described:
3323 </p>
3323 </p>
3324 <pre>
3324 <pre>
3325 +--------------------------------------------------+
3325 +--------------------------------------------------+
3326 | | | | | |
3326 | | | | | |
3327 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3327 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3328 | | | | | (4 bytes) |
3328 | | | | | (4 bytes) |
3329 | | | | | |
3329 | | | | | |
3330 +--------------------------------------------------+
3330 +--------------------------------------------------+
3331 </pre>
3331 </pre>
3332 <p>
3332 <p>
3333 The final filelog sub-segment is followed by an *empty chunk* (logically,
3333 The final filelog sub-segment is followed by an *empty chunk* (logically,
3334 a sub-segment with filename size 0). This denotes the end of the segment
3334 a sub-segment with filename size 0). This denotes the end of the segment
3335 and of the overall changegroup.
3335 and of the overall changegroup.
3336 </p>
3336 </p>
3337 <p>
3337 <p>
3338 Each filelog sub-segment consists of the following:
3338 Each filelog sub-segment consists of the following:
3339 </p>
3339 </p>
3340 <pre>
3340 <pre>
3341 +------------------------------------------------------+
3341 +------------------------------------------------------+
3342 | | | |
3342 | | | |
3343 | filename length | filename | delta group |
3343 | filename length | filename | delta group |
3344 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3344 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3345 | | | |
3345 | | | |
3346 +------------------------------------------------------+
3346 +------------------------------------------------------+
3347 </pre>
3347 </pre>
3348 <p>
3348 <p>
3349 That is, a *chunk* consisting of the filename (not terminated or padded)
3349 That is, a *chunk* consisting of the filename (not terminated or padded)
3350 followed by N chunks constituting the *delta group* for this file. The
3350 followed by N chunks constituting the *delta group* for this file. The
3351 *empty chunk* at the end of each *delta group* denotes the boundary to the
3351 *empty chunk* at the end of each *delta group* denotes the boundary to the
3352 next filelog sub-segment.
3352 next filelog sub-segment.
3353 </p>
3353 </p>
3354
3354
3355 </div>
3355 </div>
3356 </div>
3356 </div>
3357 </div>
3357 </div>
3358
3358
3359
3359
3360
3360
3361 </body>
3361 </body>
3362 </html>
3362 </html>
3363
3363
3364
3364
3365 $ killdaemons.py
3365 $ killdaemons.py
3366
3366
3367 #endif
3367 #endif
@@ -1,937 +1,938 b''
1 commit hooks can see env vars
1 commit hooks can see env vars
2 (and post-transaction one are run unlocked)
2 (and post-transaction one are run unlocked)
3
3
4
4
5 $ cat > $TESTTMP/txnabort.checkargs.py <<EOF
5 $ cat > $TESTTMP/txnabort.checkargs.py <<EOF
6 > def showargs(ui, repo, hooktype, **kwargs):
6 > def showargs(ui, repo, hooktype, **kwargs):
7 > ui.write('%s Python hook: %s\n' % (hooktype, ','.join(sorted(kwargs))))
7 > ui.write('%s Python hook: %s\n' % (hooktype, ','.join(sorted(kwargs))))
8 > EOF
8 > EOF
9
9
10 $ hg init a
10 $ hg init a
11 $ cd a
11 $ cd a
12 $ cat > .hg/hgrc <<EOF
12 $ cat > .hg/hgrc <<EOF
13 > [hooks]
13 > [hooks]
14 > commit = sh -c "HG_LOCAL= HG_TAG= printenv.py commit"
14 > commit = sh -c "HG_LOCAL= HG_TAG= printenv.py commit"
15 > commit.b = sh -c "HG_LOCAL= HG_TAG= printenv.py commit.b"
15 > commit.b = sh -c "HG_LOCAL= HG_TAG= printenv.py commit.b"
16 > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= printenv.py precommit"
16 > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= printenv.py precommit"
17 > pretxncommit = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxncommit"
17 > pretxncommit = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxncommit"
18 > pretxncommit.tip = hg -q tip
18 > pretxncommit.tip = hg -q tip
19 > pre-identify = sh -c "printenv.py pre-identify 1"
19 > pre-identify = sh -c "printenv.py pre-identify 1"
20 > pre-cat = sh -c "printenv.py pre-cat"
20 > pre-cat = sh -c "printenv.py pre-cat"
21 > post-cat = sh -c "printenv.py post-cat"
21 > post-cat = sh -c "printenv.py post-cat"
22 > pretxnopen = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnopen"
22 > pretxnopen = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnopen"
23 > pretxnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnclose"
23 > pretxnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnclose"
24 > txnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py txnclose"
24 > txnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py txnclose"
25 > txnabort.0 = python:$TESTTMP/txnabort.checkargs.py:showargs
25 > txnabort.0 = python:$TESTTMP/txnabort.checkargs.py:showargs
26 > txnabort.1 = sh -c "HG_LOCAL= HG_TAG= printenv.py txnabort"
26 > txnabort.1 = sh -c "HG_LOCAL= HG_TAG= printenv.py txnabort"
27 > txnclose.checklock = sh -c "hg debuglock > /dev/null"
27 > txnclose.checklock = sh -c "hg debuglock > /dev/null"
28 > EOF
28 > EOF
29 $ echo a > a
29 $ echo a > a
30 $ hg add a
30 $ hg add a
31 $ hg commit -m a
31 $ hg commit -m a
32 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=0000000000000000000000000000000000000000
32 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=0000000000000000000000000000000000000000
33 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
33 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
34 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$TESTTMP/a
34 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$TESTTMP/a
35 0:cb9a9f314b8b
35 0:cb9a9f314b8b
36 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
36 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
37 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
37 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
38 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
38 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
39 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
39 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
40
40
41 $ hg clone . ../b
41 $ hg clone . ../b
42 updating to branch default
42 updating to branch default
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 $ cd ../b
44 $ cd ../b
45
45
46 changegroup hooks can see env vars
46 changegroup hooks can see env vars
47
47
48 $ cat > .hg/hgrc <<EOF
48 $ cat > .hg/hgrc <<EOF
49 > [hooks]
49 > [hooks]
50 > prechangegroup = sh -c "printenv.py prechangegroup"
50 > prechangegroup = sh -c "printenv.py prechangegroup"
51 > changegroup = sh -c "printenv.py changegroup"
51 > changegroup = sh -c "printenv.py changegroup"
52 > incoming = sh -c "printenv.py incoming"
52 > incoming = sh -c "printenv.py incoming"
53 > EOF
53 > EOF
54
54
55 pretxncommit and commit hooks can see both parents of merge
55 pretxncommit and commit hooks can see both parents of merge
56
56
57 $ cd ../a
57 $ cd ../a
58 $ echo b >> a
58 $ echo b >> a
59 $ hg commit -m a1 -d "1 0"
59 $ hg commit -m a1 -d "1 0"
60 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
60 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
61 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
61 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
62 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
62 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
63 1:ab228980c14d
63 1:ab228980c14d
64 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
64 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
65 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
65 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
66 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
66 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
67 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
67 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
68 $ hg update -C 0
68 $ hg update -C 0
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 $ echo b > b
70 $ echo b > b
71 $ hg add b
71 $ hg add b
72 $ hg commit -m b -d '1 0'
72 $ hg commit -m b -d '1 0'
73 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
73 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
74 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
74 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
75 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
75 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
76 2:ee9deb46ab31
76 2:ee9deb46ab31
77 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
77 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
78 created new head
78 created new head
79 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
79 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
80 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
80 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
81 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
81 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
82 $ hg merge 1
82 $ hg merge 1
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 (branch merge, don't forget to commit)
84 (branch merge, don't forget to commit)
85 $ hg commit -m merge -d '2 0'
85 $ hg commit -m merge -d '2 0'
86 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
86 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
87 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
87 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
88 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$TESTTMP/a
88 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$TESTTMP/a
89 3:07f3376c1e65
89 3:07f3376c1e65
90 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
90 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
91 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
91 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
92 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
92 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
93 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
93 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
94
94
95 test generic hooks
95 test generic hooks
96
96
97 $ hg id
97 $ hg id
98 pre-identify hook: HG_ARGS=id HG_HOOKNAME=pre-identify HG_HOOKTYPE=pre-identify HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None, 'template': ''} HG_PATS=[]
98 pre-identify hook: HG_ARGS=id HG_HOOKNAME=pre-identify HG_HOOKTYPE=pre-identify HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None, 'template': ''} HG_PATS=[]
99 abort: pre-identify hook exited with status 1
99 abort: pre-identify hook exited with status 1
100 [255]
100 [255]
101 $ hg cat b
101 $ hg cat b
102 pre-cat hook: HG_ARGS=cat b HG_HOOKNAME=pre-cat HG_HOOKTYPE=pre-cat HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': '', 'template': ''} HG_PATS=['b']
102 pre-cat hook: HG_ARGS=cat b HG_HOOKNAME=pre-cat HG_HOOKTYPE=pre-cat HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': '', 'template': ''} HG_PATS=['b']
103 b
103 b
104 post-cat hook: HG_ARGS=cat b HG_HOOKNAME=post-cat HG_HOOKTYPE=post-cat HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': '', 'template': ''} HG_PATS=['b'] HG_RESULT=0
104 post-cat hook: HG_ARGS=cat b HG_HOOKNAME=post-cat HG_HOOKTYPE=post-cat HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': '', 'template': ''} HG_PATS=['b'] HG_RESULT=0
105
105
106 $ cd ../b
106 $ cd ../b
107 $ hg pull ../a
107 $ hg pull ../a
108 pulling from ../a
108 pulling from ../a
109 searching for changes
109 searching for changes
110 prechangegroup hook: HG_HOOKNAME=prechangegroup HG_HOOKTYPE=prechangegroup HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
110 prechangegroup hook: HG_HOOKNAME=prechangegroup HG_HOOKTYPE=prechangegroup HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
111 adding changesets
111 adding changesets
112 adding manifests
112 adding manifests
113 adding file changes
113 adding file changes
114 added 3 changesets with 2 changes to 2 files
114 added 3 changesets with 2 changes to 2 files
115 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_NODE_LAST=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
115 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_NODE_LAST=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
116 incoming hook: HG_HOOKNAME=incoming HG_HOOKTYPE=incoming HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
116 incoming hook: HG_HOOKNAME=incoming HG_HOOKTYPE=incoming HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
117 incoming hook: HG_HOOKNAME=incoming HG_HOOKTYPE=incoming HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
117 incoming hook: HG_HOOKNAME=incoming HG_HOOKTYPE=incoming HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
118 incoming hook: HG_HOOKNAME=incoming HG_HOOKTYPE=incoming HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
118 incoming hook: HG_HOOKNAME=incoming HG_HOOKTYPE=incoming HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
119 (run 'hg update' to get a working copy)
119 (run 'hg update' to get a working copy)
120
120
121 tag hooks can see env vars
121 tag hooks can see env vars
122
122
123 $ cd ../a
123 $ cd ../a
124 $ cat >> .hg/hgrc <<EOF
124 $ cat >> .hg/hgrc <<EOF
125 > pretag = sh -c "printenv.py pretag"
125 > pretag = sh -c "printenv.py pretag"
126 > tag = sh -c "HG_PARENT1= HG_PARENT2= printenv.py tag"
126 > tag = sh -c "HG_PARENT1= HG_PARENT2= printenv.py tag"
127 > EOF
127 > EOF
128 $ hg tag -d '3 0' a
128 $ hg tag -d '3 0' a
129 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
129 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
130 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
130 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
131 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
131 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
132 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a
132 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a
133 4:539e4b31b6dc
133 4:539e4b31b6dc
134 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
134 pretxnclose hook: HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
135 tag hook: HG_HOOKNAME=tag HG_HOOKTYPE=tag HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
135 tag hook: HG_HOOKNAME=tag HG_HOOKTYPE=tag HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
136 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
136 txnclose hook: HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
137 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
137 commit hook: HG_HOOKNAME=commit HG_HOOKTYPE=commit HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
138 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
138 commit.b hook: HG_HOOKNAME=commit.b HG_HOOKTYPE=commit HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
139 $ hg tag -l la
139 $ hg tag -l la
140 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
140 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
141 tag hook: HG_HOOKNAME=tag HG_HOOKTYPE=tag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
141 tag hook: HG_HOOKNAME=tag HG_HOOKTYPE=tag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
142
142
143 pretag hook can forbid tagging
143 pretag hook can forbid tagging
144
144
145 $ cat >> .hg/hgrc <<EOF
145 $ cat >> .hg/hgrc <<EOF
146 > pretag.forbid = sh -c "printenv.py pretag.forbid 1"
146 > pretag.forbid = sh -c "printenv.py pretag.forbid 1"
147 > EOF
147 > EOF
148 $ hg tag -d '4 0' fa
148 $ hg tag -d '4 0' fa
149 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
149 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
150 pretag.forbid hook: HG_HOOKNAME=pretag.forbid HG_HOOKTYPE=pretag HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
150 pretag.forbid hook: HG_HOOKNAME=pretag.forbid HG_HOOKTYPE=pretag HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
151 abort: pretag.forbid hook exited with status 1
151 abort: pretag.forbid hook exited with status 1
152 [255]
152 [255]
153 $ hg tag -l fla
153 $ hg tag -l fla
154 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
154 pretag hook: HG_HOOKNAME=pretag HG_HOOKTYPE=pretag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
155 pretag.forbid hook: HG_HOOKNAME=pretag.forbid HG_HOOKTYPE=pretag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
155 pretag.forbid hook: HG_HOOKNAME=pretag.forbid HG_HOOKTYPE=pretag HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
156 abort: pretag.forbid hook exited with status 1
156 abort: pretag.forbid hook exited with status 1
157 [255]
157 [255]
158
158
159 pretxncommit hook can see changeset, can roll back txn, changeset no
159 pretxncommit hook can see changeset, can roll back txn, changeset no
160 more there after
160 more there after
161
161
162 $ cat >> .hg/hgrc <<EOF
162 $ cat >> .hg/hgrc <<EOF
163 > pretxncommit.forbid0 = sh -c "hg tip -q"
163 > pretxncommit.forbid0 = sh -c "hg tip -q"
164 > pretxncommit.forbid1 = sh -c "printenv.py pretxncommit.forbid 1"
164 > pretxncommit.forbid1 = sh -c "printenv.py pretxncommit.forbid 1"
165 > EOF
165 > EOF
166 $ echo z > z
166 $ echo z > z
167 $ hg add z
167 $ hg add z
168 $ hg -q tip
168 $ hg -q tip
169 4:539e4b31b6dc
169 4:539e4b31b6dc
170 $ hg commit -m 'fail' -d '4 0'
170 $ hg commit -m 'fail' -d '4 0'
171 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
171 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
172 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
172 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
173 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
173 pretxncommit hook: HG_HOOKNAME=pretxncommit HG_HOOKTYPE=pretxncommit HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
174 5:6f611f8018c1
174 5:6f611f8018c1
175 5:6f611f8018c1
175 5:6f611f8018c1
176 pretxncommit.forbid hook: HG_HOOKNAME=pretxncommit.forbid1 HG_HOOKTYPE=pretxncommit HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
176 pretxncommit.forbid hook: HG_HOOKNAME=pretxncommit.forbid1 HG_HOOKTYPE=pretxncommit HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
177 transaction abort!
177 transaction abort!
178 txnabort Python hook: txnid,txnname
178 txnabort Python hook: txnid,txnname
179 txnabort hook: HG_HOOKNAME=txnabort.1 HG_HOOKTYPE=txnabort HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
179 txnabort hook: HG_HOOKNAME=txnabort.1 HG_HOOKTYPE=txnabort HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
180 rollback completed
180 rollback completed
181 abort: pretxncommit.forbid1 hook exited with status 1
181 abort: pretxncommit.forbid1 hook exited with status 1
182 [255]
182 [255]
183 $ hg -q tip
183 $ hg -q tip
184 4:539e4b31b6dc
184 4:539e4b31b6dc
185
185
186 (Check that no 'changelog.i.a' file were left behind)
186 (Check that no 'changelog.i.a' file were left behind)
187
187
188 $ ls -1 .hg/store/
188 $ ls -1 .hg/store/
189 00changelog.i
189 00changelog.i
190 00manifest.i
190 00manifest.i
191 data
191 data
192 fncache
192 fncache
193 journal.phaseroots
193 journal.phaseroots
194 phaseroots
194 phaseroots
195 undo
195 undo
196 undo.backup.fncache
196 undo.backup.fncache
197 undo.backupfiles
197 undo.backupfiles
198 undo.phaseroots
198 undo.phaseroots
199
199
200
200
201 precommit hook can prevent commit
201 precommit hook can prevent commit
202
202
203 $ cat >> .hg/hgrc <<EOF
203 $ cat >> .hg/hgrc <<EOF
204 > precommit.forbid = sh -c "printenv.py precommit.forbid 1"
204 > precommit.forbid = sh -c "printenv.py precommit.forbid 1"
205 > EOF
205 > EOF
206 $ hg commit -m 'fail' -d '4 0'
206 $ hg commit -m 'fail' -d '4 0'
207 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
207 precommit hook: HG_HOOKNAME=precommit HG_HOOKTYPE=precommit HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
208 precommit.forbid hook: HG_HOOKNAME=precommit.forbid HG_HOOKTYPE=precommit HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
208 precommit.forbid hook: HG_HOOKNAME=precommit.forbid HG_HOOKTYPE=precommit HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
209 abort: precommit.forbid hook exited with status 1
209 abort: precommit.forbid hook exited with status 1
210 [255]
210 [255]
211 $ hg -q tip
211 $ hg -q tip
212 4:539e4b31b6dc
212 4:539e4b31b6dc
213
213
214 preupdate hook can prevent update
214 preupdate hook can prevent update
215
215
216 $ cat >> .hg/hgrc <<EOF
216 $ cat >> .hg/hgrc <<EOF
217 > preupdate = sh -c "printenv.py preupdate"
217 > preupdate = sh -c "printenv.py preupdate"
218 > EOF
218 > EOF
219 $ hg update 1
219 $ hg update 1
220 preupdate hook: HG_HOOKNAME=preupdate HG_HOOKTYPE=preupdate HG_PARENT1=ab228980c14d
220 preupdate hook: HG_HOOKNAME=preupdate HG_HOOKTYPE=preupdate HG_PARENT1=ab228980c14d
221 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
221 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
222
222
223 update hook
223 update hook
224
224
225 $ cat >> .hg/hgrc <<EOF
225 $ cat >> .hg/hgrc <<EOF
226 > update = sh -c "printenv.py update"
226 > update = sh -c "printenv.py update"
227 > EOF
227 > EOF
228 $ hg update
228 $ hg update
229 preupdate hook: HG_HOOKNAME=preupdate HG_HOOKTYPE=preupdate HG_PARENT1=539e4b31b6dc
229 preupdate hook: HG_HOOKNAME=preupdate HG_HOOKTYPE=preupdate HG_PARENT1=539e4b31b6dc
230 update hook: HG_ERROR=0 HG_HOOKNAME=update HG_HOOKTYPE=update HG_PARENT1=539e4b31b6dc
230 update hook: HG_ERROR=0 HG_HOOKNAME=update HG_HOOKTYPE=update HG_PARENT1=539e4b31b6dc
231 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
231 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
232
232
233 pushkey hook
233 pushkey hook
234
234
235 $ cat >> .hg/hgrc <<EOF
235 $ cat >> .hg/hgrc <<EOF
236 > pushkey = sh -c "printenv.py pushkey"
236 > pushkey = sh -c "printenv.py pushkey"
237 > EOF
237 > EOF
238 $ cd ../b
238 $ cd ../b
239 $ hg bookmark -r null foo
239 $ hg bookmark -r null foo
240 $ hg push -B foo ../a
240 $ hg push -B foo ../a
241 pushing to ../a
241 pushing to ../a
242 searching for changes
242 searching for changes
243 no changes found
243 no changes found
244 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=push
244 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=push
245 pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/a
245 pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/a
246 pushkey hook: HG_HOOKNAME=pushkey HG_HOOKTYPE=pushkey HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1
246 pushkey hook: HG_HOOKNAME=pushkey HG_HOOKTYPE=pushkey HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1
247 txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/a
247 txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/a
248 exporting bookmark foo
248 exporting bookmark foo
249 [1]
249 [1]
250 $ cd ../a
250 $ cd ../a
251
251
252 listkeys hook
252 listkeys hook
253
253
254 $ cat >> .hg/hgrc <<EOF
254 $ cat >> .hg/hgrc <<EOF
255 > listkeys = sh -c "printenv.py listkeys"
255 > listkeys = sh -c "printenv.py listkeys"
256 > EOF
256 > EOF
257 $ hg bookmark -r null bar
257 $ hg bookmark -r null bar
258 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
258 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
259 pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
259 pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
260 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
260 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
261 $ cd ../b
261 $ cd ../b
262 $ hg pull -B bar ../a
262 $ hg pull -B bar ../a
263 pulling from ../a
263 pulling from ../a
264 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
264 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
265 no changes found
265 no changes found
266 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
266 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
267 adding remote bookmark bar
267 adding remote bookmark bar
268 $ cd ../a
268 $ cd ../a
269
269
270 test that prepushkey can prevent incoming keys
270 test that prepushkey can prevent incoming keys
271
271
272 $ cat >> .hg/hgrc <<EOF
272 $ cat >> .hg/hgrc <<EOF
273 > prepushkey = sh -c "printenv.py prepushkey.forbid 1"
273 > prepushkey = sh -c "printenv.py prepushkey.forbid 1"
274 > EOF
274 > EOF
275 $ cd ../b
275 $ cd ../b
276 $ hg bookmark -r null baz
276 $ hg bookmark -r null baz
277 $ hg push -B baz ../a
277 $ hg push -B baz ../a
278 pushing to ../a
278 pushing to ../a
279 searching for changes
279 searching for changes
280 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
280 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
281 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
281 listkeys hook: HG_HOOKNAME=listkeys HG_HOOKTYPE=listkeys HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
282 no changes found
282 no changes found
283 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=push
283 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=push
284 prepushkey.forbid hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
284 prepushkey.forbid hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
285 pushkey-abort: prepushkey hook exited with status 1
285 pushkey-abort: prepushkey hook exited with status 1
286 abort: exporting bookmark baz failed!
286 abort: exporting bookmark baz failed!
287 [255]
287 [255]
288 $ cd ../a
288 $ cd ../a
289
289
290 test that prelistkeys can prevent listing keys
290 test that prelistkeys can prevent listing keys
291
291
292 $ cat >> .hg/hgrc <<EOF
292 $ cat >> .hg/hgrc <<EOF
293 > prelistkeys = sh -c "printenv.py prelistkeys.forbid 1"
293 > prelistkeys = sh -c "printenv.py prelistkeys.forbid 1"
294 > EOF
294 > EOF
295 $ hg bookmark -r null quux
295 $ hg bookmark -r null quux
296 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
296 pretxnopen hook: HG_HOOKNAME=pretxnopen HG_HOOKTYPE=pretxnopen HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
297 pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
297 pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=pretxnclose HG_HOOKTYPE=pretxnclose HG_PENDING=$TESTTMP/a HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
298 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
298 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
299 $ cd ../b
299 $ cd ../b
300 $ hg pull -B quux ../a
300 $ hg pull -B quux ../a
301 pulling from ../a
301 pulling from ../a
302 prelistkeys.forbid hook: HG_HOOKNAME=prelistkeys HG_HOOKTYPE=prelistkeys HG_NAMESPACE=bookmarks
302 prelistkeys.forbid hook: HG_HOOKNAME=prelistkeys HG_HOOKTYPE=prelistkeys HG_NAMESPACE=bookmarks
303 abort: prelistkeys hook exited with status 1
303 abort: prelistkeys hook exited with status 1
304 [255]
304 [255]
305 $ cd ../a
305 $ cd ../a
306 $ rm .hg/hgrc
306 $ rm .hg/hgrc
307
307
308 prechangegroup hook can prevent incoming changes
308 prechangegroup hook can prevent incoming changes
309
309
310 $ cd ../b
310 $ cd ../b
311 $ hg -q tip
311 $ hg -q tip
312 3:07f3376c1e65
312 3:07f3376c1e65
313 $ cat > .hg/hgrc <<EOF
313 $ cat > .hg/hgrc <<EOF
314 > [hooks]
314 > [hooks]
315 > prechangegroup.forbid = sh -c "printenv.py prechangegroup.forbid 1"
315 > prechangegroup.forbid = sh -c "printenv.py prechangegroup.forbid 1"
316 > EOF
316 > EOF
317 $ hg pull ../a
317 $ hg pull ../a
318 pulling from ../a
318 pulling from ../a
319 searching for changes
319 searching for changes
320 prechangegroup.forbid hook: HG_HOOKNAME=prechangegroup.forbid HG_HOOKTYPE=prechangegroup HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
320 prechangegroup.forbid hook: HG_HOOKNAME=prechangegroup.forbid HG_HOOKTYPE=prechangegroup HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
321 abort: prechangegroup.forbid hook exited with status 1
321 abort: prechangegroup.forbid hook exited with status 1
322 [255]
322 [255]
323
323
324 pretxnchangegroup hook can see incoming changes, can roll back txn,
324 pretxnchangegroup hook can see incoming changes, can roll back txn,
325 incoming changes no longer there after
325 incoming changes no longer there after
326
326
327 $ cat > .hg/hgrc <<EOF
327 $ cat > .hg/hgrc <<EOF
328 > [hooks]
328 > [hooks]
329 > pretxnchangegroup.forbid0 = hg tip -q
329 > pretxnchangegroup.forbid0 = hg tip -q
330 > pretxnchangegroup.forbid1 = sh -c "printenv.py pretxnchangegroup.forbid 1"
330 > pretxnchangegroup.forbid1 = sh -c "printenv.py pretxnchangegroup.forbid 1"
331 > EOF
331 > EOF
332 $ hg pull ../a
332 $ hg pull ../a
333 pulling from ../a
333 pulling from ../a
334 searching for changes
334 searching for changes
335 adding changesets
335 adding changesets
336 adding manifests
336 adding manifests
337 adding file changes
337 adding file changes
338 added 1 changesets with 1 changes to 1 files
338 added 1 changesets with 1 changes to 1 files
339 4:539e4b31b6dc
339 4:539e4b31b6dc
340 pretxnchangegroup.forbid hook: HG_HOOKNAME=pretxnchangegroup.forbid1 HG_HOOKTYPE=pretxnchangegroup HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_NODE_LAST=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
340 pretxnchangegroup.forbid hook: HG_HOOKNAME=pretxnchangegroup.forbid1 HG_HOOKTYPE=pretxnchangegroup HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_NODE_LAST=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=file:$TESTTMP/a
341 transaction abort!
341 transaction abort!
342 rollback completed
342 rollback completed
343 abort: pretxnchangegroup.forbid1 hook exited with status 1
343 abort: pretxnchangegroup.forbid1 hook exited with status 1
344 [255]
344 [255]
345 $ hg -q tip
345 $ hg -q tip
346 3:07f3376c1e65
346 3:07f3376c1e65
347
347
348 outgoing hooks can see env vars
348 outgoing hooks can see env vars
349
349
350 $ rm .hg/hgrc
350 $ rm .hg/hgrc
351 $ cat > ../a/.hg/hgrc <<EOF
351 $ cat > ../a/.hg/hgrc <<EOF
352 > [hooks]
352 > [hooks]
353 > preoutgoing = sh -c "printenv.py preoutgoing"
353 > preoutgoing = sh -c "printenv.py preoutgoing"
354 > outgoing = sh -c "printenv.py outgoing"
354 > outgoing = sh -c "printenv.py outgoing"
355 > EOF
355 > EOF
356 $ hg pull ../a
356 $ hg pull ../a
357 pulling from ../a
357 pulling from ../a
358 searching for changes
358 searching for changes
359 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=pull
359 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=pull
360 outgoing hook: HG_HOOKNAME=outgoing HG_HOOKTYPE=outgoing HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull
360 outgoing hook: HG_HOOKNAME=outgoing HG_HOOKTYPE=outgoing HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull
361 adding changesets
361 adding changesets
362 adding manifests
362 adding manifests
363 adding file changes
363 adding file changes
364 added 1 changesets with 1 changes to 1 files
364 added 1 changesets with 1 changes to 1 files
365 adding remote bookmark quux
365 adding remote bookmark quux
366 (run 'hg update' to get a working copy)
366 (run 'hg update' to get a working copy)
367 $ hg rollback
367 $ hg rollback
368 repository tip rolled back to revision 3 (undo pull)
368 repository tip rolled back to revision 3 (undo pull)
369
369
370 preoutgoing hook can prevent outgoing changes
370 preoutgoing hook can prevent outgoing changes
371
371
372 $ cat >> ../a/.hg/hgrc <<EOF
372 $ cat >> ../a/.hg/hgrc <<EOF
373 > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1"
373 > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1"
374 > EOF
374 > EOF
375 $ hg pull ../a
375 $ hg pull ../a
376 pulling from ../a
376 pulling from ../a
377 searching for changes
377 searching for changes
378 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=pull
378 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=pull
379 preoutgoing.forbid hook: HG_HOOKNAME=preoutgoing.forbid HG_HOOKTYPE=preoutgoing HG_SOURCE=pull
379 preoutgoing.forbid hook: HG_HOOKNAME=preoutgoing.forbid HG_HOOKTYPE=preoutgoing HG_SOURCE=pull
380 abort: preoutgoing.forbid hook exited with status 1
380 abort: preoutgoing.forbid hook exited with status 1
381 [255]
381 [255]
382
382
383 outgoing hooks work for local clones
383 outgoing hooks work for local clones
384
384
385 $ cd ..
385 $ cd ..
386 $ cat > a/.hg/hgrc <<EOF
386 $ cat > a/.hg/hgrc <<EOF
387 > [hooks]
387 > [hooks]
388 > preoutgoing = sh -c "printenv.py preoutgoing"
388 > preoutgoing = sh -c "printenv.py preoutgoing"
389 > outgoing = sh -c "printenv.py outgoing"
389 > outgoing = sh -c "printenv.py outgoing"
390 > EOF
390 > EOF
391 $ hg clone a c
391 $ hg clone a c
392 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=clone
392 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=clone
393 outgoing hook: HG_HOOKNAME=outgoing HG_HOOKTYPE=outgoing HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone
393 outgoing hook: HG_HOOKNAME=outgoing HG_HOOKTYPE=outgoing HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone
394 updating to branch default
394 updating to branch default
395 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
395 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
396 $ rm -rf c
396 $ rm -rf c
397
397
398 preoutgoing hook can prevent outgoing changes for local clones
398 preoutgoing hook can prevent outgoing changes for local clones
399
399
400 $ cat >> a/.hg/hgrc <<EOF
400 $ cat >> a/.hg/hgrc <<EOF
401 > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1"
401 > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1"
402 > EOF
402 > EOF
403 $ hg clone a zzz
403 $ hg clone a zzz
404 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=clone
404 preoutgoing hook: HG_HOOKNAME=preoutgoing HG_HOOKTYPE=preoutgoing HG_SOURCE=clone
405 preoutgoing.forbid hook: HG_HOOKNAME=preoutgoing.forbid HG_HOOKTYPE=preoutgoing HG_SOURCE=clone
405 preoutgoing.forbid hook: HG_HOOKNAME=preoutgoing.forbid HG_HOOKTYPE=preoutgoing HG_SOURCE=clone
406 abort: preoutgoing.forbid hook exited with status 1
406 abort: preoutgoing.forbid hook exited with status 1
407 [255]
407 [255]
408
408
409 $ cd "$TESTTMP/b"
409 $ cd "$TESTTMP/b"
410
410
411 $ cat > hooktests.py <<EOF
411 $ cat > hooktests.py <<EOF
412 > from __future__ import print_function
412 > from mercurial import error
413 > from mercurial import error
413 >
414 >
414 > uncallable = 0
415 > uncallable = 0
415 >
416 >
416 > def printargs(args):
417 > def printargs(args):
417 > args.pop('ui', None)
418 > args.pop('ui', None)
418 > args.pop('repo', None)
419 > args.pop('repo', None)
419 > a = list(args.items())
420 > a = list(args.items())
420 > a.sort()
421 > a.sort()
421 > print 'hook args:'
422 > print('hook args:')
422 > for k, v in a:
423 > for k, v in a:
423 > print ' ', k, v
424 > print(' ', k, v)
424 >
425 >
425 > def passhook(**args):
426 > def passhook(**args):
426 > printargs(args)
427 > printargs(args)
427 >
428 >
428 > def failhook(**args):
429 > def failhook(**args):
429 > printargs(args)
430 > printargs(args)
430 > return True
431 > return True
431 >
432 >
432 > class LocalException(Exception):
433 > class LocalException(Exception):
433 > pass
434 > pass
434 >
435 >
435 > def raisehook(**args):
436 > def raisehook(**args):
436 > raise LocalException('exception from hook')
437 > raise LocalException('exception from hook')
437 >
438 >
438 > def aborthook(**args):
439 > def aborthook(**args):
439 > raise error.Abort('raise abort from hook')
440 > raise error.Abort('raise abort from hook')
440 >
441 >
441 > def brokenhook(**args):
442 > def brokenhook(**args):
442 > return 1 + {}
443 > return 1 + {}
443 >
444 >
444 > def verbosehook(ui, **args):
445 > def verbosehook(ui, **args):
445 > ui.note('verbose output from hook\n')
446 > ui.note('verbose output from hook\n')
446 >
447 >
447 > def printtags(ui, repo, **args):
448 > def printtags(ui, repo, **args):
448 > print sorted(repo.tags())
449 > print(sorted(repo.tags()))
449 >
450 >
450 > class container:
451 > class container:
451 > unreachable = 1
452 > unreachable = 1
452 > EOF
453 > EOF
453
454
454 $ cat > syntaxerror.py << EOF
455 $ cat > syntaxerror.py << EOF
455 > (foo
456 > (foo
456 > EOF
457 > EOF
457
458
458 test python hooks
459 test python hooks
459
460
460 #if windows
461 #if windows
461 $ PYTHONPATH="$TESTTMP/b;$PYTHONPATH"
462 $ PYTHONPATH="$TESTTMP/b;$PYTHONPATH"
462 #else
463 #else
463 $ PYTHONPATH="$TESTTMP/b:$PYTHONPATH"
464 $ PYTHONPATH="$TESTTMP/b:$PYTHONPATH"
464 #endif
465 #endif
465 $ export PYTHONPATH
466 $ export PYTHONPATH
466
467
467 $ echo '[hooks]' > ../a/.hg/hgrc
468 $ echo '[hooks]' > ../a/.hg/hgrc
468 $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc
469 $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc
469 $ hg pull ../a 2>&1 | grep 'raised an exception'
470 $ hg pull ../a 2>&1 | grep 'raised an exception'
470 error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict'
471 error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict'
471
472
472 $ echo '[hooks]' > ../a/.hg/hgrc
473 $ echo '[hooks]' > ../a/.hg/hgrc
473 $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc
474 $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc
474 $ hg pull ../a 2>&1 | grep 'raised an exception'
475 $ hg pull ../a 2>&1 | grep 'raised an exception'
475 error: preoutgoing.raise hook raised an exception: exception from hook
476 error: preoutgoing.raise hook raised an exception: exception from hook
476
477
477 $ echo '[hooks]' > ../a/.hg/hgrc
478 $ echo '[hooks]' > ../a/.hg/hgrc
478 $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc
479 $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc
479 $ hg pull ../a
480 $ hg pull ../a
480 pulling from ../a
481 pulling from ../a
481 searching for changes
482 searching for changes
482 error: preoutgoing.abort hook failed: raise abort from hook
483 error: preoutgoing.abort hook failed: raise abort from hook
483 abort: raise abort from hook
484 abort: raise abort from hook
484 [255]
485 [255]
485
486
486 $ echo '[hooks]' > ../a/.hg/hgrc
487 $ echo '[hooks]' > ../a/.hg/hgrc
487 $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc
488 $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc
488 $ hg pull ../a
489 $ hg pull ../a
489 pulling from ../a
490 pulling from ../a
490 searching for changes
491 searching for changes
491 hook args:
492 hook args:
492 hooktype preoutgoing
493 hooktype preoutgoing
493 source pull
494 source pull
494 abort: preoutgoing.fail hook failed
495 abort: preoutgoing.fail hook failed
495 [255]
496 [255]
496
497
497 $ echo '[hooks]' > ../a/.hg/hgrc
498 $ echo '[hooks]' > ../a/.hg/hgrc
498 $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc
499 $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc
499 $ hg pull ../a
500 $ hg pull ../a
500 pulling from ../a
501 pulling from ../a
501 searching for changes
502 searching for changes
502 abort: preoutgoing.uncallable hook is invalid: "hooktests.uncallable" is not callable
503 abort: preoutgoing.uncallable hook is invalid: "hooktests.uncallable" is not callable
503 [255]
504 [255]
504
505
505 $ echo '[hooks]' > ../a/.hg/hgrc
506 $ echo '[hooks]' > ../a/.hg/hgrc
506 $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc
507 $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc
507 $ hg pull ../a
508 $ hg pull ../a
508 pulling from ../a
509 pulling from ../a
509 searching for changes
510 searching for changes
510 abort: preoutgoing.nohook hook is invalid: "hooktests.nohook" is not defined
511 abort: preoutgoing.nohook hook is invalid: "hooktests.nohook" is not defined
511 [255]
512 [255]
512
513
513 $ echo '[hooks]' > ../a/.hg/hgrc
514 $ echo '[hooks]' > ../a/.hg/hgrc
514 $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc
515 $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc
515 $ hg pull ../a
516 $ hg pull ../a
516 pulling from ../a
517 pulling from ../a
517 searching for changes
518 searching for changes
518 abort: preoutgoing.nomodule hook is invalid: "nomodule" not in a module
519 abort: preoutgoing.nomodule hook is invalid: "nomodule" not in a module
519 [255]
520 [255]
520
521
521 $ echo '[hooks]' > ../a/.hg/hgrc
522 $ echo '[hooks]' > ../a/.hg/hgrc
522 $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc
523 $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc
523 $ hg pull ../a
524 $ hg pull ../a
524 pulling from ../a
525 pulling from ../a
525 searching for changes
526 searching for changes
526 abort: preoutgoing.badmodule hook is invalid: import of "nomodule" failed
527 abort: preoutgoing.badmodule hook is invalid: import of "nomodule" failed
527 (run with --traceback for stack trace)
528 (run with --traceback for stack trace)
528 [255]
529 [255]
529
530
530 $ echo '[hooks]' > ../a/.hg/hgrc
531 $ echo '[hooks]' > ../a/.hg/hgrc
531 $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc
532 $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc
532 $ hg pull ../a
533 $ hg pull ../a
533 pulling from ../a
534 pulling from ../a
534 searching for changes
535 searching for changes
535 abort: preoutgoing.unreachable hook is invalid: import of "hooktests.container" failed
536 abort: preoutgoing.unreachable hook is invalid: import of "hooktests.container" failed
536 (run with --traceback for stack trace)
537 (run with --traceback for stack trace)
537 [255]
538 [255]
538
539
539 $ echo '[hooks]' > ../a/.hg/hgrc
540 $ echo '[hooks]' > ../a/.hg/hgrc
540 $ echo 'preoutgoing.syntaxerror = python:syntaxerror.syntaxerror' >> ../a/.hg/hgrc
541 $ echo 'preoutgoing.syntaxerror = python:syntaxerror.syntaxerror' >> ../a/.hg/hgrc
541 $ hg pull ../a
542 $ hg pull ../a
542 pulling from ../a
543 pulling from ../a
543 searching for changes
544 searching for changes
544 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
545 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
545 (run with --traceback for stack trace)
546 (run with --traceback for stack trace)
546 [255]
547 [255]
547
548
548 The second egrep is to filter out lines like ' ^', which are slightly
549 The second egrep is to filter out lines like ' ^', which are slightly
549 different between Python 2.6 and Python 2.7.
550 different between Python 2.6 and Python 2.7.
550 $ hg pull ../a --traceback 2>&1 | egrep -v '^( +File| [_a-zA-Z*(])' | egrep -v '^( )+(\^)?$'
551 $ hg pull ../a --traceback 2>&1 | egrep -v '^( +File| [_a-zA-Z*(])' | egrep -v '^( )+(\^)?$'
551 pulling from ../a
552 pulling from ../a
552 searching for changes
553 searching for changes
553 exception from first failed import attempt:
554 exception from first failed import attempt:
554 Traceback (most recent call last):
555 Traceback (most recent call last):
555 SyntaxError: * (glob)
556 SyntaxError: * (glob)
556 exception from second failed import attempt:
557 exception from second failed import attempt:
557 Traceback (most recent call last):
558 Traceback (most recent call last):
558 ImportError: No module named hgext_syntaxerror
559 ImportError: No module named hgext_syntaxerror
559 Traceback (most recent call last):
560 Traceback (most recent call last):
560 HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
561 HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
561 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
562 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
562
563
563 $ echo '[hooks]' > ../a/.hg/hgrc
564 $ echo '[hooks]' > ../a/.hg/hgrc
564 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc
565 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc
565 $ hg pull ../a
566 $ hg pull ../a
566 pulling from ../a
567 pulling from ../a
567 searching for changes
568 searching for changes
568 hook args:
569 hook args:
569 hooktype preoutgoing
570 hooktype preoutgoing
570 source pull
571 source pull
571 adding changesets
572 adding changesets
572 adding manifests
573 adding manifests
573 adding file changes
574 adding file changes
574 added 1 changesets with 1 changes to 1 files
575 added 1 changesets with 1 changes to 1 files
575 adding remote bookmark quux
576 adding remote bookmark quux
576 (run 'hg update' to get a working copy)
577 (run 'hg update' to get a working copy)
577
578
578 post- python hooks that fail to *run* don't cause an abort
579 post- python hooks that fail to *run* don't cause an abort
579 $ rm ../a/.hg/hgrc
580 $ rm ../a/.hg/hgrc
580 $ echo '[hooks]' > .hg/hgrc
581 $ echo '[hooks]' > .hg/hgrc
581 $ echo 'post-pull.broken = python:hooktests.brokenhook' >> .hg/hgrc
582 $ echo 'post-pull.broken = python:hooktests.brokenhook' >> .hg/hgrc
582 $ hg pull ../a
583 $ hg pull ../a
583 pulling from ../a
584 pulling from ../a
584 searching for changes
585 searching for changes
585 no changes found
586 no changes found
586 error: post-pull.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict'
587 error: post-pull.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict'
587 (run with --traceback for stack trace)
588 (run with --traceback for stack trace)
588
589
589 but post- python hooks that fail to *load* do
590 but post- python hooks that fail to *load* do
590 $ echo '[hooks]' > .hg/hgrc
591 $ echo '[hooks]' > .hg/hgrc
591 $ echo 'post-pull.nomodule = python:nomodule' >> .hg/hgrc
592 $ echo 'post-pull.nomodule = python:nomodule' >> .hg/hgrc
592 $ hg pull ../a
593 $ hg pull ../a
593 pulling from ../a
594 pulling from ../a
594 searching for changes
595 searching for changes
595 no changes found
596 no changes found
596 abort: post-pull.nomodule hook is invalid: "nomodule" not in a module
597 abort: post-pull.nomodule hook is invalid: "nomodule" not in a module
597 [255]
598 [255]
598
599
599 $ echo '[hooks]' > .hg/hgrc
600 $ echo '[hooks]' > .hg/hgrc
600 $ echo 'post-pull.badmodule = python:nomodule.nowhere' >> .hg/hgrc
601 $ echo 'post-pull.badmodule = python:nomodule.nowhere' >> .hg/hgrc
601 $ hg pull ../a
602 $ hg pull ../a
602 pulling from ../a
603 pulling from ../a
603 searching for changes
604 searching for changes
604 no changes found
605 no changes found
605 abort: post-pull.badmodule hook is invalid: import of "nomodule" failed
606 abort: post-pull.badmodule hook is invalid: import of "nomodule" failed
606 (run with --traceback for stack trace)
607 (run with --traceback for stack trace)
607 [255]
608 [255]
608
609
609 $ echo '[hooks]' > .hg/hgrc
610 $ echo '[hooks]' > .hg/hgrc
610 $ echo 'post-pull.nohook = python:hooktests.nohook' >> .hg/hgrc
611 $ echo 'post-pull.nohook = python:hooktests.nohook' >> .hg/hgrc
611 $ hg pull ../a
612 $ hg pull ../a
612 pulling from ../a
613 pulling from ../a
613 searching for changes
614 searching for changes
614 no changes found
615 no changes found
615 abort: post-pull.nohook hook is invalid: "hooktests.nohook" is not defined
616 abort: post-pull.nohook hook is invalid: "hooktests.nohook" is not defined
616 [255]
617 [255]
617
618
618 make sure --traceback works
619 make sure --traceback works
619
620
620 $ echo '[hooks]' > .hg/hgrc
621 $ echo '[hooks]' > .hg/hgrc
621 $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc
622 $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc
622
623
623 $ echo aa > a
624 $ echo aa > a
624 $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback'
625 $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback'
625 Traceback (most recent call last):
626 Traceback (most recent call last):
626
627
627 $ cd ..
628 $ cd ..
628 $ hg init c
629 $ hg init c
629 $ cd c
630 $ cd c
630
631
631 $ cat > hookext.py <<EOF
632 $ cat > hookext.py <<EOF
632 > def autohook(**args):
633 > def autohook(**args):
633 > print "Automatically installed hook"
634 > print("Automatically installed hook")
634 >
635 >
635 > def reposetup(ui, repo):
636 > def reposetup(ui, repo):
636 > repo.ui.setconfig("hooks", "commit.auto", autohook)
637 > repo.ui.setconfig("hooks", "commit.auto", autohook)
637 > EOF
638 > EOF
638 $ echo '[extensions]' >> .hg/hgrc
639 $ echo '[extensions]' >> .hg/hgrc
639 $ echo 'hookext = hookext.py' >> .hg/hgrc
640 $ echo 'hookext = hookext.py' >> .hg/hgrc
640
641
641 $ touch foo
642 $ touch foo
642 $ hg add foo
643 $ hg add foo
643 $ hg ci -d '0 0' -m 'add foo'
644 $ hg ci -d '0 0' -m 'add foo'
644 Automatically installed hook
645 Automatically installed hook
645 $ echo >> foo
646 $ echo >> foo
646 $ hg ci --debug -d '0 0' -m 'change foo'
647 $ hg ci --debug -d '0 0' -m 'change foo'
647 committing files:
648 committing files:
648 foo
649 foo
649 committing manifest
650 committing manifest
650 committing changelog
651 committing changelog
651 updating the branch cache
652 updating the branch cache
652 committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708
653 committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708
653 calling hook commit.auto: hgext_hookext.autohook
654 calling hook commit.auto: hgext_hookext.autohook
654 Automatically installed hook
655 Automatically installed hook
655
656
656 $ hg showconfig hooks
657 $ hg showconfig hooks
657 hooks.commit.auto=<function autohook at *> (glob)
658 hooks.commit.auto=<function autohook at *> (glob)
658
659
659 test python hook configured with python:[file]:[hook] syntax
660 test python hook configured with python:[file]:[hook] syntax
660
661
661 $ cd ..
662 $ cd ..
662 $ mkdir d
663 $ mkdir d
663 $ cd d
664 $ cd d
664 $ hg init repo
665 $ hg init repo
665 $ mkdir hooks
666 $ mkdir hooks
666
667
667 $ cd hooks
668 $ cd hooks
668 $ cat > testhooks.py <<EOF
669 $ cat > testhooks.py <<EOF
669 > def testhook(**args):
670 > def testhook(**args):
670 > print 'hook works'
671 > print('hook works')
671 > EOF
672 > EOF
672 $ echo '[hooks]' > ../repo/.hg/hgrc
673 $ echo '[hooks]' > ../repo/.hg/hgrc
673 $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc
674 $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc
674
675
675 $ cd ../repo
676 $ cd ../repo
676 $ hg commit -d '0 0'
677 $ hg commit -d '0 0'
677 hook works
678 hook works
678 nothing changed
679 nothing changed
679 [1]
680 [1]
680
681
681 $ echo '[hooks]' > .hg/hgrc
682 $ echo '[hooks]' > .hg/hgrc
682 $ echo "update.ne = python:`pwd`/nonexistent.py:testhook" >> .hg/hgrc
683 $ echo "update.ne = python:`pwd`/nonexistent.py:testhook" >> .hg/hgrc
683 $ echo "pre-identify.npmd = python:`pwd`/:no_python_module_dir" >> .hg/hgrc
684 $ echo "pre-identify.npmd = python:`pwd`/:no_python_module_dir" >> .hg/hgrc
684
685
685 $ hg up null
686 $ hg up null
686 loading update.ne hook failed:
687 loading update.ne hook failed:
687 abort: No such file or directory: $TESTTMP/d/repo/nonexistent.py
688 abort: No such file or directory: $TESTTMP/d/repo/nonexistent.py
688 [255]
689 [255]
689
690
690 $ hg id
691 $ hg id
691 loading pre-identify.npmd hook failed:
692 loading pre-identify.npmd hook failed:
692 abort: No module named repo!
693 abort: No module named repo!
693 [255]
694 [255]
694
695
695 $ cd ../../b
696 $ cd ../../b
696
697
697 make sure --traceback works on hook import failure
698 make sure --traceback works on hook import failure
698
699
699 $ cat > importfail.py <<EOF
700 $ cat > importfail.py <<EOF
700 > import somebogusmodule
701 > import somebogusmodule
701 > # dereference something in the module to force demandimport to load it
702 > # dereference something in the module to force demandimport to load it
702 > somebogusmodule.whatever
703 > somebogusmodule.whatever
703 > EOF
704 > EOF
704
705
705 $ echo '[hooks]' > .hg/hgrc
706 $ echo '[hooks]' > .hg/hgrc
706 $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc
707 $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc
707
708
708 $ echo a >> a
709 $ echo a >> a
709 $ hg --traceback commit -ma 2>&1 | egrep -v '^( +File| [a-zA-Z(])'
710 $ hg --traceback commit -ma 2>&1 | egrep -v '^( +File| [a-zA-Z(])'
710 exception from first failed import attempt:
711 exception from first failed import attempt:
711 Traceback (most recent call last):
712 Traceback (most recent call last):
712 ImportError: No module named somebogusmodule
713 ImportError: No module named somebogusmodule
713 exception from second failed import attempt:
714 exception from second failed import attempt:
714 Traceback (most recent call last):
715 Traceback (most recent call last):
715 ImportError: No module named hgext_importfail
716 ImportError: No module named hgext_importfail
716 Traceback (most recent call last):
717 Traceback (most recent call last):
717 HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed
718 HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed
718 abort: precommit.importfail hook is invalid: import of "importfail" failed
719 abort: precommit.importfail hook is invalid: import of "importfail" failed
719
720
720 Issue1827: Hooks Update & Commit not completely post operation
721 Issue1827: Hooks Update & Commit not completely post operation
721
722
722 commit and update hooks should run after command completion. The largefiles
723 commit and update hooks should run after command completion. The largefiles
723 use demonstrates a recursive wlock, showing the hook doesn't run until the
724 use demonstrates a recursive wlock, showing the hook doesn't run until the
724 final release (and dirstate flush).
725 final release (and dirstate flush).
725
726
726 $ echo '[hooks]' > .hg/hgrc
727 $ echo '[hooks]' > .hg/hgrc
727 $ echo 'commit = hg id' >> .hg/hgrc
728 $ echo 'commit = hg id' >> .hg/hgrc
728 $ echo 'update = hg id' >> .hg/hgrc
729 $ echo 'update = hg id' >> .hg/hgrc
729 $ echo bb > a
730 $ echo bb > a
730 $ hg ci -ma
731 $ hg ci -ma
731 223eafe2750c tip
732 223eafe2750c tip
732 $ hg up 0 --config extensions.largefiles=
733 $ hg up 0 --config extensions.largefiles=
733 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
734 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
734 cb9a9f314b8b
735 cb9a9f314b8b
735 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
736 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
736
737
737 make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui
738 make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui
738 that is passed to pre/post hooks
739 that is passed to pre/post hooks
739
740
740 $ echo '[hooks]' > .hg/hgrc
741 $ echo '[hooks]' > .hg/hgrc
741 $ echo 'pre-identify = python:hooktests.verbosehook' >> .hg/hgrc
742 $ echo 'pre-identify = python:hooktests.verbosehook' >> .hg/hgrc
742 $ hg id
743 $ hg id
743 cb9a9f314b8b
744 cb9a9f314b8b
744 $ hg id --verbose
745 $ hg id --verbose
745 calling hook pre-identify: hooktests.verbosehook
746 calling hook pre-identify: hooktests.verbosehook
746 verbose output from hook
747 verbose output from hook
747 cb9a9f314b8b
748 cb9a9f314b8b
748
749
749 Ensure hooks can be prioritized
750 Ensure hooks can be prioritized
750
751
751 $ echo '[hooks]' > .hg/hgrc
752 $ echo '[hooks]' > .hg/hgrc
752 $ echo 'pre-identify.a = python:hooktests.verbosehook' >> .hg/hgrc
753 $ echo 'pre-identify.a = python:hooktests.verbosehook' >> .hg/hgrc
753 $ echo 'pre-identify.b = python:hooktests.verbosehook' >> .hg/hgrc
754 $ echo 'pre-identify.b = python:hooktests.verbosehook' >> .hg/hgrc
754 $ echo 'priority.pre-identify.b = 1' >> .hg/hgrc
755 $ echo 'priority.pre-identify.b = 1' >> .hg/hgrc
755 $ echo 'pre-identify.c = python:hooktests.verbosehook' >> .hg/hgrc
756 $ echo 'pre-identify.c = python:hooktests.verbosehook' >> .hg/hgrc
756 $ hg id --verbose
757 $ hg id --verbose
757 calling hook pre-identify.b: hooktests.verbosehook
758 calling hook pre-identify.b: hooktests.verbosehook
758 verbose output from hook
759 verbose output from hook
759 calling hook pre-identify.a: hooktests.verbosehook
760 calling hook pre-identify.a: hooktests.verbosehook
760 verbose output from hook
761 verbose output from hook
761 calling hook pre-identify.c: hooktests.verbosehook
762 calling hook pre-identify.c: hooktests.verbosehook
762 verbose output from hook
763 verbose output from hook
763 cb9a9f314b8b
764 cb9a9f314b8b
764
765
765 new tags must be visible in pretxncommit (issue3210)
766 new tags must be visible in pretxncommit (issue3210)
766
767
767 $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc
768 $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc
768 $ hg tag -f foo
769 $ hg tag -f foo
769 ['a', 'foo', 'tip']
770 ['a', 'foo', 'tip']
770
771
771 post-init hooks must not crash (issue4983)
772 post-init hooks must not crash (issue4983)
772 This also creates the `to` repo for the next test block.
773 This also creates the `to` repo for the next test block.
773
774
774 $ cd ..
775 $ cd ..
775 $ cat << EOF >> hgrc-with-post-init-hook
776 $ cat << EOF >> hgrc-with-post-init-hook
776 > [hooks]
777 > [hooks]
777 > post-init = sh -c "printenv.py post-init"
778 > post-init = sh -c "printenv.py post-init"
778 > EOF
779 > EOF
779 $ HGRCPATH=hgrc-with-post-init-hook hg init to
780 $ HGRCPATH=hgrc-with-post-init-hook hg init to
780 post-init hook: HG_ARGS=init to HG_HOOKNAME=post-init HG_HOOKTYPE=post-init HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0
781 post-init hook: HG_ARGS=init to HG_HOOKNAME=post-init HG_HOOKTYPE=post-init HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0
781
782
782 new commits must be visible in pretxnchangegroup (issue3428)
783 new commits must be visible in pretxnchangegroup (issue3428)
783
784
784 $ echo '[hooks]' >> to/.hg/hgrc
785 $ echo '[hooks]' >> to/.hg/hgrc
785 $ echo 'prechangegroup = hg --traceback tip' >> to/.hg/hgrc
786 $ echo 'prechangegroup = hg --traceback tip' >> to/.hg/hgrc
786 $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc
787 $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc
787 $ echo a >> to/a
788 $ echo a >> to/a
788 $ hg --cwd to ci -Ama
789 $ hg --cwd to ci -Ama
789 adding a
790 adding a
790 $ hg clone to from
791 $ hg clone to from
791 updating to branch default
792 updating to branch default
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
793 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
793 $ echo aa >> from/a
794 $ echo aa >> from/a
794 $ hg --cwd from ci -mb
795 $ hg --cwd from ci -mb
795 $ hg --cwd from push
796 $ hg --cwd from push
796 pushing to $TESTTMP/to (glob)
797 pushing to $TESTTMP/to (glob)
797 searching for changes
798 searching for changes
798 changeset: 0:cb9a9f314b8b
799 changeset: 0:cb9a9f314b8b
799 tag: tip
800 tag: tip
800 user: test
801 user: test
801 date: Thu Jan 01 00:00:00 1970 +0000
802 date: Thu Jan 01 00:00:00 1970 +0000
802 summary: a
803 summary: a
803
804
804 adding changesets
805 adding changesets
805 adding manifests
806 adding manifests
806 adding file changes
807 adding file changes
807 added 1 changesets with 1 changes to 1 files
808 added 1 changesets with 1 changes to 1 files
808 changeset: 1:9836a07b9b9d
809 changeset: 1:9836a07b9b9d
809 tag: tip
810 tag: tip
810 user: test
811 user: test
811 date: Thu Jan 01 00:00:00 1970 +0000
812 date: Thu Jan 01 00:00:00 1970 +0000
812 summary: b
813 summary: b
813
814
814
815
815 pretxnclose hook failure should abort the transaction
816 pretxnclose hook failure should abort the transaction
816
817
817 $ hg init txnfailure
818 $ hg init txnfailure
818 $ cd txnfailure
819 $ cd txnfailure
819 $ touch a && hg commit -Aqm a
820 $ touch a && hg commit -Aqm a
820 $ cat >> .hg/hgrc <<EOF
821 $ cat >> .hg/hgrc <<EOF
821 > [hooks]
822 > [hooks]
822 > pretxnclose.error = exit 1
823 > pretxnclose.error = exit 1
823 > EOF
824 > EOF
824 $ hg strip -r 0 --config extensions.strip=
825 $ hg strip -r 0 --config extensions.strip=
825 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
826 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
826 saved backup bundle to * (glob)
827 saved backup bundle to * (glob)
827 transaction abort!
828 transaction abort!
828 rollback completed
829 rollback completed
829 strip failed, backup bundle stored in * (glob)
830 strip failed, backup bundle stored in * (glob)
830 abort: pretxnclose.error hook exited with status 1
831 abort: pretxnclose.error hook exited with status 1
831 [255]
832 [255]
832 $ hg recover
833 $ hg recover
833 no interrupted transaction available
834 no interrupted transaction available
834 [1]
835 [1]
835 $ cd ..
836 $ cd ..
836
837
837 check whether HG_PENDING makes pending changes only in related
838 check whether HG_PENDING makes pending changes only in related
838 repositories visible to an external hook.
839 repositories visible to an external hook.
839
840
840 (emulate a transaction running concurrently by copied
841 (emulate a transaction running concurrently by copied
841 .hg/store/00changelog.i.a in subsequent test)
842 .hg/store/00changelog.i.a in subsequent test)
842
843
843 $ cat > $TESTTMP/savepending.sh <<EOF
844 $ cat > $TESTTMP/savepending.sh <<EOF
844 > cp .hg/store/00changelog.i.a .hg/store/00changelog.i.a.saved
845 > cp .hg/store/00changelog.i.a .hg/store/00changelog.i.a.saved
845 > exit 1 # to avoid adding new revision for subsequent tests
846 > exit 1 # to avoid adding new revision for subsequent tests
846 > EOF
847 > EOF
847 $ cd a
848 $ cd a
848 $ hg tip -q
849 $ hg tip -q
849 4:539e4b31b6dc
850 4:539e4b31b6dc
850 $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" commit -m "invisible"
851 $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" commit -m "invisible"
851 transaction abort!
852 transaction abort!
852 rollback completed
853 rollback completed
853 abort: pretxnclose hook exited with status 1
854 abort: pretxnclose hook exited with status 1
854 [255]
855 [255]
855 $ cp .hg/store/00changelog.i.a.saved .hg/store/00changelog.i.a
856 $ cp .hg/store/00changelog.i.a.saved .hg/store/00changelog.i.a
856
857
857 (check (in)visibility of new changeset while transaction running in
858 (check (in)visibility of new changeset while transaction running in
858 repo)
859 repo)
859
860
860 $ cat > $TESTTMP/checkpending.sh <<EOF
861 $ cat > $TESTTMP/checkpending.sh <<EOF
861 > echo '@a'
862 > echo '@a'
862 > hg -R "$TESTTMP/a" tip -q
863 > hg -R "$TESTTMP/a" tip -q
863 > echo '@a/nested'
864 > echo '@a/nested'
864 > hg -R "$TESTTMP/a/nested" tip -q
865 > hg -R "$TESTTMP/a/nested" tip -q
865 > exit 1 # to avoid adding new revision for subsequent tests
866 > exit 1 # to avoid adding new revision for subsequent tests
866 > EOF
867 > EOF
867 $ hg init nested
868 $ hg init nested
868 $ cd nested
869 $ cd nested
869 $ echo a > a
870 $ echo a > a
870 $ hg add a
871 $ hg add a
871 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" commit -m '#0'
872 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" commit -m '#0'
872 @a
873 @a
873 4:539e4b31b6dc
874 4:539e4b31b6dc
874 @a/nested
875 @a/nested
875 0:bf5e395ced2c
876 0:bf5e395ced2c
876 transaction abort!
877 transaction abort!
877 rollback completed
878 rollback completed
878 abort: pretxnclose hook exited with status 1
879 abort: pretxnclose hook exited with status 1
879 [255]
880 [255]
880
881
881 Hook from untrusted hgrc are reported as failure
882 Hook from untrusted hgrc are reported as failure
882 ================================================
883 ================================================
883
884
884 $ cat << EOF > $TESTTMP/untrusted.py
885 $ cat << EOF > $TESTTMP/untrusted.py
885 > from mercurial import scmutil, util
886 > from mercurial import scmutil, util
886 > def uisetup(ui):
887 > def uisetup(ui):
887 > class untrustedui(ui.__class__):
888 > class untrustedui(ui.__class__):
888 > def _trusted(self, fp, f):
889 > def _trusted(self, fp, f):
889 > if util.normpath(fp.name).endswith('untrusted/.hg/hgrc'):
890 > if util.normpath(fp.name).endswith('untrusted/.hg/hgrc'):
890 > return False
891 > return False
891 > return super(untrustedui, self)._trusted(fp, f)
892 > return super(untrustedui, self)._trusted(fp, f)
892 > ui.__class__ = untrustedui
893 > ui.__class__ = untrustedui
893 > EOF
894 > EOF
894 $ cat << EOF >> $HGRCPATH
895 $ cat << EOF >> $HGRCPATH
895 > [extensions]
896 > [extensions]
896 > untrusted=$TESTTMP/untrusted.py
897 > untrusted=$TESTTMP/untrusted.py
897 > EOF
898 > EOF
898 $ hg init untrusted
899 $ hg init untrusted
899 $ cd untrusted
900 $ cd untrusted
900
901
901 Non-blocking hook
902 Non-blocking hook
902 -----------------
903 -----------------
903
904
904 $ cat << EOF >> .hg/hgrc
905 $ cat << EOF >> .hg/hgrc
905 > [hooks]
906 > [hooks]
906 > txnclose.testing=echo txnclose hook called
907 > txnclose.testing=echo txnclose hook called
907 > EOF
908 > EOF
908 $ touch a && hg commit -Aqm a
909 $ touch a && hg commit -Aqm a
909 warning: untrusted hook txnclose.testing not executed
910 warning: untrusted hook txnclose.testing not executed
910 $ hg log
911 $ hg log
911 changeset: 0:3903775176ed
912 changeset: 0:3903775176ed
912 tag: tip
913 tag: tip
913 user: test
914 user: test
914 date: Thu Jan 01 00:00:00 1970 +0000
915 date: Thu Jan 01 00:00:00 1970 +0000
915 summary: a
916 summary: a
916
917
917
918
918 Non-blocking hook
919 Non-blocking hook
919 -----------------
920 -----------------
920
921
921 $ cat << EOF >> .hg/hgrc
922 $ cat << EOF >> .hg/hgrc
922 > [hooks]
923 > [hooks]
923 > pretxnclose.testing=echo pre-txnclose hook called
924 > pretxnclose.testing=echo pre-txnclose hook called
924 > EOF
925 > EOF
925 $ touch b && hg commit -Aqm a
926 $ touch b && hg commit -Aqm a
926 transaction abort!
927 transaction abort!
927 rollback completed
928 rollback completed
928 abort: untrusted hook pretxnclose.testing not executed
929 abort: untrusted hook pretxnclose.testing not executed
929 (see 'hg help config.trusted')
930 (see 'hg help config.trusted')
930 [255]
931 [255]
931 $ hg log
932 $ hg log
932 changeset: 0:3903775176ed
933 changeset: 0:3903775176ed
933 tag: tip
934 tag: tip
934 user: test
935 user: test
935 date: Thu Jan 01 00:00:00 1970 +0000
936 date: Thu Jan 01 00:00:00 1970 +0000
936 summary: a
937 summary: a
937
938
@@ -1,157 +1,157 b''
1 #require unix-permissions
1 #require unix-permissions
2
2
3 test that new files created in .hg inherit the permissions from .hg/store
3 test that new files created in .hg inherit the permissions from .hg/store
4
4
5 $ mkdir dir
5 $ mkdir dir
6
6
7 just in case somebody has a strange $TMPDIR
7 just in case somebody has a strange $TMPDIR
8
8
9 $ chmod g-s dir
9 $ chmod g-s dir
10 $ cd dir
10 $ cd dir
11
11
12 $ cat >printmodes.py <<EOF
12 $ cat >printmodes.py <<EOF
13 > import os, sys
13 > import os, sys
14 >
14 >
15 > allnames = []
15 > allnames = []
16 > isdir = {}
16 > isdir = {}
17 > for root, dirs, files in os.walk(sys.argv[1]):
17 > for root, dirs, files in os.walk(sys.argv[1]):
18 > for d in dirs:
18 > for d in dirs:
19 > name = os.path.join(root, d)
19 > name = os.path.join(root, d)
20 > isdir[name] = 1
20 > isdir[name] = 1
21 > allnames.append(name)
21 > allnames.append(name)
22 > for f in files:
22 > for f in files:
23 > name = os.path.join(root, f)
23 > name = os.path.join(root, f)
24 > allnames.append(name)
24 > allnames.append(name)
25 > allnames.sort()
25 > allnames.sort()
26 > for name in allnames:
26 > for name in allnames:
27 > suffix = name in isdir and '/' or ''
27 > suffix = name in isdir and '/' or ''
28 > print '%05o %s%s' % (os.lstat(name).st_mode & 07777, name, suffix)
28 > print('%05o %s%s' % (os.lstat(name).st_mode & 07777, name, suffix))
29 > EOF
29 > EOF
30
30
31 $ cat >mode.py <<EOF
31 $ cat >mode.py <<EOF
32 > import sys
32 > import sys
33 > import os
33 > import os
34 > print '%05o' % os.lstat(sys.argv[1]).st_mode
34 > print('%05o' % os.lstat(sys.argv[1]).st_mode)
35 > EOF
35 > EOF
36
36
37 $ umask 077
37 $ umask 077
38
38
39 $ hg init repo
39 $ hg init repo
40 $ cd repo
40 $ cd repo
41
41
42 $ chmod 0770 .hg/store
42 $ chmod 0770 .hg/store
43
43
44 before commit
44 before commit
45 store can be written by the group, other files cannot
45 store can be written by the group, other files cannot
46 store is setgid
46 store is setgid
47
47
48 $ $PYTHON ../printmodes.py .
48 $ $PYTHON ../printmodes.py .
49 00700 ./.hg/
49 00700 ./.hg/
50 00600 ./.hg/00changelog.i
50 00600 ./.hg/00changelog.i
51 00600 ./.hg/requires
51 00600 ./.hg/requires
52 00770 ./.hg/store/
52 00770 ./.hg/store/
53
53
54 $ mkdir dir
54 $ mkdir dir
55 $ touch foo dir/bar
55 $ touch foo dir/bar
56 $ hg ci -qAm 'add files'
56 $ hg ci -qAm 'add files'
57
57
58 after commit
58 after commit
59 working dir files can only be written by the owner
59 working dir files can only be written by the owner
60 files created in .hg can be written by the group
60 files created in .hg can be written by the group
61 (in particular, store/**, dirstate, branch cache file, undo files)
61 (in particular, store/**, dirstate, branch cache file, undo files)
62 new directories are setgid
62 new directories are setgid
63
63
64 $ $PYTHON ../printmodes.py .
64 $ $PYTHON ../printmodes.py .
65 00700 ./.hg/
65 00700 ./.hg/
66 00600 ./.hg/00changelog.i
66 00600 ./.hg/00changelog.i
67 00770 ./.hg/cache/
67 00770 ./.hg/cache/
68 00660 ./.hg/cache/branch2-served
68 00660 ./.hg/cache/branch2-served
69 00660 ./.hg/cache/rbc-names-v1
69 00660 ./.hg/cache/rbc-names-v1
70 00660 ./.hg/cache/rbc-revs-v1
70 00660 ./.hg/cache/rbc-revs-v1
71 00660 ./.hg/dirstate
71 00660 ./.hg/dirstate
72 00660 ./.hg/fsmonitor.state (fsmonitor !)
72 00660 ./.hg/fsmonitor.state (fsmonitor !)
73 00660 ./.hg/last-message.txt
73 00660 ./.hg/last-message.txt
74 00600 ./.hg/requires
74 00600 ./.hg/requires
75 00770 ./.hg/store/
75 00770 ./.hg/store/
76 00660 ./.hg/store/00changelog.i
76 00660 ./.hg/store/00changelog.i
77 00660 ./.hg/store/00manifest.i
77 00660 ./.hg/store/00manifest.i
78 00770 ./.hg/store/data/
78 00770 ./.hg/store/data/
79 00770 ./.hg/store/data/dir/
79 00770 ./.hg/store/data/dir/
80 00660 ./.hg/store/data/dir/bar.i
80 00660 ./.hg/store/data/dir/bar.i
81 00660 ./.hg/store/data/foo.i
81 00660 ./.hg/store/data/foo.i
82 00660 ./.hg/store/fncache
82 00660 ./.hg/store/fncache
83 00660 ./.hg/store/phaseroots
83 00660 ./.hg/store/phaseroots
84 00660 ./.hg/store/undo
84 00660 ./.hg/store/undo
85 00660 ./.hg/store/undo.backupfiles
85 00660 ./.hg/store/undo.backupfiles
86 00660 ./.hg/store/undo.phaseroots
86 00660 ./.hg/store/undo.phaseroots
87 00660 ./.hg/undo.backup.dirstate
87 00660 ./.hg/undo.backup.dirstate
88 00660 ./.hg/undo.bookmarks
88 00660 ./.hg/undo.bookmarks
89 00660 ./.hg/undo.branch
89 00660 ./.hg/undo.branch
90 00660 ./.hg/undo.desc
90 00660 ./.hg/undo.desc
91 00660 ./.hg/undo.dirstate
91 00660 ./.hg/undo.dirstate
92 00700 ./dir/
92 00700 ./dir/
93 00600 ./dir/bar
93 00600 ./dir/bar
94 00600 ./foo
94 00600 ./foo
95
95
96 $ umask 007
96 $ umask 007
97 $ hg init ../push
97 $ hg init ../push
98
98
99 before push
99 before push
100 group can write everything
100 group can write everything
101
101
102 $ $PYTHON ../printmodes.py ../push
102 $ $PYTHON ../printmodes.py ../push
103 00770 ../push/.hg/
103 00770 ../push/.hg/
104 00660 ../push/.hg/00changelog.i
104 00660 ../push/.hg/00changelog.i
105 00660 ../push/.hg/requires
105 00660 ../push/.hg/requires
106 00770 ../push/.hg/store/
106 00770 ../push/.hg/store/
107
107
108 $ umask 077
108 $ umask 077
109 $ hg -q push ../push
109 $ hg -q push ../push
110
110
111 after push
111 after push
112 group can still write everything
112 group can still write everything
113
113
114 $ $PYTHON ../printmodes.py ../push
114 $ $PYTHON ../printmodes.py ../push
115 00770 ../push/.hg/
115 00770 ../push/.hg/
116 00660 ../push/.hg/00changelog.i
116 00660 ../push/.hg/00changelog.i
117 00770 ../push/.hg/cache/
117 00770 ../push/.hg/cache/
118 00660 ../push/.hg/cache/branch2-base
118 00660 ../push/.hg/cache/branch2-base
119 00660 ../push/.hg/dirstate
119 00660 ../push/.hg/dirstate
120 00660 ../push/.hg/requires
120 00660 ../push/.hg/requires
121 00770 ../push/.hg/store/
121 00770 ../push/.hg/store/
122 00660 ../push/.hg/store/00changelog.i
122 00660 ../push/.hg/store/00changelog.i
123 00660 ../push/.hg/store/00manifest.i
123 00660 ../push/.hg/store/00manifest.i
124 00770 ../push/.hg/store/data/
124 00770 ../push/.hg/store/data/
125 00770 ../push/.hg/store/data/dir/
125 00770 ../push/.hg/store/data/dir/
126 00660 ../push/.hg/store/data/dir/bar.i
126 00660 ../push/.hg/store/data/dir/bar.i
127 00660 ../push/.hg/store/data/foo.i
127 00660 ../push/.hg/store/data/foo.i
128 00660 ../push/.hg/store/fncache
128 00660 ../push/.hg/store/fncache
129 00660 ../push/.hg/store/undo
129 00660 ../push/.hg/store/undo
130 00660 ../push/.hg/store/undo.backupfiles
130 00660 ../push/.hg/store/undo.backupfiles
131 00660 ../push/.hg/store/undo.phaseroots
131 00660 ../push/.hg/store/undo.phaseroots
132 00660 ../push/.hg/undo.bookmarks
132 00660 ../push/.hg/undo.bookmarks
133 00660 ../push/.hg/undo.branch
133 00660 ../push/.hg/undo.branch
134 00660 ../push/.hg/undo.desc
134 00660 ../push/.hg/undo.desc
135 00660 ../push/.hg/undo.dirstate
135 00660 ../push/.hg/undo.dirstate
136
136
137
137
138 Test that we don't lose the setgid bit when we call chmod.
138 Test that we don't lose the setgid bit when we call chmod.
139 Not all systems support setgid directories (e.g. HFS+), so
139 Not all systems support setgid directories (e.g. HFS+), so
140 just check that directories have the same mode.
140 just check that directories have the same mode.
141
141
142 $ cd ..
142 $ cd ..
143 $ hg init setgid
143 $ hg init setgid
144 $ cd setgid
144 $ cd setgid
145 $ chmod g+rwx .hg/store
145 $ chmod g+rwx .hg/store
146 $ chmod g+s .hg/store 2> /dev/null || true
146 $ chmod g+s .hg/store 2> /dev/null || true
147 $ mkdir dir
147 $ mkdir dir
148 $ touch dir/file
148 $ touch dir/file
149 $ hg ci -qAm 'add dir/file'
149 $ hg ci -qAm 'add dir/file'
150 $ storemode=`$PYTHON ../mode.py .hg/store`
150 $ storemode=`$PYTHON ../mode.py .hg/store`
151 $ dirmode=`$PYTHON ../mode.py .hg/store/data/dir`
151 $ dirmode=`$PYTHON ../mode.py .hg/store/data/dir`
152 $ if [ "$storemode" != "$dirmode" ]; then
152 $ if [ "$storemode" != "$dirmode" ]; then
153 > echo "$storemode != $dirmode"
153 > echo "$storemode != $dirmode"
154 > fi
154 > fi
155 $ cd ..
155 $ cd ..
156
156
157 $ cd .. # g-s dir
157 $ cd .. # g-s dir
@@ -1,29 +1,29 b''
1 #require no-pure
1 #require no-pure
2
2
3 A script to generate nasty diff worst-case scenarios:
3 A script to generate nasty diff worst-case scenarios:
4
4
5 $ cat > s.py <<EOF
5 $ cat > s.py <<EOF
6 > import random
6 > import random
7 > for x in xrange(100000):
7 > for x in xrange(100000):
8 > print
8 > print
9 > if random.randint(0, 100) >= 50:
9 > if random.randint(0, 100) >= 50:
10 > x += 1
10 > x += 1
11 > print hex(x)
11 > print(hex(x))
12 > EOF
12 > EOF
13
13
14 $ hg init a
14 $ hg init a
15 $ cd a
15 $ cd a
16
16
17 Check in a big file:
17 Check in a big file:
18
18
19 $ $PYTHON ../s.py > a
19 $ $PYTHON ../s.py > a
20 $ hg ci -qAm0
20 $ hg ci -qAm0
21
21
22 Modify it:
22 Modify it:
23
23
24 $ $PYTHON ../s.py > a
24 $ $PYTHON ../s.py > a
25
25
26 Time a check-in, should never take more than 10 seconds user time:
26 Time a check-in, should never take more than 10 seconds user time:
27
27
28 $ hg ci --time -m1
28 $ hg ci --time -m1
29 time: real .* secs .user [0-9][.].* sys .* (re)
29 time: real .* secs .user [0-9][.].* sys .* (re)
@@ -1,259 +1,259 b''
1 Create user cache directory
1 Create user cache directory
2
2
3 $ USERCACHE=`pwd`/cache; export USERCACHE
3 $ USERCACHE=`pwd`/cache; export USERCACHE
4 $ cat <<EOF >> ${HGRCPATH}
4 $ cat <<EOF >> ${HGRCPATH}
5 > [extensions]
5 > [extensions]
6 > hgext.largefiles=
6 > hgext.largefiles=
7 > [largefiles]
7 > [largefiles]
8 > usercache=${USERCACHE}
8 > usercache=${USERCACHE}
9 > EOF
9 > EOF
10 $ mkdir -p ${USERCACHE}
10 $ mkdir -p ${USERCACHE}
11
11
12 Create source repo, and commit adding largefile.
12 Create source repo, and commit adding largefile.
13
13
14 $ hg init src
14 $ hg init src
15 $ cd src
15 $ cd src
16 $ echo large > large
16 $ echo large > large
17 $ hg add --large large
17 $ hg add --large large
18 $ hg commit -m 'add largefile'
18 $ hg commit -m 'add largefile'
19 $ hg rm large
19 $ hg rm large
20 $ hg commit -m 'branchhead without largefile' large
20 $ hg commit -m 'branchhead without largefile' large
21 $ hg up -qr 0
21 $ hg up -qr 0
22 $ rm large
22 $ rm large
23 $ echo "0000000000000000000000000000000000000000" > .hglf/large
23 $ echo "0000000000000000000000000000000000000000" > .hglf/large
24 $ hg commit -m 'commit missing file with corrupt standin' large
24 $ hg commit -m 'commit missing file with corrupt standin' large
25 abort: large: file not found!
25 abort: large: file not found!
26 [255]
26 [255]
27 $ hg up -Cqr 0
27 $ hg up -Cqr 0
28 $ cd ..
28 $ cd ..
29
29
30 Discard all cached largefiles in USERCACHE
30 Discard all cached largefiles in USERCACHE
31
31
32 $ rm -rf ${USERCACHE}
32 $ rm -rf ${USERCACHE}
33
33
34 Create mirror repo, and pull from source without largefile:
34 Create mirror repo, and pull from source without largefile:
35 "pull" is used instead of "clone" for suppression of (1) updating to
35 "pull" is used instead of "clone" for suppression of (1) updating to
36 tip (= caching largefile from source repo), and (2) recording source
36 tip (= caching largefile from source repo), and (2) recording source
37 repo as "default" path in .hg/hgrc.
37 repo as "default" path in .hg/hgrc.
38
38
39 $ hg init mirror
39 $ hg init mirror
40 $ cd mirror
40 $ cd mirror
41 $ hg pull ../src
41 $ hg pull ../src
42 pulling from ../src
42 pulling from ../src
43 requesting all changes
43 requesting all changes
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 2 changesets with 1 changes to 1 files
47 added 2 changesets with 1 changes to 1 files
48 (run 'hg update' to get a working copy)
48 (run 'hg update' to get a working copy)
49
49
50 Update working directory to "tip", which requires largefile("large"),
50 Update working directory to "tip", which requires largefile("large"),
51 but there is no cache file for it. So, hg must treat it as
51 but there is no cache file for it. So, hg must treat it as
52 "missing"(!) file.
52 "missing"(!) file.
53
53
54 $ hg update -r0
54 $ hg update -r0
55 getting changed largefiles
55 getting changed largefiles
56 large: largefile 7f7097b041ccf68cc5561e9600da4655d21c6d18 not available from file:/*/$TESTTMP/mirror (glob)
56 large: largefile 7f7097b041ccf68cc5561e9600da4655d21c6d18 not available from file:/*/$TESTTMP/mirror (glob)
57 0 largefiles updated, 0 removed
57 0 largefiles updated, 0 removed
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
59 $ hg status
59 $ hg status
60 ! large
60 ! large
61
61
62 Update working directory to null: this cleanup .hg/largefiles/dirstate
62 Update working directory to null: this cleanup .hg/largefiles/dirstate
63
63
64 $ hg update null
64 $ hg update null
65 getting changed largefiles
65 getting changed largefiles
66 0 largefiles updated, 0 removed
66 0 largefiles updated, 0 removed
67 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
68
68
69 Update working directory to tip, again.
69 Update working directory to tip, again.
70
70
71 $ hg update -r0
71 $ hg update -r0
72 getting changed largefiles
72 getting changed largefiles
73 large: largefile 7f7097b041ccf68cc5561e9600da4655d21c6d18 not available from file:/*/$TESTTMP/mirror (glob)
73 large: largefile 7f7097b041ccf68cc5561e9600da4655d21c6d18 not available from file:/*/$TESTTMP/mirror (glob)
74 0 largefiles updated, 0 removed
74 0 largefiles updated, 0 removed
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 $ hg status
76 $ hg status
77 ! large
77 ! large
78 $ cd ..
78 $ cd ..
79
79
80 Verify that largefiles from pulled branchheads are fetched, also to an empty repo
80 Verify that largefiles from pulled branchheads are fetched, also to an empty repo
81
81
82 $ hg init mirror2
82 $ hg init mirror2
83 $ hg -R mirror2 pull src -r0
83 $ hg -R mirror2 pull src -r0
84 pulling from src
84 pulling from src
85 adding changesets
85 adding changesets
86 adding manifests
86 adding manifests
87 adding file changes
87 adding file changes
88 added 1 changesets with 1 changes to 1 files
88 added 1 changesets with 1 changes to 1 files
89 (run 'hg update' to get a working copy)
89 (run 'hg update' to get a working copy)
90
90
91 #if unix-permissions
91 #if unix-permissions
92
92
93 Portable way to print file permissions:
93 Portable way to print file permissions:
94
94
95 $ cat > ls-l.py <<EOF
95 $ cat > ls-l.py <<EOF
96 > #!$PYTHON
96 > #!$PYTHON
97 > import sys, os
97 > import sys, os
98 > path = sys.argv[1]
98 > path = sys.argv[1]
99 > print '%03o' % (os.lstat(path).st_mode & 0777)
99 > print('%03o' % (os.lstat(path).st_mode & 0777))
100 > EOF
100 > EOF
101 $ chmod +x ls-l.py
101 $ chmod +x ls-l.py
102
102
103 Test that files in .hg/largefiles inherit mode from .hg/store, not
103 Test that files in .hg/largefiles inherit mode from .hg/store, not
104 from file in working copy:
104 from file in working copy:
105
105
106 $ cd src
106 $ cd src
107 $ chmod 750 .hg/store
107 $ chmod 750 .hg/store
108 $ chmod 660 large
108 $ chmod 660 large
109 $ echo change >> large
109 $ echo change >> large
110 $ hg commit -m change
110 $ hg commit -m change
111 created new head
111 created new head
112 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
112 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
113 640
113 640
114
114
115 Test permission of with files in .hg/largefiles created by update:
115 Test permission of with files in .hg/largefiles created by update:
116
116
117 $ cd ../mirror
117 $ cd ../mirror
118 $ rm -r "$USERCACHE" .hg/largefiles # avoid links
118 $ rm -r "$USERCACHE" .hg/largefiles # avoid links
119 $ chmod 750 .hg/store
119 $ chmod 750 .hg/store
120 $ hg pull ../src --update -q
120 $ hg pull ../src --update -q
121 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
121 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
122 640
122 640
123
123
124 Test permission of files created by push:
124 Test permission of files created by push:
125
125
126 $ hg serve -R ../src -d -p $HGPORT --pid-file hg.pid \
126 $ hg serve -R ../src -d -p $HGPORT --pid-file hg.pid \
127 > --config "web.allow_push=*" --config web.push_ssl=no
127 > --config "web.allow_push=*" --config web.push_ssl=no
128 $ cat hg.pid >> $DAEMON_PIDS
128 $ cat hg.pid >> $DAEMON_PIDS
129
129
130 $ echo change >> large
130 $ echo change >> large
131 $ hg commit -m change
131 $ hg commit -m change
132
132
133 $ rm -r "$USERCACHE"
133 $ rm -r "$USERCACHE"
134
134
135 $ hg push -q http://localhost:$HGPORT/
135 $ hg push -q http://localhost:$HGPORT/
136
136
137 $ ../ls-l.py ../src/.hg/largefiles/b734e14a0971e370408ab9bce8d56d8485e368a9
137 $ ../ls-l.py ../src/.hg/largefiles/b734e14a0971e370408ab9bce8d56d8485e368a9
138 640
138 640
139
139
140 $ cd ..
140 $ cd ..
141
141
142 #endif
142 #endif
143
143
144 Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say
144 Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say
145 it is missing, but a remove on a nonexistent unknown file still should. Same
145 it is missing, but a remove on a nonexistent unknown file still should. Same
146 for a forget.)
146 for a forget.)
147
147
148 $ cd src
148 $ cd src
149 $ touch x
149 $ touch x
150 $ hg add x
150 $ hg add x
151 $ mv x y
151 $ mv x y
152 $ hg remove -A x y ENOENT
152 $ hg remove -A x y ENOENT
153 ENOENT: * (glob)
153 ENOENT: * (glob)
154 not removing y: file is untracked
154 not removing y: file is untracked
155 [1]
155 [1]
156 $ hg add y
156 $ hg add y
157 $ mv y z
157 $ mv y z
158 $ hg forget y z ENOENT
158 $ hg forget y z ENOENT
159 ENOENT: * (glob)
159 ENOENT: * (glob)
160 not removing z: file is already untracked
160 not removing z: file is already untracked
161 [1]
161 [1]
162
162
163 Largefiles are accessible from the share's store
163 Largefiles are accessible from the share's store
164 $ cd ..
164 $ cd ..
165 $ hg share -q src share_dst --config extensions.share=
165 $ hg share -q src share_dst --config extensions.share=
166 $ hg -R share_dst update -r0
166 $ hg -R share_dst update -r0
167 getting changed largefiles
167 getting changed largefiles
168 1 largefiles updated, 0 removed
168 1 largefiles updated, 0 removed
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
170
170
171 $ echo modified > share_dst/large
171 $ echo modified > share_dst/large
172 $ hg -R share_dst ci -m modified
172 $ hg -R share_dst ci -m modified
173 created new head
173 created new head
174
174
175 Only dirstate is in the local store for the share, and the largefile is in the
175 Only dirstate is in the local store for the share, and the largefile is in the
176 share source's local store. Avoid the extra largefiles added in the unix
176 share source's local store. Avoid the extra largefiles added in the unix
177 conditional above.
177 conditional above.
178 $ hash=`hg -R share_dst cat share_dst/.hglf/large`
178 $ hash=`hg -R share_dst cat share_dst/.hglf/large`
179 $ echo $hash
179 $ echo $hash
180 e2fb5f2139d086ded2cb600d5a91a196e76bf020
180 e2fb5f2139d086ded2cb600d5a91a196e76bf020
181
181
182 $ find share_dst/.hg/largefiles/* | sort
182 $ find share_dst/.hg/largefiles/* | sort
183 share_dst/.hg/largefiles/dirstate
183 share_dst/.hg/largefiles/dirstate
184
184
185 $ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort
185 $ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort
186 src/.hg/largefiles/dirstate
186 src/.hg/largefiles/dirstate
187 src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
187 src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
188
188
189 Verify that backwards compatibility is maintained for old storage layout
189 Verify that backwards compatibility is maintained for old storage layout
190 $ mv src/.hg/largefiles/$hash share_dst/.hg/largefiles
190 $ mv src/.hg/largefiles/$hash share_dst/.hg/largefiles
191 $ hg verify --quiet --lfa -R share_dst --config largefiles.usercache=
191 $ hg verify --quiet --lfa -R share_dst --config largefiles.usercache=
192
192
193 Inject corruption into the largefiles store and see how update handles that:
193 Inject corruption into the largefiles store and see how update handles that:
194
194
195 $ cd src
195 $ cd src
196 $ hg up -qC tip
196 $ hg up -qC tip
197 $ cat large
197 $ cat large
198 modified
198 modified
199 $ rm large
199 $ rm large
200 $ cat .hglf/large
200 $ cat .hglf/large
201 e2fb5f2139d086ded2cb600d5a91a196e76bf020
201 e2fb5f2139d086ded2cb600d5a91a196e76bf020
202 $ mv .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020 ..
202 $ mv .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020 ..
203 $ echo corruption > .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
203 $ echo corruption > .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
204 $ hg up -C
204 $ hg up -C
205 getting changed largefiles
205 getting changed largefiles
206 large: data corruption in $TESTTMP/src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020 with hash 6a7bb2556144babe3899b25e5428123735bb1e27 (glob)
206 large: data corruption in $TESTTMP/src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020 with hash 6a7bb2556144babe3899b25e5428123735bb1e27 (glob)
207 0 largefiles updated, 0 removed
207 0 largefiles updated, 0 removed
208 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
208 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
209 updated to "cd24c147f45c: modified"
209 updated to "cd24c147f45c: modified"
210 [12] other heads for branch "default" (re)
210 [12] other heads for branch "default" (re)
211 $ hg st
211 $ hg st
212 ! large
212 ! large
213 ? z
213 ? z
214 $ rm .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
214 $ rm .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
215
215
216 #if serve
216 #if serve
217
217
218 Test coverage of error handling from putlfile:
218 Test coverage of error handling from putlfile:
219
219
220 $ mkdir $TESTTMP/mirrorcache
220 $ mkdir $TESTTMP/mirrorcache
221 $ hg serve -R ../mirror -d -p $HGPORT1 --pid-file hg.pid --config largefiles.usercache=$TESTTMP/mirrorcache
221 $ hg serve -R ../mirror -d -p $HGPORT1 --pid-file hg.pid --config largefiles.usercache=$TESTTMP/mirrorcache
222 $ cat hg.pid >> $DAEMON_PIDS
222 $ cat hg.pid >> $DAEMON_PIDS
223
223
224 $ hg push http://localhost:$HGPORT1 -f --config files.usercache=nocache
224 $ hg push http://localhost:$HGPORT1 -f --config files.usercache=nocache
225 pushing to http://localhost:$HGPORT1/
225 pushing to http://localhost:$HGPORT1/
226 searching for changes
226 searching for changes
227 abort: remotestore: could not open file $TESTTMP/src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020: HTTP Error 403: ssl required (glob)
227 abort: remotestore: could not open file $TESTTMP/src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020: HTTP Error 403: ssl required (glob)
228 [255]
228 [255]
229
229
230 $ rm .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
230 $ rm .hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
231
231
232 Test coverage of 'missing from store':
232 Test coverage of 'missing from store':
233
233
234 $ hg serve -R ../mirror -d -p $HGPORT2 --pid-file hg.pid --config largefiles.usercache=$TESTTMP/mirrorcache --config "web.allow_push=*" --config web.push_ssl=no
234 $ hg serve -R ../mirror -d -p $HGPORT2 --pid-file hg.pid --config largefiles.usercache=$TESTTMP/mirrorcache --config "web.allow_push=*" --config web.push_ssl=no
235 $ cat hg.pid >> $DAEMON_PIDS
235 $ cat hg.pid >> $DAEMON_PIDS
236
236
237 $ hg push http://localhost:$HGPORT2 -f --config largefiles.usercache=nocache
237 $ hg push http://localhost:$HGPORT2 -f --config largefiles.usercache=nocache
238 pushing to http://localhost:$HGPORT2/
238 pushing to http://localhost:$HGPORT2/
239 searching for changes
239 searching for changes
240 abort: largefile e2fb5f2139d086ded2cb600d5a91a196e76bf020 missing from store (needs to be uploaded)
240 abort: largefile e2fb5f2139d086ded2cb600d5a91a196e76bf020 missing from store (needs to be uploaded)
241 [255]
241 [255]
242
242
243 Verify that --lfrev controls which revisions are checked for largefiles to push
243 Verify that --lfrev controls which revisions are checked for largefiles to push
244
244
245 $ hg push http://localhost:$HGPORT2 -f --config largefiles.usercache=nocache --lfrev tip
245 $ hg push http://localhost:$HGPORT2 -f --config largefiles.usercache=nocache --lfrev tip
246 pushing to http://localhost:$HGPORT2/
246 pushing to http://localhost:$HGPORT2/
247 searching for changes
247 searching for changes
248 abort: largefile e2fb5f2139d086ded2cb600d5a91a196e76bf020 missing from store (needs to be uploaded)
248 abort: largefile e2fb5f2139d086ded2cb600d5a91a196e76bf020 missing from store (needs to be uploaded)
249 [255]
249 [255]
250
250
251 $ hg push http://localhost:$HGPORT2 -f --config largefiles.usercache=nocache --lfrev null
251 $ hg push http://localhost:$HGPORT2 -f --config largefiles.usercache=nocache --lfrev null
252 pushing to http://localhost:$HGPORT2/
252 pushing to http://localhost:$HGPORT2/
253 searching for changes
253 searching for changes
254 remote: adding changesets
254 remote: adding changesets
255 remote: adding manifests
255 remote: adding manifests
256 remote: adding file changes
256 remote: adding file changes
257 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
257 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
258
258
259 #endif
259 #endif
@@ -1,2391 +1,2391 b''
1 Log on empty repository: checking consistency
1 Log on empty repository: checking consistency
2
2
3 $ hg init empty
3 $ hg init empty
4 $ cd empty
4 $ cd empty
5 $ hg log
5 $ hg log
6 $ hg log -r 1
6 $ hg log -r 1
7 abort: unknown revision '1'!
7 abort: unknown revision '1'!
8 [255]
8 [255]
9 $ hg log -r -1:0
9 $ hg log -r -1:0
10 abort: unknown revision '-1'!
10 abort: unknown revision '-1'!
11 [255]
11 [255]
12 $ hg log -r 'branch(name)'
12 $ hg log -r 'branch(name)'
13 abort: unknown revision 'name'!
13 abort: unknown revision 'name'!
14 [255]
14 [255]
15 $ hg log -r null -q
15 $ hg log -r null -q
16 -1:000000000000
16 -1:000000000000
17
17
18 The g is crafted to have 2 filelog topological heads in a linear
18 The g is crafted to have 2 filelog topological heads in a linear
19 changeset graph
19 changeset graph
20
20
21 $ hg init a
21 $ hg init a
22 $ cd a
22 $ cd a
23 $ echo a > a
23 $ echo a > a
24 $ echo f > f
24 $ echo f > f
25 $ hg ci -Ama -d '1 0'
25 $ hg ci -Ama -d '1 0'
26 adding a
26 adding a
27 adding f
27 adding f
28
28
29 $ hg cp a b
29 $ hg cp a b
30 $ hg cp f g
30 $ hg cp f g
31 $ hg ci -mb -d '2 0'
31 $ hg ci -mb -d '2 0'
32
32
33 $ mkdir dir
33 $ mkdir dir
34 $ hg mv b dir
34 $ hg mv b dir
35 $ echo g >> g
35 $ echo g >> g
36 $ echo f >> f
36 $ echo f >> f
37 $ hg ci -mc -d '3 0'
37 $ hg ci -mc -d '3 0'
38
38
39 $ hg mv a b
39 $ hg mv a b
40 $ hg cp -f f g
40 $ hg cp -f f g
41 $ echo a > d
41 $ echo a > d
42 $ hg add d
42 $ hg add d
43 $ hg ci -md -d '4 0'
43 $ hg ci -md -d '4 0'
44
44
45 $ hg mv dir/b e
45 $ hg mv dir/b e
46 $ hg ci -me -d '5 0'
46 $ hg ci -me -d '5 0'
47
47
48 Make sure largefiles doesn't interfere with logging a regular file
48 Make sure largefiles doesn't interfere with logging a regular file
49 $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles=
49 $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles=
50 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
50 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
51 updated patterns: .hglf/a, a
51 updated patterns: .hglf/a, a
52 0: a
52 0: a
53 $ hg log a
53 $ hg log a
54 changeset: 0:9161b9aeaf16
54 changeset: 0:9161b9aeaf16
55 user: test
55 user: test
56 date: Thu Jan 01 00:00:01 1970 +0000
56 date: Thu Jan 01 00:00:01 1970 +0000
57 summary: a
57 summary: a
58
58
59 $ hg log glob:a*
59 $ hg log glob:a*
60 changeset: 3:2ca5ba701980
60 changeset: 3:2ca5ba701980
61 user: test
61 user: test
62 date: Thu Jan 01 00:00:04 1970 +0000
62 date: Thu Jan 01 00:00:04 1970 +0000
63 summary: d
63 summary: d
64
64
65 changeset: 0:9161b9aeaf16
65 changeset: 0:9161b9aeaf16
66 user: test
66 user: test
67 date: Thu Jan 01 00:00:01 1970 +0000
67 date: Thu Jan 01 00:00:01 1970 +0000
68 summary: a
68 summary: a
69
69
70 $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles=
70 $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles=
71 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
71 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
72 updated patterns: glob:.hglf/a*, glob:a*
72 updated patterns: glob:.hglf/a*, glob:a*
73 3: d
73 3: d
74 0: a
74 0: a
75
75
76 log on directory
76 log on directory
77
77
78 $ hg log dir
78 $ hg log dir
79 changeset: 4:7e4639b4691b
79 changeset: 4:7e4639b4691b
80 tag: tip
80 tag: tip
81 user: test
81 user: test
82 date: Thu Jan 01 00:00:05 1970 +0000
82 date: Thu Jan 01 00:00:05 1970 +0000
83 summary: e
83 summary: e
84
84
85 changeset: 2:f8954cd4dc1f
85 changeset: 2:f8954cd4dc1f
86 user: test
86 user: test
87 date: Thu Jan 01 00:00:03 1970 +0000
87 date: Thu Jan 01 00:00:03 1970 +0000
88 summary: c
88 summary: c
89
89
90 $ hg log somethingthatdoesntexist dir
90 $ hg log somethingthatdoesntexist dir
91 changeset: 4:7e4639b4691b
91 changeset: 4:7e4639b4691b
92 tag: tip
92 tag: tip
93 user: test
93 user: test
94 date: Thu Jan 01 00:00:05 1970 +0000
94 date: Thu Jan 01 00:00:05 1970 +0000
95 summary: e
95 summary: e
96
96
97 changeset: 2:f8954cd4dc1f
97 changeset: 2:f8954cd4dc1f
98 user: test
98 user: test
99 date: Thu Jan 01 00:00:03 1970 +0000
99 date: Thu Jan 01 00:00:03 1970 +0000
100 summary: c
100 summary: c
101
101
102
102
103 -f, non-existent directory
103 -f, non-existent directory
104
104
105 $ hg log -f dir
105 $ hg log -f dir
106 abort: cannot follow file not in parent revision: "dir"
106 abort: cannot follow file not in parent revision: "dir"
107 [255]
107 [255]
108
108
109 -f, directory
109 -f, directory
110
110
111 $ hg up -q 3
111 $ hg up -q 3
112 $ hg log -f dir
112 $ hg log -f dir
113 changeset: 2:f8954cd4dc1f
113 changeset: 2:f8954cd4dc1f
114 user: test
114 user: test
115 date: Thu Jan 01 00:00:03 1970 +0000
115 date: Thu Jan 01 00:00:03 1970 +0000
116 summary: c
116 summary: c
117
117
118 -f, directory with --patch
118 -f, directory with --patch
119
119
120 $ hg log -f dir -p
120 $ hg log -f dir -p
121 changeset: 2:f8954cd4dc1f
121 changeset: 2:f8954cd4dc1f
122 user: test
122 user: test
123 date: Thu Jan 01 00:00:03 1970 +0000
123 date: Thu Jan 01 00:00:03 1970 +0000
124 summary: c
124 summary: c
125
125
126 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
126 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
127 --- /dev/null* (glob)
127 --- /dev/null* (glob)
128 +++ b/dir/b* (glob)
128 +++ b/dir/b* (glob)
129 @@ -0,0 +1,1 @@
129 @@ -0,0 +1,1 @@
130 +a
130 +a
131
131
132
132
133 -f, pattern
133 -f, pattern
134
134
135 $ hg log -f -I 'dir**' -p
135 $ hg log -f -I 'dir**' -p
136 changeset: 2:f8954cd4dc1f
136 changeset: 2:f8954cd4dc1f
137 user: test
137 user: test
138 date: Thu Jan 01 00:00:03 1970 +0000
138 date: Thu Jan 01 00:00:03 1970 +0000
139 summary: c
139 summary: c
140
140
141 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
141 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
142 --- /dev/null* (glob)
142 --- /dev/null* (glob)
143 +++ b/dir/b* (glob)
143 +++ b/dir/b* (glob)
144 @@ -0,0 +1,1 @@
144 @@ -0,0 +1,1 @@
145 +a
145 +a
146
146
147 $ hg up -q 4
147 $ hg up -q 4
148
148
149 -f, a wrong style
149 -f, a wrong style
150
150
151 $ hg log -f -l1 --style something
151 $ hg log -f -l1 --style something
152 abort: style 'something' not found
152 abort: style 'something' not found
153 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
153 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
154 [255]
154 [255]
155
155
156 -f, phases style
156 -f, phases style
157
157
158
158
159 $ hg log -f -l1 --style phases
159 $ hg log -f -l1 --style phases
160 changeset: 4:7e4639b4691b
160 changeset: 4:7e4639b4691b
161 tag: tip
161 tag: tip
162 phase: draft
162 phase: draft
163 user: test
163 user: test
164 date: Thu Jan 01 00:00:05 1970 +0000
164 date: Thu Jan 01 00:00:05 1970 +0000
165 summary: e
165 summary: e
166
166
167
167
168 $ hg log -f -l1 --style phases -q
168 $ hg log -f -l1 --style phases -q
169 4:7e4639b4691b
169 4:7e4639b4691b
170
170
171 -f, but no args
171 -f, but no args
172
172
173 $ hg log -f
173 $ hg log -f
174 changeset: 4:7e4639b4691b
174 changeset: 4:7e4639b4691b
175 tag: tip
175 tag: tip
176 user: test
176 user: test
177 date: Thu Jan 01 00:00:05 1970 +0000
177 date: Thu Jan 01 00:00:05 1970 +0000
178 summary: e
178 summary: e
179
179
180 changeset: 3:2ca5ba701980
180 changeset: 3:2ca5ba701980
181 user: test
181 user: test
182 date: Thu Jan 01 00:00:04 1970 +0000
182 date: Thu Jan 01 00:00:04 1970 +0000
183 summary: d
183 summary: d
184
184
185 changeset: 2:f8954cd4dc1f
185 changeset: 2:f8954cd4dc1f
186 user: test
186 user: test
187 date: Thu Jan 01 00:00:03 1970 +0000
187 date: Thu Jan 01 00:00:03 1970 +0000
188 summary: c
188 summary: c
189
189
190 changeset: 1:d89b0a12d229
190 changeset: 1:d89b0a12d229
191 user: test
191 user: test
192 date: Thu Jan 01 00:00:02 1970 +0000
192 date: Thu Jan 01 00:00:02 1970 +0000
193 summary: b
193 summary: b
194
194
195 changeset: 0:9161b9aeaf16
195 changeset: 0:9161b9aeaf16
196 user: test
196 user: test
197 date: Thu Jan 01 00:00:01 1970 +0000
197 date: Thu Jan 01 00:00:01 1970 +0000
198 summary: a
198 summary: a
199
199
200
200
201 one rename
201 one rename
202
202
203 $ hg up -q 2
203 $ hg up -q 2
204 $ hg log -vf a
204 $ hg log -vf a
205 changeset: 0:9161b9aeaf16
205 changeset: 0:9161b9aeaf16
206 user: test
206 user: test
207 date: Thu Jan 01 00:00:01 1970 +0000
207 date: Thu Jan 01 00:00:01 1970 +0000
208 files: a f
208 files: a f
209 description:
209 description:
210 a
210 a
211
211
212
212
213
213
214 many renames
214 many renames
215
215
216 $ hg up -q tip
216 $ hg up -q tip
217 $ hg log -vf e
217 $ hg log -vf e
218 changeset: 4:7e4639b4691b
218 changeset: 4:7e4639b4691b
219 tag: tip
219 tag: tip
220 user: test
220 user: test
221 date: Thu Jan 01 00:00:05 1970 +0000
221 date: Thu Jan 01 00:00:05 1970 +0000
222 files: dir/b e
222 files: dir/b e
223 description:
223 description:
224 e
224 e
225
225
226
226
227 changeset: 2:f8954cd4dc1f
227 changeset: 2:f8954cd4dc1f
228 user: test
228 user: test
229 date: Thu Jan 01 00:00:03 1970 +0000
229 date: Thu Jan 01 00:00:03 1970 +0000
230 files: b dir/b f g
230 files: b dir/b f g
231 description:
231 description:
232 c
232 c
233
233
234
234
235 changeset: 1:d89b0a12d229
235 changeset: 1:d89b0a12d229
236 user: test
236 user: test
237 date: Thu Jan 01 00:00:02 1970 +0000
237 date: Thu Jan 01 00:00:02 1970 +0000
238 files: b g
238 files: b g
239 description:
239 description:
240 b
240 b
241
241
242
242
243 changeset: 0:9161b9aeaf16
243 changeset: 0:9161b9aeaf16
244 user: test
244 user: test
245 date: Thu Jan 01 00:00:01 1970 +0000
245 date: Thu Jan 01 00:00:01 1970 +0000
246 files: a f
246 files: a f
247 description:
247 description:
248 a
248 a
249
249
250
250
251
251
252
252
253 log -pf dir/b
253 log -pf dir/b
254
254
255 $ hg up -q 3
255 $ hg up -q 3
256 $ hg log -pf dir/b
256 $ hg log -pf dir/b
257 changeset: 2:f8954cd4dc1f
257 changeset: 2:f8954cd4dc1f
258 user: test
258 user: test
259 date: Thu Jan 01 00:00:03 1970 +0000
259 date: Thu Jan 01 00:00:03 1970 +0000
260 summary: c
260 summary: c
261
261
262 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
262 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
263 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
263 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
264 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
264 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
265 @@ -0,0 +1,1 @@
265 @@ -0,0 +1,1 @@
266 +a
266 +a
267
267
268 changeset: 1:d89b0a12d229
268 changeset: 1:d89b0a12d229
269 user: test
269 user: test
270 date: Thu Jan 01 00:00:02 1970 +0000
270 date: Thu Jan 01 00:00:02 1970 +0000
271 summary: b
271 summary: b
272
272
273 diff -r 9161b9aeaf16 -r d89b0a12d229 b
273 diff -r 9161b9aeaf16 -r d89b0a12d229 b
274 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
274 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
275 +++ b/b Thu Jan 01 00:00:02 1970 +0000
275 +++ b/b Thu Jan 01 00:00:02 1970 +0000
276 @@ -0,0 +1,1 @@
276 @@ -0,0 +1,1 @@
277 +a
277 +a
278
278
279 changeset: 0:9161b9aeaf16
279 changeset: 0:9161b9aeaf16
280 user: test
280 user: test
281 date: Thu Jan 01 00:00:01 1970 +0000
281 date: Thu Jan 01 00:00:01 1970 +0000
282 summary: a
282 summary: a
283
283
284 diff -r 000000000000 -r 9161b9aeaf16 a
284 diff -r 000000000000 -r 9161b9aeaf16 a
285 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
285 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
286 +++ b/a Thu Jan 01 00:00:01 1970 +0000
286 +++ b/a Thu Jan 01 00:00:01 1970 +0000
287 @@ -0,0 +1,1 @@
287 @@ -0,0 +1,1 @@
288 +a
288 +a
289
289
290
290
291 log -pf b inside dir
291 log -pf b inside dir
292
292
293 $ hg --cwd=dir log -pf b
293 $ hg --cwd=dir log -pf b
294 changeset: 2:f8954cd4dc1f
294 changeset: 2:f8954cd4dc1f
295 user: test
295 user: test
296 date: Thu Jan 01 00:00:03 1970 +0000
296 date: Thu Jan 01 00:00:03 1970 +0000
297 summary: c
297 summary: c
298
298
299 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
299 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
300 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
300 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
301 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
301 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
302 @@ -0,0 +1,1 @@
302 @@ -0,0 +1,1 @@
303 +a
303 +a
304
304
305 changeset: 1:d89b0a12d229
305 changeset: 1:d89b0a12d229
306 user: test
306 user: test
307 date: Thu Jan 01 00:00:02 1970 +0000
307 date: Thu Jan 01 00:00:02 1970 +0000
308 summary: b
308 summary: b
309
309
310 diff -r 9161b9aeaf16 -r d89b0a12d229 b
310 diff -r 9161b9aeaf16 -r d89b0a12d229 b
311 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
311 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
312 +++ b/b Thu Jan 01 00:00:02 1970 +0000
312 +++ b/b Thu Jan 01 00:00:02 1970 +0000
313 @@ -0,0 +1,1 @@
313 @@ -0,0 +1,1 @@
314 +a
314 +a
315
315
316 changeset: 0:9161b9aeaf16
316 changeset: 0:9161b9aeaf16
317 user: test
317 user: test
318 date: Thu Jan 01 00:00:01 1970 +0000
318 date: Thu Jan 01 00:00:01 1970 +0000
319 summary: a
319 summary: a
320
320
321 diff -r 000000000000 -r 9161b9aeaf16 a
321 diff -r 000000000000 -r 9161b9aeaf16 a
322 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
322 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
323 +++ b/a Thu Jan 01 00:00:01 1970 +0000
323 +++ b/a Thu Jan 01 00:00:01 1970 +0000
324 @@ -0,0 +1,1 @@
324 @@ -0,0 +1,1 @@
325 +a
325 +a
326
326
327
327
328 log -pf, but no args
328 log -pf, but no args
329
329
330 $ hg log -pf
330 $ hg log -pf
331 changeset: 3:2ca5ba701980
331 changeset: 3:2ca5ba701980
332 user: test
332 user: test
333 date: Thu Jan 01 00:00:04 1970 +0000
333 date: Thu Jan 01 00:00:04 1970 +0000
334 summary: d
334 summary: d
335
335
336 diff -r f8954cd4dc1f -r 2ca5ba701980 a
336 diff -r f8954cd4dc1f -r 2ca5ba701980 a
337 --- a/a Thu Jan 01 00:00:03 1970 +0000
337 --- a/a Thu Jan 01 00:00:03 1970 +0000
338 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
338 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
339 @@ -1,1 +0,0 @@
339 @@ -1,1 +0,0 @@
340 -a
340 -a
341 diff -r f8954cd4dc1f -r 2ca5ba701980 b
341 diff -r f8954cd4dc1f -r 2ca5ba701980 b
342 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
342 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
343 +++ b/b Thu Jan 01 00:00:04 1970 +0000
343 +++ b/b Thu Jan 01 00:00:04 1970 +0000
344 @@ -0,0 +1,1 @@
344 @@ -0,0 +1,1 @@
345 +a
345 +a
346 diff -r f8954cd4dc1f -r 2ca5ba701980 d
346 diff -r f8954cd4dc1f -r 2ca5ba701980 d
347 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
347 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
348 +++ b/d Thu Jan 01 00:00:04 1970 +0000
348 +++ b/d Thu Jan 01 00:00:04 1970 +0000
349 @@ -0,0 +1,1 @@
349 @@ -0,0 +1,1 @@
350 +a
350 +a
351 diff -r f8954cd4dc1f -r 2ca5ba701980 g
351 diff -r f8954cd4dc1f -r 2ca5ba701980 g
352 --- a/g Thu Jan 01 00:00:03 1970 +0000
352 --- a/g Thu Jan 01 00:00:03 1970 +0000
353 +++ b/g Thu Jan 01 00:00:04 1970 +0000
353 +++ b/g Thu Jan 01 00:00:04 1970 +0000
354 @@ -1,2 +1,2 @@
354 @@ -1,2 +1,2 @@
355 f
355 f
356 -g
356 -g
357 +f
357 +f
358
358
359 changeset: 2:f8954cd4dc1f
359 changeset: 2:f8954cd4dc1f
360 user: test
360 user: test
361 date: Thu Jan 01 00:00:03 1970 +0000
361 date: Thu Jan 01 00:00:03 1970 +0000
362 summary: c
362 summary: c
363
363
364 diff -r d89b0a12d229 -r f8954cd4dc1f b
364 diff -r d89b0a12d229 -r f8954cd4dc1f b
365 --- a/b Thu Jan 01 00:00:02 1970 +0000
365 --- a/b Thu Jan 01 00:00:02 1970 +0000
366 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
366 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
367 @@ -1,1 +0,0 @@
367 @@ -1,1 +0,0 @@
368 -a
368 -a
369 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
369 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
370 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
370 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
371 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
371 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
372 @@ -0,0 +1,1 @@
372 @@ -0,0 +1,1 @@
373 +a
373 +a
374 diff -r d89b0a12d229 -r f8954cd4dc1f f
374 diff -r d89b0a12d229 -r f8954cd4dc1f f
375 --- a/f Thu Jan 01 00:00:02 1970 +0000
375 --- a/f Thu Jan 01 00:00:02 1970 +0000
376 +++ b/f Thu Jan 01 00:00:03 1970 +0000
376 +++ b/f Thu Jan 01 00:00:03 1970 +0000
377 @@ -1,1 +1,2 @@
377 @@ -1,1 +1,2 @@
378 f
378 f
379 +f
379 +f
380 diff -r d89b0a12d229 -r f8954cd4dc1f g
380 diff -r d89b0a12d229 -r f8954cd4dc1f g
381 --- a/g Thu Jan 01 00:00:02 1970 +0000
381 --- a/g Thu Jan 01 00:00:02 1970 +0000
382 +++ b/g Thu Jan 01 00:00:03 1970 +0000
382 +++ b/g Thu Jan 01 00:00:03 1970 +0000
383 @@ -1,1 +1,2 @@
383 @@ -1,1 +1,2 @@
384 f
384 f
385 +g
385 +g
386
386
387 changeset: 1:d89b0a12d229
387 changeset: 1:d89b0a12d229
388 user: test
388 user: test
389 date: Thu Jan 01 00:00:02 1970 +0000
389 date: Thu Jan 01 00:00:02 1970 +0000
390 summary: b
390 summary: b
391
391
392 diff -r 9161b9aeaf16 -r d89b0a12d229 b
392 diff -r 9161b9aeaf16 -r d89b0a12d229 b
393 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
393 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
394 +++ b/b Thu Jan 01 00:00:02 1970 +0000
394 +++ b/b Thu Jan 01 00:00:02 1970 +0000
395 @@ -0,0 +1,1 @@
395 @@ -0,0 +1,1 @@
396 +a
396 +a
397 diff -r 9161b9aeaf16 -r d89b0a12d229 g
397 diff -r 9161b9aeaf16 -r d89b0a12d229 g
398 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
398 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
399 +++ b/g Thu Jan 01 00:00:02 1970 +0000
399 +++ b/g Thu Jan 01 00:00:02 1970 +0000
400 @@ -0,0 +1,1 @@
400 @@ -0,0 +1,1 @@
401 +f
401 +f
402
402
403 changeset: 0:9161b9aeaf16
403 changeset: 0:9161b9aeaf16
404 user: test
404 user: test
405 date: Thu Jan 01 00:00:01 1970 +0000
405 date: Thu Jan 01 00:00:01 1970 +0000
406 summary: a
406 summary: a
407
407
408 diff -r 000000000000 -r 9161b9aeaf16 a
408 diff -r 000000000000 -r 9161b9aeaf16 a
409 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
409 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
410 +++ b/a Thu Jan 01 00:00:01 1970 +0000
410 +++ b/a Thu Jan 01 00:00:01 1970 +0000
411 @@ -0,0 +1,1 @@
411 @@ -0,0 +1,1 @@
412 +a
412 +a
413 diff -r 000000000000 -r 9161b9aeaf16 f
413 diff -r 000000000000 -r 9161b9aeaf16 f
414 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
414 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
415 +++ b/f Thu Jan 01 00:00:01 1970 +0000
415 +++ b/f Thu Jan 01 00:00:01 1970 +0000
416 @@ -0,0 +1,1 @@
416 @@ -0,0 +1,1 @@
417 +f
417 +f
418
418
419
419
420 log -vf dir/b
420 log -vf dir/b
421
421
422 $ hg log -vf dir/b
422 $ hg log -vf dir/b
423 changeset: 2:f8954cd4dc1f
423 changeset: 2:f8954cd4dc1f
424 user: test
424 user: test
425 date: Thu Jan 01 00:00:03 1970 +0000
425 date: Thu Jan 01 00:00:03 1970 +0000
426 files: b dir/b f g
426 files: b dir/b f g
427 description:
427 description:
428 c
428 c
429
429
430
430
431 changeset: 1:d89b0a12d229
431 changeset: 1:d89b0a12d229
432 user: test
432 user: test
433 date: Thu Jan 01 00:00:02 1970 +0000
433 date: Thu Jan 01 00:00:02 1970 +0000
434 files: b g
434 files: b g
435 description:
435 description:
436 b
436 b
437
437
438
438
439 changeset: 0:9161b9aeaf16
439 changeset: 0:9161b9aeaf16
440 user: test
440 user: test
441 date: Thu Jan 01 00:00:01 1970 +0000
441 date: Thu Jan 01 00:00:01 1970 +0000
442 files: a f
442 files: a f
443 description:
443 description:
444 a
444 a
445
445
446
446
447
447
448
448
449 -f and multiple filelog heads
449 -f and multiple filelog heads
450
450
451 $ hg up -q 2
451 $ hg up -q 2
452 $ hg log -f g --template '{rev}\n'
452 $ hg log -f g --template '{rev}\n'
453 2
453 2
454 1
454 1
455 0
455 0
456 $ hg up -q tip
456 $ hg up -q tip
457 $ hg log -f g --template '{rev}\n'
457 $ hg log -f g --template '{rev}\n'
458 3
458 3
459 2
459 2
460 0
460 0
461
461
462
462
463 log copies with --copies
463 log copies with --copies
464
464
465 $ hg log -vC --template '{rev} {file_copies}\n'
465 $ hg log -vC --template '{rev} {file_copies}\n'
466 4 e (dir/b)
466 4 e (dir/b)
467 3 b (a)g (f)
467 3 b (a)g (f)
468 2 dir/b (b)
468 2 dir/b (b)
469 1 b (a)g (f)
469 1 b (a)g (f)
470 0
470 0
471
471
472 log copies switch without --copies, with old filecopy template
472 log copies switch without --copies, with old filecopy template
473
473
474 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
474 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
475 4
475 4
476 3
476 3
477 2
477 2
478 1
478 1
479 0
479 0
480
480
481 log copies switch with --copies
481 log copies switch with --copies
482
482
483 $ hg log -vC --template '{rev} {file_copies_switch}\n'
483 $ hg log -vC --template '{rev} {file_copies_switch}\n'
484 4 e (dir/b)
484 4 e (dir/b)
485 3 b (a)g (f)
485 3 b (a)g (f)
486 2 dir/b (b)
486 2 dir/b (b)
487 1 b (a)g (f)
487 1 b (a)g (f)
488 0
488 0
489
489
490
490
491 log copies with hardcoded style and with --style=default
491 log copies with hardcoded style and with --style=default
492
492
493 $ hg log -vC -r4
493 $ hg log -vC -r4
494 changeset: 4:7e4639b4691b
494 changeset: 4:7e4639b4691b
495 tag: tip
495 tag: tip
496 user: test
496 user: test
497 date: Thu Jan 01 00:00:05 1970 +0000
497 date: Thu Jan 01 00:00:05 1970 +0000
498 files: dir/b e
498 files: dir/b e
499 copies: e (dir/b)
499 copies: e (dir/b)
500 description:
500 description:
501 e
501 e
502
502
503
503
504 $ hg log -vC -r4 --style=default
504 $ hg log -vC -r4 --style=default
505 changeset: 4:7e4639b4691b
505 changeset: 4:7e4639b4691b
506 tag: tip
506 tag: tip
507 user: test
507 user: test
508 date: Thu Jan 01 00:00:05 1970 +0000
508 date: Thu Jan 01 00:00:05 1970 +0000
509 files: dir/b e
509 files: dir/b e
510 copies: e (dir/b)
510 copies: e (dir/b)
511 description:
511 description:
512 e
512 e
513
513
514
514
515 $ hg log -vC -r4 -Tjson
515 $ hg log -vC -r4 -Tjson
516 [
516 [
517 {
517 {
518 "rev": 4,
518 "rev": 4,
519 "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3",
519 "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3",
520 "branch": "default",
520 "branch": "default",
521 "phase": "draft",
521 "phase": "draft",
522 "user": "test",
522 "user": "test",
523 "date": [5, 0],
523 "date": [5, 0],
524 "desc": "e",
524 "desc": "e",
525 "bookmarks": [],
525 "bookmarks": [],
526 "tags": ["tip"],
526 "tags": ["tip"],
527 "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"],
527 "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"],
528 "files": ["dir/b", "e"],
528 "files": ["dir/b", "e"],
529 "copies": {"e": "dir/b"}
529 "copies": {"e": "dir/b"}
530 }
530 }
531 ]
531 ]
532
532
533 log copies, non-linear manifest
533 log copies, non-linear manifest
534
534
535 $ hg up -C 3
535 $ hg up -C 3
536 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
536 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
537 $ hg mv dir/b e
537 $ hg mv dir/b e
538 $ echo foo > foo
538 $ echo foo > foo
539 $ hg ci -Ame2 -d '6 0'
539 $ hg ci -Ame2 -d '6 0'
540 adding foo
540 adding foo
541 created new head
541 created new head
542 $ hg log -v --template '{rev} {file_copies}\n' -r 5
542 $ hg log -v --template '{rev} {file_copies}\n' -r 5
543 5 e (dir/b)
543 5 e (dir/b)
544
544
545
545
546 log copies, execute bit set
546 log copies, execute bit set
547
547
548 #if execbit
548 #if execbit
549 $ chmod +x e
549 $ chmod +x e
550 $ hg ci -me3 -d '7 0'
550 $ hg ci -me3 -d '7 0'
551 $ hg log -v --template '{rev} {file_copies}\n' -r 6
551 $ hg log -v --template '{rev} {file_copies}\n' -r 6
552 6
552 6
553 #endif
553 #endif
554
554
555
555
556 log -p d
556 log -p d
557
557
558 $ hg log -pv d
558 $ hg log -pv d
559 changeset: 3:2ca5ba701980
559 changeset: 3:2ca5ba701980
560 user: test
560 user: test
561 date: Thu Jan 01 00:00:04 1970 +0000
561 date: Thu Jan 01 00:00:04 1970 +0000
562 files: a b d g
562 files: a b d g
563 description:
563 description:
564 d
564 d
565
565
566
566
567 diff -r f8954cd4dc1f -r 2ca5ba701980 d
567 diff -r f8954cd4dc1f -r 2ca5ba701980 d
568 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
568 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
569 +++ b/d Thu Jan 01 00:00:04 1970 +0000
569 +++ b/d Thu Jan 01 00:00:04 1970 +0000
570 @@ -0,0 +1,1 @@
570 @@ -0,0 +1,1 @@
571 +a
571 +a
572
572
573
573
574
574
575 log --removed file
575 log --removed file
576
576
577 $ hg log --removed -v a
577 $ hg log --removed -v a
578 changeset: 3:2ca5ba701980
578 changeset: 3:2ca5ba701980
579 user: test
579 user: test
580 date: Thu Jan 01 00:00:04 1970 +0000
580 date: Thu Jan 01 00:00:04 1970 +0000
581 files: a b d g
581 files: a b d g
582 description:
582 description:
583 d
583 d
584
584
585
585
586 changeset: 0:9161b9aeaf16
586 changeset: 0:9161b9aeaf16
587 user: test
587 user: test
588 date: Thu Jan 01 00:00:01 1970 +0000
588 date: Thu Jan 01 00:00:01 1970 +0000
589 files: a f
589 files: a f
590 description:
590 description:
591 a
591 a
592
592
593
593
594
594
595 log --removed revrange file
595 log --removed revrange file
596
596
597 $ hg log --removed -v -r0:2 a
597 $ hg log --removed -v -r0:2 a
598 changeset: 0:9161b9aeaf16
598 changeset: 0:9161b9aeaf16
599 user: test
599 user: test
600 date: Thu Jan 01 00:00:01 1970 +0000
600 date: Thu Jan 01 00:00:01 1970 +0000
601 files: a f
601 files: a f
602 description:
602 description:
603 a
603 a
604
604
605
605
606 $ cd ..
606 $ cd ..
607
607
608 log --follow tests
608 log --follow tests
609
609
610 $ hg init follow
610 $ hg init follow
611 $ cd follow
611 $ cd follow
612
612
613 $ echo base > base
613 $ echo base > base
614 $ hg ci -Ambase -d '1 0'
614 $ hg ci -Ambase -d '1 0'
615 adding base
615 adding base
616
616
617 $ echo r1 >> base
617 $ echo r1 >> base
618 $ hg ci -Amr1 -d '1 0'
618 $ hg ci -Amr1 -d '1 0'
619 $ echo r2 >> base
619 $ echo r2 >> base
620 $ hg ci -Amr2 -d '1 0'
620 $ hg ci -Amr2 -d '1 0'
621
621
622 $ hg up -C 1
622 $ hg up -C 1
623 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
623 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
624 $ echo b1 > b1
624 $ echo b1 > b1
625
625
626 log -r "follow('set:clean()')"
626 log -r "follow('set:clean()')"
627
627
628 $ hg log -r "follow('set:clean()')"
628 $ hg log -r "follow('set:clean()')"
629 changeset: 0:67e992f2c4f3
629 changeset: 0:67e992f2c4f3
630 user: test
630 user: test
631 date: Thu Jan 01 00:00:01 1970 +0000
631 date: Thu Jan 01 00:00:01 1970 +0000
632 summary: base
632 summary: base
633
633
634 changeset: 1:3d5bf5654eda
634 changeset: 1:3d5bf5654eda
635 user: test
635 user: test
636 date: Thu Jan 01 00:00:01 1970 +0000
636 date: Thu Jan 01 00:00:01 1970 +0000
637 summary: r1
637 summary: r1
638
638
639
639
640 $ hg ci -Amb1 -d '1 0'
640 $ hg ci -Amb1 -d '1 0'
641 adding b1
641 adding b1
642 created new head
642 created new head
643
643
644
644
645 log -f
645 log -f
646
646
647 $ hg log -f
647 $ hg log -f
648 changeset: 3:e62f78d544b4
648 changeset: 3:e62f78d544b4
649 tag: tip
649 tag: tip
650 parent: 1:3d5bf5654eda
650 parent: 1:3d5bf5654eda
651 user: test
651 user: test
652 date: Thu Jan 01 00:00:01 1970 +0000
652 date: Thu Jan 01 00:00:01 1970 +0000
653 summary: b1
653 summary: b1
654
654
655 changeset: 1:3d5bf5654eda
655 changeset: 1:3d5bf5654eda
656 user: test
656 user: test
657 date: Thu Jan 01 00:00:01 1970 +0000
657 date: Thu Jan 01 00:00:01 1970 +0000
658 summary: r1
658 summary: r1
659
659
660 changeset: 0:67e992f2c4f3
660 changeset: 0:67e992f2c4f3
661 user: test
661 user: test
662 date: Thu Jan 01 00:00:01 1970 +0000
662 date: Thu Jan 01 00:00:01 1970 +0000
663 summary: base
663 summary: base
664
664
665
665
666 log -r follow('glob:b*')
666 log -r follow('glob:b*')
667
667
668 $ hg log -r "follow('glob:b*')"
668 $ hg log -r "follow('glob:b*')"
669 changeset: 0:67e992f2c4f3
669 changeset: 0:67e992f2c4f3
670 user: test
670 user: test
671 date: Thu Jan 01 00:00:01 1970 +0000
671 date: Thu Jan 01 00:00:01 1970 +0000
672 summary: base
672 summary: base
673
673
674 changeset: 1:3d5bf5654eda
674 changeset: 1:3d5bf5654eda
675 user: test
675 user: test
676 date: Thu Jan 01 00:00:01 1970 +0000
676 date: Thu Jan 01 00:00:01 1970 +0000
677 summary: r1
677 summary: r1
678
678
679 changeset: 3:e62f78d544b4
679 changeset: 3:e62f78d544b4
680 tag: tip
680 tag: tip
681 parent: 1:3d5bf5654eda
681 parent: 1:3d5bf5654eda
682 user: test
682 user: test
683 date: Thu Jan 01 00:00:01 1970 +0000
683 date: Thu Jan 01 00:00:01 1970 +0000
684 summary: b1
684 summary: b1
685
685
686 log -f -r '1 + 4'
686 log -f -r '1 + 4'
687
687
688 $ hg up -C 0
688 $ hg up -C 0
689 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
689 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
690 $ echo b2 > b2
690 $ echo b2 > b2
691 $ hg ci -Amb2 -d '1 0'
691 $ hg ci -Amb2 -d '1 0'
692 adding b2
692 adding b2
693 created new head
693 created new head
694 $ hg log -f -r '1 + 4'
694 $ hg log -f -r '1 + 4'
695 changeset: 4:ddb82e70d1a1
695 changeset: 4:ddb82e70d1a1
696 tag: tip
696 tag: tip
697 parent: 0:67e992f2c4f3
697 parent: 0:67e992f2c4f3
698 user: test
698 user: test
699 date: Thu Jan 01 00:00:01 1970 +0000
699 date: Thu Jan 01 00:00:01 1970 +0000
700 summary: b2
700 summary: b2
701
701
702 changeset: 1:3d5bf5654eda
702 changeset: 1:3d5bf5654eda
703 user: test
703 user: test
704 date: Thu Jan 01 00:00:01 1970 +0000
704 date: Thu Jan 01 00:00:01 1970 +0000
705 summary: r1
705 summary: r1
706
706
707 changeset: 0:67e992f2c4f3
707 changeset: 0:67e992f2c4f3
708 user: test
708 user: test
709 date: Thu Jan 01 00:00:01 1970 +0000
709 date: Thu Jan 01 00:00:01 1970 +0000
710 summary: base
710 summary: base
711
711
712 log -r "follow('set:grep(b2)')"
712 log -r "follow('set:grep(b2)')"
713
713
714 $ hg log -r "follow('set:grep(b2)')"
714 $ hg log -r "follow('set:grep(b2)')"
715 changeset: 4:ddb82e70d1a1
715 changeset: 4:ddb82e70d1a1
716 tag: tip
716 tag: tip
717 parent: 0:67e992f2c4f3
717 parent: 0:67e992f2c4f3
718 user: test
718 user: test
719 date: Thu Jan 01 00:00:01 1970 +0000
719 date: Thu Jan 01 00:00:01 1970 +0000
720 summary: b2
720 summary: b2
721
721
722 log -r "follow('set:grep(b2)', 4)"
722 log -r "follow('set:grep(b2)', 4)"
723
723
724 $ hg up -qC 0
724 $ hg up -qC 0
725 $ hg log -r "follow('set:grep(b2)', 4)"
725 $ hg log -r "follow('set:grep(b2)', 4)"
726 changeset: 4:ddb82e70d1a1
726 changeset: 4:ddb82e70d1a1
727 tag: tip
727 tag: tip
728 parent: 0:67e992f2c4f3
728 parent: 0:67e992f2c4f3
729 user: test
729 user: test
730 date: Thu Jan 01 00:00:01 1970 +0000
730 date: Thu Jan 01 00:00:01 1970 +0000
731 summary: b2
731 summary: b2
732
732
733 $ hg up -qC 4
733 $ hg up -qC 4
734
734
735 log -f -r null
735 log -f -r null
736
736
737 $ hg log -f -r null
737 $ hg log -f -r null
738 changeset: -1:000000000000
738 changeset: -1:000000000000
739 user:
739 user:
740 date: Thu Jan 01 00:00:00 1970 +0000
740 date: Thu Jan 01 00:00:00 1970 +0000
741
741
742 $ hg log -f -r null -G
742 $ hg log -f -r null -G
743 o changeset: -1:000000000000
743 o changeset: -1:000000000000
744 user:
744 user:
745 date: Thu Jan 01 00:00:00 1970 +0000
745 date: Thu Jan 01 00:00:00 1970 +0000
746
746
747
747
748
748
749 log -f with null parent
749 log -f with null parent
750
750
751 $ hg up -C null
751 $ hg up -C null
752 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
752 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
753 $ hg log -f
753 $ hg log -f
754
754
755
755
756 log -r . with two parents
756 log -r . with two parents
757
757
758 $ hg up -C 3
758 $ hg up -C 3
759 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
759 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
760 $ hg merge tip
760 $ hg merge tip
761 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
761 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
762 (branch merge, don't forget to commit)
762 (branch merge, don't forget to commit)
763 $ hg log -r .
763 $ hg log -r .
764 changeset: 3:e62f78d544b4
764 changeset: 3:e62f78d544b4
765 parent: 1:3d5bf5654eda
765 parent: 1:3d5bf5654eda
766 user: test
766 user: test
767 date: Thu Jan 01 00:00:01 1970 +0000
767 date: Thu Jan 01 00:00:01 1970 +0000
768 summary: b1
768 summary: b1
769
769
770
770
771
771
772 log -r . with one parent
772 log -r . with one parent
773
773
774 $ hg ci -mm12 -d '1 0'
774 $ hg ci -mm12 -d '1 0'
775 $ hg log -r .
775 $ hg log -r .
776 changeset: 5:302e9dd6890d
776 changeset: 5:302e9dd6890d
777 tag: tip
777 tag: tip
778 parent: 3:e62f78d544b4
778 parent: 3:e62f78d544b4
779 parent: 4:ddb82e70d1a1
779 parent: 4:ddb82e70d1a1
780 user: test
780 user: test
781 date: Thu Jan 01 00:00:01 1970 +0000
781 date: Thu Jan 01 00:00:01 1970 +0000
782 summary: m12
782 summary: m12
783
783
784
784
785 $ echo postm >> b1
785 $ echo postm >> b1
786 $ hg ci -Amb1.1 -d'1 0'
786 $ hg ci -Amb1.1 -d'1 0'
787
787
788
788
789 log --follow-first
789 log --follow-first
790
790
791 $ hg log --follow-first
791 $ hg log --follow-first
792 changeset: 6:2404bbcab562
792 changeset: 6:2404bbcab562
793 tag: tip
793 tag: tip
794 user: test
794 user: test
795 date: Thu Jan 01 00:00:01 1970 +0000
795 date: Thu Jan 01 00:00:01 1970 +0000
796 summary: b1.1
796 summary: b1.1
797
797
798 changeset: 5:302e9dd6890d
798 changeset: 5:302e9dd6890d
799 parent: 3:e62f78d544b4
799 parent: 3:e62f78d544b4
800 parent: 4:ddb82e70d1a1
800 parent: 4:ddb82e70d1a1
801 user: test
801 user: test
802 date: Thu Jan 01 00:00:01 1970 +0000
802 date: Thu Jan 01 00:00:01 1970 +0000
803 summary: m12
803 summary: m12
804
804
805 changeset: 3:e62f78d544b4
805 changeset: 3:e62f78d544b4
806 parent: 1:3d5bf5654eda
806 parent: 1:3d5bf5654eda
807 user: test
807 user: test
808 date: Thu Jan 01 00:00:01 1970 +0000
808 date: Thu Jan 01 00:00:01 1970 +0000
809 summary: b1
809 summary: b1
810
810
811 changeset: 1:3d5bf5654eda
811 changeset: 1:3d5bf5654eda
812 user: test
812 user: test
813 date: Thu Jan 01 00:00:01 1970 +0000
813 date: Thu Jan 01 00:00:01 1970 +0000
814 summary: r1
814 summary: r1
815
815
816 changeset: 0:67e992f2c4f3
816 changeset: 0:67e992f2c4f3
817 user: test
817 user: test
818 date: Thu Jan 01 00:00:01 1970 +0000
818 date: Thu Jan 01 00:00:01 1970 +0000
819 summary: base
819 summary: base
820
820
821
821
822
822
823 log -P 2
823 log -P 2
824
824
825 $ hg log -P 2
825 $ hg log -P 2
826 changeset: 6:2404bbcab562
826 changeset: 6:2404bbcab562
827 tag: tip
827 tag: tip
828 user: test
828 user: test
829 date: Thu Jan 01 00:00:01 1970 +0000
829 date: Thu Jan 01 00:00:01 1970 +0000
830 summary: b1.1
830 summary: b1.1
831
831
832 changeset: 5:302e9dd6890d
832 changeset: 5:302e9dd6890d
833 parent: 3:e62f78d544b4
833 parent: 3:e62f78d544b4
834 parent: 4:ddb82e70d1a1
834 parent: 4:ddb82e70d1a1
835 user: test
835 user: test
836 date: Thu Jan 01 00:00:01 1970 +0000
836 date: Thu Jan 01 00:00:01 1970 +0000
837 summary: m12
837 summary: m12
838
838
839 changeset: 4:ddb82e70d1a1
839 changeset: 4:ddb82e70d1a1
840 parent: 0:67e992f2c4f3
840 parent: 0:67e992f2c4f3
841 user: test
841 user: test
842 date: Thu Jan 01 00:00:01 1970 +0000
842 date: Thu Jan 01 00:00:01 1970 +0000
843 summary: b2
843 summary: b2
844
844
845 changeset: 3:e62f78d544b4
845 changeset: 3:e62f78d544b4
846 parent: 1:3d5bf5654eda
846 parent: 1:3d5bf5654eda
847 user: test
847 user: test
848 date: Thu Jan 01 00:00:01 1970 +0000
848 date: Thu Jan 01 00:00:01 1970 +0000
849 summary: b1
849 summary: b1
850
850
851
851
852
852
853 log -r tip -p --git
853 log -r tip -p --git
854
854
855 $ hg log -r tip -p --git
855 $ hg log -r tip -p --git
856 changeset: 6:2404bbcab562
856 changeset: 6:2404bbcab562
857 tag: tip
857 tag: tip
858 user: test
858 user: test
859 date: Thu Jan 01 00:00:01 1970 +0000
859 date: Thu Jan 01 00:00:01 1970 +0000
860 summary: b1.1
860 summary: b1.1
861
861
862 diff --git a/b1 b/b1
862 diff --git a/b1 b/b1
863 --- a/b1
863 --- a/b1
864 +++ b/b1
864 +++ b/b1
865 @@ -1,1 +1,2 @@
865 @@ -1,1 +1,2 @@
866 b1
866 b1
867 +postm
867 +postm
868
868
869
869
870
870
871 log -r ""
871 log -r ""
872
872
873 $ hg log -r ''
873 $ hg log -r ''
874 hg: parse error: empty query
874 hg: parse error: empty query
875 [255]
875 [255]
876
876
877 log -r <some unknown node id>
877 log -r <some unknown node id>
878
878
879 $ hg log -r 1000000000000000000000000000000000000000
879 $ hg log -r 1000000000000000000000000000000000000000
880 abort: unknown revision '1000000000000000000000000000000000000000'!
880 abort: unknown revision '1000000000000000000000000000000000000000'!
881 [255]
881 [255]
882
882
883 log -k r1
883 log -k r1
884
884
885 $ hg log -k r1
885 $ hg log -k r1
886 changeset: 1:3d5bf5654eda
886 changeset: 1:3d5bf5654eda
887 user: test
887 user: test
888 date: Thu Jan 01 00:00:01 1970 +0000
888 date: Thu Jan 01 00:00:01 1970 +0000
889 summary: r1
889 summary: r1
890
890
891 log -p -l2 --color=always
891 log -p -l2 --color=always
892
892
893 $ hg --config extensions.color= --config color.mode=ansi \
893 $ hg --config extensions.color= --config color.mode=ansi \
894 > log -p -l2 --color=always
894 > log -p -l2 --color=always
895 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
895 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
896 tag: tip
896 tag: tip
897 user: test
897 user: test
898 date: Thu Jan 01 00:00:01 1970 +0000
898 date: Thu Jan 01 00:00:01 1970 +0000
899 summary: b1.1
899 summary: b1.1
900
900
901 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
901 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
902 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
902 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
903 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
903 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
904 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
904 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
905 b1
905 b1
906 \x1b[0;32m+postm\x1b[0m (esc)
906 \x1b[0;32m+postm\x1b[0m (esc)
907
907
908 \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc)
908 \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc)
909 parent: 3:e62f78d544b4
909 parent: 3:e62f78d544b4
910 parent: 4:ddb82e70d1a1
910 parent: 4:ddb82e70d1a1
911 user: test
911 user: test
912 date: Thu Jan 01 00:00:01 1970 +0000
912 date: Thu Jan 01 00:00:01 1970 +0000
913 summary: m12
913 summary: m12
914
914
915 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
915 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
916 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
916 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
917 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
917 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
918 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
918 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
919 \x1b[0;32m+b2\x1b[0m (esc)
919 \x1b[0;32m+b2\x1b[0m (esc)
920
920
921
921
922
922
923 log -r tip --stat
923 log -r tip --stat
924
924
925 $ hg log -r tip --stat
925 $ hg log -r tip --stat
926 changeset: 6:2404bbcab562
926 changeset: 6:2404bbcab562
927 tag: tip
927 tag: tip
928 user: test
928 user: test
929 date: Thu Jan 01 00:00:01 1970 +0000
929 date: Thu Jan 01 00:00:01 1970 +0000
930 summary: b1.1
930 summary: b1.1
931
931
932 b1 | 1 +
932 b1 | 1 +
933 1 files changed, 1 insertions(+), 0 deletions(-)
933 1 files changed, 1 insertions(+), 0 deletions(-)
934
934
935
935
936 $ cd ..
936 $ cd ..
937
937
938 log --follow --patch FILE in repository where linkrev isn't trustworthy
938 log --follow --patch FILE in repository where linkrev isn't trustworthy
939 (issue5376)
939 (issue5376)
940
940
941 $ hg init follow-dup
941 $ hg init follow-dup
942 $ cd follow-dup
942 $ cd follow-dup
943 $ cat <<EOF >> .hg/hgrc
943 $ cat <<EOF >> .hg/hgrc
944 > [ui]
944 > [ui]
945 > logtemplate = '=== {rev}: {desc}\n'
945 > logtemplate = '=== {rev}: {desc}\n'
946 > [diff]
946 > [diff]
947 > nodates = True
947 > nodates = True
948 > EOF
948 > EOF
949 $ echo 0 >> a
949 $ echo 0 >> a
950 $ hg ci -qAm 'a0'
950 $ hg ci -qAm 'a0'
951 $ echo 1 >> a
951 $ echo 1 >> a
952 $ hg ci -m 'a1'
952 $ hg ci -m 'a1'
953 $ hg up -q 0
953 $ hg up -q 0
954 $ echo 1 >> a
954 $ echo 1 >> a
955 $ touch b
955 $ touch b
956 $ hg ci -qAm 'a1 with b'
956 $ hg ci -qAm 'a1 with b'
957 $ echo 3 >> a
957 $ echo 3 >> a
958 $ hg ci -m 'a3'
958 $ hg ci -m 'a3'
959
959
960 fctx.rev() == 2, but fctx.linkrev() == 1
960 fctx.rev() == 2, but fctx.linkrev() == 1
961
961
962 $ hg log -pf a
962 $ hg log -pf a
963 === 3: a3
963 === 3: a3
964 diff -r 4ea02ba94d66 -r e7a6331a34f0 a
964 diff -r 4ea02ba94d66 -r e7a6331a34f0 a
965 --- a/a
965 --- a/a
966 +++ b/a
966 +++ b/a
967 @@ -1,2 +1,3 @@
967 @@ -1,2 +1,3 @@
968 0
968 0
969 1
969 1
970 +3
970 +3
971
971
972 === 2: a1 with b
972 === 2: a1 with b
973 diff -r 49b5e81287e2 -r 4ea02ba94d66 a
973 diff -r 49b5e81287e2 -r 4ea02ba94d66 a
974 --- a/a
974 --- a/a
975 +++ b/a
975 +++ b/a
976 @@ -1,1 +1,2 @@
976 @@ -1,1 +1,2 @@
977 0
977 0
978 +1
978 +1
979
979
980 === 0: a0
980 === 0: a0
981 diff -r 000000000000 -r 49b5e81287e2 a
981 diff -r 000000000000 -r 49b5e81287e2 a
982 --- /dev/null
982 --- /dev/null
983 +++ b/a
983 +++ b/a
984 @@ -0,0 +1,1 @@
984 @@ -0,0 +1,1 @@
985 +0
985 +0
986
986
987
987
988 fctx.introrev() == 2, but fctx.linkrev() == 1
988 fctx.introrev() == 2, but fctx.linkrev() == 1
989
989
990 $ hg up -q 2
990 $ hg up -q 2
991 $ hg log -pf a
991 $ hg log -pf a
992 === 2: a1 with b
992 === 2: a1 with b
993 diff -r 49b5e81287e2 -r 4ea02ba94d66 a
993 diff -r 49b5e81287e2 -r 4ea02ba94d66 a
994 --- a/a
994 --- a/a
995 +++ b/a
995 +++ b/a
996 @@ -1,1 +1,2 @@
996 @@ -1,1 +1,2 @@
997 0
997 0
998 +1
998 +1
999
999
1000 === 0: a0
1000 === 0: a0
1001 diff -r 000000000000 -r 49b5e81287e2 a
1001 diff -r 000000000000 -r 49b5e81287e2 a
1002 --- /dev/null
1002 --- /dev/null
1003 +++ b/a
1003 +++ b/a
1004 @@ -0,0 +1,1 @@
1004 @@ -0,0 +1,1 @@
1005 +0
1005 +0
1006
1006
1007
1007
1008 $ cd ..
1008 $ cd ..
1009
1009
1010 Test that log should respect the order of -rREV even if multiple OR conditions
1010 Test that log should respect the order of -rREV even if multiple OR conditions
1011 are specified (issue5100):
1011 are specified (issue5100):
1012
1012
1013 $ hg init revorder
1013 $ hg init revorder
1014 $ cd revorder
1014 $ cd revorder
1015
1015
1016 $ hg branch -q b0
1016 $ hg branch -q b0
1017 $ echo 0 >> f0
1017 $ echo 0 >> f0
1018 $ hg ci -qAm k0 -u u0
1018 $ hg ci -qAm k0 -u u0
1019 $ hg branch -q b1
1019 $ hg branch -q b1
1020 $ echo 1 >> f1
1020 $ echo 1 >> f1
1021 $ hg ci -qAm k1 -u u1
1021 $ hg ci -qAm k1 -u u1
1022 $ hg branch -q b2
1022 $ hg branch -q b2
1023 $ echo 2 >> f2
1023 $ echo 2 >> f2
1024 $ hg ci -qAm k2 -u u2
1024 $ hg ci -qAm k2 -u u2
1025
1025
1026 $ hg update -q b2
1026 $ hg update -q b2
1027 $ echo 3 >> f2
1027 $ echo 3 >> f2
1028 $ hg ci -qAm k2 -u u2
1028 $ hg ci -qAm k2 -u u2
1029 $ hg update -q b1
1029 $ hg update -q b1
1030 $ echo 4 >> f1
1030 $ echo 4 >> f1
1031 $ hg ci -qAm k1 -u u1
1031 $ hg ci -qAm k1 -u u1
1032 $ hg update -q b0
1032 $ hg update -q b0
1033 $ echo 5 >> f0
1033 $ echo 5 >> f0
1034 $ hg ci -qAm k0 -u u0
1034 $ hg ci -qAm k0 -u u0
1035
1035
1036 summary of revisions:
1036 summary of revisions:
1037
1037
1038 $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n'
1038 $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n'
1039 @ 5 b0 u0 k0 f0
1039 @ 5 b0 u0 k0 f0
1040 |
1040 |
1041 | o 4 b1 u1 k1 f1
1041 | o 4 b1 u1 k1 f1
1042 | |
1042 | |
1043 | | o 3 b2 u2 k2 f2
1043 | | o 3 b2 u2 k2 f2
1044 | | |
1044 | | |
1045 | | o 2 b2 u2 k2 f2
1045 | | o 2 b2 u2 k2 f2
1046 | |/
1046 | |/
1047 | o 1 b1 u1 k1 f1
1047 | o 1 b1 u1 k1 f1
1048 |/
1048 |/
1049 o 0 b0 u0 k0 f0
1049 o 0 b0 u0 k0 f0
1050
1050
1051
1051
1052 log -b BRANCH in ascending order:
1052 log -b BRANCH in ascending order:
1053
1053
1054 $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1
1054 $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1
1055 0 b0
1055 0 b0
1056 1 b1
1056 1 b1
1057 4 b1
1057 4 b1
1058 5 b0
1058 5 b0
1059 $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0
1059 $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0
1060 0 b0
1060 0 b0
1061 1 b1
1061 1 b1
1062 4 b1
1062 4 b1
1063 5 b0
1063 5 b0
1064
1064
1065 log --only-branch BRANCH in descending order:
1065 log --only-branch BRANCH in descending order:
1066
1066
1067 $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2
1067 $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2
1068 4 b1
1068 4 b1
1069 3 b2
1069 3 b2
1070 2 b2
1070 2 b2
1071 1 b1
1071 1 b1
1072 $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1
1072 $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1
1073 4 b1
1073 4 b1
1074 3 b2
1074 3 b2
1075 2 b2
1075 2 b2
1076 1 b1
1076 1 b1
1077
1077
1078 log -u USER in ascending order, against compound set:
1078 log -u USER in ascending order, against compound set:
1079
1079
1080 $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2
1080 $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2
1081 0 u0
1081 0 u0
1082 2 u2
1082 2 u2
1083 3 u2
1083 3 u2
1084 5 u0
1084 5 u0
1085 $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0
1085 $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0
1086 0 u0
1086 0 u0
1087 2 u2
1087 2 u2
1088 3 u2
1088 3 u2
1089 5 u0
1089 5 u0
1090
1090
1091 log -k TEXT in descending order, against compound set:
1091 log -k TEXT in descending order, against compound set:
1092
1092
1093 $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2
1093 $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2
1094 5 k0
1094 5 k0
1095 3 k2
1095 3 k2
1096 2 k2
1096 2 k2
1097 1 k1
1097 1 k1
1098 0 k0
1098 0 k0
1099 $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0
1099 $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0
1100 5 k0
1100 5 k0
1101 3 k2
1101 3 k2
1102 2 k2
1102 2 k2
1103 1 k1
1103 1 k1
1104 0 k0
1104 0 k0
1105
1105
1106 log FILE in ascending order, against dagrange:
1106 log FILE in ascending order, against dagrange:
1107
1107
1108 $ hg log -r1:: -T '{rev} {files}\n' f1 f2
1108 $ hg log -r1:: -T '{rev} {files}\n' f1 f2
1109 1 f1
1109 1 f1
1110 2 f2
1110 2 f2
1111 3 f2
1111 3 f2
1112 4 f1
1112 4 f1
1113 $ hg log -r1:: -T '{rev} {files}\n' f2 f1
1113 $ hg log -r1:: -T '{rev} {files}\n' f2 f1
1114 1 f1
1114 1 f1
1115 2 f2
1115 2 f2
1116 3 f2
1116 3 f2
1117 4 f1
1117 4 f1
1118
1118
1119 $ cd ..
1119 $ cd ..
1120
1120
1121 User
1121 User
1122
1122
1123 $ hg init usertest
1123 $ hg init usertest
1124 $ cd usertest
1124 $ cd usertest
1125
1125
1126 $ echo a > a
1126 $ echo a > a
1127 $ hg ci -A -m "a" -u "User One <user1@example.org>"
1127 $ hg ci -A -m "a" -u "User One <user1@example.org>"
1128 adding a
1128 adding a
1129 $ echo b > b
1129 $ echo b > b
1130 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
1130 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
1131 adding b
1131 adding b
1132
1132
1133 $ hg log -u "User One <user1@example.org>"
1133 $ hg log -u "User One <user1@example.org>"
1134 changeset: 0:29a4c94f1924
1134 changeset: 0:29a4c94f1924
1135 user: User One <user1@example.org>
1135 user: User One <user1@example.org>
1136 date: Thu Jan 01 00:00:00 1970 +0000
1136 date: Thu Jan 01 00:00:00 1970 +0000
1137 summary: a
1137 summary: a
1138
1138
1139 $ hg log -u "user1" -u "user2"
1139 $ hg log -u "user1" -u "user2"
1140 changeset: 1:e834b5e69c0e
1140 changeset: 1:e834b5e69c0e
1141 tag: tip
1141 tag: tip
1142 user: User Two <user2@example.org>
1142 user: User Two <user2@example.org>
1143 date: Thu Jan 01 00:00:00 1970 +0000
1143 date: Thu Jan 01 00:00:00 1970 +0000
1144 summary: b
1144 summary: b
1145
1145
1146 changeset: 0:29a4c94f1924
1146 changeset: 0:29a4c94f1924
1147 user: User One <user1@example.org>
1147 user: User One <user1@example.org>
1148 date: Thu Jan 01 00:00:00 1970 +0000
1148 date: Thu Jan 01 00:00:00 1970 +0000
1149 summary: a
1149 summary: a
1150
1150
1151 $ hg log -u "user3"
1151 $ hg log -u "user3"
1152
1152
1153 $ cd ..
1153 $ cd ..
1154
1154
1155 $ hg init branches
1155 $ hg init branches
1156 $ cd branches
1156 $ cd branches
1157
1157
1158 $ echo a > a
1158 $ echo a > a
1159 $ hg ci -A -m "commit on default"
1159 $ hg ci -A -m "commit on default"
1160 adding a
1160 adding a
1161 $ hg branch test
1161 $ hg branch test
1162 marked working directory as branch test
1162 marked working directory as branch test
1163 (branches are permanent and global, did you want a bookmark?)
1163 (branches are permanent and global, did you want a bookmark?)
1164 $ echo b > b
1164 $ echo b > b
1165 $ hg ci -A -m "commit on test"
1165 $ hg ci -A -m "commit on test"
1166 adding b
1166 adding b
1167
1167
1168 $ hg up default
1168 $ hg up default
1169 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1169 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1170 $ echo c > c
1170 $ echo c > c
1171 $ hg ci -A -m "commit on default"
1171 $ hg ci -A -m "commit on default"
1172 adding c
1172 adding c
1173 $ hg up test
1173 $ hg up test
1174 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1174 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1175 $ echo c > c
1175 $ echo c > c
1176 $ hg ci -A -m "commit on test"
1176 $ hg ci -A -m "commit on test"
1177 adding c
1177 adding c
1178
1178
1179
1179
1180 log -b default
1180 log -b default
1181
1181
1182 $ hg log -b default
1182 $ hg log -b default
1183 changeset: 2:c3a4f03cc9a7
1183 changeset: 2:c3a4f03cc9a7
1184 parent: 0:24427303d56f
1184 parent: 0:24427303d56f
1185 user: test
1185 user: test
1186 date: Thu Jan 01 00:00:00 1970 +0000
1186 date: Thu Jan 01 00:00:00 1970 +0000
1187 summary: commit on default
1187 summary: commit on default
1188
1188
1189 changeset: 0:24427303d56f
1189 changeset: 0:24427303d56f
1190 user: test
1190 user: test
1191 date: Thu Jan 01 00:00:00 1970 +0000
1191 date: Thu Jan 01 00:00:00 1970 +0000
1192 summary: commit on default
1192 summary: commit on default
1193
1193
1194
1194
1195
1195
1196 log -b test
1196 log -b test
1197
1197
1198 $ hg log -b test
1198 $ hg log -b test
1199 changeset: 3:f5d8de11c2e2
1199 changeset: 3:f5d8de11c2e2
1200 branch: test
1200 branch: test
1201 tag: tip
1201 tag: tip
1202 parent: 1:d32277701ccb
1202 parent: 1:d32277701ccb
1203 user: test
1203 user: test
1204 date: Thu Jan 01 00:00:00 1970 +0000
1204 date: Thu Jan 01 00:00:00 1970 +0000
1205 summary: commit on test
1205 summary: commit on test
1206
1206
1207 changeset: 1:d32277701ccb
1207 changeset: 1:d32277701ccb
1208 branch: test
1208 branch: test
1209 user: test
1209 user: test
1210 date: Thu Jan 01 00:00:00 1970 +0000
1210 date: Thu Jan 01 00:00:00 1970 +0000
1211 summary: commit on test
1211 summary: commit on test
1212
1212
1213
1213
1214
1214
1215 log -b dummy
1215 log -b dummy
1216
1216
1217 $ hg log -b dummy
1217 $ hg log -b dummy
1218 abort: unknown revision 'dummy'!
1218 abort: unknown revision 'dummy'!
1219 [255]
1219 [255]
1220
1220
1221
1221
1222 log -b .
1222 log -b .
1223
1223
1224 $ hg log -b .
1224 $ hg log -b .
1225 changeset: 3:f5d8de11c2e2
1225 changeset: 3:f5d8de11c2e2
1226 branch: test
1226 branch: test
1227 tag: tip
1227 tag: tip
1228 parent: 1:d32277701ccb
1228 parent: 1:d32277701ccb
1229 user: test
1229 user: test
1230 date: Thu Jan 01 00:00:00 1970 +0000
1230 date: Thu Jan 01 00:00:00 1970 +0000
1231 summary: commit on test
1231 summary: commit on test
1232
1232
1233 changeset: 1:d32277701ccb
1233 changeset: 1:d32277701ccb
1234 branch: test
1234 branch: test
1235 user: test
1235 user: test
1236 date: Thu Jan 01 00:00:00 1970 +0000
1236 date: Thu Jan 01 00:00:00 1970 +0000
1237 summary: commit on test
1237 summary: commit on test
1238
1238
1239
1239
1240
1240
1241 log -b default -b test
1241 log -b default -b test
1242
1242
1243 $ hg log -b default -b test
1243 $ hg log -b default -b test
1244 changeset: 3:f5d8de11c2e2
1244 changeset: 3:f5d8de11c2e2
1245 branch: test
1245 branch: test
1246 tag: tip
1246 tag: tip
1247 parent: 1:d32277701ccb
1247 parent: 1:d32277701ccb
1248 user: test
1248 user: test
1249 date: Thu Jan 01 00:00:00 1970 +0000
1249 date: Thu Jan 01 00:00:00 1970 +0000
1250 summary: commit on test
1250 summary: commit on test
1251
1251
1252 changeset: 2:c3a4f03cc9a7
1252 changeset: 2:c3a4f03cc9a7
1253 parent: 0:24427303d56f
1253 parent: 0:24427303d56f
1254 user: test
1254 user: test
1255 date: Thu Jan 01 00:00:00 1970 +0000
1255 date: Thu Jan 01 00:00:00 1970 +0000
1256 summary: commit on default
1256 summary: commit on default
1257
1257
1258 changeset: 1:d32277701ccb
1258 changeset: 1:d32277701ccb
1259 branch: test
1259 branch: test
1260 user: test
1260 user: test
1261 date: Thu Jan 01 00:00:00 1970 +0000
1261 date: Thu Jan 01 00:00:00 1970 +0000
1262 summary: commit on test
1262 summary: commit on test
1263
1263
1264 changeset: 0:24427303d56f
1264 changeset: 0:24427303d56f
1265 user: test
1265 user: test
1266 date: Thu Jan 01 00:00:00 1970 +0000
1266 date: Thu Jan 01 00:00:00 1970 +0000
1267 summary: commit on default
1267 summary: commit on default
1268
1268
1269
1269
1270
1270
1271 log -b default -b .
1271 log -b default -b .
1272
1272
1273 $ hg log -b default -b .
1273 $ hg log -b default -b .
1274 changeset: 3:f5d8de11c2e2
1274 changeset: 3:f5d8de11c2e2
1275 branch: test
1275 branch: test
1276 tag: tip
1276 tag: tip
1277 parent: 1:d32277701ccb
1277 parent: 1:d32277701ccb
1278 user: test
1278 user: test
1279 date: Thu Jan 01 00:00:00 1970 +0000
1279 date: Thu Jan 01 00:00:00 1970 +0000
1280 summary: commit on test
1280 summary: commit on test
1281
1281
1282 changeset: 2:c3a4f03cc9a7
1282 changeset: 2:c3a4f03cc9a7
1283 parent: 0:24427303d56f
1283 parent: 0:24427303d56f
1284 user: test
1284 user: test
1285 date: Thu Jan 01 00:00:00 1970 +0000
1285 date: Thu Jan 01 00:00:00 1970 +0000
1286 summary: commit on default
1286 summary: commit on default
1287
1287
1288 changeset: 1:d32277701ccb
1288 changeset: 1:d32277701ccb
1289 branch: test
1289 branch: test
1290 user: test
1290 user: test
1291 date: Thu Jan 01 00:00:00 1970 +0000
1291 date: Thu Jan 01 00:00:00 1970 +0000
1292 summary: commit on test
1292 summary: commit on test
1293
1293
1294 changeset: 0:24427303d56f
1294 changeset: 0:24427303d56f
1295 user: test
1295 user: test
1296 date: Thu Jan 01 00:00:00 1970 +0000
1296 date: Thu Jan 01 00:00:00 1970 +0000
1297 summary: commit on default
1297 summary: commit on default
1298
1298
1299
1299
1300
1300
1301 log -b . -b test
1301 log -b . -b test
1302
1302
1303 $ hg log -b . -b test
1303 $ hg log -b . -b test
1304 changeset: 3:f5d8de11c2e2
1304 changeset: 3:f5d8de11c2e2
1305 branch: test
1305 branch: test
1306 tag: tip
1306 tag: tip
1307 parent: 1:d32277701ccb
1307 parent: 1:d32277701ccb
1308 user: test
1308 user: test
1309 date: Thu Jan 01 00:00:00 1970 +0000
1309 date: Thu Jan 01 00:00:00 1970 +0000
1310 summary: commit on test
1310 summary: commit on test
1311
1311
1312 changeset: 1:d32277701ccb
1312 changeset: 1:d32277701ccb
1313 branch: test
1313 branch: test
1314 user: test
1314 user: test
1315 date: Thu Jan 01 00:00:00 1970 +0000
1315 date: Thu Jan 01 00:00:00 1970 +0000
1316 summary: commit on test
1316 summary: commit on test
1317
1317
1318
1318
1319
1319
1320 log -b 2
1320 log -b 2
1321
1321
1322 $ hg log -b 2
1322 $ hg log -b 2
1323 changeset: 2:c3a4f03cc9a7
1323 changeset: 2:c3a4f03cc9a7
1324 parent: 0:24427303d56f
1324 parent: 0:24427303d56f
1325 user: test
1325 user: test
1326 date: Thu Jan 01 00:00:00 1970 +0000
1326 date: Thu Jan 01 00:00:00 1970 +0000
1327 summary: commit on default
1327 summary: commit on default
1328
1328
1329 changeset: 0:24427303d56f
1329 changeset: 0:24427303d56f
1330 user: test
1330 user: test
1331 date: Thu Jan 01 00:00:00 1970 +0000
1331 date: Thu Jan 01 00:00:00 1970 +0000
1332 summary: commit on default
1332 summary: commit on default
1333
1333
1334 #if gettext
1334 #if gettext
1335
1335
1336 Test that all log names are translated (e.g. branches, bookmarks, tags):
1336 Test that all log names are translated (e.g. branches, bookmarks, tags):
1337
1337
1338 $ hg bookmark babar -r tip
1338 $ hg bookmark babar -r tip
1339
1339
1340 $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip
1340 $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip
1341 \xc3\x84nderung: 3:f5d8de11c2e2 (esc)
1341 \xc3\x84nderung: 3:f5d8de11c2e2 (esc)
1342 Zweig: test
1342 Zweig: test
1343 Lesezeichen: babar
1343 Lesezeichen: babar
1344 Marke: tip
1344 Marke: tip
1345 Vorg\xc3\xa4nger: 1:d32277701ccb (esc)
1345 Vorg\xc3\xa4nger: 1:d32277701ccb (esc)
1346 Nutzer: test
1346 Nutzer: test
1347 Datum: Thu Jan 01 00:00:00 1970 +0000
1347 Datum: Thu Jan 01 00:00:00 1970 +0000
1348 Zusammenfassung: commit on test
1348 Zusammenfassung: commit on test
1349
1349
1350 $ hg bookmark -d babar
1350 $ hg bookmark -d babar
1351
1351
1352 #endif
1352 #endif
1353
1353
1354 log -p --cwd dir (in subdir)
1354 log -p --cwd dir (in subdir)
1355
1355
1356 $ mkdir dir
1356 $ mkdir dir
1357 $ hg log -p --cwd dir
1357 $ hg log -p --cwd dir
1358 changeset: 3:f5d8de11c2e2
1358 changeset: 3:f5d8de11c2e2
1359 branch: test
1359 branch: test
1360 tag: tip
1360 tag: tip
1361 parent: 1:d32277701ccb
1361 parent: 1:d32277701ccb
1362 user: test
1362 user: test
1363 date: Thu Jan 01 00:00:00 1970 +0000
1363 date: Thu Jan 01 00:00:00 1970 +0000
1364 summary: commit on test
1364 summary: commit on test
1365
1365
1366 diff -r d32277701ccb -r f5d8de11c2e2 c
1366 diff -r d32277701ccb -r f5d8de11c2e2 c
1367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1368 +++ b/c Thu Jan 01 00:00:00 1970 +0000
1368 +++ b/c Thu Jan 01 00:00:00 1970 +0000
1369 @@ -0,0 +1,1 @@
1369 @@ -0,0 +1,1 @@
1370 +c
1370 +c
1371
1371
1372 changeset: 2:c3a4f03cc9a7
1372 changeset: 2:c3a4f03cc9a7
1373 parent: 0:24427303d56f
1373 parent: 0:24427303d56f
1374 user: test
1374 user: test
1375 date: Thu Jan 01 00:00:00 1970 +0000
1375 date: Thu Jan 01 00:00:00 1970 +0000
1376 summary: commit on default
1376 summary: commit on default
1377
1377
1378 diff -r 24427303d56f -r c3a4f03cc9a7 c
1378 diff -r 24427303d56f -r c3a4f03cc9a7 c
1379 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1379 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1380 +++ b/c Thu Jan 01 00:00:00 1970 +0000
1380 +++ b/c Thu Jan 01 00:00:00 1970 +0000
1381 @@ -0,0 +1,1 @@
1381 @@ -0,0 +1,1 @@
1382 +c
1382 +c
1383
1383
1384 changeset: 1:d32277701ccb
1384 changeset: 1:d32277701ccb
1385 branch: test
1385 branch: test
1386 user: test
1386 user: test
1387 date: Thu Jan 01 00:00:00 1970 +0000
1387 date: Thu Jan 01 00:00:00 1970 +0000
1388 summary: commit on test
1388 summary: commit on test
1389
1389
1390 diff -r 24427303d56f -r d32277701ccb b
1390 diff -r 24427303d56f -r d32277701ccb b
1391 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1391 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1392 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1392 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1393 @@ -0,0 +1,1 @@
1393 @@ -0,0 +1,1 @@
1394 +b
1394 +b
1395
1395
1396 changeset: 0:24427303d56f
1396 changeset: 0:24427303d56f
1397 user: test
1397 user: test
1398 date: Thu Jan 01 00:00:00 1970 +0000
1398 date: Thu Jan 01 00:00:00 1970 +0000
1399 summary: commit on default
1399 summary: commit on default
1400
1400
1401 diff -r 000000000000 -r 24427303d56f a
1401 diff -r 000000000000 -r 24427303d56f a
1402 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1402 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1403 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1403 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1404 @@ -0,0 +1,1 @@
1404 @@ -0,0 +1,1 @@
1405 +a
1405 +a
1406
1406
1407
1407
1408
1408
1409 log -p -R repo
1409 log -p -R repo
1410
1410
1411 $ cd dir
1411 $ cd dir
1412 $ hg log -p -R .. ../a
1412 $ hg log -p -R .. ../a
1413 changeset: 0:24427303d56f
1413 changeset: 0:24427303d56f
1414 user: test
1414 user: test
1415 date: Thu Jan 01 00:00:00 1970 +0000
1415 date: Thu Jan 01 00:00:00 1970 +0000
1416 summary: commit on default
1416 summary: commit on default
1417
1417
1418 diff -r 000000000000 -r 24427303d56f a
1418 diff -r 000000000000 -r 24427303d56f a
1419 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1419 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1420 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1420 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1421 @@ -0,0 +1,1 @@
1421 @@ -0,0 +1,1 @@
1422 +a
1422 +a
1423
1423
1424
1424
1425 $ cd ../..
1425 $ cd ../..
1426
1426
1427 $ hg init follow2
1427 $ hg init follow2
1428 $ cd follow2
1428 $ cd follow2
1429
1429
1430 # Build the following history:
1430 # Build the following history:
1431 # tip - o - x - o - x - x
1431 # tip - o - x - o - x - x
1432 # \ /
1432 # \ /
1433 # o - o - o - x
1433 # o - o - o - x
1434 # \ /
1434 # \ /
1435 # o
1435 # o
1436 #
1436 #
1437 # Where "o" is a revision containing "foo" and
1437 # Where "o" is a revision containing "foo" and
1438 # "x" is a revision without "foo"
1438 # "x" is a revision without "foo"
1439
1439
1440 $ touch init
1440 $ touch init
1441 $ hg ci -A -m "init, unrelated"
1441 $ hg ci -A -m "init, unrelated"
1442 adding init
1442 adding init
1443 $ echo 'foo' > init
1443 $ echo 'foo' > init
1444 $ hg ci -m "change, unrelated"
1444 $ hg ci -m "change, unrelated"
1445 $ echo 'foo' > foo
1445 $ echo 'foo' > foo
1446 $ hg ci -A -m "add unrelated old foo"
1446 $ hg ci -A -m "add unrelated old foo"
1447 adding foo
1447 adding foo
1448 $ hg rm foo
1448 $ hg rm foo
1449 $ hg ci -m "delete foo, unrelated"
1449 $ hg ci -m "delete foo, unrelated"
1450 $ echo 'related' > foo
1450 $ echo 'related' > foo
1451 $ hg ci -A -m "add foo, related"
1451 $ hg ci -A -m "add foo, related"
1452 adding foo
1452 adding foo
1453
1453
1454 $ hg up 0
1454 $ hg up 0
1455 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1455 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1456 $ touch branch
1456 $ touch branch
1457 $ hg ci -A -m "first branch, unrelated"
1457 $ hg ci -A -m "first branch, unrelated"
1458 adding branch
1458 adding branch
1459 created new head
1459 created new head
1460 $ touch foo
1460 $ touch foo
1461 $ hg ci -A -m "create foo, related"
1461 $ hg ci -A -m "create foo, related"
1462 adding foo
1462 adding foo
1463 $ echo 'change' > foo
1463 $ echo 'change' > foo
1464 $ hg ci -m "change foo, related"
1464 $ hg ci -m "change foo, related"
1465
1465
1466 $ hg up 6
1466 $ hg up 6
1467 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1467 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1468 $ echo 'change foo in branch' > foo
1468 $ echo 'change foo in branch' > foo
1469 $ hg ci -m "change foo in branch, related"
1469 $ hg ci -m "change foo in branch, related"
1470 created new head
1470 created new head
1471 $ hg merge 7
1471 $ hg merge 7
1472 merging foo
1472 merging foo
1473 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
1473 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
1474 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1474 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1475 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1475 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1476 [1]
1476 [1]
1477 $ echo 'merge 1' > foo
1477 $ echo 'merge 1' > foo
1478 $ hg resolve -m foo
1478 $ hg resolve -m foo
1479 (no more unresolved files)
1479 (no more unresolved files)
1480 $ hg ci -m "First merge, related"
1480 $ hg ci -m "First merge, related"
1481
1481
1482 $ hg merge 4
1482 $ hg merge 4
1483 merging foo
1483 merging foo
1484 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
1484 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
1485 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
1485 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
1486 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1486 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1487 [1]
1487 [1]
1488 $ echo 'merge 2' > foo
1488 $ echo 'merge 2' > foo
1489 $ hg resolve -m foo
1489 $ hg resolve -m foo
1490 (no more unresolved files)
1490 (no more unresolved files)
1491 $ hg ci -m "Last merge, related"
1491 $ hg ci -m "Last merge, related"
1492
1492
1493 $ hg log --graph
1493 $ hg log --graph
1494 @ changeset: 10:4dae8563d2c5
1494 @ changeset: 10:4dae8563d2c5
1495 |\ tag: tip
1495 |\ tag: tip
1496 | | parent: 9:7b35701b003e
1496 | | parent: 9:7b35701b003e
1497 | | parent: 4:88176d361b69
1497 | | parent: 4:88176d361b69
1498 | | user: test
1498 | | user: test
1499 | | date: Thu Jan 01 00:00:00 1970 +0000
1499 | | date: Thu Jan 01 00:00:00 1970 +0000
1500 | | summary: Last merge, related
1500 | | summary: Last merge, related
1501 | |
1501 | |
1502 | o changeset: 9:7b35701b003e
1502 | o changeset: 9:7b35701b003e
1503 | |\ parent: 8:e5416ad8a855
1503 | |\ parent: 8:e5416ad8a855
1504 | | | parent: 7:87fe3144dcfa
1504 | | | parent: 7:87fe3144dcfa
1505 | | | user: test
1505 | | | user: test
1506 | | | date: Thu Jan 01 00:00:00 1970 +0000
1506 | | | date: Thu Jan 01 00:00:00 1970 +0000
1507 | | | summary: First merge, related
1507 | | | summary: First merge, related
1508 | | |
1508 | | |
1509 | | o changeset: 8:e5416ad8a855
1509 | | o changeset: 8:e5416ad8a855
1510 | | | parent: 6:dc6c325fe5ee
1510 | | | parent: 6:dc6c325fe5ee
1511 | | | user: test
1511 | | | user: test
1512 | | | date: Thu Jan 01 00:00:00 1970 +0000
1512 | | | date: Thu Jan 01 00:00:00 1970 +0000
1513 | | | summary: change foo in branch, related
1513 | | | summary: change foo in branch, related
1514 | | |
1514 | | |
1515 | o | changeset: 7:87fe3144dcfa
1515 | o | changeset: 7:87fe3144dcfa
1516 | |/ user: test
1516 | |/ user: test
1517 | | date: Thu Jan 01 00:00:00 1970 +0000
1517 | | date: Thu Jan 01 00:00:00 1970 +0000
1518 | | summary: change foo, related
1518 | | summary: change foo, related
1519 | |
1519 | |
1520 | o changeset: 6:dc6c325fe5ee
1520 | o changeset: 6:dc6c325fe5ee
1521 | | user: test
1521 | | user: test
1522 | | date: Thu Jan 01 00:00:00 1970 +0000
1522 | | date: Thu Jan 01 00:00:00 1970 +0000
1523 | | summary: create foo, related
1523 | | summary: create foo, related
1524 | |
1524 | |
1525 | o changeset: 5:73db34516eb9
1525 | o changeset: 5:73db34516eb9
1526 | | parent: 0:e87515fd044a
1526 | | parent: 0:e87515fd044a
1527 | | user: test
1527 | | user: test
1528 | | date: Thu Jan 01 00:00:00 1970 +0000
1528 | | date: Thu Jan 01 00:00:00 1970 +0000
1529 | | summary: first branch, unrelated
1529 | | summary: first branch, unrelated
1530 | |
1530 | |
1531 o | changeset: 4:88176d361b69
1531 o | changeset: 4:88176d361b69
1532 | | user: test
1532 | | user: test
1533 | | date: Thu Jan 01 00:00:00 1970 +0000
1533 | | date: Thu Jan 01 00:00:00 1970 +0000
1534 | | summary: add foo, related
1534 | | summary: add foo, related
1535 | |
1535 | |
1536 o | changeset: 3:dd78ae4afb56
1536 o | changeset: 3:dd78ae4afb56
1537 | | user: test
1537 | | user: test
1538 | | date: Thu Jan 01 00:00:00 1970 +0000
1538 | | date: Thu Jan 01 00:00:00 1970 +0000
1539 | | summary: delete foo, unrelated
1539 | | summary: delete foo, unrelated
1540 | |
1540 | |
1541 o | changeset: 2:c4c64aedf0f7
1541 o | changeset: 2:c4c64aedf0f7
1542 | | user: test
1542 | | user: test
1543 | | date: Thu Jan 01 00:00:00 1970 +0000
1543 | | date: Thu Jan 01 00:00:00 1970 +0000
1544 | | summary: add unrelated old foo
1544 | | summary: add unrelated old foo
1545 | |
1545 | |
1546 o | changeset: 1:e5faa7440653
1546 o | changeset: 1:e5faa7440653
1547 |/ user: test
1547 |/ user: test
1548 | date: Thu Jan 01 00:00:00 1970 +0000
1548 | date: Thu Jan 01 00:00:00 1970 +0000
1549 | summary: change, unrelated
1549 | summary: change, unrelated
1550 |
1550 |
1551 o changeset: 0:e87515fd044a
1551 o changeset: 0:e87515fd044a
1552 user: test
1552 user: test
1553 date: Thu Jan 01 00:00:00 1970 +0000
1553 date: Thu Jan 01 00:00:00 1970 +0000
1554 summary: init, unrelated
1554 summary: init, unrelated
1555
1555
1556
1556
1557 $ hg --traceback log -f foo
1557 $ hg --traceback log -f foo
1558 changeset: 10:4dae8563d2c5
1558 changeset: 10:4dae8563d2c5
1559 tag: tip
1559 tag: tip
1560 parent: 9:7b35701b003e
1560 parent: 9:7b35701b003e
1561 parent: 4:88176d361b69
1561 parent: 4:88176d361b69
1562 user: test
1562 user: test
1563 date: Thu Jan 01 00:00:00 1970 +0000
1563 date: Thu Jan 01 00:00:00 1970 +0000
1564 summary: Last merge, related
1564 summary: Last merge, related
1565
1565
1566 changeset: 9:7b35701b003e
1566 changeset: 9:7b35701b003e
1567 parent: 8:e5416ad8a855
1567 parent: 8:e5416ad8a855
1568 parent: 7:87fe3144dcfa
1568 parent: 7:87fe3144dcfa
1569 user: test
1569 user: test
1570 date: Thu Jan 01 00:00:00 1970 +0000
1570 date: Thu Jan 01 00:00:00 1970 +0000
1571 summary: First merge, related
1571 summary: First merge, related
1572
1572
1573 changeset: 8:e5416ad8a855
1573 changeset: 8:e5416ad8a855
1574 parent: 6:dc6c325fe5ee
1574 parent: 6:dc6c325fe5ee
1575 user: test
1575 user: test
1576 date: Thu Jan 01 00:00:00 1970 +0000
1576 date: Thu Jan 01 00:00:00 1970 +0000
1577 summary: change foo in branch, related
1577 summary: change foo in branch, related
1578
1578
1579 changeset: 7:87fe3144dcfa
1579 changeset: 7:87fe3144dcfa
1580 user: test
1580 user: test
1581 date: Thu Jan 01 00:00:00 1970 +0000
1581 date: Thu Jan 01 00:00:00 1970 +0000
1582 summary: change foo, related
1582 summary: change foo, related
1583
1583
1584 changeset: 6:dc6c325fe5ee
1584 changeset: 6:dc6c325fe5ee
1585 user: test
1585 user: test
1586 date: Thu Jan 01 00:00:00 1970 +0000
1586 date: Thu Jan 01 00:00:00 1970 +0000
1587 summary: create foo, related
1587 summary: create foo, related
1588
1588
1589 changeset: 4:88176d361b69
1589 changeset: 4:88176d361b69
1590 user: test
1590 user: test
1591 date: Thu Jan 01 00:00:00 1970 +0000
1591 date: Thu Jan 01 00:00:00 1970 +0000
1592 summary: add foo, related
1592 summary: add foo, related
1593
1593
1594
1594
1595 Also check when maxrev < lastrevfilelog
1595 Also check when maxrev < lastrevfilelog
1596
1596
1597 $ hg --traceback log -f -r4 foo
1597 $ hg --traceback log -f -r4 foo
1598 changeset: 4:88176d361b69
1598 changeset: 4:88176d361b69
1599 user: test
1599 user: test
1600 date: Thu Jan 01 00:00:00 1970 +0000
1600 date: Thu Jan 01 00:00:00 1970 +0000
1601 summary: add foo, related
1601 summary: add foo, related
1602
1602
1603 changeset: 2:c4c64aedf0f7
1603 changeset: 2:c4c64aedf0f7
1604 user: test
1604 user: test
1605 date: Thu Jan 01 00:00:00 1970 +0000
1605 date: Thu Jan 01 00:00:00 1970 +0000
1606 summary: add unrelated old foo
1606 summary: add unrelated old foo
1607
1607
1608 $ cd ..
1608 $ cd ..
1609
1609
1610 Issue2383: hg log showing _less_ differences than hg diff
1610 Issue2383: hg log showing _less_ differences than hg diff
1611
1611
1612 $ hg init issue2383
1612 $ hg init issue2383
1613 $ cd issue2383
1613 $ cd issue2383
1614
1614
1615 Create a test repo:
1615 Create a test repo:
1616
1616
1617 $ echo a > a
1617 $ echo a > a
1618 $ hg ci -Am0
1618 $ hg ci -Am0
1619 adding a
1619 adding a
1620 $ echo b > b
1620 $ echo b > b
1621 $ hg ci -Am1
1621 $ hg ci -Am1
1622 adding b
1622 adding b
1623 $ hg co 0
1623 $ hg co 0
1624 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1624 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1625 $ echo b > a
1625 $ echo b > a
1626 $ hg ci -m2
1626 $ hg ci -m2
1627 created new head
1627 created new head
1628
1628
1629 Merge:
1629 Merge:
1630
1630
1631 $ hg merge
1631 $ hg merge
1632 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1632 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1633 (branch merge, don't forget to commit)
1633 (branch merge, don't forget to commit)
1634
1634
1635 Make sure there's a file listed in the merge to trigger the bug:
1635 Make sure there's a file listed in the merge to trigger the bug:
1636
1636
1637 $ echo c > a
1637 $ echo c > a
1638 $ hg ci -m3
1638 $ hg ci -m3
1639
1639
1640 Two files shown here in diff:
1640 Two files shown here in diff:
1641
1641
1642 $ hg diff --rev 2:3
1642 $ hg diff --rev 2:3
1643 diff -r b09be438c43a -r 8e07aafe1edc a
1643 diff -r b09be438c43a -r 8e07aafe1edc a
1644 --- a/a Thu Jan 01 00:00:00 1970 +0000
1644 --- a/a Thu Jan 01 00:00:00 1970 +0000
1645 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1645 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1646 @@ -1,1 +1,1 @@
1646 @@ -1,1 +1,1 @@
1647 -b
1647 -b
1648 +c
1648 +c
1649 diff -r b09be438c43a -r 8e07aafe1edc b
1649 diff -r b09be438c43a -r 8e07aafe1edc b
1650 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1650 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1651 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1651 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1652 @@ -0,0 +1,1 @@
1652 @@ -0,0 +1,1 @@
1653 +b
1653 +b
1654
1654
1655 Diff here should be the same:
1655 Diff here should be the same:
1656
1656
1657 $ hg log -vpr 3
1657 $ hg log -vpr 3
1658 changeset: 3:8e07aafe1edc
1658 changeset: 3:8e07aafe1edc
1659 tag: tip
1659 tag: tip
1660 parent: 2:b09be438c43a
1660 parent: 2:b09be438c43a
1661 parent: 1:925d80f479bb
1661 parent: 1:925d80f479bb
1662 user: test
1662 user: test
1663 date: Thu Jan 01 00:00:00 1970 +0000
1663 date: Thu Jan 01 00:00:00 1970 +0000
1664 files: a
1664 files: a
1665 description:
1665 description:
1666 3
1666 3
1667
1667
1668
1668
1669 diff -r b09be438c43a -r 8e07aafe1edc a
1669 diff -r b09be438c43a -r 8e07aafe1edc a
1670 --- a/a Thu Jan 01 00:00:00 1970 +0000
1670 --- a/a Thu Jan 01 00:00:00 1970 +0000
1671 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1671 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1672 @@ -1,1 +1,1 @@
1672 @@ -1,1 +1,1 @@
1673 -b
1673 -b
1674 +c
1674 +c
1675 diff -r b09be438c43a -r 8e07aafe1edc b
1675 diff -r b09be438c43a -r 8e07aafe1edc b
1676 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1676 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1677 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1677 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1678 @@ -0,0 +1,1 @@
1678 @@ -0,0 +1,1 @@
1679 +b
1679 +b
1680
1680
1681 $ cd ..
1681 $ cd ..
1682
1682
1683 'hg log -r rev fn' when last(filelog(fn)) != rev
1683 'hg log -r rev fn' when last(filelog(fn)) != rev
1684
1684
1685 $ hg init simplelog
1685 $ hg init simplelog
1686 $ cd simplelog
1686 $ cd simplelog
1687 $ echo f > a
1687 $ echo f > a
1688 $ hg ci -Am'a' -d '0 0'
1688 $ hg ci -Am'a' -d '0 0'
1689 adding a
1689 adding a
1690 $ echo f >> a
1690 $ echo f >> a
1691 $ hg ci -Am'a bis' -d '1 0'
1691 $ hg ci -Am'a bis' -d '1 0'
1692
1692
1693 $ hg log -r0 a
1693 $ hg log -r0 a
1694 changeset: 0:9f758d63dcde
1694 changeset: 0:9f758d63dcde
1695 user: test
1695 user: test
1696 date: Thu Jan 01 00:00:00 1970 +0000
1696 date: Thu Jan 01 00:00:00 1970 +0000
1697 summary: a
1697 summary: a
1698
1698
1699 enable obsolete to test hidden feature
1699 enable obsolete to test hidden feature
1700
1700
1701 $ cat >> $HGRCPATH << EOF
1701 $ cat >> $HGRCPATH << EOF
1702 > [experimental]
1702 > [experimental]
1703 > evolution=createmarkers
1703 > evolution=createmarkers
1704 > EOF
1704 > EOF
1705
1705
1706 $ hg log --template='{rev}:{node}\n'
1706 $ hg log --template='{rev}:{node}\n'
1707 1:a765632148dc55d38c35c4f247c618701886cb2f
1707 1:a765632148dc55d38c35c4f247c618701886cb2f
1708 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1708 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1709 $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f
1709 $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f
1710 obsoleted 1 changesets
1710 obsoleted 1 changesets
1711 $ hg up null -q
1711 $ hg up null -q
1712 $ hg log --template='{rev}:{node}\n'
1712 $ hg log --template='{rev}:{node}\n'
1713 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1713 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1714 $ hg log --template='{rev}:{node}\n' --hidden
1714 $ hg log --template='{rev}:{node}\n' --hidden
1715 1:a765632148dc55d38c35c4f247c618701886cb2f
1715 1:a765632148dc55d38c35c4f247c618701886cb2f
1716 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1716 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1717 $ hg log -r a
1717 $ hg log -r a
1718 abort: hidden revision 'a'!
1718 abort: hidden revision 'a'!
1719 (use --hidden to access hidden revisions)
1719 (use --hidden to access hidden revisions)
1720 [255]
1720 [255]
1721
1721
1722 test that parent prevent a changeset to be hidden
1722 test that parent prevent a changeset to be hidden
1723
1723
1724 $ hg up 1 -q --hidden
1724 $ hg up 1 -q --hidden
1725 $ hg log --template='{rev}:{node}\n'
1725 $ hg log --template='{rev}:{node}\n'
1726 1:a765632148dc55d38c35c4f247c618701886cb2f
1726 1:a765632148dc55d38c35c4f247c618701886cb2f
1727 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1727 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1728
1728
1729 test that second parent prevent a changeset to be hidden too
1729 test that second parent prevent a changeset to be hidden too
1730
1730
1731 $ hg debugsetparents 0 1 # nothing suitable to merge here
1731 $ hg debugsetparents 0 1 # nothing suitable to merge here
1732 $ hg log --template='{rev}:{node}\n'
1732 $ hg log --template='{rev}:{node}\n'
1733 1:a765632148dc55d38c35c4f247c618701886cb2f
1733 1:a765632148dc55d38c35c4f247c618701886cb2f
1734 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1734 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1735 $ hg debugsetparents 1
1735 $ hg debugsetparents 1
1736 $ hg up -q null
1736 $ hg up -q null
1737
1737
1738 bookmarks prevent a changeset being hidden
1738 bookmarks prevent a changeset being hidden
1739
1739
1740 $ hg bookmark --hidden -r 1 X
1740 $ hg bookmark --hidden -r 1 X
1741 $ hg log --template '{rev}:{node}\n'
1741 $ hg log --template '{rev}:{node}\n'
1742 1:a765632148dc55d38c35c4f247c618701886cb2f
1742 1:a765632148dc55d38c35c4f247c618701886cb2f
1743 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1743 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1744 $ hg bookmark -d X
1744 $ hg bookmark -d X
1745
1745
1746 divergent bookmarks are not hidden
1746 divergent bookmarks are not hidden
1747
1747
1748 $ hg bookmark --hidden -r 1 X@foo
1748 $ hg bookmark --hidden -r 1 X@foo
1749 $ hg log --template '{rev}:{node}\n'
1749 $ hg log --template '{rev}:{node}\n'
1750 1:a765632148dc55d38c35c4f247c618701886cb2f
1750 1:a765632148dc55d38c35c4f247c618701886cb2f
1751 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1751 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1752
1752
1753 test hidden revision 0 (issue5385)
1753 test hidden revision 0 (issue5385)
1754
1754
1755 $ hg bookmark -d X@foo
1755 $ hg bookmark -d X@foo
1756 $ hg up null -q
1756 $ hg up null -q
1757 $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1757 $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1758 obsoleted 1 changesets
1758 obsoleted 1 changesets
1759 $ echo f > b
1759 $ echo f > b
1760 $ hg ci -Am'b' -d '2 0'
1760 $ hg ci -Am'b' -d '2 0'
1761 adding b
1761 adding b
1762 $ echo f >> b
1762 $ echo f >> b
1763 $ hg ci -m'b bis' -d '3 0'
1763 $ hg ci -m'b bis' -d '3 0'
1764 $ hg log -T'{rev}:{node}\n'
1764 $ hg log -T'{rev}:{node}\n'
1765 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1765 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1766 2:94375ec45bddd2a824535fc04855bd058c926ec0
1766 2:94375ec45bddd2a824535fc04855bd058c926ec0
1767
1767
1768 $ hg log -T'{rev}:{node}\n' -r:
1768 $ hg log -T'{rev}:{node}\n' -r:
1769 2:94375ec45bddd2a824535fc04855bd058c926ec0
1769 2:94375ec45bddd2a824535fc04855bd058c926ec0
1770 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1770 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1771 $ hg log -T'{rev}:{node}\n' -r:tip
1771 $ hg log -T'{rev}:{node}\n' -r:tip
1772 2:94375ec45bddd2a824535fc04855bd058c926ec0
1772 2:94375ec45bddd2a824535fc04855bd058c926ec0
1773 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1773 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1774 $ hg log -T'{rev}:{node}\n' -r:0
1774 $ hg log -T'{rev}:{node}\n' -r:0
1775 abort: hidden revision '0'!
1775 abort: hidden revision '0'!
1776 (use --hidden to access hidden revisions)
1776 (use --hidden to access hidden revisions)
1777 [255]
1777 [255]
1778 $ hg log -T'{rev}:{node}\n' -f
1778 $ hg log -T'{rev}:{node}\n' -f
1779 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1779 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e
1780 2:94375ec45bddd2a824535fc04855bd058c926ec0
1780 2:94375ec45bddd2a824535fc04855bd058c926ec0
1781
1781
1782 clear extensions configuration
1782 clear extensions configuration
1783 $ echo '[extensions]' >> $HGRCPATH
1783 $ echo '[extensions]' >> $HGRCPATH
1784 $ echo "obs=!" >> $HGRCPATH
1784 $ echo "obs=!" >> $HGRCPATH
1785 $ cd ..
1785 $ cd ..
1786
1786
1787 test -u/-k for problematic encoding
1787 test -u/-k for problematic encoding
1788 # unicode: cp932:
1788 # unicode: cp932:
1789 # u30A2 0x83 0x41(= 'A')
1789 # u30A2 0x83 0x41(= 'A')
1790 # u30C2 0x83 0x61(= 'a')
1790 # u30C2 0x83 0x61(= 'a')
1791
1791
1792 $ hg init problematicencoding
1792 $ hg init problematicencoding
1793 $ cd problematicencoding
1793 $ cd problematicencoding
1794
1794
1795 $ $PYTHON > setup.sh <<EOF
1795 $ $PYTHON > setup.sh <<EOF
1796 > print u'''
1796 > print(u'''
1797 > echo a > text
1797 > echo a > text
1798 > hg add text
1798 > hg add text
1799 > hg --encoding utf-8 commit -u '\u30A2' -m none
1799 > hg --encoding utf-8 commit -u '\u30A2' -m none
1800 > echo b > text
1800 > echo b > text
1801 > hg --encoding utf-8 commit -u '\u30C2' -m none
1801 > hg --encoding utf-8 commit -u '\u30C2' -m none
1802 > echo c > text
1802 > echo c > text
1803 > hg --encoding utf-8 commit -u none -m '\u30A2'
1803 > hg --encoding utf-8 commit -u none -m '\u30A2'
1804 > echo d > text
1804 > echo d > text
1805 > hg --encoding utf-8 commit -u none -m '\u30C2'
1805 > hg --encoding utf-8 commit -u none -m '\u30C2'
1806 > '''.encode('utf-8')
1806 > '''.encode('utf-8'))
1807 > EOF
1807 > EOF
1808 $ sh < setup.sh
1808 $ sh < setup.sh
1809
1809
1810 test in problematic encoding
1810 test in problematic encoding
1811 $ $PYTHON > test.sh <<EOF
1811 $ $PYTHON > test.sh <<EOF
1812 > print u'''
1812 > print(u'''
1813 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
1813 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
1814 > echo ====
1814 > echo ====
1815 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2'
1815 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2'
1816 > echo ====
1816 > echo ====
1817 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2'
1817 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2'
1818 > echo ====
1818 > echo ====
1819 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2'
1819 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2'
1820 > '''.encode('cp932')
1820 > '''.encode('cp932'))
1821 > EOF
1821 > EOF
1822 $ sh < test.sh
1822 $ sh < test.sh
1823 0
1823 0
1824 ====
1824 ====
1825 1
1825 1
1826 ====
1826 ====
1827 2
1827 2
1828 0
1828 0
1829 ====
1829 ====
1830 3
1830 3
1831 1
1831 1
1832
1832
1833 $ cd ..
1833 $ cd ..
1834
1834
1835 test hg log on non-existent files and on directories
1835 test hg log on non-existent files and on directories
1836 $ hg init issue1340
1836 $ hg init issue1340
1837 $ cd issue1340
1837 $ cd issue1340
1838 $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6
1838 $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6
1839 $ echo 1 > d1/f1
1839 $ echo 1 > d1/f1
1840 $ echo 1 > D2/f1
1840 $ echo 1 > D2/f1
1841 $ echo 1 > D3.i/f1
1841 $ echo 1 > D3.i/f1
1842 $ echo 1 > d4.hg/f1
1842 $ echo 1 > d4.hg/f1
1843 $ echo 1 > d5.d/f1
1843 $ echo 1 > d5.d/f1
1844 $ echo 1 > .d6/f1
1844 $ echo 1 > .d6/f1
1845 $ hg -q add .
1845 $ hg -q add .
1846 $ hg commit -m "a bunch of weird directories"
1846 $ hg commit -m "a bunch of weird directories"
1847 $ hg log -l1 d1/f1 | grep changeset
1847 $ hg log -l1 d1/f1 | grep changeset
1848 changeset: 0:65624cd9070a
1848 changeset: 0:65624cd9070a
1849 $ hg log -l1 f1
1849 $ hg log -l1 f1
1850 $ hg log -l1 . | grep changeset
1850 $ hg log -l1 . | grep changeset
1851 changeset: 0:65624cd9070a
1851 changeset: 0:65624cd9070a
1852 $ hg log -l1 ./ | grep changeset
1852 $ hg log -l1 ./ | grep changeset
1853 changeset: 0:65624cd9070a
1853 changeset: 0:65624cd9070a
1854 $ hg log -l1 d1 | grep changeset
1854 $ hg log -l1 d1 | grep changeset
1855 changeset: 0:65624cd9070a
1855 changeset: 0:65624cd9070a
1856 $ hg log -l1 D2 | grep changeset
1856 $ hg log -l1 D2 | grep changeset
1857 changeset: 0:65624cd9070a
1857 changeset: 0:65624cd9070a
1858 $ hg log -l1 D2/f1 | grep changeset
1858 $ hg log -l1 D2/f1 | grep changeset
1859 changeset: 0:65624cd9070a
1859 changeset: 0:65624cd9070a
1860 $ hg log -l1 D3.i | grep changeset
1860 $ hg log -l1 D3.i | grep changeset
1861 changeset: 0:65624cd9070a
1861 changeset: 0:65624cd9070a
1862 $ hg log -l1 D3.i/f1 | grep changeset
1862 $ hg log -l1 D3.i/f1 | grep changeset
1863 changeset: 0:65624cd9070a
1863 changeset: 0:65624cd9070a
1864 $ hg log -l1 d4.hg | grep changeset
1864 $ hg log -l1 d4.hg | grep changeset
1865 changeset: 0:65624cd9070a
1865 changeset: 0:65624cd9070a
1866 $ hg log -l1 d4.hg/f1 | grep changeset
1866 $ hg log -l1 d4.hg/f1 | grep changeset
1867 changeset: 0:65624cd9070a
1867 changeset: 0:65624cd9070a
1868 $ hg log -l1 d5.d | grep changeset
1868 $ hg log -l1 d5.d | grep changeset
1869 changeset: 0:65624cd9070a
1869 changeset: 0:65624cd9070a
1870 $ hg log -l1 d5.d/f1 | grep changeset
1870 $ hg log -l1 d5.d/f1 | grep changeset
1871 changeset: 0:65624cd9070a
1871 changeset: 0:65624cd9070a
1872 $ hg log -l1 .d6 | grep changeset
1872 $ hg log -l1 .d6 | grep changeset
1873 changeset: 0:65624cd9070a
1873 changeset: 0:65624cd9070a
1874 $ hg log -l1 .d6/f1 | grep changeset
1874 $ hg log -l1 .d6/f1 | grep changeset
1875 changeset: 0:65624cd9070a
1875 changeset: 0:65624cd9070a
1876
1876
1877 issue3772: hg log -r :null showing revision 0 as well
1877 issue3772: hg log -r :null showing revision 0 as well
1878
1878
1879 $ hg log -r :null
1879 $ hg log -r :null
1880 changeset: 0:65624cd9070a
1880 changeset: 0:65624cd9070a
1881 tag: tip
1881 tag: tip
1882 user: test
1882 user: test
1883 date: Thu Jan 01 00:00:00 1970 +0000
1883 date: Thu Jan 01 00:00:00 1970 +0000
1884 summary: a bunch of weird directories
1884 summary: a bunch of weird directories
1885
1885
1886 changeset: -1:000000000000
1886 changeset: -1:000000000000
1887 user:
1887 user:
1888 date: Thu Jan 01 00:00:00 1970 +0000
1888 date: Thu Jan 01 00:00:00 1970 +0000
1889
1889
1890 $ hg log -r null:null
1890 $ hg log -r null:null
1891 changeset: -1:000000000000
1891 changeset: -1:000000000000
1892 user:
1892 user:
1893 date: Thu Jan 01 00:00:00 1970 +0000
1893 date: Thu Jan 01 00:00:00 1970 +0000
1894
1894
1895 working-directory revision requires special treatment
1895 working-directory revision requires special treatment
1896
1896
1897 clean:
1897 clean:
1898
1898
1899 $ hg log -r 'wdir()' --debug
1899 $ hg log -r 'wdir()' --debug
1900 changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff
1900 changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff
1901 phase: draft
1901 phase: draft
1902 parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08
1902 parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08
1903 parent: -1:0000000000000000000000000000000000000000
1903 parent: -1:0000000000000000000000000000000000000000
1904 user: test
1904 user: test
1905 date: [A-Za-z0-9:+ ]+ (re)
1905 date: [A-Za-z0-9:+ ]+ (re)
1906 extra: branch=default
1906 extra: branch=default
1907
1907
1908 $ hg log -r 'wdir()' -p --stat
1908 $ hg log -r 'wdir()' -p --stat
1909 changeset: 2147483647:ffffffffffff
1909 changeset: 2147483647:ffffffffffff
1910 parent: 0:65624cd9070a
1910 parent: 0:65624cd9070a
1911 user: test
1911 user: test
1912 date: [A-Za-z0-9:+ ]+ (re)
1912 date: [A-Za-z0-9:+ ]+ (re)
1913
1913
1914
1914
1915
1915
1916
1916
1917 dirty:
1917 dirty:
1918
1918
1919 $ echo 2 >> d1/f1
1919 $ echo 2 >> d1/f1
1920 $ echo 2 > d1/f2
1920 $ echo 2 > d1/f2
1921 $ hg add d1/f2
1921 $ hg add d1/f2
1922 $ hg remove .d6/f1
1922 $ hg remove .d6/f1
1923 $ hg status
1923 $ hg status
1924 M d1/f1
1924 M d1/f1
1925 A d1/f2
1925 A d1/f2
1926 R .d6/f1
1926 R .d6/f1
1927
1927
1928 $ hg log -r 'wdir()'
1928 $ hg log -r 'wdir()'
1929 changeset: 2147483647:ffffffffffff
1929 changeset: 2147483647:ffffffffffff
1930 parent: 0:65624cd9070a
1930 parent: 0:65624cd9070a
1931 user: test
1931 user: test
1932 date: [A-Za-z0-9:+ ]+ (re)
1932 date: [A-Za-z0-9:+ ]+ (re)
1933
1933
1934 $ hg log -r 'wdir()' -q
1934 $ hg log -r 'wdir()' -q
1935 2147483647:ffffffffffff
1935 2147483647:ffffffffffff
1936
1936
1937 $ hg log -r 'wdir()' --debug
1937 $ hg log -r 'wdir()' --debug
1938 changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff
1938 changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff
1939 phase: draft
1939 phase: draft
1940 parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08
1940 parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08
1941 parent: -1:0000000000000000000000000000000000000000
1941 parent: -1:0000000000000000000000000000000000000000
1942 user: test
1942 user: test
1943 date: [A-Za-z0-9:+ ]+ (re)
1943 date: [A-Za-z0-9:+ ]+ (re)
1944 files: d1/f1
1944 files: d1/f1
1945 files+: d1/f2
1945 files+: d1/f2
1946 files-: .d6/f1
1946 files-: .d6/f1
1947 extra: branch=default
1947 extra: branch=default
1948
1948
1949 $ hg log -r 'wdir()' -p --stat --git
1949 $ hg log -r 'wdir()' -p --stat --git
1950 changeset: 2147483647:ffffffffffff
1950 changeset: 2147483647:ffffffffffff
1951 parent: 0:65624cd9070a
1951 parent: 0:65624cd9070a
1952 user: test
1952 user: test
1953 date: [A-Za-z0-9:+ ]+ (re)
1953 date: [A-Za-z0-9:+ ]+ (re)
1954
1954
1955 .d6/f1 | 1 -
1955 .d6/f1 | 1 -
1956 d1/f1 | 1 +
1956 d1/f1 | 1 +
1957 d1/f2 | 1 +
1957 d1/f2 | 1 +
1958 3 files changed, 2 insertions(+), 1 deletions(-)
1958 3 files changed, 2 insertions(+), 1 deletions(-)
1959
1959
1960 diff --git a/.d6/f1 b/.d6/f1
1960 diff --git a/.d6/f1 b/.d6/f1
1961 deleted file mode 100644
1961 deleted file mode 100644
1962 --- a/.d6/f1
1962 --- a/.d6/f1
1963 +++ /dev/null
1963 +++ /dev/null
1964 @@ -1,1 +0,0 @@
1964 @@ -1,1 +0,0 @@
1965 -1
1965 -1
1966 diff --git a/d1/f1 b/d1/f1
1966 diff --git a/d1/f1 b/d1/f1
1967 --- a/d1/f1
1967 --- a/d1/f1
1968 +++ b/d1/f1
1968 +++ b/d1/f1
1969 @@ -1,1 +1,2 @@
1969 @@ -1,1 +1,2 @@
1970 1
1970 1
1971 +2
1971 +2
1972 diff --git a/d1/f2 b/d1/f2
1972 diff --git a/d1/f2 b/d1/f2
1973 new file mode 100644
1973 new file mode 100644
1974 --- /dev/null
1974 --- /dev/null
1975 +++ b/d1/f2
1975 +++ b/d1/f2
1976 @@ -0,0 +1,1 @@
1976 @@ -0,0 +1,1 @@
1977 +2
1977 +2
1978
1978
1979 $ hg log -r 'wdir()' -Tjson
1979 $ hg log -r 'wdir()' -Tjson
1980 [
1980 [
1981 {
1981 {
1982 "rev": null,
1982 "rev": null,
1983 "node": null,
1983 "node": null,
1984 "branch": "default",
1984 "branch": "default",
1985 "phase": "draft",
1985 "phase": "draft",
1986 "user": "test",
1986 "user": "test",
1987 "date": [*, 0], (glob)
1987 "date": [*, 0], (glob)
1988 "desc": "",
1988 "desc": "",
1989 "bookmarks": [],
1989 "bookmarks": [],
1990 "tags": [],
1990 "tags": [],
1991 "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"]
1991 "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"]
1992 }
1992 }
1993 ]
1993 ]
1994
1994
1995 $ hg log -r 'wdir()' -Tjson -q
1995 $ hg log -r 'wdir()' -Tjson -q
1996 [
1996 [
1997 {
1997 {
1998 "rev": null,
1998 "rev": null,
1999 "node": null
1999 "node": null
2000 }
2000 }
2001 ]
2001 ]
2002
2002
2003 $ hg log -r 'wdir()' -Tjson --debug
2003 $ hg log -r 'wdir()' -Tjson --debug
2004 [
2004 [
2005 {
2005 {
2006 "rev": null,
2006 "rev": null,
2007 "node": null,
2007 "node": null,
2008 "branch": "default",
2008 "branch": "default",
2009 "phase": "draft",
2009 "phase": "draft",
2010 "user": "test",
2010 "user": "test",
2011 "date": [*, 0], (glob)
2011 "date": [*, 0], (glob)
2012 "desc": "",
2012 "desc": "",
2013 "bookmarks": [],
2013 "bookmarks": [],
2014 "tags": [],
2014 "tags": [],
2015 "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"],
2015 "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"],
2016 "manifest": null,
2016 "manifest": null,
2017 "extra": {"branch": "default"},
2017 "extra": {"branch": "default"},
2018 "modified": ["d1/f1"],
2018 "modified": ["d1/f1"],
2019 "added": ["d1/f2"],
2019 "added": ["d1/f2"],
2020 "removed": [".d6/f1"]
2020 "removed": [".d6/f1"]
2021 }
2021 }
2022 ]
2022 ]
2023
2023
2024 $ hg revert -aqC
2024 $ hg revert -aqC
2025
2025
2026 Check that adding an arbitrary name shows up in log automatically
2026 Check that adding an arbitrary name shows up in log automatically
2027
2027
2028 $ cat > ../names.py <<EOF
2028 $ cat > ../names.py <<EOF
2029 > """A small extension to test adding arbitrary names to a repo"""
2029 > """A small extension to test adding arbitrary names to a repo"""
2030 > from mercurial.namespaces import namespace
2030 > from mercurial.namespaces import namespace
2031 >
2031 >
2032 > def reposetup(ui, repo):
2032 > def reposetup(ui, repo):
2033 > foo = {'foo': repo[0].node()}
2033 > foo = {'foo': repo[0].node()}
2034 > names = lambda r: foo.keys()
2034 > names = lambda r: foo.keys()
2035 > namemap = lambda r, name: foo.get(name)
2035 > namemap = lambda r, name: foo.get(name)
2036 > nodemap = lambda r, node: [name for name, n in foo.iteritems()
2036 > nodemap = lambda r, node: [name for name, n in foo.iteritems()
2037 > if n == node]
2037 > if n == node]
2038 > ns = namespace("bars", templatename="bar", logname="barlog",
2038 > ns = namespace("bars", templatename="bar", logname="barlog",
2039 > colorname="barcolor", listnames=names, namemap=namemap,
2039 > colorname="barcolor", listnames=names, namemap=namemap,
2040 > nodemap=nodemap)
2040 > nodemap=nodemap)
2041 >
2041 >
2042 > repo.names.addnamespace(ns)
2042 > repo.names.addnamespace(ns)
2043 > EOF
2043 > EOF
2044
2044
2045 $ hg --config extensions.names=../names.py log -r 0
2045 $ hg --config extensions.names=../names.py log -r 0
2046 changeset: 0:65624cd9070a
2046 changeset: 0:65624cd9070a
2047 tag: tip
2047 tag: tip
2048 barlog: foo
2048 barlog: foo
2049 user: test
2049 user: test
2050 date: Thu Jan 01 00:00:00 1970 +0000
2050 date: Thu Jan 01 00:00:00 1970 +0000
2051 summary: a bunch of weird directories
2051 summary: a bunch of weird directories
2052
2052
2053 $ hg --config extensions.names=../names.py \
2053 $ hg --config extensions.names=../names.py \
2054 > --config extensions.color= --config color.log.barcolor=red \
2054 > --config extensions.color= --config color.log.barcolor=red \
2055 > --color=always log -r 0
2055 > --color=always log -r 0
2056 \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc)
2056 \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc)
2057 tag: tip
2057 tag: tip
2058 \x1b[0;31mbarlog: foo\x1b[0m (esc)
2058 \x1b[0;31mbarlog: foo\x1b[0m (esc)
2059 user: test
2059 user: test
2060 date: Thu Jan 01 00:00:00 1970 +0000
2060 date: Thu Jan 01 00:00:00 1970 +0000
2061 summary: a bunch of weird directories
2061 summary: a bunch of weird directories
2062
2062
2063 $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n'
2063 $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n'
2064 foo
2064 foo
2065
2065
2066 $ cd ..
2066 $ cd ..
2067
2067
2068 hg log -f dir across branches
2068 hg log -f dir across branches
2069
2069
2070 $ hg init acrossbranches
2070 $ hg init acrossbranches
2071 $ cd acrossbranches
2071 $ cd acrossbranches
2072 $ mkdir d
2072 $ mkdir d
2073 $ echo a > d/a && hg ci -Aqm a
2073 $ echo a > d/a && hg ci -Aqm a
2074 $ echo b > d/a && hg ci -Aqm b
2074 $ echo b > d/a && hg ci -Aqm b
2075 $ hg up -q 0
2075 $ hg up -q 0
2076 $ echo b > d/a && hg ci -Aqm c
2076 $ echo b > d/a && hg ci -Aqm c
2077 $ hg log -f d -T '{desc}' -G
2077 $ hg log -f d -T '{desc}' -G
2078 @ c
2078 @ c
2079 |
2079 |
2080 o a
2080 o a
2081
2081
2082 Ensure that largefiles doesn't interfere with following a normal file
2082 Ensure that largefiles doesn't interfere with following a normal file
2083 $ hg --config extensions.largefiles= log -f d -T '{desc}' -G
2083 $ hg --config extensions.largefiles= log -f d -T '{desc}' -G
2084 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
2084 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
2085 @ c
2085 @ c
2086 |
2086 |
2087 o a
2087 o a
2088
2088
2089 $ hg log -f d/a -T '{desc}' -G
2089 $ hg log -f d/a -T '{desc}' -G
2090 @ c
2090 @ c
2091 |
2091 |
2092 o a
2092 o a
2093
2093
2094 $ cd ..
2094 $ cd ..
2095
2095
2096 hg log -f with linkrev pointing to another branch
2096 hg log -f with linkrev pointing to another branch
2097 -------------------------------------------------
2097 -------------------------------------------------
2098
2098
2099 create history with a filerev whose linkrev points to another branch
2099 create history with a filerev whose linkrev points to another branch
2100
2100
2101 $ hg init branchedlinkrev
2101 $ hg init branchedlinkrev
2102 $ cd branchedlinkrev
2102 $ cd branchedlinkrev
2103 $ echo 1 > a
2103 $ echo 1 > a
2104 $ hg commit -Am 'content1'
2104 $ hg commit -Am 'content1'
2105 adding a
2105 adding a
2106 $ echo 2 > a
2106 $ echo 2 > a
2107 $ hg commit -m 'content2'
2107 $ hg commit -m 'content2'
2108 $ hg up --rev 'desc(content1)'
2108 $ hg up --rev 'desc(content1)'
2109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2110 $ echo unrelated > unrelated
2110 $ echo unrelated > unrelated
2111 $ hg commit -Am 'unrelated'
2111 $ hg commit -Am 'unrelated'
2112 adding unrelated
2112 adding unrelated
2113 created new head
2113 created new head
2114 $ hg graft -r 'desc(content2)'
2114 $ hg graft -r 'desc(content2)'
2115 grafting 1:2294ae80ad84 "content2"
2115 grafting 1:2294ae80ad84 "content2"
2116 $ echo 3 > a
2116 $ echo 3 > a
2117 $ hg commit -m 'content3'
2117 $ hg commit -m 'content3'
2118 $ hg log -G
2118 $ hg log -G
2119 @ changeset: 4:50b9b36e9c5d
2119 @ changeset: 4:50b9b36e9c5d
2120 | tag: tip
2120 | tag: tip
2121 | user: test
2121 | user: test
2122 | date: Thu Jan 01 00:00:00 1970 +0000
2122 | date: Thu Jan 01 00:00:00 1970 +0000
2123 | summary: content3
2123 | summary: content3
2124 |
2124 |
2125 o changeset: 3:15b2327059e5
2125 o changeset: 3:15b2327059e5
2126 | user: test
2126 | user: test
2127 | date: Thu Jan 01 00:00:00 1970 +0000
2127 | date: Thu Jan 01 00:00:00 1970 +0000
2128 | summary: content2
2128 | summary: content2
2129 |
2129 |
2130 o changeset: 2:2029acd1168c
2130 o changeset: 2:2029acd1168c
2131 | parent: 0:ae0a3c9f9e95
2131 | parent: 0:ae0a3c9f9e95
2132 | user: test
2132 | user: test
2133 | date: Thu Jan 01 00:00:00 1970 +0000
2133 | date: Thu Jan 01 00:00:00 1970 +0000
2134 | summary: unrelated
2134 | summary: unrelated
2135 |
2135 |
2136 | o changeset: 1:2294ae80ad84
2136 | o changeset: 1:2294ae80ad84
2137 |/ user: test
2137 |/ user: test
2138 | date: Thu Jan 01 00:00:00 1970 +0000
2138 | date: Thu Jan 01 00:00:00 1970 +0000
2139 | summary: content2
2139 | summary: content2
2140 |
2140 |
2141 o changeset: 0:ae0a3c9f9e95
2141 o changeset: 0:ae0a3c9f9e95
2142 user: test
2142 user: test
2143 date: Thu Jan 01 00:00:00 1970 +0000
2143 date: Thu Jan 01 00:00:00 1970 +0000
2144 summary: content1
2144 summary: content1
2145
2145
2146
2146
2147 log -f on the file should list the graft result.
2147 log -f on the file should list the graft result.
2148
2148
2149 $ hg log -Gf a
2149 $ hg log -Gf a
2150 @ changeset: 4:50b9b36e9c5d
2150 @ changeset: 4:50b9b36e9c5d
2151 | tag: tip
2151 | tag: tip
2152 | user: test
2152 | user: test
2153 | date: Thu Jan 01 00:00:00 1970 +0000
2153 | date: Thu Jan 01 00:00:00 1970 +0000
2154 | summary: content3
2154 | summary: content3
2155 |
2155 |
2156 o changeset: 3:15b2327059e5
2156 o changeset: 3:15b2327059e5
2157 : user: test
2157 : user: test
2158 : date: Thu Jan 01 00:00:00 1970 +0000
2158 : date: Thu Jan 01 00:00:00 1970 +0000
2159 : summary: content2
2159 : summary: content2
2160 :
2160 :
2161 o changeset: 0:ae0a3c9f9e95
2161 o changeset: 0:ae0a3c9f9e95
2162 user: test
2162 user: test
2163 date: Thu Jan 01 00:00:00 1970 +0000
2163 date: Thu Jan 01 00:00:00 1970 +0000
2164 summary: content1
2164 summary: content1
2165
2165
2166
2166
2167 plain log lists the original version
2167 plain log lists the original version
2168 (XXX we should probably list both)
2168 (XXX we should probably list both)
2169
2169
2170 $ hg log -G a
2170 $ hg log -G a
2171 @ changeset: 4:50b9b36e9c5d
2171 @ changeset: 4:50b9b36e9c5d
2172 : tag: tip
2172 : tag: tip
2173 : user: test
2173 : user: test
2174 : date: Thu Jan 01 00:00:00 1970 +0000
2174 : date: Thu Jan 01 00:00:00 1970 +0000
2175 : summary: content3
2175 : summary: content3
2176 :
2176 :
2177 : o changeset: 1:2294ae80ad84
2177 : o changeset: 1:2294ae80ad84
2178 :/ user: test
2178 :/ user: test
2179 : date: Thu Jan 01 00:00:00 1970 +0000
2179 : date: Thu Jan 01 00:00:00 1970 +0000
2180 : summary: content2
2180 : summary: content2
2181 :
2181 :
2182 o changeset: 0:ae0a3c9f9e95
2182 o changeset: 0:ae0a3c9f9e95
2183 user: test
2183 user: test
2184 date: Thu Jan 01 00:00:00 1970 +0000
2184 date: Thu Jan 01 00:00:00 1970 +0000
2185 summary: content1
2185 summary: content1
2186
2186
2187
2187
2188 hg log -f from the grafted changeset
2188 hg log -f from the grafted changeset
2189 (The bootstrap should properly take the topology in account)
2189 (The bootstrap should properly take the topology in account)
2190
2190
2191 $ hg up 'desc(content3)^'
2191 $ hg up 'desc(content3)^'
2192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2193 $ hg log -Gf a
2193 $ hg log -Gf a
2194 @ changeset: 3:15b2327059e5
2194 @ changeset: 3:15b2327059e5
2195 : user: test
2195 : user: test
2196 : date: Thu Jan 01 00:00:00 1970 +0000
2196 : date: Thu Jan 01 00:00:00 1970 +0000
2197 : summary: content2
2197 : summary: content2
2198 :
2198 :
2199 o changeset: 0:ae0a3c9f9e95
2199 o changeset: 0:ae0a3c9f9e95
2200 user: test
2200 user: test
2201 date: Thu Jan 01 00:00:00 1970 +0000
2201 date: Thu Jan 01 00:00:00 1970 +0000
2202 summary: content1
2202 summary: content1
2203
2203
2204
2204
2205 Test that we use the first non-hidden changeset in that case.
2205 Test that we use the first non-hidden changeset in that case.
2206
2206
2207 (hide the changeset)
2207 (hide the changeset)
2208
2208
2209 $ hg log -T '{node}\n' -r 1
2209 $ hg log -T '{node}\n' -r 1
2210 2294ae80ad8447bc78383182eeac50cb049df623
2210 2294ae80ad8447bc78383182eeac50cb049df623
2211 $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623
2211 $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623
2212 obsoleted 1 changesets
2212 obsoleted 1 changesets
2213 $ hg log -G
2213 $ hg log -G
2214 o changeset: 4:50b9b36e9c5d
2214 o changeset: 4:50b9b36e9c5d
2215 | tag: tip
2215 | tag: tip
2216 | user: test
2216 | user: test
2217 | date: Thu Jan 01 00:00:00 1970 +0000
2217 | date: Thu Jan 01 00:00:00 1970 +0000
2218 | summary: content3
2218 | summary: content3
2219 |
2219 |
2220 @ changeset: 3:15b2327059e5
2220 @ changeset: 3:15b2327059e5
2221 | user: test
2221 | user: test
2222 | date: Thu Jan 01 00:00:00 1970 +0000
2222 | date: Thu Jan 01 00:00:00 1970 +0000
2223 | summary: content2
2223 | summary: content2
2224 |
2224 |
2225 o changeset: 2:2029acd1168c
2225 o changeset: 2:2029acd1168c
2226 | parent: 0:ae0a3c9f9e95
2226 | parent: 0:ae0a3c9f9e95
2227 | user: test
2227 | user: test
2228 | date: Thu Jan 01 00:00:00 1970 +0000
2228 | date: Thu Jan 01 00:00:00 1970 +0000
2229 | summary: unrelated
2229 | summary: unrelated
2230 |
2230 |
2231 o changeset: 0:ae0a3c9f9e95
2231 o changeset: 0:ae0a3c9f9e95
2232 user: test
2232 user: test
2233 date: Thu Jan 01 00:00:00 1970 +0000
2233 date: Thu Jan 01 00:00:00 1970 +0000
2234 summary: content1
2234 summary: content1
2235
2235
2236
2236
2237 Check that log on the file does not drop the file revision.
2237 Check that log on the file does not drop the file revision.
2238
2238
2239 $ hg log -G a
2239 $ hg log -G a
2240 o changeset: 4:50b9b36e9c5d
2240 o changeset: 4:50b9b36e9c5d
2241 | tag: tip
2241 | tag: tip
2242 | user: test
2242 | user: test
2243 | date: Thu Jan 01 00:00:00 1970 +0000
2243 | date: Thu Jan 01 00:00:00 1970 +0000
2244 | summary: content3
2244 | summary: content3
2245 |
2245 |
2246 @ changeset: 3:15b2327059e5
2246 @ changeset: 3:15b2327059e5
2247 : user: test
2247 : user: test
2248 : date: Thu Jan 01 00:00:00 1970 +0000
2248 : date: Thu Jan 01 00:00:00 1970 +0000
2249 : summary: content2
2249 : summary: content2
2250 :
2250 :
2251 o changeset: 0:ae0a3c9f9e95
2251 o changeset: 0:ae0a3c9f9e95
2252 user: test
2252 user: test
2253 date: Thu Jan 01 00:00:00 1970 +0000
2253 date: Thu Jan 01 00:00:00 1970 +0000
2254 summary: content1
2254 summary: content1
2255
2255
2256
2256
2257 Even when a head revision is linkrev-shadowed.
2257 Even when a head revision is linkrev-shadowed.
2258
2258
2259 $ hg log -T '{node}\n' -r 4
2259 $ hg log -T '{node}\n' -r 4
2260 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2
2260 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2
2261 $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2
2261 $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2
2262 obsoleted 1 changesets
2262 obsoleted 1 changesets
2263 $ hg log -G a
2263 $ hg log -G a
2264 @ changeset: 3:15b2327059e5
2264 @ changeset: 3:15b2327059e5
2265 : tag: tip
2265 : tag: tip
2266 : user: test
2266 : user: test
2267 : date: Thu Jan 01 00:00:00 1970 +0000
2267 : date: Thu Jan 01 00:00:00 1970 +0000
2268 : summary: content2
2268 : summary: content2
2269 :
2269 :
2270 o changeset: 0:ae0a3c9f9e95
2270 o changeset: 0:ae0a3c9f9e95
2271 user: test
2271 user: test
2272 date: Thu Jan 01 00:00:00 1970 +0000
2272 date: Thu Jan 01 00:00:00 1970 +0000
2273 summary: content1
2273 summary: content1
2274
2274
2275
2275
2276 $ cd ..
2276 $ cd ..
2277
2277
2278 Even when the file revision is missing from some head:
2278 Even when the file revision is missing from some head:
2279
2279
2280 $ hg init issue4490
2280 $ hg init issue4490
2281 $ cd issue4490
2281 $ cd issue4490
2282 $ echo '[experimental]' >> .hg/hgrc
2282 $ echo '[experimental]' >> .hg/hgrc
2283 $ echo 'evolution=createmarkers' >> .hg/hgrc
2283 $ echo 'evolution=createmarkers' >> .hg/hgrc
2284 $ echo a > a
2284 $ echo a > a
2285 $ hg ci -Am0
2285 $ hg ci -Am0
2286 adding a
2286 adding a
2287 $ echo b > b
2287 $ echo b > b
2288 $ hg ci -Am1
2288 $ hg ci -Am1
2289 adding b
2289 adding b
2290 $ echo B > b
2290 $ echo B > b
2291 $ hg ci --amend -m 1
2291 $ hg ci --amend -m 1
2292 $ hg up 0
2292 $ hg up 0
2293 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2293 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2294 $ echo c > c
2294 $ echo c > c
2295 $ hg ci -Am2
2295 $ hg ci -Am2
2296 adding c
2296 adding c
2297 created new head
2297 created new head
2298 $ hg up 'head() and not .'
2298 $ hg up 'head() and not .'
2299 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
2299 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
2300 $ hg log -G
2300 $ hg log -G
2301 o changeset: 4:db815d6d32e6
2301 o changeset: 4:db815d6d32e6
2302 | tag: tip
2302 | tag: tip
2303 | parent: 0:f7b1eb17ad24
2303 | parent: 0:f7b1eb17ad24
2304 | user: test
2304 | user: test
2305 | date: Thu Jan 01 00:00:00 1970 +0000
2305 | date: Thu Jan 01 00:00:00 1970 +0000
2306 | summary: 2
2306 | summary: 2
2307 |
2307 |
2308 | @ changeset: 3:9bc8ce7f9356
2308 | @ changeset: 3:9bc8ce7f9356
2309 |/ parent: 0:f7b1eb17ad24
2309 |/ parent: 0:f7b1eb17ad24
2310 | user: test
2310 | user: test
2311 | date: Thu Jan 01 00:00:00 1970 +0000
2311 | date: Thu Jan 01 00:00:00 1970 +0000
2312 | summary: 1
2312 | summary: 1
2313 |
2313 |
2314 o changeset: 0:f7b1eb17ad24
2314 o changeset: 0:f7b1eb17ad24
2315 user: test
2315 user: test
2316 date: Thu Jan 01 00:00:00 1970 +0000
2316 date: Thu Jan 01 00:00:00 1970 +0000
2317 summary: 0
2317 summary: 0
2318
2318
2319 $ hg log -f -G b
2319 $ hg log -f -G b
2320 @ changeset: 3:9bc8ce7f9356
2320 @ changeset: 3:9bc8ce7f9356
2321 | parent: 0:f7b1eb17ad24
2321 | parent: 0:f7b1eb17ad24
2322 ~ user: test
2322 ~ user: test
2323 date: Thu Jan 01 00:00:00 1970 +0000
2323 date: Thu Jan 01 00:00:00 1970 +0000
2324 summary: 1
2324 summary: 1
2325
2325
2326 $ hg log -G b
2326 $ hg log -G b
2327 @ changeset: 3:9bc8ce7f9356
2327 @ changeset: 3:9bc8ce7f9356
2328 | parent: 0:f7b1eb17ad24
2328 | parent: 0:f7b1eb17ad24
2329 ~ user: test
2329 ~ user: test
2330 date: Thu Jan 01 00:00:00 1970 +0000
2330 date: Thu Jan 01 00:00:00 1970 +0000
2331 summary: 1
2331 summary: 1
2332
2332
2333 $ cd ..
2333 $ cd ..
2334
2334
2335 Check proper report when the manifest changes but not the file issue4499
2335 Check proper report when the manifest changes but not the file issue4499
2336 ------------------------------------------------------------------------
2336 ------------------------------------------------------------------------
2337
2337
2338 $ hg init issue4499
2338 $ hg init issue4499
2339 $ cd issue4499
2339 $ cd issue4499
2340 $ for f in A B C D F E G H I J K L M N O P Q R S T U; do
2340 $ for f in A B C D F E G H I J K L M N O P Q R S T U; do
2341 > echo 1 > $f;
2341 > echo 1 > $f;
2342 > hg add $f;
2342 > hg add $f;
2343 > done
2343 > done
2344 $ hg commit -m 'A1B1C1'
2344 $ hg commit -m 'A1B1C1'
2345 $ echo 2 > A
2345 $ echo 2 > A
2346 $ echo 2 > B
2346 $ echo 2 > B
2347 $ echo 2 > C
2347 $ echo 2 > C
2348 $ hg commit -m 'A2B2C2'
2348 $ hg commit -m 'A2B2C2'
2349 $ hg up 0
2349 $ hg up 0
2350 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
2350 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
2351 $ echo 3 > A
2351 $ echo 3 > A
2352 $ echo 2 > B
2352 $ echo 2 > B
2353 $ echo 2 > C
2353 $ echo 2 > C
2354 $ hg commit -m 'A3B2C2'
2354 $ hg commit -m 'A3B2C2'
2355 created new head
2355 created new head
2356
2356
2357 $ hg log -G
2357 $ hg log -G
2358 @ changeset: 2:fe5fc3d0eb17
2358 @ changeset: 2:fe5fc3d0eb17
2359 | tag: tip
2359 | tag: tip
2360 | parent: 0:abf4f0e38563
2360 | parent: 0:abf4f0e38563
2361 | user: test
2361 | user: test
2362 | date: Thu Jan 01 00:00:00 1970 +0000
2362 | date: Thu Jan 01 00:00:00 1970 +0000
2363 | summary: A3B2C2
2363 | summary: A3B2C2
2364 |
2364 |
2365 | o changeset: 1:07dcc6b312c0
2365 | o changeset: 1:07dcc6b312c0
2366 |/ user: test
2366 |/ user: test
2367 | date: Thu Jan 01 00:00:00 1970 +0000
2367 | date: Thu Jan 01 00:00:00 1970 +0000
2368 | summary: A2B2C2
2368 | summary: A2B2C2
2369 |
2369 |
2370 o changeset: 0:abf4f0e38563
2370 o changeset: 0:abf4f0e38563
2371 user: test
2371 user: test
2372 date: Thu Jan 01 00:00:00 1970 +0000
2372 date: Thu Jan 01 00:00:00 1970 +0000
2373 summary: A1B1C1
2373 summary: A1B1C1
2374
2374
2375
2375
2376 Log -f on B should reports current changesets
2376 Log -f on B should reports current changesets
2377
2377
2378 $ hg log -fG B
2378 $ hg log -fG B
2379 @ changeset: 2:fe5fc3d0eb17
2379 @ changeset: 2:fe5fc3d0eb17
2380 | tag: tip
2380 | tag: tip
2381 | parent: 0:abf4f0e38563
2381 | parent: 0:abf4f0e38563
2382 | user: test
2382 | user: test
2383 | date: Thu Jan 01 00:00:00 1970 +0000
2383 | date: Thu Jan 01 00:00:00 1970 +0000
2384 | summary: A3B2C2
2384 | summary: A3B2C2
2385 |
2385 |
2386 o changeset: 0:abf4f0e38563
2386 o changeset: 0:abf4f0e38563
2387 user: test
2387 user: test
2388 date: Thu Jan 01 00:00:00 1970 +0000
2388 date: Thu Jan 01 00:00:00 1970 +0000
2389 summary: A1B1C1
2389 summary: A1B1C1
2390
2390
2391 $ cd ..
2391 $ cd ..
@@ -1,63 +1,64 b''
1 $ cat > echo.py <<EOF
1 $ cat > echo.py <<EOF
2 > #!$PYTHON
2 > #!$PYTHON
3 > from __future__ import print_function
3 > import os, sys
4 > import os, sys
4 > try:
5 > try:
5 > import msvcrt
6 > import msvcrt
6 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
7 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
7 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
8 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
8 > except ImportError:
9 > except ImportError:
9 > pass
10 > pass
10 >
11 >
11 > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
12 > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
12 > print k, os.environ[k]
13 > print(k, os.environ[k])
13 > EOF
14 > EOF
14
15
15 Create 2 heads containing the same file, once as
16 Create 2 heads containing the same file, once as
16 a file, once as a link. Bundle was generated with:
17 a file, once as a link. Bundle was generated with:
17
18
18 # hg init t
19 # hg init t
19 # cd t
20 # cd t
20 # echo a > a
21 # echo a > a
21 # hg ci -qAm t0 -d '0 0'
22 # hg ci -qAm t0 -d '0 0'
22 # echo l > l
23 # echo l > l
23 # hg ci -qAm t1 -d '1 0'
24 # hg ci -qAm t1 -d '1 0'
24 # hg up -C 0
25 # hg up -C 0
25 # ln -s a l
26 # ln -s a l
26 # hg ci -qAm t2 -d '2 0'
27 # hg ci -qAm t2 -d '2 0'
27 # echo l2 > l2
28 # echo l2 > l2
28 # hg ci -qAm t3 -d '3 0'
29 # hg ci -qAm t3 -d '3 0'
29
30
30 $ hg init t
31 $ hg init t
31 $ cd t
32 $ cd t
32 $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
33 $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
33 $ hg up -C 3
34 $ hg up -C 3
34 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
35
36
36 Merge them and display *_ISLINK vars
37 Merge them and display *_ISLINK vars
37 merge heads
38 merge heads
38
39
39 $ hg merge --tool="$PYTHON ../echo.py"
40 $ hg merge --tool="$PYTHON ../echo.py"
40 merging l
41 merging l
41 HG_FILE l
42 HG_FILE l
42 HG_MY_ISLINK 1
43 HG_MY_ISLINK 1
43 HG_OTHER_ISLINK 0
44 HG_OTHER_ISLINK 0
44 HG_BASE_ISLINK 0
45 HG_BASE_ISLINK 0
45 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
46 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
46 (branch merge, don't forget to commit)
47 (branch merge, don't forget to commit)
47
48
48 Test working directory symlink bit calculation wrt copies,
49 Test working directory symlink bit calculation wrt copies,
49 especially on non-supporting systems.
50 especially on non-supporting systems.
50 merge working directory
51 merge working directory
51
52
52 $ hg up -C 2
53 $ hg up -C 2
53 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
54 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
54 $ hg copy l l2
55 $ hg copy l l2
55 $ HGMERGE="$PYTHON ../echo.py" hg up 3
56 $ HGMERGE="$PYTHON ../echo.py" hg up 3
56 merging l2
57 merging l2
57 HG_FILE l2
58 HG_FILE l2
58 HG_MY_ISLINK 1
59 HG_MY_ISLINK 1
59 HG_OTHER_ISLINK 0
60 HG_OTHER_ISLINK 0
60 HG_BASE_ISLINK 0
61 HG_BASE_ISLINK 0
61 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
62 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
62
63
63 $ cd ..
64 $ cd ..
@@ -1,423 +1,424 b''
1 $ cat <<EOF > merge
1 $ cat <<EOF > merge
2 > from __future__ import print_function
2 > import sys, os
3 > import sys, os
3 >
4 >
4 > try:
5 > try:
5 > import msvcrt
6 > import msvcrt
6 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
7 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
7 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
8 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
8 > except ImportError:
9 > except ImportError:
9 > pass
10 > pass
10 >
11 >
11 > print "merging for", os.path.basename(sys.argv[1])
12 > print("merging for", os.path.basename(sys.argv[1]))
12 > EOF
13 > EOF
13 $ HGMERGE="$PYTHON ../merge"; export HGMERGE
14 $ HGMERGE="$PYTHON ../merge"; export HGMERGE
14
15
15 $ hg init t
16 $ hg init t
16 $ cd t
17 $ cd t
17 $ echo This is file a1 > a
18 $ echo This is file a1 > a
18 $ hg add a
19 $ hg add a
19 $ hg commit -m "commit #0"
20 $ hg commit -m "commit #0"
20 $ echo This is file b1 > b
21 $ echo This is file b1 > b
21 $ hg add b
22 $ hg add b
22 $ hg commit -m "commit #1"
23 $ hg commit -m "commit #1"
23
24
24 $ hg update 0
25 $ hg update 0
25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
26 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
26
27
27 Test interrupted updates by having a non-empty dir with the same name as one
28 Test interrupted updates by having a non-empty dir with the same name as one
28 of the files in a commit we're updating to
29 of the files in a commit we're updating to
29
30
30 $ mkdir b && touch b/nonempty
31 $ mkdir b && touch b/nonempty
31 $ hg up
32 $ hg up
32 abort: *: '$TESTTMP/t/b' (glob)
33 abort: *: '$TESTTMP/t/b' (glob)
33 [255]
34 [255]
34 $ hg ci
35 $ hg ci
35 abort: last update was interrupted
36 abort: last update was interrupted
36 (use 'hg update' to get a consistent checkout)
37 (use 'hg update' to get a consistent checkout)
37 [255]
38 [255]
38 $ hg sum
39 $ hg sum
39 parent: 0:538afb845929
40 parent: 0:538afb845929
40 commit #0
41 commit #0
41 branch: default
42 branch: default
42 commit: 1 unknown (interrupted update)
43 commit: 1 unknown (interrupted update)
43 update: 1 new changesets (update)
44 update: 1 new changesets (update)
44 phases: 2 draft
45 phases: 2 draft
45 $ rm b/nonempty
46 $ rm b/nonempty
46 $ hg up
47 $ hg up
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ hg sum
49 $ hg sum
49 parent: 1:b8bb4a988f25 tip
50 parent: 1:b8bb4a988f25 tip
50 commit #1
51 commit #1
51 branch: default
52 branch: default
52 commit: (clean)
53 commit: (clean)
53 update: (current)
54 update: (current)
54 phases: 2 draft
55 phases: 2 draft
55
56
56 Prepare a basic merge
57 Prepare a basic merge
57
58
58 $ hg up 0
59 $ hg up 0
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 $ echo This is file c1 > c
61 $ echo This is file c1 > c
61 $ hg add c
62 $ hg add c
62 $ hg commit -m "commit #2"
63 $ hg commit -m "commit #2"
63 created new head
64 created new head
64 $ echo This is file b1 > b
65 $ echo This is file b1 > b
65 no merges expected
66 no merges expected
66 $ hg merge -P 1
67 $ hg merge -P 1
67 changeset: 1:b8bb4a988f25
68 changeset: 1:b8bb4a988f25
68 user: test
69 user: test
69 date: Thu Jan 01 00:00:00 1970 +0000
70 date: Thu Jan 01 00:00:00 1970 +0000
70 summary: commit #1
71 summary: commit #1
71
72
72 $ hg merge 1
73 $ hg merge 1
73 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 (branch merge, don't forget to commit)
75 (branch merge, don't forget to commit)
75 $ hg diff --nodates
76 $ hg diff --nodates
76 diff -r 49035e18a8e6 b
77 diff -r 49035e18a8e6 b
77 --- /dev/null
78 --- /dev/null
78 +++ b/b
79 +++ b/b
79 @@ -0,0 +1,1 @@
80 @@ -0,0 +1,1 @@
80 +This is file b1
81 +This is file b1
81 $ hg status
82 $ hg status
82 M b
83 M b
83 $ cd ..; rm -r t
84 $ cd ..; rm -r t
84
85
85 $ hg init t
86 $ hg init t
86 $ cd t
87 $ cd t
87 $ echo This is file a1 > a
88 $ echo This is file a1 > a
88 $ hg add a
89 $ hg add a
89 $ hg commit -m "commit #0"
90 $ hg commit -m "commit #0"
90 $ echo This is file b1 > b
91 $ echo This is file b1 > b
91 $ hg add b
92 $ hg add b
92 $ hg commit -m "commit #1"
93 $ hg commit -m "commit #1"
93
94
94 $ hg update 0
95 $ hg update 0
95 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
96 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
96 $ echo This is file c1 > c
97 $ echo This is file c1 > c
97 $ hg add c
98 $ hg add c
98 $ hg commit -m "commit #2"
99 $ hg commit -m "commit #2"
99 created new head
100 created new head
100 $ echo This is file b2 > b
101 $ echo This is file b2 > b
101 merge should fail
102 merge should fail
102 $ hg merge 1
103 $ hg merge 1
103 b: untracked file differs
104 b: untracked file differs
104 abort: untracked files in working directory differ from files in requested revision
105 abort: untracked files in working directory differ from files in requested revision
105 [255]
106 [255]
106
107
107 #if symlink
108 #if symlink
108 symlinks to directories should be treated as regular files (issue5027)
109 symlinks to directories should be treated as regular files (issue5027)
109 $ rm b
110 $ rm b
110 $ ln -s 'This is file b2' b
111 $ ln -s 'This is file b2' b
111 $ hg merge 1
112 $ hg merge 1
112 b: untracked file differs
113 b: untracked file differs
113 abort: untracked files in working directory differ from files in requested revision
114 abort: untracked files in working directory differ from files in requested revision
114 [255]
115 [255]
115 symlinks shouldn't be followed
116 symlinks shouldn't be followed
116 $ rm b
117 $ rm b
117 $ echo This is file b1 > .hg/b
118 $ echo This is file b1 > .hg/b
118 $ ln -s .hg/b b
119 $ ln -s .hg/b b
119 $ hg merge 1
120 $ hg merge 1
120 b: untracked file differs
121 b: untracked file differs
121 abort: untracked files in working directory differ from files in requested revision
122 abort: untracked files in working directory differ from files in requested revision
122 [255]
123 [255]
123
124
124 $ rm b
125 $ rm b
125 $ echo This is file b2 > b
126 $ echo This is file b2 > b
126 #endif
127 #endif
127
128
128 bad config
129 bad config
129 $ hg merge 1 --config merge.checkunknown=x
130 $ hg merge 1 --config merge.checkunknown=x
130 abort: merge.checkunknown not valid ('x' is none of 'abort', 'ignore', 'warn')
131 abort: merge.checkunknown not valid ('x' is none of 'abort', 'ignore', 'warn')
131 [255]
132 [255]
132 this merge should fail
133 this merge should fail
133 $ hg merge 1 --config merge.checkunknown=abort
134 $ hg merge 1 --config merge.checkunknown=abort
134 b: untracked file differs
135 b: untracked file differs
135 abort: untracked files in working directory differ from files in requested revision
136 abort: untracked files in working directory differ from files in requested revision
136 [255]
137 [255]
137
138
138 this merge should warn
139 this merge should warn
139 $ hg merge 1 --config merge.checkunknown=warn
140 $ hg merge 1 --config merge.checkunknown=warn
140 b: replacing untracked file
141 b: replacing untracked file
141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
142 (branch merge, don't forget to commit)
143 (branch merge, don't forget to commit)
143 $ cat b.orig
144 $ cat b.orig
144 This is file b2
145 This is file b2
145 $ hg up --clean 2
146 $ hg up --clean 2
146 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
147 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
147 $ mv b.orig b
148 $ mv b.orig b
148
149
149 this merge should silently ignore
150 this merge should silently ignore
150 $ cat b
151 $ cat b
151 This is file b2
152 This is file b2
152 $ hg merge 1 --config merge.checkunknown=ignore
153 $ hg merge 1 --config merge.checkunknown=ignore
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 (branch merge, don't forget to commit)
155 (branch merge, don't forget to commit)
155
156
156 merge.checkignored
157 merge.checkignored
157 $ hg up --clean 1
158 $ hg up --clean 1
158 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
159 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
159 $ cat >> .hgignore << EOF
160 $ cat >> .hgignore << EOF
160 > remoteignored
161 > remoteignored
161 > EOF
162 > EOF
162 $ echo This is file localignored3 > localignored
163 $ echo This is file localignored3 > localignored
163 $ echo This is file remoteignored3 > remoteignored
164 $ echo This is file remoteignored3 > remoteignored
164 $ hg add .hgignore localignored remoteignored
165 $ hg add .hgignore localignored remoteignored
165 $ hg commit -m "commit #3"
166 $ hg commit -m "commit #3"
166
167
167 $ hg up 2
168 $ hg up 2
168 1 files updated, 0 files merged, 4 files removed, 0 files unresolved
169 1 files updated, 0 files merged, 4 files removed, 0 files unresolved
169 $ cat >> .hgignore << EOF
170 $ cat >> .hgignore << EOF
170 > localignored
171 > localignored
171 > EOF
172 > EOF
172 $ hg add .hgignore
173 $ hg add .hgignore
173 $ hg commit -m "commit #4"
174 $ hg commit -m "commit #4"
174
175
175 remote .hgignore shouldn't be used for determining whether a file is ignored
176 remote .hgignore shouldn't be used for determining whether a file is ignored
176 $ echo This is file remoteignored4 > remoteignored
177 $ echo This is file remoteignored4 > remoteignored
177 $ hg merge 3 --config merge.checkignored=ignore --config merge.checkunknown=abort
178 $ hg merge 3 --config merge.checkignored=ignore --config merge.checkunknown=abort
178 remoteignored: untracked file differs
179 remoteignored: untracked file differs
179 abort: untracked files in working directory differ from files in requested revision
180 abort: untracked files in working directory differ from files in requested revision
180 [255]
181 [255]
181 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=ignore
182 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=ignore
182 merging .hgignore
183 merging .hgignore
183 merging for .hgignore
184 merging for .hgignore
184 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
185 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
185 (branch merge, don't forget to commit)
186 (branch merge, don't forget to commit)
186 $ cat remoteignored
187 $ cat remoteignored
187 This is file remoteignored3
188 This is file remoteignored3
188 $ cat remoteignored.orig
189 $ cat remoteignored.orig
189 This is file remoteignored4
190 This is file remoteignored4
190 $ rm remoteignored.orig
191 $ rm remoteignored.orig
191
192
192 local .hgignore should be used for that
193 local .hgignore should be used for that
193 $ hg up --clean 4
194 $ hg up --clean 4
194 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
195 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
195 $ echo This is file localignored4 > localignored
196 $ echo This is file localignored4 > localignored
196 also test other conflicting files to see we output the full set of warnings
197 also test other conflicting files to see we output the full set of warnings
197 $ echo This is file b2 > b
198 $ echo This is file b2 > b
198 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=abort
199 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=abort
199 b: untracked file differs
200 b: untracked file differs
200 localignored: untracked file differs
201 localignored: untracked file differs
201 abort: untracked files in working directory differ from files in requested revision
202 abort: untracked files in working directory differ from files in requested revision
202 [255]
203 [255]
203 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=ignore
204 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=ignore
204 localignored: untracked file differs
205 localignored: untracked file differs
205 abort: untracked files in working directory differ from files in requested revision
206 abort: untracked files in working directory differ from files in requested revision
206 [255]
207 [255]
207 $ hg merge 3 --config merge.checkignored=warn --config merge.checkunknown=abort
208 $ hg merge 3 --config merge.checkignored=warn --config merge.checkunknown=abort
208 b: untracked file differs
209 b: untracked file differs
209 abort: untracked files in working directory differ from files in requested revision
210 abort: untracked files in working directory differ from files in requested revision
210 [255]
211 [255]
211 $ hg merge 3 --config merge.checkignored=warn --config merge.checkunknown=warn
212 $ hg merge 3 --config merge.checkignored=warn --config merge.checkunknown=warn
212 b: replacing untracked file
213 b: replacing untracked file
213 localignored: replacing untracked file
214 localignored: replacing untracked file
214 merging .hgignore
215 merging .hgignore
215 merging for .hgignore
216 merging for .hgignore
216 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
217 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
217 (branch merge, don't forget to commit)
218 (branch merge, don't forget to commit)
218 $ cat localignored
219 $ cat localignored
219 This is file localignored3
220 This is file localignored3
220 $ cat localignored.orig
221 $ cat localignored.orig
221 This is file localignored4
222 This is file localignored4
222 $ rm localignored.orig
223 $ rm localignored.orig
223
224
224 $ cat b.orig
225 $ cat b.orig
225 This is file b2
226 This is file b2
226 $ hg up --clean 2
227 $ hg up --clean 2
227 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
228 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
228 $ mv b.orig b
229 $ mv b.orig b
229
230
230 this merge of b should work
231 this merge of b should work
231 $ cat b
232 $ cat b
232 This is file b2
233 This is file b2
233 $ hg merge -f 1
234 $ hg merge -f 1
234 merging b
235 merging b
235 merging for b
236 merging for b
236 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
237 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
237 (branch merge, don't forget to commit)
238 (branch merge, don't forget to commit)
238 $ hg diff --nodates
239 $ hg diff --nodates
239 diff -r 49035e18a8e6 b
240 diff -r 49035e18a8e6 b
240 --- /dev/null
241 --- /dev/null
241 +++ b/b
242 +++ b/b
242 @@ -0,0 +1,1 @@
243 @@ -0,0 +1,1 @@
243 +This is file b2
244 +This is file b2
244 $ hg status
245 $ hg status
245 M b
246 M b
246 $ cd ..; rm -r t
247 $ cd ..; rm -r t
247
248
248 $ hg init t
249 $ hg init t
249 $ cd t
250 $ cd t
250 $ echo This is file a1 > a
251 $ echo This is file a1 > a
251 $ hg add a
252 $ hg add a
252 $ hg commit -m "commit #0"
253 $ hg commit -m "commit #0"
253 $ echo This is file b1 > b
254 $ echo This is file b1 > b
254 $ hg add b
255 $ hg add b
255 $ hg commit -m "commit #1"
256 $ hg commit -m "commit #1"
256 $ echo This is file b22 > b
257 $ echo This is file b22 > b
257 $ hg commit -m "commit #2"
258 $ hg commit -m "commit #2"
258 $ hg update 1
259 $ hg update 1
259 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
260 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
260 $ echo This is file c1 > c
261 $ echo This is file c1 > c
261 $ hg add c
262 $ hg add c
262 $ hg commit -m "commit #3"
263 $ hg commit -m "commit #3"
263 created new head
264 created new head
264
265
265 Contents of b should be "this is file b1"
266 Contents of b should be "this is file b1"
266 $ cat b
267 $ cat b
267 This is file b1
268 This is file b1
268
269
269 $ echo This is file b22 > b
270 $ echo This is file b22 > b
270 merge fails
271 merge fails
271 $ hg merge 2
272 $ hg merge 2
272 abort: uncommitted changes
273 abort: uncommitted changes
273 (use 'hg status' to list changes)
274 (use 'hg status' to list changes)
274 [255]
275 [255]
275 merge expected!
276 merge expected!
276 $ hg merge -f 2
277 $ hg merge -f 2
277 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 (branch merge, don't forget to commit)
279 (branch merge, don't forget to commit)
279 $ hg diff --nodates
280 $ hg diff --nodates
280 diff -r 85de557015a8 b
281 diff -r 85de557015a8 b
281 --- a/b
282 --- a/b
282 +++ b/b
283 +++ b/b
283 @@ -1,1 +1,1 @@
284 @@ -1,1 +1,1 @@
284 -This is file b1
285 -This is file b1
285 +This is file b22
286 +This is file b22
286 $ hg status
287 $ hg status
287 M b
288 M b
288 $ cd ..; rm -r t
289 $ cd ..; rm -r t
289
290
290 $ hg init t
291 $ hg init t
291 $ cd t
292 $ cd t
292 $ echo This is file a1 > a
293 $ echo This is file a1 > a
293 $ hg add a
294 $ hg add a
294 $ hg commit -m "commit #0"
295 $ hg commit -m "commit #0"
295 $ echo This is file b1 > b
296 $ echo This is file b1 > b
296 $ hg add b
297 $ hg add b
297 $ hg commit -m "commit #1"
298 $ hg commit -m "commit #1"
298 $ echo This is file b22 > b
299 $ echo This is file b22 > b
299 $ hg commit -m "commit #2"
300 $ hg commit -m "commit #2"
300 $ hg update 1
301 $ hg update 1
301 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
302 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
302 $ echo This is file c1 > c
303 $ echo This is file c1 > c
303 $ hg add c
304 $ hg add c
304 $ hg commit -m "commit #3"
305 $ hg commit -m "commit #3"
305 created new head
306 created new head
306 $ echo This is file b33 > b
307 $ echo This is file b33 > b
307 merge of b should fail
308 merge of b should fail
308 $ hg merge 2
309 $ hg merge 2
309 abort: uncommitted changes
310 abort: uncommitted changes
310 (use 'hg status' to list changes)
311 (use 'hg status' to list changes)
311 [255]
312 [255]
312 merge of b expected
313 merge of b expected
313 $ hg merge -f 2
314 $ hg merge -f 2
314 merging b
315 merging b
315 merging for b
316 merging for b
316 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
317 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
317 (branch merge, don't forget to commit)
318 (branch merge, don't forget to commit)
318 $ hg diff --nodates
319 $ hg diff --nodates
319 diff -r 85de557015a8 b
320 diff -r 85de557015a8 b
320 --- a/b
321 --- a/b
321 +++ b/b
322 +++ b/b
322 @@ -1,1 +1,1 @@
323 @@ -1,1 +1,1 @@
323 -This is file b1
324 -This is file b1
324 +This is file b33
325 +This is file b33
325 $ hg status
326 $ hg status
326 M b
327 M b
327
328
328 Test for issue2364
329 Test for issue2364
329
330
330 $ hg up -qC .
331 $ hg up -qC .
331 $ hg rm b
332 $ hg rm b
332 $ hg ci -md
333 $ hg ci -md
333 $ hg revert -r -2 b
334 $ hg revert -r -2 b
334 $ hg up -q -- -2
335 $ hg up -q -- -2
335
336
336 Test that updated files are treated as "modified", when
337 Test that updated files are treated as "modified", when
337 'merge.update()' is aborted before 'merge.recordupdates()' (= parents
338 'merge.update()' is aborted before 'merge.recordupdates()' (= parents
338 aren't changed), even if none of mode, size and timestamp of them
339 aren't changed), even if none of mode, size and timestamp of them
339 isn't changed on the filesystem (see also issue4583).
340 isn't changed on the filesystem (see also issue4583).
340
341
341 $ cat > $TESTTMP/abort.py <<EOF
342 $ cat > $TESTTMP/abort.py <<EOF
342 > # emulate aborting before "recordupdates()". in this case, files
343 > # emulate aborting before "recordupdates()". in this case, files
343 > # are changed without updating dirstate
344 > # are changed without updating dirstate
344 > from mercurial import extensions, merge, error
345 > from mercurial import extensions, merge, error
345 > def applyupdates(orig, *args, **kwargs):
346 > def applyupdates(orig, *args, **kwargs):
346 > orig(*args, **kwargs)
347 > orig(*args, **kwargs)
347 > raise error.Abort('intentional aborting')
348 > raise error.Abort('intentional aborting')
348 > def extsetup(ui):
349 > def extsetup(ui):
349 > extensions.wrapfunction(merge, "applyupdates", applyupdates)
350 > extensions.wrapfunction(merge, "applyupdates", applyupdates)
350 > EOF
351 > EOF
351
352
352 $ cat >> .hg/hgrc <<EOF
353 $ cat >> .hg/hgrc <<EOF
353 > [fakedirstatewritetime]
354 > [fakedirstatewritetime]
354 > # emulate invoking dirstate.write() via repo.status()
355 > # emulate invoking dirstate.write() via repo.status()
355 > # at 2000-01-01 00:00
356 > # at 2000-01-01 00:00
356 > fakenow = 200001010000
357 > fakenow = 200001010000
357 > EOF
358 > EOF
358
359
359 (file gotten from other revision)
360 (file gotten from other revision)
360
361
361 $ hg update -q -C 2
362 $ hg update -q -C 2
362 $ echo 'THIS IS FILE B5' > b
363 $ echo 'THIS IS FILE B5' > b
363 $ hg commit -m 'commit #5'
364 $ hg commit -m 'commit #5'
364
365
365 $ hg update -q -C 3
366 $ hg update -q -C 3
366 $ cat b
367 $ cat b
367 This is file b1
368 This is file b1
368 $ touch -t 200001010000 b
369 $ touch -t 200001010000 b
369 $ hg debugrebuildstate
370 $ hg debugrebuildstate
370
371
371 $ cat >> .hg/hgrc <<EOF
372 $ cat >> .hg/hgrc <<EOF
372 > [extensions]
373 > [extensions]
373 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
374 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
374 > abort = $TESTTMP/abort.py
375 > abort = $TESTTMP/abort.py
375 > EOF
376 > EOF
376 $ hg merge 5
377 $ hg merge 5
377 abort: intentional aborting
378 abort: intentional aborting
378 [255]
379 [255]
379 $ cat >> .hg/hgrc <<EOF
380 $ cat >> .hg/hgrc <<EOF
380 > [extensions]
381 > [extensions]
381 > fakedirstatewritetime = !
382 > fakedirstatewritetime = !
382 > abort = !
383 > abort = !
383 > EOF
384 > EOF
384
385
385 $ cat b
386 $ cat b
386 THIS IS FILE B5
387 THIS IS FILE B5
387 $ touch -t 200001010000 b
388 $ touch -t 200001010000 b
388 $ hg status -A b
389 $ hg status -A b
389 M b
390 M b
390
391
391 (file merged from other revision)
392 (file merged from other revision)
392
393
393 $ hg update -q -C 3
394 $ hg update -q -C 3
394 $ echo 'this is file b6' > b
395 $ echo 'this is file b6' > b
395 $ hg commit -m 'commit #6'
396 $ hg commit -m 'commit #6'
396 created new head
397 created new head
397
398
398 $ cat b
399 $ cat b
399 this is file b6
400 this is file b6
400 $ touch -t 200001010000 b
401 $ touch -t 200001010000 b
401 $ hg debugrebuildstate
402 $ hg debugrebuildstate
402
403
403 $ cat >> .hg/hgrc <<EOF
404 $ cat >> .hg/hgrc <<EOF
404 > [extensions]
405 > [extensions]
405 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
406 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
406 > abort = $TESTTMP/abort.py
407 > abort = $TESTTMP/abort.py
407 > EOF
408 > EOF
408 $ hg merge --tool internal:other 5
409 $ hg merge --tool internal:other 5
409 abort: intentional aborting
410 abort: intentional aborting
410 [255]
411 [255]
411 $ cat >> .hg/hgrc <<EOF
412 $ cat >> .hg/hgrc <<EOF
412 > [extensions]
413 > [extensions]
413 > fakedirstatewritetime = !
414 > fakedirstatewritetime = !
414 > abort = !
415 > abort = !
415 > EOF
416 > EOF
416
417
417 $ cat b
418 $ cat b
418 THIS IS FILE B5
419 THIS IS FILE B5
419 $ touch -t 200001010000 b
420 $ touch -t 200001010000 b
420 $ hg status -A b
421 $ hg status -A b
421 M b
422 M b
422
423
423 $ cd ..
424 $ cd ..
@@ -1,70 +1,70 b''
1 $ cat <<EOF > merge
1 $ cat <<EOF > merge
2 > import sys, os
2 > import sys, os
3 > print "merging for", os.path.basename(sys.argv[1])
3 > print("merging for", os.path.basename(sys.argv[1]))
4 > EOF
4 > EOF
5 $ HGMERGE="$PYTHON ../merge"; export HGMERGE
5 $ HGMERGE="$PYTHON ../merge"; export HGMERGE
6
6
7 $ hg init A1
7 $ hg init A1
8 $ cd A1
8 $ cd A1
9 $ echo This is file foo1 > foo
9 $ echo This is file foo1 > foo
10 $ echo This is file bar1 > bar
10 $ echo This is file bar1 > bar
11 $ hg add foo bar
11 $ hg add foo bar
12 $ hg commit -m "commit text"
12 $ hg commit -m "commit text"
13
13
14 $ cd ..
14 $ cd ..
15 $ hg clone A1 B1
15 $ hg clone A1 B1
16 updating to branch default
16 updating to branch default
17 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
18
18
19 $ cd A1
19 $ cd A1
20 $ rm bar
20 $ rm bar
21 $ hg remove bar
21 $ hg remove bar
22 $ hg commit -m "commit test"
22 $ hg commit -m "commit test"
23
23
24 $ cd ../B1
24 $ cd ../B1
25 $ echo This is file foo22 > foo
25 $ echo This is file foo22 > foo
26 $ hg commit -m "commit test"
26 $ hg commit -m "commit test"
27
27
28 $ cd ..
28 $ cd ..
29 $ hg clone A1 A2
29 $ hg clone A1 A2
30 updating to branch default
30 updating to branch default
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 $ hg clone B1 B2
32 $ hg clone B1 B2
33 updating to branch default
33 updating to branch default
34 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
35
35
36 $ cd A1
36 $ cd A1
37 $ hg pull ../B1
37 $ hg pull ../B1
38 pulling from ../B1
38 pulling from ../B1
39 searching for changes
39 searching for changes
40 adding changesets
40 adding changesets
41 adding manifests
41 adding manifests
42 adding file changes
42 adding file changes
43 added 1 changesets with 1 changes to 1 files (+1 heads)
43 added 1 changesets with 1 changes to 1 files (+1 heads)
44 (run 'hg heads' to see heads, 'hg merge' to merge)
44 (run 'hg heads' to see heads, 'hg merge' to merge)
45 $ hg merge
45 $ hg merge
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 (branch merge, don't forget to commit)
47 (branch merge, don't forget to commit)
48 $ hg commit -m "commit test"
48 $ hg commit -m "commit test"
49 bar should remain deleted.
49 bar should remain deleted.
50 $ hg manifest --debug
50 $ hg manifest --debug
51 f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo
51 f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo
52
52
53 $ cd ../B2
53 $ cd ../B2
54 $ hg pull ../A2
54 $ hg pull ../A2
55 pulling from ../A2
55 pulling from ../A2
56 searching for changes
56 searching for changes
57 adding changesets
57 adding changesets
58 adding manifests
58 adding manifests
59 adding file changes
59 adding file changes
60 added 1 changesets with 0 changes to 0 files (+1 heads)
60 added 1 changesets with 0 changes to 0 files (+1 heads)
61 (run 'hg heads' to see heads, 'hg merge' to merge)
61 (run 'hg heads' to see heads, 'hg merge' to merge)
62 $ hg merge
62 $ hg merge
63 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
63 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
64 (branch merge, don't forget to commit)
64 (branch merge, don't forget to commit)
65 $ hg commit -m "commit test"
65 $ hg commit -m "commit test"
66 bar should remain deleted.
66 bar should remain deleted.
67 $ hg manifest --debug
67 $ hg manifest --debug
68 f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo
68 f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo
69
69
70 $ cd ..
70 $ cd ..
@@ -1,211 +1,211 b''
1
1
2 Test interactions between mq and patch.eol
2 Test interactions between mq and patch.eol
3
3
4
4
5 $ cat <<EOF >> $HGRCPATH
5 $ cat <<EOF >> $HGRCPATH
6 > [extensions]
6 > [extensions]
7 > mq =
7 > mq =
8 > [diff]
8 > [diff]
9 > nodates = 1
9 > nodates = 1
10 > EOF
10 > EOF
11
11
12 $ cat > makepatch.py <<EOF
12 $ cat > makepatch.py <<EOF
13 > f = file('eol.diff', 'wb')
13 > f = file('eol.diff', 'wb')
14 > w = f.write
14 > w = f.write
15 > w('test message\n')
15 > w('test message\n')
16 > w('diff --git a/a b/a\n')
16 > w('diff --git a/a b/a\n')
17 > w('--- a/a\n')
17 > w('--- a/a\n')
18 > w('+++ b/a\n')
18 > w('+++ b/a\n')
19 > w('@@ -1,5 +1,5 @@\n')
19 > w('@@ -1,5 +1,5 @@\n')
20 > w(' a\n')
20 > w(' a\n')
21 > w('-b\r\n')
21 > w('-b\r\n')
22 > w('+y\r\n')
22 > w('+y\r\n')
23 > w(' c\r\n')
23 > w(' c\r\n')
24 > w(' d\n')
24 > w(' d\n')
25 > w('-e\n')
25 > w('-e\n')
26 > w('\ No newline at end of file\n')
26 > w('\ No newline at end of file\n')
27 > w('+z\r\n')
27 > w('+z\r\n')
28 > w('\ No newline at end of file\r\n')
28 > w('\ No newline at end of file\r\n')
29 > EOF
29 > EOF
30
30
31 $ cat > cateol.py <<EOF
31 $ cat > cateol.py <<EOF
32 > import sys
32 > import sys
33 > for line in file(sys.argv[1], 'rb'):
33 > for line in file(sys.argv[1], 'rb'):
34 > line = line.replace('\r', '<CR>')
34 > line = line.replace('\r', '<CR>')
35 > line = line.replace('\n', '<LF>')
35 > line = line.replace('\n', '<LF>')
36 > print line
36 > print(line)
37 > EOF
37 > EOF
38
38
39 $ hg init repo
39 $ hg init repo
40 $ cd repo
40 $ cd repo
41 $ echo '\.diff' > .hgignore
41 $ echo '\.diff' > .hgignore
42 $ echo '\.rej' >> .hgignore
42 $ echo '\.rej' >> .hgignore
43
43
44
44
45 Test different --eol values
45 Test different --eol values
46
46
47 $ $PYTHON -c 'file("a", "wb").write("a\nb\nc\nd\ne")'
47 $ $PYTHON -c 'file("a", "wb").write("a\nb\nc\nd\ne")'
48 $ hg ci -Am adda
48 $ hg ci -Am adda
49 adding .hgignore
49 adding .hgignore
50 adding a
50 adding a
51 $ $PYTHON ../makepatch.py
51 $ $PYTHON ../makepatch.py
52 $ hg qimport eol.diff
52 $ hg qimport eol.diff
53 adding eol.diff to series file
53 adding eol.diff to series file
54
54
55 should fail in strict mode
55 should fail in strict mode
56
56
57 $ hg qpush
57 $ hg qpush
58 applying eol.diff
58 applying eol.diff
59 patching file a
59 patching file a
60 Hunk #1 FAILED at 0
60 Hunk #1 FAILED at 0
61 1 out of 1 hunks FAILED -- saving rejects to file a.rej
61 1 out of 1 hunks FAILED -- saving rejects to file a.rej
62 patch failed, unable to continue (try -v)
62 patch failed, unable to continue (try -v)
63 patch failed, rejects left in working directory
63 patch failed, rejects left in working directory
64 errors during apply, please fix and qrefresh eol.diff
64 errors during apply, please fix and qrefresh eol.diff
65 [2]
65 [2]
66 $ hg qpop
66 $ hg qpop
67 popping eol.diff
67 popping eol.diff
68 patch queue now empty
68 patch queue now empty
69
69
70 invalid eol
70 invalid eol
71
71
72 $ hg --config patch.eol='LFCR' qpush
72 $ hg --config patch.eol='LFCR' qpush
73 applying eol.diff
73 applying eol.diff
74 patch failed, unable to continue (try -v)
74 patch failed, unable to continue (try -v)
75 patch failed, rejects left in working directory
75 patch failed, rejects left in working directory
76 errors during apply, please fix and qrefresh eol.diff
76 errors during apply, please fix and qrefresh eol.diff
77 [2]
77 [2]
78 $ hg qpop
78 $ hg qpop
79 popping eol.diff
79 popping eol.diff
80 patch queue now empty
80 patch queue now empty
81
81
82 force LF
82 force LF
83
83
84 $ hg --config patch.eol='CRLF' qpush
84 $ hg --config patch.eol='CRLF' qpush
85 applying eol.diff
85 applying eol.diff
86 now at: eol.diff
86 now at: eol.diff
87 $ hg qrefresh
87 $ hg qrefresh
88 $ $PYTHON ../cateol.py .hg/patches/eol.diff
88 $ $PYTHON ../cateol.py .hg/patches/eol.diff
89 # HG changeset patch<LF>
89 # HG changeset patch<LF>
90 # Parent 0d0bf99a8b7a3842c6f8ef09e34f69156c4bd9d0<LF>
90 # Parent 0d0bf99a8b7a3842c6f8ef09e34f69156c4bd9d0<LF>
91 test message<LF>
91 test message<LF>
92 <LF>
92 <LF>
93 diff -r 0d0bf99a8b7a a<LF>
93 diff -r 0d0bf99a8b7a a<LF>
94 --- a/a<LF>
94 --- a/a<LF>
95 +++ b/a<LF>
95 +++ b/a<LF>
96 @@ -1,5 +1,5 @@<LF>
96 @@ -1,5 +1,5 @@<LF>
97 -a<LF>
97 -a<LF>
98 -b<LF>
98 -b<LF>
99 -c<LF>
99 -c<LF>
100 -d<LF>
100 -d<LF>
101 -e<LF>
101 -e<LF>
102 \ No newline at end of file<LF>
102 \ No newline at end of file<LF>
103 +a<CR><LF>
103 +a<CR><LF>
104 +y<CR><LF>
104 +y<CR><LF>
105 +c<CR><LF>
105 +c<CR><LF>
106 +d<CR><LF>
106 +d<CR><LF>
107 +z<LF>
107 +z<LF>
108 \ No newline at end of file<LF>
108 \ No newline at end of file<LF>
109 $ $PYTHON ../cateol.py a
109 $ $PYTHON ../cateol.py a
110 a<CR><LF>
110 a<CR><LF>
111 y<CR><LF>
111 y<CR><LF>
112 c<CR><LF>
112 c<CR><LF>
113 d<CR><LF>
113 d<CR><LF>
114 z
114 z
115 $ hg qpop
115 $ hg qpop
116 popping eol.diff
116 popping eol.diff
117 patch queue now empty
117 patch queue now empty
118
118
119 push again forcing LF and compare revisions
119 push again forcing LF and compare revisions
120
120
121 $ hg --config patch.eol='CRLF' qpush
121 $ hg --config patch.eol='CRLF' qpush
122 applying eol.diff
122 applying eol.diff
123 now at: eol.diff
123 now at: eol.diff
124 $ $PYTHON ../cateol.py a
124 $ $PYTHON ../cateol.py a
125 a<CR><LF>
125 a<CR><LF>
126 y<CR><LF>
126 y<CR><LF>
127 c<CR><LF>
127 c<CR><LF>
128 d<CR><LF>
128 d<CR><LF>
129 z
129 z
130 $ hg qpop
130 $ hg qpop
131 popping eol.diff
131 popping eol.diff
132 patch queue now empty
132 patch queue now empty
133
133
134 push again without LF and compare revisions
134 push again without LF and compare revisions
135
135
136 $ hg qpush
136 $ hg qpush
137 applying eol.diff
137 applying eol.diff
138 now at: eol.diff
138 now at: eol.diff
139 $ $PYTHON ../cateol.py a
139 $ $PYTHON ../cateol.py a
140 a<CR><LF>
140 a<CR><LF>
141 y<CR><LF>
141 y<CR><LF>
142 c<CR><LF>
142 c<CR><LF>
143 d<CR><LF>
143 d<CR><LF>
144 z
144 z
145 $ hg qpop
145 $ hg qpop
146 popping eol.diff
146 popping eol.diff
147 patch queue now empty
147 patch queue now empty
148 $ cd ..
148 $ cd ..
149
149
150
150
151 Test .rej file EOL are left unchanged
151 Test .rej file EOL are left unchanged
152
152
153 $ hg init testeol
153 $ hg init testeol
154 $ cd testeol
154 $ cd testeol
155 $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n3\r\n4')"
155 $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n3\r\n4')"
156 $ hg ci -Am adda
156 $ hg ci -Am adda
157 adding a
157 adding a
158 $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n33\r\n4')"
158 $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n33\r\n4')"
159 $ hg qnew patch1
159 $ hg qnew patch1
160 $ hg qpop
160 $ hg qpop
161 popping patch1
161 popping patch1
162 patch queue now empty
162 patch queue now empty
163 $ $PYTHON -c "file('a', 'wb').write('1\r\n22\r\n33\r\n4')"
163 $ $PYTHON -c "file('a', 'wb').write('1\r\n22\r\n33\r\n4')"
164 $ hg ci -m changea
164 $ hg ci -m changea
165
165
166 $ hg --config 'patch.eol=LF' qpush
166 $ hg --config 'patch.eol=LF' qpush
167 applying patch1
167 applying patch1
168 patching file a
168 patching file a
169 Hunk #1 FAILED at 0
169 Hunk #1 FAILED at 0
170 1 out of 1 hunks FAILED -- saving rejects to file a.rej
170 1 out of 1 hunks FAILED -- saving rejects to file a.rej
171 patch failed, unable to continue (try -v)
171 patch failed, unable to continue (try -v)
172 patch failed, rejects left in working directory
172 patch failed, rejects left in working directory
173 errors during apply, please fix and qrefresh patch1
173 errors during apply, please fix and qrefresh patch1
174 [2]
174 [2]
175 $ hg qpop
175 $ hg qpop
176 popping patch1
176 popping patch1
177 patch queue now empty
177 patch queue now empty
178 $ cat a.rej
178 $ cat a.rej
179 --- a
179 --- a
180 +++ a
180 +++ a
181 @@ -1,4 +1,4 @@
181 @@ -1,4 +1,4 @@
182 1\r (esc)
182 1\r (esc)
183 2\r (esc)
183 2\r (esc)
184 -3\r (esc)
184 -3\r (esc)
185 +33\r (esc)
185 +33\r (esc)
186 4
186 4
187 \ No newline at end of file
187 \ No newline at end of file
188
188
189 $ hg --config 'patch.eol=auto' qpush
189 $ hg --config 'patch.eol=auto' qpush
190 applying patch1
190 applying patch1
191 patching file a
191 patching file a
192 Hunk #1 FAILED at 0
192 Hunk #1 FAILED at 0
193 1 out of 1 hunks FAILED -- saving rejects to file a.rej
193 1 out of 1 hunks FAILED -- saving rejects to file a.rej
194 patch failed, unable to continue (try -v)
194 patch failed, unable to continue (try -v)
195 patch failed, rejects left in working directory
195 patch failed, rejects left in working directory
196 errors during apply, please fix and qrefresh patch1
196 errors during apply, please fix and qrefresh patch1
197 [2]
197 [2]
198 $ hg qpop
198 $ hg qpop
199 popping patch1
199 popping patch1
200 patch queue now empty
200 patch queue now empty
201 $ cat a.rej
201 $ cat a.rej
202 --- a
202 --- a
203 +++ a
203 +++ a
204 @@ -1,4 +1,4 @@
204 @@ -1,4 +1,4 @@
205 1\r (esc)
205 1\r (esc)
206 2\r (esc)
206 2\r (esc)
207 -3\r (esc)
207 -3\r (esc)
208 +33\r (esc)
208 +33\r (esc)
209 4
209 4
210 \ No newline at end of file
210 \ No newline at end of file
211 $ cd ..
211 $ cd ..
@@ -1,214 +1,214 b''
1
1
2 $ cat <<EOF >> $HGRCPATH
2 $ cat <<EOF >> $HGRCPATH
3 > [extensions]
3 > [extensions]
4 > notify=
4 > notify=
5 >
5 >
6 > [hooks]
6 > [hooks]
7 > changegroup.notify = python:hgext.notify.hook
7 > changegroup.notify = python:hgext.notify.hook
8 >
8 >
9 > [notify]
9 > [notify]
10 > sources = push
10 > sources = push
11 > diffstat = False
11 > diffstat = False
12 > maxsubject = 10
12 > maxsubject = 10
13 >
13 >
14 > [usersubs]
14 > [usersubs]
15 > foo@bar = *
15 > foo@bar = *
16 >
16 >
17 > [reposubs]
17 > [reposubs]
18 > * = baz
18 > * = baz
19 > EOF
19 > EOF
20 $ hg init a
20 $ hg init a
21
21
22 clone
22 clone
23
23
24 $ hg --traceback clone a b
24 $ hg --traceback clone a b
25 updating to branch default
25 updating to branch default
26 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 $ echo a > b/a
27 $ echo a > b/a
28
28
29 commit
29 commit
30
30
31 $ hg --traceback --cwd b commit -Ama
31 $ hg --traceback --cwd b commit -Ama
32 adding a
32 adding a
33 $ echo a >> b/a
33 $ echo a >> b/a
34
34
35 commit
35 commit
36
36
37 $ hg --traceback --cwd b commit -Amb
37 $ hg --traceback --cwd b commit -Amb
38
38
39 push
39 push
40
40
41 $ hg --traceback --cwd b push ../a 2>&1 |
41 $ hg --traceback --cwd b push ../a 2>&1 |
42 > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
42 > $PYTHON -c 'from __future__ import print_function ; import sys,re; print(re.sub("\n\t", " ", sys.stdin.read()), end="")'
43 pushing to ../a
43 pushing to ../a
44 searching for changes
44 searching for changes
45 adding changesets
45 adding changesets
46 adding manifests
46 adding manifests
47 adding file changes
47 adding file changes
48 added 2 changesets with 2 changes to 1 files
48 added 2 changesets with 2 changes to 1 files
49 Content-Type: text/plain; charset="us-ascii"
49 Content-Type: text/plain; charset="us-ascii"
50 MIME-Version: 1.0
50 MIME-Version: 1.0
51 Content-Transfer-Encoding: 7bit
51 Content-Transfer-Encoding: 7bit
52 Date: * (glob)
52 Date: * (glob)
53 Subject: * (glob)
53 Subject: * (glob)
54 From: test
54 From: test
55 X-Hg-Notification: changeset cb9a9f314b8b
55 X-Hg-Notification: changeset cb9a9f314b8b
56 Message-Id: <*> (glob)
56 Message-Id: <*> (glob)
57 To: baz, foo@bar
57 To: baz, foo@bar
58
58
59 changeset cb9a9f314b8b in $TESTTMP/a (glob)
59 changeset cb9a9f314b8b in $TESTTMP/a (glob)
60 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
60 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
61 summary: a
61 summary: a
62
62
63 changeset ba677d0156c1 in $TESTTMP/a (glob)
63 changeset ba677d0156c1 in $TESTTMP/a (glob)
64 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
64 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
65 summary: b
65 summary: b
66
66
67 diffs (6 lines):
67 diffs (6 lines):
68
68
69 diff -r 000000000000 -r ba677d0156c1 a
69 diff -r 000000000000 -r ba677d0156c1 a
70 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
70 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
71 +++ b/a Thu Jan 01 00:00:00 1970 +0000
71 +++ b/a Thu Jan 01 00:00:00 1970 +0000
72 @@ -0,0 +1,2 @@
72 @@ -0,0 +1,2 @@
73 +a
73 +a
74 +a
74 +a
75 $ hg --cwd a rollback
75 $ hg --cwd a rollback
76 repository tip rolled back to revision -1 (undo push)
76 repository tip rolled back to revision -1 (undo push)
77
77
78 unbundle with unrelated source
78 unbundle with unrelated source
79
79
80 $ hg --cwd b bundle ../test.hg ../a
80 $ hg --cwd b bundle ../test.hg ../a
81 searching for changes
81 searching for changes
82 2 changesets found
82 2 changesets found
83 $ hg --cwd a unbundle ../test.hg
83 $ hg --cwd a unbundle ../test.hg
84 adding changesets
84 adding changesets
85 adding manifests
85 adding manifests
86 adding file changes
86 adding file changes
87 added 2 changesets with 2 changes to 1 files
87 added 2 changesets with 2 changes to 1 files
88 (run 'hg update' to get a working copy)
88 (run 'hg update' to get a working copy)
89 $ hg --cwd a rollback
89 $ hg --cwd a rollback
90 repository tip rolled back to revision -1 (undo unbundle)
90 repository tip rolled back to revision -1 (undo unbundle)
91
91
92 unbundle with correct source
92 unbundle with correct source
93
93
94 $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 |
94 $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 |
95 > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
95 > $PYTHON -c 'from __future__ import print_function ; import sys,re; print(re.sub("\n\t", " ", sys.stdin.read()), end="")'
96 adding changesets
96 adding changesets
97 adding manifests
97 adding manifests
98 adding file changes
98 adding file changes
99 added 2 changesets with 2 changes to 1 files
99 added 2 changesets with 2 changes to 1 files
100 Content-Type: text/plain; charset="us-ascii"
100 Content-Type: text/plain; charset="us-ascii"
101 MIME-Version: 1.0
101 MIME-Version: 1.0
102 Content-Transfer-Encoding: 7bit
102 Content-Transfer-Encoding: 7bit
103 Date: * (glob)
103 Date: * (glob)
104 Subject: * (glob)
104 Subject: * (glob)
105 From: test
105 From: test
106 X-Hg-Notification: changeset cb9a9f314b8b
106 X-Hg-Notification: changeset cb9a9f314b8b
107 Message-Id: <*> (glob)
107 Message-Id: <*> (glob)
108 To: baz, foo@bar
108 To: baz, foo@bar
109
109
110 changeset cb9a9f314b8b in $TESTTMP/a (glob)
110 changeset cb9a9f314b8b in $TESTTMP/a (glob)
111 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
111 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
112 summary: a
112 summary: a
113
113
114 changeset ba677d0156c1 in $TESTTMP/a (glob)
114 changeset ba677d0156c1 in $TESTTMP/a (glob)
115 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
115 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
116 summary: b
116 summary: b
117
117
118 diffs (6 lines):
118 diffs (6 lines):
119
119
120 diff -r 000000000000 -r ba677d0156c1 a
120 diff -r 000000000000 -r ba677d0156c1 a
121 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
121 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
122 +++ b/a Thu Jan 01 00:00:00 1970 +0000
122 +++ b/a Thu Jan 01 00:00:00 1970 +0000
123 @@ -0,0 +1,2 @@
123 @@ -0,0 +1,2 @@
124 +a
124 +a
125 +a
125 +a
126 (run 'hg update' to get a working copy)
126 (run 'hg update' to get a working copy)
127
127
128 Check that using the first committer as the author of a changeset works:
128 Check that using the first committer as the author of a changeset works:
129 Check that the config option works.
129 Check that the config option works.
130 Check that the first committer is indeed used for "From:".
130 Check that the first committer is indeed used for "From:".
131 Check that the merge user is NOT used for "From:"
131 Check that the merge user is NOT used for "From:"
132
132
133 Create new file
133 Create new file
134
134
135 $ echo a > b/b
135 $ echo a > b/b
136 $ echo b >> b/b
136 $ echo b >> b/b
137 $ echo c >> b/b
137 $ echo c >> b/b
138 $ hg --traceback --cwd b commit -Amnewfile -u committer_1
138 $ hg --traceback --cwd b commit -Amnewfile -u committer_1
139 adding b
139 adding b
140
140
141 commit as one user
141 commit as one user
142
142
143 $ echo x > b/b
143 $ echo x > b/b
144 $ echo b >> b/b
144 $ echo b >> b/b
145 $ echo c >> b/b
145 $ echo c >> b/b
146 $ hg --traceback --cwd b commit -Amx -u committer_2
146 $ hg --traceback --cwd b commit -Amx -u committer_2
147
147
148 commit as other user, change file so we can do an (automatic) merge
148 commit as other user, change file so we can do an (automatic) merge
149
149
150 $ hg --cwd b up 2
150 $ hg --cwd b up 2
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 $ echo a > b/b
152 $ echo a > b/b
153 $ echo b >> b/b
153 $ echo b >> b/b
154 $ echo y >> b/b
154 $ echo y >> b/b
155 $ hg --traceback --cwd b commit -Amy -u committer_3
155 $ hg --traceback --cwd b commit -Amy -u committer_3
156 created new head
156 created new head
157
157
158 merge as a different user
158 merge as a different user
159
159
160 $ hg --cwd b merge --config notify.fromauthor=True
160 $ hg --cwd b merge --config notify.fromauthor=True
161 merging b
161 merging b
162 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
162 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
163 (branch merge, don't forget to commit)
163 (branch merge, don't forget to commit)
164
164
165 $ hg --traceback --cwd b commit -Am "merged"
165 $ hg --traceback --cwd b commit -Am "merged"
166
166
167 push
167 push
168
168
169 $ hg --traceback --cwd b --config notify.fromauthor=True push ../a 2>&1 |
169 $ hg --traceback --cwd b --config notify.fromauthor=True push ../a 2>&1 |
170 > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
170 > $PYTHON -c 'from __future__ import print_function ; import sys,re; print(re.sub("\n\t", " ", sys.stdin.read()), end="")'
171 pushing to ../a
171 pushing to ../a
172 searching for changes
172 searching for changes
173 adding changesets
173 adding changesets
174 adding manifests
174 adding manifests
175 adding file changes
175 adding file changes
176 added 4 changesets with 4 changes to 1 files
176 added 4 changesets with 4 changes to 1 files
177 Content-Type: text/plain; charset="us-ascii"
177 Content-Type: text/plain; charset="us-ascii"
178 MIME-Version: 1.0
178 MIME-Version: 1.0
179 Content-Transfer-Encoding: 7bit
179 Content-Transfer-Encoding: 7bit
180 Date: * (glob)
180 Date: * (glob)
181 Subject: * (glob)
181 Subject: * (glob)
182 From: committer_1
182 From: committer_1
183 X-Hg-Notification: changeset 84e487dddc58
183 X-Hg-Notification: changeset 84e487dddc58
184 Message-Id: <*> (glob)
184 Message-Id: <*> (glob)
185 To: baz, foo@bar
185 To: baz, foo@bar
186
186
187 changeset 84e487dddc58 in $TESTTMP/a (glob)
187 changeset 84e487dddc58 in $TESTTMP/a (glob)
188 details: $TESTTMP/a?cmd=changeset;node=84e487dddc58
188 details: $TESTTMP/a?cmd=changeset;node=84e487dddc58
189 summary: newfile
189 summary: newfile
190
190
191 changeset b29c7a2b6b0c in $TESTTMP/a (glob)
191 changeset b29c7a2b6b0c in $TESTTMP/a (glob)
192 details: $TESTTMP/a?cmd=changeset;node=b29c7a2b6b0c
192 details: $TESTTMP/a?cmd=changeset;node=b29c7a2b6b0c
193 summary: x
193 summary: x
194
194
195 changeset 0957c7d64886 in $TESTTMP/a (glob)
195 changeset 0957c7d64886 in $TESTTMP/a (glob)
196 details: $TESTTMP/a?cmd=changeset;node=0957c7d64886
196 details: $TESTTMP/a?cmd=changeset;node=0957c7d64886
197 summary: y
197 summary: y
198
198
199 changeset 485b4e6b0249 in $TESTTMP/a (glob)
199 changeset 485b4e6b0249 in $TESTTMP/a (glob)
200 details: $TESTTMP/a?cmd=changeset;node=485b4e6b0249
200 details: $TESTTMP/a?cmd=changeset;node=485b4e6b0249
201 summary: merged
201 summary: merged
202
202
203 diffs (7 lines):
203 diffs (7 lines):
204
204
205 diff -r ba677d0156c1 -r 485b4e6b0249 b
205 diff -r ba677d0156c1 -r 485b4e6b0249 b
206 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
206 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
207 +++ b/b Thu Jan 01 00:00:00 1970 +0000
207 +++ b/b Thu Jan 01 00:00:00 1970 +0000
208 @@ -0,0 +1,3 @@
208 @@ -0,0 +1,3 @@
209 +x
209 +x
210 +b
210 +b
211 +y
211 +y
212 $ hg --cwd a rollback
212 $ hg --cwd a rollback
213 repository tip rolled back to revision 1 (undo push)
213 repository tip rolled back to revision 1 (undo push)
214
214
General Comments 0
You need to be logged in to leave comments. Login now