Allow FileAttachment.file to store longer file paths.

FileField, by default, limits to 100 characters, which was barely enough
as it was. With the new change for prepending a hash, this was
suffocating.

We now set that max length to 512 characters. While that's far smaller
than the max path length of most file systems, it should be enough for
our use, and is far more than what users have had in the past.
Rename scmtools.crypto to scmtools.crypto_utils

On case-insensitive file systems, the import of 'Crypto' inside
scmtools.crypto will fail. This problem also appears when attempting to
run Review Board inside a Linux Virtual Machine, where the code has been
shared from a Mac OSX Host. Since the default OSX filesystem is
case-insensitive, case-preserving, the import will fail as well.

Reviewed at https://reviews.reviewboard.org/r/4483/
Fix expanding the top-most chunk of a file.

The logic for handling chunk expansion was doing a truthiness check on
chunk_index, instead of comparing it to None, preventing chunk 0 from
expanding properly. We now compare to None, like in all other cases.

Fixes bug #3026.
LDAP: Use fully qualified DN for authentication

Use the fully qualified DN with LDAP bind for user authentication. Currently a
DN built with the base DN and uid is used. This did not work on our company
LDAP server.

Testing done: Code running successful with our company LDAP server.

Fixes bugs 2836, 3069
Reviewed at https://reviews.reviewboard.org/r/4488/
Add a unit test for API get_list permissions checking (release-1.7.x)

This adds a unit test to verify that get_list checks permissions for parent
resources properly. The actual fix for this is in Djblets' WebAPIResource.

Testing done: Ran tests
Reviewed at https://reviews.reviewboard.org/r/4558/
Add team support for Bitbucket repositories.

The new Bitbucket hosting service rewrite, which brought along Git
support, only worked for personal acounts. It didn't support team
accounts.

Now, Bitbucket supports two types of plans: Personal, and Team.
This works much like the various plans for GitHub. Depending on the one
selected, we configure requests against the repositories differently.
For personal accounts, the repository owner name in the URL is the
username of the owner, For team accounts, it's the team name, which is
requeste during configuration.

This works with existing configurations. It's assumed that any Bitbucket
repository configuration without an explicit plan set is a personal
account.
Require the latest releases of Django 1.4.x and Djblets.
Don't show the static media collection output when running tests.

This output was useless to us, and just created noise and slowed down
the running of tests. Turn off verbosity for that step.
Release Review Board 1.7.14.
Turn off autocomplete for username/password fields in E-Mail Settings

When the username and password fields are set to blank and saved,
the fields are automatically filled by Chrome with the previous values,
indicating that the blank values are not saved successfully even though they
are. Turning off autocomplete for these fields avoids such confusion.

Testing done:
Manually tested updating username/password with both empty and
non-empty values.

Unit tests pass.

Fixes bug 2380.
Reviewed at https://reviews.reviewboard.org/r/4579/
Use the correct executable in setup.py

In setup.py, sys.executable contains the path of the current python interpreter
and one should use it when running a different script.

Testing done: On a system where the executable is /usr/bin/python2.
Reviewed at https://reviews.reviewboard.org/r/4633/
Fix the Watched Review Request resource with local sites, and add tests.

The GET handler for the Watched Review Request resource didn't accept
local IDs for review requests, causing it to be pretty useless there.
Now it takes the proper IDs.

Unit tests were added for this, and for all other missing cases.
Merge branch 'release-1.6.x' into release-1.7.x
Added support for authentication against Active Directory subdomains.

This patch enables authentication against specific AD subdomain extracted from
the username. E.g. for configured domain name "example.com" user "north\tom"
will be authenticated as "tom" against "north.example.com".

Testing done:
I have this running fine with multiple AD subdomains configured in my
organization.

Reviewed at https://reviews.reviewboard.org/r/2838/
Update the test suite names for ReviewRequestManager tests.

DbQueryTests had tests named after the old DB query functions we had way
back before introducing ReviewRequestManager. The names and docstrings
were old and outdated. This updates them for the appropriate names,
making it easier to see if they fail, and to introduce new tests.
Merge branch 'release-1.6.x' into release-1.7.x
Backport the new testing app.

This transitions the new testing app on master to older releases. This
contains utilities for making it easier to write new unit tests without
the need of slow-to-load fixtures, and adds fixture caching.
Filter inaccessible private review requests from queries.

Review requests that were not private to a user would still show up in
the All Review Requests page and in the /api/review-requests/ API. The
query function wasn't taking into account what should have been visible.

Now, ReviewRequest.objects.public() filters out such review requests if
the user cannot see them.

Many unit tests were added to test for these various combinations.
Prevent access to unjoined groups in the dashboard.

In the dashboard, it's possible to construct a URL to show review
requests for groups that you haven't joined. While normally harmless,
this is problematic for private groups, which should not be accessible.

Now, the only valid groups are those that the user is a member of.
All others will result in a 404.
Backport the new testing app.

This transitions the new testing app on master to older releases. This
contains utilities for making it easier to write new unit tests without
the need of slow-to-load fixtures, and adds fixture caching.