Update replication plugin to latest revision

- Avoid throwing exception due to deleted change

Change-Id: Ic053278a6145acc4f10b430d08a4c77c7c9c96f2
Avoid CodeReviewCommit.error() whenever possible

The instances returned by this static factory method are severely
limited, in that they are not tied to actual commit objects. In most
cases, we can tie them to commit objects, so do that whenever
possible. Limit the statuses that we can pass to this method by
making it private, and creating separate factories only for those
statuses where there is really no commit.

Change-Id: I0cb392f4f7f5134d4a7487a2a7bb7ac9d770f334
Pass ChangeControl into CodeReviewCommit error instances

Within MergeOp these are keyed by Change.Id, but some error handling
code only receives the CodeReviewCommit and not the ID. That code is
reasonable in assuming there is a change/notes/control available, so
ensure this is the case when creating error instances.

Bug: issue 2911
Change-Id: If65398652f0e5b1a2b10a2fadc9a3b74bce7d556
Fix using HTTP methods other than GET from plugins

Commit 3bde74c2797 introduced a bug in the REST API. Methods other
than GET could not be used anymore  from plugins. For example it was not
possible anymore to delete projects with the delete-plugin using DELETE.

Bug: issue 2949
Change-Id: If90247ec4e0dad03b02d0a9e21202455fece90a7
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
(cherry picked from commit 3d227bbadfa234bcac7400cf41030423bf183ff3)
Fix IncludingGroupMembership.containsAnyOf infinite loop

This class is using a map to store the memberOf and can be accessed
by multiple threads concurrently. The map was not synchronized which was
causing an infinite loop under very specific sequence of events. Here is
a snippet of the thread dump when that problem happened:

"SSH gerrit review ..." prio=1 RUNNABLE
java.util.HashMap.getEntry(HashMap.java:446)
java.util.HashMap.get(HashMap.java:405)
com.google.gerrit.server.account.IncludingGroupMembership.containsAnyOf(IncludingGroupMembership.java:77)
com.google.gerrit.server.account.UniversalGroupBackend$UniversalGroupMembership.containsAnyOf(UniversalGroupBackend.java:152)
com.google.gerrit.server.account.IncludingGroupMembership.search(IncludingGroupMembership.java:115)
com.google.gerrit.server.account.IncludingGroupMembership.containsAnyOf(IncludingGroupMembership.java:93)
com.google.gerrit.server.account.IncludingGroupMembership.contains(IncludingGroupMembership.java:69)
com.google.gerrit.server.account.UniversalGroupBackend$UniversalGroupMembership.contains(UniversalGroupBackend.java:129)
com.google.gerrit.server.project.ProjectControl.match(ProjectControl.java:493)

Change the HashMap to a ConcurrentHashMap to handle concurrent access.

Change-Id: I36f654281b7a1d7126936d86d64e6827d8987577
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9:
  Fix IncludingGroupMembership.containsAnyOf infinite loop
  Pass ChangeControl into CodeReviewCommit error instances
  Avoid CodeReviewCommit.error() whenever possible
  Update replication plugin to latest revision

Change-Id: Ib6fc0a85864fa407d6fecc027bb2577cd6bcec0c
Update replication plugin to latest version

- Remove unneeded 'throws NoSuchChangeException'
- Avoid throwing exception due to deleted change

Change-Id: I97b86245c97f869828ba4feadb9ab73821e5b1ed
Fix example in documentation of Set User Preferences endpoint

The example showed GET, but should be PUT.

Change-Id: I37da23217f8bec351703755d3266f42b3f8c75ee
Revert "CM3: Add reStructuredText mode"

Causing rendering failures in some cases. Filed a bug upstream:

https://github.com/codemirror/CodeMirror/issues/2850

Change-Id: I0b4032d41b1fe5b9756ff59f752f5fce86634c41
Fix comment box font colors of dark CM themes

Bug: Issue 2964
Change-Id: Ie8b624b4201de696e6cfa282dca5f6000b1a901d
Mention the push %l-parameter in the documentation

Change-Id: Icc564ca82c2e05d176f75ddfd3b11924dcabaabe
Fix broken formatting in Tomcat reverse proxy config documentation

Remove the unnecessary [TIP] block.

Fix the formatting of links.

Enclose example settings in backticks.

Add an anchor to make it easier to link the section from the release
notes.

Change-Id: I46dcc5cb6afc24c6717885a5ca5f1faa04d7a746
Update Guice version to 4.0-beta5

Beta 5 releases the fix to Cookie mutability bug [1], so that we can
switch again to Central repository and don't need custom Guice
guice-servlet build.

[1] http://code.google.com/p/google-guice/issues/detail?id=806

Change-Id: Ia766f3d9163afdae06ea7c702824909a8349b98e
Merge branch 'stable-2.9'

* stable-2.9:
  Fix comment box font colors of dark CM themes

Change-Id: I08393870c856fab507fe160f92e7ca7457fe5a5c
Initial release notes for Gerrit 2.10

Change-Id: Iccaf7d4ea66eff290967c41ee70348a4dfc4511b
Allow to raise BooleanQuery limit in gerrit.config.

Raising the limit avoids failing a query BooleanQuery.TooManyClauses,
preventing users from seeing "400 cannot create query for index" error
in the "Conflicts with" part of the change screen.

Change-Id: Ie0bf14c4a3e6c4833c064f7ac822c08aa2aaffb8
Disable Gitweb for in-memory acceptance tests

When running any in-memory acceptance tests, if Gitweb is installed,
the tests were failing because the GitWebSerlvet initialization requires
gerrit.basePath.

Change-Id: Ia3286176c671f92366425f628a09a19caf90e23f
Fix ordering of 2.9.x releases in the release notes index.

Change-Id: Ifd835e4a344710d635caaedc323977d6fbfca8fd
Update JGit to version 3.5.1.201410131835-r

This JGit version fixes:
- Bug 420915 - jgit gc hangs in partitionTasks with a very small repo
- Bug 427107 - cannot push anymore
The latter was observed by CollabNet to break Gerrit replication if gc
created a bitmap index which may have induced PackWriterBitmapWalker.
findObjects() to throw a MissingObjectException.

This version of JGit also fixes the recursive merger on all storage
systems.  Objects created during the virtual base construction of a
recursive merge must be written out somewhere and made available
through an ObjectReader for later passes to work on.

In both local filesystem and DFS implementations Gerrit was no-op'ing
the inserter in dry-run mode, causing these objects to be lost and
unavailable during the later processing stages of the merger.  With a
virtual common ancestor tree or blob missing, the dry-run merger fails
and a spurious merge conflict is reported.

Instead build a non-flushing inserter wrapper around a real inserter
for the repository. On local disk (standard storage) this will allow
the virtual base to write loose objects, which may be reclaimed in
about two weeks by the standard `git prune` invoked by `git gc`.

On DFS systems this will create a new pack file and buffer a block of
data in memory before starting to store to persistent storage.
However with no flush() the DfsInserter will attempt to rollback the
pack, which may allow the DFS system to reclaim its storage quickly.
Some implementations of DFS may buffer even more deeply than one
block, making the discard even cheaper for smaller merges.

This update also fixes a potential infinite loop during object
inflation within both the WindowCursor or DfsReader versions of
ObjectReader.  Inflation could get stuck if an object's compression
stream within a pack ended at a very precise alignment with the cache
block size.  The alignment problem is very rare, as it has taken
several years to identify and track down.

Includes changes done in I9859bd073bd710424e12b8b091abb8278f4f9fcc
on master.

Change-Id: I898ad7d5e836ebae0f8f84b17d0ae74489479ef9
Update replication plugin to latest revision

- Prevent creating repos on extra servers
- Remove unneeded 'throws NoSuchChangeException'

Change-Id: I8b1452e252fad58c41e6fe152f44aafc7537d4d7