Fixed support for hg git diffs with spaces in path

Review Request #3258 — Created Aug. 2, 2012 and submitted — Latest diff uploaded

Information

Review Board

Reviewers

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.
- Ran the unit tests
- Tested submitting normal mercurial diffs
- Tested submitting git diffs via mercurial postreview without spaces in path
- Tested submitting git diffs via mercurial postreview with spaces in path
- Tested the above with some moved files (with changes in them, as it appears there's a separate bug with moved files without changes)