diff --git a/hgitaly/service/ref.py b/hgitaly/service/ref.py index 33027248b45ff6655aa2d8ea8187b296eeaea4f4_aGdpdGFseS9zZXJ2aWNlL3JlZi5weQ==..113debc00d7c3c6c6978c6a794ee900877cfbba5_aGdpdGFseS9zZXJ2aWNlL3JlZi5weQ== 100644 --- a/hgitaly/service/ref.py +++ b/hgitaly/service/ref.py @@ -63,6 +63,9 @@ iter_gitlab_branches, iter_gitlab_branches_as_refs, ) +from ..tag import ( + iter_gitlab_tags_as_refs, +) from .. import message from ..servicer import HGitalyServicer from ..util import chunked @@ -109,9 +112,10 @@ # tags to be in any ordering. At a quick glance it doesn't, but # maye we'll end up with confused users because it'd make no sense # in the UI. - for chunk in chunked(t for t in repo.tags() - if repo.tagtype(t) not in EXCLUDED_TAG_TYPES): - yield FindAllBranchNamesResponse(names=chunk) + tags = (t for t in repo.tags() + if repo.tagtype(t) not in EXCLUDED_TAG_TYPES) + for chunk in chunked(iter_gitlab_tags_as_refs(tags)): + yield FindAllTagNamesResponse(names=chunk) def FindRefName(self, request: FindRefNameRequest, diff --git a/hgitaly/service/tests/test_ref.py b/hgitaly/service/tests/test_ref.py index 33027248b45ff6655aa2d8ea8187b296eeaea4f4_aGdpdGFseS9zZXJ2aWNlL3Rlc3RzL3Rlc3RfcmVmLnB5..113debc00d7c3c6c6978c6a794ee900877cfbba5_aGdpdGFseS9zZXJ2aWNlL3Rlc3RzL3Rlc3RfcmVmLnB5 100644 --- a/hgitaly/service/tests/test_ref.py +++ b/hgitaly/service/tests/test_ref.py @@ -80,7 +80,7 @@ request = FindAllTagNamesRequest(repository=grpc_repo) resp = ref_stub.FindAllTagNames(request) - assert [chunk.names for chunk in resp] == [[b'v3.2.1']] + assert [chunk.names for chunk in resp] == [[b'refs/tags/v3.2.1']] tag = ref_stub.FindTag(FindTagRequest(repository=grpc_repo, tag_name=b'v3.2.1')).tag