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) Commit chanages exported from patch queue |

export_patches(repo, branch, options) Export patches from the pq branch into a patch series |

tuple

safe_patches(series) Safe the current patches in a temporary directory below .git/ |

import_quilt_patches(repo, branch, series, tries, force) apply a series of quilt patches in the series file 'series' to branch the patch-queue branch for 'branch' |

rebase_pq(repo, branch) |

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)

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)

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 pqtch queue on @param 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