Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/graph.py
# Copyright (C) 2021 The Software Heritage developers | |||||
# See the AUTHORS file at the top-level directory of this distribution | |||||
# License: GNU General Public License version 3, or any later version | |||||
# See top-level LICENSE file for more information | |||||
from __future__ import annotations | from __future__ import annotations | ||||
from datetime import datetime, timezone | from datetime import datetime, timezone | ||||
import logging | import logging | ||||
import os | import os | ||||
from typing import Any, Dict, Optional, Set | from typing import Any, Dict, Optional, Set | ||||
from swh.model.model import Sha1Git | from swh.model.model import Sha1Git | ||||
from .archive import ArchiveInterface | from .archive import ArchiveInterface | ||||
from .interface import ProvenanceInterface | |||||
from .model import DirectoryEntry, RevisionEntry | from .model import DirectoryEntry, RevisionEntry | ||||
from .provenance import ProvenanceInterface | |||||
UTCMIN = datetime.min.replace(tzinfo=timezone.utc) | UTCMIN = datetime.min.replace(tzinfo=timezone.utc) | ||||
class HistoryNode: | class HistoryNode: | ||||
def __init__( | def __init__( | ||||
self, entry: RevisionEntry, visited: bool = False, in_history: bool = False | self, entry: RevisionEntry, visited: bool = False, in_history: bool = False | ||||
) -> None: | ) -> None: | ||||
▲ Show 20 Lines • Show All 240 Lines • Show Last 20 Lines |