Fix 'interdiff-revision' field name in the diff context resource.
Review Request #6292 — Created Sept. 3, 2014 and submitted
When I added this resource, I copied the field names that are used for POST/PUT
operations (which use underscores), rather than those in GET operations (which
use hyphens). This worked from the web UI (where we assemble the URL directly),
but caused problems when using the RBTools API (which transforms all
underscores into hyphens for GET requests). This change fixes that field name
to be 'interdiff-revision'.
Verified that diff and interdiff selection still worked properly using the new
URL parameters.
-
This breaks backwards-compatibility. Maybe we don't care. If we do care, though, we can have
@webapi_request_fields
allow all unspecified arguments (by passingallow_unknown=True
) and then fall back to checking for the old names inkwargs
.Either way, we should add some documentation stating that in 2.0 through 2.0.6, the old names were used, but we've renamed them (and then mention the backwards-compatibility if we go that route, stating that those old names are deprecated and subject for removal).
-
Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/diff_context.py Ignored Files: reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: Pyflakes Processed Files: reviewboard/webapi/resources/diff_context.py Ignored Files: reviewboard/static/rb/js/pages/views/diffViewerPageView.js