Sheriffing/How To/Landing patches: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Removed mention of mcMerge (not needed anymore, now done automatically))
No edit summary
Line 1: Line 1:
An area of responsibility the sheriffs have taken on is 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.
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 =
* [https://bugzilla.mozilla.org/buglist.cgi?order=Bug%20Number;resolution=---;resolution=FIXED;field0-0-0=keywords;type0-0-0=anywordssubstr;value0-0-0=checkin-needed;field0-0-1=status_whiteboard;type0-0-1=substring;value0-0-1=checkin-needed;field0-0-2=flagtypes.name;type0-0-2=equals;value0-0-2=checkin%3F; Bugs with checkin-needed or checkin? requests set in all components]
* [https://bugzilla.mozilla.org/buglist.cgi?order=Bug%20Number;resolution=---;resolution=FIXED;field0-0-0=keywords;type0-0-0=anywordssubstr;value0-0-0=checkin-needed;field0-0-1=status_whiteboard;type0-0-1=substring;value0-0-1=checkin-needed;field0-0-2=flagtypes.name;type0-0-2=equals;value0-0-2=checkin%3F; Bugs with checkin-needed or checkin? requests set in all components]
* [http://mzl.la/1qLItZf Bugs with checkin-needed or checkin? requests set excluding non-core components]
* [http://mzl.la/1qLItZf Bugs with checkin-needed or checkin? requests set excluding non-core components]
** This is now available as a shared saved search for anyone with editbugs permissions on bugzilla. Go [https://bugzilla.mozilla.org/userprefs.cgi?tab=saved-searches here] and search for "checkin-needed-core" to find it in the list, and you can add it to Bugzilla's footer.
** This is now available as a shared saved search for anyone with editbugs permissions on bugzilla. Go [https://bugzilla.mozilla.org/userprefs.cgi?tab=saved-searches here] and search for "checkin-needed-core" to find it in the list, and you can add it to Bugzilla's footer.


= How to land check-in needed patches =
* <u><b>Verify that the patch has proper review before doing anything else</b></u>
* <u><b>Verify that the patch has proper review before doing anything else</b></u>
** [https://wiki.mozilla.org/Modules Module information]
** [https://wiki.mozilla.org/Modules Module information]
* Add the patch to the appropriate repository's queue via saving the attachment from the bug and using hg import or using a tool like qimportbz to automate the process.
* Saving the attachment from the bug.
** For general core patches, land on mozilla-inbound.
* Apply the patch to the appropriate repository using <code>hg import</code> (preferred) or <code>patch</code>.
** For core B2G work (*NOT* platform-independent core patches that happen to be fixing a B2G bug), use b2g-inbound.
** For almost all patches, the appropriate repository is mozilla-inbound.
** For Firefox front-end work/any Firefox for Android-specific work, use fx-team.
* If the patch does not apply cleanly, you can try to [https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmozilla/extensions.html#core-extensions-to-perform-history-rewriting 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.
* Apply the patch via qpush.
* If the patch does not apply cleanly, you can look at the rejects and decide if the rebase is simple enough resolve yourself or you can remove the checkin-needed request and ask the developer to post an updated patch for checkin. <b>Don't forget to qrefresh after resolving conflicts!</b>
* Once the patch applies cleanly, verify that the commit information is correct:
* Once the patch applies cleanly, verify that the commit information is correct:
** Author (use the information from their Bugzilla account if needed)
** Author (use the information from their Bugzilla account if needed)

Revision as of 16:44, 21 July 2017

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.