class documentation
class MemoryPackIndex(PackIndex):
Pack index that is stored entirely in memory.
Method | __init__ |
Create a new MemoryPackIndex. |
Method | __len__ |
Return the number of entries in this pack index. |
Method | get |
Return the SHA1 checksum stored for the corresponding packfile. |
Method | iterentries |
Iterate over the entries in this pack index. |
Method | object |
Return the index in to the corresponding packfile for the object. |
Method | object |
Return the SHA1 corresponding to the index in the pack file. |
Method | _itersha |
Yield all the SHA1's of the objects in the index, sorted. |
Instance Variable | _by |
Undocumented |
Instance Variable | _by |
Undocumented |
Instance Variable | _entries |
Undocumented |
Instance Variable | _pack |
Undocumented |
Inherited from PackIndex
:
Method | __eq__ |
Undocumented |
Method | __iter__ |
Iterate over the SHAs in this pack. |
Method | __ne__ |
Undocumented |
Method | objects |
Return the hex SHA1 over all the shas of all objects in this pack. |
Method | _object |
See object_index. |
Create a new MemoryPackIndex.
Parameters | |
entries | Sequence of name, idx, crc32 (sorted) |
pack | Optional pack checksum |
overrides
dulwich.pack.PackIndex.get_pack_checksum
Return the SHA1 checksum stored for the corresponding packfile.
Returns: 20-byte binary digest
overrides
dulwich.pack.PackIndex.iterentries
Iterate over the entries in this pack index.
- Returns: iterator over tuples with object name, offset in packfile and
- crc32 checksum.
overrides
dulwich.pack.PackIndex.object_index
Return the index in to the corresponding packfile for the object.
Given the name of an object it will return the offset that object lives at within the corresponding pack file. If the pack file doesn't have the object then None will be returned.
overrides
dulwich.pack.PackIndex.object_sha1
Return the SHA1 corresponding to the index in the pack file.