Show More
@@ -429,28 +429,15 b' class GitRemote(object):' | |||
|
429 | 429 | return list(getattr(obj, a) for a in attrs) |
|
430 | 430 | |
|
431 | 431 | @reraise_safe_exceptions |
|
432 |
def get_refs(self, wire |
|
|
433 | # FIXME(skreft): this method is affected by bug | |
|
434 | # http://bugs.rhodecode.com/issues/298. | |
|
435 | # Basically, it will overwrite previously computed references if | |
|
436 | # there's another one with the same name and given the order of | |
|
437 | # repo.get_refs() is not guaranteed, the output of this method is not | |
|
438 | # stable either. | |
|
432 | def get_refs(self, wire): | |
|
439 | 433 | repo = self._factory.repo(wire) |
|
440 | refs = repo.get_refs() | |
|
441 | if keys is None: | |
|
442 | return refs | |
|
443 | 434 | |
|
444 | _refs = {} | |
|
445 | for ref, sha in refs.iteritems(): | |
|
446 | for k, type_ in keys: | |
|
447 | if ref.startswith(k): | |
|
448 | _key = ref[len(k):] | |
|
449 | if type_ == 'T': | |
|
450 | sha = repo.get_object(sha).id | |
|
451 | _refs[_key] = [sha, type_] | |
|
452 | break | |
|
453 | return _refs | |
|
435 | repo.refs._peeled_refs | |
|
436 | result = {} | |
|
437 | for ref, sha in repo.refs.as_dict().items(): | |
|
438 | peeled_sha = repo.refs._peeled_refs.get(ref, sha) | |
|
439 | result[ref] = peeled_sha | |
|
440 | return result | |
|
454 | 441 | |
|
455 | 442 | @reraise_safe_exceptions |
|
456 | 443 | def get_refs_path(self, wire): |
General Comments 0
You need to be logged in to leave comments.
Login now