TortoiseHg Reviewboard issue when updating existing reviews

30 Mar

I recently noticed a bug introduced into the mercurial-reviewboard plugin that is preventing a list of existing reviews from being displayed in the drop down list.

Basically there was a change added to skip the login prompt if the user already has a a valid cookie. Unfortunatly, in this case the username is never set in the http client that the pending_user_requests function relies on.

A simple change to line 484 fixes this issue.

Before:

if not httpclient.has_valid_cookie():
    if not username:
        username = mercurial.ui.ui().prompt('Username: ')
    if not password:
        password = getpass.getpass('Password: ')
    httpclient.set_credentials(username, password)

After:

if not httpclient.has_valid_cookie():
    if not username:
        username = mercurial.ui.ui().prompt('Username: ')
    if not password:
        password = getpass.getpass('Password: ')

httpclient.set_credentials(username, password)

I have posted a new issue and patch to mdelgra’s BitBucket issue tracker, here, that fixes the issue.

Hopefully it will be fixed sooner rather then later, because it is affecting the dialog!

 
Comments Off

Posted in Python, TortoiseHg

 

Comments are closed.