Support to get a revision as formatted git patch via REST

Bug: issue 302
Change-Id: Iccdb5990683ad911259a79e977ec4c057078e4e1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Add refs/for/<branch>%submit to auto-merge during push

Teams that want to use Gerrit's submit strategies to handle contention
on busy branches can use %submit to create a change and have it
immediately submitted, if the caller has Submit permission on
refs/for/<ref>. If the merge fails the change stays open.

Change-Id: I98bcefb51ea5363b011e3e57f89f567b73e16103
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
TrivialRebase: Aggregate approvals

Change-Id: I5c07e5e9b879dc3fc0ebbe2b2179f68ff5e763d3
Add LDAP Groups section to docs

Change-Id: I5dbcbfe1102f6ed7e003acbbebf83c23c35cfa41
Introduce StreamEvents capability

This change introduces new global capability for streaming
Gerrit events.

Only admins and users with this capability are able to run
gerrit stream-events.

Change-Id: I0a8a110758b0ac43969e5b8ae799b9b89db318e2
Signed-off-by: Ed Bartosh <bartosh@gmail.com>
Signed-off-by: Alexander Kanevskiy <kad@blackcatlinux.com>
Show filter field on project/group list screen before populating the list

If there are many projects/groups the initial loading of the
project/group list screen may take a long time. Display the filter
field immediately so that the user can already type a filter while
waiting for the list to be populated. Typing a filter and thus limiting
the result may be even be faster then waiting for the list to be
populated with all projects/groups.

Change-Id: I6f0c367d53e949a9b541fd00750f94b88ab645db
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Fix parameter checking on ls-projects command

The command `ls-projects -t` always fails with the error:

  Fatal: --tree and --show-branch options are not compatible.

This is because when there are no --show-branch options passed, the
call to `getShowBranch` still returns an empty list, which causes
`getShowBranch() != null` to be true, and results in the error condition.

Update the condition to first check if the list is null, and then if
it's empty.

The error only needs to be emitted if the list is not null and not
empty.

Change-Id: Ia4db17adaa814328da6eb88874088bbe3b6acbe6
Update Eclipse prefs for gwtexpui to use Google code formatter

Change-Id: I6a38e380428159c766e7c62c1334cf0ed0773945
Clearer error message when Change-Id line not found

Improve the error message that is reported when a Change-Id
line is found in the commit message, but not in the footer.

Now the error message makes it clearer that the Change-Id is
expected to be found in last paragraph.

Also updated the documentation with the same clarification,
and added a cross-reference link to the Signed-Off-By page.

Change-Id: I0a8329edb89aea32f02ba285d292652bf6c0ee55
Merge branch 'stable-2.6'

* stable-2.6:
  Clearer error message when Change-Id line not found
  Fix parameter checking on ls-projects command
  Add LDAP Groups section to docs

Change-Id: I38b1979a72d7327bfb41cc0a676123c4a238c330
Highlight patch sets that have drafts

On the change screen, if a patch set has a draft comment, its header will
be highlighted.

Bug: Issue 667
Change-Id: I537db90a940c9df7c4b7c28974adac5b29c8abf4
Add gitweb.linkDrafts to control if gitweb links are shown on drafts

If gitweb is hosted on a second server and only public references
are replicated, links to draft patch sets in the panel don't go
anywhere useful.

Default behavior remains the same, to provide links on all patch sets,
regardless of draft status.

Change-Id: Ia26f08b4fd4e480a89b84ff5602603c3fcc8eee6
Document Apache needs AllowEncodedSlashes NoDecode

When passing REST API URLs through to Gerrit Apache must
not decode %2F as /.

Change-Id: I3795bcba8505545aaa0d157d73c6e788b11a48d3
Merge branch 'stable-2.6'

* stable-2.6:
  Document Apache needs AllowEncodedSlashes NoDecode
Merge "Highlight patch sets that have drafts"
Merge "Add gitweb.linkDrafts to control if gitweb links are shown on drafts"
Fix display of account name when name consists only of spaces

If a user's account name consists only of spaces, the change list
displays the name as blank instead of using the Anonymous Coward
name.

This is because the the Anonymous Coward name is only used when
the name is null, rather than an empty string or string of spaces.

Fix it by also checking if the trimmed name string is empty.

Also prevent account names from being set to a string of spaces
by trimming the user entered string before saving.  This will
ensure that such "empty" names will be set to null on save.

Bug: Issue 1795
Change-Id: I690a23c4dfdd1138f5e8ca034bd91ab38f511caf
Distinguish between error and timeout in intraline diff error message

When the intraline diff fails, the error message simply says that
there was a server error.  It could be that the reason for failure
is a timeout, but it's not possible to know this from the error
message.

Add a new error message that is displayed when the intraline diff
fails due to timeout.

Also update the documentation to mention that an error message is
displayed if the intraline diff times out.

Change-Id: I93410d853aadc7ed1f6e4324d0578c4bcbe4e195
Don't load all draft comments to check if at least one exists.

This is a minor optimization of the check for presence of at least
one draft comment in a patch set.

Change-Id: I35bf2c5474e27464bf9dea2fb382bf8379b195af
Fix sample reverse proxy configuration for Apache

Apache (at least version 2.2.22) chokes on AllowEncodedSlashes being
used in a <Location /> by stating

  AllowEncodedSlashes not allowed here

. Even if that would have been allowed, ProxyPass would encode encoded
forward slashes once again, so '%252F' would arrive at Gerrit instead
of '%2F', rendering the requests invalid.

We now:
* set AllowEncodedSlashes at the correct level in the configuration file
* switch to mod_rewrite, do get proper handling of escaped slashes
* remove now unused Proxy settings
* add a warning against allowing Apache to pass escaped characters

Change-Id: I5c4b96d3cbc1b37234066f80713d33c336989b40