Update git submodules
* Update plugins/replication from branch 'master'
to 5c3414d99c36c293e2119191ae9bd0aca5b46380
- ProjectRepairer: Add a --copy-loose-objects repair action
Add a COPY_LOOSE_OBJECTS action, exposed as '--copy-loose-objects',
rsyncing the two hex character fanout directories under objects/. The
include patterns keep rsync out of pack/, info/ and their siblings.
The action is declared ahead of COPY_PACKS, so when both are selected
loose objects are copied first. '--full' now covers both.
Change-Id: I9c3d12182bdc5fa9da662269d8681db174057f21
- ProjectRepairer: Refactor to select actions through an enum
repair() takes a 'copyPacks' boolean, which can only describe the one
thing it knows how to do. A second kind of repair would mean a second
boolean at every call site, with the order the two run in implicit in
how repair() tests them.
Take a collection of Action values instead. Individual flags are kept in
flag order. '--full' and the no-flag default use Action.all() so actions
run in enum declaration order. Action has only COPY_PACKS, so behaviour
is unchanged.
Change-Id: Ie7c0d9af40cab893a01a754bc984b8593ff6a5bc
- ProjectRepairer: Refactor to extract the repository lookup
copyPackTo() validates the destination URI and opens the repository to
locate it on disk before copying anything, neither of which has to do
with packs.
Move both into objectsDir(), which reports the repository's objects
directory, or nothing if the project cannot be repaired at that
destination. What is left is copyPacksTo(), taking the directory to
copy from. The now trivial copyInOrder() folds into it.
Change-Id: I2d1ba0a23671d6db115f18a35420f4c04a24c0ec
- ProjectRepairer: Refactor copy() to take a destination dir
buildCopyDestination() appends objects/pack/ to the remote path
itself, so copy() can only ever populate a destination's pack
directory.
Pass the remote subdirectory in instead, with the pack callers naming
PACK_DIR. The rsync commands produced are unchanged.
Change-Id: I7bf05966dd95b7827864f2ae5a0a39fe9ca050eb
- ProjectRepairer: Report an interrupted copy as InterruptedIOException
copy() declares InterruptedException, but the only one that escapes
comes from the halt() call in its own catch block, leaving copyInOrder()
to catch an interrupt it takes no part in. The interrupt copy() does
take part in becomes a -1 exit code, and as throwing
InterruptedException clears the interrupt status, nothing above can tell
an interrupted transfer from a failed one, or that the repair was
cancelled at all.
Absorb the halt() interrupt where it happens, and report the copy's own
interrupt as InterruptedIOException, which is what java.io raises when
an interrupt terminates a transfer. It unwinds the repair, so the copies
and destinations left after a cancel are skipped instead of running to
completion.
The SSH command lets it escape, which BaseCommand already treats as the
client having dropped off, exiting 127 without logging. Auto-repair logs
the interrupt and skips its follow-up replication.
Change-Id: Ie61e0329aaa3131c8ac1f8b4932e57e48c5e5e0b
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 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.