RETIRED, Gerrit as used by OpenStack
Go to file
Edwin Kempin 10ba6179cb Extract RevisionNote.Comment and use it instead of PatchLineComment
There are 3 classes that represent an inline comment:
- CommentInfo represents an inline comment in the REST API
- PatchLineComment represents an inline comment in ReviewDb
- RevisionNote.Comment represents an inline comment in NoteDb

To support robot comments CommentInfo and RevisionNote.Comment must be
extended so that the additional fields that are specific for robot
comments can be supported. PatchLineComment should not be touched
since robot comments will only be supported with NoteDb, but not with
ReviewDb.

At the moment PatchLineComment is also used to represent inline
comments in all middle layers and in all utility classes that deal
with inline comments. This means if NoteDb is used, inline comments
come in over REST as CommentInfo, then they are converted into
PatchLineComment and for storing them in NoteDb they are converted to
RevisionNote.Comment. The intermediate transformation to
PatchLineComment is bad for implementing robot comments, since this
class should stay unchanged.

To fix this RevisionNote.Comment is extracted into an own Comment
class and then Comment is used instead of PatchLineComment in the
middle layer. This means when NoteDb is used, inline comments are only
converted once, from CommentInfo to Comment. Both types will have
extensions for robot comments (by subtypes).

For storing inline comments in ReviewDb inline comments are converted
from CommentInfo to Comment to PatchLineComment. This is better than
having the double-conversion for NoteDb, because ReviewDb will be
removed in favour of NoteDb. This means when ReviewDb is removed
PatchLineComment can then easily be deleted, as it's no longer used
all over the codebase, but only in the ReviewDb layer.

Change-Id: I53481e8231e04aeca5b924e409e97b0f1d53f516
Signed-off-by: Edwin Kempin <ekempin@google.com>
2016-09-22 11:45:19 +02:00
.settings Build with Java 8 2016-09-20 10:19:52 +02:00
bucklets Buck: Fix typo in gerrit_plugin.bucklet 2015-12-23 17:55:11 +01:00
contrib git-push-review: Support #hashtag arguments 2016-09-22 09:21:36 +02:00
Documentation bazel: generate license list for documentation. 2016-09-21 18:34:56 +00:00
gerrit-acceptance-framework Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-acceptance-tests Extract RevisionNote.Comment and use it instead of PatchLineComment 2016-09-22 11:45:19 +02:00
gerrit-antlr Implement Bazel build 2016-06-14 21:12:02 +02:00
gerrit-cache-h2 Use some Java 8 features 2016-09-20 15:39:47 -04:00
gerrit-common Extract RevisionNote.Comment and use it instead of PatchLineComment 2016-09-22 11:45:19 +02:00
gerrit-extension-api Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-gpg Use some Java 8 features 2016-09-20 15:39:47 -04:00
gerrit-gwtdebug Bump GWT version to 2.8.0-rc2 2016-09-19 15:10:11 +02:00
gerrit-gwtexpui Update Buck to latest version 2016-09-20 13:19:15 +02:00
gerrit-gwtui Merge "Bazel: Fix building GWT UI" 2016-09-22 08:20:16 +00:00
gerrit-gwtui-common Merge changes from topic 'bot-comments-ui-gh16' 2016-09-22 08:06:40 +00:00
gerrit-httpd Merge "Establish library compliance for powermock and its dependencies" 2016-09-22 08:08:34 +00:00
gerrit-launcher Implement Bazel build 2016-06-14 21:12:02 +02:00
gerrit-lucene Convert some Functions/Predicates to streams & lambdas (5) 2016-09-21 04:27:43 -04:00
gerrit-main Merge changes from topic 'bazel-build' 2016-09-20 11:57:48 +00:00
gerrit-oauth Implement Bazel build 2016-06-14 21:12:02 +02:00
gerrit-openid Move AuthType from gerrit-reviewdb to extension API 2016-08-23 17:27:50 +09:00
gerrit-patch-commonsnet Merge branch 'stable-2.12' 2016-08-18 09:09:43 -04:00
gerrit-patch-jgit Update Buck to latest version 2016-09-20 13:19:15 +02:00
gerrit-pgm bazel: add test that forbids DO_NOT_DISTRIBUTE in //gerrit-pgm:pgm. 2016-09-21 19:52:53 +00:00
gerrit-plugin-api Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-plugin-archetype Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-plugin-gwt-archetype Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-plugin-gwtui Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-plugin-js-archetype Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
gerrit-prettify Implement Bazel build 2016-06-14 21:12:02 +02:00
gerrit-reviewdb Extract RevisionNote.Comment and use it instead of PatchLineComment 2016-09-22 11:45:19 +02:00
gerrit-server Extract RevisionNote.Comment and use it instead of PatchLineComment 2016-09-22 11:45:19 +02:00
gerrit-sshd Convert some Functions/Predicates to streams & lambdas (5) 2016-09-21 04:27:43 -04:00
gerrit-util-cli Implement Bazel build 2016-06-14 21:12:02 +02:00
gerrit-util-http Convert some Functions/Predicates to streams & lambdas (5) 2016-09-21 04:27:43 -04:00
gerrit-util-ssl Implement Bazel build 2016-06-14 21:12:02 +02:00
gerrit-war Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
lib Merge "Bazel: Fix building GWT UI" 2016-09-22 08:20:16 +00:00
plugins Convert some Functions/Predicates to streams & lambdas (2) 2016-09-21 04:25:11 -04:00
polygerrit-ui Merge changes I532e12af,I96345da5 2016-09-21 20:45:42 +00:00
ReleaseNotes Minor fixes in 2.13 release notes 2016-09-22 07:51:32 +00:00
tools bazel: add test that forbids DO_NOT_DISTRIBUTE in //gerrit-pgm:pgm. 2016-09-21 19:52:53 +00:00
website/releases Fix Diffy logo on release page by encoding the image 2015-12-29 10:36:39 -08:00
.bazelrc Implement Bazel build 2016-06-14 21:12:02 +02:00
.buckconfig Merge branch 'stable-2.13' 2016-09-21 11:35:53 +02:00
.buckversion Update Buck to latest version 2016-09-20 13:19:15 +02:00
.editorconfig Added continuation indent to editorconfig 2016-04-26 14:42:58 +02:00
.gitignore Implement Bazel build 2016-06-14 21:12:02 +02:00
.gitmodules Adapt .gitmodules to enable superproject subscriptions 2016-07-27 12:01:40 -07:00
.mailmap Update my email addess in mail map 2016-02-12 11:49:00 +01:00
.pydevproject Update PyDev project to use Python 2.7 2014-10-02 15:16:44 +09:00
.watchmanconfig Watchman: Add eclipse-out to ignored directories 2016-01-22 08:04:24 +01:00
BUCK Buck: Build gwtgerrit without touching PolyGerrit deps 2015-12-01 07:29:21 +00:00
BUILD Bazel: Build gerrit WAR with GWT UI 2016-09-20 13:53:34 +02:00
COPYING Initial project setup of Gerrit 2 2008-11-14 16:59:34 -08:00
INSTALL Remove Gerrit 1.x to 2.x import tools 2009-03-27 20:20:10 -07:00
README.md Merge branch 'stable-2.12' 2016-06-27 11:08:44 +09:00
SUBMITTING_PATCHES Update push URL in SUBMITTING_PATCHES 2012-03-29 00:57:14 -04:00
VERSION Set version to 2.13.1-SNAPSHOT 2016-09-22 09:22:59 +02:00
WORKSPACE Merge "Bazel: Fix building GWT UI" 2016-09-22 08:20:16 +00:00

Gerrit Code Review

Gerrit is a code review and project management tool for Git based projects.

Objective

Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.

Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.

Documentation

For information about how to install and use Gerrit, refer to the documentation.

Source

Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.

Reporting bugs

Please report bugs on the issue tracker.

Contribute

Gerrit is the work of hundreds of contributors. We appreciate your help!

Please read the contribution guidelines.

Note that we do not accept Pull Requests via the Github mirror.

Getting in contact

The IRC channel on freenode is #gerrit. An archive is available at: echelog.com.

The Developer Mailing list is repo-discuss on Google Groups.

License

Gerrit is provided under the Apache License 2.0.

Build

Install Buck and run the following:

    git clone --recursive https://gerrit.googlesource.com/gerrit
    cd gerrit && buck build release

Install binary packages (Deb/Rpm)

The instruction how to configure GerritForge/BinTray repositories is here

On Debian/Ubuntu run:

    apt-get update & apt-get install gerrit=<version>-<release>

NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.

On CentOS/RedHat run:

    yum clean all && yum install gerrit-<version>[-<release>]

NOTE: release is optional. Last released package of the version is installed if the release number is omitted.