Add utilities to compare DiffCommits and FileDiffs for equivalence
Review Request #8313 — Created July 27, 2016 and submitted — Latest diff uploaded
Two
FileDiffs are equivalent if and only if they have the same diff
content (including headers). Instead of directly comparing the diff
contents we can instead see that they point at the same
RawFileDiffDataobject, as any two identicalFileDiffs must have
identicalRawFileDiffDatainstances.Two
DiffCommits are equivalent if and only if they have the same
author, committer, and diff contents. That is, everyFileDiffin
DiffCommitA will have a corresponding equivalentFilediffin
DiffCommitB if A and B are equivalent. We cache the result of this
comparison in theextra_dataof eachDiffCommitto save future
database queries.
Ran unit tests.