Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F11023664
D6329.id.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
D6329.id.diff
View Options
diff --git a/swh/loader/mercurial/hgutil.py b/swh/loader/mercurial/hgutil.py
--- a/swh/loader/mercurial/hgutil.py
+++ b/swh/loader/mercurial/hgutil.py
@@ -100,9 +100,16 @@
for branch in branches_with_one_head:
del branch_open_heads[branch]
+ # for bookmarks, the ids listed are not aligned with the rest, it's human
+ # readable id as bytes string instead of bytes string. Hence the extra mapping.
+ branch_bookmarks = {
+ branch: HgNodeId(bytes.fromhex(node_id.decode()))
+ for branch, node_id in all_bookmarks.items()
+ }
+
return BranchingInfo(
tips=branch_tips,
- bookmarks=all_bookmarks,
+ bookmarks=branch_bookmarks,
open_heads=branch_open_heads,
closed_heads=branch_closed_heads,
default_branch_alias=default_rev_alias,
diff --git a/swh/loader/mercurial/tests/test_from_disk.py b/swh/loader/mercurial/tests/test_from_disk.py
--- a/swh/loader/mercurial/tests/test_from_disk.py
+++ b/swh/loader/mercurial/tests/test_from_disk.py
@@ -725,9 +725,8 @@
assert visit_status2.snapshot == visit_status.snapshot
-@pytest.mark.xfail
-def test_loader_missing_hgnodeid_mapping(swh_storage, datadir, tmp_path):
- """TODO: Analyze this issue and update the comment about the proper behavior.
+def test_loader_repository_with_bookmark_information(swh_storage, datadir, tmp_path):
+ """Repository with bookmark information should be ingested correctly
"""
archive_name = "anomad-d"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 17, 4:55 PM (12 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219186
Attached To
D6329: Fix branch bookmark id format so ingestion can finish
Event Timeline
Log In to Comment