Allow commit histories that modify the same file more than once

Review Request #7043 — Created March 11, 2015 and submitted — Latest diff uploaded

Information

Review Board
dvcs
7fbed2e...

Reviewers

Previously, when uploading a commit history to a review request, it was
impossible for your commit history to contain two commits which
modified the same file. This is because the FileDiff processing
checked the repository for the previous revisions of all files. In this
case, the repository would report that the file did not exist at the
given revision and validation would fail.

Now we can check for file existence within our current set of uploaded
DiffCommits. If we are unable to find an ancestor DiffCommit that
contains the file at the correct revision, we fall back to the old
behaviour of querying the repository. This allows linear commit
histories that modify the same file to be validated and uploaded.

NB: The diffviewer will not be able to show the FileDiff for such
DiffSets. This will be addressed in a later patch that will land
before this one.

Ran unit tests.

Posted a review request with commit history that modified the same file
in two different commits; it was successful.

Tried to view the review request's diff in the diff viewer; it was
unsuccesful.