allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [7/42] git commit: [#4691] Fixed blob link in tree browser
Date Tue, 05 Feb 2013 20:23:35 GMT
[#4691] Fixed blob link in tree browser

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/0da93a03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0da93a03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0da93a03

Branch: refs/heads/master
Commit: 0da93a03ffb4c55621de68f46bdb6f340d3f8e7c
Parents: 67b875e
Author: Cory Johns <johnsca@geek.net>
Authored: Wed Dec 5 17:27:27 2012 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Feb 5 20:22:50 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0da93a03/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 58c5a5a..bb69f77 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -489,7 +489,7 @@ class Tree(RepoObject):
         return dict(
                 kind=dirent.type,
                 name=dirent.name,
-                href=dirent.name + '/',
+                href=dirent.name,
                 last_commit=dict(
                         author=dirent.commit_info.author,
                         author_email=dirent.commit_info.author_email,
@@ -607,11 +607,11 @@ class Blob(object):
 
     @LazyProperty
     def prev_commit(self):
-        lc = self.repo.get_last_commit(self)
-        if lc['id']:
-            last_commit = self.repo.commit(lc.id)
-            if last_commit.parent_ids:
-                return self.repo.commit(last_commit.parent_ids[0])
+        lc = LastCommit.get(self.tree)
+        if lc:
+            entry = lc.entry_by_name(self.name)
+            last_commit = self.repo.commit(entry.commit_info.id)
+            return last_commit.get_parent()
         return None
 
     @LazyProperty


Mime
View raw message