Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9347705
D7387.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7387.diff
View Options
diff --git a/swh/dataset/exporters/orc.py b/swh/dataset/exporters/orc.py
--- a/swh/dataset/exporters/orc.py
+++ b/swh/dataset/exporters/orc.py
@@ -171,6 +171,7 @@
datetime_to_tuple(visit_status["date"]),
visit_status["status"],
hash_to_hex_or_none(visit_status["snapshot"]),
+ visit_status["type"],
)
)
@@ -224,6 +225,7 @@
revision["committer"]["fullname"],
*swh_date_to_tuple(revision["committer_date"]),
hash_to_hex_or_none(revision["directory"]),
+ revision["type"],
)
)
diff --git a/swh/dataset/relational.py b/swh/dataset/relational.py
--- a/swh/dataset/relational.py
+++ b/swh/dataset/relational.py
@@ -20,6 +20,7 @@
("date", "timestamp"),
("status", "string"),
("snapshot", "string"),
+ ("type", "string"),
],
"snapshot": [
("id", "string"),
@@ -53,6 +54,7 @@
("committer_offset", "smallint"),
("committer_date_raw_offset_bytes", "binary"),
("directory", "string"),
+ ("type", "string"),
],
"revision_history": [
("id", "string"),
diff --git a/swh/dataset/test/test_orc.py b/swh/dataset/test/test_orc.py
--- a/swh/dataset/test/test_orc.py
+++ b/swh/dataset/test/test_orc.py
@@ -73,6 +73,7 @@
datetime_to_tuple(obj.date),
obj.status,
hash_to_hex_or_none(obj.snapshot),
+ obj.type,
) in output[obj_type]
@@ -121,6 +122,7 @@
obj.committer_date.to_dict() if obj.committer_date is not None else None
),
hash_to_hex_or_none(obj.directory),
+ obj.type.value,
) in output["revision"]
for i, parent in enumerate(obj.parents):
assert (
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 5:50 PM (4 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225506
Attached To
D7387: Add the type fields for revision and origin_visit_status ORC table
Event Timeline
Log In to Comment