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>