Hi Christian,

Thanks for your reply. What i'm referring to is this. request is the review 
request object i get from from reviewboard python api.

    for conflict_file in conflict_file_list:
        filediff_id = None
        for file in request.get_diffs()[-1].get_files():
            logging.debug(file)
            if file.source_file == conflict_file:
                filediff_id = file.id
                filediff_id_list.append(filediff_id)
        if not filediff_id:
            logging.error('ERROR: Failed to find file id for file %s', 
conflict_file)
            sys.exit(1)

The return from request.get_diffs()[-1].get_files() doesn't contain the 
files that are added or deleted. The added and deleted files are showing on 
the web gui diff viewer though. 


On Monday, March 13, 2017 at 3:24:42 PM UTC-7, Christian Hammond wrote:
>
> Hi Kevin,
>
> I assume you're referring to the files provided in diff.get_files(), for 
> the appropriate diff in get_diffs(). These will contain all files shown in 
> the diff viewer, including added/removed files. They only wouldn't appear 
> if they weren't uploaded in the first place. Are you seeing these files in 
> the diff viewer itself?
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>
> On Mon, Mar 13, 2017 at 2:37 PM, Kevin Yu <sams...@gmail.com <javascript:>
> > wrote:
>
>> I'm using SVN btw.
>>
>>
>> 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 reviewboard...@googlegroups.com <javascript:>.
>> 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 reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to