##// END OF EJS Templates
after hooks cleanup we don't need to have ui injections into repo so we don't need to cache git repos...
marcink -
r3579:11feddcd beta
parent child Browse files
Show More
@@ -317,7 +317,6 b' class SimpleGit(BaseVCSController):'
317 317 from rhodecode.model.db import Repository
318 318 _repo = Repository.get_by_repo_name(repo_name)
319 319 _repo = _repo.scm_instance
320 _repo._repo.ui = baseui
321 320
322 321 _hooks = dict(baseui.configitems('hooks')) or {}
323 322 if action == 'pull':
@@ -64,7 +64,7 b' class GitRepository(BaseRepository):'
64 64 abspath(get_user_home(), '.gitconfig'),
65 65 ]
66 66
67 @ThreadLocalLazyProperty
67 @property
68 68 def _repo(self):
69 69 return Repo(self.path)
70 70
@@ -419,7 +419,9 b' class GitRepository(BaseRepository):'
419 419 return self._get_parsed_refs()
420 420
421 421 def _get_parsed_refs(self):
422 refs = self._repo.get_refs()
422 # cache the property
423 _repo = self._repo
424 refs = _repo.get_refs()
423 425 keys = [('refs/heads/', 'H'),
424 426 ('refs/remotes/origin/', 'RH'),
425 427 ('refs/tags/', 'T')]
@@ -429,9 +431,9 b' class GitRepository(BaseRepository):'
429 431 if ref.startswith(k):
430 432 _key = ref[len(k):]
431 433 if type_ == 'T':
432 obj = self._repo.get_object(sha)
434 obj = _repo.get_object(sha)
433 435 if isinstance(obj, Tag):
434 sha = self._repo.get_object(sha).object[1]
436 sha = _repo.get_object(sha).object[1]
435 437 _refs[_key] = [sha, type_]
436 438 break
437 439 return _refs
General Comments 0
You need to be logged in to leave comments. Login now