Hello,

Using Python API Client, it's easy to get the data through a File Diff 
Resource's get_diff_data function.

root = client.get_root()
files = root.get_files(review_requst_id=review_request_id, diff_revision=2)
diff_data = files[0].get_diff_data()

However, this is always from the perspective of the diff revision compared 
to the original. I have yet to find (if there is a way) to get it from the 
perspective of an interdiff.

I've tried setting diff_revision on methods like get_files to '1-2' to 
mimic the URL used in the frontend to no avail. I don't see methods like 
those take in an interdiff_revision parameter.

I also walked through the get_diff_context return since that is what is 
triggered from the GUI when dragging to see interdiffs and it supports a 
interdiff_revision

diff_context = root.get_diff_context(
     review_request_id=review_request_id,
     revision=1,
     interdiff_revision=2
)

When it is an interdiff, it returns detail like this for each file:
                "interfilediff": {
                    "id": 84062,
                    "revision": 2
                },

I was hoping I could us this detail to get the associated FileDiffResource 
and call get_diff_data to get the interdiff view data

interdiff_file = root.get_file(
    review_request_id=review_request_id,
    diff_revision=interfilediff_revision,
    filediff_id=interfilediff_id
)
interdiff_file.get_diff_data()

but to no avail it is diff2 to orig file.

Could you confirm whether or not this is possible? I suspect it is not as 
interdiffs are quite complicated. However, I wanted to check before I 
potentially go down the path of generating it myself.

Appreciate any insight! Thanks in advance!

Matthew


-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/7e047893-0eed-4245-8bd2-7ef0f0c5d595n%40googlegroups.com.

Reply via email to