Here is the flow of gerrit code review.

  • Engineer commit change list in local git and push to gerrit for review.

    $git add file

    $git commit -m "message"

    $git push origin HEAD:refs/for/<branch name>

    Engineer should add reviewers one by one to review the CL.

  • When code in review, engineer can amend the CL and push that into gerrit again as patch set 2, 3 etc.

    $git add file

    $git commit --amend

    $git push origin HEAD:refs/for/<branch name>

  • The reviewer can provide comment in gerrit, and provides score as -1, 0, or 1.

    The +1 stands for agree with the CL and -1 for disagree with it.

    The reviewer can provide comment in gerrit, and provides score as -1, 0, or 1.

  • The integrator can provide -2 or +2 for the CL, based on reviewers' comment and other rules.

    The +2 rating moves CL into "Ready for submit" state. The integrator can click "Submit" button to merge the CL. Only integrator has this privilege.

    The -2 rating moves CL into "Cannot be merged" state. Then no one else can merge the CL, even other integrator. Only integrator has this privilege.

  • The integrator can merge CL with +2 rating into git repository, or provide -1 to get it back to code review.

  • The integrator can provide +1 to "Cannot be merged" to bring it back to code review status. It should be the same integrator who provides -2 to the CL. In another word, if integrator A provides -2 and integrator B provides +1, the CL is still in "Cannot be merged" status, until integrator A provides +1.

  • The CL owner or integrator can abandon CL in code review state or "Cannot be merged" state.

    Eventually, one CL is either merged or abandoned in gerrit.

results matching ""

    No results matching ""