Mercurial > hg
changeset 38679:b3d0c97a0820
rebase: in --confirm option just abort if hit a conflict
Before this patch, it was prompting the user in both cases 1) when
there is no conflict 2) when there is at least one conflict. But
for simplicity we can just abort if we hit a conflict and no need to
prompt in that case.
Differential Revision: https://phab.mercurial-scm.org/D3944
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 14 Jul 2018 08:59:42 +0530 |
parents | 7e4a856a4f05 |
children | 70448ec995c2 |
files | hgext/rebase.py tests/test-rebase-inmemory.t |
diffstat | 2 files changed, 1 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Thu Jul 12 15:29:03 2018 +0200 +++ b/hgext/rebase.py Sat Jul 14 08:59:42 2018 +0530 @@ -872,9 +872,6 @@ rbsrt._prepareabortorcontinue(isabort=True, backup=False, suppwarns=True) needsabort = False - if not ui.promptchoice(_(b'apply changes (yn)?' - b'$$ &Yes $$ &No')): - return _dorebase(ui, repo, opts, inmemory=False) return 1 else: if confirm:
--- a/tests/test-rebase-inmemory.t Thu Jul 12 15:29:03 2018 +0200 +++ b/tests/test-rebase-inmemory.t Sat Jul 14 08:59:42 2018 +0530 @@ -472,14 +472,11 @@ o 0:cb9a9f314b8b test a - $ hg rebase -s 4 -d . --keep --config ui.interactive=True --confirm << EOF - > n - > EOF + $ hg rebase -s 4 -d . --keep --confirm starting in-memory rebase rebasing 4:e860deea161a "e" merging e hit a merge conflict - apply changes (yn)? n [1] $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" @ 9:906d72f66a59 test @@ -512,58 +509,3 @@ o 0:cb9a9f314b8b test a - - $ hg rebase -s 4 -d . --keep --config ui.interactive=True --confirm << EOF - > y - > EOF - starting in-memory rebase - rebasing 4:e860deea161a "e" - merging e - hit a merge conflict - apply changes (yn)? y - rebasing 4:e860deea161a "e" - merging e - warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - unresolved conflicts (see hg resolve, then hg rebase --continue) - [1] - - $ echo e>e - $ hg resolve --mark --all - (no more unresolved files) - continue: hg rebase --continue - $ hg rebase --continue - rebasing 4:e860deea161a "e" - $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" - o 10:9fa3731dd6df test - | e - | - @ 9:906d72f66a59 test - | conflict with e - | - o 8:12cbf031f469 test - | d - | - o 7:c83b1da5b1ae test - | c - | - o 6:baf10c5166d4 test - | g - | - o 5:6343ca3eff20 test - | f - | - | o 4:e860deea161a test - | | e - | | - | o 3:055a42cdd887 test - | | d - | | - | o 2:177f92b77385 test - |/ c - | - o 1:d2ae7f538514 test - | b - | - o 0:cb9a9f314b8b test - a -