def parse_diff_header(self, linenum, info):
        """
        Parses part of a diff beginning at the specified line number, trying
        to find a standard diff header.

        The line number returned is the line after the special header,
        which can be multiple lines long.
        """
        if linenum + 1 < len(self.lines) and \
           ((self.lines[linenum].startswith(b'--- ') and
             self.lines[linenum + 1].startswith(b'+++ ')) or
            (self.lines[linenum].startswith(b'*** ') and
             self.lines[linenum + 1].startswith(b'--- ') and
             not self.lines[linenum].endswith(b" ****"))):
            # This is a unified or context diff header. Parse the
            # file and extra info.
            try:
                info['origFile'], info['origInfo'] = \
                    self.parse_filename_header(self.lines[linenum][4:],
                                               linenum)
                linenum += 1

                info['newFile'], info['newInfo'] = \
                    self.parse_filename_header(self.lines[linenum][4:],
                                               linenum)
                linenum += 1
            except __HOLE__:
                raise DiffParserError("The diff file is missing revision " +
                                      "information", linenum)

        return linenum
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/diffviewer/parser.py/DiffParser.parse_diff_header