Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] Playing with gerrit


You might want to look at what we ask for reviews on compare ( from both contributors and commiters, or what EGit does, which is pretty similar (

Basically : you need a Change-Id, and I think it would be better for you to configure the OCL repository to require an explicit Change-Id in the commit message (see also These ids can be automatically generated by EGit, or through a commit-hook if you wish to use the command line. A gerrit "review" is tied to this Id, which also mandates that one review = one commit. This is also what allows you to simply cherry-pick said commit from gerrit, change it, then push it again to update the review with your own changes.

as for abandonning a change : "-2" in code-review is a veto which will prevent anyone from submitting the patch, but will not prevent new patch sets to be pushed to update the same review.

"my Gerrit push (refs/for/master) is rejected. " : you should have had a more verbose reject message to tell you what was wrong.

And yes, enabling automatic hudson jobs to review the changes is one of the selling points of gerrit for us, you can look at for how we requested it. For the rest, IIRC you just need to configure it to be triggerred by a "gerrit event" in the jobs configuration (build trigger => gerrit event, then in "gerrit trigger", give it the path of your gerrit project (ocl/org.eclipse.ocl)).

Laurent Goubet

On 17/07/2013 19:29, Adolfo Sanchez-Barbudo Herrera wrote:
Hi Ed,

Playing around with Gerrit and after having some reading, I have some comments:

After pushing to Gerrit a second commit for the fix you blocked. Now we have two pending changes to review:

b) (which depends on a))

Which is not definitely what I would have wished

In Gerrit documentation I've found:

"To add an additional patch set to a change, ensure Change-Id lines were created in the original commit messages"

So my second commit should have included the following line in the commit message:

Change-Id: I5814ceb238e511a8a56420f54550a8c3389c8c18

Next try. I've commited a new change using the Change-Id of b), to see if I obtain a second patch set for the second Gerrit change. However my Gerrit push (refs/for/master) is rejected.

I decided to reject (-2) my Gerrit change, just in the improvable case Gerrit-enabled GIT repo were so clever to not accept changes until some reviewing actions were taken. It was not the case .

I'll go on investigations tomorrow.

BTW, If I'm not wrong we can configure hudson jobs (branch tests for example?) to make it autimotically verify a Gerrit change. This sounds quite useful.

P.S: Gerrit doc:

_______________________________________________ mailing list

fn:Laurent Goubet
org:<a href="";>Obeo</a>

Back to the top