Known subclasses: dulwich.pack.FilePackIndex, dulwich.pack.MemoryPackIndex

An index in to a packfile.

Given a sha id of an object a pack index can tell you the location in the packfile of that object if it has it.

Method __eq__ Undocumented
Method __ne__ Undocumented
Method __len__ Return the number of entries in this pack index.
Method __iter__ Iterate over the SHAs in this pack.
Method iterentries Iterate over the entries in this pack index.
Method get_pack_checksum Return the SHA1 checksum stored for the corresponding packfile.
Method object_index Return the index in to the corresponding packfile for the object.
Method object_sha1 Return the SHA1 corresponding to the index in the pack file.
Method objects_sha1 Return the hex SHA1 over all the shas of all objects in this pack.
Method _object_index See object_index.
Method _itersha Yield all the SHA1's of the objects in the index, sorted.
def __eq__(self, other):
Undocumented
def __ne__(self, other):
Undocumented
def __len__(self):
Return the number of entries in this pack index.
def __iter__(self):
Iterate over the SHAs in this pack.
def iterentries(self):
Iterate over the entries in this pack index.
Returnsiterator over tuples with object name, offset in packfile and crc32 checksum.
def get_pack_checksum(self):
Return the SHA1 checksum stored for the corresponding packfile.
Returns20-byte binary digest
def object_index(self, sha):

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.

def object_sha1(self, index):
Return the SHA1 corresponding to the index in the pack file.
def _object_index(self, sha):
See object_index.
ParametersshaA binary SHA string. (20 characters long)_
def objects_sha1(self):
Return the hex SHA1 over all the shas of all objects in this pack.
NoteThis is used for the filename of the pack.
def _itersha(self):
Yield all the SHA1's of the objects in the index, sorted.
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.