Improve hg diff --git format support and add better handling of renamed files

Review Request #1770 — Created Sept. 2, 2010 and discarded


Review Board


When generating diffs with --git option, mercurial doesn't include the revision number the diffs are based on. This is a big issue when trying to upload that to reviewboard. So, I added an optional field to the Diff upload form to specify the revision it is based on. By default this field is set to the 'tip' of the mercurial repository.

I also made changes for better handling of renamed (or moved) files:
- Show both names in the review (before and after).
- If the file was not modified, say it and don't display the actual content.

Finally, improved detection of deleted files in HgTool parser.
Tested thoroughly in our own projects as we use reviewboard with mercurial.
Been running on our production reviewboard server for 2 weeks now.
Review request changed

Change Summary:

added a screenshot