rollback/backout a wrong merge between named branches?
Giorgos Keramidas
keramida at ceid.upatras.gr
Thu Oct 8 15:57:02 UTC 2009
On Thu, 8 Oct 2009 16:57:36 +0200, Ringo De Smet <ringo.desmet at gmail.com> wrote:
> 2009/10/8 Colin Caughie <c.caughie at indigovision.com>:
>>
>> Didn't this happen recently on the hg development repository itself? How was it handled there?
>>
>
> I don't understand your questions!
>
> Let me rephrase: the commits on the 'default' branch where not faulty.
> These were valid commits for the ongoing development of our product
> release 1.6. Now, someone performed a merge from a revision on branch
> 'default' to branch '1.5' which pulled a lot of changes to the 1.5
> branch that is being stabilised. Then this merge changeset was pushed
> to the central repository. We now have to undo this merge.
>
> In all the documentation I checked so far, it seems that the Mercurial
> command set doesn't give me a quick way of creating a *new* revision
> with all the changes of this merge undone. Any suggestions here?
How about this?
hg update --clean FAULTYREVISION
hg revert --rev GOODREVISION --all
hg commit -m 'Undo broken merge of FAULTYREVISION'
This will keep the faulty merge in the history of the repository but
should roll everything back to a ``known good state''.
More information about the Mercurial
mailing list