Move ReceivePackInitializer to the proper package

Change-Id: I9bc00c5ee76b6cf6fd7c2d083bfb180334beffcb
Guard against diff.mnemonicprefix in commit-msg hook

When the '[diff] mnemonicprefix' configuration is enabled, and changes
are committed with "git commit -v", the diff included in the commit
message starts with "diff --git c/" instead of "diff --git a/", causing
the commit-msg hook to keep the diff in the message it produces.

Change-Id: Icbe9cf55305d432fca2875357f289685d6c51c87
Set uploader to current user in "patchset-created" event upon rebasing

When rebasing a change through the Web-UI (both old and new
ChangeScreen), the corresponding patchset-created event had its
patchSet.uploader set to the Change's owner instead of the current
user. We now set it to the current user, so stream-events consumers
can properly detect who uploaded the rebased patch set.

Bug: Issue 2493
Change-Id: Iea9459c7015cde9e869dad5946bd1d3b2db5d51a
Fix submit rule evaluation for non blocking labels

Putting a negative score on a label configured as `NoBlock` causes
the submit button to be disabled.  However, a `NoBlock` label is
supposed to be purely informational and its values not considered
when determining whether a change is submittable.

Fix the submit rule evaluation to prevent the button from being
disabled.

Also add an integration test.

Bug: Issue 2453
Change-Id: I0825b3c2d4774c17d523ac5f7890b983fa07af39
Fix incompatibility between "Rebase if Necessary" and "copy*Score*"

There was a bug when :
  - a project is set up with "Rebase if Necessary"
  - one of its labels has copyAllScoresOnTrivialRebase (or copyMaxScore)
  - a change that actually needs a trivial rebase is submitted
Gerrit first rebases, and in the process copies the approval for the label,
then it copies all the approvals, including the one already copied, which
results in a constraint violation on the database.

Fix by using upsert instead of insert (duplicates are identical anyway).

Change-Id: Iadccfa581cf273028a9b9b6065b6d1071842d27f
Add Implementation-Vendor default manifest entry

Change-Id: I40039bba02ed0169df02bc1d335606dd34473366
Allow external log4j.properties to use HttpLogLayout

When using an external custom log4j.properties using the 
-Dlog4j.configuration option, you may need to keep the 
ability to log HTTP activity using the Gerrit HttpLogLayout.

Change-Id: Ibd4b36736fa0f716c346d41f5586f8e66a5d1431
Enable creating new branch and push local new commits in one step.

Direct push local commits to create a new branch is rejected,
even when user group can
 - 'Read',
 - 'Create Reference',
 - 'Push'
on 'refs/heads/*'. User have to firstly create new branch with
a commit which exists on server side, then push other local new
commits.

The reason is that Gerrit take it for granted that the commits
used to create new branch exist on server side already, so Gerrit
only check the commits are reachable or not on the server side.
According to the same reason if user group can 'Read' on 'refs/*'
or have Global Capabilities 'Administrate Server', Gerrit will
think the commits sure will be reachable for user and stop do
further checking.

So Gerrit does not work in the cases where creating new branch with
local new commits, e.g. the commits come from outer partners and need
not review, and the user group is not of Admin group and should not
be able to see every thing for some business rules reason.

Taking local new commits into account, also including the related
permission checking, now it can be finished in one step to create
new branch and push local new commits.

Bug: Issue 2441
Change-Id: I4e580e2fe0b40b8d0fbb06c5c8d1efd61127a842
Update replication plugin

- Fix JAR manifest claiming it is Commons IO project

Change-Id: Ia6929b27589700d7bcab20a9a5b85926636ab463
Isolate query tests in its own JVM

Split query tests in its own JVM as the overall build performance
greatly benefits from parallelizing these time consuming tests:

15 sec. on my machine.

Change-Id: Ic871d9e1754bed29eb9bc52f61a534f3e31fdd4e
Merge "Allow external log4j.properties to use HttpLogLayout"
Merge "Move ReceivePackInitializer to the proper package"
Download commands: Add JGit archive

Since JGit 3.1 archive command was implemented. Add it to download
drop down as new line.

The following libraries are introduced in this change:

* jgit-archive (Apache 2)
* commons-compress (Apache 2)
* tukaani-xz (Public domain)

Change-Id: I5f61aac8c434414c73585a9320e84f4430dd111d
Update replication plugin

Changes merged in from stable-2.8:

- Fix JAR manifest claiming it is Commons IO project

Change-Id: Id3a67871d3c9c578a01fff57ac9a2789d426ddf5
Add submit rule evaluation tests for custom labels

Bug issue: 2453
Change-Id: I0825b3c2d4774c17d523ac5f7890b983fa07af39
Merge branch 'stable-2.8'

* stable-2.8:
  Update replication plugin
  Enable creating new branch and push local new commits in one step.
  Add Implementation-Vendor default manifest entry
  Fix incompatibility between "Rebase if Necessary" and "copy*Score*"
  Fix submit rule evaluation for non blocking labels
  Set uploader to current user in "patchset-created" event upon rebasing
  Guard against diff.mnemonicprefix in commit-msg hook

Conflicts:
	gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/BUCK
	gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/AddReviewerInput.java
	gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeJson.java
	gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/RebaseIfNecessary.java

Change-Id: Ie59a530fe2c0fe66244d010e01e3cdf41de150f0
Fix long lines in JSNI method references

With the upgrade to GWT 2.6, line breaks are supported in JSNI methods.

Change-Id: I4e7c173f049a841cb61cd67ed3a52fc6d1b4a451
Add project clone command that automatically installs commit-msg hook

Change-Id: Ia7cc7af9f7c255da2e3f73e662710b58366c2079
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Correct fix for potential NPE in PrettyFormatter

Commit 6eabad25087fa6f1595353078ed933cc43ad7ec8 fixed a possible NPE
in PrettyFormatter but afterwards FindBugs started to report a
potential NPE on a follow-up line.

Change-Id: I18d112e70c6a84f436003932054e6adaa517dae1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Fix long lines in JSNI method references"