Page MenuHomeSoftware Heritage

D6864.diff
No OneTemporary

D6864.diff

diff --git a/swh/provenance/graph.py b/swh/provenance/graph.py
--- a/swh/provenance/graph.py
+++ b/swh/provenance/graph.py
@@ -239,19 +239,16 @@
# we can infer the maxdate for current directory
assert current.maxdate is None
# if all content is already known, update current directory info.
- current.maxdate = min(
- max(
- [UTCMIN]
- + [
- child.maxdate
- for child in current.children
- if child.maxdate is not None # for mypy
- ]
- + [
- fdates.get(file.id, revision.date)
- for file in current.entry.files
- ]
- ),
- revision.date,
+ current.maxdate = max(
+ [UTCMIN]
+ + [
+ child.maxdate
+ for child in current.children
+ if child.maxdate is not None # for mypy
+ ]
+ + [
+ fdates.get(file.id, revision.date)
+ for file in current.entry.files
+ ]
)
return root
diff --git a/swh/provenance/revision.py b/swh/provenance/revision.py
--- a/swh/provenance/revision.py
+++ b/swh/provenance/revision.py
@@ -110,7 +110,7 @@
while stack:
current = stack.pop()
if current.dbdate is not None:
- assert current.dbdate <= revision.date
+ assert current.dbdate < revision.date
if trackall:
# Current directory is an outer isochrone frontier for a previously
# processed revision. It should be reused as is.
@@ -146,7 +146,7 @@
# revisions to get the proper value.
if current.invalid:
provenance.directory_set_date_in_isochrone_frontier(
- current.entry, current.maxdate
+ current.entry, revision.date
)
# No point moving the frontier here. Either there are no files or they
# are being seen for the first time here. Add all blobs to current
diff --git a/swh/provenance/tests/data/graphs_out-of-order_lower_1.yaml b/swh/provenance/tests/data/graphs_out-of-order_lower_1.yaml
--- a/swh/provenance/tests/data/graphs_out-of-order_lower_1.yaml
+++ b/swh/provenance/tests/data/graphs_out-of-order_lower_1.yaml
@@ -124,25 +124,25 @@
entry:
id: "b3cf11b22c9f93c3c494cf90ab072f394155072d"
name: ""
- maxdate: 1000000005.0
+ maxdate: 1000000010.0
path: ""
children:
- entry:
id: "baca735bf8b8720131b4bfdb47c51631a9260348"
name: "A"
- maxdate: 1000000005.0
+ maxdate: 1000000010.0
path: "A"
children:
- entry:
id: "4b28979d88ed209a09c272bcc80f69d9b18339c2"
name: "B"
- maxdate: 1000000005.0
+ maxdate: 1000000010.0
path: "A/B"
children:
- entry:
id: "c9cabe7f49012e3fdef6ac6b929efb5654f583cf"
name: "C"
- maxdate: 1000000005.0
+ maxdate: 1000000010.0
invalid: True
path: "A/B/C"
# Isochrone graph for R06

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 3, 3:24 PM (6 d, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219452

Event Timeline