This is an archive of the discontinued Mercurial Phabricator instance.

continue: added logic for hg continue
ClosedPublic

Authored by taapas1128 on Jul 15 2019, 4:41 PM.

Details

Summary

This is part of GSoC19 project `Implement abort and
continue commands`. This patch is part of the continue plan.

This adds the basic logic for hg continue. This command
aborts an multistep operation like graft, histedit, rebase,
transplant and unshelve if they are in an unfinished state.

The first part of the logic is determining the unfinished
operation from the state detection API under statemod.
This API is extended to support hg continue by adding a method
to register the abort logic as a function (here continuefunc).

Once the unfinished operation is determined the registered
logic is used to resume the command in case it is interrupted.
The benefit of this kind of framework is that any new extension
developed can support hg continue by registering the command
and logic under statedetection API.

hg continue currently supports --dry-run/-n flag only.
It is used to dry run hg abort

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 15 2019, 4:41 PM
taapas1128 updated this revision to Diff 15915.Jul 15 2019, 4:48 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
pulkit added a subscriber: pulkit.Jul 18 2019, 12:44 AM
pulkit added inline comments.
mercurial/commands.py
1906

This line should not be a part of user help.