Change default comment visibility to expand all recent comments

Users had a hard time following change discussions, when all but the
most recent comment were collapsed on the change screen per
default. So we change the default to expand all comments that are not
older than a week.

Change-Id: Id2fc7c18e928331e66ac82c02d25b0483e1cd64f
Corrections in the 2.5.x release notes

Change-Id: I54ee73b3dac1abc2c8015534e182d2858485f052
Fix login servlets when canonicalWebUrl is not set

Each login servlet knows enough about the incoming request to be able
to not need the canonical web address for redirection purposes.  In
the case gerrit.canonicalWebUrl is not set, use the incoming request
to build up the URL.

This solution is a work-around for the fact that somewhere before 2.5
Colby broke the HttpServletRequest scope based version of the
@CanonicalWebUrl provider.  Because Guice cannot supply the request in
some contexts we pass the request into the provider as an argument.

Long term all of these authentication methods will be ejected into
their own plugins and it will be possible to revisit how this
configuration is handled.

Change-Id: I0e00b89020860a02b5d6ea77da5c784f5f0bb1b8
When issuing a 'Rebase' the committer will now be the logged in user

When doing a Rebase from UI, the committer will now be the user
that pressed the button. The preferred email address will be chosen
if the user has several registered with Gerrit. Previously Gerrit
was set as a committer, which caused confusion for our users.

Change-Id: I32c96c2f1c63eb9e3666cf5a6f46892b765f0686
Move patch script class to the server tree.

The PatchScriptFactory and PatchScriptBuilder were previously in the
httpd tree. Move them to the server tree so the implementation of the
revision diff REST API can share the logic.  Also, update
PatchScriptFactory to implement Callable instead of Handler, so
there is not a circular dependency.

Change-Id: Ic20fbf81a2da5ad5e2fd5c3542e6caa47df33cea
Fix refreshing PatchScreen when fileList has not yet been loaded

Although PatchScreen and PatchTable typically guard against using a
not yet loaded PatchTable, refreshing a PatchScreen and the subsequent
moving of the pointer lacked such guards. Thereby, a race condition
was introduced that lead to issue 1749.
We now added guards in both PatchScreen, and PatchTable.

Bug: issue 1749
Change-Id: I03ee3e80c198373ebecc50b1135b9c542d8ecfe7
(cherry picked from commit da5ceb4c9c73306b90be4349a4e7e106ab78e676)
Fix metaVar printing in REST API help usage

The metaVar used in @Option annotations was not being respected.
Use this value before asking the handler for its default value.

Change-Id: If0193983b9ebbb646ac325f28fefcb667b4f5bec
Fix BuckPrologCompiler to create Java 6 class files

Gerrit targets Java 6, not Java 7. If Buck is run under JDK 7
the javac compiler by default will assume -source 7 -target 7
and write incompatible class files.

Ensure the compiler builds for Java 6 language features and
Java 6 class format by passing the correct flags.

Change-Id: Ib2c013a6d1955d94b75cfd5d967d2f45ef4d5486
Replace the stock Jetty ErrorHandler with a vague response

Mirror the behavior of RestApiServlet. Anytime an exception is
caught by Jetty format back just "Internal server error" after
logging the exception to the server's error log.

Change-Id: I3b1dfdea45b833b5ffd0cd1731d24ecf7cd75eb1
Cache downloaded JAR files in ~/.gerritcodereview/buck-cache

Instead of caching downloaded files in `./buck-cache` in the
working folder, cache them in `.gerritcodereview/buck-cache` in
the user's home folder.

This offers two advantages:

- Cached files are not lost if the working folder is removed, or
  untracked files are removed with `git clean`.

- The same cached files can be shared between multiple working
  folders, i.e. if the developer has separate workspaces to work
  on different target branches.

Change-Id: I3e132df85c43431c2454421b1de0d9e901679540
Add Pydev project config file

Change-Id: Iae9fc76d56296e1f2aa9f3304c837be1fe99b98a
Add configuration file for PEP-8 checker tool

The PEP-8 checker tool (pep8.py) [1, 2] is used to check that Python
scripts follow the Style Guide for Python Code [3].

This change adds a configuration file for that tool.  The configuration
overrides the defaults for the following settings:

To make it easier to see what's wrong, enable:

  - Quote the lines on which violations are found
  - Quote the relevant section of the PEP-8 guideline

The maximum line length according to PEP-8 is 80 characters, but for
some reason the checker defaults to 79, therefore:

  - Set maximum line length to 80 characters

According to PEP-8, code should be indented at 4 characters, but the
Google Python Style Guide [4] says 2.  Code in Gerrit follows the
Google style, so:

  - Disable warnings "Indentation is not a multiple of four"

The configuration is invoked with the --config option when running
the check tool:

  $ pep8.py --config ./contrib/.pep8rc myfile.py

[1] https://github.com/jcrocholl/pep8
[2] https://pypi.python.org/pypi/pep8
[3] http://www.python.org/dev/peps/pep-0008/
[4] http://google-styleguide.googlecode.com/svn/trunk/pyguide.html

Change-Id: If02dd9e51cf3a6e0c0238e78bcfad1d7081de742
Add missing `/a/` in REST API testing example

In one of the examples of testing an authenticated REST API, the
URL did not include `/a/`.

Change-Id: I2ef3504fd9ca03155034910fc3892173a820e558
Include example of `DELETE` request in REST API test documentation

Change-Id: Iffd681a8d0b71ff2fe35c1d6240ba0b1acf61675
Show how to verify response headers in REST API test documentation

Change-Id: I2405fe8bdcbc352276296dcaeb8ed1c20e8fece3
Minor formatting fixes in the Buck documentation.

Add backticks around references to the `bin` directory
and `buck` executable.

Wrap a too-long line.

Change-Id: Ic3a59bffefdf03be299092743009e1e18c33b617
Add note about changes to the Eclipse .project file

If changes are made to the .project file, they will be overwritten
when `buck build eclipse` is run again.

This should be obvious, but I just got bitten by it.

Add a short note about this in the documentation.

Change-Id: Ib9ef8fa2c3b8b5dab49c89ea8d039bd4d18678aa
Move REST API test notes to a separate page

Create a new page "REST API Developers' Notes".  Move the REST API
test guide into it, and break it up into sections.

Later, the REST API design documentation can be added in this new
page.

Change-Id: I2bec508163b38ea36eef64c842ea708d3449faae
Merge "Replace the stock Jetty ErrorHandler with a vague response"
Merge "Fix BuckPrologCompiler to create Java 6 class files"