From 6e35169cabbe8ca5e361101ab4d8239272ef4c2a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 12 Mar 2008 22:23:19 -0400 Subject: multiple parent issue; TODO --- bn_django/git_browse/models.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bn_django') diff --git a/bn_django/git_browse/models.py b/bn_django/git_browse/models.py index 7c41ad6..e805199 100644 --- a/bn_django/git_browse/models.py +++ b/bn_django/git_browse/models.py @@ -231,8 +231,16 @@ class Commit(models.Model): if not raw[1].startswith('parent'): raw.insert(1, 'parent ') self.parenthash = raw[1][6:].strip() - self.author = raw[2].split()[1] - self.author_date = time.ctime(int(raw[2].split()[-2])) + if raw[2].startswith('author'): + self.author = raw[2].split()[1] + self.author_date = time.ctime(int(raw[2].split()[-2])) + elif raw[3].startswith('author'): + self.author = raw[3].split()[1] + self.author_date = time.ctime(int(raw[3].split()[-2])) + elif raw[4].startswith('author'): + self.author = raw[4].split()[1] + self.author_date = time.ctime(int(raw[4].split()[-2])) + else: return self.committer = raw[3].split()[1] self.committer_date = time.ctime(int(raw[3].split()[-2])) self.rawdiff = commands.getoutput(GITPREFIX + ' diff ' \ -- cgit v1.2.3