• 
      

    Move chunk generation out of diffutils and into DiffChunkGenerator.

    Review Request #4163 — Created May 25, 2013 and submitted

    Information

    Review Board
    release-1.7.x

    Reviewers

    Move chunk generation out of diffutils and into DiffChunkGenerator.
    
    This class handles all the responsibilities of diff chunk generation.
    It's basically the same code as before, but some things were able to be
    cleaned up. For example, all the nested functions are gone, and instead
    are just methods of the class. Functions can access self.<whatever>
    instead of variables that happen to be in scope or variables. The yields
    don't have to pass chunk_index and then increment it themselves.
    
    This drastically shortens what's in diffutils.py. It also reduces how
    much populate_diff_chunks now has to do.
    Tested against several diffs in my tree. No problems.
    
    Unit tests pass.
    Description From Last Updated

    Col: 80 E501 line too long (82 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (81 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (81 > 79 characters)

    reviewbotreviewbot
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/diffviewer/tests.py
          reviewboard/diffviewer/renderers.py
          reviewboard/diffviewer/templatetags/difftags.py
          reviewboard/diffviewer/chunk_generator.py
          reviewboard/diffviewer/diffutils.py
        Ignored Files:
      
      
    2. Show all issues
      Col: 80
       E501 line too long (82 > 79 characters)
      
    3. Show all issues
      Col: 80
       E501 line too long (81 > 79 characters)
      
    4. Show all issues
      Col: 80
       E501 line too long (81 > 79 characters)
      
    5. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-1.7.x (7b8550b)