Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9337218
swh-loader-git
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
swh-loader-git
View Options
#!/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
Details
Attached
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
Attached To
rDLDG Git loader
Event Timeline
Log In to Comment