On Thu, Nov 13, 2008 at 8:52 PM, Shawn Pearce <s...@google.com> wrote:
> You read my mind. I have not yet had time to put together some short docs
> on what Gerrit 2 is and what we need to implement feature wise, but I
> planned to get that all posted this weekend, along with a new development
> branch.
>
> Gerrit 2 will use a GWT frontend and a Java backend. We are moving it off
> GAE as a lot of people have asked us to make it availble for them to run
> locally without using the Google servers.
>
> Our decision to use GAE for Gerrit 1 wasn't a policy choice. We did it
> because we forked from Rietveld and we didn't want to rewrite everything
> from the ground up, given how little time we had to put together the entire
> repo and Gerrit chain.
>
> So yea, it sounds like we want the same thing, and i'd love to have you
> involved. I'll post more by this weekend, including the initial code tree.
Great, thanks for the update.
In the meantime I looked at how the communication flow works currently
between the local repositories and Gerrit.
If I understand it correctly, it roughly does the following:
- repo (or git-upload.py) creates a git bundle with the commit(s) that
is being sent to gerrit.
- Then that bundle is examined by the server-side and the information
necessary for the review is stored in the GAE part.
- When the review process ends with a "let's merge" decision, Gerrit
tries to apply the bundle to the original repository.
I was thinking of a slightly different method:
Preconditions:
- there are the public repositories, with the merged code.
- there is also a set of repositiories used by the Gerrit server
cloned form the public repository.
The developer works in his local repos on a topic branch, and when he
is ready, repo basically pushes his branches in the different
repository to the Gerrit speicifc git repositories. To actually have a
common id for these branches, a branchname (the current Gerrit change
id) is requested from the Gerrit server prior to pushing.
This way the new Gerrit database only contains the data related to the
review, the proposed changes themselves are in regular git
repositories.
If the review process decides to push the change into the official
sources, Gerrit will push the commits from its own git repositories to
the main ones.
One advantage of this method is that e.g. if a change is updated as a
result of the review process, the developer could just push the same
topic branch again. Also, these Gerrit git repositories would contain
all proposed source code changes at one place. With an appropriate
visualization tool it could become a valuable asset.
Also, I think that this method would decrease the complexity of Gerrit
and repo, especially when we are thinking about supporting multiple
development branches in Gerrit. Since the Gerrit review source DB is
just a regular git repository, almost any workflow imaginable is easy
to implement, like staging branches, branches to collect proposed
commits for continuous integration ... etc.
At least, so I think. However, since I am not a git expert, please
feel free to point out the mistakes / wrong assumptions I made.
What do you think about this idea?
Best Regards,
Gergely
Thank you for the detailed description.
Actually I was not thinking about git:// or git+ssh://, but the HTTP
based git interface, which could have been just as easily
authenticated.
But given the other administrative issues with kernel.org repos and
everything, I think you basically got everything you could out of the
situation.
Regarding the hacking of the git protocol: I actually thought that
repo would still be talking to Gerrit directly as a kind of control
channel, and only push the actual source content directly to the git
repo using the HTTP access protocol. However, this transport protocol
part is not really an important part of the idea, and since you
already did what I was thinking about...:)
Thanks again,
Gergely