Added nice styling of diffs in the FileDiff admin UI.

The FileDiff admin UI previously just showed diffs with no whitespace
preservation, which was useless. We now style it with Pygments, which is
nicer to look at.
Include repo name in review request emails

For Issue 2483. The review request email notification template was altered to
include the repository name along with the review group. This was requested
since it would be useful for groups with multiple repositories.

The template was altered so that if a repository is associated with the review
request, then the name will appear in parentheses after the review group. If no
repository was included, then nothing new will appear.

Testing done:
I set up emails to be sent through gmail smtp on my local test server and also
created a repository to test with. I then created two review requests, one with
the test repo and one with no repo.

The emails for the test repo review request sent emails saying 'Review Request
for Katkat (TestRepo) ' and the emails for the review request with no repo sent
emails saying 'Review Request for Katkat'. This was the expected result.

Fixes bug 2483.
Reviewed at http://reviews.reviewboard.org/r/3768/
Fix not working 'Hide Whitespace changes' toggle.

The 'Hide Whitespace changes' toggle does not work on multiple browsers:
Chrome/Firefox/Opera.

Clicking the toggle for a diff with whitespace changes should dim references to
the whitespace changes and stop highlighting the changes. Instead the button
does nothing and a javascript error is thrown: Uncaught Error: Syntax error,
unrecognized expression: ol.index a[href=#5.2]

Testing done:
Uploaded a diff with whitespace changes and modified the jquery selector for the
changes references inside Chrome's developer tool.

Fixes bug 2885.
Reviewed at http://reviews.reviewboard.org/r/3832/
Brand new user sees "None" for all dashboard counts in a local site.

Fix the Starred Public Review Count for new user

The CounterField initializer for starred_public_request_count was calculating
the count as 0 if the pk of that table was not null. The parantheses for this
calculation was not setup properly , which caused the value to be setup as None
for the first time user.

Also fixed a test which was assuming that the first time user will see None for
the counts. With this and the associated djblets fix, this isnt true anymore.
This fixes the reviewboard side of things and is associated to the review
request 3841 (which is a djblets fix).

Testing done: Manual testing with localsites and regular ones. Ran all
reviewboard tests.

Fixes bug 2873.
Reviewed at http://reviews.reviewboard.org/r/3842/
Search box: Jump to Users/reviewrequests does not work in 1.7

Clicking on the auto-completed search results does not take the user to
review-request/user/group. This seems to have been changed in commit 937d9c0
(https://github.com/rajasaur/reviewboard/commit/937d9c098f21e3619691e8d63726b41aea4809aa)
to avoid collision with jquery ui's version but seems to have
removed this logic.

Ive added the logic that takes the user to the page when its clicked from the
Search box. In addition, Ive also set the default value of "clickToURL" to
false so that other autocompletes like the ones in review page (for user/group)
dont automatically take the user to that page when clicked.

What still doesnt work:
1. Just clicking on "enter" key on auto-completed results doesnt take the user
to the result page. It only fills in the Search box. But I suppose thats another
issue (bug 2779).

Testing done:
1. Tested in Search page by entering review-request/users and made sure it goes
   to the correct page
2. Verified in the Review request page that selecting a user/group does not open
   a new page but instead places the users in the required textfield.

Reviewed at http://reviews.reviewboard.org/r/3835/
Fixes bug 2842.
Put a clickable overlay on top of file attachment thumbnails.

File attachment thumbnails can theoretically include HTML with links (for
example, markdown or restructured text types). In these cases, wrapping the
thumbnail in a big <a> tag isn't sufficient to make sure everything links to the
review UI. This change puts a new block element on top of the thumbnail contents
for users to click on.

Testing done:
Uploaded a variety of file attachments, through both drag-and-drop and the
upload dialog. Checked that the overlay was clickable and covered any links
present in the thumbnail element.

Reviewed at http://reviews.reviewboard.org/r/3844/
Require pytz at least version 2012h

Older versions of pytz don't include "US/Pacific", which means our default
breaks. Require at least 2012h.

Testing done: Ran setup.py develop and saw that it pulled in 2012j.

Fixes bug 2874.
Always allow users to access their own review requests.

In cases where a user assigned a review request to a private group of which they
were not a member, they'd lose access to their own request. This was pretty bad.
I've added an explicit check for ownership to ensure that users always have
access to their own review requests.

Testing done:
Created a review as a non-admin user and assigned it to a private review group.
Saw that I could no longer access it. Applied this change and reloaded, and saw
that I could see it again. New unit test fails before the change and succeeds
after.

Fixes bug 2446.
Reviewed at http://reviews.reviewboard.org/r/3845/
Require a django-pipeline 1.2.x release.

django-pipeline 1.3 dropped support for Python 2.5 and, for reasons we
haven't yet identified, broke production installs. We now require a
1.2.x release (1.2.24 being the new minimum).
Release Review Board 1.7.5.
Merge branch 'release-1.7.x'
Update the docs database for webapi payload examples.
Update the docs database for webapi payload examples.
Merge branch 'release-1.7.x'
Add documentation on how to install RBTools for MacOS X.

This mostly covers the fact that Python and easy_install should already
be on your system, but goes into some detail on how to install
Setuptools if it's not already there. This helps with the confusion over
seeing equivalent instructions for Windows/Linux but not MacOS X.
Fix the import path for the release notes docs.

The import path, when generating docs on the server, was incorrect. We
had a local patch on the server that handled this, but it's best to move
it here.
Merge branch 'release-1.7.x'
Add ticket-based authentication for perforce.

People running perforce these days are encouraged to use ticket-based
authentication, which dramatically improves security (it actually forces users
to authenticate, and uses per-host tickets that can be expired).

We've been putting this off for a long time, and it turns out that it's not so
bad these days. I was mostly worried because our PerforceClient used p4api for
most tasks but manually invoked 'p4 print' to actually get the file contents,
which meant that we'd have to have two different login implementations. Some
testing reveals that since perforce revamped the python bindings, they fixed it
so run_print actually returns usable data.

Whether we want to use ticket-based authentication gets stored into the
extra_data dictionary, so we don't have to have any migrations.

Testing done:
Verified that the field was shown and hidden at the right times, and that data
was correctly persisted into the database.

Set up a local perforce server that required password authentication. Verified
that diffs still displayed correctly (to test the run_print() change).

Set the "security" setting to "3" on the server, which enforces ticket
authentication, and verified that local p4 clients all required ticket
authentication. Set use_ticket_auth in the admin UI and cleared my cache, then
reloaded the diff successfully.

Fixes bug 1623.
Reviewed at http://reviews.reviewboard.org/r/3850/
Provide a Admin UI setting to change Log Levels

Allow Logging level to be setup in Admin UI

Currently, the logging level can only be setup only in settings_local.py which
makes it difficult to change the value.

Added a new field called logging_level in Admin->Logging that allows the user to
select a log level. Grouped the field under the general "Logging Settings".

This patch goes along with the Djblets change at #3851
(http://reviews.reviewboard.org/r/3851/)

Testing done:
Verified in fresh setup (devserver) where it defaults to the DEBUG level.  Since
this only gets stored in siteconfig_siteconfiguration table, shouldn't need any
migration changes. Changed the level manually in the UI and verified that DEBUG
messages dont appear anymore.

Also the Filter in Admin->Server Log shows only the LogLevel selected and
anything above it. For e.g. if the logging is set to ERROR, the filters in
Server Log only show Error, Critical and ALL.

Fixes bug 1859.
Reviewed at http://reviews.reviewboard.org/r/3852/
FedoraHosted: Correct the URL for plain files

The URL was not pointing to the raw files, but instead to an HTML representation
of them. With this patch, they correctly point to the raw files.

Testing done:
Created a new FedoraHosted repository and verified that patches could be
applied.

Fixes bug 2897.
Reviewed at http://reviews.reviewboard.org/r/3853/