From 932b1c07a7ff38b6c774e9a5c63a8ac18960d74c Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 9 Nov 2012 07:59:18 +0200 Subject: [PATCH] pq: fix "no authorship" warning messages Add one missing string field. Show the patch filename instead of the pull path - the user doesn't need to know if the patch was applied from a temporary directory, for example. Signed-off-by: Markus Lehtonen --- gbp/scripts/common/pq.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gbp/scripts/common/pq.py b/gbp/scripts/common/pq.py index 4d69c7f..ec3f8d7 100644 --- a/gbp/scripts/common/pq.py +++ b/gbp/scripts/common/pq.py @@ -154,15 +154,16 @@ def apply_and_commit_patch(repo, patch, topic=None): 'email': patch.email, 'date': patch.date } + patch_fn = os.path.basename(patch.path) if not (patch.author and patch.email): name, email = get_maintainer_from_control() if name: gbp.log.warn("Patch '%s' has no authorship information, " - "using '%s <%s>'" % (patch.path, name, email)) + "using '%s <%s>'" % (patch_fn, name, email)) author['name'] = name author['email'] = email else: - gbp.log.warn("Patch %s has no authorship information") + gbp.log.warn("Patch '%s' has no authorship information" % patch_fn) repo.apply_patch(patch.path, strip=patch.strip) tree = repo.write_tree() -- 2.7.4