Trees | Indices | Help |
|
---|
|
Common functionality for Debian and RPM patchqueue management
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
DEFAULT_PQ_BRANCH_NAME =
|
|||
__package__ =
|
|
is branch a patch-queue branch? >>> from optparse import OptionParser >>> (opts, args) = OptionParser().parse_args([]) >>> is_pq_branch("foo", opts) False >>> is_pq_branch("patch-queue/foo", opts) True >>> opts.pq_branch = "%(branch)s/development" >>> is_pq_branch("foo/development/bar", opts) False >>> is_pq_branch("bar/foo/development", opts) True >>> opts.pq_branch = "development" >>> is_pq_branch("development", opts) True >>> opts.pq_branch = "my/%(branch)s/pq" >>> is_pq_branch("my/foo/pqb", opts) False >>> is_pq_branch("my/foo/pq", opts) True |
get the patch queue branch corresponding to branch >>> from optparse import OptionParser >>> (opts, args) = OptionParser().parse_args([]) >>> pq_branch_name("patch-queue/master", opts) >>> pq_branch_name("foo", opts) 'patch-queue/foo' >>> opts.pq_branch = "%(branch)s/development" >>> pq_branch_name("foo", opts) 'foo/development' >>> opts.pq_branch = "development" >>> pq_branch_name("foo", opts) 'development' |
Get the branch corresponding to the given patch queue branch. Returns the packaging/debian branch if pq format string doesn't contain '%(branch)s' key. >>> from optparse import OptionParser >>> (opts, args) = OptionParser().parse_args([]) >>> opts.packaging_branch = "packaging" >>> pq_branch_base("patch-queue/master", opts) 'master' >>> pq_branch_base("foo", opts) >>> opts.pq_branch = "my/%(branch)s/development" >>> pq_branch_base("foo/development", opts) >>> pq_branch_base("my/foo/development/bar", opts) >>> pq_branch_base("my/foo/development", opts) 'foo' >>> opts.pq_branch = "development" >>> pq_branch_base("foo/development", opts) >>> pq_branch_base("development", opts) 'packaging' |
Read a patches header and split it into single lines. We assume the header ends at the first line starting with "diff ..." |
Parse the topic from the patch header removing the corresponding line. This mangles the header in place.
|
Look for the diff stat separator and remove trailing new lines before it. This mangles the header in place.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri May 17 09:11:22 2013 | http://epydoc.sourceforge.net |