Disallow uploading diffs larger than 1 megabyte.

When diffs are particularly large, they can cause the server to spin at 100% CPU
for a very long time. This is normally not a problem (who changes that much code
at a time?), but parent diffs make it easier to hit.

This change fixes it pretty well for the upload forms on the web site.
post-review will also fail to upload, although the error message it prints out
is especially bad (it says that the diff file is empty).
Remove a trailing </p> in the change description HTML.

Some of the change description HTML had an extra </p>. Nothing
complained, but we shouldn't have it.
Fixed update notification popping up when it shouldn't.

There was a format mismatch with the template sending dates to
javascript, which compared it with a different date format and
thought there was a review update. Fixed this by sending the
datetime objects to javascript in ISO 8601 format, and wrapping
the dates in "localtime off" tags.

Also removed some unused imports.

Reviewed at http://reviews.reviewboard.org/r/3043/
Make opening an issue by default optional.

Users now have a setting in their profile for whether or not they'd like an
issue opened by default when making a review comment.

Reviewed at http://reviews.reviewboard.org/r/2828/.
Fix our media building setup.

Our media building worked okay with an existing development tree
(until recently -- will get to that in a second), but didn't work from a
fresh clone. Unfortunately, that broke our releases, as our release
script creates a fresh clone and builds from that.

The reason is that our media building would run ./manage.py collectstatic,
which required a settings_local.py file. That's dicey no matter what,
since we need certain settings to do this properly.

There's now a contrib/internal/build-media.py script, which sets us up
to use a specific settings_local.py file with the right settings and
paths. It can then safely build the media. Our setup.py script now calls
into this instead of directly running collectstatic.

Now, this basically works, except for the part where none of it does.
Django-Pipeline with Django 1.4 final has some problem with static
directories registered in STATICFILES_DIRS with prefixes ("rb",
"djblets", etc.). This is issue #95 on their bug tracker, and they have
a branch fixing the problem. As soon as that's released, we'll be able
to update to it and release 1.7 beta.
Fix some missing closing </a> tags.

A recent change for issue tracking introduced anchors (<a name="">)
without a closing </a>, which broke rendering of some of the contents.
This caused the link for the replier's name on the first reply to be
broken. Added the end tags.
Move public JavaScript functions into the RB namespace.

Pipeline now wraps all compressed JavaScript files in its own scope,
causing any functions defined within to be inaccessible outside the file
(such as to the <script> tags in the HTML). So now, we just stick these
in the RB namespace, like the API.

Down the road, we'll want to probably refactor these to be a bit more
object-oriented and better namespaced.
Change the FILE_RETRIEVAL_ERROR code to 221.

Two new API error codes were added to 1.6.x which conflict with the
newly introduced FILE_RETRIEVAL_ERROR. Change that to 221 in order to
resolve the conflict.
Merge branch 'release-1.6.x'
Fix a JavaScript include ordering issue.

This was left out of my previous change for JavaScript fixes.
Fix the admin static media location when installing/upgrading a site.

The admin static media location was using the old path for media files,
breaking the new admin UI. Update it to use the new static directory.
Fix the Review Board Activity admin widget with the new timestamp stuff.

The Review Board Activity widget was broken due to an assumption made
about the return type for the DateField on a given object. It was upset
that it wasn't getting a string on reviews.reviewboard.org, and was
instead getting a datetime.date. Now we cast to a string in order to get
the correct result.
Replace truncate_text with the built in filter.

Django 1.4 includes a new template filter for truncating characters. We
truncate some data for the admin views for certain models, which all
have redundant implementations. Now we can remove those from the models
and standardize on Django's filter, directly in the admin classes.

Column headers were also changed to reflect the contents.

Reviewed at http://reviews.reviewboard.org/r/3047/
Make rbApiCall publicly accessibly and rename to RB.apiCall.

rbApiCall was another function that needed exposure to other scripts.
Stick it in the RB namespace and rename to apiCall.
Make gReviewRequest and gCommentDlg public.

Two more variables that need to be public. These are simply made global,
instead of making them part of RB.
Add documentation for extension framework.

Reviewed at http://reviews.reviewboard.org/r/2950/.
Require Django Evolution 0.6.7+.

This version fixes an issue with apps that don't contain models. In our
case, pipeline.
Allow adding custom Django apps in settings_local.py

This makes it easy to add per-site additional Django applications, such as
custom auth processors. In order to add a new app, settings_local.py just has to
provide the variable RB_EXTRA_APPS.

Tested successfully with django-socialregistration.
RB_EXTRA_APPS = (
    'socialregistration',
    )

Ran unit tests.

Reviewed at http://reviews.reviewboard.org/r/2630/
Support getting GitHub API v2 tokens when configuring a repository.

GitHub is soon deprecating its older APIs in a switch to their v3 API.
As part of this, they have removed the API tokens from the accounts
page. However, they just today announced an API for getting these legacy
tokens.

This change adds a "Get your API token" button that prompts for a
password and then fetches the API token for the user and populates the
field.

With this, people should be able to set up new GitHub repositories
again.
Release Review Board 1.6.6.