aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@charm.mit.edu>2008-03-12 22:23:19 -0400
committerBryan Newbold <bnewbold@charm.mit.edu>2008-03-12 22:23:19 -0400
commit6e35169cabbe8ca5e361101ab4d8239272ef4c2a (patch)
tree0532fb89310df9c5ca19fc8baacea5bf6baac906 /bn_django
parent4c1e57f99caa6995b5a0c4fc362f10ac57d2557d (diff)
downloadbnewnet-6e35169cabbe8ca5e361101ab4d8239272ef4c2a.tar.gz
bnewnet-6e35169cabbe8ca5e361101ab4d8239272ef4c2a.zip
multiple parent issue; TODO
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/git_browse/models.py12
1 files changed, 10 insertions, 2 deletions
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 ' \