Update to JGit 3.4.0.201406110918-r

Change-Id: If43358b8d2ed4a9db6af5c7becb47e36747eb11f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Use fixed rate instead of fixed delay for the gc schedule

Erroneously, the gc was scheduled using a fixed delay. This caused the
start times of garbage collection to drift over time.

Now a fixed rate is used instead so that the garbage collection can be
scheduled to reoccur at the same time every day.

Change-Id: I9c2a826385c22752e76756e5368ebea797e2dcb5
Signed-off-by: Adrian Görler <adrian.goerler@sap.com>
Use fixed rate instead of fixed delay for the log file compressor

Log compression was scheduled using a fixed delay. This caused the
start times to drift over time. Use a fixed rate instead so that the log
compression reoccurs at the same time every day.

Change-Id: I4a97ecda8adff1751b06e598a3f3b57a9518fa8b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Introduce support for externally loaded plugins

Allows developers to use an external means for loading
plugins into Gerrit. By declaring a ServerPluginProvider
with a @Listen annotation it is possible to support another
non-jar plugin file format to be loaded into Gerrit.

One example use of externally managed plugins are
the ones that support Groovy and Scala as scripting
language for loading a Gerrit plugin.

From now on it will be possible to extend Gerrit
for multiple languages and formats without change or
impact on JsPlugins and existing plugin loading functionalities.

As additional value, from now the ability to extend Gerrit
with other external files format (e.g. Directories,
other files types and scripting languages) would not impact anymore
the Plugin enums, associated switch/case or the complexity of
Gerrit PluginLoader.

Change-Id: I6a64a336f30a18409079e2d4df48d577cd462d6d
Plugins loading ordering: all jars first

Load all the .jar plugins first, to allow the registration
of the extra ServerPluginProviders.

This make possible to have jar plugins that add support
for the loading of other type of plugin packaging, including
scripting (Groovy, Scala), directories or any other type
of future plugin format supported.

Change-Id: I2a50235b63556e3d206dd367cb3825bdd6be4db6
Push plugin Guice Module load into the ServerPlugin loader

The responsibility of parsing the Guice Modules list from
Manifest file should be common to all ServerPlugins and
located into the ServerPlugin class.

This allows to avoid duplicates in the parsing and interpretation
of plugin Manifest for all other subclasses of ServerPlugins
provided by other external plugins providers.

Change-Id: If0c8c502517adc53ac30569d6c52e357d3c9f7dd
Correct ordering of PatchLineComments in ChangeNotes

In PatchLineCommentAccess, a preferred ordering is specified for
PatchLineComments (on lineNbr, then writtenOn). I previously wrote a
Comparator in ChangeNotes that originally specified a different
ordering. This change fixes the aforementioned Comparator to use the
ordering specified in PatchLineCommentAccess.

Change-Id: I8f478e0885a949d3e9dfa7bb0c0835158c39e0c4
Merge "Update to JGit 3.4.0.201406110918-r"
Store PatchLineComments in Git notes

Teach ChangeNotes how to read the PatchLineComments out of a Git Note
object in the format specified below. Also, teach ChangeUpdate how to
write those notes to the correct ref. Note that this does not deal
with draft PatchLineComments at all.

Below is an example of what one of the notes would look like (there can
be up to one note per commit to which comments refer). This includes
not only the patch sets themselves but also their bases.
--------------------------------------------
Patch-set: 3
Rev-Id: abcd1234abcd1234abcd1234abcd1234abcd1234
File: path/to/file

5:1-40:10
Mon Jun 15 2014 03:03 PM
Author: Yacob Yonas <1@gerrit>
Parent: 000060
UUID: 000070
Bytes: 15
I do
not get it

35:1-40:10
Mon Jun 15 2014 04:04 PM
Author: Dave Borowitz <2@gerrit>
Parent: 000080
UUID: 000090
Bytes: 15
I do
not get it

File: path/to/other

70:1-70:100
Mon Jun 8 2014 12:01 PM
Author: Dave Borowitz <2@gerrit>
UUID: 000020
Bytes: 3
Why

-------------------------------------------
The first line of every note will either read "Patch-set: X" or
"Base-of-patch-set: X" to tell us whether the comments in this commit
refer to the base of a patch set or a patch set, as well as which
patch set. Then, we have the Rev-Id for the commit on which these
commits were made.  There is a block for all of the comments on each
file. This will either be the commit for the patch set or for its base
(we will know which one because of the first line of the note).  These
blocks will start with a line of the format: "File: path/to/file".
There is one block for each of the comments. Within a file block, the
comments on that file are sorted by comment range and then by
timestamp for breaking ties. If a comment doesn't have a range, we use
the line number field of the comment instead for comparison.

The first line of a comment block either contains the comment's line
number or its comment range. A range would be in the format
"1:1-100:2" while a line number would simply be one number on that
line. The comment range is optional in a comment, so we allow
either. If that line contains just a line number, the range field on
the PatchLineComment into which we are parsing will be left empty. The
second line of the comment block holds the timestamp for the
comment. Next we have information about the account that made the
comment. Then, we have the parent UUID and current comment UUID. Even
though the field, UUID, no longer lives in the reviewdb, we must keep
that field because of specifications for the REST API. It is important
to note that the line for the parent UUID will be omitted completely
if a comment does not have a parent (see third comment block for an
example of that). Then, the final field is the length of the comment
itself (not including the metadata) in bytes. Finally, after the
comment's actual message, there are two new line characters.

Change-Id: I07db8a252de9901e64e5a6936fa4df0cb3e0d338
maven_jar(): Clarify why 'SNAPSHOT' is discarded from directory name

Change-Id: Ic03082d418d118cf0395e667dd65ece4dce57c75
Removed unnecessary @inject from WebLinks.java

Change-Id: I9389511a02267ae3be7cf08dc1dc9193d5bcdc2d
Merge "Removed unnecessary @inject from WebLinks.java"
Update cookbook plugin to latest revision

- Guice Modules automatically retrieved from Manifest
- Showcase of the non-Jar plugin providers cookbook

Change-Id: Ic6fc8e1aa774c8c4f13c7a952f0c1084fca6c25c