2052: post-review doesn't use stored cookies when review is posted by '--diff-filename=-'

xaka****@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Feb. 13, 2012
What version are you running?
RBTools 0.3.2

What steps will reproduce the problem?
1. Do some changes in repo without commit/push (i used mercurial)
2. Run 'hg diff | post-review --diff-filename=-'

What is the expected output? What do you see instead?
I expected OK, but i got 'Authentication information needs to be provided on the command line when using --diff-filename=-' instead.

Please provide any additional information below.
I've checked the code and i've got that 'def login' method does checks for '--diff-filename=-' situation right before checking for stored cookies and so on...
david
#1 david
  • +PendingReview
  • +david
david
#2 david
Fixed in master (91ca2eb). Thanks!
  • -PendingReview
    +Fixed
#3 ino****@gmai***** (Google Code) (Is this you? Claim this profile.)
re: https://github.com/reviewboard/rbtools/commit/91ca2eb5f037df0756debf0a442ed14fba9e6d1e

This chance should actually be:

 not self.has_valid_cookie() and
 not (options.username and options.password)):

Otherwise --diff-filename=- fails when you supply the username and password as command line arguments