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

Module pq_rpm

manage patches in a patch queue

Functions [hide private]
 
compress_patches(patches, compress_size=0)
Rename and/or compress patches
 
write_diff_file(repo, diff_filename, start, end, paths=[])
Write diff between two tree-ishes into a file
 
patch_content_filter(f_in, f_out)
 
patch_fn_filter(commit_info, patch_number=None, ignore_regex=None, topic_regex=None)
Create a patch filename, return None if patch is to be ignored.
 
patch_path_filter(file_status, exclude_regex=None)
Create patch include paths, i.e.
 
generate_patches(repo, start, squash_point, end, squash_diff_name, outdir, options)
Generate patch files from git
 
update_patch_series(repo, spec, start, end, options)
Export patches to packaging directory and update spec file accordingly.
 
export_patches(repo, branch, options)
Export patches from the pq branch into a packaging branch
tuple
safe_patches(queue, tmpdir_base)
Safe the current patches in a temporary directory below 'tmpdir_base'.
 
import_spec_patches(repo, branch, tries, options)
apply a series of patches in a spec/packaging dir to branch the patch-queue branch for 'branch'
 
rebase_pq(repo, branch, options)
 
switch_pq(repo, current, options)
Switch to patch-queue branch if on base branch and vice versa
 
main(argv)
Variables [hide private]
  __package__ = 'gbp.scripts'
Function Details [hide private]

patch_path_filter(file_status, exclude_regex=None)

 

Create patch include paths, i.e. a "negation" of the exclude paths.

safe_patches(queue, tmpdir_base)

 

Safe the current patches in a temporary directory below 'tmpdir_base'. Also, uncompress compressed patches here.

Parameters:
  • queue - an existing patch queue
  • tmpdir_base - base under which to create tmpdir
Returns: tuple
tmpdir and a safed queue (with patches in tmpdir)

import_spec_patches(repo, branch, tries, options)

 

apply a series of patches in a spec/packaging dir to branch the patch-queue branch for 'branch'

Parameters:
  • repo - git repository to work on
  • branch - branch to base pqtch queue on
  • tries - try that many times to apply the patches going back one commit in the branches history after each failure.
  • options - command options