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/
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/
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.