1514: post-review.py doesn't allow parameters for http username/password

sto***@gmai***** (Google Code) (Is this you? Claim this profile.)
July 8, 2011
board.org/


What version are you running?

v1.0.5.1


What's the URL of the page this enhancement relates to, if any?

n/a


Describe the enhancement and the motivation for it.

post-review.py can't be used by scripts that access Review Board protected
by basic http authentication. The user is forced to manually enter a
username and password.

What operating system are you using? What browser?

Fedora 12 + Galeon/Firefox

Please provide any additional information below.

Suggest adding --http-username and --http-password parameters to post-review.py

I've attached a patch - my first attempt at using patch so be kind. :) I
couldn't create a review request for some reason (Exception Value: The diff
file is empty) so I've posted it here. Hope this is a correct patch.
#1 sto***@gmai***** (Google Code) (Is this you? Claim this profile.)
Sorry - attached the wrong patch. Here's the correct one.
  • +
    --- ORIGINAL-post-review.py	2010-02-25 08:33:42.000000000 -0500
    +++ post-review.py	2010-02-25 08:41:55.000000000 -0500
    @@ -258,8 +258,8 @@
         def __init__(self, reviewboard_url):
             self.passwd  = {}
             self.rb_url  = reviewboard_url
    -        self.rb_user = None
    -        self.rb_pass = None
    +        self.rb_user = options.http_username
    +        self.rb_pass = options.http_password
     
         def find_user_password(self, realm, uri):
             if uri.startswith(self.rb_url):
    @@ -2637,6 +2637,12 @@
                           dest="diff_filename", default=None,
                           help='upload an existing diff file, instead of '
                                'generating a new diff')
    +    parser.add_option("--http-username",
    +                      dest="http_username", default=None, metavar="USERNAME",
    +                      help='the username for basic HTTP authentication')
    +    parser.add_option("--http-password",
    +                      dest="http_password", default=None, metavar="
#2 sto***@gmai***** (Google Code) (Is this you? Claim this profile.)
Created review request http://reviews.reviewboard.org/r/1441/.
david
#3 david
  • +Component-RBTools
david
#4 david
Fixed in master.
  • +Fixed