Store insert/deleted line counts along with diffs.

Review Request #3816 — Created Jan. 30, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Store insert/deleted line counts along with diffs.

When parsing a diff, we now keep track of the inserted/deleted line
counts and store them in the resulting file info. This is then stored in
the FileDiffData for a diff blob. We'll be able to use this later to
display a nice visualization of how many lines were added/removed.

When accessing line counts for older diffs, the diff will be migrated to
a FileDiffData (if needed) and line counts will be recomputed by
re-parsing the stored diff and pulling out those counts.

Unit tests were added to test parsing these for standard diffs and git
diffs (which does a bunch of custom parsing).
All unit tests pass.

I uploaded some diffs and checked that the correct values were stored
in the FileDiffData. I made sure the recalculate code wasn't being called
for these tests.

I then loaded up some older diffs (some in the diff viewer first, some just
in the admin UI) and saw the correct counts. I checked that the recalculate
code was being called here (and migration in some cases).