How to unravel / undo merge on top of applied MQ patches?

I accidentally merged a branch into the workspace using patches.

How to clear this mess? Do I need to clear the merge ( hg up -C ) or is there a way to keep my merge?

+4
source share
1 answer

Mercurial 1.9.1, TortoiseHg 2.1.2

I reproduced the basics of the situation with these commands with a new 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 ran hg merge test and resolved the conflicts, and tried different things:

  • Commit is denied due to the participation of patches:

     abort: cannot commit over an applied mq patch 
  • I could not delay the merge in TortoiseHg.

  • I could not qnew :

     abort: cannot manage merge changesets 

The only thing I could find to save the merge was to finish the patches and commit the set of merge changes. With givens, I believe that saving patches and saving merging are mutually exclusive.

I know that pbranch allows merging with patches and, possibly, somehow importing your MQ patches into it. I do not think this was supported in TortoiseHg.

+2
source

All Articles