class documentation

class PackStreamCopier(PackStreamReader):

View In Hierarchy

Class to verify a pack stream as it is being read.

The pack is read from a ReceivableProtocol using read() or recv() as appropriate and written out to the given file-like object.

Method __init__ Initialize the copier.
Method verify Verify a pack stream and write it to the output file.
Instance Variable outfile Undocumented
Method _read Read data from the read callback and write it to the file.
Instance Variable _delta_iter Undocumented

Inherited from PackStreamReader:

Method __len__ Undocumented
Method read Read, blocking until size bytes are read.
Method read_objects Read the objects in this pack file.
Method recv Read up to size bytes, blocking until one byte is read.
Instance Variable read_all Undocumented
Instance Variable read_some Undocumented
Instance Variable sha Undocumented
Property offset Undocumented
Method _buf_len Undocumented
Instance Variable _num_objects Undocumented
Instance Variable _offset Undocumented
Instance Variable _rbuf Undocumented
Instance Variable _trailer Undocumented
Instance Variable _zlib_bufsize Undocumented
def __init__(self, read_all, read_some, outfile, delta_iter=None):

Initialize the copier.

Parameters
read_allRead function that blocks until the number of requested bytes are read.
read_someRead function that returns at least one byte, but may not return the number of bytes requested.
outfileFile-like object to write output through.
delta_iterOptional DeltaChainIterator to record deltas as we read them.
def verify(self):

Verify a pack stream and write it to the output file.

See PackStreamReader.iterobjects for a list of exceptions this may throw.

outfile =

Undocumented

def _read(self, read, size):

Read data from the read callback and write it to the file.

_delta_iter =

Undocumented