2465: For non owned review - fix error message in Review Board post-review tool

sudhir.********@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 7, 2012
What version are you running?
RBTools 0.3.4


What's the URL of the page containing the problem?
NO URL - post-review tool

What steps will reproduce the problem?
1. post-review to an existing NON owned review.
2.
3.

What is the expected output? What do you see instead?
"you don't own the RB". 
I see below output instead 
"Error uploading diff. Your review request still exists, but the diff is not attached."

What operating system are you using? What browser?
RHEL 5.0 

Please provide any additional information below.
#1 sudhir.********@gmai***** (Google Code) (Is this you? Claim this profile.)
Better diagnostic for non owned review update is as below:

    if not server.info.supports_changesets or not options.change_only:
        try:
            server.upload_diff(review_request, diff_content,
                               parent_diff_content)
        except APIError, e:
            sys.stderr.write('\n')
            sys.stderr.write('Error uploading diff\n')
            sys.stderr.write('\n')

            if e.error_code == 101 and e.http_status == 403:
                sys.stderr.write('Error: You are not the owner of this ReviewBoard review.\n')
                sys.stderr.write('\n')
                die()

            if e.error_code == 105:
                sys.stderr.write('The generated diff file was empty. This '
                                 'usually means no files were\n')
                sys.stderr.write('modified in this change.\n')
                sys.stderr.write('\n')
                sys.stderr.write('Try running with --output-diff and --debug '
                                 'for more information.\n')
                sys.stderr.write('\n')
                
            die("Your review request still exists, but the diff is not " +
                "attached.")
david
#2 david
How are you invoking post-review? Is this with perforce?
  • +NeedInfo
#3 sudhir.********@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi David
  post-review -r ID (where ID is not owned). FYI, we use subversion and I don't feel this issue is related to SCM.

Regards
Sudhir 
david
#4 david
Thanks!

Fixed in master (7570943).
  • -NeedInfo
    +Fixed