Daniel Friesen lists@nadir-seen-fire.com wrote:
On Wed, 18 Jul 2012 11:41:06 -0700, Ryan Lane rlane32@gmail.com wrote:
On Wed, Jul 18, 2012 at 1:18 PM, Petr Bena benapetr@gmail.com wrote:
What about changing gerrit to our needs? It's open source, I suppose.
That's of course the route we're going right now. The biggest hurdle to doing so is that it's written in Java, and Prolog. Neither of those languages are amazingly difficult, though, so I don't really see that as a complete blocker.
- Ryan
The blocker for me was not the language, but the codebase. I wanted to make a small tweak to Gerrit so I started looking through the code. And I had absolutely no clue where to find what I was looking for. I couldn't make sense of what most of what I found was even supposed to do. And people have pointed out a number of issues with Gerrit like the way it handles output and css which feel much more like fundamental (ie: unfixable without practically rewriting) issues with Gerrit.
I got used to it. It's completely different Java if one is used to old-skool Java programming. Components are decoupled with the use of Guice (for "dependency injection" - http://c2.com/cgi/wiki?DependencyInjection) framework plus there is Google Web Toolkit programming, again a very special beast.
Another component is the ORM mapper, gwtorm.
Other than that it's pretty fine, with the usual Java problem that I need to cut through gazillion of classes and interfaces before I get to the core of things.
For example, to fix https://bugzilla.wikimedia.org/show_bug.cgi?id=38114 few lines need to be added before line 296 of
https://gerrit.googlesource.com/gerrit/+/05d942c324d7a17285873a468f3605cbc19...
(not sure it's a good idea but here it is)
I have attached Jython interpreter to Gerrit to play a bit with the code:
https://gerrit-review.googlesource.com/#/c/34670/
You can play live with the ORM mapper for example and retrieve Java objects from the database (not just rows).
//Saper