• 
      

    Tighten up some of the interdiff file mapping logic.

    Review Request #4142 — Created May 12, 2013 and submitted

    Information

    Review Board
    release-1.7.x

    Reviewers

    Tighten up some of the interdiff file mapping logic.
    
    We have a long-standing bug where, sometimes, an interdiff will have
    problems when there's a file changed in one revision of a diff and then
    reverted in another. While it's supposed to show that file as reverted,
    this didn't always happen.
    
    We determine that a file should be shown as reverted if we store the
    force_interdiff flag for that file (which is based on there being an
    interdiffset object). We seem to do that pretty reliably, yet it
    sometimes screws up anyway.
    
    The only thing I can think of is that we were comparing against None
    incorrectly. Perhaps in some weird corner case, the comparison was
    providing the incorrect result. Now, we use "is not" instead of "!=" for
    this comparison.
    
    I've also changed the logic to use generators where possible. Should
    be more efficient (though barely).
    Interdiffs still work correctly here. I could not reproduce the original
    problem.
    Description From Last Updated

    Col: 5 E303 too many blank lines (2)

    reviewbotreviewbot
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/diffviewer/diffutils.py
        Ignored Files:
      
      
    2. reviewboard/diffviewer/diffutils.py (Diff revision 1)
       
       
      Show all issues
      Col: 5
       E303 too many blank lines (2)
      
      1. Removed all the double spacing.
    3. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed