D3870: rebase: add --confirm option
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Thu Jul 12 13:14:56 UTC 2018
yuja added a comment.
Queued, thanks.
> - ui.status(_('starting dry-run rebase; repository will not be changed\n')) + confirm = opts.get('confirm') + if confirm: + ui.status(_('starting rebase...\n'))
Nit: this message is misleading since nothing will be committed until
accepting the changes. Can you remove it? Or alternatively, we can say that
you're doing rebase in-memory so you're safe.
> with repo.wlock(), repo.lock():
> try:
>
> + needsabort = True
Moved this before the "try".
> except error.InMemoryMergeConflictsError:
> ui.status(_('hit a merge conflict\n'))
>
> + if confirm:
> + # abort as in-memory merge doesn't support conflict
> + rbsrt._prepareabortorcontinue(isabort=True, backup=False,
> + suppwarns=True)
> + needsabort = False
> + if not ui.promptchoice(_(b'apply changes (yn)?'
> + b'$$ &Yes $$ &No')):
Nit: This isn't actually "apply changes".
> + _dorebase(ui, repo, opts, inmemory=False)
`return _dorebase(...)` to not loose the actual result code. Can you
fix by a follow-up patch?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3870
To: khanchi97, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list