• 
      

    Fix issues with the new update_from_commit_id protection on 2.0.x.

    Review Request #6044 — Created July 1, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    7d0d902...

    Reviewers

    A fix was recently added to prevent a failure when fetching a changeset
    from creating a review request without a commit ID. This worked fine on
    1.7.x, but the underlying code changed a bit on 2.0. On 2.0, we didn't
    have a saved review request in the database before attempting all this,
    and the new change broke saving of review requests completely.

    The code has been reworked to perform the updating and validation early,
    and to also associate the commit ID in the event of failure (in order to
    allow it to more easily try again or at least look up the review request
    later).

    A number of unit tests for various conditions were added to help with
    these cases and to also test for commit ID uniqueness.

    Unit tests pass.

    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/tests.py
          reviewboard/reviews/models/review_request.py
          reviewboard/reviews/managers.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/tests.py
          reviewboard/reviews/models/review_request.py
          reviewboard/reviews/managers.py
      
      
    2. 
        
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (79784d2)