Show commit history differences in interdiffs

Review Request #7219 — Created April 17, 2015 and submitted

Information

Review Board
dvcs
1b90346...

Reviewers

The diffviewer now shows the differences between commit histories in a
manner similar to how the change descriptions show differences in the
commit histories between revisions.

Ran unit tests.


Description From Last Updated

Each case should be its own unit test, to help when things change down the road, and to keep this …

chipx86chipx86

Blank line between these.

chipx86chipx86

Let's raise a ValueError here with a suitable error, to help diagnose issues that may come up down the road.

chipx86chipx86

While a minor performance improvement, we should probably pull out history_entry[key] into a local variable so we don't have to …

chipx86chipx86

This should be imported a couple lines later.

chipx86chipx86

This should also raise a ValueError.

chipx86chipx86

We should pull out commit_dict[key] here as well.

chipx86chipx86

The list comprehension will be faster, since it doesn't involve a lambda call or a conversion back into a list. …

chipx86chipx86

Same here.

chipx86chipx86

There should be a blank line before each comment.

chipx86chipx86

This appears to conflict with the value. We should maybe say that if there is no interdiff, the API will …

chipx86chipx86

Space after switch.

chipx86chipx86

Blank line between these.

chipx86chipx86

Blank line between these.

chipx86chipx86

Col: 5 E301 expected 1 blank line, found 0

reviewbotreviewbot

Should be indented only 4 spaces, not 30

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. 
      
brennie
  1. 
      
  2. In change descriptions, we highlight a changed commit with green (in the case of added) or red (in the case of removed).

    I haven't added this to the diffviewer commits diffs because I think it will be harder to read with the diff icons AND the row backgrounds.

    Thoughts?

    1. What if you surrounded the diff icon with a circle of white?

    2. The current screenshots reflect this change.

  3. 
      
brennie
chipx86
  1. 
      
  2. reviewboard/diffviewer/tests.py (Diff revision 1)
     
     
     
    Show all issues

    Each case should be its own unit test, to help when things change down the road, and to keep this from growing longer.

  3. reviewboard/diffviewer/views.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  4. reviewboard/diffviewer/views.py (Diff revision 1)
     
     
    Show all issues

    Let's raise a ValueError here with a suitable error, to help diagnose issues that may come up down the road.

  5. reviewboard/diffviewer/views.py (Diff revision 1)
     
     
     
    Show all issues

    While a minor performance improvement, we should probably pull out history_entry[key] into a local variable so we don't have to do the lookup three times.

    We should do the same with history_entry['type'], since that's used as many as three times as well.

  6. reviewboard/reviews/builtin_fields.py (Diff revision 1)
     
     
    Show all issues

    This should be imported a couple lines later.

  7. reviewboard/reviews/builtin_fields.py (Diff revision 1)
     
     
    Show all issues

    This should also raise a ValueError.

  8. reviewboard/reviews/builtin_fields.py (Diff revision 1)
     
     
     
    Show all issues

    We should pull out commit_dict[key] here as well.

  9. reviewboard/reviews/builtin_fields.py (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    The list comprehension will be faster, since it doesn't involve a lambda call or a conversion back into a list.

    Also, we should pull out info['old'] into a local variable.

  10. reviewboard/reviews/builtin_fields.py (Diff revision 1)
     
     
     
     
     
    Show all issues

    Same here.

  11. reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    There should be a blank line before each comment.

  12. Show all issues

    This appears to conflict with the value. We should maybe say that if there is no interdiff, the API will always set this to be "unmodified", or something.

  13. Show all issues

    Space after switch.

  14. Show all issues

    Blank line between these.

  15. Show all issues

    Blank line between these.

  16. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. reviewboard/diffviewer/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 5
     E301 expected 1 blank line, found 0
    
  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. 
      
david
  1. Code looks good pending resolution of the design question.

  2. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. 
      
brennie
  1. 
      
  2. Should the stroke actually be the background of the table (which is slightly off-white) instead of white?

  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. 
      
david
  1. 
      
  2. Show all issues

    Should be indented only 4 spaces, not 30

  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/builtin_fields.py
        reviewboard/diffviewer/views.py
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/commitutils.py
    
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js
        reviewboard/static/rb/js/diffviewer/views/diffComplexityIconView.js
        reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js
    
    
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to dvcs (8038b31)