Compare file SHAs to determine if files can be skipped in interdiffs.

Review Request #6486 — Created Oct. 21, 2014 and submitted

Information

Review Board
release-2.0.x
a1cc517...

Reviewers

We attempt to keep unmodified changes out of the diff viewer when
viewing interdiffs. To do this, we compare the deleted flags and also
the diff contents. However, if the diff content simply has a small
change, like a difference in timestamps in the headers, this check will
fail and the otherwise unmodified file will be shown.

Now, when we generate diffs, we calculate SHAs and store them in the
file's extra_data. We can use these to compare the SHAs of patched files
to see if there will be any changes to show.

Loaded an interdiff containing some files that should't have been shown.
Saw the files, but then I reloaded and the files were no longer shown
(since the SHAs were calculated at that point and were properly compared).

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/models.py
        reviewboard/diffviewer/chunk_generator.py
        reviewboard/diffviewer/diffutils.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/models.py
        reviewboard/diffviewer/chunk_generator.py
        reviewboard/diffviewer/diffutils.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (73b1066)
Loading...