Require the extensions static directory.

The manual server update checks now look for the extensions' static
directory along with the old legacy directory, and require it to be
writable by the web server before Review Board can load.

rb-site now creates this directory on install or upgrade. We still don't
set the permissions, but instead tell the user to do this (after
install).

We're also removing the direct Pipeline dependency, since Djblets
depends on this now.
Remove the GTK+ wizard for rb-site install.

This gets rid of the GTK+ wizard. Since we don't do much work on Linux
anymore, and most servers will be accessed over a shell, there's not a
lot of point in keeping this. It'll just stagnate and make development
harder.
Skip dimmed whitespace chunks in keyboard navigation.

When "Hide whitespace changes" is selected, changes to trailing whitespace are
shown as equal instead of a replace. Unfortunately, the next/previous keyboard
shortcuts were still stopping to highlight these chunks.

This change fixes up _getNextAnchor to take into account whether or not the
parent chunk of the anchor is dimmed or not.

Testing done:
Created a diff with some whitespace changes, hid those changes, and then
browsed around with the keyboard. Made sure that it worked as expected when the
changes were shown.

Fixes bug 3280.

Reviewed at https://reviews.reviewboard.org/r/5640/
Add ability to use email in Gitlab authentication

Older versions of Gitlab API v3 only allow authentication using email instead
of "login" parameter that Review board currently uses.

See https://github.com/gitlabhq/gitlabhq/commit/559e83d30004e0c41a30f4ce3463f695eb7e26a1

Testing Done:
Unit tests pass. Tested authentication with email againts different versions of
Gitlab.

Reviewed at https://reviews.reviewboard.org/r/5591/
Merge branch 'release-1.7.x' into release-2.0.x
The cache setting has been moved into a dictionary variable in django 1.3.

This change updates settings_local.py.tmpl to use CACHES instead of
CACHE_BACKEND.

Reviewed at https://reviews.reviewboard.org/r/5651/
Merge branch 'release-1.7.x' into release-2.0.x
Fix a typo.

s/parames/params/. Trivial fix.
Merge branch 'release-1.7.x' into release-2.0.x
Merge branch 'release-2.0.x'
Add AuthBackend.search_users() hook function

As discussed in review 5503, this adds an overrideable function that can be
used to replace the default user-search filter.

Testing Done:
All tests pass aside from a few VCS-dependent ones, which are skipped.

Reviewed at https://reviews.reviewboard.org/r/5635/
Fix unit tests to cope with extensions static media changes.

The changes to the location for extensions static media caused a huge number of
unit tests to break, due to the updates required checks. This change creates
both the current and legacy media directories as part of the test
initialization, and updates one test that checks the number of failing
updates checks to handle the fact that there are now two media directories that
get checked.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5658/
Make use of gravatars configurable.

When external internet access is blocked, using Review Board is annoying
because it tries to load gravatars, which can spin for a long time on every
page load, and show broken images. This change adds a setting for whether
gravatars should be used.

Testing done:
Looked at the page header, user infobox, and user page sidebar, and saw that
they all no longer contained broken images.

Fixes bug 3030.

Reviewed at https://reviews.reviewboard.org/r/5656/
Properly handle text attachment encodings for thumbnail generation.

Uploading a utf-16le encoded text file as an attachment would cause a
traceback, since it can't be coerced to unicode using the default encoding.
Since we have the mimetype, we can pull the encoding out of that, and decode
properly.

Testing done: Ran unit tests and tested uploading file through the web UI.

Fixes bug 3282.

Reviewed at https://reviews.reviewboard.org/r/5630/
Merge branch 'release-1.7.x' into release-2.0.x
Merge branch 'release-2.0.x'
SCM Web Hooks for reviewboard : Phase 1

Generate url infrastructure for hosting services so that they can be called to
access web hooks. Added repo_urlpatterns to the service base class. Modified
registration and unregistration of hosting services to add and remove
urlpatterns respectively.

Testing Done:
Wrote test case HostingServiceUrlPatternTests in hostingsvcs.tests.py. I've
tested the addition and deletion of url patterns during registration and
unregistration, respectively. Added tests for cases when the url_patterns are
not defined. Also tested adding bitbucket url patterns (see screenshot). All
tests have passed. :)

Reviewed at https://reviews.reviewboard.org/r/5510/
Add GitHub post-receive hook to close review requests automatically.

This is a GitHub post-receive hook that will automatically close review
requests as "submitted" after a push. To determine which review requests should
be closed, it scans through each commit's commit message for the following
strings (case-insensitive): "Reviewed at <reviewboard_url>/r/<id>" or "Review
request #<id>". The regex used for this can be overriden in settings_local.py.

Testing Done:
Added the post-receive webhook URL to a private GitHub repository, and tested
different pushes:
- Commit with a review request ID that is not submitted (verified that the
  review request is closed and set to submitted)
- Commit with a review request ID that is already submitted (got a warning that
  the review request is already submitted)
- Commit without a review request ID in the commit message (got a debug message
  that no matching review request ID was found)
- Commit with a private review request (verified that the review request is closed)
- Commits referencing the same review request ID
- Multiple commits
- Merge commits
- Branch creation and deletion
- Commits pushed to two branches

I also overrode the regex and flags in settings_local.py, and got the expected
change in matching review request IDs.

Reviewed at https://reviews.reviewboard.org/r/5596/
Add confirmation when discarding a review request.

This prompts the user for confirmation when discarding a review request through
Close -> Discarded, which will help prevent accidental discards.

Testing Done:
On a review request, I clicked Close -> Discarded, and got the confirmation
dialog. Clicking "Cancel" left the review request unchanged, and clicking "OK"
discarded the review request.

Bugs closed: 3117

Reviewed at https://reviews.reviewboard.org/r/5659/
Fix up a few webapi-lint errors.

The webapi-lint script had one unicode issue that was causing it to crash.
After I fixed that, I went through and fixed a handful of small issues that it
found.

Testing done:
* Ran webapi-lint
* Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/5662/