Patchwork D930: merge: add tests to show current behavior on failed filemerges

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 4:55 a.m.
Message ID <5edbc9b69001a87834d77f3fe347a41c@localhost.localdomain>
Download mbox | patch
Permalink /patch/24863/
State Not Applicable
Headers show

Comments

phabricator - Oct. 14, 2017, 4:55 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG143337bcec9b: merge: add tests to show current behavior on failed filemerges (authored by ryanmce, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D930?vs=2499&id=2712

REVISION DETAIL
  https://phab.mercurial-scm.org/D930

AFFECTED FILES
  tests/test-merge-halt.t

CHANGE DETAILS




To: ryanmce, #hg-reviewers, quark, durin42
Cc: quark, krbullock, mercurial-devel

Patch

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,78 @@ 
+  $ cat >> $HGRCPATH <<EOF
+  > [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
+
+Testing on-failure=continue
+  $ echo on-failure=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 resolve --list
+  U a
+  U b
+
+  $ hg rebase --abort
+  rebase aborted
+
+Testing on-failure=halt
+  $ echo on-failure=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
+
+Testing on-failure=prompt
+  $ echo on-failure=prompt >> $HGRCPATH
+  $ cat <<EOS | hg rebase -s 1 -d 2 --tool false --config ui.interactive=1
+  > 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
+