swh.vault.cookers.revision_gitfast module

class swh.vault.cookers.revision_gitfast.RevisionGitfastCooker(obj_type, obj_id, backend, storage, max_bundle_size=536870912)[source]

Bases: swh.vault.cookers.base.BaseVaultCooker

Cooker to create a git fast-import bundle

CACHE_TYPE_KEY = 'revision_gitfast'
check_exists()[source]

Checks that the requested object exists and can be cooked.

Override this in the cooker implementation.

prepare_bundle()[source]

Implementation of the cooker. Yields chunks of the bundle bytes.

Override this with the cooker implementation.

write_cmd(cmd)[source]
fastexport()[source]

Generate all the git fast-import commands from a given log.

mark(obj_id)[source]

Get the mark ID as bytes of a git object.

If the object has not yet been marked, assign a new ID and add it to the mark dictionary.