Sheriffing/How To/Backouts

From MozillaWiki
Jump to navigation Jump to search

Backouts

Sheriffs also have to do Backouts of checkins from the various Mozilla Trees to fix bustages, test failures etc. This document should help doing these backouts

Requirements:

Make sure you have mq also activated in your hgrc too, otherwise you get an error message

Example backout:

backout of changeset abc1234

hg qbackout -r abc1234 -e

with -r you define the revision/checkin you want to backout with -e you can change the commit message, useful for closed trees etc

hg qfinish -a

finishes this transaction and you can proceed with hg push etc

when the commit message was wrong like forgot closed tree etc

hg qimport -r tip && hg qrefresh -e && hg qfinish -a && hg push

qimport can also be useful if someone has pushed to the tree between you hg qfinish -a'ing and you pushing:

hg qimport -r tip && hg qpop && hg pull -u && hg qpush [nnnnnn].diff && hg qfinish -a && hg push

This pulls the tip commit back into your mercurial queue, pops it off the queue, pulls in the other person's changes, pushes your commit back onto the queue on top of the new changes, finishes the queue and pushes to the tree.