Fix example how plugins can react on changes in project config

The example didn't handle the case that on project creation a zero
ObjectId is provided as old ObjectId.

RefNames.REFS_CONFIG has to be used instead of
GitRepositoryManager.REF_CONFIG which doesn't exist anymore.

Change-Id: Ic42ca72a126b70ff0b452e5150e2d1e3c916c73c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Bump Jetty version to stable 9.1 and Servlet API to 3.1

Change-Id: Ic6a374afa978e66ec1a04a2b39801da158ba31d7
Buck: Preserve SNAPSHOT suffix in Maven artifact names

Drop the code that removes SNAPSHOT suffix in artifact name. This prevents
Gitblit plugin from fetching its custom artifact from Gerritforge Maven
repository, making from the right name:

  com/gitblit/gitblit/1.4.0-SNAPSHOT/gitblit-1.4.0-SNAPSHOT.jar

the broken artifact name:

  com/gitblit/gitblit/1.4.0-SNAPSHOT/gitblit-1.4.0.jar

Change-Id: Ib16f032a9fda3ef61570a85d97659cd3ce02f5f2
Hide the quick approve button when revision is not current

Bug: Issue 2362
Change-Id: I042d5379f6e6592c214c1a674d15617e4b439dc4
Display label status as status text element's title

Setting the label status as the status text element's inner text
does not do anything.  The text stays as "Review in Progress".

Set it as the element's title instead.  Now the "Needs ..." etc
status is shown when the user hovers the mouse over the "Review
in Progress" text.

Change-Id: If2883c34f0407c2c6f988f8f41f891a6a3765b44
Update mergeability flag during reindex

Before commit f8be8fdca the mergeability flag on changes was only
updated on request and for most of the changes the persisted
mergeability flag was outdated. Commit f8be8fdca makes sure to keep the
mergeability flag updated whenever the destination branch is updated,
but for old changes the mergeability flag may still be outdated. Since
some Gerrit functionality is relying on the mergeability flag
being up to date there must be a way to update the mergeability flag
for all old changes. One possibility would be to do this as a schema
migration but there may be situations where it's needed to update the
mergeability flag on demand (e.g. if during a Gerrit downtime branches
are updated due to some administration tasks). This is why it's
better to update the mergeability flag in the reindexer when the
changes are reindexed. Also the schema migration is done during the
init phase where a lot of classes that are needed by the
MergeabilityChecker are not bound. The reindexer on the other hand
already has a lot of the needed Guice bindings in place.

An outdated mergeability flag is especially bad since this information
is shown in the change tables and user dashboards (see commit
56f39eb0a0). Users will be very confused by seeing wrong (outdated)
information here which is why it is important to get this fixed before
the next release.

Bug: issue 2322
Change-Id: If85839cedcfed25e872b264149d13e98b10ba835
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Update mergeability flag during reindex"
SideBySide2: Map *.scala to clike CodeMirror mode

Bug: issue 2360
Change-Id: I5183cdafba52b1e5e0fa344026c5b597315a46e2
Buck: increase JVM heap size for acceptance tests

Change-Id: I43895bd881d69b36731d2abcefbe502f2e1b08f0
Add acceptance test for copying approvals between patch sets

Change-Id: Ice4a4356988ac8a61ea4cbc00493648444fc6e32
Merge "SideBySide2: Map *.scala to clike CodeMirror mode"
Merge "Buck: Preserve SNAPSHOT suffix in Maven artifact names"
Merge "Bump Jetty version to stable 9.1 and Servlet API to 3.1"
Fix Guice bindings in reindexer

Change-Id: I5922149171f082660fb1100bda0f1e161761ed6c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Extract an ApprovalCopier from ApprovalsUtil

Rewrite in such a way that we can do an implicit "copy" between
arbitrary patch sets without necessarily storing the results. For the
notedb, we will use this (with cached ChangeKinds) rather than storing
copied labels.

This introduces a few minor behavior changes. First, copied approvals
are now normalized according to permissions. This may result in
different values stored in the database when copying, but these values
were already normalized out by ChangeJson and the submit rule
evaluator, so this should not result in a semantic change.

Second, we no longer pass in a "source" patch set; all prior patch
sets are considered. This has the advantage that it does not rely on
labels having been properly copied to intermediate patch sets. It also
means, for example, if patch set 3 has a code change relative to patch
set 2 but not patch set 1, approvals on a copyAllScoresOnNoCodeChange
label will be copied from patch set 1, bypassing patch set 2. We think
this is a more correct state of affairs: if patch set 1 is good enough
to submit, so should patch set 3, regardless of the fact that there is
an intermediate patch set.

Change-Id: I56ae707c34ac7b978b06a0624c1353e8f28286a7
Clean left over data migration after removal of TrackingIds table

9f4de526dd3fec0400f6df53628956a4bf0d9033 removed TrackingIds table.
766e4415b0f004a4e53c93d256624361072c67c4 tries to swap primary key from
tracking_id to tracking_key in data migration method.

But because the table was removed from the Schema the TrackingIds is not
picked by gwtorm for the upgrade (ALTER TABLE add tracking_key statement).

In Schema_70 the migration step tries to execute:

  UPDATE tracking_ids SET tracking_key = tracking_id

and is failing because the column tracking_key wasn't created.

To rectify this, remove the migrate data method entirely in Schema_70.

Bug: Issue 2382
Change-Id: I1d7b6deb50be8595626d210a4350683d8b996de5
SideBySide2: Map *.scala to clike CodeMirror mode

Bug: issue 2360
Change-Id: I5183cdafba52b1e5e0fa344026c5b597315a46e2
Buck: Preserve SNAPSHOT suffix in Maven artifact names

Drop the code that removes SNAPSHOT suffix in artifact name. This prevents
Gitblit plugin from fetching its custom artifact from Gerritforge Maven
repository, making from the right name:

  com/gitblit/gitblit/1.4.0-SNAPSHOT/gitblit-1.4.0-SNAPSHOT.jar

the broken artifact name:

  com/gitblit/gitblit/1.4.0-SNAPSHOT/gitblit-1.4.0.jar

Change-Id: Ib16f032a9fda3ef61570a85d97659cd3ce02f5f2
Merge "Buck: Preserve SNAPSHOT suffix in Maven artifact names" into stable-2.8
Fix examples for Code-Review queries in search documentation

The Code-Review label is now called 'Code-Review' and not anymore
'CodeReview'.

Change-Id: I04c57107d2a4d4762216a09bca3c12a24c8916f0
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>