diff --git a/tests/test-merge-halt.t b/tests/test-merge-halt.t new file mode 100644 --- /dev/null +++ b/tests/test-merge-halt.t @@ -0,0 +1,74 @@ + $ cat >> $HGRCPATH < [extensions] + > rebase= + > [phases] + > publish=False + > [merge] + > EOF + + $ hg init repo + $ cd repo + $ echo a > a + $ echo b > b + $ hg commit -qAm ab + $ echo c >> a + $ echo c >> b + $ hg commit -qAm c + $ hg up -q ".^" + $ echo d >> a + $ echo d >> b + $ hg commit -qAm d + +Failing external merge tool blindly continues the merge + $ echo onfailure=continue >> $HGRCPATH + $ hg rebase -s 1 -d 2 --tool false + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + merging a failed! + merging b failed! + unresolved conflicts (see hg resolve, then hg rebase --continue) + [1] + + $ hg rebase --abort + rebase aborted + +Halting works on first failure + $ echo onfailure=halt >> $HGRCPATH + $ hg rebase -s 1 -d 2 --tool false + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + merging a failed! + merging b failed! + unresolved conflicts (see hg resolve, then hg rebase --continue) + [1] + + $ hg resolve --list + U a + U b + + $ hg rebase --abort + rebase aborted + +Prompting works when selected + $ echo onfailure=prompt >> $HGRCPATH + $ cat < y + > n + > EOS + rebasing 1:1f28a51c3c9b "c" + merging a + merging b + merging a failed! + merging b failed! + unresolved conflicts (see hg resolve, then hg rebase --continue) + [1] + + $ hg resolve --list + U a + U b + + $ hg rebase --abort + rebase aborted +