How to merge commit in Gerrit Code Review
I'm newbie to gerrit: http://code.google.com/p/gerrit/ I installed it with git on my local Mac. It's done.
I make some test action:
register 2 accounts, the first accounts grant the "Administrators" privilege, the second account grant the "Registered Users"
create new project
I use the second account to push an commit to master branch for review. Add the first as reviewer
Review is OK. How to merge this commit to main branch? Any solution by web UI?
I resolved my issue.
Pay attention to 3 categories on Admin/Project/Access:
I miss the 2 last categories, so, Gerrit don't show the submit button
Once a commit has the maximum score in each category and no minimum scores in any category, it can be merged. The default categories are Code Review (-2 to +2) and Verified (-1 to +1). So to merge a commit, it must have a +2 Code Review and +1 Verified score, and no -2 Code Review or -1 Verified scores.
A user with 'Submit' privileges will see the 'Submit Patch Set n' button next to the 'Review' button. Click it to merge the commit.
The default permissions in Gerrit are not always what you might expect. In order for the first reviewer to be able to submit the review, you will have to give them (well, Administrators) permission to do a "+2" review score.
After you do this and the reviewer marks the commit as +2, then Gerrit will automatically merge the commit into the branch for which it was submitted.