Continuing with in-lined comments.
On 18/07/2013 12:26, Adolfo Sanchez-Barbudo Herrera wrote:
18/07/2013 10:42, Laurent Goubet wrote:
I prefer, features isolated by branching/merging. In one commit,
you can't distinguish useful changes from those not so useful
(regenarated code, releng changes). Moreover, if several people
have been participating on a feature I don't know how authoring
will be attributed in a squashed commit. I guess that in this
situations, there will be different gerrit code review
(dependent?). Anyway, in principle having to squash commits to
request code review doesn't sound good to me.
To be honest I don't like this. Merging a potential long bunch
commits, in which everyone has its purpose and comments, in
makes me lose one of the essence of this agile quick changes
methodology which I love.
I am not a fan of that requirement from gerrit myself, but one
argue that it makes for a much more legible history, since you
features properly isolated in their commits.
You do not lose the history
of who did what, theirs comments and why they changed a
review : that history is logged on gerrit instead, through the
and various patch sets. For example, on
https://git.eclipse.org/r/#/c/13903/, you can see a "big"
feature-introducing commit. Gerrit keeps an history of the four
patch sets that have been created for that particular feature
the comments we made during the reviews (on each patch set).
Merging this with the next answer.
One would just need to look at the OCL
repository's history to feel that
I'd have to think how our current workflow (branches policy for
example) would change with gerrit. Actually, I'd like to see what
happens when a change is successfully reviewed and submitted. My
current gerrit experiment is currently based on master's commits.
gerrit is an improvement :p. I really have trouble finding out
commit introduced what change for which purpose in the (too)
branches in there. Gerrit's "one commit for a change" tends to
a much clearer policy.
- Are you, replacing a branch per feature/bug policy with this
Gerrit usage ?
- What happens if the are several live pending code reviews?.
- Are they automatically merged when approved in case other
approved reviews arrived before?
- What about of integrity/integration of the merged independent
reviews (one could break the other)? What about if there are
To me it looks like we still need a branches based development. In
that case, rather than a clearer history one commit per
feature/bug only ensures a shorter one ^^.
For big features, we still develop on branches, but we try never to
push them on the eclipse repository. Not only are branches dangerous
(you have to remember never to rebase a branch that has been pushed
to a remote repository), but reviewing a long stream of commits
seems useless : what we wish to review is the end result (tip of the
dev branch), and how it changes from the existing state (master at
the time of review, not at the branching time). Reviewing such
branches is tedious and error-prone. Plus, IMHO, merging makes for a
very messy and illegible history.
When we think that the new feature is ready, we prepare it for
review by squashing the commits into a single one with a proper
commit message, which we push for review. What you see in the review
I've linked here (https://git.eclipse.org/r/#/c/13903/) is the
result of such a squash.
The workflow described on
https://wiki.openstack.org/wiki/Gerrit_Workflow is very similar to
our use of git and gerrit, but there might be other, more sensible
workflows (maybe something to ask on the EGit mailing list?).
Yes, having to pass through gerrit doesn't make sense. It would
have to be a useless workflow of "I send a code review request",
and "I approve my self".
I'll try this squeezed commit, perhaps
it's the cause of the push
rejection. I guess that EGit doesn't have a way to this via
UI, does it ?
That, I do not know. I rarely squash commits into one. Amending
usually much easier when you work on a change :).
Some feelings I've got so far. It also
requires be more careful when
committing/pushing, which could be error prone. Now we have
push to gerrit, I'm used to "commit and push" button (a normal
It sounds dangerous.
True enough, even very recently I've pushed to the repository a
changes for which the review had not been completed. But that
avoided through a number of means :
* disable the force push on your repository (you can no longer
o On Compare, we've kept the force-push ability in order
gerrit reviews when pushing the stream of very small
usually need when fixing build errors
Which you can actually do, however useless :p.
* Make it so that your "normal" remote's
push configuration is for
gerrit. If your look at
add a "review" remote to our repositories so that we can
gerrit via "git push review". This configuration can also be
be your default instead of a new remote, so that "git push"
on gerrit directly.
Currently, my origin points to gerrit (Remote Push URL
I don't know how this internally works, but my feelings are that
we only have one remote repo. So a normal push will always udpate
our unique GIT repo. The "push to gerrit" pushes to a different
refs (refs/for rather than refs/heads) which in somehow are not
exposed in the remote repo (nobody can fetch those refs, when
fetching from the repository).
The URL is the same, what changes is the refspec in the "push"
configuration. This is the same as what's behind the "push" and
"push to gerrit" buttons of EGit (at least, I think it is the same)
- git push = git push origin HEAD:refs/heads/master => push
to remote repository, bypassing gerrit
- git push origin HEAD:regs/for/master => push to gerrit
The "new remote" we name "review" in the wiki page I linked above
is no more than a shorthand for the second of these two (with
"origin" being a shortcut itself for the URI of your repository).
You could use something like this for example :
- git config remote.origin.push HEAD:refs/for/master
- This tells your "git push" and the EGit's "push" button to
push a review instead of on the remote repository
- git config remote.origin.push HEAD:refs/heads/master
see if I finally complete a Gerrit contribution to see how the
repository looks like. Meanwhile I'll login to build.eclipse.org
to have a look via command line.
"login to build.eclipse.org to have a look via command line" ? This
really scares me as to what you're going to do :p.
mdt-ocl.dev mailing list
mdt-ocl.dev mailing list