Hi Kevin,

It treats it exactly the same as any other file. Under the hood, in the
FileDiff model, we have a handful of fields. The ones relevant here are
"source_file", "dest_file", and "status". The "source_file" is the "Was
..", and "dest_file" is the primary name shown. (If the two are the same,
which is the case for standard edits to a file, you just won't see a "Was
...").

The "status" just indicates if it's a copy, delete, modify, or move. (This
is apparently not serialized in the API, though, but exists under the hood
-- we'll get that into the API.) This field has no bearing on what entries
are returned using get_files().

Can you have your script do a get_files() and show me the entirety of the
output for that? Along with that, can you print the diffset.revision?

Christian

-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

On Mon, Mar 20, 2017 at 3:30 PM, Kevin Yu <[email protected]> wrote:

> Hi Christian,
> I just tried dest_file. It doesn't contain the file I am looking for
> either.
>
> Basically what i am seeing is that neither dest_file and src_file contain
> the file. In my screenshot, I have new add file A (was B). However, neither
> A or B exist in the response from dest_file and src_file. Seems like the
> dest_file and src_file just ignore this kind of diff. Perhaps the
> reviewboard is treating this kind of diff differently ?
>
> Many thanks,
> Kevin
>
> On Monday, March 20, 2017 at 3:07:08 PM UTC-7, Christian Hammond wrote:
>>
>> Hey Kevin,
>>
>> Your script is going through and checking the source_file attribute of
>> the files, but the source file will be the "Was ..." filename, rather than
>> the new name. Can you try checking dest_file? Maybe that's what you're
>> hitting.
>>
>> Christian
>>
>> --
>> Christian Hammond
>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>> Makers of Review Board <https://www.reviewboard.org/>
>>
>> On Mon, Mar 20, 2017 at 3:02 PM, Kevin Yu <[email protected]> wrote:
>>
>>> I just did a quick simple test, I svn rm and svn add some files and then
>>> i run my script again. this time, i am able to get the file id..
>>>
>>> I did a compare with the review request i had issue with. The only
>>> difference is that the files in the original review request involve svn
>>> merge. In this case, the api doesn't return the file id.
>>> Please see the screenshot below.
>>>
>>>
>>> <https://lh3.googleusercontent.com/-Fk8E5uZFIKE/WNBRPscrr6I/AAAAAAAAClQ/RhXQJbrtj34HVQvICDAE1Ki3MAnL7g39QCLcB/s1600/Selection_001.bmp>
>>>
>>>
>>> On Monday, March 13, 2017 at 2:33:02 PM UTC-7, Kevin Yu wrote:
>>>
>>>> My Workflow when rbt patch fail because of file conflicts:
>>>> Get Review Request by ID -> review_request.get_diffs() and from the
>>>> return, i get the file id by matching the filename. With the file id, my
>>>> script will create an issue against this file to indicate there's merge
>>>> conflicts.
>>>>
>>>> It works for all the modified files. However, I noticed the get_diffs()
>>>> *doesn't* contain the files that are added or removed from this review
>>>> request. Is there any other way to get the file id for the added or removed
>>>> files from the diff?
>>>>
>>> --
>>> 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 "reviewboard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to