##// END OF EJS Templates
tests: unify test-merge-tools
Matt Mackall -
r12460:09168638 default
parent child Browse files
Show More
This diff has been collapsed as it changes many lines, (848 lines changed) Show them Hide them
@@ -1,197 +1,735 b''
1 #!/bin/sh
1 test merge-tools configuration - mostly exercising filemerge.py
2
3 $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test
4 $ hg init
5
6 revision 0
2
7
3 # test merge-tools configuration - mostly exercising filemerge.py
8 $ echo "revision 0" > f
9 $ echo "space" >> f
10 $ hg commit -Am "revision 0"
11 adding f
12
13 revision 1
4
14
5 unset HGMERGE # make sure HGMERGE doesn't interfere with the test
15 $ echo "revision 1" > f
16 $ echo "space" >> f
17 $ hg commit -Am "revision 1"
18 $ hg update 0 > /dev/null
19
20 revision 2
6
21
7 hg init
22 $ echo "revision 2" > f
23 $ echo "space" >> f
24 $ hg commit -Am "revision 2"
25 created new head
26 $ hg update 0 > /dev/null
27
28 revision 3 - simple to merge
8
29
9 echo "# revision 0"
30 $ echo "revision 3" >> f
10 echo "revision 0" > f
31 $ hg commit -Am "revision 3"
11 echo "space" >> f
32 created new head
12 hg commit -Am "revision 0"
33 $ echo "[merge-tools]" > .hg/hgrc
34 $ echo
35
36 $ beforemerge() {
37 > cat .hg/hgrc
38 > echo "# hg update -C 1"
39 > hg update -C 1 > /dev/null
40 > }
41 $ aftermerge() {
42 > echo "# cat f"
43 > cat f
44 > echo "# hg stat"
45 > hg stat
46 > rm -f f.orig
47 > echo
48 > }
49 $ domerge() {
50 > beforemerge
51 > echo "# hg merge $*"
52 > hg merge $*
53 > aftermerge
54 > }
55 $ echo
56
13
57
14 echo "# revision 1"
58 Tool selection
15 echo "revision 1" > f
59
16 echo "space" >> f
60 $ echo
17 hg commit -Am "revision 1"
61
62
63 default is internal merge:
18
64
19 hg update 0 > /dev/null
65 $ beforemerge
20 echo "# revision 2"
66 [merge-tools]
21 echo "revision 2" > f
67 # hg update -C 1
22 echo "space" >> f
68
23 hg commit -Am "revision 2"
69 hg merge -r 2
70 override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
71 running from a devel copy, not a temp installation
24
72
25 hg update 0 > /dev/null
73 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
26 echo "# revision 3 - simple to merge"
74 merging f
27 echo "revision 3" >> f
75 warning: conflicts during merge.
28 hg commit -Am "revision 3"
76 merging f failed!
77 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
78 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
79 [1]
80 $ aftermerge
81 # cat f
82 <<<<<<< local
83 revision 1
84 =======
85 revision 2
86 >>>>>>> other
87 space
88 # hg stat
89 M f
90 ? f.orig
91
29
92
93 simplest hgrc using false for merge:
30
94
31 echo "[merge-tools]" > .hg/hgrc
95 $ echo "false.whatever=" >> .hg/hgrc
32 echo
96 $ domerge -r 2
97 [merge-tools]
98 false.whatever=
99 # hg update -C 1
100 # hg merge -r 2
101 merging f
102 merging f failed!
103 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
104 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
105 # cat f
106 revision 1
107 space
108 # hg stat
109 M f
110 ? f.orig
111
112
113 true with higher .priority gets precedence:
33
114
34 beforemerge() {
115 $ echo "true.priority=1" >> .hg/hgrc
35 cat .hg/hgrc
116 $ domerge -r 2
36 echo "# hg update -C 1"
117 [merge-tools]
37 hg update -C 1 > /dev/null
118 false.whatever=
38 }
119 true.priority=1
120 # hg update -C 1
121 # hg merge -r 2
122 merging f
123 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
124 (branch merge, don't forget to commit)
125 # cat f
126 revision 1
127 space
128 # hg stat
129 M f
130
131
132 unless lowered on command line:
39
133
40 aftermerge() {
134 $ domerge -r 2 --config merge-tools.true.priority=-7
41 echo "# cat f"
135 [merge-tools]
42 cat f
136 false.whatever=
43 echo "# hg stat"
137 true.priority=1
44 hg stat
138 # hg update -C 1
45 rm -f f.orig
139 # hg merge -r 2 --config merge-tools.true.priority=-7
46 echo
140 merging f
47 }
141 merging f failed!
142 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
143 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
144 # cat f
145 revision 1
146 space
147 # hg stat
148 M f
149 ? f.orig
150
151
152 or false set higher on command line:
153
154 $ domerge -r 2 --config merge-tools.false.priority=117
155 [merge-tools]
156 false.whatever=
157 true.priority=1
158 # hg update -C 1
159 # hg merge -r 2 --config merge-tools.false.priority=117
160 merging f
161 merging f failed!
162 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
163 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
164 # cat f
165 revision 1
166 space
167 # hg stat
168 M f
169 ? f.orig
170
171
172 or true.executable not found in PATH:
48
173
49 domerge() {
174 $ domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool
50 beforemerge
175 [merge-tools]
51 echo "# hg merge $*"
176 false.whatever=
52 hg merge $*
177 true.priority=1
53 aftermerge
178 # hg update -C 1
54 }
179 # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool
180 merging f
181 merging f failed!
182 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
183 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
184 # cat f
185 revision 1
186 space
187 # hg stat
188 M f
189 ? f.orig
190
191
192 or true.executable with bogus path:
55
193
56 echo
194 $ domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
57 echo Tool selection
195 [merge-tools]
58 echo
196 false.whatever=
197 true.priority=1
198 # hg update -C 1
199 # hg merge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
200 merging f
201 merging f failed!
202 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
203 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
204 # cat f
205 revision 1
206 space
207 # hg stat
208 M f
209 ? f.orig
210
211
212 but true.executable set to cat found in PATH works:
59
213
60 echo "# default is internal merge:"
214 $ echo "true.executable=cat" >> .hg/hgrc
61 beforemerge
215 $ domerge -r 2
62 echo "# hg merge -r 2"
216 [merge-tools]
63 # override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
217 false.whatever=
64 # running from a devel copy, not a temp installation
218 true.priority=1
65 PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
219 true.executable=cat
66 aftermerge
220 # hg update -C 1
221 # hg merge -r 2
222 revision 1
223 space
224 revision 0
225 space
226 revision 2
227 space
228 merging f
229 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
230 (branch merge, don't forget to commit)
231 # cat f
232 revision 1
233 space
234 # hg stat
235 M f
236
237
238 and true.executable set to cat with path works:
67
239
68 echo "# simplest hgrc using false for merge:"
240 $ domerge -r 2 --config merge-tools.true.executable=cat
69 echo "false.whatever=" >> .hg/hgrc
241 [merge-tools]
70 domerge -r 2
242 false.whatever=
243 true.priority=1
244 true.executable=cat
245 # hg update -C 1
246 # hg merge -r 2 --config merge-tools.true.executable=cat
247 revision 1
248 space
249 revision 0
250 space
251 revision 2
252 space
253 merging f
254 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
255 (branch merge, don't forget to commit)
256 # cat f
257 revision 1
258 space
259 # hg stat
260 M f
261
262 $ echo
263
264
265 Tool selection and merge-patterns
71
266
72 echo "# true with higher .priority gets precedence:"
267 $ echo
73 echo "true.priority=1" >> .hg/hgrc
268
74 domerge -r 2
269
270 merge-patterns specifies new tool false:
271
272 $ domerge -r 2 --config merge-patterns.f=false
273 [merge-tools]
274 false.whatever=
275 true.priority=1
276 true.executable=cat
277 # hg update -C 1
278 # hg merge -r 2 --config merge-patterns.f=false
279 merging f
280 merging f failed!
281 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
282 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
283 # cat f
284 revision 1
285 space
286 # hg stat
287 M f
288 ? f.orig
289
75
290
76 echo "# unless lowered on command line:"
291 merge-patterns specifies executable not found in PATH and gets warning:
77 domerge -r 2 --config merge-tools.true.priority=-7
78
292
79 echo "# or false set higher on command line:"
293 $ domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
80 domerge -r 2 --config merge-tools.false.priority=117
294 [merge-tools]
295 false.whatever=
296 true.priority=1
297 true.executable=cat
298 # hg update -C 1
299 # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
300 couldn't find merge tool true specified for f
301 merging f
302 merging f failed!
303 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
304 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
305 # cat f
306 revision 1
307 space
308 # hg stat
309 M f
310 ? f.orig
311
81
312
82 echo "# or true.executable not found in PATH:"
313 merge-patterns specifies executable with bogus path and gets warning:
83 domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool
84
314
85 echo "# or true.executable with bogus path:"
315 $ domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
86 domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
316 [merge-tools]
317 false.whatever=
318 true.priority=1
319 true.executable=cat
320 # hg update -C 1
321 # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
322 couldn't find merge tool true specified for f
323 merging f
324 merging f failed!
325 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
326 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
327 # cat f
328 revision 1
329 space
330 # hg stat
331 M f
332 ? f.orig
333
334 $ echo
335
87
336
88 echo "# but true.executable set to cat found in PATH works:"
337 ui.merge overrules priority
89 echo "true.executable=cat" >> .hg/hgrc
90 domerge -r 2
91
338
92 echo "# and true.executable set to cat with path works:"
339 $ echo
93 domerge -r 2 --config merge-tools.true.executable=cat
340
341
342 ui.merge specifies false:
94
343
95 echo
344 $ domerge -r 2 --config ui.merge=false
96 echo Tool selection and merge-patterns
345 [merge-tools]
97 echo
346 false.whatever=
347 true.priority=1
348 true.executable=cat
349 # hg update -C 1
350 # hg merge -r 2 --config ui.merge=false
351 merging f
352 merging f failed!
353 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
354 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
355 # cat f
356 revision 1
357 space
358 # hg stat
359 M f
360 ? f.orig
361
362
363 ui.merge specifies internal:fail:
98
364
99 echo "# merge-patterns specifies new tool false:"
365 $ domerge -r 2 --config ui.merge=internal:fail
100 domerge -r 2 --config merge-patterns.f=false
366 [merge-tools]
367 false.whatever=
368 true.priority=1
369 true.executable=cat
370 # hg update -C 1
371 # hg merge -r 2 --config ui.merge=internal:fail
372 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
373 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
374 # cat f
375 revision 1
376 space
377 # hg stat
378 M f
379
380
381 ui.merge specifies internal:local:
101
382
102 echo "# merge-patterns specifies executable not found in PATH and gets warning:"
383 $ domerge -r 2 --config ui.merge=internal:local
103 domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
384 [merge-tools]
385 false.whatever=
386 true.priority=1
387 true.executable=cat
388 # hg update -C 1
389 # hg merge -r 2 --config ui.merge=internal:local
390 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
391 (branch merge, don't forget to commit)
392 # cat f
393 revision 1
394 space
395 # hg stat
396 M f
397
104
398
105 echo "# merge-patterns specifies executable with bogus path and gets warning:"
399 ui.merge specifies internal:other:
106 domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
107
400
108 echo
401 $ domerge -r 2 --config ui.merge=internal:other
109 echo ui.merge overrules priority
402 [merge-tools]
110 echo
403 false.whatever=
404 true.priority=1
405 true.executable=cat
406 # hg update -C 1
407 # hg merge -r 2 --config ui.merge=internal:other
408 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
409 (branch merge, don't forget to commit)
410 # cat f
411 revision 2
412 space
413 # hg stat
414 M f
415
416
417 ui.merge specifies internal:prompt:
111
418
112 echo "# ui.merge specifies false:"
419 $ domerge -r 2 --config ui.merge=internal:prompt
113 domerge -r 2 --config ui.merge=false
420 [merge-tools]
421 false.whatever=
422 true.priority=1
423 true.executable=cat
424 # hg update -C 1
425 # hg merge -r 2 --config ui.merge=internal:prompt
426 no tool found to merge f
427 keep (l)ocal or take (o)ther? l
428 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
429 (branch merge, don't forget to commit)
430 # cat f
431 revision 1
432 space
433 # hg stat
434 M f
435
114
436
115 echo "# ui.merge specifies internal:fail:"
437 ui.merge specifies internal:dump:
116 domerge -r 2 --config ui.merge=internal:fail
117
118 echo "# ui.merge specifies internal:local:"
119 domerge -r 2 --config ui.merge=internal:local
120
438
121 echo "# ui.merge specifies internal:other:"
439 $ domerge -r 2 --config ui.merge=internal:dump
122 domerge -r 2 --config ui.merge=internal:other
440 [merge-tools]
441 false.whatever=
442 true.priority=1
443 true.executable=cat
444 # hg update -C 1
445 # hg merge -r 2 --config ui.merge=internal:dump
446 merging f
447 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
448 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
449 # cat f
450 revision 1
451 space
452 # hg stat
453 M f
454 ? f.base
455 ? f.local
456 ? f.orig
457 ? f.other
458
123
459
124 echo "# ui.merge specifies internal:prompt:"
460 f.base:
125 domerge -r 2 --config ui.merge=internal:prompt
461
462 $ cat f.base
463 revision 0
464 space
465
466 f.local:
467
468 $ cat f.local
469 revision 1
470 space
471
472 f.other:
473
474 $ cat f.other
475 revision 2
476 space
477 $ rm f.base f.local f.other
478 $ echo
479
480
481 ui.merge specifies internal:other but is overruled by pattern for false:
126
482
127 echo "# ui.merge specifies internal:dump:"
483 $ domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
128 domerge -r 2 --config ui.merge=internal:dump
484 [merge-tools]
129 echo f.base:
485 false.whatever=
130 cat f.base
486 true.priority=1
131 echo f.local:
487 true.executable=cat
132 cat f.local
488 # hg update -C 1
133 echo f.other:
489 # hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
134 cat f.other
490 merging f
135 rm f.base f.local f.other
491 merging f failed!
136 echo
492 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
493 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
494 # cat f
495 revision 1
496 space
497 # hg stat
498 M f
499 ? f.orig
500
501 $ echo
502
503
504 Premerge
505
506 $ echo
507
508
509 Default is silent simplemerge:
137
510
138 echo "# ui.merge specifies internal:other but is overruled by pattern for false:"
511 $ domerge -r 3
139 domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
512 [merge-tools]
513 false.whatever=
514 true.priority=1
515 true.executable=cat
516 # hg update -C 1
517 # hg merge -r 3
518 merging f
519 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
520 (branch merge, don't forget to commit)
521 # cat f
522 revision 1
523 space
524 revision 3
525 # hg stat
526 M f
527
528
529 .premerge=True is same:
140
530
141 echo
531 $ domerge -r 3 --config merge-tools.true.premerge=True
142 echo Premerge
532 [merge-tools]
143 echo
533 false.whatever=
534 true.priority=1
535 true.executable=cat
536 # hg update -C 1
537 # hg merge -r 3 --config merge-tools.true.premerge=True
538 merging f
539 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
540 (branch merge, don't forget to commit)
541 # cat f
542 revision 1
543 space
544 revision 3
545 # hg stat
546 M f
547
144
548
145 echo "# Default is silent simplemerge:"
549 .premerge=False executes merge-tool:
146 domerge -r 3
147
550
148 echo "# .premerge=True is same:"
551 $ domerge -r 3 --config merge-tools.true.premerge=False
149 domerge -r 3 --config merge-tools.true.premerge=True
552 [merge-tools]
150
553 false.whatever=
151 echo "# .premerge=False executes merge-tool:"
554 true.priority=1
152 domerge -r 3 --config merge-tools.true.premerge=False
555 true.executable=cat
153
556 # hg update -C 1
154
557 # hg merge -r 3 --config merge-tools.true.premerge=False
155 echo
558 revision 1
156 echo Tool execution
559 space
157 echo
560 revision 0
561 space
562 revision 0
563 space
564 revision 3
565 merging f
566 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
567 (branch merge, don't forget to commit)
568 # cat f
569 revision 1
570 space
571 # hg stat
572 M f
573
574 $ echo
575
158
576
159 echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other'
577 Tool execution
160 beforemerge
161 hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \
162 | sed 's,==> .* <==,==> ... <==,g'
163 aftermerge
164
165 echo '# Merge with "echo mergeresult > $local":'
166 beforemerge
167 hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local'
168 aftermerge
169
578
170 echo '# - and $local is the file f:'
579 $ echo
171 beforemerge
580
172 hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f'
581 $ echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other'
173 aftermerge
582 # set tools.args explicit to include $base $local $other $output:
174
583 $ beforemerge
175 echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:'
584 [merge-tools]
176 beforemerge
585 false.whatever=
177 hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
586 true.priority=1
178 aftermerge
587 true.executable=cat
588 # hg update -C 1
589 $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \
590 > | sed 's,==> .* <==,==> ... <==,g'
591 ==> ... <==
592 revision 0
593 space
594
595 ==> ... <==
596 revision 1
597 space
598
599 ==> ... <==
600 revision 2
601 space
602
603 ==> ... <==
604 revision 1
605 space
606 merging f
607 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
608 (branch merge, don't forget to commit)
609 $ aftermerge
610 # cat f
611 revision 1
612 space
613 # hg stat
614 M f
615
616 $ echo '# Merge with "echo mergeresult > $local":'
617 # Merge with "echo mergeresult > $local":
618 $ beforemerge
619 [merge-tools]
620 false.whatever=
621 true.priority=1
622 true.executable=cat
623 # hg update -C 1
624 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local'
625 merging f
626 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
627 (branch merge, don't forget to commit)
628 $ aftermerge
629 # cat f
630 mergeresult
631 # hg stat
632 M f
633
634 $ echo '# - and $local is the file f:'
635 # - and $local is the file f:
636 $ beforemerge
637 [merge-tools]
638 false.whatever=
639 true.priority=1
640 true.executable=cat
641 # hg update -C 1
642 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f'
643 merging f
644 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
645 (branch merge, don't forget to commit)
646 $ aftermerge
647 # cat f
648 mergeresult
649 # hg stat
650 M f
651
652 $ echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:'
653 # Merge with "echo mergeresult > $output" - the variable is a bit magic:
654 $ beforemerge
655 [merge-tools]
656 false.whatever=
657 true.priority=1
658 true.executable=cat
659 # hg update -C 1
660 $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
661 merging f
662 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
663 (branch merge, don't forget to commit)
664 $ aftermerge
665 # cat f
666 mergeresult
667 # hg stat
668 M f
669
179
670
180 echo '# Merge using tool with a path that must be quoted:'
671 Merge using tool with a path that must be quoted:
181 beforemerge
672
182 cat <<EOF > 'my merge tool'
673 $ beforemerge
183 #!/bin/sh
674 [merge-tools]
184 cat "\$1" "\$2" "\$3" > "\$4"
675 false.whatever=
185 EOF
676 true.priority=1
186 chmod +x 'my merge tool'
677 true.executable=cat
187 hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output'
678 # hg update -C 1
188 rm -f 'my merge tool'
679 $ cat <<EOF > 'my merge tool'
189 aftermerge
680 > #!/bin/sh
681 > cat "\$1" "\$2" "\$3" > "\$4"
682 > EOF
683 $ chmod +x 'my merge tool'
684 $ hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output'
685 merging f
686 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
687 (branch merge, don't forget to commit)
688 $ rm -f 'my merge tool'
689 $ aftermerge
690 # cat f
691 revision 0
692 space
693 revision 1
694 space
695 revision 2
696 space
697 # hg stat
698 M f
699
700 $ echo
701
190
702
703 Merge post-processing
191
704
192 echo
705 $ echo
193 echo Merge post-processing
706
194 echo
707
708 cat is a bad merge-tool and doesn't change:
195
709
196 echo "# cat is a bad merge-tool and doesn't change:"
710 $ domerge -y -r 2 --config merge-tools.true.checkchanged=1
197 domerge -y -r 2 --config merge-tools.true.checkchanged=1
711 [merge-tools]
712 false.whatever=
713 true.priority=1
714 true.executable=cat
715 # hg update -C 1
716 # hg merge -y -r 2 --config merge-tools.true.checkchanged=1
717 revision 1
718 space
719 revision 0
720 space
721 revision 2
722 space
723 merging f
724 output file f appears unchanged
725 was merge successful (yn)? n
726 merging f failed!
727 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
728 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
729 # cat f
730 revision 1
731 space
732 # hg stat
733 M f
734 ? f.orig
735
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (547 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now