summaryrefslogtreecommitdiff
path: root/gbp/scripts/common/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/common/pq.py
parentd248720ff924801d8e3de6291d3b2e512169a3ca (diff)
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/common/pq.py')
-rw-r--r--gbp/scripts/common/pq.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gbp/scripts/common/pq.py b/gbp/scripts/common/pq.py
index cff5bf3..3f93967 100644
--- a/gbp/scripts/common/pq.py
+++ b/gbp/scripts/common/pq.py
@@ -145,12 +145,12 @@ def switch_to_pq_branch(repo, branch):
repo.set_branch(pq_branch)
-def apply_single_patch(repo, branch, patch, topic=None):
+def apply_single_patch(repo, branch, patch, get_author_info, topic=None):
switch_to_pq_branch(repo, branch)
- apply_and_commit_patch(repo, patch, topic)
+ apply_and_commit_patch(repo, patch, get_author_info, topic)
-def apply_and_commit_patch(repo, patch, topic=None):
+def apply_and_commit_patch(repo, patch, get_author_info, topic=None):
"""apply a single patch 'patch', add topic 'topic' and commit it"""
author = {'name': patch.author,
'email': patch.email,
@@ -158,7 +158,7 @@ def apply_and_commit_patch(repo, patch, topic=None):
patch_fn = os.path.basename(patch.path)
if not (patch.author and patch.email):
- name, email = get_maintainer_from_control(repo)
+ name, email = get_author_info(repo)
if name:
gbp.log.warn("Patch '%s' has no authorship information, "
"using '%s <%s>'" % (patch_fn, name, email))