Update git submodules
* Update plugins/replication from branch 'stable-2.16'
to 896e67184e9b98262775ab1c71a0b76ac5baff21
- ReplicationIT: Don't swallow exceptions on failed repository operations
The methods getRepo and getRef catch exceptions and return null, which
will then cause NullPointerException on subsequent dereference, making
it less easy to track down the actual cause.
Remove the getRepo method and always open the repo in a try-with-resource
that will throw the exception and fail the test if the repository could
not be opened.
Some calls to getRef are done in a consumer which means the method can't
throw an exception. In these cases, it's OK for the method to return
null because then the test will fail anyway due to InterruptedException
being raised when the non-null was not returned within the timeout.
Other callers of getRef however should not get the null value as it will
cause NPE.
Make getRef throw the exception, thus failing the test early, and add a
variant method "checkedGetRef" which returns null and is used in the
consumer.
Also replace usage of printStackTrace with FluentLogger.
Change-Id: I0f0caca03386c4fa5710f4c8e8fd4f798acead2b
- ReplicationIT: Add explicit test for replication of new branch
Change-Id: I67aa8b4aec05ad23b3c286d56a3b894eede7cd7e
- ReplicationIT: Change test method name to reflect actual operation
The test shouldReplicateNewBranch creates a new change and then
verifies that the corresponding refs/changes/xx/yy/zzzzzz ref is
replicated to the destination.
Rename it to shouldReplicateNewChangeRef to match what it's actually
doing.
Change-Id: I32fe7237c8857907dd51d627a571f6ccb73741a3
- Allow AdminApiFactory to be replaced dynamically
Since change Ie760bf3e1 the GerritSshApi class is no longer a singleton,
and is instead instantiated on demand by a new AdminApiFactory.
This breaks implementations that consume the replication plugin as a
library and extend the GerritSshApi, since the extended class no longer
gets instantiated in place of GerritSshApi.
Refactor it so that AdminApiFactory is an interface with a default
implementation that gets bound as a dynamic item, which can be replaced
by derived implementations.
Change-Id: Ia150d6802e11015fa00ee9144b3dfbfa696c7a0d
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
Gerrit is a code review and project management tool for Git based projects.
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.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
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.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit
cd gerrit && bazel build release
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>]
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.