Add a link for viewing deleted file content.

Review Request #7796 — Created Dec. 3, 2015 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

In the diff viewer, it's often useful to evaluate whether or not it was
right to remove a file. Currently, we instead see the message:

This file was deleted. The content cannot be displayed.

This change will make it possible to view deleted file content by
providing a clickable link that is labelled "Show content.". An event
listener will requeue the corresponding diff file, where eventually a
GET request ending in the following will be made:

fragment/<FileDiffID>/?<OtherQueryStringPairs>&show-deleted=1

To accomplish this without running into any potential caching issues, we
added the show_deleted flag to the ETag of the corresponding diff file.

  • Ran and passed all relevant reviewboard unit tests.
  • Manually verified that deleted files could be correctly displayed on
    Chrome and Firefox without triggering a full page reload, and that
    diff files were cached correctly.
    Loading...