#NEWLINE# def write_hunks( self , srcname , tgtname , hunks ) : #NEWLINE# #INDENT# src = open ( srcname , 'rb' ) #NEWLINE# tgt = open ( tgtname , 'wb' ) #NEWLINE# debug ( ( 'processing target file %s' % tgtname ) ) #NEWLINE# tgt . writelines ( self . patch_stream ( src , hunks ) ) #NEWLINE# tgt . close ( ) #NEWLINE# src . close ( ) #NEWLINE# shutil . copymode ( srcname , src ) #NEWLINE# return True