allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#5854] Make Tree._lcd_map handle bad LastCommit entries better
Date Wed, 06 Mar 2013 18:52:31 GMT
Updated Branches:
  refs/heads/cj/5854 a0cc6214a -> 96eb44f5a (forced update)


[#5854] Make Tree._lcd_map handle bad LastCommit entries better

Signed-off-by: Cory Johns <johnsca@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/96eb44f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/96eb44f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/96eb44f5

Branch: refs/heads/cj/5854
Commit: 96eb44f5aaac69908a234eab37386fe139d319ae
Parents: 5b00f9d
Author: Cory Johns <johnsca@geek.net>
Authored: Fri Mar 1 20:13:02 2013 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Wed Mar 6 15:17:05 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/96eb44f5/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'],
                             ),


Mime
View raw message