#NEWLINE# @ request_method_decorator #NEWLINE# def validate_diff( self , repository , diff , parent_diff = None , base_dir = None , base_commit_id = None , **kwargs ) : #NEWLINE# #INDENT# 'Validate a diff.' #NEWLINE# request = self . prepare_upload_diff_request ( diff , parent_diff = parent_diff , base_dir = base_dir , base_commit_id = base_commit_id , ** kwargs ) #NEWLINE# request . add_field ( 'repository' , repository ) #NEWLINE# if base_commit_id : #NEWLINE# #INDENT# request . add_field ( 'base_commit_id' , base_commit_id ) #NEWLINE# #UNINDENT# return request