| Trees | Indices | Help |
|
|---|
|
|
Functions for producing signatures and deltas of directories
Note that the main processes of this module have two parts. In the first, the signature or delta is constructed of a ROPath iterator. In the second, the ROPath iterator is put into tar block form.
|
|||
|
DeltaTarBlockIter TarBlockIter that yields parts of a deltatar file |
|||
| DiffDirException | |||
|
DummyBlockIter TarBlockIter that does no file reading |
|||
|
FileWithReadCounter File-like object which also computes amount read as it is read |
|||
|
FileWithSignature File-like object which also computes signature as it is read |
|||
|
SigTarBlockIter TarBlockIter that yields blocks of a signature tar from path_iter |
|||
|
TarBlock Contain information to add next file to tar |
|||
|
TarBlockIter A bit like an iterator, yield tar blocks given input iterator |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
__package__ =
|
|||
stats = Nonehash(x) |
|||
|
|||
Produce tarblock diff given dirsig_fileobj_list and pathiter dirsig_fileobj_list should either be a tar fileobj or a list of those, sorted so the most recent is last. |
Like DirDelta but also write signature into sig_fileobj Like DirDelta, sig_infp_list can be a tar fileobj or a sorted list of those. A signature will only be written to newsig_outfp if it is different from (the combined) sig_infp_list. |
Return a tarblock full backup of items in path_iter A full backup is just a diff starting from nothing (it may be less elegant than using a standard tar file, but we can be sure that it will be easy to split up the tar and make the volumes the same sizes). |
Collate two iterators. The elements yielded by each iterator must be have an index variable, and this function returns pairs (elem1, elem2), (elem1, None), or (None, elem2) two elements in a pair will have the same index, and earlier indicies are yielded later than later indicies. |
Produce new iterator by combining the iterators in path_iter_list This new iter will iterate every path that is in path_iter_list in order of increasing index. If multiple iterators in path_iter_list yield paths with the same index, combine_path_iters will discard all paths but the one yielded by the last path_iter. This is used to combine signature iters, as the output will be a full up-to-date signature iter. |
Return a reasonable block size to use on files of length file_len If the block size is too big, deltas will be bigger than is necessary. If the block size is too small, making deltas and patching can take a really long time. |
Generate delta iter from new Path iter and sig Path iter. For each delta path of regular file type, path.difftype with be set to "snapshot", "diff". sig_iter will probably iterate ROPaths instead of Paths. If sig_fileobj is not None, will also write signatures to sig_fileobj. |
Look at delta path and log delta. Add stats if new_path is set |
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Jun 18 06:12:27 2011 | http://epydoc.sourceforge.net |