Don't attempt to post changenums when posting a commit_id fails.

Review Request #5577 — Created March 3, 2014 and submitted

Information

RBTools
master
3d6e457...

Reviewers

Due to a bug in the Review Board 2.0 betas, posting a new review request
with a commit ID matching an existing commit ID would cause us to
receive an error saying the change number was in use. We'd then try to
post again using the changenum instead of commit_id, which would fail
due to being None.

Part of this needs to be fixed in Review Board (as we shouldn't be
getting this error unless we're trying to create from that commit ID),
but we can also handle this better by falling back to the more general
error case.

Posted a change. Then posted again. Instead of seeing:

changenum: "None" is not an integer

I instead saw:

Error creating review request: The change number specified has already been used. (HTTP 409, API Error 204)

This is at least better.

david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...