summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@debian.org>2015-01-28 19:03:34 +0200
committerTzafrir Cohen <tzafrir@debian.org>2015-03-26 16:18:44 +0200
commitf5f431415ed30fb838f2d2e962f3476b759bec30 (patch)
tree7ba3d10613ed5c9c6928ff9c1b5fed0fb69a9c63
parent73ee012e2e9a5b5ccb02b7c612f0a01a93536b14 (diff)
pq_rpm: add 'options' to some functionsbuildpackage-rpm
Various functions in scripts/pq_rpm.py did not have the extra options parameter. Add it.
-rwxr-xr-xgbp/scripts/pq_rpm.py24
1 files 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: