summaryrefslogtreecommitdiff
path: root/gbp/scripts/pq.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-11-23 18:32:34 +0100
committerGuido Günther <agx@sigxcpu.org>2012-11-23 19:24:12 +0100
commit395209152ef4ef4e0b17b239462bc470513b5540 (patch)
tree4c6f22a438fe5d6976586117a2b60b414f8b16ac /gbp/scripts/pq.py
parentd248720ff924801d8e3de6291d3b2e512169a3ca (diff)
downloadgit-buildpackage-395209152ef4ef4e0b17b239462bc470513b5540.tar.gz
git-buildpackage-395209152ef4ef4e0b17b239462bc470513b5540.tar.bz2
git-buildpackage-395209152ef4ef4e0b17b239462bc470513b5540.zip
pq: Allow to pass in custom fucntion to fetch authorship information
so the RPM based tools don't need to rely on a control file but can e.g. look at the spec file.
Diffstat (limited to 'gbp/scripts/pq.py')
-rwxr-xr-xgbp/scripts/pq.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index fbd59a79..bc572388 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -31,7 +31,7 @@ from gbp.patch_series import (PatchSeries, Patch)
from gbp.scripts.common.pq import (is_pq_branch, pq_branch_name, pq_branch_base,
write_patch, switch_to_pq_branch,
apply_single_patch, apply_and_commit_patch,
- drop_pq)
+ drop_pq, get_maintainer_from_control)
PATCH_DIR = "debian/patches/"
SERIES_FILE = os.path.join(PATCH_DIR,"series")
@@ -146,7 +146,9 @@ def import_quilt_patches(repo, branch, series, tries, force):
for patch in queue:
gbp.log.debug("Applying %s" % patch.path)
try:
- apply_and_commit_patch(repo, patch, patch.topic)
+ apply_and_commit_patch(repo, patch,
+ get_maintainer_from_control,
+ patch.topic)
except (GbpError, GitRepositoryError):
repo.set_branch(branch)
repo.delete_branch(pq_branch)
@@ -250,7 +252,9 @@ def main(argv):
rebase_pq(repo, current)
elif action == "apply":
patch = Patch(patchfile)
- apply_single_patch(repo, current, patch, options.topic)
+ apply_single_patch(repo, current, patch,
+ get_maintainer_from_control,
+ options.topic)
elif action == "switch":
switch_pq(repo, current)
except CommandExecFailed: