Page MenuHomeSoftware Heritage

D6713.id24719.diff
No OneTemporary

D6713.id24719.diff

diff --git a/swh/provenance/graph.py b/swh/provenance/graph.py
--- a/swh/provenance/graph.py
+++ b/swh/provenance/graph.py
@@ -54,8 +54,8 @@
@statsd.timed(metric=GRAPH_DURATION_METRIC, tags={"method": "build_history_graph"})
def __init__(
self,
- archive: ArchiveInterface,
provenance: ProvenanceInterface,
+ archive: ArchiveInterface,
revision: RevisionEntry,
) -> None:
self._head = HistoryNode(
@@ -172,8 +172,8 @@
@statsd.timed(metric=GRAPH_DURATION_METRIC, tags={"method": "build_isochrone_graph"})
def build_isochrone_graph(
- archive: ArchiveInterface,
provenance: ProvenanceInterface,
+ archive: ArchiveInterface,
revision: RevisionEntry,
directory: DirectoryEntry,
minsize: int = 0,
diff --git a/swh/provenance/origin.py b/swh/provenance/origin.py
--- a/swh/provenance/origin.py
+++ b/swh/provenance/origin.py
@@ -55,7 +55,7 @@
provenance.origin_add(origin)
origin.retrieve_revisions(archive)
for revision in origin.revisions:
- graph = HistoryGraph(archive, provenance, revision)
+ graph = HistoryGraph(provenance, archive, revision)
origin_add_revision(provenance, origin, graph)
provenance.flush()
diff --git a/swh/provenance/revision.py b/swh/provenance/revision.py
--- a/swh/provenance/revision.py
+++ b/swh/provenance/revision.py
@@ -69,15 +69,15 @@
date = provenance.revision_get_date(revision)
if date is None or revision.date < date:
graph = build_isochrone_graph(
- archive,
provenance,
+ archive,
revision,
DirectoryEntry(revision.root),
minsize=minsize,
)
revision_process_content(
- archive,
provenance,
+ archive,
revision,
graph,
trackall=trackall,
@@ -91,8 +91,8 @@
@statsd.timed(metric=REVISION_DURATION_METRIC, tags={"method": "process_content"})
def revision_process_content(
- archive: ArchiveInterface,
provenance: ProvenanceInterface,
+ archive: ArchiveInterface,
revision: RevisionEntry,
graph: IsochroneNode,
trackall: bool = True,
@@ -136,7 +136,7 @@
revision, current.entry, current.path
)
flatten_directory(
- archive, provenance, current.entry, minsize=minsize
+ provenance, archive, current.entry, minsize=minsize
)
else:
# If current node is an invalidated frontier, update its date for future
@@ -160,8 +160,8 @@
@statsd.timed(metric=REVISION_DURATION_METRIC, tags={"method": "flatten_directory"})
def flatten_directory(
- archive: ArchiveInterface,
provenance: ProvenanceInterface,
+ archive: ArchiveInterface,
directory: DirectoryEntry,
minsize: int = 0,
) -> None:
diff --git a/swh/provenance/tests/test_history_graph.py b/swh/provenance/tests/test_history_graph.py
--- a/swh/provenance/tests/test_history_graph.py
+++ b/swh/provenance/tests/test_history_graph.py
@@ -42,8 +42,8 @@
print("Expected graph:", expected_graph_as_dict)
computed_graph = HistoryGraph(
- archive,
provenance,
+ archive,
RevisionEntry(hash_to_bytes(expected_graph_as_dict["head"]["rev"])),
)
print("Computed graph:", computed_graph.as_dict())
diff --git a/swh/provenance/tests/test_isochrone_graph.py b/swh/provenance/tests/test_isochrone_graph.py
--- a/swh/provenance/tests/test_isochrone_graph.py
+++ b/swh/provenance/tests/test_isochrone_graph.py
@@ -94,8 +94,8 @@
# Create graph for current revision and check it has the expected structure.
assert entry.root is not None
computed_graph = build_isochrone_graph(
- archive,
provenance,
+ archive,
entry,
DirectoryEntry(entry.root),
)
diff --git a/swh/provenance/tests/test_provenance_storage.py b/swh/provenance/tests/test_provenance_storage.py
--- a/swh/provenance/tests/test_provenance_storage.py
+++ b/swh/provenance/tests/test_provenance_storage.py
@@ -342,9 +342,9 @@
def test_provenance_storage_find(
- archive: ArchiveInterface,
provenance: ProvenanceInterface,
provenance_storage: ProvenanceStorageInterface,
+ archive: ArchiveInterface,
) -> None:
"""Tests `content_find_first` and `content_find_all` methods for every
`ProvenanceStorageInterface` implementation.

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 18, 3:01 AM (2 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224773

Event Timeline