From f5f431415ed30fb838f2d2e962f3476b759bec30 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 28 Jan 2015 19:03:34 +0200 Subject: pq_rpm: add 'options' to some functions Various functions in scripts/pq_rpm.py did not have the extra options parameter. Add it. --- gbp/scripts/pq_rpm.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gbp/scripts/pq_rpm.py b/gbp/scripts/pq_rpm.py index 3c22ccb..af184af 100755 --- a/gbp/scripts/pq_rpm.py +++ b/gbp/scripts/pq_rpm.py @@ -193,13 +193,13 @@ def find_upstream_commit(repo, spec, upstream_tag): def export_patches(repo, options): """Export patches from the pq branch into a packaging branch""" current = repo.get_branch() - if is_pq_branch(current): - base = pq_branch_base(current) + if is_pq_branch(current, options): + base = pq_branch_base(current, options) gbp.log.info("On branch '%s', switching to '%s'" % (current, base)) repo.set_branch(base) pq_branch = current else: - pq_branch = pq_branch_name(current) + pq_branch = pq_branch_name(current, options) spec = parse_spec(options, repo) upstream_commit = find_upstream_commit(repo, spec, options.upstream_tag) export_treeish = pq_branch @@ -271,8 +271,8 @@ def import_spec_patches(repo, options): """ current = repo.get_branch() # Get spec and related information - if is_pq_branch(current): - base = pq_branch_base(current) + if is_pq_branch(current, options): + base = pq_branch_base(current, options) if options.force: spec = parse_spec(options, repo, base) spec_treeish = base @@ -285,7 +285,7 @@ def import_spec_patches(repo, options): base = current upstream_commit = find_upstream_commit(repo, spec, options.upstream_tag) packager = get_packager(spec) - pq_branch = pq_branch_name(base) + pq_branch = pq_branch_name(base, options) # Create pq-branch if repo.has_branch(pq_branch) and not options.force: @@ -333,15 +333,15 @@ def import_spec_patches(repo, options): def rebase_pq(repo, options): """Rebase pq branch on the correct upstream version (from spec file).""" current = repo.get_branch() - if is_pq_branch(current): - base = pq_branch_base(current) + if is_pq_branch(current, options): + base = pq_branch_base(current, options) spec = parse_spec(options, repo, base) else: base = current spec = parse_spec(options, repo) upstream_commit = find_upstream_commit(repo, spec, options.upstream_tag) - switch_to_pq_branch(repo, base) + switch_to_pq_branch(repo, base, options) GitCommand("rebase")([upstream_commit]) @@ -443,14 +443,14 @@ def main(argv): elif action == "import": import_spec_patches(repo, options) elif action == "drop": - drop_pq(repo, current) + drop_pq(repo, current, options) elif action == "rebase": rebase_pq(repo, options) elif action == "apply": patch = Patch(patchfile) - apply_single_patch(repo, current, patch, fallback_author=None) + apply_single_patch(repo, current, patch, fallback_author=None, options=options) elif action == "switch": - switch_pq(repo, current) + switch_pq(repo, current, options) except CommandExecFailed: retval = 1 except GitRepositoryError as err: -- cgit v1.2.3