diff -r c858afe9c59b -r 05535d0dea68 tests/test-merge-halt.t --- a/tests/test-merge-halt.t Wed Oct 18 04:31:46 2017 +0530 +++ b/tests/test-merge-halt.t Fri Oct 06 06:48:43 2017 -0700 @@ -55,8 +55,13 @@ rebase aborted Testing on-failure=prompt - $ echo on-failure=prompt >> $HGRCPATH - $ cat <> $HGRCPATH + > [merge] + > on-failure=prompt + > [ui] + > interactive=1 + > EOS + $ cat < y > n > EOS @@ -77,3 +82,83 @@ $ hg rebase --abort rebase aborted +Check that successful tool with failed post-check halts the merge + $ cat <> $HGRCPATH + > [merge-tools] + > true.check=changed + > EOS + $ cat < y + > n + > n + > EOS + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + output file a appears unchanged + was merge successful (yn)? y + output file b appears unchanged + was merge successful (yn)? n + merging b failed! + continue merge operation (yn)? n + merge halted after failed merge (see hg resolve) + [1] + + $ hg resolve --list + R a + U b + + $ hg rebase --abort + rebase aborted + +Check that conflicts with conflict check also halts the merge + $ cat <> $HGRCPATH + > [merge-tools] + > true.check=conflicts + > true.premerge=keep + > [merge] + > on-failure=halt + > EOS + $ hg rebase -s 1 -d 2 --tool true + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + merging a failed! + merge halted after failed merge (see hg resolve) + [1] + + $ hg resolve --list + U a + U b + + $ hg rebase --abort + rebase aborted + +Check that always-prompt also can halt the merge + $ cat < y + > n + > EOS + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + was merge of 'a' successful (yn)? y + was merge of 'b' successful (yn)? n + merging b failed! + merge halted after failed merge (see hg resolve) + [1] + + $ hg resolve --list + R a + U b + + $ hg rebase --abort + rebase aborted + +Check that successful tool otherwise allows the merge to continue + $ hg rebase -s 1 -d 2 --tool echo --keep --config merge-tools.echo.premerge=keep + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + $TESTTMP/repo/a *a~base* *a~other* (glob) + $TESTTMP/repo/b *b~base* *b~other* (glob)