Show More
@@ -429,28 +429,15 b' class GitRemote(object):' | |||||
429 | return list(getattr(obj, a) for a in attrs) |
|
429 | return list(getattr(obj, a) for a in attrs) | |
430 |
|
430 | |||
431 | @reraise_safe_exceptions |
|
431 | @reraise_safe_exceptions | |
432 |
def get_refs(self, wire |
|
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. |
|
|||
439 | repo = self._factory.repo(wire) |
|
433 | repo = self._factory.repo(wire) | |
440 | refs = repo.get_refs() |
|
|||
441 | if keys is None: |
|
|||
442 | return refs |
|
|||
443 |
|
434 | |||
444 | _refs = {} |
|
435 | repo.refs._peeled_refs | |
445 | for ref, sha in refs.iteritems(): |
|
436 | result = {} | |
446 | for k, type_ in keys: |
|
437 | for ref, sha in repo.refs.as_dict().items(): | |
447 | if ref.startswith(k): |
|
438 | peeled_sha = repo.refs._peeled_refs.get(ref, sha) | |
448 | _key = ref[len(k):] |
|
439 | result[ref] = peeled_sha | |
449 | if type_ == 'T': |
|
440 | return result | |
450 | sha = repo.get_object(sha).id |
|
|||
451 | _refs[_key] = [sha, type_] |
|
|||
452 | break |
|
|||
453 | return _refs |
|
|||
454 |
|
441 | |||
455 | @reraise_safe_exceptions |
|
442 | @reraise_safe_exceptions | |
456 | def get_refs_path(self, wire): |
|
443 | def get_refs_path(self, wire): |
General Comments 0
You need to be logged in to leave comments.
Login now