Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/views/revision.py
Show First 20 Lines • Show All 438 Lines • ▼ Show 20 Lines | for pi in path_info: | ||||
url_args={"sha1_git": sha1_git}, | url_args={"sha1_git": sha1_git}, | ||||
query_params=query_params, | query_params=query_params, | ||||
), | ), | ||||
} | } | ||||
) | ) | ||||
vault_cooking = { | vault_cooking = { | ||||
"directory_context": False, | "directory_context": False, | ||||
"directory_id": None, | "directory_swhid": None, | ||||
"revision_context": True, | "revision_context": True, | ||||
"revision_id": sha1_git, | "revision_swhid": f"swh:1:rev:{sha1_git}", | ||||
} | } | ||||
swh_objects = [SWHObjectInfo(object_type=REVISION, object_id=sha1_git)] | swh_objects = [SWHObjectInfo(object_type=REVISION, object_id=sha1_git)] | ||||
content = None | content = None | ||||
content_size = None | content_size = None | ||||
filename = None | filename = None | ||||
mimetype = None | mimetype = None | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | else: | ||||
top_right_link = { | top_right_link = { | ||||
"url": get_revision_log_url(sha1_git, snapshot_context), | "url": get_revision_log_url(sha1_git, snapshot_context), | ||||
"icon": swh_object_icons["revisions history"], | "icon": swh_object_icons["revisions history"], | ||||
"text": "History", | "text": "History", | ||||
} | } | ||||
vault_cooking["directory_context"] = True | vault_cooking["directory_context"] = True | ||||
vault_cooking["directory_id"] = dir_id | vault_cooking["directory_swhid"] = f"swh:1:dir:{dir_id}" | ||||
swh_objects.append(SWHObjectInfo(object_type=DIRECTORY, object_id=dir_id)) | swh_objects.append(SWHObjectInfo(object_type=DIRECTORY, object_id=dir_id)) | ||||
query_params.pop("path", None) | query_params.pop("path", None) | ||||
diff_revision_url = reverse( | diff_revision_url = reverse( | ||||
"diff-revision", url_args={"sha1_git": sha1_git}, query_params=query_params, | "diff-revision", url_args={"sha1_git": sha1_git}, query_params=query_params, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |