def convert_to_absolute_paths(self, diff_content, repository_info):
        result = []

        for line in diff_content:
            front = None
            orig_line = line
            if (self.DIFF_NEW_FILE_LINE_RE.match(line)
                or self.DIFF_ORIG_FILE_LINE_RE.match(line)
                or line.startswith(b'Index: ')):
                front, line = line.split(b' ', 1)

            if front:
                if line.startswith(b'/'):  # Already absolute
                    line = front + b' ' + line
                else:
                    # Filename and rest of line (usually the revision
                    # component)
                    file, rest = self.parse_filename_header(line)

                    # If working with a diff generated outside of a working
                    # copy, then file paths are already absolute, so just
                    # add initial slash.
                    if self.options.repository_url:
                        path = unquote(
                            posixpath.join(repository_info.base_path, file))
                    else:
                        info = self.svn_info(file, True)
                        if info is None:
                            result.append(orig_line)
                            continue
                        url = info["URL"]
                        root = info["Repository Root"]
                        path = unquote(url[len(root):])

                    line = b'%s %s%s' % (front, path, rest)

            result.append(line)

        return result
Converts relative paths in a diff output to absolute paths.
dataset/ETHPy150Open reviewboard/rbtools/rbtools/clients/svn.py/SVNClient.convert_to_absolute_paths