parameters: (self, patch_file)
docstring: Parse all the patches in a patch file.
  
      Parse all the patches from a given patch file and store each patch info
      into list _patches. Raise an Error exception if an inconsistency is found.
  
      Argument:
        patch_file: a file descriptor for the patch file, ready for reading.
docstring_summary: Parse all the patches in a patch file.
docstring_tokens: Parse all the patches in a patch file .
function: def Parse(self, patch_file):
      ''' Parse all the patches in a patch file.
  
      Parse all the patches from a given patch file and store each patch info
      into list _patches. Raise an Error exception if an inconsistency is found.
  
      Argument:
        patch_file: a file descriptor for the patch file, ready for reading.
      '''
      diff_lines = patch_file.readlines()
      while diff_lines:
        # Look for the start of a header.
        if diff_lines[0].startswith('---'):
          patch = _Patch()
          patch.Parse(diff_lines)
          self._patches.append(patch)
        else:
          # Skip unrecognized lines.
          diff_lines.pop(0)
function_tokens: def Parse ( self , patch_file ) : diff_lines = patch_file . readlines ( ) while diff_lines : # Look for the start of a header. if diff_lines [ 0 ] . startswith ( '---' ) : patch = _Patch ( ) patch . Parse ( diff_lines ) self . _patches . append ( patch ) else : # Skip unrecognized lines. diff_lines . pop ( 0 )