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

Arne Babenhauserheide arne_bab at web.de
Wed Jan 11 17:04:59 UTC 2017


Uwe Brauer <oub at mat.ucm.es> writes:

>    > Assuming you didn't leave out steps between your two reverts you are
>    > now worse off because that last commit isn't backing out a bad merge
>    > from vs-11.89, it's replacing everything on default with your last
>    > revision from vs-11.89.
>
> Oops that is not good.
>
> But that changeset (4) belongs to vs-11.89.
>
> If I run
> hg up vs 11.89 and then
> hg revert --all -r 4
> hg ci -m "backout the backout"
>
> I obtain
> nothing changed

This is because the merge does not exist yet on the vs-11.89
branch. However when you now do some work on default and merge it into
vs-11.89, you will introduce the backout of vs-11.89 into vs-11.89,
undoing the work you did there.

>    > If the bad merge is only bad because it was committed to the wrong
>    > branch, then instead of reverting to the last good commit in vs-11.89,
>
> No this is not the case, the merge is bad, because there was a bad
> commit in vs-11.89

In that case you can simply backout the bad commit in vs-11.89 and then
merge vs-11.89 into default again.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20170111/a1e1283c/attachment.asc>


More information about the Mercurial mailing list