pq: fix "no authorship" warning messages
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 9 Nov 2012 05:59:18 +0000 (07:59 +0200)
committerGuido Günther <agx@sigxcpu.org>
Fri, 23 Nov 2012 16:31:32 +0000 (17:31 +0100)
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 <markus.lehtonen@linux.intel.com>
gbp/scripts/common/pq.py

index 4d69c7f..ec3f8d7 100644 (file)
@@ -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()