The post-review tool assumes that the reviewboard url is always at '/' e.g.
'http://reviews.example.com/'. If reviewboard was installed with a url like
'http://www.example.com/reviews/', the post-review tool cannot submit a new
review.
What steps will reproduce the problem?
1. Install reviewboard on a url that is not at the root of the site:
In my case I installed it using the following modpython configuration:
# Error handlers
ErrorDocument 500 /errordocs/500.html
# Serve django pages
<Location "/reviewboard">
PythonPath "['/srv/reviewboard/conf'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonAutoReload Off
PythonDebug Off
# Used to run multiple mod_python sites in the same apache
PythonInterpreter reviewboard_reviewboard
</Location>
# Serve static media without running it through mod_python
# (overrides the above)
<Location "/media">
SetHandler None
</Location>
<Location "/errordocs">
SetHandler None
</Location>
# Alias static media requests to filesystem
Alias /media /srv/reviewboard/htdocs/media
Alias /errordocs /srv/reviewboard/htdocs/errordocs
2. Complete the reviewboard installation and configuration (including
simplejson on the client)
3. Try to submit a review using post-review with option
'--server=http://www.example.com/reviewboard'
where http://www.example.com/reviewboard is the url of your reviewboard site.
What is the expected output? What do you see instead?
It should have created a new draft review request. Instead it returns a 404
error message like the following:
'Unable to access http://www.example.com/api/json/repositories/ (404). The
host path may be invalid'
What operating system are you using? What browser?
This is on both Linux and windows. Browser is not relevant as I am using a
commandline tool.
Please provide any additional information below.
The error is due to the fact that its trying to look up
'http://www.example.com/api/json/repositories' when it
should be looking up
'http://www.example.com/reviewboard/api/json/repositories'
I created a fix for it and have submitted for review.