Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/dir/loader.py
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | def snapshot_from(revision_hash, branch): | ||||
snapshot['id'] = snap_id | snapshot['id'] = snap_id | ||||
return snapshot | return snapshot | ||||
class DirLoader(loader.BufferedLoader): | class DirLoader(loader.BufferedLoader): | ||||
"""A bulk loader for a directory.""" | """A bulk loader for a directory.""" | ||||
CONFIG_BASE_FILENAME = 'loader/dir' | CONFIG_BASE_FILENAME = 'loader/dir' | ||||
visit_type = 'dir' | |||||
def __init__(self, logging_class='swh.loader.dir.DirLoader', | def __init__(self, logging_class='swh.loader.dir.DirLoader', | ||||
config=None): | config=None): | ||||
super().__init__(logging_class=logging_class, config=config) | super().__init__(logging_class=logging_class, config=config) | ||||
def list_objs(self, *, | def list_objs(self, *, | ||||
dir_path, revision, release, branch_name): | dir_path, revision, release, branch_name): | ||||
"""List all objects from dir_path. | """List all objects from dir_path. | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |