commit | 12e3757e3b54ac733ebd88caea77d753f16fe994 | [log] [tgz] |
---|---|---|
author | Dave Borowitz <dborowitz@google.com> | Fri Mar 22 14:23:23 2019 -0700 |
committer | Dave Borowitz <dborowitz@google.com> | Mon Mar 25 13:28:14 2019 -0700 |
tree | a34c9fbdd89af91f96d2959349eba02d1f450112 | |
parent | 37fe9cc1f553d96228b39d799a6d6cc45b0ee181 [diff] |
QueryBuilder: Support : in field values Prior to this change, "field:foo:bar" is parsed as "field:foo", silently discarding the ":bar". Worse, "field:foo:bar baz:quux" is _also_ parsed as "field:foo", discarding not just part of the first term but the entire second term. Fix this by treating "SINGLE_WORD ':' fieldValue" as a valid definition of a field value, and add tests. This solution seems inelegant in general; it seems like we should be able to concatenate the tokens together into a single AST node at the Antlr level. Also, it doesn't work in all cases: it fails to parse field values ending in ':' I'm far from an Antlr expert and there may be a better/easier way to do this. But this change is still strictly better than it was before, and it sets an example of how to write tests for parser functionality. Change-Id: If275623b3244b02f81114fb2997ba16ee1492a4f
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 IRC channel on freenode is #gerrit. An archive is available at: echelog.com.
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.