Fix potential NPE in cherry-pick submit strategy

Change-Id: I0099d9a73a3f5e86c77235668bc0fc1205979456
Fix description of set-account command's --full-name option

Change-Id: I0cfe9f930d9958493a2fe09b8936f752489b79f6
Set default for review SSH command to notify=ALL

When the --notify option wasn't given, it defaulted to notify=NONE.
Make it default to notify=ALL.

Bug: issue 2801
Change-Id: I799d3036f93286328311f3339a0e384cc56542c3
AddMembers.apply: Prevent NPE when account doesn't exist

When trying to add an account to a group, if the account doesn't
exist yet and cannot be created, AddMembers.apply() would throw
an NPE. Fix it to throw UnprocessableEntityException instead,
which is handled by RestApiServlet.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Change-Id: I724a7b8a95a8df70506ae591575c74153278adc4
Fix stale dates in committer field

The server's PersonIdent cannot be held by a singleton such as
SubmitStrategyFactory.  Holding it would retain the timestamp of the
first merge in this process, with the time forever stuck in the past.

Instead use Provider<PersonIdent> so Guice can defer creation of
the server's identity until it is required to write a new commit.
This allows the current date to be injected into a newly created
PersonIdent, keeping the committer field current.

Bug: issue 2773
Change-Id: I9e5edd41e42a702ed8541cfef57660204a8c5b57
(cherry picked from commit efcd3168a2f2053597ac467d53f254500de6c1ed)
Add missing call to ref-updated hook for submodule updates

Add call to ref-updated hook when a project ref is updated because of
submodule subscription.

Bug: issue 2831
Change-Id: I176ea044fe4bbb2d5abc596b3da6dcd0a8d3e12f
Merge "Add missing call to ref-updated hook for submodule updates" into stable-2.9
Support for CSharp syntax highlighting

Bug: Issue 2848
Change-Id: Ibdc6a5c678c4340570d016d59545a40f6fabdf91
(cherry picked from commit 90459db79d9e284baf047ce7ad99241535470eaf)
Merge "AddMembers.apply: Prevent NPE when account doesn't exist" into stable-2.9
Fix mutual exclusivity of --delete and --submit review command options

As per documentation, --delete --submit were supposed to be mutually
exclusive but they were not. Add check to make sure those two options
are not used at the same time.

Change-Id: Ic63573b1e0a455fa879c88bddbdd4fcd05d7d595
Fix broken links to CommentRange entity in changes REST documentation

Change-Id: I35f6ad50d8dbe73df93297b76f4511e484dc9c7e
Update review command documentation for mutually exclusive options

Review command documentation was not accurate regarding the mutually
exclusive options.

Change-Id: Ic5e7fa36a844258a448f37d42f041d350a0d6441
Add example of range comment in REST API documentation

Bug: Issue 2861
Change-Id: Id9db8fd7a56178f469b1ed17d1cac14c78bfff79
Replace "line" with "end_line" when range is given in inline comment

When a range comment is given in the review, the caller must specify
the "range" entity with "start_line" and "end_line" values, and also
the "line" value.

The documentation simply says that the "line" value 'should equal the
end line of the range', but the implementation does not validate this.

If "line" is not specified, the comment is added as a file comment
regardless of what "start_line" and "end_line" values are given in
the range. This can be confusing for users.

Change it so that when a "range" is given, the "line" value is not
necessary, and if given at all will be overridden with the value from
the "range"

Bug: Issue 2861
Change-Id: I5d0d31c392937b1955572781375fc48982ea7664
Gracefully skip mergeability checking on broken changes

If a change is missing its current patch set the mergeablity check
will NPE. Skip the check and just return false, indicating there
was no update made to the change.

Change-Id: Ic82b2db1d2f7d27105a06c4082b51e7308f02b04
Clarify the failing change in MergeabilityChecker

If an update check fails, it may be change specific. Record the
change as part of the logged message.

Change-Id: I33aba050572f919e150d8e0f1bd678f575301b72
Merge topic 'comment-range' into stable-2.9

* changes:
  Replace "line" with "end_line" when range is given in inline comment
  Add example of range comment in REST API documentation
Add missing @Nullabe for Account in SubmoduleOp

Account can be null which was causing a 'Guice provision errors' and
preventing the Merge operation from completing. Add @Nullable for
account parameter in constructor.

Change-Id: I17103ede239190840eaffdd8aaae0bb71de3609c
Fix NPE when submitting review with inline comments via REST

NPE occurs when submitting a review with inline comments in
the format:

  {
    "comments": {
      "test.txt": [
        {
          "line": 1,
          "message": "comment"
        },
      ]
    }
  }

The comma following the closing brace after the `"message": "comment"`
line seems to be causing an iterator with a null element to be
generated.

NPE does not occur when the comma is omitted.

To prevent the NPE remove the null element from the iterator.

Change-Id: I248739fce955522f7ee4a93441e48914342d3d7d
Fix NPE in /projects/{name}/children?recursive when a parent is missing

If there is a broken edge in the parent graph treat it as having no
children instead of throwing NPE and failing the REST API call.

Change-Id: Ib72f76f04f5804d2b953f0951d3304fc1d6329a2