Add listener interface for usage data published events

Introduces a new event which allows to publish usage data of projects.
An example could be the sizes of the repositories in the file system.

Change-Id: I9a9773c3358f5b8a45db2ec8ba29b8a8ea6c3589
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Signed-off-by: Adrian Görler <adrian.goerler@sap.com>
ChangeMergeQueue: Fix race condition

To the multiple triggers of submit action belong:

* ChangeMergeQueue.merge() method called from the UI
* ChangeMergeQueue.schedule() method called by background
ReloadSubmitQueueOp

active map in ChangeMergeQueue acts as a guard for submit job
scheduling. However schedule() ignores the fact that the submit
processing was already started for a specific branch and double
submit action is scheduled.

Specifically for cherry-pick submit strategy that cannot end
good and fails with database constraints violation or similar,
depending on the underlying database implementation.

Guard the background scheduling similar to the UI scheduling.

Defining unique index prevents the database corruption: [1], [2]
but not the collision between manual and background merge jobs.

[1] http://paste.openstack.org/show/83883
[2] http://paste.openstack.org/show/83888

Bug: issue 2034
Bug: issue 2383
Bug: issue 2702
Change-Id: I5b23f9d481351280e26412b82b525947338d9c00
Add missing 'link:' in 2.8.5 release notes

Change-Id: I6268999ab31dd26b829b650d98d076f7223868bd
Release notes for Gerrit 2.8.6

Change-Id: I72451095da8ee6973fbe140edbf9954420b2b795
Bump API version to 2.8.6

Change-Id: I358bca8e7187c50ddb2ca71498d130927fb1aeda
Executing CherryPick.writeCherryPickCommit() in a transaction.

This would at least allow the partial changes to the
database to rollback and not get users in a bad state when
e.g. in the case of OrmDuplicateKeyException: patch_set_ancestors'.

Bug: issue 2034
Bug: issue 2246
Change-Id: I65e111bedc3cec033299b5b5360aaee733d4b5c6
(cherry picked from commit eb4778d079e7156c82d04c2f26c71ca89d12df16)
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8:
  Executing CherryPick.writeCherryPickCommit() in a transaction.
  Bump API version to 2.8.6
  Release notes for Gerrit 2.8.6
  Add missing 'link:' in 2.8.5 release notes
  ChangeMergeQueue: Fix race condition

Conflicts:
	VERSION
	gerrit-plugin-archetype/pom.xml
	gerrit-plugin-gwt-archetype/pom.xml
	gerrit-plugin-gwtui/pom.xml
	gerrit-plugin-js-archetype/pom.xml
	gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java

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

* stable-2.9:
  Executing CherryPick.writeCherryPickCommit() in a transaction.
  Bump API version to 2.8.6
  Release notes for Gerrit 2.8.6
  Add missing 'link:' in 2.8.5 release notes
  ChangeMergeQueue: Fix race condition

Conflicts:
	VERSION

Change-Id: I736038ec00d7e9656de0d5b9043498a479cdbd01
Buck: Allow to co-exist in tree and standalone plugins

Link /lib/maven.defs to bucklets/maven_jar.bucklet to allow standalone
plugins to be built in Gerrit tree.

Change-Id: Ibd1d52ae1f0ada2e2e7de63cf455ff0269153f97
Merge "Buck: Allow to co-exist in tree and standalone plugins"
Fix show-caches example output in documentation

The thread information is now printed in an own section. This was
changed by 96468ebd543df13aade236b3459a5589abe58d0b.

Change-Id: I0a36df3e8b186c02cdee65919449f74b35de7939
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Fix show-caches example output in documentation"
Merge "Add listener interface for usage data published events"
PluginName: Don't depend on StackTraceCreator.fillStackTrace()

This method from an impl package was removed upstream:
https://gwt-review.googlesource.com/7910

Instead, use the method suggested by JavaScriptException itself:

  The return value of {@link #getStackTrace()} may vary between
  browsers due to variations in the underlying error-reporting
  capabilities. When possible, the stack trace will be the stack trace
  of the underlying error object. If it is not possible to accurately
  report a stack trace, a zero-length array will be returned. In those
  cases where the underlying stack trace cannot be determined, {@link
  #fillInStackTrace()} can be called in the associated catch block to
  create a stack trace corresponding to the location where the
  JavaScriptException object was created.

Change-Id: I3e92e2084840dc14f2e36b76cefe326890e08d1c