Add utilities to compare DiffCommits and FileDiffs for equivalence
Review Request #8313 — Created July 27, 2016 and submitted — Latest diff uploaded
Two
FileDiff
s 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
RawFileDiffData
object, as any two identicalFileDiff
s must have
identicalRawFileDiffData
instances.Two
DiffCommit
s are equivalent if and only if they have the same
author, committer, and diff contents. That is, everyFileDiff
in
DiffCommit
A will have a corresponding equivalentFilediff
in
DiffCommit
B if A and B are equivalent. We cache the result of this
comparison in theextra_data
of eachDiffCommit
to save future
database queries.
Ran unit tests.