Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/backends/archive.py
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | class Archive: | ||||
def get_snapshot_branches( | def get_snapshot_branches( | ||||
self, | self, | ||||
snapshot: Sha1Git, | snapshot: Sha1Git, | ||||
after: bytes = b"", | after: bytes = b"", | ||||
first: int = 50, | first: int = 50, | ||||
target_types: Optional[List[str]] = None, | target_types: Optional[List[str]] = None, | ||||
name_include: Optional[bytes] = None, | name_include: Optional[bytes] = None, | ||||
name_exclude_prefix: Optional[bytes] = None, | |||||
) -> Optional[PartialBranches]: | ) -> Optional[PartialBranches]: | ||||
return self.storage.snapshot_get_branches( | return self.storage.snapshot_get_branches( | ||||
snapshot_id=snapshot, | snapshot_id=snapshot, | ||||
branches_from=after, | branches_from=after, | ||||
branches_count=first, | branches_count=first, | ||||
target_types=target_types, | target_types=target_types, | ||||
branch_name_include_substring=name_include, | branch_name_include_substring=name_include, | ||||
branch_name_exclude_prefix=name_exclude_prefix, | |||||
) | ) | ||||
def get_revisions(self, revision_ids: List[Sha1Git]) -> List[Optional[Revision]]: | def get_revisions(self, revision_ids: List[Sha1Git]) -> List[Optional[Revision]]: | ||||
return self.storage.revision_get(revision_ids=revision_ids) | return self.storage.revision_get(revision_ids=revision_ids) | ||||
def get_revision_log( | def get_revision_log( | ||||
self, revision_ids: List[Sha1Git], first: int = 50 | self, revision_ids: List[Sha1Git], first: int = 50 | ||||
) -> Iterable[Optional[Dict[str, Any]]]: | ) -> Iterable[Optional[Dict[str, Any]]]: | ||||
Show All 35 Lines |