I accidentally merged a branch into a workspace with applied patches.
How do I clean up this mess? Do I have to clean the merge (hg up -C
) or is there some way to save my merge?
Mercurial 1.9.1, TortoiseHg 2.1.2
I reproduced the basis of the situation with these commands on a fresh repo:
echo first > file.txt
hg add
hg ci -m first
hg branch test
echo test1 >> file.txt
hg ci -m test1
hg up 0
echo patch >> file.txt
hg qnew -f patch.diff
Then I performed hg merge test
and resolved conflicts, and tried some different things:
Committing is denied due to the involvement of patches:
abort: cannot commit over an applied mq patch
I could not shelve the merge in TortoiseHg.
I could not qnew
:
abort: cannot manage merge changesets
The only thing I found I could do to keep the merge was to finish the patches and commit the merge changeset. With the givens, I think keeping the patches and keeping the merge are mutually exclusive.
I know that pbranch allows merging with patches, and there's probably some way to import your MQ patches into it. I don't think it's supported in TortoiseHg, though.