Add additional validation to bug tracker URLs

When specifying a custom bug tracker URL, the URL is passed through additional
validation to ensure that there is a '%s' string formatting element.

Tested on local development server against custom urls and a new GitHub
repository's issue tracker. Added unit test for validator.

Fixes issue 1996
Reviewed at http://reviews.reviewboard.org/r/3378/
Fix svn keywords not being correctly collapsed

Diffs were being created for files where the area surrounding keywords had
changed, and the keywords were not being collapsed.  This was happening for two
reasons:
* It couldn't understand paths with two leading slashes
* `svn propget svn:keywords` can return strings with non-space delimiters

Using reviewboard 1.5.5 on a Windows 7 server using Apache+mod_wsgi running on
python 2.7 with subversion 1.6.15 (if that matters)

Fixes issue 2134
Reviewed at http://reviews.reviewboard.org/r/2441/
Add  filter in FileDiffCommentResource to select diff comments that match only one file id

Adding filter to FillDiffCommentResource to only fetch comments for requested
file, and not an entire list of comments for every file in a given diffset.

Manual testing: following the steps described in the issue will no longer
produce the issue. Checked that this did not affect alternate method for
fetching diff comments (ie fetching specific comments for a given diffset)

Fixes bug 2327.
Reviewed at http://reviews.reviewboard.org/r/3377/
Add a missing file

I forgot to add this file for b64dd03 (I being David Trowbridge). Whoops.
Fix webapi list of review requests when using ?shipit=0

When accessing the /api/review-requests resource with a shipit=0 parameter, it
would return the wrong results (often returning review requests that did have
reviews with ship-its). This code was initially written to do a join with the
reviews table and query the shipit parameter of that model, which was checking
whether *all* of the associated review requests didn't have ship-its (which
wasn't completely incorrect but not what a user really wants when passing
shipit=0).

To fix this, instead of excluding review requests with reviews that have ship
its, I've changed it to add a test for the shipit_count field on the
ReviewRequest model. I've also updated the unit tests for this API to use the
same query to test against.

While updating the unit tests, I discovered a couple issues. All of the
shipit_count fields in the fixtures were zero, despite there being the presence
of some reviews with a ship-it. I've updated the test_reviewrequests fixture to
fix this issue. I also had to add the test_site fixture to the
test_get_reviewrequests_with_ship_it_* tests in order for the data to be valid.

Fixes issue 2635.
Reviewed at http://reviews.reviewboard.org/r/3371/
Add all new contributors in 1.6.13.
Catch first file patch failed exception.

Catch exception when first file diff fails to apply. This makes the view diff
display the "Diff currently unavailable" error message instead of just throwing
out the traceback onto screen.

Tested on local 1.7 beta 3 (dev) server.
Reviewed at http://reviews.reviewboard.org/r/3324/
Fix a bug with linkify js globbing parentheses

This further fixes the bug with regards to linkifying text. Now, URLs with
anchors (open and close parens, with or without text in between them) work
properly. This fix doesn't affect the behaviour observed with url wrapped in
parens.

Testing done:
Self tested on own environment with different types of urls
- blah blah (http://www.foo.com/)
- http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html#clone()
- http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)
- gwegdss http://www.foo.com/

Fixes bug 2002
Reviewed at http://reviews.reviewboard.org/r/3374/
Fix diff headers in e-mails.

The e-mails weren't updated for the new diff header data, causing the
e-mails to show json blocks instead of header text.

We now use the same logic that we use in the diff renderer template.
Fix alt text for many tags in the Dashboard.

The Dashboard columns were rendering HTML with localized strings being
fed in. These strings used ugettext_lazy, which, when inserted into a
plain string, will basically show a repr() instead of the string
contents.

We now mark these all as unicode strings, which fixes the problem.

Fixes bug #2747
Consolidate and fix the expand diff links.

There's now a couple template tags for rendering the diff links in a
simpler way. This ends up going through a single utility template to
render each link.

As part of this, we now have a smarter place to handle the diff headers.
We no longer show expansion links next to headers showing
functions/classes that are not contained within that collapsed region.
The headers are still shown, but you can't expand.
Add release notes for 1.6.13.
Merge branch 'release-1.6.x'
Release Review Board 1.6.13.
Bump to 1.6.14 dev.
Provide a model/view separation for comment blocks.

Comment blocks on a screenshot have been reworked into a model/view
setup, and are now designed to be reused outside of screenshot
commenting. This makes use of Backbone.js to define the model and view.

We now have an AbstractCommentBlock model that keeps track of serialized
comments coming from the page, as well as any draft comment being made,
and the total count of comments.

There's a ScreenshotCommentBlock that knows how to store coordinate
information and create ScreenshotComments.

And finally, a ScreenshotCommentBlockView that knows how to render this
to the screen.

The code is not ideal yet, largely because we're still working with
lots of older code, so we can't use such constructs as Backbone
collections. In time, these models will be cleaned up a bit.
Fix incremental diff expansion on master.

Recent changes merged in for incremental diff expansion from
release-1.6.x needed some work.

First, the MEDIA_SERIAL/MEDIA_URL variables were removed from the diff
expand link context. This was needed for 1.6.x, but not for master, and
in fact won't work there. We no longer pass this in for the context to
that template.

Second, calls to expandChunk have been renamed to RB.expandChunk.
Fix the diff viewer to handle very large files.

Previously, very large files (10,000+ lines) would greatly slow down
Review Board and take forever to render. This slowdown was entirely in
the rendering step, rather than being in the diffing or patching steps.

The reason for the slowdown is that we executed a fragment of a Django
template (consisting of variable resolution, template tags, and filters)
per line of the diff.

This, it turns out, is very slow. Variable lookups (and possible
escaping) is slow. Template tag and filter execution is slow. Copying of
contexts is slow. To make matters worse, the context we supply for diffs
contains data that can be quite large (chunk, file of chunks, etc.),
which ends up getting copied a bunch for different tags. While we may
want to audit this for other templates, fixing it for the diff lines
is still slow due to how templates are processed.

So what we're now doing is defining printf-style templates for the lines
(and conditional parts of lines), processing some data in code, and then
piecing them together for output.

This creates a massive speedup. a 44,000 line change I tested with took
around a minute to render before, bringing the server to its knees at
the same time. Now, the total render time for the page (including all
the rest of the diff viewer page) is now only a few seconds.
Merge branch 'release-1.6.x'