Sheriffing/How To/Landing patches

From MozillaWiki
Jump to navigation Jump to search

Sheriffs have the responsibility for landing checkin-needed patches on behalf of others who do not have the needed commit access to do so themselves or those who do not have the ability to watch their pushes afterwards.

Bugzilla queries for patches requiring check-in

How to land check-in needed patches

  • Verify that the patch has proper review before doing anything else
  • Saving the attachment from the bug.
  • Apply the patch to the appropriate repository using hg import (preferred) or patch.
    • For almost all patches, the appropriate repository is mozilla-inbound.
  • If the patch does not apply cleanly, you can try to rebase. If that doesn't solve the issue, your best course of action is to remove the checkin-needed request and ask the developer to post an updated patch for check-in. If you understand the code very well or the conflicts are extremely trivial, you can try to resolve the conflicts yourself, but note that YOU are now on the hook for this patch too.
  • Once the patch applies cleanly, verify that the commit information is correct:
    • Author (use the information from their Bugzilla account if needed)
    • Bug number
    • Commit message (keeping in mind that the commit message should be a brief description of what the patch is doing)
      • Format should be something like "Bug 123456 - Add a null check to XYZ to avoid a crash. r=somebody"
  • If a patch is missing commit information, remind the patch author to include it for future patches with a link to the Mercurial FAQ page that describes how to set it.