class documentation

class FilePatch:

View In Hierarchy

Represents a patch for a single file.

Instance Variable binary True if this is a binary patch
Instance Variable binary_new New binary content for binary patches (base85 encoded)
Instance Variable binary_old Old binary content for binary patches (base85 encoded)
Instance Variable copy_from Source path for copies (None if not a copy)
Instance Variable copy_to Destination path for copies (None if not a copy)
Instance Variable hunks List of PatchHunk objects
Instance Variable new_mode Mode of new file (None for deleted files)
Instance Variable new_path Path to new file (None for deleted files)
Instance Variable old_mode Mode of old file (None for new files)
Instance Variable old_path Path to old file (None for new files)
Instance Variable rename_from Original path for renames (None if not a rename)
Instance Variable rename_to New path for renames (None if not a rename)
binary: bool =

True if this is a binary patch

binary_new: bytes | None =

New binary content for binary patches (base85 encoded)

binary_old: bytes | None =

Old binary content for binary patches (base85 encoded)

copy_from: bytes | None =

Source path for copies (None if not a copy)

copy_to: bytes | None =

Destination path for copies (None if not a copy)

hunks: list[PatchHunk] =

List of PatchHunk objects

new_mode: int | None =

Mode of new file (None for deleted files)

new_path: bytes | None =

Path to new file (None for deleted files)

old_mode: int | None =

Mode of old file (None for new files)

old_path: bytes | None =

Path to old file (None for new files)

rename_from: bytes | None =

Original path for renames (None if not a rename)

rename_to: bytes | None =

New path for renames (None if not a rename)