Skip to content
Snippets Groups Projects
Commit 0adfcb6f authored by Georges Racinet's avatar Georges Racinet
Browse files

ref service: FindAllRemoteBranches

In this first implementation, that's easy: there is no concept
of remote branches in Mercurial.

Although, on second thought, in GitLab they could be related to
mirroring features, and we may need to have something similar
for Mercurial at some point which would be provided by an extension,
that we'd write ourselves if it doesn't exist already.
parent bf7abe24
No related branches found
No related tags found
No related merge requests found
Pipeline #7095 passed with warnings
......@@ -28,6 +28,8 @@
FindLocalBranchCommitAuthor,
FindLocalBranchResponse,
FindLocalBranchesResponse,
FindAllRemoteBranchesRequest,
FindAllRemoteBranchesResponse,
FindAllBranchesRequest,
FindAllBranchesResponse,
FindBranchRequest,
......@@ -150,6 +152,12 @@
for name, head in chunk),
)
def FindAllRemoteBranches(self,
request: FindAllRemoteBranchesRequest,
context) -> FindAllRemoteBranchesResponse:
"""There is no concept of "remote branch" in Mercurial."""
return iter(())
def FindAllBranches(self,
request: FindAllBranchesRequest,
context) -> FindAllBranchesResponse:
......
......@@ -11,6 +11,7 @@
FindAllTagNamesRequest,
FindBranchRequest,
FindLocalBranchesRequest,
FindAllRemoteBranchesRequest,
FindAllBranchesRequest,
)
from ..stub.ref_pb2_grpc import RefServiceStub
......@@ -106,3 +107,7 @@
assert len(branches) == 1
assert branches[0].name == b'branch/default'
assert branches[0].target == branch.target_commit
resp = list(ref_stub.FindAllRemoteBranches(
FindAllRemoteBranchesRequest(repository=grpc_repo)))
assert not resp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment