def _handle_empty_files(self, diff_content, diff_cmd, revisions):
        # Get a list of all deleted files in this diff so we can differentiate
        # between added empty files and deleted empty files.
        diff_cmd.append('--no-diff-deleted')
        diff_with_deleted = self._run_svn(diff_cmd,
                                          ignore_errors=True,
                                          none_on_ignored_error=True,
                                          results_unicode=False)

        if not diff_with_deleted:
            return diff_content

        deleted_files = re.findall(br'^Index:\s+(\S+)\s+\(deleted\)$',
                                   diff_with_deleted, re.M)

        result = []
        i = 0
        num_lines = len(diff_content)

        while i < num_lines:
            line = diff_content[i]

            if (line.startswith(b'Index: ') and
                (i + 2 == num_lines or
                 (i + 2 < num_lines and
                  diff_content[i + 2].startswith(b'Index: ')))):
                # An empty file. Get and add the extra diff information.
                index_line = line.strip()
                filename = index_line.split(b' ', 1)[1].strip()

                if filename in deleted_files:
                    # Deleted empty file.
                    result.append(b'%s\t(deleted)\n' % index_line)

                    if not revisions['base'] and not revisions['tip']:
                        tip = b'(working copy)'
                        info = self.svn_info(filename, ignore_errors=True)

                        if info and 'Revision' in info:
                            base = '(revision %s)' % info['Revision']
                        else:
                            continue
                    else:
                        base = revisions['base']
                        tip = revisions['tip']
                else:
                    # Added empty file.
                    result.append(b'%s\t(added)\n' % index_line)

                    if not revisions['base'] and not revisions['tip']:
                        base = tip = b'(revision 0)'
                    else:
                        base = revisions['base']
                        tip = revisions['tip']

                if isinstance(base, six.text_type):
                    base = base.encode('utf-8')

                if isinstance(tip, six.text_type):
                    tip = tip.encode('utf-8')

                result.append(b'%s\n' % self.INDEX_SEP)
                result.append(b'--- %s\t%s\n' % (filename, base))
                result.append(b'+++ %s\t%s\n' % (filename, tip))

                # Skip the next line (the index separator) since we've already
                # copied it.
                i += 2
            else:
                result.append(line)
                i += 1

        return result
This function extracts everything necessary for creating a RunSetResult object
dataset/ETHPy150Open reviewboard/rbtools/rbtools/clients/svn.py/SVNClient._handle_empty_files--crossover with--dataset/ETHPy150Open sosy-lab/benchexec/benchexec/tablegenerator/__init__.py/RunSetResult.create_from_xml