Document and clean up the DiffSet creation helpers.

Review Request #8883 — Created April 6, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
a43eb90...

Reviewers

The create_from_upload() and create_from_data() methods now have
documentation covering their usage, and most of their parameters now
have default values.

One of the parameters has been replaced. The save parameter worked
differently than that on other similar methods. The implication is often
that by passing save=False, the objects will be created but not saved
to the database. In this case, however, we don't save anything to the
database, and the caller won't be able to save anything either, due to
the complexity of the objects created by these methods.

This parameter has been replaced with a validate_only parameter, which
better explains its purpose. When enabled, nothing is written to the
database and nothing is returned from the method.

Unit tests pass.

    Loading...