hg unshelve --unresolved will get the user back to the old unresolved merge by
the following steps:
Step 1: If the user has committed new changesets after shelving the changes,
they must update the working directory to one of the merge parents.
Step 2: Change parents of dirstate to p1 and p2.
Step 3: In order to restore our partially resolved state, we will write from
data stored in changeset extras.
Step 4: We now have a state in which files marked as resolved might have
conflicts. But, we will apply the changes in shelve on the top of this so that we
can get our old unresolved merge again by the usual unshelve mechanism.
The usual rebase step is avoided on unresolved shelve changesets.
$ hg unshelve --unresolved will abort when:
- The working directory is dirty.
- If there is an ongoing merge.
- If the working directory is not at either p1 or p2.
(p1, p2 are the parents of the unresolved shelve changeset)