module documentation

Manage Debian patches on a patch queue branch

Function build_parser Undocumented
Function check_clean Undocumented
Function commit_patches Commit chanages exported from patch queue
Function compare_series Compare new pathes to lists of patches already exported
Function export_patches Export patches from the pq branch into a patch series
Function find_upstream_commit Find commit corresponding to upstream version based on changelog
Function format_series_diff Format the patch differences into a suitable commit message
Function generate_patches Generate patch files from git
Function import_pq Import quilt patches onto pq branch
Function import_quilt_patches apply a series of quilt patches in the series file 'series' to branch the patch-queue branch for 'branch'
Function main Undocumented
Function maybe_import_pq Import quilt patches onto pq branch if pq branch does not exist yet
Function parse_args Undocumented
Function parse_old_style_topic Parse 'gbp-pq-topic:' line(s) from commit info
Function pq_on_upstream_tag Return True if the patch queue is based on the uptream tag, False if its based on the debian packaging branch
Function rebase_pq Undocumented
Function safe_patches Safe the current patches in a temporary directory below .git/
Function switch_pq Switch to patch-queue branch if on base branch and vice versa
Function usage_msg Undocumented
Constant PATCH_DIR Undocumented
Constant SERIES_FILE Undocumented
def build_parser(name):

Undocumented

def check_clean(repo, options):

Undocumented

def commit_patches(repo, branch, patches, options, patch_dir):

Commit chanages exported from patch queue

def compare_series(old, new):

Compare new pathes to lists of patches already exported

>>> compare_series(['# comment', 'a', 'b'], ['b', 'c'])
(['c'], ['a'])
>>> compare_series([], [])
([], [])
def export_patches(repo, branch, options):

Export patches from the pq branch into a patch series

def find_upstream_commit(repo, branch, upstream_tag):

Find commit corresponding to upstream version based on changelog

def format_series_diff(added, removed, options):

Format the patch differences into a suitable commit message

>>> format_series_diff(['a'], ['b'], None)
'Rediff patches\n\nAdd a: <REASON>\nDrop b: <REASON>\n'
def generate_patches(repo, start, end, outdir, options):

Generate patch files from git

def import_pq(repo, branch, options):

Import quilt patches onto pq branch

def import_quilt_patches(repo, branch, series, tries, force, pq_from, upstream_tag):

apply a series of quilt patches in the series file 'series' to branch the patch-queue branch for 'branch'

Parameters
repogit repository to work on
branchbranch to base patch queue on
seriesseries file to read patches from
triestry that many times to apply the patches going back one commit in the branches history after each failure.
forceimport the patch series even if the branch already exists
pq_fromwhat to use as the starting point for the pq branch. DEBIAN indicates the current branch, TAG indicates that the corresponding upstream tag should be used.
upstream_tagupstream tag template to use
def main(argv):

Undocumented

def maybe_import_pq(repo, branch, options):

Import quilt patches onto pq branch if pq branch does not exist yet

def parse_args(argv):

Undocumented

def parse_old_style_topic(commit_info):

Parse 'gbp-pq-topic:' line(s) from commit info

def pq_on_upstream_tag(pq_from):

Return True if the patch queue is based on the uptream tag, False if its based on the debian packaging branch

def rebase_pq(repo, branch, options):

Undocumented

def safe_patches(series, repo):

Safe the current patches in a temporary directory below .git/

Parameters
seriespath to series file
repoUndocumented
Returns
tupletmpdir and path to safed series file
def switch_pq(repo, branch, options):

Switch to patch-queue branch if on base branch and vice versa

def usage_msg():

Undocumented

PATCH_DIR: str =

Undocumented

Value
'debian/patches/'
SERIES_FILE =

Undocumented

Value
os.path.join(PATCH_DIR, 'series')