This is an archive of the discontinued Mercurial Phabricator instance.

merge: disallow merge abort in case of an unfinished operation(issue6160)
ClosedPublic

Authored by taapas1128 on Jul 6 2019, 4:10 AM.

Details

Summary

This patch disallows hg merge --abort in case an operation of higher
precedence i.e unshelve, rebase, histedit are in unfinished states.

This is done so as to avoid partial abort of these operations in case
merge abort is called at an interrupted step.

The patch adds a cmdutil.getunfinishedstate function which checks
for operations under progress and returns a statecheck object for it.

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.Jul 6 2019, 4:10 AM
pulkit added a subscriber: pulkit.Jul 8 2019, 11:21 AM
pulkit added inline comments.
mercurial/commands.py
3953

We should first check if abort before performing this loop instead of checking later.

3955

we don't need to create a new variable. We can operate on state below.

taapas1128 updated this revision to Diff 15793.Jul 8 2019, 11:46 AM
taapas1128 marked 2 inline comments as done.Jul 8 2019, 11:47 AM
pulkit added inline comments.Jul 8 2019, 11:48 AM
mercurial/commands.py
3955

We are performing the same loop in https://phab.mercurial-scm.org/D6566. How about having a utility function which will return the unfinished state, something like getunfinishedstate

okay I will create that in cmdutil.py.

taapas1128 edited the summary of this revision. (Show Details)Jul 8 2019, 2:16 PM
taapas1128 updated this revision to Diff 15801.
pulkit added a comment.Jul 8 2019, 5:48 PM

Also, can you add an entry about this to relnotes/next?

mercurial/commands.py
3956

state can be None here.

taapas1128 updated this revision to Diff 15814.Jul 8 2019, 6:00 PM
taapas1128 marked an inline comment as done.Jul 8 2019, 6:02 PM

added the entry in relnotes.

mercurial/commands.py
3956

My bad I really shouldn't have missed that.

taapas1128 marked an inline comment as done.Jul 8 2019, 6:02 PM
pulkit accepted this revision.Jul 9 2019, 5:45 AM
This revision is now accepted and ready to land.Jul 9 2019, 5:45 AM

This is the latest online this play euchre free card game i am exited to all time see it