Fix bug [#796] to allow post-review tool to work even if reviewboard was installed on a non-root url (e.g. http://www.example.com/reviews)

Review Request #689 — Created Jan. 5, 2009 and submitted

Information

Review Board SVN (deprecated)

Reviewers

This is to fix a bug I found on the post-review tool (issue #796).
The fix involves modifying the url returned by _make_url
so that the application path 
(e.g. 'reviews' in the url 'http://www.example.com/reviews')
is used to build the correct url given a relative path for the 
json api calls in the code
e.g. '/api/json/repositories' - the original _make_url method
would return 'http://www.example.com/api/json/repositories'
which would work only if the reviewboard was installed on '/'. 

The fix now changes _make_url so that it returns the value
 'http://www.example.com/reviews/api/json/repositories'

 
chipx86
  1. 
      
  2. /trunk/reviewboard/contrib/tools/post-review (Diff revision 1)
     
     
     
     
     
     
    The core of the problem is that the URL needs to have a trailing newline and, in your example, does not. What I'd recommend instead is ensuring that any URL we find (via command line parameter, repository properties, or config file) always ends in a trailing "/".
  3. 
      
chipx86
  1. Upon further review, I think this is fine. Thanks for the fix! Committed in r1676.
  2. 
      
Loading...