Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/backfill.py
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | with db.cursor() as cur: | ||||
entry = DirectoryEntry( | entry = DirectoryEntry( | ||||
name=entry_d["name"], | name=entry_d["name"], | ||||
type=type, | type=type, | ||||
target=entry_d["target"], | target=entry_d["target"], | ||||
perms=entry_d["perms"], | perms=entry_d["perms"], | ||||
) | ) | ||||
entries.append(entry) | entries.append(entry) | ||||
return Directory(id=directory_d["id"], entries=tuple(entries),) | return Directory( | ||||
id=directory_d["id"], | |||||
entries=tuple(entries), | |||||
raw_manifest=directory_d["raw_manifest"], | |||||
) | |||||
def raw_extrinsic_metadata_converter( | def raw_extrinsic_metadata_converter( | ||||
db: BaseDb, metadata: Dict[str, Any] | db: BaseDb, metadata: Dict[str, Any] | ||||
) -> RawExtrinsicMetadata: | ) -> RawExtrinsicMetadata: | ||||
"""Convert a raw extrinsic metadata from the flat representation to swh model | """Convert a raw extrinsic metadata from the flat representation to swh model | ||||
compatible objects. | compatible objects. | ||||
▲ Show 20 Lines • Show All 439 Lines • Show Last 20 Lines |