commit | 82544a059c34ad843099939a24f389888d6ba7c5 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Wed Nov 22 14:41:09 2023 +0000 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed Nov 22 16:38:41 2023 +0000 |
tree | fa096d116991a5fffb92410398a08f1a3b721f30 | |
parent | a22bb72337a78aab15d5f751557c09dcbe39ca33 [diff] |
Use project and changeNum for listing files in a patch-set The ListFiles REST-API for listing files included in a patch-set was relying on a lookup by change number only, which would fail when the change is imported from a different Gerrit server-id. Also, the lookup by change number alone would need a reverse lookup in Lucene, whilst using the project as well would skip that step and will be therefore faster. It is unclear to me why the project name was not used, and there is little comments, explanation or discussion associated with the change that introduced this regression (see I1bb2ff2). See for example the change [1] has the project name in the URL and can be discovered as expected, however, the listing of the files of the patch-set 1 failed because the lookup happened using only the change number 5819 internally, resulting in 404 popup errors. Example: ```` GET /changes/5819/files ``` Use both project and changeNum in the lookup and return the list of files more reliably. [1] https://eclipse.gerrithub.io/c/eclipse-jgit/jgit/+/5819 Release-Notes: Support listing of patch-set files also for imported projects Change-Id: I0ccd90cf6aac2a60baa9ea45f30bebac7cfdd318
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.