summaryrefslogtreecommitdiff
path: root/gbp/git
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-05-31 10:20:36 +0300
committerGuido Günther <agx@sigxcpu.org>2012-07-27 13:45:51 +0200
commit7f9776f85055fd80549eb164aa8fffa4e0e5535f (patch)
tree5ab553459047fb6c3287461bd40007aaf5ac8887 /gbp/git
parentf4da9649c81a18c5c3aee0e5cedcf3bab85eb033 (diff)
GitRepository/get_commit_info: add author timestamp
Add author timestamps to the info returned by get_commit_info() method. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index b45e5af..3dde513 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1209,8 +1209,8 @@ class GitRepository(object):
@return: the commit's including id, author, email, subject and body
@rtype: dict
"""
- args = GitArgs('--pretty=format:%an%x00%ae%x00%s%x00%b%x00',
- '-z', '--quiet', commit)
+ args = GitArgs('--pretty=format:%an%x00%ae%x00%ad%x00%s%x00%b%x00',
+ '-z', '--quiet', '--date=raw', commit)
out, err, ret = self._git_inout('show', args.args)
if ret:
raise GitRepositoryError("Unable to retrieve commit info for %s"
@@ -1219,12 +1219,13 @@ class GitRepository(object):
fields = out.split('\x00')
author = GitModifier(fields[0].strip(),
- fields[1].strip())
+ fields[1].strip(),
+ fields[2].strip())
return {'id' : commit,
'author' : author,
- 'subject' : fields[2],
- 'body' : fields[3]}
+ 'subject' : fields[3],
+ 'body' : fields[4]}
#{ Patches
def format_patches(self, start, end, output_dir, signature=True, thread=None):