Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/storage_data.py
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | directory4 = Directory( | ||||
name=b"subdir1", | name=b"subdir1", | ||||
type="dir", | type="dir", | ||||
target=directory3.id, | target=directory3.id, | ||||
perms=from_disk.DentryPerms.directory, | perms=from_disk.DentryPerms.directory, | ||||
) | ) | ||||
], | ], | ||||
), | ), | ||||
) | ) | ||||
directory6 = Directory( | |||||
id=hash_to_bytes("afa0105cfcaa14fdbacee344e96659170bb1bda5"), | |||||
entries=tuple( | |||||
[ | |||||
DirectoryEntry( | |||||
name=b"foo", | |||||
type="file", | |||||
target=b"\x00" * 20, | |||||
perms=from_disk.DentryPerms.content, | |||||
), | |||||
DirectoryEntry( | |||||
name=b"bar", | |||||
type="dir", | |||||
target=b"\x01" * 20, | |||||
perms=from_disk.DentryPerms.directory, | |||||
), | |||||
], | |||||
), | |||||
raw_manifest=( | |||||
b"tree 61\x00" | |||||
b"100644 foo\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" # noqa | |||||
b"40000 bar\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" # noqa | |||||
), | |||||
) | |||||
directories: Tuple[Directory, ...] = ( | directories: Tuple[Directory, ...] = ( | ||||
directory2, | directory2, | ||||
directory, | directory, | ||||
directory3, | directory3, | ||||
directory4, | directory4, | ||||
directory5, | directory5, | ||||
directory6, | |||||
) | ) | ||||
revision = Revision( | revision = Revision( | ||||
id=hash_to_bytes("01a7114f36fddd5ef2511b2cadda237a68adbb12"), | id=hash_to_bytes("01a7114f36fddd5ef2511b2cadda237a68adbb12"), | ||||
message=b"hello", | message=b"hello", | ||||
author=Person( | author=Person( | ||||
name=b"Nicolas Dandrimont", | name=b"Nicolas Dandrimont", | ||||
email=b"nicolas@example.com", | email=b"nicolas@example.com", | ||||
▲ Show 20 Lines • Show All 580 Lines • Show Last 20 Lines |