Page MenuHomePhabricator

abort: added support for rebase
ClosedPublic

Authored by taapas1128 on Sun, Jun 23, 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

taapas1128 created this revision.Sun, Jun 23, 1:43 PM
taapas1128 updated this revision to Diff 15733.Mon, Jul 1, 5:50 PM
pulkit added a subscriber: pulkit.Tue, Jul 2, 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)Wed, Jul 3, 7:01 PM
taapas1128 updated this revision to Diff 15752.

@pulkit I have updated the descriptions.

taapas1128 updated this revision to Diff 15767.Thu, Jul 4, 5:07 PM
pulkit added inline comments.Fri, Jul 5, 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

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)Sat, Jul 6, 2:48 PM
taapas1128 updated this revision to Diff 15780.
taapas1128 marked 2 inline comments as done.Sat, Jul 6, 2:58 PM
taapas1128 edited the summary of this revision. (Show Details)Mon, Jul 8, 2:17 PM
taapas1128 updated this revision to Diff 15805.
pulkit added inline comments.Tue, Jul 9, 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)Tue, Jul 9, 8:24 AM
taapas1128 updated this revision to Diff 15832.
taapas1128 marked an inline comment as done.Tue, Jul 9, 8:28 AM
pulkit accepted this revision.Wed, Jul 10, 8:41 AM
This revision is now accepted and ready to land.Wed, Jul 10, 8:41 AM
This revision was automatically updated to reflect the committed changes.