##// END OF EJS Templates
test: also deactivate `ui.merge` when testing merge tool...
Boris Feld -
r40501:1736450c default
parent child Browse files
Show More
@@ -1,2050 +1,2054 b''
1 test merge-tools configuration - mostly exercising filemerge.py
1 test merge-tools configuration - mostly exercising filemerge.py
2
2
3 $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test
3 $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test
4 $ cat >> $HGRCPATH << EOF
5 > [ui]
6 > merge=
7 > EOF
4 $ hg init repo
8 $ hg init repo
5 $ cd repo
9 $ cd repo
6
10
7 revision 0
11 revision 0
8
12
9 $ echo "revision 0" > f
13 $ echo "revision 0" > f
10 $ echo "space" >> f
14 $ echo "space" >> f
11 $ hg commit -Am "revision 0"
15 $ hg commit -Am "revision 0"
12 adding f
16 adding f
13
17
14 revision 1
18 revision 1
15
19
16 $ echo "revision 1" > f
20 $ echo "revision 1" > f
17 $ echo "space" >> f
21 $ echo "space" >> f
18 $ hg commit -Am "revision 1"
22 $ hg commit -Am "revision 1"
19 $ hg update 0 > /dev/null
23 $ hg update 0 > /dev/null
20
24
21 revision 2
25 revision 2
22
26
23 $ echo "revision 2" > f
27 $ echo "revision 2" > f
24 $ echo "space" >> f
28 $ echo "space" >> f
25 $ hg commit -Am "revision 2"
29 $ hg commit -Am "revision 2"
26 created new head
30 created new head
27 $ hg update 0 > /dev/null
31 $ hg update 0 > /dev/null
28
32
29 revision 3 - simple to merge
33 revision 3 - simple to merge
30
34
31 $ echo "revision 3" >> f
35 $ echo "revision 3" >> f
32 $ hg commit -Am "revision 3"
36 $ hg commit -Am "revision 3"
33 created new head
37 created new head
34
38
35 revision 4 - hard to merge
39 revision 4 - hard to merge
36
40
37 $ hg update 0 > /dev/null
41 $ hg update 0 > /dev/null
38 $ echo "revision 4" > f
42 $ echo "revision 4" > f
39 $ hg commit -Am "revision 4"
43 $ hg commit -Am "revision 4"
40 created new head
44 created new head
41
45
42 $ echo "[merge-tools]" > .hg/hgrc
46 $ echo "[merge-tools]" > .hg/hgrc
43
47
44 $ beforemerge() {
48 $ beforemerge() {
45 > cat .hg/hgrc
49 > cat .hg/hgrc
46 > echo "# hg update -C 1"
50 > echo "# hg update -C 1"
47 > hg update -C 1 > /dev/null
51 > hg update -C 1 > /dev/null
48 > }
52 > }
49 $ aftermerge() {
53 $ aftermerge() {
50 > echo "# cat f"
54 > echo "# cat f"
51 > cat f
55 > cat f
52 > echo "# hg stat"
56 > echo "# hg stat"
53 > hg stat
57 > hg stat
54 > echo "# hg resolve --list"
58 > echo "# hg resolve --list"
55 > hg resolve --list
59 > hg resolve --list
56 > rm -f f.orig
60 > rm -f f.orig
57 > }
61 > }
58
62
59 Tool selection
63 Tool selection
60
64
61 default is internal merge:
65 default is internal merge:
62
66
63 $ beforemerge
67 $ beforemerge
64 [merge-tools]
68 [merge-tools]
65 # hg update -C 1
69 # hg update -C 1
66
70
67 hg merge -r 2
71 hg merge -r 2
68 override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
72 override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
69 running from a devel copy, not a temp installation
73 running from a devel copy, not a temp installation
70
74
71 $ PATH="$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
75 $ PATH="$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
72 merging f
76 merging f
73 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
77 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
74 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
78 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
75 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
79 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
76 [1]
80 [1]
77 $ aftermerge
81 $ aftermerge
78 # cat f
82 # cat f
79 <<<<<<< working copy: ef83787e2614 - test: revision 1
83 <<<<<<< working copy: ef83787e2614 - test: revision 1
80 revision 1
84 revision 1
81 =======
85 =======
82 revision 2
86 revision 2
83 >>>>>>> merge rev: 0185f4e0cf02 - test: revision 2
87 >>>>>>> merge rev: 0185f4e0cf02 - test: revision 2
84 space
88 space
85 # hg stat
89 # hg stat
86 M f
90 M f
87 ? f.orig
91 ? f.orig
88 # hg resolve --list
92 # hg resolve --list
89 U f
93 U f
90
94
91 simplest hgrc using false for merge:
95 simplest hgrc using false for merge:
92
96
93 $ echo "false.whatever=" >> .hg/hgrc
97 $ echo "false.whatever=" >> .hg/hgrc
94 $ beforemerge
98 $ beforemerge
95 [merge-tools]
99 [merge-tools]
96 false.whatever=
100 false.whatever=
97 # hg update -C 1
101 # hg update -C 1
98 $ hg merge -r 2
102 $ hg merge -r 2
99 merging f
103 merging f
100 merging f failed!
104 merging f failed!
101 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
105 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
102 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
106 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
103 [1]
107 [1]
104 $ aftermerge
108 $ aftermerge
105 # cat f
109 # cat f
106 revision 1
110 revision 1
107 space
111 space
108 # hg stat
112 # hg stat
109 M f
113 M f
110 ? f.orig
114 ? f.orig
111 # hg resolve --list
115 # hg resolve --list
112 U f
116 U f
113
117
114 #if unix-permissions
118 #if unix-permissions
115
119
116 unexecutable file in $PATH shouldn't be found:
120 unexecutable file in $PATH shouldn't be found:
117
121
118 $ echo "echo fail" > false
122 $ echo "echo fail" > false
119 $ hg up -qC 1
123 $ hg up -qC 1
120 $ PATH="`pwd`:$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
124 $ PATH="`pwd`:$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
121 merging f
125 merging f
122 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
126 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
123 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
127 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
124 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
128 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
125 [1]
129 [1]
126 $ rm false
130 $ rm false
127
131
128 #endif
132 #endif
129
133
130 executable directory in $PATH shouldn't be found:
134 executable directory in $PATH shouldn't be found:
131
135
132 $ mkdir false
136 $ mkdir false
133 $ hg up -qC 1
137 $ hg up -qC 1
134 $ PATH="`pwd`:$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
138 $ PATH="`pwd`:$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
135 merging f
139 merging f
136 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
140 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
137 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
141 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
138 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
142 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
139 [1]
143 [1]
140 $ rmdir false
144 $ rmdir false
141
145
142 true with higher .priority gets precedence:
146 true with higher .priority gets precedence:
143
147
144 $ echo "true.priority=1" >> .hg/hgrc
148 $ echo "true.priority=1" >> .hg/hgrc
145 $ beforemerge
149 $ beforemerge
146 [merge-tools]
150 [merge-tools]
147 false.whatever=
151 false.whatever=
148 true.priority=1
152 true.priority=1
149 # hg update -C 1
153 # hg update -C 1
150 $ hg merge -r 2
154 $ hg merge -r 2
151 merging f
155 merging f
152 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
156 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
153 (branch merge, don't forget to commit)
157 (branch merge, don't forget to commit)
154 $ aftermerge
158 $ aftermerge
155 # cat f
159 # cat f
156 revision 1
160 revision 1
157 space
161 space
158 # hg stat
162 # hg stat
159 M f
163 M f
160 # hg resolve --list
164 # hg resolve --list
161 R f
165 R f
162
166
163 unless lowered on command line:
167 unless lowered on command line:
164
168
165 $ beforemerge
169 $ beforemerge
166 [merge-tools]
170 [merge-tools]
167 false.whatever=
171 false.whatever=
168 true.priority=1
172 true.priority=1
169 # hg update -C 1
173 # hg update -C 1
170 $ hg merge -r 2 --config merge-tools.true.priority=-7
174 $ hg merge -r 2 --config merge-tools.true.priority=-7
171 merging f
175 merging f
172 merging f failed!
176 merging f failed!
173 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
177 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
174 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
178 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
175 [1]
179 [1]
176 $ aftermerge
180 $ aftermerge
177 # cat f
181 # cat f
178 revision 1
182 revision 1
179 space
183 space
180 # hg stat
184 # hg stat
181 M f
185 M f
182 ? f.orig
186 ? f.orig
183 # hg resolve --list
187 # hg resolve --list
184 U f
188 U f
185
189
186 or false set higher on command line:
190 or false set higher on command line:
187
191
188 $ beforemerge
192 $ beforemerge
189 [merge-tools]
193 [merge-tools]
190 false.whatever=
194 false.whatever=
191 true.priority=1
195 true.priority=1
192 # hg update -C 1
196 # hg update -C 1
193 $ hg merge -r 2 --config merge-tools.false.priority=117
197 $ hg merge -r 2 --config merge-tools.false.priority=117
194 merging f
198 merging f
195 merging f failed!
199 merging f failed!
196 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
200 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
197 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
201 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
198 [1]
202 [1]
199 $ aftermerge
203 $ aftermerge
200 # cat f
204 # cat f
201 revision 1
205 revision 1
202 space
206 space
203 # hg stat
207 # hg stat
204 M f
208 M f
205 ? f.orig
209 ? f.orig
206 # hg resolve --list
210 # hg resolve --list
207 U f
211 U f
208
212
209 or true set to disabled:
213 or true set to disabled:
210 $ beforemerge
214 $ beforemerge
211 [merge-tools]
215 [merge-tools]
212 false.whatever=
216 false.whatever=
213 true.priority=1
217 true.priority=1
214 # hg update -C 1
218 # hg update -C 1
215 $ hg merge -r 2 --config merge-tools.true.disabled=yes
219 $ hg merge -r 2 --config merge-tools.true.disabled=yes
216 merging f
220 merging f
217 merging f failed!
221 merging f failed!
218 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
222 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
219 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
223 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
220 [1]
224 [1]
221 $ aftermerge
225 $ aftermerge
222 # cat f
226 # cat f
223 revision 1
227 revision 1
224 space
228 space
225 # hg stat
229 # hg stat
226 M f
230 M f
227 ? f.orig
231 ? f.orig
228 # hg resolve --list
232 # hg resolve --list
229 U f
233 U f
230
234
231 or true.executable not found in PATH:
235 or true.executable not found in PATH:
232
236
233 $ beforemerge
237 $ beforemerge
234 [merge-tools]
238 [merge-tools]
235 false.whatever=
239 false.whatever=
236 true.priority=1
240 true.priority=1
237 # hg update -C 1
241 # hg update -C 1
238 $ hg merge -r 2 --config merge-tools.true.executable=nonexistentmergetool
242 $ hg merge -r 2 --config merge-tools.true.executable=nonexistentmergetool
239 merging f
243 merging f
240 merging f failed!
244 merging f failed!
241 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
245 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
242 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
246 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
243 [1]
247 [1]
244 $ aftermerge
248 $ aftermerge
245 # cat f
249 # cat f
246 revision 1
250 revision 1
247 space
251 space
248 # hg stat
252 # hg stat
249 M f
253 M f
250 ? f.orig
254 ? f.orig
251 # hg resolve --list
255 # hg resolve --list
252 U f
256 U f
253
257
254 or true.executable with bogus path:
258 or true.executable with bogus path:
255
259
256 $ beforemerge
260 $ beforemerge
257 [merge-tools]
261 [merge-tools]
258 false.whatever=
262 false.whatever=
259 true.priority=1
263 true.priority=1
260 # hg update -C 1
264 # hg update -C 1
261 $ hg merge -r 2 --config merge-tools.true.executable=/nonexistent/mergetool
265 $ hg merge -r 2 --config merge-tools.true.executable=/nonexistent/mergetool
262 merging f
266 merging f
263 merging f failed!
267 merging f failed!
264 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
268 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
265 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
269 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
266 [1]
270 [1]
267 $ aftermerge
271 $ aftermerge
268 # cat f
272 # cat f
269 revision 1
273 revision 1
270 space
274 space
271 # hg stat
275 # hg stat
272 M f
276 M f
273 ? f.orig
277 ? f.orig
274 # hg resolve --list
278 # hg resolve --list
275 U f
279 U f
276
280
277 but true.executable set to cat found in PATH works:
281 but true.executable set to cat found in PATH works:
278
282
279 $ echo "true.executable=cat" >> .hg/hgrc
283 $ echo "true.executable=cat" >> .hg/hgrc
280 $ beforemerge
284 $ beforemerge
281 [merge-tools]
285 [merge-tools]
282 false.whatever=
286 false.whatever=
283 true.priority=1
287 true.priority=1
284 true.executable=cat
288 true.executable=cat
285 # hg update -C 1
289 # hg update -C 1
286 $ hg merge -r 2
290 $ hg merge -r 2
287 merging f
291 merging f
288 revision 1
292 revision 1
289 space
293 space
290 revision 0
294 revision 0
291 space
295 space
292 revision 2
296 revision 2
293 space
297 space
294 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
298 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
295 (branch merge, don't forget to commit)
299 (branch merge, don't forget to commit)
296 $ aftermerge
300 $ aftermerge
297 # cat f
301 # cat f
298 revision 1
302 revision 1
299 space
303 space
300 # hg stat
304 # hg stat
301 M f
305 M f
302 # hg resolve --list
306 # hg resolve --list
303 R f
307 R f
304
308
305 and true.executable set to cat with path works:
309 and true.executable set to cat with path works:
306
310
307 $ beforemerge
311 $ beforemerge
308 [merge-tools]
312 [merge-tools]
309 false.whatever=
313 false.whatever=
310 true.priority=1
314 true.priority=1
311 true.executable=cat
315 true.executable=cat
312 # hg update -C 1
316 # hg update -C 1
313 $ hg merge -r 2 --config merge-tools.true.executable=cat
317 $ hg merge -r 2 --config merge-tools.true.executable=cat
314 merging f
318 merging f
315 revision 1
319 revision 1
316 space
320 space
317 revision 0
321 revision 0
318 space
322 space
319 revision 2
323 revision 2
320 space
324 space
321 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
325 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
322 (branch merge, don't forget to commit)
326 (branch merge, don't forget to commit)
323 $ aftermerge
327 $ aftermerge
324 # cat f
328 # cat f
325 revision 1
329 revision 1
326 space
330 space
327 # hg stat
331 # hg stat
328 M f
332 M f
329 # hg resolve --list
333 # hg resolve --list
330 R f
334 R f
331
335
332 executable set to python script that succeeds:
336 executable set to python script that succeeds:
333
337
334 $ cat > "$TESTTMP/myworkingmerge.py" <<EOF
338 $ cat > "$TESTTMP/myworkingmerge.py" <<EOF
335 > def myworkingmergefn(ui, repo, args, **kwargs):
339 > def myworkingmergefn(ui, repo, args, **kwargs):
336 > return False
340 > return False
337 > EOF
341 > EOF
338 $ beforemerge
342 $ beforemerge
339 [merge-tools]
343 [merge-tools]
340 false.whatever=
344 false.whatever=
341 true.priority=1
345 true.priority=1
342 true.executable=cat
346 true.executable=cat
343 # hg update -C 1
347 # hg update -C 1
344 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py:myworkingmergefn"
348 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py:myworkingmergefn"
345 merging f
349 merging f
346 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
350 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
347 (branch merge, don't forget to commit)
351 (branch merge, don't forget to commit)
348 $ aftermerge
352 $ aftermerge
349 # cat f
353 # cat f
350 revision 1
354 revision 1
351 space
355 space
352 # hg stat
356 # hg stat
353 M f
357 M f
354 # hg resolve --list
358 # hg resolve --list
355 R f
359 R f
356
360
357 executable set to python script that fails:
361 executable set to python script that fails:
358
362
359 $ cat > "$TESTTMP/mybrokenmerge.py" <<EOF
363 $ cat > "$TESTTMP/mybrokenmerge.py" <<EOF
360 > def mybrokenmergefn(ui, repo, args, **kwargs):
364 > def mybrokenmergefn(ui, repo, args, **kwargs):
361 > ui.write(b"some fail message\n")
365 > ui.write(b"some fail message\n")
362 > return True
366 > return True
363 > EOF
367 > EOF
364 $ beforemerge
368 $ beforemerge
365 [merge-tools]
369 [merge-tools]
366 false.whatever=
370 false.whatever=
367 true.priority=1
371 true.priority=1
368 true.executable=cat
372 true.executable=cat
369 # hg update -C 1
373 # hg update -C 1
370 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/mybrokenmerge.py:mybrokenmergefn"
374 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/mybrokenmerge.py:mybrokenmergefn"
371 merging f
375 merging f
372 some fail message
376 some fail message
373 abort: $TESTTMP/mybrokenmerge.py hook failed
377 abort: $TESTTMP/mybrokenmerge.py hook failed
374 [255]
378 [255]
375 $ aftermerge
379 $ aftermerge
376 # cat f
380 # cat f
377 revision 1
381 revision 1
378 space
382 space
379 # hg stat
383 # hg stat
380 ? f.orig
384 ? f.orig
381 # hg resolve --list
385 # hg resolve --list
382 U f
386 U f
383
387
384 executable set to python script that is missing function:
388 executable set to python script that is missing function:
385
389
386 $ beforemerge
390 $ beforemerge
387 [merge-tools]
391 [merge-tools]
388 false.whatever=
392 false.whatever=
389 true.priority=1
393 true.priority=1
390 true.executable=cat
394 true.executable=cat
391 # hg update -C 1
395 # hg update -C 1
392 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py:missingFunction"
396 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py:missingFunction"
393 merging f
397 merging f
394 abort: $TESTTMP/myworkingmerge.py does not have function: missingFunction
398 abort: $TESTTMP/myworkingmerge.py does not have function: missingFunction
395 [255]
399 [255]
396 $ aftermerge
400 $ aftermerge
397 # cat f
401 # cat f
398 revision 1
402 revision 1
399 space
403 space
400 # hg stat
404 # hg stat
401 ? f.orig
405 ? f.orig
402 # hg resolve --list
406 # hg resolve --list
403 U f
407 U f
404
408
405 executable set to missing python script:
409 executable set to missing python script:
406
410
407 $ beforemerge
411 $ beforemerge
408 [merge-tools]
412 [merge-tools]
409 false.whatever=
413 false.whatever=
410 true.priority=1
414 true.priority=1
411 true.executable=cat
415 true.executable=cat
412 # hg update -C 1
416 # hg update -C 1
413 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/missingpythonscript.py:mergefn"
417 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/missingpythonscript.py:mergefn"
414 merging f
418 merging f
415 abort: loading python merge script failed: $TESTTMP/missingpythonscript.py
419 abort: loading python merge script failed: $TESTTMP/missingpythonscript.py
416 [255]
420 [255]
417 $ aftermerge
421 $ aftermerge
418 # cat f
422 # cat f
419 revision 1
423 revision 1
420 space
424 space
421 # hg stat
425 # hg stat
422 ? f.orig
426 ? f.orig
423 # hg resolve --list
427 # hg resolve --list
424 U f
428 U f
425
429
426 executable set to python script but callable function is missing:
430 executable set to python script but callable function is missing:
427
431
428 $ beforemerge
432 $ beforemerge
429 [merge-tools]
433 [merge-tools]
430 false.whatever=
434 false.whatever=
431 true.priority=1
435 true.priority=1
432 true.executable=cat
436 true.executable=cat
433 # hg update -C 1
437 # hg update -C 1
434 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py"
438 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py"
435 abort: invalid 'python:' syntax: python:$TESTTMP/myworkingmerge.py
439 abort: invalid 'python:' syntax: python:$TESTTMP/myworkingmerge.py
436 [255]
440 [255]
437 $ aftermerge
441 $ aftermerge
438 # cat f
442 # cat f
439 revision 1
443 revision 1
440 space
444 space
441 # hg stat
445 # hg stat
442 # hg resolve --list
446 # hg resolve --list
443 U f
447 U f
444
448
445 executable set to python script but callable function is empty string:
449 executable set to python script but callable function is empty string:
446
450
447 $ beforemerge
451 $ beforemerge
448 [merge-tools]
452 [merge-tools]
449 false.whatever=
453 false.whatever=
450 true.priority=1
454 true.priority=1
451 true.executable=cat
455 true.executable=cat
452 # hg update -C 1
456 # hg update -C 1
453 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py:"
457 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/myworkingmerge.py:"
454 abort: invalid 'python:' syntax: python:$TESTTMP/myworkingmerge.py:
458 abort: invalid 'python:' syntax: python:$TESTTMP/myworkingmerge.py:
455 [255]
459 [255]
456 $ aftermerge
460 $ aftermerge
457 # cat f
461 # cat f
458 revision 1
462 revision 1
459 space
463 space
460 # hg stat
464 # hg stat
461 # hg resolve --list
465 # hg resolve --list
462 U f
466 U f
463
467
464 executable set to python script but callable function is missing and path contains colon:
468 executable set to python script but callable function is missing and path contains colon:
465
469
466 $ beforemerge
470 $ beforemerge
467 [merge-tools]
471 [merge-tools]
468 false.whatever=
472 false.whatever=
469 true.priority=1
473 true.priority=1
470 true.executable=cat
474 true.executable=cat
471 # hg update -C 1
475 # hg update -C 1
472 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/some:dir/myworkingmerge.py"
476 $ hg merge -r 2 --config merge-tools.true.executable="python:$TESTTMP/some:dir/myworkingmerge.py"
473 abort: invalid 'python:' syntax: python:$TESTTMP/some:dir/myworkingmerge.py
477 abort: invalid 'python:' syntax: python:$TESTTMP/some:dir/myworkingmerge.py
474 [255]
478 [255]
475 $ aftermerge
479 $ aftermerge
476 # cat f
480 # cat f
477 revision 1
481 revision 1
478 space
482 space
479 # hg stat
483 # hg stat
480 # hg resolve --list
484 # hg resolve --list
481 U f
485 U f
482
486
483 executable set to python script filename that contains spaces:
487 executable set to python script filename that contains spaces:
484
488
485 $ mkdir -p "$TESTTMP/my path"
489 $ mkdir -p "$TESTTMP/my path"
486 $ cat > "$TESTTMP/my path/my working merge with spaces in filename.py" <<EOF
490 $ cat > "$TESTTMP/my path/my working merge with spaces in filename.py" <<EOF
487 > def myworkingmergefn(ui, repo, args, **kwargs):
491 > def myworkingmergefn(ui, repo, args, **kwargs):
488 > return False
492 > return False
489 > EOF
493 > EOF
490 $ beforemerge
494 $ beforemerge
491 [merge-tools]
495 [merge-tools]
492 false.whatever=
496 false.whatever=
493 true.priority=1
497 true.priority=1
494 true.executable=cat
498 true.executable=cat
495 # hg update -C 1
499 # hg update -C 1
496 $ hg merge -r 2 --config "merge-tools.true.executable=python:$TESTTMP/my path/my working merge with spaces in filename.py:myworkingmergefn"
500 $ hg merge -r 2 --config "merge-tools.true.executable=python:$TESTTMP/my path/my working merge with spaces in filename.py:myworkingmergefn"
497 merging f
501 merging f
498 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
502 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
499 (branch merge, don't forget to commit)
503 (branch merge, don't forget to commit)
500 $ aftermerge
504 $ aftermerge
501 # cat f
505 # cat f
502 revision 1
506 revision 1
503 space
507 space
504 # hg stat
508 # hg stat
505 M f
509 M f
506 # hg resolve --list
510 # hg resolve --list
507 R f
511 R f
508
512
509 #if unix-permissions
513 #if unix-permissions
510
514
511 environment variables in true.executable are handled:
515 environment variables in true.executable are handled:
512
516
513 $ echo 'echo "custom merge tool"' > .hg/merge.sh
517 $ echo 'echo "custom merge tool"' > .hg/merge.sh
514 $ beforemerge
518 $ beforemerge
515 [merge-tools]
519 [merge-tools]
516 false.whatever=
520 false.whatever=
517 true.priority=1
521 true.priority=1
518 true.executable=cat
522 true.executable=cat
519 # hg update -C 1
523 # hg update -C 1
520 $ hg --config merge-tools.true.executable='sh' \
524 $ hg --config merge-tools.true.executable='sh' \
521 > --config merge-tools.true.args=.hg/merge.sh \
525 > --config merge-tools.true.args=.hg/merge.sh \
522 > merge -r 2
526 > merge -r 2
523 merging f
527 merging f
524 custom merge tool
528 custom merge tool
525 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
529 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
526 (branch merge, don't forget to commit)
530 (branch merge, don't forget to commit)
527 $ aftermerge
531 $ aftermerge
528 # cat f
532 # cat f
529 revision 1
533 revision 1
530 space
534 space
531 # hg stat
535 # hg stat
532 M f
536 M f
533 # hg resolve --list
537 # hg resolve --list
534 R f
538 R f
535
539
536 #endif
540 #endif
537
541
538 Tool selection and merge-patterns
542 Tool selection and merge-patterns
539
543
540 merge-patterns specifies new tool false:
544 merge-patterns specifies new tool false:
541
545
542 $ beforemerge
546 $ beforemerge
543 [merge-tools]
547 [merge-tools]
544 false.whatever=
548 false.whatever=
545 true.priority=1
549 true.priority=1
546 true.executable=cat
550 true.executable=cat
547 # hg update -C 1
551 # hg update -C 1
548 $ hg merge -r 2 --config merge-patterns.f=false
552 $ hg merge -r 2 --config merge-patterns.f=false
549 merging f
553 merging f
550 merging f failed!
554 merging f failed!
551 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
555 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
552 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
556 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
553 [1]
557 [1]
554 $ aftermerge
558 $ aftermerge
555 # cat f
559 # cat f
556 revision 1
560 revision 1
557 space
561 space
558 # hg stat
562 # hg stat
559 M f
563 M f
560 ? f.orig
564 ? f.orig
561 # hg resolve --list
565 # hg resolve --list
562 U f
566 U f
563
567
564 merge-patterns specifies executable not found in PATH and gets warning:
568 merge-patterns specifies executable not found in PATH and gets warning:
565
569
566 $ beforemerge
570 $ beforemerge
567 [merge-tools]
571 [merge-tools]
568 false.whatever=
572 false.whatever=
569 true.priority=1
573 true.priority=1
570 true.executable=cat
574 true.executable=cat
571 # hg update -C 1
575 # hg update -C 1
572 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool
576 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool
573 couldn't find merge tool true (for pattern f)
577 couldn't find merge tool true (for pattern f)
574 merging f
578 merging f
575 couldn't find merge tool true (for pattern f)
579 couldn't find merge tool true (for pattern f)
576 merging f failed!
580 merging f failed!
577 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
581 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
578 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
582 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
579 [1]
583 [1]
580 $ aftermerge
584 $ aftermerge
581 # cat f
585 # cat f
582 revision 1
586 revision 1
583 space
587 space
584 # hg stat
588 # hg stat
585 M f
589 M f
586 ? f.orig
590 ? f.orig
587 # hg resolve --list
591 # hg resolve --list
588 U f
592 U f
589
593
590 merge-patterns specifies executable with bogus path and gets warning:
594 merge-patterns specifies executable with bogus path and gets warning:
591
595
592 $ beforemerge
596 $ beforemerge
593 [merge-tools]
597 [merge-tools]
594 false.whatever=
598 false.whatever=
595 true.priority=1
599 true.priority=1
596 true.executable=cat
600 true.executable=cat
597 # hg update -C 1
601 # hg update -C 1
598 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool
602 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool
599 couldn't find merge tool true (for pattern f)
603 couldn't find merge tool true (for pattern f)
600 merging f
604 merging f
601 couldn't find merge tool true (for pattern f)
605 couldn't find merge tool true (for pattern f)
602 merging f failed!
606 merging f failed!
603 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
607 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
604 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
608 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
605 [1]
609 [1]
606 $ aftermerge
610 $ aftermerge
607 # cat f
611 # cat f
608 revision 1
612 revision 1
609 space
613 space
610 # hg stat
614 # hg stat
611 M f
615 M f
612 ? f.orig
616 ? f.orig
613 # hg resolve --list
617 # hg resolve --list
614 U f
618 U f
615
619
616 ui.merge overrules priority
620 ui.merge overrules priority
617
621
618 ui.merge specifies false:
622 ui.merge specifies false:
619
623
620 $ beforemerge
624 $ beforemerge
621 [merge-tools]
625 [merge-tools]
622 false.whatever=
626 false.whatever=
623 true.priority=1
627 true.priority=1
624 true.executable=cat
628 true.executable=cat
625 # hg update -C 1
629 # hg update -C 1
626 $ hg merge -r 2 --config ui.merge=false
630 $ hg merge -r 2 --config ui.merge=false
627 merging f
631 merging f
628 merging f failed!
632 merging f failed!
629 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
633 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
630 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
634 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
631 [1]
635 [1]
632 $ aftermerge
636 $ aftermerge
633 # cat f
637 # cat f
634 revision 1
638 revision 1
635 space
639 space
636 # hg stat
640 # hg stat
637 M f
641 M f
638 ? f.orig
642 ? f.orig
639 # hg resolve --list
643 # hg resolve --list
640 U f
644 U f
641
645
642 ui.merge specifies internal:fail:
646 ui.merge specifies internal:fail:
643
647
644 $ beforemerge
648 $ beforemerge
645 [merge-tools]
649 [merge-tools]
646 false.whatever=
650 false.whatever=
647 true.priority=1
651 true.priority=1
648 true.executable=cat
652 true.executable=cat
649 # hg update -C 1
653 # hg update -C 1
650 $ hg merge -r 2 --config ui.merge=internal:fail
654 $ hg merge -r 2 --config ui.merge=internal:fail
651 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
655 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
652 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
656 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
653 [1]
657 [1]
654 $ aftermerge
658 $ aftermerge
655 # cat f
659 # cat f
656 revision 1
660 revision 1
657 space
661 space
658 # hg stat
662 # hg stat
659 M f
663 M f
660 # hg resolve --list
664 # hg resolve --list
661 U f
665 U f
662
666
663 ui.merge specifies :local (without internal prefix):
667 ui.merge specifies :local (without internal prefix):
664
668
665 $ beforemerge
669 $ beforemerge
666 [merge-tools]
670 [merge-tools]
667 false.whatever=
671 false.whatever=
668 true.priority=1
672 true.priority=1
669 true.executable=cat
673 true.executable=cat
670 # hg update -C 1
674 # hg update -C 1
671 $ hg merge -r 2 --config ui.merge=:local
675 $ hg merge -r 2 --config ui.merge=:local
672 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
676 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
673 (branch merge, don't forget to commit)
677 (branch merge, don't forget to commit)
674 $ aftermerge
678 $ aftermerge
675 # cat f
679 # cat f
676 revision 1
680 revision 1
677 space
681 space
678 # hg stat
682 # hg stat
679 M f
683 M f
680 # hg resolve --list
684 # hg resolve --list
681 R f
685 R f
682
686
683 ui.merge specifies internal:other:
687 ui.merge specifies internal:other:
684
688
685 $ beforemerge
689 $ beforemerge
686 [merge-tools]
690 [merge-tools]
687 false.whatever=
691 false.whatever=
688 true.priority=1
692 true.priority=1
689 true.executable=cat
693 true.executable=cat
690 # hg update -C 1
694 # hg update -C 1
691 $ hg merge -r 2 --config ui.merge=internal:other
695 $ hg merge -r 2 --config ui.merge=internal:other
692 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
696 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
693 (branch merge, don't forget to commit)
697 (branch merge, don't forget to commit)
694 $ aftermerge
698 $ aftermerge
695 # cat f
699 # cat f
696 revision 2
700 revision 2
697 space
701 space
698 # hg stat
702 # hg stat
699 M f
703 M f
700 # hg resolve --list
704 # hg resolve --list
701 R f
705 R f
702
706
703 ui.merge specifies internal:prompt:
707 ui.merge specifies internal:prompt:
704
708
705 $ beforemerge
709 $ beforemerge
706 [merge-tools]
710 [merge-tools]
707 false.whatever=
711 false.whatever=
708 true.priority=1
712 true.priority=1
709 true.executable=cat
713 true.executable=cat
710 # hg update -C 1
714 # hg update -C 1
711 $ hg merge -r 2 --config ui.merge=internal:prompt
715 $ hg merge -r 2 --config ui.merge=internal:prompt
712 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
716 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
713 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
717 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
714 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
718 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
715 [1]
719 [1]
716 $ aftermerge
720 $ aftermerge
717 # cat f
721 # cat f
718 revision 1
722 revision 1
719 space
723 space
720 # hg stat
724 # hg stat
721 M f
725 M f
722 # hg resolve --list
726 # hg resolve --list
723 U f
727 U f
724
728
725 ui.merge specifies :prompt, with 'leave unresolved' chosen
729 ui.merge specifies :prompt, with 'leave unresolved' chosen
726
730
727 $ beforemerge
731 $ beforemerge
728 [merge-tools]
732 [merge-tools]
729 false.whatever=
733 false.whatever=
730 true.priority=1
734 true.priority=1
731 true.executable=cat
735 true.executable=cat
732 # hg update -C 1
736 # hg update -C 1
733 $ hg merge -r 2 --config ui.merge=:prompt --config ui.interactive=True << EOF
737 $ hg merge -r 2 --config ui.merge=:prompt --config ui.interactive=True << EOF
734 > u
738 > u
735 > EOF
739 > EOF
736 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
740 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
737 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
741 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
738 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
742 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
739 [1]
743 [1]
740 $ aftermerge
744 $ aftermerge
741 # cat f
745 # cat f
742 revision 1
746 revision 1
743 space
747 space
744 # hg stat
748 # hg stat
745 M f
749 M f
746 # hg resolve --list
750 # hg resolve --list
747 U f
751 U f
748
752
749 prompt with EOF
753 prompt with EOF
750
754
751 $ beforemerge
755 $ beforemerge
752 [merge-tools]
756 [merge-tools]
753 false.whatever=
757 false.whatever=
754 true.priority=1
758 true.priority=1
755 true.executable=cat
759 true.executable=cat
756 # hg update -C 1
760 # hg update -C 1
757 $ hg merge -r 2 --config ui.merge=internal:prompt --config ui.interactive=true
761 $ hg merge -r 2 --config ui.merge=internal:prompt --config ui.interactive=true
758 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f?
762 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f?
759 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
763 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
760 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
764 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
761 [1]
765 [1]
762 $ aftermerge
766 $ aftermerge
763 # cat f
767 # cat f
764 revision 1
768 revision 1
765 space
769 space
766 # hg stat
770 # hg stat
767 M f
771 M f
768 # hg resolve --list
772 # hg resolve --list
769 U f
773 U f
770 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
774 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
771 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f?
775 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f?
772 [1]
776 [1]
773 $ aftermerge
777 $ aftermerge
774 # cat f
778 # cat f
775 revision 1
779 revision 1
776 space
780 space
777 # hg stat
781 # hg stat
778 M f
782 M f
779 ? f.orig
783 ? f.orig
780 # hg resolve --list
784 # hg resolve --list
781 U f
785 U f
782 $ rm f
786 $ rm f
783 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
787 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
784 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f?
788 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f?
785 [1]
789 [1]
786 $ aftermerge
790 $ aftermerge
787 # cat f
791 # cat f
788 revision 1
792 revision 1
789 space
793 space
790 # hg stat
794 # hg stat
791 M f
795 M f
792 # hg resolve --list
796 # hg resolve --list
793 U f
797 U f
794 $ hg resolve --all --config ui.merge=internal:prompt
798 $ hg resolve --all --config ui.merge=internal:prompt
795 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
799 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
796 [1]
800 [1]
797 $ aftermerge
801 $ aftermerge
798 # cat f
802 # cat f
799 revision 1
803 revision 1
800 space
804 space
801 # hg stat
805 # hg stat
802 M f
806 M f
803 ? f.orig
807 ? f.orig
804 # hg resolve --list
808 # hg resolve --list
805 U f
809 U f
806
810
807 ui.merge specifies internal:dump:
811 ui.merge specifies internal:dump:
808
812
809 $ beforemerge
813 $ beforemerge
810 [merge-tools]
814 [merge-tools]
811 false.whatever=
815 false.whatever=
812 true.priority=1
816 true.priority=1
813 true.executable=cat
817 true.executable=cat
814 # hg update -C 1
818 # hg update -C 1
815 $ hg merge -r 2 --config ui.merge=internal:dump
819 $ hg merge -r 2 --config ui.merge=internal:dump
816 merging f
820 merging f
817 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
821 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
818 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
822 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
819 [1]
823 [1]
820 $ aftermerge
824 $ aftermerge
821 # cat f
825 # cat f
822 revision 1
826 revision 1
823 space
827 space
824 # hg stat
828 # hg stat
825 M f
829 M f
826 ? f.base
830 ? f.base
827 ? f.local
831 ? f.local
828 ? f.orig
832 ? f.orig
829 ? f.other
833 ? f.other
830 # hg resolve --list
834 # hg resolve --list
831 U f
835 U f
832
836
833 f.base:
837 f.base:
834
838
835 $ cat f.base
839 $ cat f.base
836 revision 0
840 revision 0
837 space
841 space
838
842
839 f.local:
843 f.local:
840
844
841 $ cat f.local
845 $ cat f.local
842 revision 1
846 revision 1
843 space
847 space
844
848
845 f.other:
849 f.other:
846
850
847 $ cat f.other
851 $ cat f.other
848 revision 2
852 revision 2
849 space
853 space
850 $ rm f.base f.local f.other
854 $ rm f.base f.local f.other
851
855
852 check that internal:dump doesn't dump files if premerge runs
856 check that internal:dump doesn't dump files if premerge runs
853 successfully
857 successfully
854
858
855 $ beforemerge
859 $ beforemerge
856 [merge-tools]
860 [merge-tools]
857 false.whatever=
861 false.whatever=
858 true.priority=1
862 true.priority=1
859 true.executable=cat
863 true.executable=cat
860 # hg update -C 1
864 # hg update -C 1
861 $ hg merge -r 3 --config ui.merge=internal:dump
865 $ hg merge -r 3 --config ui.merge=internal:dump
862 merging f
866 merging f
863 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
867 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
864 (branch merge, don't forget to commit)
868 (branch merge, don't forget to commit)
865
869
866 $ aftermerge
870 $ aftermerge
867 # cat f
871 # cat f
868 revision 1
872 revision 1
869 space
873 space
870 revision 3
874 revision 3
871 # hg stat
875 # hg stat
872 M f
876 M f
873 # hg resolve --list
877 # hg resolve --list
874 R f
878 R f
875
879
876 check that internal:forcedump dumps files, even if local and other can
880 check that internal:forcedump dumps files, even if local and other can
877 be merged easily
881 be merged easily
878
882
879 $ beforemerge
883 $ beforemerge
880 [merge-tools]
884 [merge-tools]
881 false.whatever=
885 false.whatever=
882 true.priority=1
886 true.priority=1
883 true.executable=cat
887 true.executable=cat
884 # hg update -C 1
888 # hg update -C 1
885 $ hg merge -r 3 --config ui.merge=internal:forcedump
889 $ hg merge -r 3 --config ui.merge=internal:forcedump
886 merging f
890 merging f
887 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
891 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
888 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
892 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
889 [1]
893 [1]
890 $ aftermerge
894 $ aftermerge
891 # cat f
895 # cat f
892 revision 1
896 revision 1
893 space
897 space
894 # hg stat
898 # hg stat
895 M f
899 M f
896 ? f.base
900 ? f.base
897 ? f.local
901 ? f.local
898 ? f.orig
902 ? f.orig
899 ? f.other
903 ? f.other
900 # hg resolve --list
904 # hg resolve --list
901 U f
905 U f
902
906
903 $ cat f.base
907 $ cat f.base
904 revision 0
908 revision 0
905 space
909 space
906
910
907 $ cat f.local
911 $ cat f.local
908 revision 1
912 revision 1
909 space
913 space
910
914
911 $ cat f.other
915 $ cat f.other
912 revision 0
916 revision 0
913 space
917 space
914 revision 3
918 revision 3
915
919
916 $ rm -f f.base f.local f.other
920 $ rm -f f.base f.local f.other
917
921
918 ui.merge specifies internal:other but is overruled by pattern for false:
922 ui.merge specifies internal:other but is overruled by pattern for false:
919
923
920 $ beforemerge
924 $ beforemerge
921 [merge-tools]
925 [merge-tools]
922 false.whatever=
926 false.whatever=
923 true.priority=1
927 true.priority=1
924 true.executable=cat
928 true.executable=cat
925 # hg update -C 1
929 # hg update -C 1
926 $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
930 $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
927 merging f
931 merging f
928 merging f failed!
932 merging f failed!
929 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
933 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
930 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
934 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
931 [1]
935 [1]
932 $ aftermerge
936 $ aftermerge
933 # cat f
937 # cat f
934 revision 1
938 revision 1
935 space
939 space
936 # hg stat
940 # hg stat
937 M f
941 M f
938 ? f.orig
942 ? f.orig
939 # hg resolve --list
943 # hg resolve --list
940 U f
944 U f
941
945
942 Premerge
946 Premerge
943
947
944 ui.merge specifies internal:other but is overruled by --tool=false
948 ui.merge specifies internal:other but is overruled by --tool=false
945
949
946 $ beforemerge
950 $ beforemerge
947 [merge-tools]
951 [merge-tools]
948 false.whatever=
952 false.whatever=
949 true.priority=1
953 true.priority=1
950 true.executable=cat
954 true.executable=cat
951 # hg update -C 1
955 # hg update -C 1
952 $ hg merge -r 2 --config ui.merge=internal:other --tool=false
956 $ hg merge -r 2 --config ui.merge=internal:other --tool=false
953 merging f
957 merging f
954 merging f failed!
958 merging f failed!
955 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
959 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
956 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
960 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
957 [1]
961 [1]
958 $ aftermerge
962 $ aftermerge
959 # cat f
963 # cat f
960 revision 1
964 revision 1
961 space
965 space
962 # hg stat
966 # hg stat
963 M f
967 M f
964 ? f.orig
968 ? f.orig
965 # hg resolve --list
969 # hg resolve --list
966 U f
970 U f
967
971
968 HGMERGE specifies internal:other but is overruled by --tool=false
972 HGMERGE specifies internal:other but is overruled by --tool=false
969
973
970 $ HGMERGE=internal:other ; export HGMERGE
974 $ HGMERGE=internal:other ; export HGMERGE
971 $ beforemerge
975 $ beforemerge
972 [merge-tools]
976 [merge-tools]
973 false.whatever=
977 false.whatever=
974 true.priority=1
978 true.priority=1
975 true.executable=cat
979 true.executable=cat
976 # hg update -C 1
980 # hg update -C 1
977 $ hg merge -r 2 --tool=false
981 $ hg merge -r 2 --tool=false
978 merging f
982 merging f
979 merging f failed!
983 merging f failed!
980 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
984 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
981 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
985 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
982 [1]
986 [1]
983 $ aftermerge
987 $ aftermerge
984 # cat f
988 # cat f
985 revision 1
989 revision 1
986 space
990 space
987 # hg stat
991 # hg stat
988 M f
992 M f
989 ? f.orig
993 ? f.orig
990 # hg resolve --list
994 # hg resolve --list
991 U f
995 U f
992
996
993 $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
997 $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
994
998
995 update is a merge ...
999 update is a merge ...
996
1000
997 (this also tests that files reverted with '--rev REV' are treated as
1001 (this also tests that files reverted with '--rev REV' are treated as
998 "modified", even if none of mode, size and timestamp of them isn't
1002 "modified", even if none of mode, size and timestamp of them isn't
999 changed on the filesystem (see also issue4583))
1003 changed on the filesystem (see also issue4583))
1000
1004
1001 $ cat >> $HGRCPATH <<EOF
1005 $ cat >> $HGRCPATH <<EOF
1002 > [fakedirstatewritetime]
1006 > [fakedirstatewritetime]
1003 > # emulate invoking dirstate.write() via repo.status()
1007 > # emulate invoking dirstate.write() via repo.status()
1004 > # at 2000-01-01 00:00
1008 > # at 2000-01-01 00:00
1005 > fakenow = 200001010000
1009 > fakenow = 200001010000
1006 > EOF
1010 > EOF
1007
1011
1008 $ beforemerge
1012 $ beforemerge
1009 [merge-tools]
1013 [merge-tools]
1010 false.whatever=
1014 false.whatever=
1011 true.priority=1
1015 true.priority=1
1012 true.executable=cat
1016 true.executable=cat
1013 # hg update -C 1
1017 # hg update -C 1
1014 $ hg update -q 0
1018 $ hg update -q 0
1015 $ f -s f
1019 $ f -s f
1016 f: size=17
1020 f: size=17
1017 $ touch -t 200001010000 f
1021 $ touch -t 200001010000 f
1018 $ hg debugrebuildstate
1022 $ hg debugrebuildstate
1019 $ cat >> $HGRCPATH <<EOF
1023 $ cat >> $HGRCPATH <<EOF
1020 > [extensions]
1024 > [extensions]
1021 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
1025 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
1022 > EOF
1026 > EOF
1023 $ hg revert -q -r 1 .
1027 $ hg revert -q -r 1 .
1024 $ cat >> $HGRCPATH <<EOF
1028 $ cat >> $HGRCPATH <<EOF
1025 > [extensions]
1029 > [extensions]
1026 > fakedirstatewritetime = !
1030 > fakedirstatewritetime = !
1027 > EOF
1031 > EOF
1028 $ f -s f
1032 $ f -s f
1029 f: size=17
1033 f: size=17
1030 $ touch -t 200001010000 f
1034 $ touch -t 200001010000 f
1031 $ hg status f
1035 $ hg status f
1032 M f
1036 M f
1033 $ hg update -r 2
1037 $ hg update -r 2
1034 merging f
1038 merging f
1035 revision 1
1039 revision 1
1036 space
1040 space
1037 revision 0
1041 revision 0
1038 space
1042 space
1039 revision 2
1043 revision 2
1040 space
1044 space
1041 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1045 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1042 $ aftermerge
1046 $ aftermerge
1043 # cat f
1047 # cat f
1044 revision 1
1048 revision 1
1045 space
1049 space
1046 # hg stat
1050 # hg stat
1047 M f
1051 M f
1048 # hg resolve --list
1052 # hg resolve --list
1049 R f
1053 R f
1050
1054
1051 update should also have --tool
1055 update should also have --tool
1052
1056
1053 $ beforemerge
1057 $ beforemerge
1054 [merge-tools]
1058 [merge-tools]
1055 false.whatever=
1059 false.whatever=
1056 true.priority=1
1060 true.priority=1
1057 true.executable=cat
1061 true.executable=cat
1058 # hg update -C 1
1062 # hg update -C 1
1059 $ hg update -q 0
1063 $ hg update -q 0
1060 $ f -s f
1064 $ f -s f
1061 f: size=17
1065 f: size=17
1062 $ touch -t 200001010000 f
1066 $ touch -t 200001010000 f
1063 $ hg debugrebuildstate
1067 $ hg debugrebuildstate
1064 $ cat >> $HGRCPATH <<EOF
1068 $ cat >> $HGRCPATH <<EOF
1065 > [extensions]
1069 > [extensions]
1066 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
1070 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
1067 > EOF
1071 > EOF
1068 $ hg revert -q -r 1 .
1072 $ hg revert -q -r 1 .
1069 $ cat >> $HGRCPATH <<EOF
1073 $ cat >> $HGRCPATH <<EOF
1070 > [extensions]
1074 > [extensions]
1071 > fakedirstatewritetime = !
1075 > fakedirstatewritetime = !
1072 > EOF
1076 > EOF
1073 $ f -s f
1077 $ f -s f
1074 f: size=17
1078 f: size=17
1075 $ touch -t 200001010000 f
1079 $ touch -t 200001010000 f
1076 $ hg status f
1080 $ hg status f
1077 M f
1081 M f
1078 $ hg update -r 2 --tool false
1082 $ hg update -r 2 --tool false
1079 merging f
1083 merging f
1080 merging f failed!
1084 merging f failed!
1081 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1085 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1082 use 'hg resolve' to retry unresolved file merges
1086 use 'hg resolve' to retry unresolved file merges
1083 [1]
1087 [1]
1084 $ aftermerge
1088 $ aftermerge
1085 # cat f
1089 # cat f
1086 revision 1
1090 revision 1
1087 space
1091 space
1088 # hg stat
1092 # hg stat
1089 M f
1093 M f
1090 ? f.orig
1094 ? f.orig
1091 # hg resolve --list
1095 # hg resolve --list
1092 U f
1096 U f
1093
1097
1094 Default is silent simplemerge:
1098 Default is silent simplemerge:
1095
1099
1096 $ beforemerge
1100 $ beforemerge
1097 [merge-tools]
1101 [merge-tools]
1098 false.whatever=
1102 false.whatever=
1099 true.priority=1
1103 true.priority=1
1100 true.executable=cat
1104 true.executable=cat
1101 # hg update -C 1
1105 # hg update -C 1
1102 $ hg merge -r 3
1106 $ hg merge -r 3
1103 merging f
1107 merging f
1104 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1108 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1105 (branch merge, don't forget to commit)
1109 (branch merge, don't forget to commit)
1106 $ aftermerge
1110 $ aftermerge
1107 # cat f
1111 # cat f
1108 revision 1
1112 revision 1
1109 space
1113 space
1110 revision 3
1114 revision 3
1111 # hg stat
1115 # hg stat
1112 M f
1116 M f
1113 # hg resolve --list
1117 # hg resolve --list
1114 R f
1118 R f
1115
1119
1116 .premerge=True is same:
1120 .premerge=True is same:
1117
1121
1118 $ beforemerge
1122 $ beforemerge
1119 [merge-tools]
1123 [merge-tools]
1120 false.whatever=
1124 false.whatever=
1121 true.priority=1
1125 true.priority=1
1122 true.executable=cat
1126 true.executable=cat
1123 # hg update -C 1
1127 # hg update -C 1
1124 $ hg merge -r 3 --config merge-tools.true.premerge=True
1128 $ hg merge -r 3 --config merge-tools.true.premerge=True
1125 merging f
1129 merging f
1126 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1130 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1127 (branch merge, don't forget to commit)
1131 (branch merge, don't forget to commit)
1128 $ aftermerge
1132 $ aftermerge
1129 # cat f
1133 # cat f
1130 revision 1
1134 revision 1
1131 space
1135 space
1132 revision 3
1136 revision 3
1133 # hg stat
1137 # hg stat
1134 M f
1138 M f
1135 # hg resolve --list
1139 # hg resolve --list
1136 R f
1140 R f
1137
1141
1138 .premerge=False executes merge-tool:
1142 .premerge=False executes merge-tool:
1139
1143
1140 $ beforemerge
1144 $ beforemerge
1141 [merge-tools]
1145 [merge-tools]
1142 false.whatever=
1146 false.whatever=
1143 true.priority=1
1147 true.priority=1
1144 true.executable=cat
1148 true.executable=cat
1145 # hg update -C 1
1149 # hg update -C 1
1146 $ hg merge -r 3 --config merge-tools.true.premerge=False
1150 $ hg merge -r 3 --config merge-tools.true.premerge=False
1147 merging f
1151 merging f
1148 revision 1
1152 revision 1
1149 space
1153 space
1150 revision 0
1154 revision 0
1151 space
1155 space
1152 revision 0
1156 revision 0
1153 space
1157 space
1154 revision 3
1158 revision 3
1155 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1159 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1156 (branch merge, don't forget to commit)
1160 (branch merge, don't forget to commit)
1157 $ aftermerge
1161 $ aftermerge
1158 # cat f
1162 # cat f
1159 revision 1
1163 revision 1
1160 space
1164 space
1161 # hg stat
1165 # hg stat
1162 M f
1166 M f
1163 # hg resolve --list
1167 # hg resolve --list
1164 R f
1168 R f
1165
1169
1166 premerge=keep keeps conflict markers in:
1170 premerge=keep keeps conflict markers in:
1167
1171
1168 $ beforemerge
1172 $ beforemerge
1169 [merge-tools]
1173 [merge-tools]
1170 false.whatever=
1174 false.whatever=
1171 true.priority=1
1175 true.priority=1
1172 true.executable=cat
1176 true.executable=cat
1173 # hg update -C 1
1177 # hg update -C 1
1174 $ hg merge -r 4 --config merge-tools.true.premerge=keep
1178 $ hg merge -r 4 --config merge-tools.true.premerge=keep
1175 merging f
1179 merging f
1176 <<<<<<< working copy: ef83787e2614 - test: revision 1
1180 <<<<<<< working copy: ef83787e2614 - test: revision 1
1177 revision 1
1181 revision 1
1178 space
1182 space
1179 =======
1183 =======
1180 revision 4
1184 revision 4
1181 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1185 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1182 revision 0
1186 revision 0
1183 space
1187 space
1184 revision 4
1188 revision 4
1185 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1189 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1186 (branch merge, don't forget to commit)
1190 (branch merge, don't forget to commit)
1187 $ aftermerge
1191 $ aftermerge
1188 # cat f
1192 # cat f
1189 <<<<<<< working copy: ef83787e2614 - test: revision 1
1193 <<<<<<< working copy: ef83787e2614 - test: revision 1
1190 revision 1
1194 revision 1
1191 space
1195 space
1192 =======
1196 =======
1193 revision 4
1197 revision 4
1194 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1198 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1195 # hg stat
1199 # hg stat
1196 M f
1200 M f
1197 # hg resolve --list
1201 # hg resolve --list
1198 R f
1202 R f
1199
1203
1200 premerge=keep-merge3 keeps conflict markers with base content:
1204 premerge=keep-merge3 keeps conflict markers with base content:
1201
1205
1202 $ beforemerge
1206 $ beforemerge
1203 [merge-tools]
1207 [merge-tools]
1204 false.whatever=
1208 false.whatever=
1205 true.priority=1
1209 true.priority=1
1206 true.executable=cat
1210 true.executable=cat
1207 # hg update -C 1
1211 # hg update -C 1
1208 $ hg merge -r 4 --config merge-tools.true.premerge=keep-merge3
1212 $ hg merge -r 4 --config merge-tools.true.premerge=keep-merge3
1209 merging f
1213 merging f
1210 <<<<<<< working copy: ef83787e2614 - test: revision 1
1214 <<<<<<< working copy: ef83787e2614 - test: revision 1
1211 revision 1
1215 revision 1
1212 space
1216 space
1213 ||||||| base
1217 ||||||| base
1214 revision 0
1218 revision 0
1215 space
1219 space
1216 =======
1220 =======
1217 revision 4
1221 revision 4
1218 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1222 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1219 revision 0
1223 revision 0
1220 space
1224 space
1221 revision 4
1225 revision 4
1222 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1226 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1223 (branch merge, don't forget to commit)
1227 (branch merge, don't forget to commit)
1224 $ aftermerge
1228 $ aftermerge
1225 # cat f
1229 # cat f
1226 <<<<<<< working copy: ef83787e2614 - test: revision 1
1230 <<<<<<< working copy: ef83787e2614 - test: revision 1
1227 revision 1
1231 revision 1
1228 space
1232 space
1229 ||||||| base
1233 ||||||| base
1230 revision 0
1234 revision 0
1231 space
1235 space
1232 =======
1236 =======
1233 revision 4
1237 revision 4
1234 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1238 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1235 # hg stat
1239 # hg stat
1236 M f
1240 M f
1237 # hg resolve --list
1241 # hg resolve --list
1238 R f
1242 R f
1239
1243
1240 premerge=keep respects ui.mergemarkers=basic:
1244 premerge=keep respects ui.mergemarkers=basic:
1241
1245
1242 $ beforemerge
1246 $ beforemerge
1243 [merge-tools]
1247 [merge-tools]
1244 false.whatever=
1248 false.whatever=
1245 true.priority=1
1249 true.priority=1
1246 true.executable=cat
1250 true.executable=cat
1247 # hg update -C 1
1251 # hg update -C 1
1248 $ hg merge -r 4 --config merge-tools.true.premerge=keep --config ui.mergemarkers=basic
1252 $ hg merge -r 4 --config merge-tools.true.premerge=keep --config ui.mergemarkers=basic
1249 merging f
1253 merging f
1250 <<<<<<< working copy
1254 <<<<<<< working copy
1251 revision 1
1255 revision 1
1252 space
1256 space
1253 =======
1257 =======
1254 revision 4
1258 revision 4
1255 >>>>>>> merge rev
1259 >>>>>>> merge rev
1256 revision 0
1260 revision 0
1257 space
1261 space
1258 revision 4
1262 revision 4
1259 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1263 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1260 (branch merge, don't forget to commit)
1264 (branch merge, don't forget to commit)
1261 $ aftermerge
1265 $ aftermerge
1262 # cat f
1266 # cat f
1263 <<<<<<< working copy
1267 <<<<<<< working copy
1264 revision 1
1268 revision 1
1265 space
1269 space
1266 =======
1270 =======
1267 revision 4
1271 revision 4
1268 >>>>>>> merge rev
1272 >>>>>>> merge rev
1269 # hg stat
1273 # hg stat
1270 M f
1274 M f
1271 # hg resolve --list
1275 # hg resolve --list
1272 R f
1276 R f
1273
1277
1274 premerge=keep ignores ui.mergemarkers=basic if true.mergemarkers=detailed:
1278 premerge=keep ignores ui.mergemarkers=basic if true.mergemarkers=detailed:
1275
1279
1276 $ beforemerge
1280 $ beforemerge
1277 [merge-tools]
1281 [merge-tools]
1278 false.whatever=
1282 false.whatever=
1279 true.priority=1
1283 true.priority=1
1280 true.executable=cat
1284 true.executable=cat
1281 # hg update -C 1
1285 # hg update -C 1
1282 $ hg merge -r 4 --config merge-tools.true.premerge=keep \
1286 $ hg merge -r 4 --config merge-tools.true.premerge=keep \
1283 > --config ui.mergemarkers=basic \
1287 > --config ui.mergemarkers=basic \
1284 > --config merge-tools.true.mergemarkers=detailed
1288 > --config merge-tools.true.mergemarkers=detailed
1285 merging f
1289 merging f
1286 <<<<<<< working copy: ef83787e2614 - test: revision 1
1290 <<<<<<< working copy: ef83787e2614 - test: revision 1
1287 revision 1
1291 revision 1
1288 space
1292 space
1289 =======
1293 =======
1290 revision 4
1294 revision 4
1291 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1295 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1292 revision 0
1296 revision 0
1293 space
1297 space
1294 revision 4
1298 revision 4
1295 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1299 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1296 (branch merge, don't forget to commit)
1300 (branch merge, don't forget to commit)
1297 $ aftermerge
1301 $ aftermerge
1298 # cat f
1302 # cat f
1299 <<<<<<< working copy: ef83787e2614 - test: revision 1
1303 <<<<<<< working copy: ef83787e2614 - test: revision 1
1300 revision 1
1304 revision 1
1301 space
1305 space
1302 =======
1306 =======
1303 revision 4
1307 revision 4
1304 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1308 >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
1305 # hg stat
1309 # hg stat
1306 M f
1310 M f
1307 # hg resolve --list
1311 # hg resolve --list
1308 R f
1312 R f
1309
1313
1310 premerge=keep respects ui.mergemarkertemplate instead of
1314 premerge=keep respects ui.mergemarkertemplate instead of
1311 true.mergemarkertemplate if true.mergemarkers=basic:
1315 true.mergemarkertemplate if true.mergemarkers=basic:
1312
1316
1313 $ beforemerge
1317 $ beforemerge
1314 [merge-tools]
1318 [merge-tools]
1315 false.whatever=
1319 false.whatever=
1316 true.priority=1
1320 true.priority=1
1317 true.executable=cat
1321 true.executable=cat
1318 # hg update -C 1
1322 # hg update -C 1
1319 $ hg merge -r 4 --config merge-tools.true.premerge=keep \
1323 $ hg merge -r 4 --config merge-tools.true.premerge=keep \
1320 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1324 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1321 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}'
1325 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}'
1322 merging f
1326 merging f
1323 <<<<<<< working copy: uitmpl 1
1327 <<<<<<< working copy: uitmpl 1
1324 revision 1
1328 revision 1
1325 space
1329 space
1326 =======
1330 =======
1327 revision 4
1331 revision 4
1328 >>>>>>> merge rev: uitmpl 4
1332 >>>>>>> merge rev: uitmpl 4
1329 revision 0
1333 revision 0
1330 space
1334 space
1331 revision 4
1335 revision 4
1332 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1336 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1333 (branch merge, don't forget to commit)
1337 (branch merge, don't forget to commit)
1334 $ aftermerge
1338 $ aftermerge
1335 # cat f
1339 # cat f
1336 <<<<<<< working copy: uitmpl 1
1340 <<<<<<< working copy: uitmpl 1
1337 revision 1
1341 revision 1
1338 space
1342 space
1339 =======
1343 =======
1340 revision 4
1344 revision 4
1341 >>>>>>> merge rev: uitmpl 4
1345 >>>>>>> merge rev: uitmpl 4
1342 # hg stat
1346 # hg stat
1343 M f
1347 M f
1344 # hg resolve --list
1348 # hg resolve --list
1345 R f
1349 R f
1346
1350
1347 premerge=keep respects true.mergemarkertemplate instead of
1351 premerge=keep respects true.mergemarkertemplate instead of
1348 true.mergemarkertemplate if true.mergemarkers=detailed:
1352 true.mergemarkertemplate if true.mergemarkers=detailed:
1349
1353
1350 $ beforemerge
1354 $ beforemerge
1351 [merge-tools]
1355 [merge-tools]
1352 false.whatever=
1356 false.whatever=
1353 true.priority=1
1357 true.priority=1
1354 true.executable=cat
1358 true.executable=cat
1355 # hg update -C 1
1359 # hg update -C 1
1356 $ hg merge -r 4 --config merge-tools.true.premerge=keep \
1360 $ hg merge -r 4 --config merge-tools.true.premerge=keep \
1357 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1361 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1358 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1362 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1359 > --config merge-tools.true.mergemarkers=detailed
1363 > --config merge-tools.true.mergemarkers=detailed
1360 merging f
1364 merging f
1361 <<<<<<< working copy: tooltmpl ef83787e2614
1365 <<<<<<< working copy: tooltmpl ef83787e2614
1362 revision 1
1366 revision 1
1363 space
1367 space
1364 =======
1368 =======
1365 revision 4
1369 revision 4
1366 >>>>>>> merge rev: tooltmpl 81448d39c9a0
1370 >>>>>>> merge rev: tooltmpl 81448d39c9a0
1367 revision 0
1371 revision 0
1368 space
1372 space
1369 revision 4
1373 revision 4
1370 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1374 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1371 (branch merge, don't forget to commit)
1375 (branch merge, don't forget to commit)
1372 $ aftermerge
1376 $ aftermerge
1373 # cat f
1377 # cat f
1374 <<<<<<< working copy: tooltmpl ef83787e2614
1378 <<<<<<< working copy: tooltmpl ef83787e2614
1375 revision 1
1379 revision 1
1376 space
1380 space
1377 =======
1381 =======
1378 revision 4
1382 revision 4
1379 >>>>>>> merge rev: tooltmpl 81448d39c9a0
1383 >>>>>>> merge rev: tooltmpl 81448d39c9a0
1380 # hg stat
1384 # hg stat
1381 M f
1385 M f
1382 # hg resolve --list
1386 # hg resolve --list
1383 R f
1387 R f
1384
1388
1385 Tool execution
1389 Tool execution
1386
1390
1387 set tools.args explicit to include $base $local $other $output:
1391 set tools.args explicit to include $base $local $other $output:
1388
1392
1389 $ beforemerge
1393 $ beforemerge
1390 [merge-tools]
1394 [merge-tools]
1391 false.whatever=
1395 false.whatever=
1392 true.priority=1
1396 true.priority=1
1393 true.executable=cat
1397 true.executable=cat
1394 # hg update -C 1
1398 # hg update -C 1
1395 $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \
1399 $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \
1396 > | sed 's,==> .* <==,==> ... <==,g'
1400 > | sed 's,==> .* <==,==> ... <==,g'
1397 merging f
1401 merging f
1398 ==> ... <==
1402 ==> ... <==
1399 revision 0
1403 revision 0
1400 space
1404 space
1401
1405
1402 ==> ... <==
1406 ==> ... <==
1403 revision 1
1407 revision 1
1404 space
1408 space
1405
1409
1406 ==> ... <==
1410 ==> ... <==
1407 revision 2
1411 revision 2
1408 space
1412 space
1409
1413
1410 ==> ... <==
1414 ==> ... <==
1411 revision 1
1415 revision 1
1412 space
1416 space
1413 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1417 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1414 (branch merge, don't forget to commit)
1418 (branch merge, don't forget to commit)
1415 $ aftermerge
1419 $ aftermerge
1416 # cat f
1420 # cat f
1417 revision 1
1421 revision 1
1418 space
1422 space
1419 # hg stat
1423 # hg stat
1420 M f
1424 M f
1421 # hg resolve --list
1425 # hg resolve --list
1422 R f
1426 R f
1423
1427
1424 Merge with "echo mergeresult > $local":
1428 Merge with "echo mergeresult > $local":
1425
1429
1426 $ beforemerge
1430 $ beforemerge
1427 [merge-tools]
1431 [merge-tools]
1428 false.whatever=
1432 false.whatever=
1429 true.priority=1
1433 true.priority=1
1430 true.executable=cat
1434 true.executable=cat
1431 # hg update -C 1
1435 # hg update -C 1
1432 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local'
1436 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local'
1433 merging f
1437 merging f
1434 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1438 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1435 (branch merge, don't forget to commit)
1439 (branch merge, don't forget to commit)
1436 $ aftermerge
1440 $ aftermerge
1437 # cat f
1441 # cat f
1438 mergeresult
1442 mergeresult
1439 # hg stat
1443 # hg stat
1440 M f
1444 M f
1441 # hg resolve --list
1445 # hg resolve --list
1442 R f
1446 R f
1443
1447
1444 - and $local is the file f:
1448 - and $local is the file f:
1445
1449
1446 $ beforemerge
1450 $ beforemerge
1447 [merge-tools]
1451 [merge-tools]
1448 false.whatever=
1452 false.whatever=
1449 true.priority=1
1453 true.priority=1
1450 true.executable=cat
1454 true.executable=cat
1451 # hg update -C 1
1455 # hg update -C 1
1452 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f'
1456 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f'
1453 merging f
1457 merging f
1454 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1458 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1455 (branch merge, don't forget to commit)
1459 (branch merge, don't forget to commit)
1456 $ aftermerge
1460 $ aftermerge
1457 # cat f
1461 # cat f
1458 mergeresult
1462 mergeresult
1459 # hg stat
1463 # hg stat
1460 M f
1464 M f
1461 # hg resolve --list
1465 # hg resolve --list
1462 R f
1466 R f
1463
1467
1464 Merge with "echo mergeresult > $output" - the variable is a bit magic:
1468 Merge with "echo mergeresult > $output" - the variable is a bit magic:
1465
1469
1466 $ beforemerge
1470 $ beforemerge
1467 [merge-tools]
1471 [merge-tools]
1468 false.whatever=
1472 false.whatever=
1469 true.priority=1
1473 true.priority=1
1470 true.executable=cat
1474 true.executable=cat
1471 # hg update -C 1
1475 # hg update -C 1
1472 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
1476 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
1473 merging f
1477 merging f
1474 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1478 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1475 (branch merge, don't forget to commit)
1479 (branch merge, don't forget to commit)
1476 $ aftermerge
1480 $ aftermerge
1477 # cat f
1481 # cat f
1478 mergeresult
1482 mergeresult
1479 # hg stat
1483 # hg stat
1480 M f
1484 M f
1481 # hg resolve --list
1485 # hg resolve --list
1482 R f
1486 R f
1483
1487
1484 Merge using tool with a path that must be quoted:
1488 Merge using tool with a path that must be quoted:
1485
1489
1486 $ beforemerge
1490 $ beforemerge
1487 [merge-tools]
1491 [merge-tools]
1488 false.whatever=
1492 false.whatever=
1489 true.priority=1
1493 true.priority=1
1490 true.executable=cat
1494 true.executable=cat
1491 # hg update -C 1
1495 # hg update -C 1
1492 $ cat <<EOF > 'my merge tool'
1496 $ cat <<EOF > 'my merge tool'
1493 > cat "\$1" "\$2" "\$3" > "\$4"
1497 > cat "\$1" "\$2" "\$3" > "\$4"
1494 > EOF
1498 > EOF
1495 $ hg --config merge-tools.true.executable='sh' \
1499 $ hg --config merge-tools.true.executable='sh' \
1496 > --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \
1500 > --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \
1497 > merge -r 2
1501 > merge -r 2
1498 merging f
1502 merging f
1499 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1503 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1500 (branch merge, don't forget to commit)
1504 (branch merge, don't forget to commit)
1501 $ rm -f 'my merge tool'
1505 $ rm -f 'my merge tool'
1502 $ aftermerge
1506 $ aftermerge
1503 # cat f
1507 # cat f
1504 revision 0
1508 revision 0
1505 space
1509 space
1506 revision 1
1510 revision 1
1507 space
1511 space
1508 revision 2
1512 revision 2
1509 space
1513 space
1510 # hg stat
1514 # hg stat
1511 M f
1515 M f
1512 # hg resolve --list
1516 # hg resolve --list
1513 R f
1517 R f
1514
1518
1515 Merge using a tool that supports labellocal, labelother, and labelbase, checking
1519 Merge using a tool that supports labellocal, labelother, and labelbase, checking
1516 that they're quoted properly as well. This is using the default 'basic'
1520 that they're quoted properly as well. This is using the default 'basic'
1517 mergemarkers even though ui.mergemarkers is 'detailed', so it's ignoring both
1521 mergemarkers even though ui.mergemarkers is 'detailed', so it's ignoring both
1518 mergemarkertemplate settings:
1522 mergemarkertemplate settings:
1519
1523
1520 $ beforemerge
1524 $ beforemerge
1521 [merge-tools]
1525 [merge-tools]
1522 false.whatever=
1526 false.whatever=
1523 true.priority=1
1527 true.priority=1
1524 true.executable=cat
1528 true.executable=cat
1525 # hg update -C 1
1529 # hg update -C 1
1526 $ cat <<EOF > printargs_merge_tool
1530 $ cat <<EOF > printargs_merge_tool
1527 > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
1531 > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
1528 > EOF
1532 > EOF
1529 $ hg --config merge-tools.true.executable='sh' \
1533 $ hg --config merge-tools.true.executable='sh' \
1530 > --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
1534 > --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
1531 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1535 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1532 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1536 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1533 > --config ui.mergemarkers=detailed \
1537 > --config ui.mergemarkers=detailed \
1534 > merge -r 2
1538 > merge -r 2
1535 merging f
1539 merging f
1536 arg: "ll:working copy"
1540 arg: "ll:working copy"
1537 arg: "lo:"
1541 arg: "lo:"
1538 arg: "merge rev"
1542 arg: "merge rev"
1539 arg: "lb:base: */f~base.*" (glob)
1543 arg: "lb:base: */f~base.*" (glob)
1540 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1544 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1541 (branch merge, don't forget to commit)
1545 (branch merge, don't forget to commit)
1542 $ rm -f 'printargs_merge_tool'
1546 $ rm -f 'printargs_merge_tool'
1543
1547
1544 Same test with experimental.mergetempdirprefix set:
1548 Same test with experimental.mergetempdirprefix set:
1545
1549
1546 $ beforemerge
1550 $ beforemerge
1547 [merge-tools]
1551 [merge-tools]
1548 false.whatever=
1552 false.whatever=
1549 true.priority=1
1553 true.priority=1
1550 true.executable=cat
1554 true.executable=cat
1551 # hg update -C 1
1555 # hg update -C 1
1552 $ cat <<EOF > printargs_merge_tool
1556 $ cat <<EOF > printargs_merge_tool
1553 > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
1557 > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
1554 > EOF
1558 > EOF
1555 $ hg --config experimental.mergetempdirprefix=$TESTTMP/hgmerge. \
1559 $ hg --config experimental.mergetempdirprefix=$TESTTMP/hgmerge. \
1556 > --config merge-tools.true.executable='sh' \
1560 > --config merge-tools.true.executable='sh' \
1557 > --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
1561 > --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
1558 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1562 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1559 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1563 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1560 > --config ui.mergemarkers=detailed \
1564 > --config ui.mergemarkers=detailed \
1561 > merge -r 2
1565 > merge -r 2
1562 merging f
1566 merging f
1563 arg: "ll:working copy"
1567 arg: "ll:working copy"
1564 arg: "lo:"
1568 arg: "lo:"
1565 arg: "merge rev"
1569 arg: "merge rev"
1566 arg: "lb:base: */hgmerge.*/f~base" (glob)
1570 arg: "lb:base: */hgmerge.*/f~base" (glob)
1567 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1571 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1568 (branch merge, don't forget to commit)
1572 (branch merge, don't forget to commit)
1569 $ rm -f 'printargs_merge_tool'
1573 $ rm -f 'printargs_merge_tool'
1570
1574
1571 Merge using a tool that supports labellocal, labelother, and labelbase, checking
1575 Merge using a tool that supports labellocal, labelother, and labelbase, checking
1572 that they're quoted properly as well. This is using 'detailed' mergemarkers,
1576 that they're quoted properly as well. This is using 'detailed' mergemarkers,
1573 even though ui.mergemarkers is 'basic', and using the tool's
1577 even though ui.mergemarkers is 'basic', and using the tool's
1574 mergemarkertemplate:
1578 mergemarkertemplate:
1575
1579
1576 $ beforemerge
1580 $ beforemerge
1577 [merge-tools]
1581 [merge-tools]
1578 false.whatever=
1582 false.whatever=
1579 true.priority=1
1583 true.priority=1
1580 true.executable=cat
1584 true.executable=cat
1581 # hg update -C 1
1585 # hg update -C 1
1582 $ cat <<EOF > printargs_merge_tool
1586 $ cat <<EOF > printargs_merge_tool
1583 > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
1587 > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
1584 > EOF
1588 > EOF
1585 $ hg --config merge-tools.true.executable='sh' \
1589 $ hg --config merge-tools.true.executable='sh' \
1586 > --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
1590 > --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
1587 > --config merge-tools.true.mergemarkers=detailed \
1591 > --config merge-tools.true.mergemarkers=detailed \
1588 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1592 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1589 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1593 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1590 > --config ui.mergemarkers=basic \
1594 > --config ui.mergemarkers=basic \
1591 > merge -r 2
1595 > merge -r 2
1592 merging f
1596 merging f
1593 arg: "ll:working copy: tooltmpl ef83787e2614"
1597 arg: "ll:working copy: tooltmpl ef83787e2614"
1594 arg: "lo:"
1598 arg: "lo:"
1595 arg: "merge rev: tooltmpl 0185f4e0cf02"
1599 arg: "merge rev: tooltmpl 0185f4e0cf02"
1596 arg: "lb:base: */f~base.*" (glob)
1600 arg: "lb:base: */f~base.*" (glob)
1597 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1601 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1598 (branch merge, don't forget to commit)
1602 (branch merge, don't forget to commit)
1599 $ rm -f 'printargs_merge_tool'
1603 $ rm -f 'printargs_merge_tool'
1600
1604
1601 The merge tool still gets labellocal and labelother as 'basic' even when
1605 The merge tool still gets labellocal and labelother as 'basic' even when
1602 premerge=keep is used and has 'detailed' markers:
1606 premerge=keep is used and has 'detailed' markers:
1603
1607
1604 $ beforemerge
1608 $ beforemerge
1605 [merge-tools]
1609 [merge-tools]
1606 false.whatever=
1610 false.whatever=
1607 true.priority=1
1611 true.priority=1
1608 true.executable=cat
1612 true.executable=cat
1609 # hg update -C 1
1613 # hg update -C 1
1610 $ cat <<EOF > mytool
1614 $ cat <<EOF > mytool
1611 > echo labellocal: \"\$1\"
1615 > echo labellocal: \"\$1\"
1612 > echo labelother: \"\$2\"
1616 > echo labelother: \"\$2\"
1613 > echo "output (arg)": \"\$3\"
1617 > echo "output (arg)": \"\$3\"
1614 > echo "output (contents)":
1618 > echo "output (contents)":
1615 > cat "\$3"
1619 > cat "\$3"
1616 > EOF
1620 > EOF
1617 $ hg --config merge-tools.true.executable='sh' \
1621 $ hg --config merge-tools.true.executable='sh' \
1618 > --config merge-tools.true.args='mytool $labellocal $labelother $output' \
1622 > --config merge-tools.true.args='mytool $labellocal $labelother $output' \
1619 > --config merge-tools.true.premerge=keep \
1623 > --config merge-tools.true.premerge=keep \
1620 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1624 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1621 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1625 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1622 > --config ui.mergemarkers=detailed \
1626 > --config ui.mergemarkers=detailed \
1623 > merge -r 2
1627 > merge -r 2
1624 merging f
1628 merging f
1625 labellocal: "working copy"
1629 labellocal: "working copy"
1626 labelother: "merge rev"
1630 labelother: "merge rev"
1627 output (arg): "$TESTTMP/repo/f"
1631 output (arg): "$TESTTMP/repo/f"
1628 output (contents):
1632 output (contents):
1629 <<<<<<< working copy: uitmpl 1
1633 <<<<<<< working copy: uitmpl 1
1630 revision 1
1634 revision 1
1631 =======
1635 =======
1632 revision 2
1636 revision 2
1633 >>>>>>> merge rev: uitmpl 2
1637 >>>>>>> merge rev: uitmpl 2
1634 space
1638 space
1635 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1639 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1636 (branch merge, don't forget to commit)
1640 (branch merge, don't forget to commit)
1637 $ rm -f 'mytool'
1641 $ rm -f 'mytool'
1638
1642
1639 premerge=keep uses the *tool's* mergemarkertemplate if tool's
1643 premerge=keep uses the *tool's* mergemarkertemplate if tool's
1640 mergemarkers=detailed; labellocal and labelother also use the tool's template
1644 mergemarkers=detailed; labellocal and labelother also use the tool's template
1641
1645
1642 $ beforemerge
1646 $ beforemerge
1643 [merge-tools]
1647 [merge-tools]
1644 false.whatever=
1648 false.whatever=
1645 true.priority=1
1649 true.priority=1
1646 true.executable=cat
1650 true.executable=cat
1647 # hg update -C 1
1651 # hg update -C 1
1648 $ cat <<EOF > mytool
1652 $ cat <<EOF > mytool
1649 > echo labellocal: \"\$1\"
1653 > echo labellocal: \"\$1\"
1650 > echo labelother: \"\$2\"
1654 > echo labelother: \"\$2\"
1651 > echo "output (arg)": \"\$3\"
1655 > echo "output (arg)": \"\$3\"
1652 > echo "output (contents)":
1656 > echo "output (contents)":
1653 > cat "\$3"
1657 > cat "\$3"
1654 > EOF
1658 > EOF
1655 $ hg --config merge-tools.true.executable='sh' \
1659 $ hg --config merge-tools.true.executable='sh' \
1656 > --config merge-tools.true.args='mytool $labellocal $labelother $output' \
1660 > --config merge-tools.true.args='mytool $labellocal $labelother $output' \
1657 > --config merge-tools.true.premerge=keep \
1661 > --config merge-tools.true.premerge=keep \
1658 > --config merge-tools.true.mergemarkers=detailed \
1662 > --config merge-tools.true.mergemarkers=detailed \
1659 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1663 > --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
1660 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1664 > --config ui.mergemarkertemplate='uitmpl {rev}' \
1661 > --config ui.mergemarkers=detailed \
1665 > --config ui.mergemarkers=detailed \
1662 > merge -r 2
1666 > merge -r 2
1663 merging f
1667 merging f
1664 labellocal: "working copy: tooltmpl ef83787e2614"
1668 labellocal: "working copy: tooltmpl ef83787e2614"
1665 labelother: "merge rev: tooltmpl 0185f4e0cf02"
1669 labelother: "merge rev: tooltmpl 0185f4e0cf02"
1666 output (arg): "$TESTTMP/repo/f"
1670 output (arg): "$TESTTMP/repo/f"
1667 output (contents):
1671 output (contents):
1668 <<<<<<< working copy: tooltmpl ef83787e2614
1672 <<<<<<< working copy: tooltmpl ef83787e2614
1669 revision 1
1673 revision 1
1670 =======
1674 =======
1671 revision 2
1675 revision 2
1672 >>>>>>> merge rev: tooltmpl 0185f4e0cf02
1676 >>>>>>> merge rev: tooltmpl 0185f4e0cf02
1673 space
1677 space
1674 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1678 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1675 (branch merge, don't forget to commit)
1679 (branch merge, don't forget to commit)
1676 $ rm -f 'mytool'
1680 $ rm -f 'mytool'
1677
1681
1678 Issue3581: Merging a filename that needs to be quoted
1682 Issue3581: Merging a filename that needs to be quoted
1679 (This test doesn't work on Windows filesystems even on Linux, so check
1683 (This test doesn't work on Windows filesystems even on Linux, so check
1680 for Unix-like permission)
1684 for Unix-like permission)
1681
1685
1682 #if unix-permissions
1686 #if unix-permissions
1683 $ beforemerge
1687 $ beforemerge
1684 [merge-tools]
1688 [merge-tools]
1685 false.whatever=
1689 false.whatever=
1686 true.priority=1
1690 true.priority=1
1687 true.executable=cat
1691 true.executable=cat
1688 # hg update -C 1
1692 # hg update -C 1
1689 $ echo "revision 5" > '"; exit 1; echo "'
1693 $ echo "revision 5" > '"; exit 1; echo "'
1690 $ hg commit -Am "revision 5"
1694 $ hg commit -Am "revision 5"
1691 adding "; exit 1; echo "
1695 adding "; exit 1; echo "
1692 warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
1696 warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
1693 $ hg update -C 1 > /dev/null
1697 $ hg update -C 1 > /dev/null
1694 $ echo "revision 6" > '"; exit 1; echo "'
1698 $ echo "revision 6" > '"; exit 1; echo "'
1695 $ hg commit -Am "revision 6"
1699 $ hg commit -Am "revision 6"
1696 adding "; exit 1; echo "
1700 adding "; exit 1; echo "
1697 warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
1701 warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
1698 created new head
1702 created new head
1699 $ hg merge --config merge-tools.true.executable="true" -r 5
1703 $ hg merge --config merge-tools.true.executable="true" -r 5
1700 merging "; exit 1; echo "
1704 merging "; exit 1; echo "
1701 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1705 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1702 (branch merge, don't forget to commit)
1706 (branch merge, don't forget to commit)
1703 $ hg update -C 1 > /dev/null
1707 $ hg update -C 1 > /dev/null
1704
1708
1705 #else
1709 #else
1706
1710
1707 Match the non-portable filename commits above for test stability
1711 Match the non-portable filename commits above for test stability
1708
1712
1709 $ hg import --bypass -q - << EOF
1713 $ hg import --bypass -q - << EOF
1710 > # HG changeset patch
1714 > # HG changeset patch
1711 > revision 5
1715 > revision 5
1712 >
1716 >
1713 > diff --git a/"; exit 1; echo " b/"; exit 1; echo "
1717 > diff --git a/"; exit 1; echo " b/"; exit 1; echo "
1714 > new file mode 100644
1718 > new file mode 100644
1715 > --- /dev/null
1719 > --- /dev/null
1716 > +++ b/"; exit 1; echo "
1720 > +++ b/"; exit 1; echo "
1717 > @@ -0,0 +1,1 @@
1721 > @@ -0,0 +1,1 @@
1718 > +revision 5
1722 > +revision 5
1719 > EOF
1723 > EOF
1720
1724
1721 $ hg import --bypass -q - << EOF
1725 $ hg import --bypass -q - << EOF
1722 > # HG changeset patch
1726 > # HG changeset patch
1723 > revision 6
1727 > revision 6
1724 >
1728 >
1725 > diff --git a/"; exit 1; echo " b/"; exit 1; echo "
1729 > diff --git a/"; exit 1; echo " b/"; exit 1; echo "
1726 > new file mode 100644
1730 > new file mode 100644
1727 > --- /dev/null
1731 > --- /dev/null
1728 > +++ b/"; exit 1; echo "
1732 > +++ b/"; exit 1; echo "
1729 > @@ -0,0 +1,1 @@
1733 > @@ -0,0 +1,1 @@
1730 > +revision 6
1734 > +revision 6
1731 > EOF
1735 > EOF
1732
1736
1733 #endif
1737 #endif
1734
1738
1735 Merge post-processing
1739 Merge post-processing
1736
1740
1737 cat is a bad merge-tool and doesn't change:
1741 cat is a bad merge-tool and doesn't change:
1738
1742
1739 $ beforemerge
1743 $ beforemerge
1740 [merge-tools]
1744 [merge-tools]
1741 false.whatever=
1745 false.whatever=
1742 true.priority=1
1746 true.priority=1
1743 true.executable=cat
1747 true.executable=cat
1744 # hg update -C 1
1748 # hg update -C 1
1745 $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1
1749 $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1
1746 merging f
1750 merging f
1747 revision 1
1751 revision 1
1748 space
1752 space
1749 revision 0
1753 revision 0
1750 space
1754 space
1751 revision 2
1755 revision 2
1752 space
1756 space
1753 output file f appears unchanged
1757 output file f appears unchanged
1754 was merge successful (yn)? n
1758 was merge successful (yn)? n
1755 merging f failed!
1759 merging f failed!
1756 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1760 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1757 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1761 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1758 [1]
1762 [1]
1759 $ aftermerge
1763 $ aftermerge
1760 # cat f
1764 # cat f
1761 revision 1
1765 revision 1
1762 space
1766 space
1763 # hg stat
1767 # hg stat
1764 M f
1768 M f
1765 ? f.orig
1769 ? f.orig
1766 # hg resolve --list
1770 # hg resolve --list
1767 U f
1771 U f
1768
1772
1769 missingbinary is a merge-tool that doesn't exist:
1773 missingbinary is a merge-tool that doesn't exist:
1770
1774
1771 $ echo "missingbinary.executable=doesnotexist" >> .hg/hgrc
1775 $ echo "missingbinary.executable=doesnotexist" >> .hg/hgrc
1772 $ beforemerge
1776 $ beforemerge
1773 [merge-tools]
1777 [merge-tools]
1774 false.whatever=
1778 false.whatever=
1775 true.priority=1
1779 true.priority=1
1776 true.executable=cat
1780 true.executable=cat
1777 missingbinary.executable=doesnotexist
1781 missingbinary.executable=doesnotexist
1778 # hg update -C 1
1782 # hg update -C 1
1779 $ hg merge -y -r 2 --config ui.merge=missingbinary
1783 $ hg merge -y -r 2 --config ui.merge=missingbinary
1780 couldn't find merge tool missingbinary (for pattern f)
1784 couldn't find merge tool missingbinary (for pattern f)
1781 merging f
1785 merging f
1782 couldn't find merge tool missingbinary (for pattern f)
1786 couldn't find merge tool missingbinary (for pattern f)
1783 revision 1
1787 revision 1
1784 space
1788 space
1785 revision 0
1789 revision 0
1786 space
1790 space
1787 revision 2
1791 revision 2
1788 space
1792 space
1789 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1793 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1790 (branch merge, don't forget to commit)
1794 (branch merge, don't forget to commit)
1791
1795
1792 $ hg update -q -C 1
1796 $ hg update -q -C 1
1793 $ rm f
1797 $ rm f
1794
1798
1795 internal merge cannot handle symlinks and shouldn't try:
1799 internal merge cannot handle symlinks and shouldn't try:
1796
1800
1797 #if symlink
1801 #if symlink
1798
1802
1799 $ ln -s symlink f
1803 $ ln -s symlink f
1800 $ hg commit -qm 'f is symlink'
1804 $ hg commit -qm 'f is symlink'
1801
1805
1802 #else
1806 #else
1803
1807
1804 $ hg import --bypass -q - << EOF
1808 $ hg import --bypass -q - << EOF
1805 > # HG changeset patch
1809 > # HG changeset patch
1806 > f is symlink
1810 > f is symlink
1807 >
1811 >
1808 > diff --git a/f b/f
1812 > diff --git a/f b/f
1809 > old mode 100644
1813 > old mode 100644
1810 > new mode 120000
1814 > new mode 120000
1811 > --- a/f
1815 > --- a/f
1812 > +++ b/f
1816 > +++ b/f
1813 > @@ -1,2 +1,1 @@
1817 > @@ -1,2 +1,1 @@
1814 > -revision 1
1818 > -revision 1
1815 > -space
1819 > -space
1816 > +symlink
1820 > +symlink
1817 > \ No newline at end of file
1821 > \ No newline at end of file
1818 > EOF
1822 > EOF
1819
1823
1820 Resolve 'other [destination] changed f which local [working copy] deleted' prompt
1824 Resolve 'other [destination] changed f which local [working copy] deleted' prompt
1821 $ hg up -q -C --config ui.interactive=True << EOF
1825 $ hg up -q -C --config ui.interactive=True << EOF
1822 > c
1826 > c
1823 > EOF
1827 > EOF
1824
1828
1825 #endif
1829 #endif
1826
1830
1827 $ hg merge -r 2 --tool internal:merge
1831 $ hg merge -r 2 --tool internal:merge
1828 merging f
1832 merging f
1829 warning: internal :merge cannot merge symlinks for f
1833 warning: internal :merge cannot merge symlinks for f
1830 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
1834 warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
1831 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1835 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1832 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1836 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1833 [1]
1837 [1]
1834
1838
1835 Verify naming of temporary files and that extension is preserved:
1839 Verify naming of temporary files and that extension is preserved:
1836
1840
1837 $ hg update -q -C 1
1841 $ hg update -q -C 1
1838 $ hg mv f f.txt
1842 $ hg mv f f.txt
1839 $ hg ci -qm "f.txt"
1843 $ hg ci -qm "f.txt"
1840 $ hg update -q -C 2
1844 $ hg update -q -C 2
1841 $ hg merge -y -r tip --tool echo --config merge-tools.echo.args='$base $local $other $output'
1845 $ hg merge -y -r tip --tool echo --config merge-tools.echo.args='$base $local $other $output'
1842 merging f and f.txt to f.txt
1846 merging f and f.txt to f.txt
1843 */f~base.* */f~local.*.txt */f~other.*.txt $TESTTMP/repo/f.txt (glob)
1847 */f~base.* */f~local.*.txt */f~other.*.txt $TESTTMP/repo/f.txt (glob)
1844 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1848 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1845 (branch merge, don't forget to commit)
1849 (branch merge, don't forget to commit)
1846
1850
1847 Verify naming of temporary files and that extension is preserved
1851 Verify naming of temporary files and that extension is preserved
1848 (experimental.mergetempdirprefix version):
1852 (experimental.mergetempdirprefix version):
1849
1853
1850 $ hg update -q -C 1
1854 $ hg update -q -C 1
1851 $ hg mv f f.txt
1855 $ hg mv f f.txt
1852 $ hg ci -qm "f.txt"
1856 $ hg ci -qm "f.txt"
1853 $ hg update -q -C 2
1857 $ hg update -q -C 2
1854 $ hg merge -y -r tip --tool echo \
1858 $ hg merge -y -r tip --tool echo \
1855 > --config merge-tools.echo.args='$base $local $other $output' \
1859 > --config merge-tools.echo.args='$base $local $other $output' \
1856 > --config experimental.mergetempdirprefix=$TESTTMP/hgmerge.
1860 > --config experimental.mergetempdirprefix=$TESTTMP/hgmerge.
1857 merging f and f.txt to f.txt
1861 merging f and f.txt to f.txt
1858 $TESTTMP/hgmerge.*/f~base $TESTTMP/hgmerge.*/f~local.txt $TESTTMP/hgmerge.*/f~other.txt $TESTTMP/repo/f.txt (glob)
1862 $TESTTMP/hgmerge.*/f~base $TESTTMP/hgmerge.*/f~local.txt $TESTTMP/hgmerge.*/f~other.txt $TESTTMP/repo/f.txt (glob)
1859 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1863 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1860 (branch merge, don't forget to commit)
1864 (branch merge, don't forget to commit)
1861
1865
1862 Binary files capability checking
1866 Binary files capability checking
1863
1867
1864 $ hg update -q -C 0
1868 $ hg update -q -C 0
1865 $ python <<EOF
1869 $ python <<EOF
1866 > with open('b', 'wb') as fp:
1870 > with open('b', 'wb') as fp:
1867 > fp.write(b'\x00\x01\x02\x03')
1871 > fp.write(b'\x00\x01\x02\x03')
1868 > EOF
1872 > EOF
1869 $ hg add b
1873 $ hg add b
1870 $ hg commit -qm "add binary file (#1)"
1874 $ hg commit -qm "add binary file (#1)"
1871
1875
1872 $ hg update -q -C 0
1876 $ hg update -q -C 0
1873 $ python <<EOF
1877 $ python <<EOF
1874 > with open('b', 'wb') as fp:
1878 > with open('b', 'wb') as fp:
1875 > fp.write(b'\x03\x02\x01\x00')
1879 > fp.write(b'\x03\x02\x01\x00')
1876 > EOF
1880 > EOF
1877 $ hg add b
1881 $ hg add b
1878 $ hg commit -qm "add binary file (#2)"
1882 $ hg commit -qm "add binary file (#2)"
1879
1883
1880 By default, binary files capability of internal merge tools is not
1884 By default, binary files capability of internal merge tools is not
1881 checked strictly.
1885 checked strictly.
1882
1886
1883 (for merge-patterns, chosen unintentionally)
1887 (for merge-patterns, chosen unintentionally)
1884
1888
1885 $ hg merge 9 \
1889 $ hg merge 9 \
1886 > --config merge-patterns.b=:merge-other \
1890 > --config merge-patterns.b=:merge-other \
1887 > --config merge-patterns.re:[a-z]=:other
1891 > --config merge-patterns.re:[a-z]=:other
1888 warning: check merge-patterns configurations, if ':merge-other' for binary file 'b' is unintentional
1892 warning: check merge-patterns configurations, if ':merge-other' for binary file 'b' is unintentional
1889 (see 'hg help merge-tools' for binary files capability)
1893 (see 'hg help merge-tools' for binary files capability)
1890 merging b
1894 merging b
1891 warning: b looks like a binary file.
1895 warning: b looks like a binary file.
1892 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1896 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1893 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1897 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1894 [1]
1898 [1]
1895 $ hg merge --abort -q
1899 $ hg merge --abort -q
1896
1900
1897 (for ui.merge, ignored unintentionally)
1901 (for ui.merge, ignored unintentionally)
1898
1902
1899 $ hg merge 9 \
1903 $ hg merge 9 \
1900 > --config merge-tools.:other.binary=true \
1904 > --config merge-tools.:other.binary=true \
1901 > --config ui.merge=:other
1905 > --config ui.merge=:other
1902 tool :other (for pattern b) can't handle binary
1906 tool :other (for pattern b) can't handle binary
1903 tool true can't handle binary
1907 tool true can't handle binary
1904 tool :other can't handle binary
1908 tool :other can't handle binary
1905 tool false can't handle binary
1909 tool false can't handle binary
1906 no tool found to merge b
1910 no tool found to merge b
1907 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for b? u
1911 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for b? u
1908 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1912 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1909 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1913 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
1910 [1]
1914 [1]
1911 $ hg merge --abort -q
1915 $ hg merge --abort -q
1912
1916
1913 With merge.strict-capability-check=true, binary files capability of
1917 With merge.strict-capability-check=true, binary files capability of
1914 internal merge tools is checked strictly.
1918 internal merge tools is checked strictly.
1915
1919
1916 $ f --hexdump b
1920 $ f --hexdump b
1917 b:
1921 b:
1918 0000: 03 02 01 00 |....|
1922 0000: 03 02 01 00 |....|
1919
1923
1920 (for merge-patterns)
1924 (for merge-patterns)
1921
1925
1922 $ hg merge 9 --config merge.strict-capability-check=true \
1926 $ hg merge 9 --config merge.strict-capability-check=true \
1923 > --config merge-tools.:merge-other.binary=true \
1927 > --config merge-tools.:merge-other.binary=true \
1924 > --config merge-patterns.b=:merge-other \
1928 > --config merge-patterns.b=:merge-other \
1925 > --config merge-patterns.re:[a-z]=:other
1929 > --config merge-patterns.re:[a-z]=:other
1926 tool :merge-other (for pattern b) can't handle binary
1930 tool :merge-other (for pattern b) can't handle binary
1927 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1931 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1928 (branch merge, don't forget to commit)
1932 (branch merge, don't forget to commit)
1929 $ f --hexdump b
1933 $ f --hexdump b
1930 b:
1934 b:
1931 0000: 00 01 02 03 |....|
1935 0000: 00 01 02 03 |....|
1932 $ hg merge --abort -q
1936 $ hg merge --abort -q
1933
1937
1934 (for ui.merge)
1938 (for ui.merge)
1935
1939
1936 $ hg merge 9 --config merge.strict-capability-check=true \
1940 $ hg merge 9 --config merge.strict-capability-check=true \
1937 > --config ui.merge=:other
1941 > --config ui.merge=:other
1938 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1942 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1939 (branch merge, don't forget to commit)
1943 (branch merge, don't forget to commit)
1940 $ f --hexdump b
1944 $ f --hexdump b
1941 b:
1945 b:
1942 0000: 00 01 02 03 |....|
1946 0000: 00 01 02 03 |....|
1943 $ hg merge --abort -q
1947 $ hg merge --abort -q
1944
1948
1945 Check that debugpicktool examines which merge tool is chosen for
1949 Check that debugpicktool examines which merge tool is chosen for
1946 specified file as expected
1950 specified file as expected
1947
1951
1948 $ beforemerge
1952 $ beforemerge
1949 [merge-tools]
1953 [merge-tools]
1950 false.whatever=
1954 false.whatever=
1951 true.priority=1
1955 true.priority=1
1952 true.executable=cat
1956 true.executable=cat
1953 missingbinary.executable=doesnotexist
1957 missingbinary.executable=doesnotexist
1954 # hg update -C 1
1958 # hg update -C 1
1955
1959
1956 (default behavior: checking files in the working parent context)
1960 (default behavior: checking files in the working parent context)
1957
1961
1958 $ hg manifest
1962 $ hg manifest
1959 f
1963 f
1960 $ hg debugpickmergetool
1964 $ hg debugpickmergetool
1961 f = true
1965 f = true
1962
1966
1963 (-X/-I and file patterns limmit examination targets)
1967 (-X/-I and file patterns limmit examination targets)
1964
1968
1965 $ hg debugpickmergetool -X f
1969 $ hg debugpickmergetool -X f
1966 $ hg debugpickmergetool unknown
1970 $ hg debugpickmergetool unknown
1967 unknown: no such file in rev ef83787e2614
1971 unknown: no such file in rev ef83787e2614
1968
1972
1969 (--changedelete emulates merging change and delete)
1973 (--changedelete emulates merging change and delete)
1970
1974
1971 $ hg debugpickmergetool --changedelete
1975 $ hg debugpickmergetool --changedelete
1972 f = :prompt
1976 f = :prompt
1973
1977
1974 (-r REV causes checking files in specified revision)
1978 (-r REV causes checking files in specified revision)
1975
1979
1976 $ hg manifest -r 8
1980 $ hg manifest -r 8
1977 f.txt
1981 f.txt
1978 $ hg debugpickmergetool -r 8
1982 $ hg debugpickmergetool -r 8
1979 f.txt = true
1983 f.txt = true
1980
1984
1981 #if symlink
1985 #if symlink
1982
1986
1983 (symlink causes chosing :prompt)
1987 (symlink causes chosing :prompt)
1984
1988
1985 $ hg debugpickmergetool -r 6d00b3726f6e
1989 $ hg debugpickmergetool -r 6d00b3726f6e
1986 f = :prompt
1990 f = :prompt
1987
1991
1988 (by default, it is assumed that no internal merge tools has symlinks
1992 (by default, it is assumed that no internal merge tools has symlinks
1989 capability)
1993 capability)
1990
1994
1991 $ hg debugpickmergetool \
1995 $ hg debugpickmergetool \
1992 > -r 6d00b3726f6e \
1996 > -r 6d00b3726f6e \
1993 > --config merge-tools.:merge-other.symlink=true \
1997 > --config merge-tools.:merge-other.symlink=true \
1994 > --config merge-patterns.f=:merge-other \
1998 > --config merge-patterns.f=:merge-other \
1995 > --config merge-patterns.re:[f]=:merge-local \
1999 > --config merge-patterns.re:[f]=:merge-local \
1996 > --config merge-patterns.re:[a-z]=:other
2000 > --config merge-patterns.re:[a-z]=:other
1997 f = :prompt
2001 f = :prompt
1998
2002
1999 $ hg debugpickmergetool \
2003 $ hg debugpickmergetool \
2000 > -r 6d00b3726f6e \
2004 > -r 6d00b3726f6e \
2001 > --config merge-tools.:other.symlink=true \
2005 > --config merge-tools.:other.symlink=true \
2002 > --config ui.merge=:other
2006 > --config ui.merge=:other
2003 f = :prompt
2007 f = :prompt
2004
2008
2005 (with strict-capability-check=true, actual symlink capabilities are
2009 (with strict-capability-check=true, actual symlink capabilities are
2006 checked striclty)
2010 checked striclty)
2007
2011
2008 $ hg debugpickmergetool --config merge.strict-capability-check=true \
2012 $ hg debugpickmergetool --config merge.strict-capability-check=true \
2009 > -r 6d00b3726f6e \
2013 > -r 6d00b3726f6e \
2010 > --config merge-tools.:merge-other.symlink=true \
2014 > --config merge-tools.:merge-other.symlink=true \
2011 > --config merge-patterns.f=:merge-other \
2015 > --config merge-patterns.f=:merge-other \
2012 > --config merge-patterns.re:[f]=:merge-local \
2016 > --config merge-patterns.re:[f]=:merge-local \
2013 > --config merge-patterns.re:[a-z]=:other
2017 > --config merge-patterns.re:[a-z]=:other
2014 f = :other
2018 f = :other
2015
2019
2016 $ hg debugpickmergetool --config merge.strict-capability-check=true \
2020 $ hg debugpickmergetool --config merge.strict-capability-check=true \
2017 > -r 6d00b3726f6e \
2021 > -r 6d00b3726f6e \
2018 > --config ui.merge=:other
2022 > --config ui.merge=:other
2019 f = :other
2023 f = :other
2020
2024
2021 $ hg debugpickmergetool --config merge.strict-capability-check=true \
2025 $ hg debugpickmergetool --config merge.strict-capability-check=true \
2022 > -r 6d00b3726f6e \
2026 > -r 6d00b3726f6e \
2023 > --config merge-tools.:merge-other.symlink=true \
2027 > --config merge-tools.:merge-other.symlink=true \
2024 > --config ui.merge=:merge-other
2028 > --config ui.merge=:merge-other
2025 f = :prompt
2029 f = :prompt
2026
2030
2027 #endif
2031 #endif
2028
2032
2029 (--verbose shows some configurations)
2033 (--verbose shows some configurations)
2030
2034
2031 $ hg debugpickmergetool --tool foobar -v
2035 $ hg debugpickmergetool --tool foobar -v
2032 with --tool 'foobar'
2036 with --tool 'foobar'
2033 f = foobar
2037 f = foobar
2034
2038
2035 $ HGMERGE=false hg debugpickmergetool -v
2039 $ HGMERGE=false hg debugpickmergetool -v
2036 with HGMERGE='false'
2040 with HGMERGE='false'
2037 f = false
2041 f = false
2038
2042
2039 $ hg debugpickmergetool --config ui.merge=false -v
2043 $ hg debugpickmergetool --config ui.merge=false -v
2040 with ui.merge='false'
2044 with ui.merge='false'
2041 f = false
2045 f = false
2042
2046
2043 (--debug shows errors detected intermediately)
2047 (--debug shows errors detected intermediately)
2044
2048
2045 $ hg debugpickmergetool --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool --debug f
2049 $ hg debugpickmergetool --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool --debug f
2046 couldn't find merge tool true (for pattern f)
2050 couldn't find merge tool true (for pattern f)
2047 couldn't find merge tool true
2051 couldn't find merge tool true
2048 f = false
2052 f = false
2049
2053
2050 $ cd ..
2054 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now