Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/storage.py
Show First 20 Lines • Show All 765 Lines • ▼ Show 20 Lines | ) -> Optional[Dict[str, Any]]: | ||||
return self.snapshot_get(snapshot_id, db=db, cur=cur) | return self.snapshot_get(snapshot_id, db=db, cur=cur) | ||||
return None | return None | ||||
@timed | @timed | ||||
@db_transaction(statement_timeout=2000) | @db_transaction(statement_timeout=2000) | ||||
def snapshot_count_branches( | def snapshot_count_branches( | ||||
self, snapshot_id: Sha1Git, db=None, cur=None | self, snapshot_id: Sha1Git, db=None, cur=None | ||||
) -> Optional[Dict[str, int]]: | ) -> Optional[Dict[Optional[str], int]]: | ||||
return dict([bc for bc in db.snapshot_count_branches(snapshot_id, cur)]) | return dict([bc for bc in db.snapshot_count_branches(snapshot_id, cur)]) | ||||
@timed | @timed | ||||
@db_transaction(statement_timeout=2000) | @db_transaction(statement_timeout=2000) | ||||
def snapshot_get_branches( | def snapshot_get_branches( | ||||
self, | self, | ||||
snapshot_id: Sha1Git, | snapshot_id: Sha1Git, | ||||
branches_from: bytes = b"", | branches_from: bytes = b"", | ||||
▲ Show 20 Lines • Show All 664 Lines • Show Last 20 Lines |