def parse(self):
        logging.debug("DiffParser.parse: Beginning parse of diff, size = %s",
                      len(self.data))

        preamble = b''
        self.files = []
        file = None
        i = 0

        # Go through each line in the diff, looking for diff headers.
        while i < len(self.lines):
            next_linenum, new_file = self.parse_change_header(i)

            if new_file:
                # This line is the start of a new file diff.
                file = new_file
                file.data = preamble + file.data
                preamble = b''
                self.files.append(file)
                i = next_linenum
            else:
                if file:
                    i = self.parse_diff_line(i, file)
                else:
                    preamble += self.lines[i] + b'\n'
                    i += 1

        logging.debug("DiffParser.parse: Finished parsing diff.")

        return self.files
Rebuilds Accept header.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/diffviewer/parser.py/DiffParser.parse--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/util.py/AcceptItem.__str__