Use properties file to map file extensions to CM3 mime types

Use a properties file to map file extensions to the mime types
used for syntax highlighting in codemirror.

Using a properties file makes it easier to update the mapping
and keep the lines sorted.

Change-Id: Ic84c01b5fd783ffbc59873daa5e758317409f163
(cherry picked from commit bac7d1c053c8a5cdcf84c9628e29650df9fa5df2)
SideBySide2: Add syntax highlighting for 18 more languages

Include more languages into the CM3 mapping supported by Gerrit:

* coffeescript
* d
* diff
* dtd
* erlang
* gas
* gfm (GitHub Flavored Markdown)
* haskell
* lua
* markdown
* php
* pig
* r
* scheme
* smalltalk
* tcl
* verilog
* yaml

Change-Id: Ie3cc3657183a475fb71a71e0fe35be848deb985f
(cherry picked from commit 5478148f6f25db215424f51d6a5e88f7bf78f164)
Remove 'send email' checkbox from reply box on change screen

When replying to a change the 'send email' checkbox allowed to control
if the change update should trigger email notifications for other
users. This behaviour is bad for people who want to rely on email
notifications since it depends on the replying users whether they get
an email notification or not. By removing the 'send email' checkbox
people are again in control about their own email notifications, e.g.
by the watch settings they can configure which emails they want to
receive. Still suppressing email notifications via the REST API is
possible (and wanted, e.g. for CI jobs).

Change-Id: If11863da6020a1d5b7edc1ae1a1a60399b197267
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Load notes in ChangeUpdate.storeCommentsInNotes()

ChangeUpdate assumes the NoteMap in ChangeNotes is already
loaded. However, the ChangeNotes were never loaded, so the NoteMap
will always be empty. Therefore, we loaded the ChangeNotes.

Change-Id: Ibebb0d8c75dcac57178438b633e18447ec3cdb2e
Release docs: Add direct link to 'gerrit-documentation' storage bucket

Change-Id: I522127a4a928ea297aa11522c7c5e12113a85bdc
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Don't use providers on singletons

Change-Id: I5051d536b041f4d6234fd066aedd148d34c380d8
Merge "Don't use providers on singletons"
Fix successful login redirection to keep parameters

Login screen accept a token to redirect to on successful login but
if the token contained parameters, they were dropped.

Encode/decode the token to fix this issue.

When a URL has a pound sign, it is included in the token as well.
This removes the hardcoded behaviour to include a pound sign in every
redirect URL. Will now be able to use login redirection for URLs with
no pound sign (e.g. GitWeb)

Change-Id: If8a74a74ce11f79389895e4d036b06a1e81abbe5
Merge "Fix successful login redirection to keep parameters"
Make gitweb redirect to login

Make gitweb redirect to the login page if the user isn't currently
logged in

Change-Id: Ib5b30d433b7ae629da00c02de5abc9d6990c6fc1
Config Section: Add passwordForKey() convenience method

Section class already provides password() method that does the right
thing (store the value in secure.config) and suppresses the input from
the terminal.  However this method expects user/password pair to exist.

With OAuth Github authentication provider we need to provide password
for GitHub Client Secret. Add another convenience method for Section to
operate on single field with description.

Change-Id: I9593cd5b35ae263003c1d1c9d771638a780ef96a
Merge "Remove 'send email' checkbox from reply box on change screen"
Merge branch 'stable-2.9'

* stable-2.9:
  2.9 release notes: Add warning about download commands
  SideBySide2: Add syntax highlighting for 18 more languages
  Use properties file to map file extensions to CM3 mime types

Conflicts:
	gerrit-gwtui/src/main/java/net/codemirror/lib/ModeInjector.java
	gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java
	gerrit-gwtui/src/main/java/net/codemirror/mode/mode_map
	gerrit-server/src/main/resources/com/google/gerrit/server/mime-types.properties
	lib/codemirror/cm3.defs

Change-Id: I9c95ad442cd44b8fcd6b73baef9f7129e197cb9f
Merge "Merge branch 'stable-2.9'"
2.9 release notes: Add warning about download commands

Add a warning that reminds administrators that the download-commands
plugin must be installed for getting download-commands on the new
change screen. This warning was already included in the 2.8 release
notes but it makes sense to add this information to the 2.9 release
notes as well. Some people may not have been interested in the beta
version of the new change screen in 2.8 and hence they may have
ignored the need for installing the download commands plugin.

In addition provide more detailed instructions about how the
download-commands plugin can be installed.

Also add a warning about upgrading the plugin, since the 2.8 version
of the download-commands plugin doesn't work with Gerrit 2.9. Explain
that interactive init must be used to upgrade the plugin.

Change-Id: I2101e0a3974ddb8d1fdf198941edc99305351650
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Clarify new installation vs. upgrade of plugin in 2.9 release notes

The download-commands plugin can be either newly installed, or
upgraded, when installing Gerrit 2.9

Make this a bit clearer in the release notes.

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

* stable-2.9:
  Clarify new installation vs. upgrade of plugin in 2.9 release notes

Change-Id: I5f4bfa3fee70df7bcd78a5f231c75df8928960ec
Add documentation of the changes REST API /related endpoint

Bug: Issue 2782
Change-Id: I42e650904d924890e367b7fc6478489311da3f41
Factor setPatchSetId out of ChangeUpdate

I missed this when factoring out AbstractChangeUpdate from
ChangeUpdate.

Change-Id: If6eb57fa1a2ed9b37061bdca2fcde200ef034329
Modify CommentsInNotesUtil to handle removing a notes object

Previously, we were using the inserter to insert null if the list of
comments to write to the NoteMap was empty. However, in this case, we
should be removing the note that existed before. Therefore, I made an
additional method for the purpose of removing the note if we deleted
all remaining comments from that note, removeNoteFromNoteMap().

Callers should call writeCommentsToNoteMap if they have a non-empty
list of comments that they want to write to a note. If they have an
empty list, they should call removeNoteFromNoteMap which requires a
parameter for the RevId for the note where the comments used to be.

Change-Id: Ia91d8698206ab4814039a47190319838ecb541cc