RETIRED, Gerrit as used by OpenStack
Go to file
Alice Kober-Sotzek 2f62486149 Mark hunks which are present due to a rebase when diffing patch sets
The diff between two patch sets contains hunks which weren't
introduced by either patch set if a rebase occurred between those
patch sets. Previous optimizations for this case simply omitted all
files which aren't touched by either of the patch sets.

This change goes one step further: All hunks which can clearly be
identified as being introduced by a rebase are marked. In case of
doubt (e.g. they overlap with a regular hunk), they aren't marked.

To be consistent with the previous behavior, we exclude all files from
the result which only contain hunks due to rebase. In some cases (e.g.
a patch set touches 'fileA' but all identified hunks were introduced
by the rebase), this rule can be stricter than the previously mentioned
(as the previous rule would still show file 'fileA' but we exclude it
now).

Hunks which are introduced by a rebase are identified by computing
the diff between the parents of the two patch sets and transforming
the result to differences in terms of treeA of patch set A and treeB
of patch set B. This follows a suggestion which was posted as a comment
(https://gerrit-review.googlesource.com/c/33091/5//COMMIT_MSG#7) in
change I63d3a21ad4f.

As we always determine which hunks are introduced by a rebase when
two commits are explicitly specified which don't share a common
parent, we will determine those hunks even when we compute the
diff between the parents of the patch sets provided that those
parents fulfill the condition of being separated by a rebase. Those
situations should be rare and hence we refrain from adding
optimizations for this case for the moment.

Bug: Issue 217
Change-Id: If06381d506d360f0e3d24d078dcb54692698e766
2017-06-09 13:38:43 +02:00
.settings Clean up Gerrit project settings 2017-04-27 10:19:09 +00:00
contrib abandon_stale.py: Adapt to removal of digest authentication 2017-04-21 14:51:59 +00:00
Documentation Mark hunks which are present due to a rebase when diffing patch sets 2017-06-09 13:38:43 +02:00
gerrit-acceptance-framework AccountCreator: Evict account from cache after adding it to group 2017-06-08 18:35:21 +02:00
gerrit-acceptance-tests Mark hunks which are present due to a rebase when diffing patch sets 2017-06-09 13:38:43 +02:00
gerrit-antlr Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00
gerrit-cache-h2 Callable: Replace classes with lambda expression 2017-04-01 21:47:49 +02:00
gerrit-common Mark hunks which are present due to a rebase when diffing patch sets 2017-06-09 13:38:43 +02:00
gerrit-elasticsearch Merge branch 'stable-2.14' 2017-04-28 13:52:44 +02:00
gerrit-extension-api Mark hunks which are present due to a rebase when diffing patch sets 2017-06-09 13:38:43 +02:00
gerrit-gpg Let AccountsUpdate take care to evict accounts from the account cache 2017-06-07 16:35:51 +02:00
gerrit-gwtdebug Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00
gerrit-gwtexpui Format java files with google-java-format 2017-02-17 13:21:04 +09:00
gerrit-gwtui Merge branch 'stable-2.14' 2017-06-01 16:54:59 +09:00
gerrit-gwtui-common Control auto-publishing comments on push with preference 2017-05-12 11:06:21 -04:00
gerrit-httpd Get accounts through Accounts class 2017-06-07 15:24:19 +02:00
gerrit-launcher Replace FileInputStream and FileOutputStream with static Files methods 2017-05-10 00:10:52 +00:00
gerrit-lucene Encapsulate lucene index dir name structure inside LuceneVersionManager.getDir 2017-05-26 11:56:17 +00:00
gerrit-main Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00
gerrit-oauth Merge branch 'stable-2.14' 2017-04-25 07:23:03 +02:00
gerrit-openid Move classes that are related to external IDs into an own package 2017-03-27 15:38:01 +02:00
gerrit-patch-commonsnet Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00
gerrit-patch-jgit Bazel: Allow to consume jgit from development tree 2017-03-22 22:27:12 +01:00
gerrit-pgm Remove AccountAccess.anyAccounts and instead check if user branches exist 2017-06-07 14:17:39 +02:00
gerrit-plugin-api Set version to 2.14.1-SNAPSHOT 2017-05-26 11:20:43 +09:00
gerrit-plugin-gwtui Set version to 2.14.1-SNAPSHOT 2017-05-26 11:20:43 +09:00
gerrit-prettify Remove some unused methods from diff related code 2017-05-15 11:39:13 +02:00
gerrit-reviewdb AccountAccess: Remove unused methods 2017-06-07 17:09:15 +02:00
gerrit-server Mark hunks which are present due to a rebase when diffing patch sets 2017-06-09 13:38:43 +02:00
gerrit-sshd Merge branch 'stable-2.14' 2017-05-31 11:03:47 +09:00
gerrit-test-util Mark hunks which are present due to a rebase when diffing patch sets 2017-06-09 13:38:43 +02:00
gerrit-util-cli Fix compiler warnings introduced in recent commits 2017-04-06 23:46:30 +02:00
gerrit-util-http Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00
gerrit-util-ssl Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00
gerrit-war Set version to 2.14.1-SNAPSHOT 2017-05-26 11:20:43 +09:00
lib Revert "Polygerrit now loads polymer-resin" 2017-06-02 09:37:37 -07:00
plugins Update git submodules 2017-05-19 01:56:17 +00:00
polygerrit-ui Merge "a11y improvements for gr-file-list" 2017-06-09 03:36:05 +00:00
ReleaseNotes Remove Buck based build 2017-01-23 12:44:58 +00:00
tools Merge branch 'stable-2.14' 2017-05-31 15:57:57 +09:00
website/releases Fix Diffy logo on release page by encoding the image 2015-12-29 10:36:39 -08:00
.bazelproject Build IntelliJ project with full debug info 2017-04-14 11:29:51 -04:00
.editorconfig Added continuation indent to editorconfig 2016-04-26 14:42:58 +02:00
.git-blame-ignore-revs Update git hyper-blame configuration 2017-02-17 16:35:50 +09:00
.gitignore Fix launching daemon in Eclipse on MacOS 2017-03-17 14:10:41 +09:00
.gitmodules Remove the cookbook-plugin submodule 2017-03-24 10:59:31 +09:00
.mailmap Update the .mailmap file 2017-05-03 13:57:18 +02:00
.pydevproject Update PyDev project to use Python 2.7 2014-10-02 15:16:44 +09:00
BUILD Format BUILD and WORKSPACE files with buildifier 2017-02-28 17:32:44 +09: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 Switch GitHub mirror URL to the most up-to-date 2017-04-05 09:03:59 +01:00
SUBMITTING_PATCHES Update push URL in SUBMITTING_PATCHES 2012-03-29 00:57:14 -04:00
version.bzl Set version to 2.14.1-SNAPSHOT 2017-05-26 11:20:43 +09:00
WORKSPACE Revert "Polygerrit now loads polymer-resin" 2017-06-02 09:37:37 -07:00

Gerrit Code Review

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

Build Status

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 Bazel and run the following:

    git clone --recursive https://gerrit.googlesource.com/gerrit
    cd gerrit && bazel 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>]

On Fedora run:

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

Use pre-built Gerrit images on Docker

Docker images of Gerrit are available on DockerHub

To run a CentOS 7 based Gerrit image:

    docker run -p 8080:8080 gerritforge/gerrit-centos7[:version]

To run a Ubuntu 15.04 based Gerrit image:

    docker run -p 8080:8080 gerritforge/gerrit-ubuntu15.04[:version]

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