comparison rhodecode/model/db.py @ 3549:e4a4006faceb beta

no_cache version of scm is now a function
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 19 Mar 2013 23:43:40 +0100
parents 7cde75eac0fe
children 32aec2a79eed
comparison
equal deleted inserted replaced
3548:b44bb596ddb2 3549:e4a4006faceb
1054 """ 1054 """
1055 from rhodecode.lib.vcs.backends.base import BaseChangeset 1055 from rhodecode.lib.vcs.backends.base import BaseChangeset
1056 if cs_cache is None: 1056 if cs_cache is None:
1057 cs_cache = EmptyChangeset() 1057 cs_cache = EmptyChangeset()
1058 # use no-cache version here 1058 # use no-cache version here
1059 scm_repo = self.scm_instance_no_cache 1059 scm_repo = self.scm_instance_no_cache()
1060 if scm_repo: 1060 if scm_repo:
1061 cs_cache = scm_repo.get_changeset() 1061 cs_cache = scm_repo.get_changeset()
1062 1062
1063 if isinstance(cs_cache, BaseChangeset): 1063 if isinstance(cs_cache, BaseChangeset):
1064 cs_cache = cs_cache.__json__() 1064 cs_cache = cs_cache.__json__()
1151 """ 1151 """
1152 set a cache for invalidation for this instance 1152 set a cache for invalidation for this instance
1153 """ 1153 """
1154 CacheInvalidation.set_invalidate(repo_name=self.repo_name) 1154 CacheInvalidation.set_invalidate(repo_name=self.repo_name)
1155 1155
1156 @LazyProperty
1157 def scm_instance_no_cache(self): 1156 def scm_instance_no_cache(self):
1158 return self.__get_instance() 1157 return self.__get_instance()
1159 1158
1160 @LazyProperty 1159 @LazyProperty
1161 def scm_instance(self): 1160 def scm_instance(self):