#NEWLINE# def get_chunks_uncached( self ) : #NEWLINE# #INDENT# 'Yield the list of chunks, bypassing the cache.' #NEWLINE# old = get_original_file ( self . filediff , self . request , self . encoding_list ) #NEWLINE# new = get_patched_file ( old , self . filediff , self . request ) #NEWLINE# if ( self . filediff . orig_sha1 is None ) : #NEWLINE# #INDENT# self . filediff . extra_data . update ( { #NEWLINE# #INDENT# 'orig_sha1' : self . _get_checksum ( old ) , #NEWLINE# 'patched_sha1' : self . _get_checksum ( new ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . filediff . save ( update_fields = [ 'extra_data' ] ) #NEWLINE# #UNINDENT# if self . interfilediff : #NEWLINE# #INDENT# old = new #NEWLINE# interdiff_orig = get_original_file ( self . interfilediff , self . request , self . encoding_list ) #NEWLINE# new = get_patched_file ( interdiff_orig , self . interfilediff , self . request ) #NEWLINE# if ( self . interfilediff . orig_sha1 is None ) : #NEWLINE# #INDENT# self . interfilediff . extra_data . update ( { #NEWLINE# #INDENT# 'orig_sha1' : self . _get_checksum ( interdiff_orig ) , #NEWLINE# 'patched_sha1' : self . _get_checksum ( new ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . interfilediff . save ( update_fields = [ 'extra_data' ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if self . force_interdiff : #NEWLINE# #INDENT# ( old , new ) = ( new , old ) #NEWLINE# #UNINDENT# #UNINDENT# if self . interfilediff : #NEWLINE# #INDENT# log_timer = log_timed ( ( 'Generating diff chunks for interdiff ids %s-%s (%s)' % ( self . filediff . id , self . interfilediff . id , self . filediff . source_file ) ) , request = self . request ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log_timer = log_timed ( ( 'Generating diff chunks for self.filediff id %s (%s)' % ( self . filediff . id , self . filediff . source_file ) ) , request = self . request ) #NEWLINE# #UNINDENT# for chunk in self . generate_chunks ( log_timer , new ) : #NEWLINE# #INDENT# ( yield chunk ) #NEWLINE# #UNINDENT# log_timer . done ( ) #NEWLINE# if ( ( not self . interfilediff ) and ( not self . force_interdiff ) ) : #NEWLINE# #INDENT# insert_count = self . counts [ 'insert' ] #NEWLINE# delete_count = self . counts [ 'delete' ] #NEWLINE# replace_count = self . counts [ 'replace' ] #NEWLINE# equal_count = self . counts [ 'equal' ] #NEWLINE# self . filediff . set_line_counts ( insert_count = insert_count , delete_count = delete_count , replace_count = replace_count , equal_count = equal_count , total_line_count = ( ( ( insert_count + delete_count ) + replace_count ) + equal_count ) )