Keeping sane while using Gerrit.

Andrew Bartlett abartlet at samba.org
Mon Feb 24 18:34:34 MST 2014


I've just worked over a detailed set of reviews from metze on the AD DC
password lockout stuff.

I figured I would share some thoughts on what worked well trying to
process a review series like this.


Remembering that gerrit doesn't know about a patch series, you have to
use the 'needed by' links to follow a series in order.  So, what I did
was:
 - found the first commit (by name, comparing with my tree)
 - open up the matching tree in git rebase -i
 - change to edit on each patch in the rebase
 - consider the review in gerrit
 - make any changes
 - git add --patch
 - git rebase --continue
 - then click on 'needed by' to get to the next patch in order

This works until we get to rebase conflicts, when the edit is overridden
by the conflict resolution, which makes things more difficult. 


The only other thing I found difficult was that gerrit's inline review
interface makes it really easy to request lots of small formatting
changes.  These were really tedious to apply - whereas in the old mode
of 'pull and review branches', just fixing the formatting and returning
the patch would have been faster.  Also, because such comments are made
standalone on the patch, you don't know fixing them will cause massive
rebase pain until you have already made the change. 


Where metze asked me to replace a patch, I did (from memory):

git rebase -i; edit xyx
git reset HEAD^1
git checkout

<get the gerrit patch via the fetch URL in gerrit>
git cherry-pick FETCH_HEAD

git rebase --continue


I hope these notes help others who are working with our gerrit trial,
and look forward to seeing how this might work in other systems, if they
are proposed.

Andrew Bartlett
-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list