2778: patched-file and original-file are not reachable resources?

eyu****@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 12, 2013
What version are you running?
1.6.9


What's the URL of the page containing the problem?
https://reviewboard....com/api/review-requests/{review_id}/diffs/{revision_id}/files/{file_id}/original-file/

never returns 200

What steps will reproduce the problem?
1. get review id
2. get latest revision id from  https://reviewboard...com/api/review-requests/{review_id}/diffs/
3. get file id from https://reviewboard.....com/api/review-requests/{review_id}/diffs/{revision_id}/files/
4. you never get "original-file", "patched-file" in returned json object as described in the API doc.


Please provide any additional information below.
I wrote a test script to generate all resource URL patterns (get_url_patterns()) and it looks like "original-file" and "patched-file" are not among the available resources:

<RegexURLPattern root-resource ^$>
<RegexURLPattern hosting-service-accounts-resource ^$>
<RegexURLPattern hosting-service-account-resource ^(?P<account_id>[0-9]+)/$>
<RegexURLPattern repositories-resource ^$>
<RegexURLPattern repository-resource ^(?P<repository_id>[0-9]+)/$>
<RegexURLPattern info-resource ^$>
<RegexURLPattern info-resource ^$>
<RegexURLPattern groups-resource ^$>
<RegexURLPattern group-resource ^(?P<group_name>[A-Za-z0-9_-]+)/$>
<RegexURLPattern users-resource ^$>
<RegexURLPattern review-requests-resource ^$>
<RegexURLPattern review-request-resource ^(?P<review_request_id>[0-9]+)/$>
<RegexURLPattern changes-resource ^$>
<RegexURLPattern change-resource ^(?P<change_id>[0-9]+)/$>
<RegexURLPattern diffs-resource ^$>
<RegexURLPattern diff-resource ^(?P<diff_revision>[0-9]+)/$>
<RegexURLPattern files-resource ^$>
<RegexURLPattern file-resource ^(?P<filediff_id>[0-9]+)/$>
<RegexURLPattern diff-comments-resource ^$>
<RegexURLPattern draft-resource ^$>
<RegexURLPattern draft-resource ^$>
<RegexURLPattern draft-screenshots-resource ^$>
<RegexURLPattern draft-screenshot-resource ^(?P<screenshot_id>[0-9]+)/$>
<RegexURLPattern draft-file-attachments-resource ^$>
<RegexURLPattern draft-file-attachment-resource ^(?P<file_attachment_id>[0-9]+)/$>
<RegexURLPattern last-update-resource ^$>
<RegexURLPattern last-update-resource ^$>
<RegexURLPattern reviews-resource ^$>
<RegexURLPattern review-draft-resource ^$>
<RegexURLPattern review-draft-resource ^$>
<RegexURLPattern review-resource ^(?P<review_id>[0-9]+)/$>
<RegexURLPattern diff-comments-resource ^$>
<RegexURLPattern diff-comment-resource ^(?P<comment_id>[0-9]+)/$>
<RegexURLPattern replies-resource ^$>
<RegexURLPattern reply-draft-resource ^$>
<RegexURLPattern reply-draft-resource ^$>
<RegexURLPattern reply-resource ^(?P<reply_id>[0-9]+)/$>
<RegexURLPattern diff-comments-resource ^$>
<RegexURLPattern diff-comment-resource ^(?P<comment_id>[0-9]+)/$>
<RegexURLPattern screenshot-comments-resource ^$>
<RegexURLPattern screenshot-comment-resource ^(?P<comment_id>[0-9]+)/$>
<RegexURLPattern file-attachment-comments-resource ^$>
<RegexURLPattern file-attachment-comment-resource ^(?P<comment_id>[0-9]+)/$>
<RegexURLPattern screenshot-comments-resource ^$>
<RegexURLPattern screenshot-comment-resource ^(?P<comment_id>[0-9]+)/$>
<RegexURLPattern file-attachment-comments-resource ^$>
<RegexURLPattern file-attachment-comment-resource ^(?P<comment_id>[0-9]+)/$>
<RegexURLPattern screenshots-resource ^$>
<RegexURLPattern screenshot-resource ^(?P<screenshot_id>[0-9]+)/$>
<RegexURLPattern screenshot-comments-resource ^$>
<RegexURLPattern file-attachments-resource ^$>
<RegexURLPattern file-attachment-resource ^(?P<file_attachment_id>[0-9]+)/$>
<RegexURLPattern file-attachment-comments-resource ^$>
<RegexURLPattern search-resource ^$>
<RegexURLPattern search-resource ^(?P<username>[A-Za-z0-9@\._-]+)/$>
<RegexURLPattern info-resource ^$>
<RegexURLPattern info-resource ^$>
<RegexURLPattern session-resource ^$>
<RegexURLPattern session-resource ^$>
<RegexURLPattern users-resource ^$>
<RegexURLPattern user-resource ^(?P<username>[A-Za-z0-9@\._-]+)/$>
<RegexURLPattern watched-resource ^$>
<RegexURLPattern watched-review-groups-resource ^$>
<RegexURLPattern watched-review-group-resource ^(?P<watched_obj_id>[A-Za-z0-9_-]+)/$>
<RegexURLPattern watched-review-requests-resource ^$>
<RegexURLPattern watched-review-request-resource ^(?P<watched_obj_id>[0-9]+)/$>
<RegexURLPattern watched-resource ^$>
<RegexURLPattern root-resource ^$>


The API promised something that doesn't even exist. It seems a bug to me.

Thanks
/Eric
#1 rick*****@gmai***** (Google Code) (Is this you? Claim this profile.)
The original-file and patched-file functionality got implemented in 1.7 (currently dev). I also had trouble realizing this in the first place ;)

1.7:
http://www.reviewboard.org/docs/manual/dev/webapi/2.0/resources/file-diff/#webapi2.0-file-diff-resource

1.6.*:
http://www.reviewboard.org/docs/manual/1.6/webapi/2.0/resources/file-diff/#webapi2.0-file-diff-resource

Notice the original-file and patched-file properties that are absent in the 1.6 docs ;)
chipx86
#2 chipx86
I'll look into how much it would take to backport this.
  • +Confirmed
  • +Milestone-Release1.6.x
    +Component-API
david
#3 david
Given that 1.7.x has been out for quite some time, I don't think it's worth backporting at this point.
  • -Confirmed
    +WontFix