m-cMerge has been updated regularly since it was unveiled. One recent update added the ability to handle pushes from trees other than mozilla-central. There are plenty of times where large patch series land on integration repositories such as mozilla-inbound, and marking them is as much of a chore as marking merges.
I’ve now taken this to its logical conclusion, and added the ability for m-cMerge to handle backouts as well. You often see sweeping backouts on mozilla-inbound, trying to get the tree back to a green state. Most of the time each of those bugs will be getting commented with the same information – a reason for the backout, and the rev URLs of the backout changesets. That sounds perfect for automation!
m-cMerge will now handle backouts in certain circumstances. Specifically, there can be no fixes landing in the same push, or a fix and its backout landing in the same push. I don’t think we lose anything with these restrictions – you’re unlikely to be landing new code as well as trying to clean up the tree. Equally, you’re unlikely to land a fix and back it out again in the same push – the only scenario where that could happen is a merge, and the backout commenting should already have been done when the backout hit the integration repo.
When given a backout revision, m-cMerge will attempt to attach the relevant bugs to pushes, as normal.
m-cMerge will detect the bugs affected by the backout
As always, the “Add”, “Remove” and “Change” buttons allow for manual review, and correction of anything that has been misdetected.
If you are dealing with a mozilla-central backout, you will be offered the opportunity to reopen the bug.
RESOLVED FIXED? Let me reopen that for you.
Note in this case the “comment” and “reopen” options are linked – you wouldn’t want to reopen a bug without explanation, nor would you post the backout revisions without making the patch author aware he/she was backed out.
You can manually edit the comments if you wish. However, if you need to add the same backout explanation to every bug, there is another solution. When you hit submit, m-cMerge will look at all the bugs whose comment still starts with the changeset URL, and for those, it will present you with the following dialog:
Adding the same explanation to multiple bugs is easy
This will allow you to add some explanatory text prior to the changeset URL. Checking the checkbox will add the same text to any unedited bug comments that have not yet been submitted, and won’t prompt you again. Leaving it unchecked will prompt you to enter text for the next bug when it is ready to be submitted. Hitting ESC or Cancel will transmit the change for this bug without any additional comment text. Leave the textarea empty and check the box to send all comments as they are.
As always, report any bugs in the BitBucket bug tracker. I hope this proves useful.