Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3521 by [email protected]: RBTools Python API - can't pass
interdiff_revision in
/api/review-requests/{review_request_id}/diff-context/
http://code.google.com/p/reviewboard/issues/detail?id=3521
*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** [email protected]. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to [email protected]
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.
What version are you running?
RBTools version 0.6.2 | ReviewBoard version 2.0.2
What's the URL of the page containing the problem?
/api/review-requests/{review_request_id}/diff-context/
What steps will reproduce the problem?
sample code:
1. from rbtools.api.client import RBClient
2. client = RBClient("http://localhost/reviewboard")
3. root = client.get_root()
4. rq = root.get_review_request(review_request_id=3)
5. context = rq.get_diff_context(revision=1, interdiff_revision=1)
What is the expected output? What do you see instead?
A context of review request
What operating system are you using? What browser?
Linux Debian Jessie / Windows 7
Please provide any additional information below.
Traceback:
---------------------------------------------------------------------------
BadRequestError Traceback (most recent call last)
<ipython-input-7-940e0d500129> in <module>()
----> 1 context = rq.get_diff_context(revision=1, interdiff_revision=1)
/DOWTMP/env/lib/python2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/api/resource.pyc
in
<lambda>(resource, url, **kwargs)
137 "get_%s" % link,
138 lambda resource=self, url=body['href'],
**kwargs: (
--> 139 self._get_url(url, **kwargs)))
140
141 def _wrap_field(self, field):
/DOWTMP/env/lib/python2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/api/decorators.pyc
in
request_method(self, *args, **kwargs)
22
23 return
self._transport.execute_request_method(method_wrapper,
---> 24 *args,
**kwargs)
25
26 request_method.__name__ = f.__name__
/DOWTMP/env/lib/python2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/api/transport/sync.pyc
in
execute_request_method(self, method, *args, **kwargs)
59
60 if isinstance(request, HttpRequest):
---> 61 return self._execute_request(request)
62
63 return request
/DOWTMP/env/lib/python2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/api/transport/sync.pyc
in
_execute_request(self, request)
68
request.url))
69
---> 70 rsp = self.server.make_request(request)
71 info = rsp.info()
72 mime_type = info['Content-Type']
/DOWTMP/env/lib/python2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/api/request.pyc
in
make_request(self, request)
482 rsp = urllib2.urlopen(r)
483 except urllib2.HTTPError, e:
--> 484 self.process_error(e.code, e.read())
485 except urllib2.URLError, e:
486 raise ServerInterfaceError("%s" % e.reason)
/DOWTMP/env/lib/python2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/api/request.pyc
in
process_error(self, http_status, data)
455
456 raise create_api_error(http_status, rsp['err']['code'],
rsp,
--> 457 rsp['err']['msg'])
458 except ValueError:
459 logging.debug('Got HTTP error: %s: %s' % (http_status,
data))
BadRequestError: One or more fields had errors (HTTP 400, API Error 105)
interdiff-revision: Field is not supported
__________________________________________________________________________
This is problem with replacing all "_" by "-" where http url is created
(api/request.py line 54)
Place where this argument is defined -
reviewboard/webapi/resources/diff_context.py#L43
Best Regards,
Michal
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.