Patcher module

class rebasehelper.patcher.Patcher[source]

Class for git command used for patching old and new sources

classmethod apply_old_patches(source_dir)[source]

Function applies a patch to a old/new sources

classmethod apply_patch(repo, patch_object)[source]

Function applies patches to old sources It tries apply patch with am command and if it fails then with command –apply

static decorate_patch_name(patch_name)[source]
classmethod extract_patch_name(message)[source]
classmethod init_git(directory)[source]

Function initialize old and new Git repository

classmethod insert_patch_name(message, patch_name)[source]
new_repo: Repo | None = None
new_sources: str | None = None
non_interactive: bool = False
old_repo: Repo | None = None
old_sources: str | None = None
output_data: str | None = None
classmethod patch(old_dir, new_dir, rest_sources, patches, **kwargs)[source]

The function can be used for patching one directory against another

patches: List[PatchObject] = []
classmethod strip_patch_name(diff, patch_name)[source]