Reject PUT with a changenum on file-only review requests.

Review Request #6311 — Created Sept. 10, 2014 and submitted

Information

Review Board
release-2.0.x
767aa66...

Reviewers

When updating a file-only review request (which doesn't have a repository), it
was possible to pass in a changenum field, which would then cause a 500 error
trying to fetch the scmtool. This change makes it so that we return
INVALID_CHANGE_NUMBER if there's no repository (since they're all invalid).

  • Ran unit tests.
  • Used cURL to reproduce the original bug and saw that I got an error message
    instead of a 500.
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/resources/review_request.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/resources/review_request.py
    
    
  2. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (9be9c42)