You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/03/06 19:52:56 UTC
[5/5] git commit: [#5854] Make Tree._lcd_map handle bad LastCommit
entries better
Updated Branches:
refs/heads/cj/5854 96eb44f5a -> 4ad63a29a (forced update)
[#5854] Make Tree._lcd_map handle bad LastCommit entries better
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4ad63a29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4ad63a29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4ad63a29
Branch: refs/heads/cj/5854
Commit: 4ad63a29a1fa1501c6e3e21d6aa5e81aa25f8960
Parents: 045c80d
Author: Cory Johns <jo...@geek.net>
Authored: Fri Mar 1 20:13:02 2013 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Wed Mar 6 18:52:46 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4ad63a29/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 1510de6..4380d0c 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -542,7 +542,9 @@ class Tree(RepoObject):
for name in names:
commit_info = commit_infos.get(lcd.by_name.get(name))
if not commit_info:
- continue
+ commit_info = defaultdict(str)
+ elif 'id' in commit_info:
+ commit_info['href'] = self.repo.url_for_commit(commit_info['id'])
results.append(dict(
kind=type,
name=name,
@@ -552,7 +554,7 @@ class Tree(RepoObject):
author_email=commit_info['author_email'],
author_url=commit_info['author_url'],
date=commit_info['date'],
- href=self.repo.url_for_commit(commit_info['id']),
+ href=commit_info.get('href',''),
shortlink=commit_info['shortlink'],
summary=commit_info['summary'],
),