Refactor out common diff generation code

Review Request #3864 — Created Feb. 11, 2013 and submitted

Information

RBTools
master

Reviewers

Refactor out common diff generation code.

The post and diff commands were using seperate repeated code for
generating diffs. This common code is now a function which the
commands can call to generate the diff.
Generated a couple diffs using rbt diff, and posted this review request using rbt post.
Description From Last Updated

Extra blank lines.

chipx86chipx86

Indented too far.

chipx86chipx86

Col: 1 E302 expected 2 blank lines, found 0

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        rbtools/commands/post.py
        rbtools/utils/diffs.py
        rbtools/commands/diff.py
      Ignored Files:
    
    
  2. 
      
chipx86
  1. 
      
  2. rbtools/utils/diffs.py (Diff revision 1)
     
     
     
     
    Extra blank lines.
    1. This was to stop the pep8 script from complaining, it got left in.
  3. rbtools/utils/diffs.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
    Indented too far.
  4. rbtools/utils/diffs.py (Diff revision 1)
     
     
     
    At some point we should figure out if there's a better way to do this. Having SVN-specific options here is funky.
    1. Yeah, after 0.5 is out, I'm going to take a serious look at the clients
      code, and how we call into it.
  5. 
      
SM
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        rbtools/commands/post.py
        rbtools/utils/diffs.py
        rbtools/commands/diff.py
      Ignored Files:
    
    
  2. rbtools/utils/diffs.py (Diff revision 2)
     
     
    Col: 1
     E302 expected 2 blank lines, found 0
    
    1. The pep8 script is just checking for two black lines above, instead of between.
  3. 
      
SM
chipx86
  1. Ship It!
  2. 
      
SM
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (bec5ebe582aabcea089f6662b89553ce4ad04d1d).
Loading...