%PDF- %PDF-
Direktori : /lib/python3/dist-packages/duplicity/__pycache__/ |
Current File : //lib/python3/dist-packages/duplicity/__pycache__/diffdir.cpython-312.pyc |
� �2ee � �X � d Z ddlZddlmZ ddlmZ ddlmZ ddl� dadZ G d� de � Z d � Zd � Zd� Z d� Zd&d �Zd&d�Zd'd�Zd&d�Zd� Zd� Zd� Zd� Zd� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d � d!e� Z G d"� d#e� Zd$� Z d%� Z!y)(a 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. � N)�progress)� statistics)�util)�*c � � e Zd Zy)�DiffDirExceptionN)�__name__� __module__�__qualname__� � �3/usr/lib/python3/dist-packages/duplicity/diffdir.pyr r * s � �r r c � � t | � S )z) Alias for SigTarBlockIter below )�SigTarBlockIter�� path_iters r �DirSigr . s � � �9�%�%r c �@ � t | t j d� � S )a 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). � )�DirDelta�io�StringIOr s r �DirFullr 5 s � � �I�r�{�{�2��/�/r c �B � t | t j d� |� S )zN Return full backup like above, but also write signature to sig_outfp r )�DirDelta_WriteSigr r )r � sig_outfps r �DirFull_WriteSigr A s � � �Y����B���C�Cr c �p � t j � at |t � r#t |D �cg c] }t |� �� c}� }nt |� }t | |� }t j s.t j r)t j j � st |� S t |� S c c}w )z� 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. )r �StatsDeltaProcess�stats� isinstance�list�combine_path_iters�sigtar2path_iter�get_delta_iter�config�dry_runr �tracker�has_collected_evidence�DummyBlockIter�DeltaTarBlockIter)r �dirsig_fileobj_list�x�sig_iter� delta_iters r r r H s� � � �(�(�*�E��%�t�,�%�DW�&X�q�'7��':�&X�Y��#�$7�8��� �8�4�J� �~�~�&�/�/�(�2B�2B�2Y�2Y�2[��j�)�)� ��,�,�� 'Ys �B3c �� � |r|j � }n|r|j � }nJ d� �t j t d� t j | � t j |� fz � y)zA Called by get_delta_iter, report error in getting delta z)Both new and sig are None for some reason�Error %s getting delta for %sN)�get_relative_path�log�Warn�_r �uexc�os�fsdecode)�exc�new_path�sig_path�sig_tar�index_strings r �delta_iter_error_handlerr>