Changeset View
Changeset View
Standalone View
Standalone View
swh/web/common/archive.py
# Copyright (C) 2015-2021 The Software Heritage developers | # Copyright (C) 2015-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from collections import defaultdict | from collections import defaultdict | ||||
import itertools | import itertools | ||||
import os | import os | ||||
import re | import re | ||||
from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, Union | from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, Union | ||||
from urllib.parse import urlparse | from urllib.parse import urlparse | ||||
from swh.model import hashutil | from swh.model import hashutil | ||||
from swh.model.identifiers import CoreSWHID, ObjectType | |||||
from swh.model.model import OriginVisit, Revision | from swh.model.model import OriginVisit, Revision | ||||
from swh.model.swhids import CoreSWHID, ObjectType | |||||
from swh.storage.algos import diff, revisions_walker | from swh.storage.algos import diff, revisions_walker | ||||
from swh.storage.algos.origin import origin_get_latest_visit_status | from swh.storage.algos.origin import origin_get_latest_visit_status | ||||
from swh.storage.algos.snapshot import snapshot_get_latest, snapshot_resolve_alias | from swh.storage.algos.snapshot import snapshot_get_latest, snapshot_resolve_alias | ||||
from swh.vault.exc import NotFoundExc as VaultNotFoundExc | from swh.vault.exc import NotFoundExc as VaultNotFoundExc | ||||
from swh.web import config | from swh.web import config | ||||
from swh.web.common import converters, query | from swh.web.common import converters, query | ||||
from swh.web.common.exc import NotFoundExc | from swh.web.common.exc import NotFoundExc | ||||
from swh.web.common.typing import ( | from swh.web.common.typing import ( | ||||
▲ Show 20 Lines • Show All 1,382 Lines • Show Last 20 Lines |