#NEWLINE# def _get_patch( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# resources . review_request . get_object ( request , * args , ** kwargs ) #NEWLINE# filediff = self . get_object ( request , * args , ** kwargs ) #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# return DOES_NOT_EXIST #NEWLINE# #UNINDENT# resp = HttpResponse ( filediff . diff , content_type = 'text/x-patch' ) #NEWLINE# filename = ( '%s.patch' % urllib_quote ( kwargs . source_file ) ) #NEWLINE# resp [ 'Content-Disposition' ] = ( 'inline; filename=%s' % filename ) #NEWLINE# set_last_modified ( resp , filediff . diffset . timestamp ) #NEWLINE# return resp