Add a manager for the DiffCommit model

Review Request #9631 - Created Feb. 12, 2018 and updated

Barret Rennie
Review Board
release-4.0.x
9609
72796b3...
reviewboard

The main logic of the DiffSetManager has been refactored into two
classes:

  • DiffProcessor, which handles the actual processing of diff files
    into FileDiffs; and
  • DiffManagerBase, which provides a base implementation of
    create_from_upload for both the DiffSetManager and 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.crete_empty to create empty
DiffSets which will contain DiffCommits.

Ran unit tests.

  • 7
  • 0
  • 3
  • 0
  • 10
Description From Last Updated
typo: reivewboard David Trowbridge David Trowbridge
Missing a period. David Trowbridge David Trowbridge
) should be on the line before. David Trowbridge David Trowbridge
Docstring? David Trowbridge David Trowbridge
There are so many args here, let's put one per line. David Trowbridge David Trowbridge
Can we put one arg per line? David Trowbridge David Trowbridge
) should be on the previous line and no trailing comma after revision=1 David Trowbridge David Trowbridge
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

Barret Rennie
Barret Rennie
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Barret Rennie
Review request changed

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
David Trowbridge
  1. 
      
  2. reviewboard/diffviewer/managers.py (Diff revision 2)
     
     

    typo: reivewboard

  3. reviewboard/diffviewer/managers.py (Diff revision 2)
     
     

    Missing a period.

  4. reviewboard/diffviewer/managers.py (Diff revision 2)
     
     
     

    ) should be on the line before.

  5. reviewboard/diffviewer/managers.py (Diff revision 2)
     
     

    Docstring?

  6. reviewboard/diffviewer/managers.py (Diff revision 2)
     
     
     
     
     
     
     
     
     

    There are so many args here, let's put one per line.

  7. reviewboard/diffviewer/managers.py (Diff revision 2)
     
     

    Can we put one arg per line?

  8. ) should be on the previous line and no trailing comma after revision=1

  9. 
      
Loading...