Mercurial > hg
comparison tests/test-merge-tools.t @ 38029:a4a5c3085ea9
test-merge-tools: create repo directory to free $TESTTMP for temporary files
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 17 May 2018 21:55:00 +0900 |
parents | 1e30a26a65d0 |
children | 242eb5132203 |
comparison
equal
deleted
inserted
replaced
38028:d1134ca5b1a3 | 38029:a4a5c3085ea9 |
---|---|
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 $ hg init | 4 $ hg init repo |
5 $ cd repo | |
5 | 6 |
6 revision 0 | 7 revision 0 |
7 | 8 |
8 $ echo "revision 0" > f | 9 $ echo "revision 0" > f |
9 $ echo "space" >> f | 10 $ echo "space" >> f |
1444 > --config ui.mergemarkers=detailed \ | 1445 > --config ui.mergemarkers=detailed \ |
1445 > merge -r 2 | 1446 > merge -r 2 |
1446 merging f | 1447 merging f |
1447 labellocal: "working copy" | 1448 labellocal: "working copy" |
1448 labelother: "merge rev" | 1449 labelother: "merge rev" |
1449 output (arg): "$TESTTMP/f" | 1450 output (arg): "$TESTTMP/repo/f" |
1450 output (contents): | 1451 output (contents): |
1451 <<<<<<< working copy: uitmpl 1 | 1452 <<<<<<< working copy: uitmpl 1 |
1452 revision 1 | 1453 revision 1 |
1453 ======= | 1454 ======= |
1454 revision 2 | 1455 revision 2 |
1483 > --config ui.mergemarkers=detailed \ | 1484 > --config ui.mergemarkers=detailed \ |
1484 > merge -r 2 | 1485 > merge -r 2 |
1485 merging f | 1486 merging f |
1486 labellocal: "working copy: tooltmpl ef83787e2614" | 1487 labellocal: "working copy: tooltmpl ef83787e2614" |
1487 labelother: "merge rev: tooltmpl 0185f4e0cf02" | 1488 labelother: "merge rev: tooltmpl 0185f4e0cf02" |
1488 output (arg): "$TESTTMP/f" | 1489 output (arg): "$TESTTMP/repo/f" |
1489 output (contents): | 1490 output (contents): |
1490 <<<<<<< working copy: tooltmpl ef83787e2614 | 1491 <<<<<<< working copy: tooltmpl ef83787e2614 |
1491 revision 1 | 1492 revision 1 |
1492 ======= | 1493 ======= |
1493 revision 2 | 1494 revision 2 |
1583 $ hg mv f f.txt | 1584 $ hg mv f f.txt |
1584 $ hg ci -qm "f.txt" | 1585 $ hg ci -qm "f.txt" |
1585 $ hg update -q -C 2 | 1586 $ hg update -q -C 2 |
1586 $ hg merge -y -r tip --tool echo --config merge-tools.echo.args='$base $local $other $output' | 1587 $ hg merge -y -r tip --tool echo --config merge-tools.echo.args='$base $local $other $output' |
1587 merging f and f.txt to f.txt | 1588 merging f and f.txt to f.txt |
1588 */f~base.* */f~local.*.txt */f~other.*.txt $TESTTMP/f.txt (glob) | 1589 */f~base.* */f~local.*.txt */f~other.*.txt $TESTTMP/repo/f.txt (glob) |
1589 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | 1590 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
1590 (branch merge, don't forget to commit) | 1591 (branch merge, don't forget to commit) |
1591 | 1592 |
1592 Verify naming of temporary files and that extension is preserved | 1593 Verify naming of temporary files and that extension is preserved |
1593 (experimental.mergetempdirprefix version): | 1594 (experimental.mergetempdirprefix version): |
1598 $ hg update -q -C 2 | 1599 $ hg update -q -C 2 |
1599 $ hg merge -y -r tip --tool echo \ | 1600 $ hg merge -y -r tip --tool echo \ |
1600 > --config merge-tools.echo.args='$base $local $other $output' \ | 1601 > --config merge-tools.echo.args='$base $local $other $output' \ |
1601 > --config experimental.mergetempdirprefix=$TESTTMP/hgmerge. | 1602 > --config experimental.mergetempdirprefix=$TESTTMP/hgmerge. |
1602 merging f and f.txt to f.txt | 1603 merging f and f.txt to f.txt |
1603 $TESTTMP/hgmerge.*/f~base $TESTTMP/hgmerge.*/f~local.txt $TESTTMP/hgmerge.*/f~other.txt $TESTTMP/f.txt (glob) | 1604 $TESTTMP/hgmerge.*/f~base $TESTTMP/hgmerge.*/f~local.txt $TESTTMP/hgmerge.*/f~other.txt $TESTTMP/repo/f.txt (glob) |
1604 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | 1605 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
1605 (branch merge, don't forget to commit) | 1606 (branch merge, don't forget to commit) |
1606 | 1607 |
1607 Check that debugpicktool examines which merge tool is chosen for | 1608 Check that debugpicktool examines which merge tool is chosen for |
1608 specified file as expected | 1609 specified file as expected |
1666 | 1667 |
1667 $ hg debugpickmergetool --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool --debug f | 1668 $ hg debugpickmergetool --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool --debug f |
1668 couldn't find merge tool true (for pattern f) | 1669 couldn't find merge tool true (for pattern f) |
1669 couldn't find merge tool true | 1670 couldn't find merge tool true |
1670 f = false | 1671 f = false |
1672 | |
1673 $ cd .. |