Known subclasses: dulwich.contrib.swift.SwiftPack

A Git pack object.
Method __init__ Undocumented
Class Method from_lazy_objects Create a new pack object from callables to load pack data and index objects.
Class Method from_objects Create a new pack object from pack data and index objects.
Method name The SHA over the SHAs of the objects in this pack.
Method data The pack data object being used.
Method index The index being used.
Method close Undocumented
Method __enter__ Undocumented
Method __exit__ Undocumented
Method __eq__ Undocumented
Method __len__ Number of entries in this pack.
Method __repr__ Undocumented
Method __iter__ Iterate over all the sha1s of the objects in this pack.
Method check_length_and_checksum Sanity check the length and checksum of the pack index and data.
Method check Check the integrity of this pack.
Method get_stored_checksum Undocumented
Method __contains__ Check whether this pack contains a particular SHA1.
Method get_raw_unresolved Get raw unresolved data for a SHA.
Method get_raw Undocumented
Method __getitem__ Retrieve the specified SHA1.
Method iterobjects Iterate over the objects in this pack.
Method pack_tuples Provide an iterable for use with write_pack_objects.
Method keep Add a .keep file for the pack, preventing git from garbage collecting it.
def __init__(self, basename, resolve_ext_ref=None):
Undocumented
@classmethod
def from_lazy_objects(self, data_fn, idx_fn):
Create a new pack object from callables to load pack data and index objects.
@classmethod
def from_objects(self, data, idx):
Create a new pack object from pack data and index objects.
def name(self):
The SHA over the SHAs of the objects in this pack.
@property
def data(self):
The pack data object being used.
@property
def index(self):
The index being used.
NoteThis may be an in-memory index
def close(self):
Undocumented
def __enter__(self):
Undocumented
def __exit__(self, exc_type, exc_val, exc_tb):
Undocumented
def __eq__(self, other):
Undocumented
def __len__(self):
Number of entries in this pack.
def __repr__(self):
Undocumented
def __iter__(self):
Iterate over all the sha1s of the objects in this pack.
def check_length_and_checksum(self):
Sanity check the length and checksum of the pack index and data.
def check(self):
Check the integrity of this pack.
RaisesChecksumMismatchif a checksum for the index or data is wrong
def get_stored_checksum(self):
Undocumented
def __contains__(self, sha1):
Check whether this pack contains a particular SHA1.
def get_raw_unresolved(self, sha1):
Get raw unresolved data for a SHA.
Parameterssha1SHA to return data for
ReturnsTuple with pack object type, delta base (if applicable), list of data chunks
def get_raw(self, sha1):
Undocumented
def __getitem__(self, sha1):
Retrieve the specified SHA1.
def iterobjects(self):
Iterate over the objects in this pack.
def pack_tuples(self):
Provide an iterable for use with write_pack_objects.
ReturnsObject that can iterate over (object, path) tuples and provides __len__
def keep(self, msg=None):
Add a .keep file for the pack, preventing git from garbage collecting it.
ParametersmsgA message written inside the .keep file; can be used later to determine whether or not a .keep file is obsolete.
ReturnsThe path of the .keep file, as a string.
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.