Package gbp :: Package scripts :: Module pq
[hide private]
[frames] | no frames]

Module pq

Manage Debian patches on a patch queue branch

Functions [hide private]
 
parse_old_style_topic(commit_info)
Parse 'gbp-pq-topic:' line(s) from commit info
 
generate_patches(repo, start, end, outdir, options)
Generate patch files from git
 
compare_series(old, new)
Compare new pathes to lists of patches already exported
 
format_series_diff(added, removed, options)
Format the patch differences into a suitable commit message
 
commit_patches(repo, branch, patches, options, patch_dir)
Commit chanages exported from patch queue
 
find_upstream_commit(repo, branch, upstream_tag)
Find commit corresponding upstream version based on changelog
 
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
 
export_patches(repo, branch, options)
Export patches from the pq branch into a patch series
tuple
safe_patches(series, repo)
Safe the current patches in a temporary directory below .git/
 
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'
 
rebase_pq(repo, branch, pq_from, upstream_tag)
 
usage_msg()
 
build_parser(name)
 
parse_args(argv)
 
main(argv)
Variables [hide private]
  PATCH_DIR = 'debian/patches/'
  SERIES_FILE = 'debian/patches/series'
  __package__ = 'gbp.scripts'
Function Details [hide private]

compare_series(old, new)

 

Compare new pathes to lists of patches already exported

>>> compare_series(['a', 'b'], ['b', 'c'])
(['c'], ['a'])
>>> compare_series([], [])
([], [])

format_series_diff(added, removed, options)

 

Format the patch differences into a suitable commit message

>>> format_series_diff(['a'], ['b'], None)
'Rediff patches\n\nAdded a: <REASON>\nDropped b: <REASON>\n'

safe_patches(series, repo)

 

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

Parameters:
  • series - path to series file
Returns: tuple
tmpdir and path to safed series file

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:
  • repo - git repository to work on
  • branch - branch to base patch queue on
  • series - series file to read patches from
  • tries - try that many times to apply the patches going back one commit in the branches history after each failure.
  • force - import the patch series even if the branch already exists
  • pq_from - what 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_tag - upstream tag template to use