Remove DiffCommit.file_count and DiffSet.file_count fields
Review Request #10216 — Created Oct. 11, 2018 and submitted — Latest diff uploaded
This patch removes the above mentioned fields because we will now be
tracking per-commit FileDiffs and cumulative (i.e., a cumulative diff of
the entire commit series) FileDiffs in theDiffSet.files
field, and
thefile_count
field will no longer be of any use in that case.Since the mixin defining the
file_count
would only now be providing a
utility method, the mixin has been removed and the method has been moved
into a free function which bothDiffCommit.get_total_line_counts
and
DiffSet.get_total_line_counts
call into.
Ran unit tests.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.
orig
1
2
3
4
reviewboard/diffviewer/diffutils.py |
---|
reviewboard/diffviewer/filediff_creator.py |
---|
reviewboard/diffviewer/evolutions/__init__.py |
---|
reviewboard/diffviewer/evolutions/delete_file_count_fields.py |
---|
reviewboard/diffviewer/models/diffcommit.py |
---|
reviewboard/diffviewer/models/diffset.py |
---|
reviewboard/diffviewer/models/mixins.py |
---|
reviewboard/diffviewer/tests/test_filediff_creator.py |
---|
reviewboard/reviews/models/review_request.py |
---|
reviewboard/webapi/tests/test_diff.py |
---|
reviewboard/webapi/tests/test_draft_diff.py |
---|