215: post-review not working

irvine******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Sept. 3, 2007
What's the URL of the page containing the problem?
n/a

What steps will reproduce the problem?
1. run post-review.py 
2.
3.

What is the expected output? What do you see instead?
unsure - I can input username and password then nothing - just hangs
sometimes get an  AttributeError: 'URLError' object has no attribute 'read'

What operating system are you using? What browser?

ubuntu feisty python 2.5 

Please provide any additional information below.
chipx86
#1 chipx86
Can you run post-review --debug ?

Is this against an SVN repository or Perforce?
  • +chipx86
chipx86
#2 chipx86
 
  • +Component-Scripts
#3 irvine******@gmai***** (Google Code) (Is this you? Claim this profile.)
This is an SVN repository 

Output below. I am not convinced I am using this properly - our reviewboard is at
codereview.maidsafe.net. I am not sure exactly how it works to be honest. Ideally I
would like that only codereview could commit code when ship it is pressed. That way
everything is reviewed. Otherwise I feel developers will not submit code for review.
Is this possible ? Is it possible to close this system to internal developers as well ?

Also can you explain with svn how to use changeset numbers and link these to commits
prior to committing ?

Sorry for appearing silly but I am very keen this is implemented as it has fantastic
potential. Great piece of work and as soon as we begin making some money I would be
really happy to part fund this project. 


dirvine@dirvine-laptop:~/workspace/Origin/src$ ~/post-review.py --debug 436 
/var/lib/python-support/python2.5/simplejson/scanner.py:6: DeprecationWarning: The
sre module is deprecated, please import re.
  from sre import VERBOSE, MULTILINE, DOTALL
You must log in the first time.
Username: dirvine
Password: 
>>> Logging in with username "dirvine"
>>> HTTP POSTing to /api/json/accounts/login/: {'username': 'dirvine', 'password':
'**************'}
Traceback (most recent call last):
  File "/home/dirvine/post-review.py", line 452, in <module>
    main()
  File "/home/dirvine/post-review.py", line 445, in main
    login()
  File "/home/dirvine/post-review.py", line 171, in login
    'password': password,
  File "/home/dirvine/post-review.py", line 155, in api_post
    return process_json(http_post(path, fields, files))
  File "/home/dirvine/post-review.py", line 146, in http_post
    debug(e.read())
AttributeError: 'URLError' object has no attribute 'read'



chipx86
#4 chipx86
First, I'd make sure that you secure your review board server from outside access
either by firewalling it off and by setting "REQUIRE_SITEWIDE_LOGIN = True" in
settings_local.py, unless you want people to be able to see your code. (Just making
sure in case it's unintentionally open :)

Review Board can't enforce that people must review the code before committing it.
It's possible to add hooks in Subversion to check if the commit message has something
like "Reviewed at http://...." and then verify that it's been marked as shipped, but
those scripts don't exist yet. (I'll gladly take patches if they're written!)

I'd just make it a policy where you work to always have the code reviewed. That seems
to work out alright at VMware, and we have many hundreds of people using it. People
could still violate that, but it's probably going to be the easiest solution for now.

Changeset numbers don't exist with Subversion, so you can't use them. The information
for the review request has to be added by hand. The changeset support is only for
systems that support it, like Perforce. I know this is unfortunate.

It looks like you may also be using an older version of post-review. I think we still
have the older one in the tree, which is confusing. I'll have to remove it. Try using
the one in contrib/tools, as that's the one that you'll need. It should work a lot
better, but if it's still failing, attach new debug output from that and I'll try to
figure out what's broken. We'll get it working :)

Oh, and that's also probably why you asked about changeset numbers. The new
post-review tool won't ask for them when working against a Subversion repository.
#5 irvine******@gmai***** (Google Code) (Is this you? Claim this profile.)
Fantastic and quick response. I will do as you say with pleasure. I got the
post-review from the wiki page. 

I think we will look at having reviewboard only commit code to svn and see how that
works - I will let you know and provide patches etc. 

Many thanks
David
chipx86
#6 chipx86
I should also point out that Review Board doesn't commit code. That's still up to the
engineer. Set Submitted just marks that the code has been submitted and the review
request is no longer open.
chipx86
#7 chipx86
  • +Fixed