Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8394511
D1604.id5338.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
D1604.id5338.diff
View Options
diff --git a/requirements-swh.txt b/requirements-swh.txt
--- a/requirements-swh.txt
+++ b/requirements-swh.txt
@@ -1,4 +1,4 @@
swh.model >= 0.0.27
swh.storage >= 0.0.114
swh.scheduler >= 0.0.39
-swh.loader.core >= 0.0.37
+swh.loader.core >= 0.0.43
diff --git a/swh/loader/mercurial/loader.py b/swh/loader/mercurial/loader.py
--- a/swh/loader/mercurial/loader.py
+++ b/swh/loader/mercurial/loader.py
@@ -285,7 +285,7 @@
content,
log=self.log,
max_content_size=self.content_max_size_limit,
- origin_id=self.origin_id
+ origin_url=self.origin['url']
)
def load_directories(self):
diff --git a/swh/loader/mercurial/tests/test_loader.py b/swh/loader/mercurial/tests/test_loader.py
--- a/swh/loader/mercurial/tests/test_loader.py
+++ b/swh/loader/mercurial/tests/test_loader.py
@@ -8,6 +8,8 @@
from unittest.mock import patch
from swh.loader.core.tests import BaseLoaderTest
+from swh.storage.algos.snapshot import snapshot_get_all_branches
+
from .common import HgLoaderMemoryStorage, HgArchiveLoaderMemoryStorage
@@ -265,10 +267,12 @@
directory=self.destination_path)
# collect swh revisions
- origin_id = self.storage.origin_get([
- {'type': 'hg', 'url': self.repo_url}])[0]['id']
- snapshot = self.storage.snapshot_get_latest(origin_id)
+ origin_url = self.storage.origin_get([
+ {'type': 'hg', 'url': self.repo_url}])[0]['url']
+ visit = self.storage.origin_visit_get_latest(
+ origin_url, require_snapshot=True)
revisions = []
+ snapshot = snapshot_get_all_branches(self.storage, visit['snapshot'])
for branch in snapshot['branches'].values():
if branch['target_type'] != 'revision':
continue
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 3, 7:25 PM (6 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220115
Attached To
D1604: Use origin urls instead of origin ids (swh-loader-mercurial)
Event Timeline
Log In to Comment