Bump version to 2.9.2

Change-Id: I017362b20aa53684fc46acdfed6d3162405dbbc2
Fix documentation of the default value for core.streamFileThreshold

Since commit bfe9eec1 the default value for core.streamFileThreshold
is 25% of the available JVM heap, limited to 2048m.

Change-Id: I9308875e30470dc33bf9b437909842e87f974141
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Bump version to 2.9.2" into stable-2.9
Merge "Fix documentation of the default value for core.streamFileThreshold" into stable-2.9
SideBySide2: Show file name in window title again

In the old side by side diff screen, the name of the file being diffed
was shown in the window title. For some reason the code that set the
window title wasn't adopted from PatchScreen into SideBySide2.

Put the setting of the window title back in. Put it into onInitUI(),
since this was the place where it had first stood in PatchScreen.
SideBySide2 already displays the path on the page, so leave out the
setPageTitle() from PatchScreen, because this would display that path
again.

Also don't obtain the file name by finding the last slash with
lastIndexOf() and then taking the substring from there, but use
FileInfo.getFileName() instead. Searching for "lastIndexOf('/')" in the
whole project gives quite some occurences. I thought reusing something
might be a good idea.

Bug: Issue 2960
Change-Id: I12a280b8a437b60e4e2f779b81072117d45a1505
Fix argument order in call to checkNotNull

Change-Id: I09c681c8732089a33349ef45027a850ee2cf66e2
Use SchemaFactory instead of Provider in DbGroupMemberAuditListener

Using Provider<ReviewDb> causes ProvisionException when running the
tests:

 Automatic ReviewDb only available in request scope

Change it to SchemaFactory<ReviewDb>.

Change-Id: I342bce45ac66a5d6c602f92059bed15abdbf4f11
MergeOp: Don't double-index in setMerged

This appears to have been introduced by a clean auto-merge of 75472334
and 22e43cc8, the latter of which was merged into master from
stable-2.9.

While reordering, move the post-processing out of the transaction
block. We don't want to index or send emails if the DB update fails.

Change-Id: I0fd855062f0c3ed118e537ef80358863d4f61284
PatchSetInserter: Index updated change rather than original

Change-Id: Ic2f7a3193805371e53521969304c21fae9a0fd62
Merge "Use SchemaFactory instead of Provider in DbGroupMemberAuditListener"
Update Lucene to version 4.10.2

Version 4.10.2 includes a couple of bug fixes [1], but these are not
necessarily needed by Gerrit.

This update is needed because Elasticsearch 1.4.0 has a dependency
on this version [2].

There is no change in the index format since 4.10.1 so we reuse the
same version number for the Lucene backed change index.

[1] http://lucene.apache.org/core/4_10_2/changes/Changes.html#v4.10.2.bug_fixes
[2] http://mvnrepository.com/artifact/org.elasticsearch/elasticsearch/1.4.0

Change-Id: Ie47dd2238493da44659c73c7f97f0caa2f7fdfa4
Fix racy read in ReindexAfterUpdate when merging

As soon as the GitReferenceUpdatedListener is fired, the GetChanges
task reads all open changes on the branch from the DB. There may be
many of these, and they may be stuck in the queue for a while, during
which time some of these changes may be submitted. Therefore we should
be rereading the changes from the DB when the index task starts, but
we weren't, we were using the previously-read Change entities.

Instead, pass a Change.Id into the Index task and reread it on task
execution time. We need another argument to pass the account ID for
the request context, but we choose this slight ugliness over holding a
tantalizing reference to a stale object.

Change-Id: I63f4b874d09d3e6fa35b7d3a82d0089982526f62
Don't manually create Change-Ids for acceptance tests

There was a bug in the commit creation code where it used the parent
tree ID in the hash to compute the Change-Id. (This is somewhat
understandable since it was using CommitCommand, which looks in the
work tree/index and thus does not know the new tree SHA-1 when
constructing the commit message.) This means that when creating two
changes against the same parent in rapid succession, e.g. to test
behavior of a side branch merging back to master, we might
nondeterministically end up with the same Change-Id, depending on
whether the clock in the PersonIdent advanced.

There is already a setInsertChangeId(boolean) method in CommitCommand,
so just use that instead, and parse the resulting Change-Id out of the
message.

Change-Id: Ie87524d324a14a949a14aada963a6de0b3df0b99
Add mergeable API, add acceptance test, and fix bugs

Move MergeableInfo into gerrit-extension-api so we can add a method to
RevisionAPI returning it. Add an acceptance test exercising this new
API, which also exercises Mergeable.

Mergeable had never been exercised in acceptance tests, so this
flushed out some bugs. For one thing, we were passing nulls to the
MergeabilityCacheImpl.LoadHelper constructor, which checks for
non-nulls. For another, particularly galling, we failed to set the
mergeable field in the result of /mergeable in case of a cache hit.

Change-Id: Ib77d994b65af439e56ebc112f3000a71b4222c9b
Merge "Update Lucene to version 4.10.2"
Move Theme enum to extension API

Change-Id: I04b8c1ebbe373906cd7983f92d934eb56c2c47f8
Show link on hover for headings and anchors in documentation

For supporting users it is often useful to send them links to a
certain section in the documentation. The Gerrit documenation contains
a lot of anchors, but they are not easily accessible. If the section
is linked from the TOC the link to the section can be gained by
clicking on the link in the TOC. To link to other elements it is often
needed to check the HTML source code to find out the link target.

Make the links to section headings and anchors easier accessible by
displaying a link icon when the mouse is hovered over the heading or
anchor. By clicking on the link icon the page anchor is set and the
link can be copied from the address bar of the browser.

Having this functionality for anchors is especially useful for linking
to certain configuration parameters in the config-gerrit.html page.

The link icon is taken from the 'Freebie: Application Icon Set' [1]
which is licensed under the Creative Commons Attribution 3.0 Unported
License [2].

[1] http://tympanus.net/codrops/2012/10/02/freebie-application-icon-set-png-psd-csh/
[2] http://creativecommons.org/licenses/by/3.0/deed.en_US

Change-Id: I4377ea23ad76143fd4caa78afc30b82690e533ff
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Remove declaration of unthrown IOException in PushOneCommit

Change-Id: If631a81a987c8e877d3484d7631422899322b39b
Don't use deprecated PGPPublicKeyRingCollection constructor

The PGPPublicKeyRingCollection constructor was deprecated in
Bouncycastle v1.51.

Use BcPGPPublicKeyRingCollection instead.

Change-Id: I5bc4fb4927ba37ecbf7d3763809acc2f53d7fd4e
Fix StackOverflowError during hash code computation

I7659ae66b provided wrong implementation of hashCode(). Objects.hash()
calls Arrays.hashCode(values) on provided values, which in turn calls
hashCode() on its parameters, which in turn leads to endless recursion,
and in the end to StackOverflowError error.

Change-Id: I709239cbd27592765319b15c13044ab9aad738c0