Properly serialize revisions in Diff upload API errors.

When a file couldn't be found in the repository during a diff upload
using the API, an error with the filename and revision would be
returned. If the revision was HEAD or PRE-CREATION, this would fail, due
to the JSON encoder being unable to serialize that sort of object.

Now we call unicode() on the revision to ensure it's always serialized
properly.
Fixed support for hg git diffs with spaces in path

Previously when HgDiffParser encountered a git format diff it parsed
the header by using spaces as a delimiter.  This falls apart when
passing in a diff to a file with spaces in it's path.

This commit updates the code to parse out the filenames using a regular
expression using the a/ and b/ prefixes of the before & after
filenames to mark the start of the filenames.

I've also updated the tests to check parsing of a git diff as generated
by the mercurial reviewboard extension.

Reviewed at http://reviews.reviewboard.org/r/3258/
Begin moving to a new site style.

This is a refinement on the style we've had for years. The largish
page header and navigation bar have been slimmed down to a sleek two row
navigation bar at the top of the page, giving lots of room for the rest
of the page.

The search bar has moved to the top, beside the new account and support
dropdowns. The account dropdown links to preferences, log out, and the
administration UI (for admins). The support dropdown links to docs and
the bug reports.

There's also some style tweaks to the dashboard to tidy it up just a
little bit. These changes are more subtle.
Give the review request action bar a whole row, and lighten the colors.

The review request action bar no longer shares a row with the summary
line. The colors are less subtle, and the background removed. It blends
in a bit better now with the review request box.
Standardize definitions for some CSS properties.

This replaces some browser-specific CSS properties with lesscss macros
we have, and adds some definitions for some colors we use throughout the
CSS.
Add some subtle rounding and shadows to certain boxes.

This changes some of the core boxes to be slightly rounded and to have
very subtle shadows. It doesn't look overused, and adds a nice cuteness
to the UI.
Standardize the action bar color, and right-align it.

This removes the visual distinction between primary and secondary
actions. There's not much reason to really color these differently.
There's now a nice, seamless look across all actions.

The action bar has also been right-aligned, in order to match 1.6.x a
bit closer, so that muscle memory doesn't become an issue. In
particular, we want "View Diff" to be in the same location.
Fix the headbar menu z-order and Ship It border radius.

The headbar menu no longer sits below other UI elements.

The Ship It border is now rounded, rather than making the review box
have a sharp corner.
Tweak and update the admin UI style.

The admin UI style has been updated to match the new Review Board UI
style. It has the new header bar (though in a yellowish color to signify
that it's the admin UI) and bits of the UI match the RB color scheme and
images.

The admin login page has been replaced with our standard login page.
This reduces complexity quite a bit.

Rather than fight the Django admin CSS files, we now ship our own
version of their admin.css. While we may have to update it as Django
updates theirs, it's overall less painful.
Add a nice rounding to the admin UI elements.

This helps bring it in line with RB's rounding. It gives a softer, nicer
feel to the admin UI.
Revert "Make RB understand $Header$ keyword in Subversion"

This change was only committed in part. I will be making a subsequent
commit with the full change.
Properly display SVN diffs with changes in $Keyword$ formatting

We encountered this issue when a developer accidentally committed
several files with inappropriate keyword format, namely $Header:$
instead of $Header$. I am not sure how it happened at that time and I
cannot reproduce adding such file with a recent Subversion by just
adding a file. The same end result can be reproduced, though, using the
Subversion's svnmucc utility:

$ cd /tmp
$ svnadmin create foo
$ echo '$Header:$' > file
$ svnmucc put file file:///tmp/foo/file
r1 committed by aneyman at 2012-05-12T04:22:21.507824Z
$ svnmucc mv file:///tmp/foo/file file:///tmp/foo/badfile propset svn:keywords Header file:///tmp/foo/badfile
r2 committed by aneyman at 2012-05-12T04:22:48.440614Z
$ svn co file:///tmp/foo foo.wc
A    foo.wc/badfile
Checked out revision 2.
$ cd foo.wc/
$ cat badfile
$Header: file:///tmp/foo/badfile 2 2012-05-12 04:22:48Z aneyman $
$ echo hi >> badfile
$ svn di badfile
Index: badfile
===================================================================
--- badfile     (revision 2)
+++ badfile     (working copy)
@@ -1 +1,2 @@
-$Header:$
+$Header$
+hi

As seen above, whenever one of these files is modified, 'svn diff' generates (and then post-review uploads) a diff which contains the following lines:

- ... $Header:$
+ ... $Header$

However, when RB tries to apply this diff, it first contracts the
keywords in the file it gets from the repository. Thus, a file with
contracted keyword has $Header$ and the patch above fails to apply
cleanly.

The solution proposed is to apply the same keyword contraction technique
to the patch as it is applied to the sources from the repository. This
makes the change in $Header:$ not be displayed, but the rest of the
changes are displayed fine. The regexp matching header contraction is
modified to account for the $Keyword:$ form (i.e. with no characters
following the colon).

Reviewed at http://reviews.reviewboard.org/r/3105/
Convert FedoraHosted hosting provider to cgit

FedoraHosted has switched from GitWeb to CGit for performance.

Reviewed at http://reviews.reviewboard.org/r/3297/
Combine the Add/Update actions into an Update dropdown menu.

The Add/Update File/Screenshot/Diff menu items are now under an Update
menu. This is a bit nicer, and condenses the action bar a bit.

As part of this, I've removed the <img> for the dropdown arrow and made
the CSS take care of that. That required some shuffling of which part of
the items had background colors. It's now the <li>, not the <a>.
Move the reply banner below the box headers on reviews.

The reply banner was being shown above the expand/collapse button, name,
and date on reviews. This felt a big wrong, and made the UI jump a bit.
Now it's positioned below this header and above the content.
Fix the unit test for the Fedora Hosted accounts.

The path for this was just changed, but the unit test was never updated.
This fixes the unit test to match the new path.
Merge branch 'new-admin-styles'
Merge branch 'release-1.6.x'
Require pipeline 1.2.16 or higher and the latest Djblets.

This version of pipeline fixes issues with prefixed static media locations.

Djblets is updated to work with new pipeline changes and to better style
admin UI pages.
Fix a reference to a function in a Hg diff unit test.

This was merged from release-1.6.x, but a function this unit test had
called was renamed on master. This fixes the test.