Adjust the way that parent revision numbers are computed for SVN.

Review Request #4316 — Created July 9, 2013 and submitted

Information

Review Board
master

Reviewers

Adjust the way that parent revision numbers are computed for SVN.

In the get_change implementation for SVN, I was just subtracting one from the
revision number to get the parent to diff against. This works for a typical SVN
server, but I was worried that it might fall down for wacky things like GitHub's
subversion layer. I've changed it to use the cached parent if available, and if
not, use the next item in the log.
Ran unit tests
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/scmtools/svn.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/scmtools/svn.py
      Ignored Files:
    
    
  2. 
      
chipx86
  1. Looks fine, but this seems complex enough that it should have unit tests.
    1. It's covered by the existing tests--if this broke which revision was selected as the parent, it would get a different diff (and in fact, an earlier rev of this change was broken in such a way).
    2. Ah, great.
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (5e2eeed).
Loading...