Show More
@@ -317,7 +317,6 class SimpleGit(BaseVCSController): | |||||
317 | from rhodecode.model.db import Repository |
|
317 | from rhodecode.model.db import Repository | |
318 | _repo = Repository.get_by_repo_name(repo_name) |
|
318 | _repo = Repository.get_by_repo_name(repo_name) | |
319 | _repo = _repo.scm_instance |
|
319 | _repo = _repo.scm_instance | |
320 | _repo._repo.ui = baseui |
|
|||
321 |
|
320 | |||
322 | _hooks = dict(baseui.configitems('hooks')) or {} |
|
321 | _hooks = dict(baseui.configitems('hooks')) or {} | |
323 | if action == 'pull': |
|
322 | if action == 'pull': |
@@ -64,7 +64,7 class GitRepository(BaseRepository): | |||||
64 | abspath(get_user_home(), '.gitconfig'), |
|
64 | abspath(get_user_home(), '.gitconfig'), | |
65 | ] |
|
65 | ] | |
66 |
|
66 | |||
67 | @ThreadLocalLazyProperty |
|
67 | @property | |
68 | def _repo(self): |
|
68 | def _repo(self): | |
69 | return Repo(self.path) |
|
69 | return Repo(self.path) | |
70 |
|
70 | |||
@@ -419,7 +419,9 class GitRepository(BaseRepository): | |||||
419 | return self._get_parsed_refs() |
|
419 | return self._get_parsed_refs() | |
420 |
|
420 | |||
421 | def _get_parsed_refs(self): |
|
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 | keys = [('refs/heads/', 'H'), |
|
425 | keys = [('refs/heads/', 'H'), | |
424 | ('refs/remotes/origin/', 'RH'), |
|
426 | ('refs/remotes/origin/', 'RH'), | |
425 | ('refs/tags/', 'T')] |
|
427 | ('refs/tags/', 'T')] | |
@@ -429,9 +431,9 class GitRepository(BaseRepository): | |||||
429 | if ref.startswith(k): |
|
431 | if ref.startswith(k): | |
430 | _key = ref[len(k):] |
|
432 | _key = ref[len(k):] | |
431 | if type_ == 'T': |
|
433 | if type_ == 'T': | |
432 |
obj = |
|
434 | obj = _repo.get_object(sha) | |
433 | if isinstance(obj, Tag): |
|
435 | if isinstance(obj, Tag): | |
434 |
sha = |
|
436 | sha = _repo.get_object(sha).object[1] | |
435 | _refs[_key] = [sha, type_] |
|
437 | _refs[_key] = [sha, type_] | |
436 | break |
|
438 | break | |
437 | return _refs |
|
439 | return _refs |
General Comments 0
You need to be logged in to leave comments.
Login now