How do you reverse the effect of a merge on polarised branches without dying of agony?
This problem has been plaguing me for months and I have final
OK, start by making a new empty repository in a separate directory from the broken repository (hg init). Now, pull up to and including the last known good version into the new repository; make sure you do not pull the bad merge and do pull everything before it. In the old repository, update to the last known good version of A, and do this:
hg graft r1 r2 r3
where r1-3 are changes made after the botched merge. You may get conflicts at this point; fix them.
This should produce new changes against the last known good version of A. Pull those new changes into the new repository. Just to double check that you didn't miss anything, do an hg incoming against the old repository. If you see anything other than the botched merge and r1-3, pull it.
Throw the old repository away. You're done. The merge isn't in the new repository at all and you never had to rewrite history.