Add better support for copied files in Git diffs.

We introduced support for moved files a while back, but copied files
were never properly supported. Copied files with 100% similarity would
flat-out break.

This change introduces support for parsing the copied file info from git
diffs, storing this state in the database, and showing it in the diff
viewer (just like we show moved files). It doesn't require any schema
modifications in the database.
Add better support for copied files in Git diffs.

We introduced support for moved files a while back, but copied files
were never properly supported. Copied files with 100% similarity would
flat-out break.

This change introduces support for parsing the copied file info from git
diffs, storing this state in the database, and showing it in the diff
viewer (just like we show moved files). It doesn't require any schema
modifications in the database.

This is the version for 1.7.x. A separate change will be made for 2.0,
since the code has changed enough since than to warrant some slightly
different changes.
Merge branch 'release-1.7.x' into release-2.0.x
Don't show move flags when changing whitespace on a line.

Whitespace-only changes on a line would result in a replace chunk that
could trigger move detection. This happened because we strip lines
before calculating moved lines, and didn't check that the same line was
modified, resulting in the line matching itself.

We now compare the offsets into the chunk to make sure that matched
lines aren't in the same location within the chunk. By this point, we
already know the content is matched after being stripped, so an offset
change should be sufficient to prevent this problem from occurring.
Improve indentation support when converting some tabs to spaces.

A diff was found where a line with 3 tabs was unindented 1 tab, had
1 tab removed, and had the last tab replaced with spaces. This caused
the unindentation to show 3 tabs removed, which was wrong.

To fix this, we have to have a little more state. We needed to know not
only the raw number of indentation characters that changed, but also the
normalized (tabs to spaces) difference in indentation between the lines.

With this information, the serializers could figure out when we've
actually hit the number of indentation normalized to spaces, in order to
stop processing the string. They then needed to be modified to return
the remaining portion along with the serialized version.

After this change, a more complex indentation change like
"\t\t\t" to "\t<8 spaces>" will show the right thing.
Merge branch 'release-2.0.x'
Fix the styling for the e-mail address field on the Register page.

Django 1.6 makes use of the new "email" input type for e-mail addresses,
which breaks the styling on the Register page. This is a trivial fix to
include that type alongside "text" and "password" types for our styling.
Rename the release note *.txt files to *.rst.

In order to provide better compatibility between the release-1.7.x
branches and release-2.0.x/master, this change renames all the *.txt
files in docs/releasenotes/ to *.rst.
Fix an XSS vulnerability in the search results.

Users with full names containing HTML would result in that HTML being
processed by the browser when auto-completing them in the Search field
at the top of any page. This could result in a script in the First or
Last Name fields being executed.

This change fixes the formatItem call to properly escape.

This vulnerability was made public by the reporter both publicly on the
issue tracker (+ mailing list), and on reviews.reviewboard.org. We're
going to cut a new release including this fix quickly as a result.
Release Review Board 1.7.22.
Merge branch 'release-1.7.x' into release-2.0.x
Merge branch 'release-2.0.x'
Bump to 1.7.23 dev.
Add CSRF protection to all POSTable views in Review Board.

All views in Review Board that handle HTTP POST requests are now
decorated with a @csrf_protect decorator, and have matching
{% csrf_token %} tags in the templates. This adds a layer of protection
we didn't have before.

Like the Djblets change, this doesn't affect the API, but does handle
all the user-facing and admin-facing views that accept HTTP POST.
Allow posting multiple review requests with the same commit ID.

POSTing a new review request isn't supposed to attempt to create or
update from a commit ID unless create_from_commit_id is passed in the
request. We weren't checking this flag, though, before looking up an
existing review request with that commit ID. This triggered a
ChangeNumberInUseError, which ended up confusing RBTools.

We no longer make this check unless being told to create or update from
the commit ID.
Clean up PyFlakes warnings in 1.7.

In order to keep things clean, I've gone through the PyFlakes warnings
found in 1.7 and fixed them up. These fixes match the fixes done in
2.0, and shouldn't be too painful to merge.
Fix the default URL imports in generated extensions.

Generated extensions were importing from 'django.conf.urls.defaults',
which is the old location. Now they import from 'django.conf.urls'.
Fix the MySQL docs for max_allowed_packet.

The old docs were not only styled wrong, but were also only showing how
to set the per-session max allowed packet size. This updates the docs to
show where to set this permanently, and to also discuss setting it just
for the session (switching the example to using mysqldump).
Merge branch 'release-1.7.x' into release-2.0.x
Add some logging and better strings to the reviews models.

This ports over some of the RBCommons changes made to the reviews
models.

In DefaultReviewer, "target people" has been changed to "target users."

In Group, invite_only now has help text.

There's also some logging for access control for ReviewRequest and
Group, which can be helpful in spotting users trying to get to things
they're not allowed to get to.