Fix posting review requests using -u.

Review Request #10381 — Created Jan. 13, 2019 and submitted

Information

RBTools
master

Reviewers

With the DVCS work, some of the logic for updating review requests
changed ever so slightly, breaking the updating of review requests that
didn't already have a draft.

Prior to this work, the process of guessing review requests involved
making queries with minimal information, just enough to match up the
contents of review requests, and once found, we'd throw away the matched
review request and re-fetch using its ID.

The DVCS work subtly changed this by simply reusing the review request
object, which meant that some information wasn't present. This included
the link to the draft resource, which was expanded (and possibly empty)
during the guessing process. While it saved an API request, it meant
that only review requests with drafts could ever be updated.

This change simply reverts that bit of logic back to how it used to be,
with a comment detailing why we need to re-fetch the review request.

Posted a review request against reviews.reviewboard.org and then updated
it successfully.

Summary ID
Fix posting review requests using -u.
With the DVCS work, some of the logic for updating review requests changed ever so slightly, breaking the updating of review requests that didn't already have a draft. Prior to this work, the process of guessing review requests involved making queries with minimal information, just enough to match up the contents of review requests, and once found, we'd throw away the matched review request and re-fetch using its ID. The DVCS work subtly changed this by simply reusing the review request object, which meant that some information wasn't present. This included the link to the draft resource, which was expanded (and possibly empty) during the guessing process. While it saved an API request, it meant that only review requests with drafts could ever be updated. This change simply reverts that bit of logic back to how it used to be, with a comment detailing why we need to re-fetch the review request.
6ff311c4748d603370163ce7454f9594c727cfed
david
  1. Ship It!
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (a278f90)