commit | 51c8e9277c51be9e1ee3c6f0318d253cb0cd262c | [log] [tgz] |
---|---|---|
author | Sven Selberg <svense@axis.com> | Wed Mar 18 14:40:09 2020 +0100 |
committer | Sven Selberg <svense@axis.com> | Fri Mar 20 10:16:17 2020 +0100 |
tree | d16c5a097e53d6dd4954994d94c65fdcf211bbdf | |
parent | 20c17f8803bd9c2cee11712d4c502636f5b98241 [diff] |
RevisionActions: Do not alter server response Instead of setting values in the response from the server. Keep the server response as-is and calculate necessary values from the response. After 21f0ac88 - 'Removing Current Actions from Change load' server response were altered twice: * First in gr-rest-api-interface, were new attr rebaseOnCurrent was added set to !!rebase.enabled after which rebase.enabled was set to true since the rebase button should only be disabled on inital commit. * Later in gr-change-actions were the logic was duplicated with the effect that rebaseOnCurrent was always true in the end regardless of which response was sent from the server. Parent not current tooltip: rebase.enabled is used to calculate whether or not the "Not Current" tooltip on the parent commit-info list in gr-change-metadata. But since the server response was altered so that rebase.enable was always true the tooltip was always shown. Rebase dialog: Since rebase.enable was always set to true and rebase.rebaseOnCurrent was set to !!rebase.enable, rebase.rebaseOnCurrent was always set to true. This meant that the option to rebasen the current target was always enabled. But using it led to an error if the change was already up-to-date. Instead in gr-change-actions calculate wether the rebase action button should be disabled or not and whether it rebase on current target is neccessary based on the original, unaltered, server-response. Alter the tests to test for this behavior. Bug: Issue 12474 Change-Id: Id29ea8a0c59de0079a776e4ed7ea4122ae2d89c8
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.