Page MenuHomeSoftware Heritage

swh-loader-git
No OneTemporary

swh-loader-git

#!/usr/bin/env python3
import logging
import sys
from swh.core import config
from swh.loader.git import BulkLoader
DEFAULT_CONFIG = {
'storage_args': ('list[str]', ['http://localhost:5000/']),
'storage_class': ('str', 'remote_storage'),
'repo_path': ('str', None),
'origin': ('int', -1),
'authority': ('int', 1),
'validity': ('str', '2015-01-01 00:00:00+00'),
'create_origin': ('bool', True),
'send_contents': ('bool', True),
'send_directories': ('bool', True),
'send_revisions': ('bool', True),
'send_releases': ('bool', True),
'send_occurrences': ('bool', True),
'content_packet_size': ('int', 100000),
'directory_packet_size': ('int', 25000),
'revision_packet_size': ('int', 100000),
'release_packet_size': ('int', 100000),
'occurrence_packet_size': ('int', 100000),
}
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(name)s %(levelname)s %(message)s')
my_config = config.read(sys.argv[1], DEFAULT_CONFIG)
loader = BulkLoader(my_config)
loader.process(my_config['repo_path'],
my_config['origin'],
my_config['authority'],
my_config['validity'])

File Metadata

Mime Type
text/x-python
Expires
Jul 4 2025, 7:57 AM (10 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398423

Event Timeline