This is an archive of the discontinued Mercurial Phabricator instance.

rebase: in --confirm option just abort if hit a conflict
ClosedPublic

Authored by khanchi97 on Jul 14 2018, 2:00 AM.

Details

Summary

Before this patch, it was prompting the user in both cases 1) when
there is no conflict 2) when there is atleast one conlict. But
for simplicity we can just abort if we hit a conflict and no need to
prompt in that case.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

khanchi97 created this revision.Jul 14 2018, 2:00 AM
khanchi97 added inline comments.Jul 14 2018, 7:20 AM
hgext/rebase.py
875

In the case when we hit a conflict, yuya suggested me to either prompt the user to confirm for "rerun rebase that's known to have at least one conflict" OR not prompt at all, just abort if we hit a conflict.
And I think, to keep it simple, just aborting is good option, not sure first option could be more useful though.

yuja added a subscriber: yuja.Jul 14 2018, 10:14 AM

Queued, thanks.

rbsrt._prepareabortorcontinue(isabort=True, backup=False,
                              suppwarns=True)
needsabort = False

You can remove the if confirm: block at all as it's handled at finally:.

This revision was automatically updated to reflect the committed changes.