pq/apply_and_commit_patch: fix date parsing
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 15 Jan 2013 12:54:47 +0000 (14:54 +0200)
committerGuido Günther <agx@sigxcpu.org>
Wed, 16 Jan 2013 19:47:29 +0000 (20:47 +0100)
GitModifier doesn't support dates in the format used in git format-patch
emails.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/scripts/common/pq.py

index 57edd19..ce06353 100644 (file)
@@ -251,10 +251,12 @@ def apply_single_patch(repo, branch, patch, fallback_author, topic=None):
 
 def apply_and_commit_patch(repo, patch, fallback_author, topic=None):
     """apply a single patch 'patch', add topic 'topic' and commit it"""
-    author = GitModifier(patch.author, patch.email, patch.date)
+    author = {'name': patch.author,
+              'email': patch.email,
+              'date': patch.date }
 
     patch_fn = os.path.basename(patch.path)
-    if not (author.name and author.email):
+    if not (author['name'] and author['email']):
         if fallback_author and fallback_author['name']:
             author = fallback_author
             gbp.log.warn("Patch '%s' has no authorship information, using "