From 62dcf136d5b71c0b4d5744ec3551ce82edcc2a94 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 11 Aug 2008 18:06:52 -0700 Subject: fixed a parent issue --- bn_django/git_wiki/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bn_django/git_wiki') diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py index ba0f5c9..2614739 100644 --- a/bn_django/git_wiki/models.py +++ b/bn_django/git_wiki/models.py @@ -151,6 +151,10 @@ class Commit(models.Model): if raw[1].startswith('parent'): self.parenthash = raw[1][6:].strip() raw.pop(1) + # Sometimes there are multiple parents; this ignores all but the + # first + while raw[1].startswith('parent'): + raw.pop(1) self.author = raw[1].split()[1] self.author_date = time.ctime(int(raw[1].split()[-2])) self.committer = raw[2].split()[1] -- cgit v1.2.3