Validate email address when adding email or creating account

This checks that the email address has a valid format.

Change-Id: I1f8d95dd9b02e720996bd15cca093ca55b5e4597
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
delete not used GerritWidgetCallback and OldGerritCallback

Change-Id: I6e708a33b28db84ffe7b93c7f80334412598b5c7
Show error message when the commentlink is configured wrongly

When the 'commentlink.<subsection-name>.match' is configured wrongly,
e.g. invalid regular expression, the change screen cannot be loaded,
and there is no error message or log.

Show an error dialog.

Bug: Issue 2514
Change-Id: Ie36fcdb0be13690cacaa64e235a08d7913dea937
Wrap long JSNI in ApiGlue

Change-Id: Ic40487d3831f0d42a4f919796fb8c703d0a2d597
Make it easy to construct CSS and HTML from JavaScript plugins

Scoping CSS rules across plugins can be slightly tricky, as the
namespace is global for the entire browser window.  Allow plugins to
create unique names using Gerrit.css() and then use those inside of
HTML with class="{style.foo}" style replacements in the Gerrit.html()
function.

This style of development makes native HTML and CSS more natural
to use inside of a plugin's JavaScript, and reduces the risks of
conflicting CSS rules with core Gerrit or another plugin.

Event handler registration is also supported, making it easier to
attach functions to handle onclick for buttons and anchors.  Handler
registration avoids circular references between the function's
environment and the DOM node, ensuring garbage collection works.

Change-Id: Ic29a4ec0c15eedef4f4ce72031193f1896742dc5
Make the message of 'Cherry Picked' informative

The message reads:

 "This patchset was cherry picked to change: <Change-Id>"

This is not very informative, since the Change-Id is identical
to the current change.

A better message would be:

 "This patchset was cherry picked to branch <branch name> as commit <SHA1>"

Bug: issue 2513
Change-Id: I8bfb61b1a314cf2a985df7a571bb28e3f6cb49d4
Update 2.8.2 release notes

Change-Id: Iaf3f4ca1a45df7104e87491c5c223c4046f92ae9
Fix race condition between MergeOp and MergeabilityChecker

MergeabilityChecker is a GitReferenceUpdatedListener, which gets
called after the reference updates but before the change status
is written to the database. To reduce latency during merge the
rescan operation is sent to a background thread pool.

It is possible for the background thread to scan the database
and observe the recently merged change with status at SUBMITTED,
as the scan can run before the status is changed to MERGED.

If the MergeOp thread writes the status to the database before
Mergeable finishes the check, then Mergeable will replace the
status with SUBMITTED, making the change appear to be unsubmitted.

One part of a fix is to move the reference update notification
after writing the change status to the database. This will have
the least surprising semantics for plugins and any other code
wired into the listener. Commits visible in the reference will
now show as merged if the listener queries for them.

Change-Id: Ib8d034c3f2eb79716b5ebc1ed426a0e8dbb0861a
Use atomic update when storing mergeable and last SHA1 tested

The change may have been modified while the merge test was
being computed. The author could have added a new patch set,
or MergeOp may have finished merging the change concurrently
with a rescan triggered by a prior merge on the same branch.

Only update the change if the status is still open and the
current patch set matches the one that was actually tested.

Change-Id: Ie2801621281a7605089122c6021e612434844f21
Merge changes Ic29a4ec0,Ic40487d3

* changes:
  Make it easy to construct CSS and HTML from JavaScript plugins
  Wrap long JSNI in ApiGlue
Merge "Validate email address when adding email or creating account"
Enable disabled gwtui tests

a283507bccbd408540ae1baf75eb80eb59dce031 disabled EditIteratorTest due
to gwt-test-utils uncompatibility with new GWT 2.6 release.

After fixing the compatibility problem in [1] the tests can be enabled
again.

[1] https://github.com/gwt-test-utils/gwt-test-utils/issues/62

Change-Id: I1f93e6422a1ae60d66f4d8b4abac23b6a1acb4f9
Protect reload plugin command with allow remote admin option

fd03350b9ea8af3cdf65fb8fb2367e333b252de4 introduced a new option
to disable remote plugin administration.

Require reloading plugins to be explicitly allowed with:

  plugins.allowRemoteAdmin = true

Change-Id: I2946202dd40af8b4197212fb15a488b166883d8a
Merge branch 'stable-2.8'

* stable-2.8:
  Update 2.8.2 release notes
  Make the message of 'Cherry Picked' informative
  Show error message when the commentlink is configured wrongly

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java

Change-Id: I82a7ac51f31fec83166ecad26e65d66623d2cda4
PostReview: update and insert comments/approvals in a single step

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java

Change-Id: Ieab4ac0628e397495bfd8a278c879f79817ba443
Merge "Enable disabled gwtui tests"
Update 2.8.2 release notes

Change-Id: Ia580893c2c1700af9b6eddc6ee9a7916e68aa551
Bump GERRIT_VERSION to 2.8.2

Change-Id: I24e6deb8755fda9d90181db6a35397236f6c789f
Remove unused import in EditIteratorTest

Change-Id: I0758a836d5448e19f3f9a18dc70ed08fb3c1ebdf
Prevent duplicate commits in same project when uploading to refs/changes/n

Under certain circumstances, when pushing to 'refs/changes/n', the same
commit can be pushed onto multiple changes even if they are on the same
branch.

As a result of this, if the commit sha1 is used as change identifier
in the 'review' ssh command, it will fail with the error:

  'fatal: <SHA1> matches multiple patch sets.'

This commit performs the same check as when pushing to 'refs/for/branch'
to prevent this, and will show "commit already exists (in the project)"
error message to reject uploading a commit to an existing change via
`refs/changes/n` if the commit was already successfully pushed to a change
in project scope.

Bug: issue 2374
Change-Id: I1c000b2cc3e155617cdc9c295a46ce2107ec47ca