Add support for filtering the list of files in the diff viewer.

Review Request #9719 — Created March 3, 2018 and submitted

Information

Review Board
release-3.0.x
5a7086d...

Reviewers

This adds a new query argument for the diff viewer and the diff context
API for filtering the list of files based on a provided list of
filenames or Unix-style file patterns. This allows users (or extensions
or other clients) to craft diff viewer URLs that show only a subset of
the files a person needs to review.

This is controlled through the ?filenames= query argument, which takes
the comma-separated list of filenames or patterns. This is parsed by
DiffViewerView into a list and then passed to get_diff_files(),
which will use it to filter each item. The JavaScript side of the diff
viewer then takes this in and uses it when constructing URLs and
navigating pages/revisions, ensuring the filtering is not lost during
navigation.

All Python and JavaScript unit tests pass.

Manually tested with various filters, checking to make sure the filters
were not dropped when changing revisions or pages.

Built the docs and checked for errors.

Description From Last Updated

F841 local variable 'filediff5' is assigned to but never used

reviewbotreviewbot

F841 local variable 'filediff5' is assigned to but never used

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (15d1915)
Loading...