Add a manager for the DiffCommit model
Review Request #9631 — Created Feb. 12, 2018 and submitted — Latest diff uploaded
The main logic of the
DiffSetManagerhas been refactored into two
parts:
reviewboard.diffviewer.filediff_creator, which handles the
actual processing of diff files intoFileDiffs; andDiffManagerBase, which provides a base implementation of
create_from_uploadfor both theDiffSetManagerand the
DiffCommitManager.
The new DiffCommitManager is able to create DiffCommit objects from
either uploaded files or from data, just as the DiffSetManager can for
DiffSet objects.
This patch also adds DiffSetManager.create_empty to create empty
DiffSets which will contain DiffCommits.
Ran unit tests.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 19. See what's changed.
orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| reviewboard/diffviewer/managers.py |
|---|
| reviewboard/diffviewer/models/diff_commit.py |
|---|
| reviewboard/diffviewer/tests/test_diffcommit_manager.py |
|---|
| reviewboard/diffviewer/tests/test_diffset_manager.py |
|---|