Fix rbt post for perforce repositories

Review Request #4110 — Created May 7, 2013 and submitted

Information

RBTools
master

Reviewers

Fix rbt post for perforce repositories.

When using rbt post with perforce, if a change number was already in
use there would be an error. We now detect the error, and update the
associated review request.

Also, we now only update drafts if needed in rbt post.

rbt post would make an HTTP request to update the review request draft
with fields even if there were none which required updating, resulting
in an unnecessary empty HTTP PUT.

A Content-Length header is now provided on empty requests.

Some web servers require a Content-Length header be provided on all
POST/PUT requests, when the API would make an empty POST/PUT request
it was not providing this header. We now set a "0" Content-Length
which should prevent these servers from responding with an HTTP 411.
Have not tested with perforce yet, working on setting up a server. Testing by those who use perforce would be appreciated.
Description From Last Updated

No blank line.

chipx86chipx86

No blank line.

chipx86chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        rbtools/commands/post.py
        rbtools/api/request.py
      Ignored Files:
    
    
  2. 
      
chipx86
  1. Just two small things, then ship it.
  2. rbtools/commands/post.py (Diff revision 1)
     
     
     
     
    Show all issues
    No blank line.
  3. rbtools/commands/post.py (Diff revision 1)
     
     
     
     
    Show all issues
    No blank line.
  4. 
      
SM
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master and release-0.5.x (5c889c931a090943eadc1e5b20b0ccafdfbd7e52).
Loading...