##// END OF EJS Templates
filemerge: introduce functions to halt merge flow...
filemerge: introduce functions to halt merge flow Depends on D931. This patch introduces functions and a config option that will allow a user to halt the merge if there are failures during a file merge. These functions will be used in the next patch. Differential Revision: https://phab.mercurial-scm.org/D932

File last commit:

r34680:143337bc default
r34797:ed91846c default
Show More
test-merge-halt.t
78 lines | 1.4 KiB | text/troff | Tads3Lexer
$ 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