Update cookbook plugin to latest revision

- Fix plugin name in REST API documentation synopsis lines

Change-Id: I3bcf6da0e4ec3fb76aab3a93e08da427df39c09b
Fix inconsistent behavior of diff view when viewing binary files

In the new change screen, if the user clicks on a binary file in
the file list, the unified view is used.  Then when navigating to
a previous or next file that is not binary, the diff view stays in
the old unified setting.  It is only possible to get back to the
new side-by-side view by going back to the change screen and then
opening the non-binary file from there.

To keep consistent behavior of diff view, always use unified diff
for binary files.  Use the user's preference setting for non-binary
files.

Change-Id: Ie4ece4cb740df8a69cbf3d2d42e4b0fb05461520
Do not refresh project list if filter did not change

Every time key up event is raised in the project list filter text box,
the project list was getting refreshed even if the filter did not
change (e.g. moving the cursor was refreshing the list).

Only call the refresh if the filter changed or if enter key is pressed.

Change-Id: I2e608d89e16dbef0cfe1e503ac2feb4639c27f5d
Fix: Failure of acceptance tests.

a7e34313 broken the acceptance tests.
Fixed.

Change-Id: I577cc875bcce3013cabd2f1b6813e7be820d4b3c
Add option 'S' to projects REST API to support query offset

List projects endpoint has an option to limit the number of results
returned but it was missing an option to start at a nonzero offset in
order to support results paging.

Add and document 'S' option which allow to query project list starting
at a nonzero offset. Also add missing documentation for the 'n' option
which limits the number of results.

Those 2 options will be then used to render project list with pagination
in web UI.

Change-Id: I19c4cd1cfa6ed78f22c84f249af54a5c30387561
Implement pagination in project list screen

The project list screen was taking a long time to render over a large
amount of projects (1,000+) and with even larger number of projects
(3,000+), it could make the browser unresponsive.

Project list screen now uses pagination to resolve this issue. The
number of projects displayed is determined by the 'Maximum Page Size'
user preference.

Bug: issue 2215
Change-Id: Icd0a7d54fd5c5b3c2301c31026e7c6717a648a24
Fix 'parents' field name of CommitInfo in REST documentation

Change-Id: I804ab1f8034ac9fb1be9d178acce509f6d997d09
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Fix 'parents' field name of CommitInfo in REST documentation" into stable-2.8
Improve wording of 'parents' field description in CommitInfo

Change-Id: I5d136856f4d9794b74914579b39f2a1da3eb4ce8
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Always auto confirm adding reviewers for set-reviewers SSH command

If a group contains more than 'addreviewer.maxWithoutConfirmation'
members adding it as reviewer to a change requires a confirmation. A
user should only be asked for the confirmation when reviewers are
added from the WebUI but not when the set-reviewers SSH command is
used. This is also how 'addreviewer.maxWithoutConfirmation' is
documented in 'config-gerrit.txt'.

Bug: issue 2599
Change-Id: Ieab601e573115a0b034e1dcebe1c602adda6770b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Always auto confirm adding reviewers for set-reviewers SSH command" into stable-2.8
SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips

In the top right corner of a file the navigation cluster has a
tooltip on the up arrow but did not show the tooltip on the left
or right arrows. Show the key in the tooltip.

Change-Id: I192ef0ab8155c15b4bb35a18da33f74f15bb5537
Fix JavaDoc warning

The JavaDoc generation reported the following warning:

  .../EmailReviewCommentsExecutor.java:29: warning - Tag @link:
    reference not found: EmailReviewComments

Change-Id: If30a0e08ccbcea0ee55d208cc2dc6840c4dab00e
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
(cherry picked from commit a5d2ad3933bd021d6a5a947642bf14bcfd1b998b)
Set uploader to current user in "patchset-created" event upon cherry-picking

When using the web ui (both old and new ChangeScreen) to cherry-pick a
change to a branch that already has this change (e.g.: cherry-picking
on the same branch to get rid of dependencies), the corresponding
patchset-created event had its patchSet.uploader set to the Change's
owner instead of the current user. We now set it to the current user,
so stream-events consumers can properly detect who uploaded the
rebased patch set.

Change-Id: I0613ecae06b7843b8ca0294f83378c3917c26810
Merge "Set uploader to current user in "patchset-created" event upon cherry-picking" into stable-2.8
Release notes for Gerrit 2.8.4

Change-Id: If89b43f642e2cd06c29e1549273832ca70d07cb4
Fix deadlocks in SubIndex shutdown

Because WorkQueue.Module and LuceneIndexModule are in the same
Injector, the ordering of their LifecycleListeners' stop() methods is
not defined. Tasks on the queue, e.g. background mergeability checks,
might try to perform index writes after the SubIndex is shut down.

Shutting down the SubIndex stops the ControlledRealTimeReopenThread,
which immediately sets the generation to Long.MAX_VALUE and notifies
any callers currently waiting on a generation. But the call sites
using NrtFutures in LuceneChangeIndex are not calling NrtFuture.get,
which waits on a generation; they are using Futures.allAsList, which
depends on addListener.

So, we need to check the generation number in the call to addListener
as well as in in get.

This may also improve performance, since futures in some cases will
not need to wait for a reopen thread refresh cycle before notifying
their listeners.

Change-Id: I0ec3e315638a90dd5da3cf7f0d2cc50599a5bb36
Ensure NrtFutures are notified promptly of new search generation

The internal waiting generation counter in
ControlledRealTimeReopenThread is only increased when
waitForGeneration is called. This controls whether the min or max
refresh time is used for waiting. Because NrtFuture.get is not called
directly and listeners may be used instead, this was not guaranteed
to happen, leading to long delays. Fix this by doing a dummy wait for
0ms at future construction time.

Change the order of refresh listener initialization so any
removeIfDone calls are made only after the internal listener within
ControlledRealTimeReopenThread updates its searching generation.

Change-Id: I0edf4a3d38a160496afaf0587cf14b6fee2f2aa5
Prevent draft changes from being abandoned

When a draft change is abandoned it is currently published to all
users by setting the status to ABANDONED.  Restoring the change will
effectively publish the change as /restore sets the status to NEW.

To not complicate the workflow, prevent draft changes from being
abandoned.

Change-Id: If747264fa66a2139e0d8f13987125d853ec3bed9
Don't show the submit button for draft patch sets

Currently the button is enabled for all open changes, but if
the patch set is a draft, pressing it results in an error.

Change-Id: I382fc9330b73d357c00ba0209f18d2c1584e9256