This patch adds an `--unresolved` flag to `unshelve`.
This will get the user back to the old unresolved merge by the following
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: Internally, merge `p1` with `p2` with the merge tool `:fail`.
This will not update the contents of the files with conflicting changes.
Instead, it will mark them as unresolved.
step 3: This internal merge will also mark the files which are already
resolved by the user in the unresolved shelve changeset as unresolved. But,
we will move the contents of `$HGRCPATH/merge-unresolved/<basename>/`
to `$HGRCPATH/merge/` so that we can restore the partially resolved states.
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:
1. The working directory is dirty.
2. If there is an ongoing merge.
3. If the working directory is not at either p1 or p2.
(p1, p2 are the parents of the unresolved shelve changeset)