Many users complain that the search functionality on the diff screen is
hard to use. This change mitigates the problem with a couple of
improvements:
1. Ctrl-F, Ctrl-G and Shift-Ctrl-G now bind to the search dialog box
provided by CodeMirror's search addon instead of the one provided by the
Vim keymap. Many users find CodeMirror's Vim search hard to use because
it isn't a faithful emulation of the Vim regexp. Instead, since it only
supports JavaScript regexp, queries like "++" and "(" would have to be
escaped as "\+\+" and "\(", which is quite painful. On the contrary,
the search addon happily accepts plain text as input. The user can also
use the "/query/" format to do a JavaScript regexp search. Note that the
user would need to escape queries for text that start and end with "/".
For example, "//" needs to be escaped as "////", but I expect that case
to be rare.
2. Enter and Shift-Enter navigate among the search results from the
CodeMirror search, just like they do in a normal browser search.
Note that "Enter" normally expands a comment / draft box on the active
line, but it is used for jumping to the next search result if highlight
is present from a CodeMirror search.
3. "Esc" now clears the search results from both the CodeMirror search
and the Vim search. This is particularly useful since we use "n" and "p"
for the navigation among both search results and diff chunks. Before,
the user had to use a hard-to-discover combination of "/" + "Esc" to
clear the search results.
The following behaviors are unchanged:
1. Since the changes are orthogonal to the Vim search, The existing
search functionality still works. The Vim search can still be activated
with "/", "*" or "#" ("?" has always been reserved for the help popup so
it's unavailable). "n" and "p" still navigate among the search results
when a Vim search is active.
2. If the user sets "Render" to "Slow" in the diff preferences and the
file is less than 4000 lines (huge), then Ctrl-F, Ctrl-G and
Shift-Ctrl-G fall back to the browser search.
Bug: Issue 3387, Issue 3388
Change-Id: Ib4b0fb248bdfb0817507cfafb44ab5b0c1b60ba4
Gerrit Code Review
Gerrit is a code review and project management tool for Git based projects.
Objective
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.
Documentation
For information about how to install and use Gerrit, refer to the documentation.
Source
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Reporting bugs
Please report bugs on the issue tracker.
Contribute
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.
Getting in contact
The IRC channel on freenode is #gerrit. An archive is available at: echelog.com.
The Developer Mailing list is repo-discuss on Google Groups.
License
Gerrit is provided under the Apache License 2.0.
Build
Install Buck and run the following:
git clone --recursive https://gerrit.googlesource.com/gerrit
cd gerrit && buck build release
Install binary packages (Deb/Rpm)
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>]
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.