Skip to content
Snippets Groups Projects
Commit 2ec44160165d authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

graft: add a new `--stop` flag to stop interrupted graft

This patch adds a new flag `--stop` to `hg graft` command which stops the
interrupted graft.

The `--stop` flag takes back you to the last successful step i.e. it will keep
your grafted commits, it will just clear the mergestate and interrupted graft
state.

The `--stop` is different from `--abort` flag as the latter also undoes all the
work done till now which is sometimes not what the user wants.

Suppose you grafted a lot of changesets, you encountered conflicts, you resolved
them, did `hg graft --continue`, again encountered conflicts, continue, again
encountered conflicts. Now you are tired of solving merge conflicts and want to
resume this sometimes later. If you use the `--abort` functionality, it will
strip your already grafted changesets, making you loose the work you have done
resolving merge conflicts.

A general goal related to this flag is to add this flag to `rebase` and
`histedit` too. The evolve command already has this --stop flag.

Tests are added for the new flag.

.. feature::

   `hg graft` now has a `--stop` flag to stop interrupted graft.

Differential Revision: https://phab.mercurial-scm.org/D3668
parent a8e7ea176437
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment