Don't verify file existence when posting existing commits for review.

Review Request #8881 — Created April 6, 2017 and submitted

Christian Hammond
Review Board

We were checking for the existence of each file in a diff for existing
commits in a repository, which is unnecessary. We can trust that those
files exist, since if they didn't, the repository is corrupt and things
will fail anyway.

DiffSet.objects.create_from_data() now accepts a check_existence
parameter, which controls whether to perform file existence checks.
By default this is True, but it's set to False when updating a draft
from a commit.

This speeds things up considerably when posting existing commits for

Tested posting commits for review. Saw that they were posted quickly,
compared to before.

Unit tests pass.

Barret Rennie
  1. Ship It!
David Trowbridge
  1. Ship It!
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (d06ff84)