merged two branches, and pushed, how to backout/strip?

Uwe Brauer oub at mat.ucm.es
Mon Jan 9 23:07:09 UTC 2017


>>> "Arne" == Arne Babenhauserheide <arne_bab at web.de> writes:
   >> 
   >> That is correct? However I end up in  the vs-11.89 branch.
   >> 
   >> I don't really understand
   >> hg up vs-11.89
   >> hg merge default
   >> hg ci -m "merge default with the backout"
   >> hg log -G
   >> # revert the last bad commit to branch vs-11.89
   >> hg revert --all -r 4
   >> hg ci -m "backout the backout"
   >> 
   >> Why are the merge and revert necessary?

   > The merge and revert are necessary, because if you only revert the
   > default branch, this branch then contains a commit which undoes all the
   > work in vs-11.89. If you were to do some changes and then merge it into
   > the vs-11.89 branch to get that branch up to date, it would undo all the
   > work done in the vs-11.89 branch up until you first merged it into
   > default.

   > Reason: Default contains a change which undoes the changes in vs-11.89.

   > To fix that, vs-11.89 needs a change which undoes the undoing of its
   > changes.

Ok so I understand I have to move out the merge from both branches.

I thought

hg revert --all -r 1
hg commit -m "revert bad commit out of default branch"
hg up vs-11.89
hg revert --all -r 4
hg commit -m "revert bad commit out of vs-11.89 branch"
hg merge default
hg commit -m "Merge default into vs-11.89"

But this is not what you do.

I think I am too tired for that now. I have to think why you merge again
after the first revert before you backout.

Uwe 




More information about the Mercurial mailing list