#NEWLINE# def parse_change_header( self , linenum ) : #NEWLINE# #INDENT# '\n        Parses part of the diff beginning at the specified line number, trying\n        to find a diff header.\n        ' #NEWLINE# info = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# file = None #NEWLINE# start = linenum #NEWLINE# linenum = self . parse_special_header ( linenum , info ) #NEWLINE# linenum = self . parse_diff_header ( linenum , info ) #NEWLINE# if info . get ( 'skip' , False ) : #NEWLINE# #INDENT# return ( linenum , None ) #NEWLINE# #UNINDENT# if ( ( 'origFile' in info ) and ( 'newFile' in info ) and ( 'origInfo' in info ) and ( 'newInfo' in info ) ) : #NEWLINE# #INDENT# if ( linenum < len ( self . lines ) ) : #NEWLINE# #INDENT# linenum = self . parse_after_headers ( linenum , info ) #NEWLINE# if info . get ( 'skip' , False ) : #NEWLINE# #INDENT# return ( linenum , None ) #NEWLINE# #UNINDENT# #UNINDENT# file = File ( ) #NEWLINE# file . binary = info . get ( 'binary' , False ) #NEWLINE# file . deleted = info . get ( 'deleted' , False ) #NEWLINE# file . moved = info . get ( 'moved' , False ) #NEWLINE# file . copied = info . get ( 'copied' , False ) #NEWLINE# file . origFile = info . get ( 'origFile' ) #NEWLINE# file . newFile = info . get ( 'newFile' ) #NEWLINE# file . origInfo = info . get ( 'origInfo' ) #NEWLINE# file . newInfo = info . get ( 'newInfo' ) #NEWLINE# file . origChangesetId = info . get ( 'origChangesetId' ) #NEWLINE# if isinstance ( file . origFile , six . binary_type ) : #NEWLINE# #INDENT# file . origFile = file . origFile . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# if isinstance ( file . newFile , six . binary_type ) : #NEWLINE# #INDENT# file . newFile = file . newFile . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# if isinstance ( file . origInfo , six . binary_type ) : #NEWLINE# #INDENT# file . origInfo = file . origInfo . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# if isinstance ( file . newInfo , six . binary_type ) : #NEWLINE# #INDENT# file . newInfo = file . newInfo . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# file . data = b'' . join ( [ ( self . lines [ i ] + b'\n' ) for i in range ( start , linenum ) ] ) #NEWLINE# #UNINDENT# return ( linenum , file )