Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/snapshot_context.py
Show First 20 Lines • Show All 833 Lines • ▼ Show 20 Lines | dir_metadata = DirectoryMetadata( | ||||
snapshot=snapshot_id, | snapshot=snapshot_id, | ||||
origin_url=origin_url, | origin_url=origin_url, | ||||
visit_date=visit_date, | visit_date=visit_date, | ||||
visit_type=visit_type, | visit_type=visit_type, | ||||
) | ) | ||||
vault_cooking = { | vault_cooking = { | ||||
"directory_context": True, | "directory_context": True, | ||||
"directory_id": sha1_git, | "directory_swhid": f"swh:1:dir:{sha1_git}", | ||||
"revision_context": True, | "revision_context": True, | ||||
"revision_id": revision_id, | "revision_swhid": f"swh:1:rev:{revision_id}", | ||||
} | } | ||||
swhids_info = get_swhids_info(swh_objects, snapshot_context, dir_metadata) | swhids_info = get_swhids_info(swh_objects, snapshot_context, dir_metadata) | ||||
dir_path = "/".join([bc["name"] for bc in breadcrumbs]) + "/" | dir_path = "/".join([bc["name"] for bc in breadcrumbs]) + "/" | ||||
context_found = "snapshot: %s" % snapshot_context["snapshot_id"] | context_found = "snapshot: %s" % snapshot_context["snapshot_id"] | ||||
if origin_info: | if origin_info: | ||||
context_found = "origin: %s" % origin_info["url"] | context_found = "origin: %s" % origin_info["url"] | ||||
▲ Show 20 Lines • Show All 618 Lines • Show Last 20 Lines |