( )⚙ D6568 abort: added support for rebase

This is an archive of the discontinued Mercurial Phabricator instance.

abort: added support for rebase
ClosedPublic

Authored by taapas1128 on Jun 23 2019, 1:43 PM.

Details

Summary

This adds support of rebase to hg abort plan.

An independent abort logic for rebase is created
under abortrebase() function. For this a seperate
rebaseruntime object is created under the function to
handle an unfinished rebasestate and abort that using
abort logic under _prepareabortorcontinue.

Results of tests are shown.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

taapas1128 created this revision.Jun 23 2019, 1:43 PM
taapas1128 updated this revision to Diff 15733.Jul 1 2019, 5:50 PM
pulkit added a subscriber: pulkit.Jul 2 2019, 5:36 PM

Since we both are discussing and working on this, we can understand why this patch does what it does. It will be nice to have more explained commit descriptions which explain why we need to have an function independent of rebase-runtime-state object. This applies to all the patches in the series. In the hg abort patch, explaining how it works will be good.

taapas1128 edited the summary of this revision. (Show Details)Jul 3 2019, 7:01 PM
taapas1128 updated this revision to Diff 15752.

@pulkit I have updated the descriptions.

taapas1128 updated this revision to Diff 15767.Jul 4 2019, 5:07 PM
pulkit added inline comments.Jul 5 2019, 5:56 PM
hgext/rebase.py
1926

we can name this function abortrebase, no need to add hg in front.

1928

aborting rebase ..

tests/test-rebase-abort.t
128 ↗(On Diff #15767)

This message means that we are aborting rebase. Rather we should print something like, rebase in progress, will be aborted.

taapas1128 edited the summary of this revision. (Show Details)Jul 6 2019, 2:48 PM
taapas1128 updated this revision to Diff 15780.
taapas1128 marked 2 inline comments as done.Jul 6 2019, 2:58 PM
taapas1128 edited the summary of this revision. (Show Details)Jul 8 2019, 2:17 PM
taapas1128 updated this revision to Diff 15805.
pulkit added inline comments.Jul 9 2019, 6:31 AM
hgext/rebase.py
1929

If I am correct, the call to abort from hg rebase --abort does not pass backup and suppwarns as these values.

Look for line 1023 in this file.

taapas1128 edited the summary of this revision. (Show Details)Jul 9 2019, 8:24 AM
taapas1128 updated this revision to Diff 15832.
taapas1128 marked an inline comment as done.Jul 9 2019, 8:28 AM
pulkit accepted this revision.Jul 10 2019, 8:41 AM
This revision is now accepted and ready to land.Jul 10 2019, 8:41 AM
This revision was automatically updated to reflect the committed changes.