Add a manager for the DiffCommit model

Review Request #9631 — Created Feb. 12, 2018 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x
bc4b0ce...

Reviewers

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

  • reviewboard.diffviewer.filediff_creator, 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.create_empty to create empty
DiffSets which will contain DiffCommits.

Ran unit tests.