allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject allura git commit: [#7873] Performance improvements when accessing tags and branches in git
Date Fri, 05 Jun 2015 18:55:26 GMT
Repository: allura
Updated Branches:
  refs/heads/hs/7873 5dc45f5c9 -> 6027e4e6f (forced update)


[#7873] Performance improvements when accessing tags and branches in git


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6027e4e6
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6027e4e6
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6027e4e6

Branch: refs/heads/hs/7873
Commit: 6027e4e6fe5e8ab3f107a3c8b60e3cd8bb115d8e
Parents: 8afd9b0
Author: Heith Seewald <hseewald@slashdotmedia.com>
Authored: Tue May 5 13:47:19 2015 +0000
Committer: Heith Seewald <hseewald@slashdotmedia.com>
Committed: Fri Jun 5 14:53:25 2015 -0400

----------------------------------------------------------------------
 ForgeGit/forgegit/git_main.py       | 2 +-
 ForgeGit/forgegit/model/git_repo.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/6027e4e6/ForgeGit/forgegit/git_main.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/git_main.py b/ForgeGit/forgegit/git_main.py
index 62fc0f7..bb19ec3 100644
--- a/ForgeGit/forgegit/git_main.py
+++ b/ForgeGit/forgegit/git_main.py
@@ -66,7 +66,7 @@ class ForgeGitApp(RepositoryApp):
     def repo(self):
         return GM.Repository.query.get(app_config_id=self.config._id)
 
-    @property
+    @LazyProperty
     def default_branch_name(self):
         return self.repo.get_default_branch('master')
 

http://git-wip-us.apache.org/repos/asf/allura/blob/6027e4e6/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 416db33..5470e72 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -549,15 +549,15 @@ class GitImplementation(M.RepositoryImplementation):
 
     @LazyProperty
     def heads(self):
-        return [Object(name=b.name, object_id=b.commit.hexsha) for b in self._git.heads if
b.is_valid()]
+        return [Object(name=b.name, object_id=b.commit.hexsha) for b in self._git.heads]
 
     @LazyProperty
     def branches(self):
-        return [Object(name=b.name, object_id=b.commit.hexsha) for b in self._git.branches
if b.is_valid()]
+        return [Object(name=b.name, object_id=b.commit.hexsha) for b in self._git.branches]
 
     @LazyProperty
     def tags(self):
-        return [Object(name=t.name, object_id=t.commit.hexsha) for t in self._git.tags if
t.is_valid()]
+        return [Object(name=t.name, object_id=t.commit.hexsha) for t in self._git.tags]
 
     def set_default_branch(self, name):
         if not name:


Mime
View raw message