Normalize paths for display in reviews and notifications.

This makes reviews for Clear Case contain readable filenames.

Tested on team Review Board 1.6.11 installation.
Reviewed at http://reviews.reviewboard.org/r/3302/
Don't allow all users to see a user's unpublished review replies.

Only put public reviews and non-public reviews created by the authenticated
user in the reviews_id_map, so that unpublished replies are not seen by other
users.

1. Created a review request as user A and published it.
2. As user B, made a comment on a portion of the diff and publish it.
3. As user C, replied to the comment made in step 2 but did NOT publish it.
4. Without the patch, all users could see the comment made in step 3.  With the
patch, only user C could see that comment.

Fixes bugs 2710 and 2719
Reviewed at http://reviews.reviewboard.org/r/3317/
Fix ClearCase unextend_path() on Windows.

The ntpath in Python behaves in the following manner:
  >>> ntpath.join('c:', 'dir', 'file')
  'c:dir\\file'

  >>> os.chdir('C:\\Windows')
  >>> ntpath.realpath(ntpath.join('C:', 'dir', 'file'))
  'C:\\Windows\\dir\\file'

  >>> os.chdir('C:\\Windows')
  >>> ntpath.realpath(ntpath.join('C:\\', 'dir', 'file'))
  'C:\\dir\\file'

  >>> ntpath.realpath(ntpath.join('/', 'computer', 'share', 'file'))
  'C:\\computer\\share\file'

  >>> ntpath.realpath(ntpath.join('\\\\', 'computer', 'share', 'file'))
  '\\\\computer\\share\\file'

The unextended_chunks[0] in case of repository on local drive is 'X:' where X
is the drive letter, and in case of UNC path is '/'. Change the
unextended_chunks[0] so the returned realpath is correct.

This both makes the displayed path proper and resolves the "ValueError: Cannot
mix UNC and non-UNC paths" when Clear Case repository is configured with UNC
path.

Tested on production 1.6.11 installation.

Reviewed at http://reviews.reviewboard.org/r/3321/
Fix ClearCase relpath on Windows.

ntpath.relpath() overflows and throws TypeError for paths containing atleast 520
characters (not that hard to encounter in UCM repository). Handle this problem
by falling back to the "approximation method".

Tested on Windows ReviewBoard 1.6.11 installation.

Reviewed at http://reviews.reviewboard.org/r/3323/
Add support for incremental diff expansion.

Review Board has always had the ability to let users expand collapsed
chunks of diffs, but this can produce a lot of content when dealing with
large sections of collapsed code.

This feature introduces incremental expansion. Users can expand the
diffs by 20 lines at a time, before or after the collapsed header. They
can also expand up to the nearest function listed, and of course, can
expand te entire header.

When a diff is expanded, even partially, little floating collapse
buttons will appear near the center column. They'll stay in view,
centered amongst the visible portion of the expanded region. Clicking
them will re-collapse that segment.

This feature was sponsored by NetApp, Inc.

Fixes bugs 342, 603, and 1231.
Add support for ClearCase snapshot views.

This is especially useful for Windows installations due to the pathname
limitation.

Tested on Windows ReviewBoard 1.6.11 installation.
Did some basic tests on Linux.

Reviewed at http://reviews.reviewboard.org/r/3322/
Replace the Report Bug and Bugs links with Support.

The Report Bug and Bugs links in the top header bar have been replaced
with a link to our Support page. This should provide a better support
mechanism for our users, who sometimes will file bugs for support or
file bugs thinking it's for their own product, and get them to better
content right away.
Fix linking to bug numbers when they contain "#".

Bug numbers, when prefixed with "#", included the "#" as part of the bug
URL. This is now stripped.

Fixes bug #2449
Fix Git diffs with deleted binary files.

Deleted binary files in git diffs was causing parsing problems. We'd
skip over the entry entirely, so it would never show up in the diff
viewer, and it seems the file info was ending up in another file's diff.

The parsing has changed to not bail so early with empty (no-data)
changes. Really, this code could all use a rewrite, but this seems to
work pretty well for now.

Fixes bug #2419
Fix preserving extra headers and data in diffs.

A long-standing bug in our diffs, which especially affects Git users, is
that our diff parser would lose information before the diffs and even
lose some within the diffs.

Diffs formatted with 'git format-patch' contained headers on the
author, description, diffstats, and more, prior to the first
'diff --git' line. We just ignored this, meaning that users who then
tried to get their patch out of Review Board would find it all missing.

That has been changed in both the standard diff parser and Git's pretty
custom parser. We now store this "preamble" and make sure the first file
contains it at the beginning of its payload.

We also no longer hide the "Binary files have changed" part of a Git
diff, which was accidentally being left out.

As part of this, we're no longer trying so hard to remove stuff we're
afraid patch can't handle. patch can handle a lot of things, so we're
just going to include it all. The thought being that if some tool is
generating content in a diff, at some point they'd have to have tested
that with patch. If it turns out something breaks as a result of this,
we can incrementally bring back filtering.

Unit tests have been updated for this change, as many of them were
expecting not to see certain things, or for smaller payloads. A new unit
test testing all the headers in a standard git format-patch has also
been added.

Fixes bug #929
Fix a regression with rendering comment fragments.

The recent incremental expansion work introduced an occasional breakage
with diff comment fragments. The code wasn't updated for the new
headers, and sometimes broke, depending on what was in them.
Improve the usability of the incremental expansion feature.

Every expansion link (icon and text) now has a tooltip saying what will
happen when clicked.

The expansion icons on the left now show how many lines they'll expand,
and at the same time they give a wider hit box. The tooltip says that
they'll expand 20 lines above or below, depending on the icon.
Don't perform syntax highlighting for very large files.

It's very expensive to perform syntax highlighting on very large files.
Especially certain file types, like XML files, which can take minutes
and actually fail to return within the browser timeout.

We now only highlight if the file is under 200KB.
Fix parsing of SVN diffs with property changes.

SVN diffs with property changes broke diff parsing. We now handle this
properly. We don't show the changes in the diff viewer, but we at least
don't fail miserably now.

Property changes in diffs have only recently gained any kind of
parseable format, it appears, but more work needs to be done to look
into whether we can make any of use it.

Fixes bug #2359
Require Djblets 0.6.23.
Fix some pyflakes errors.

The Clear Case support referenced the wrong variable when raising a
FileNotFoundError and trying to specify a filename.

The new diff expansion code had some unused variables.
Use the current python in the path to run sphinx-build.

sphinx-build hard-codes a certain path to python, neaning it can't be
run from a virtualenv correctly. We now run python `which sphinx-build`
instead.
Add release notes for 1.6.12.
Ship a copyright header with jQuery-UI.

This file didn't come with a copyright header, but it has been requested
by a Debian packager. Include it so it's clear it's not from us.
Release Review Board 1.6.12.