§
    cÌcà  ã                   óê  — d Z ddlmZmZ  G d„ dej        ¦  «        Z G d„ de¦  «        Z G d„ dej        ¦  «        Z G d	„ d
¦  «        Z G d„ dej	        ¦  «        Z
 e
¦   «         Ze                     ddd¦  «         e                     ddd¦  «         e                     ddd¦  «         e                     ddd¦  «         e                     ddd¦  «         e                     ddd¦  «         dS )z!Inventory/revision serialization.é   )ÚerrorsÚregistryc                   ó   — e Zd ZdZdS )ÚBadInventoryFormatz-Root class for inventory serialization errorsN)Ú__name__Ú
__module__Ú__qualname__Ú_fmt© ó    ú7/usr/lib/python3/dist-packages/breezy/bzr/serializer.pyr   r      s   € € € € € à:€D€D€Dr   r   c                   ó   — e Zd ZdZd„ ZdS )ÚUnexpectedInventoryFormatz6The inventory was not in the expected format:
 %(msg)sc                 ó>   — t                                | |¬¦  «         d S )N)Úmsg)r   Ú__init__)Úselfr   s     r   r   z"UnexpectedInventoryFormat.__init__   s!   € Ý×#Ò# D¨cÐ#Ñ2Ô2Ð2Ð2Ð2r   N©r   r   r	   r
   r   r   r   r   r   r      s(   € € € € € àD€Dð3ð 3ð 3ð 3ð 3r   r   c                   ó   — e Zd ZdZd„ ZdS )ÚUnsupportedInventoryKindzUnsupported entry kind %(kind)sc                 ó   — || _         d S ©N)Úkind)r   r   s     r   r   z!UnsupportedInventoryKind.__init__'   s   € ØˆŒ	ˆ	ˆ	r   Nr   r   r   r   r   r   #   s(   € € € € € à0€Dðð ð ð ð r   r   c                   óT   — e Zd ZdZdZd„ Zd„ Zd„ Z	 	 dd„Zdd„Z	d	„ Z
d
„ Zd„ Zd„ ZdS )Ú
Serializerz5Inventory and revision serialization/deserialization.Fc                 ó*   — t          | j        ¦  «        ‚)z°Write inventory to a file.

        Note: this is a *whole inventory* operation, and should only be used
        sparingly, as it does not scale well with large trees.
        )ÚNotImplementedErrorÚwrite_inventory)r   ÚinvÚfs      r   r   zSerializer.write_inventory0   s   € õ " $Ô"6Ñ7Ô7Ð7r   c                 ó*   — t          | j        ¦  «        ‚)a‰  Produce a simple bytestring chunk representation of an inventory.

        Note: this is a *whole inventory* operation, and should only be used
        sparingly, as it does not scale well with large trees.

        The requirement for the contents of the string is that it can be passed
        to read_inventory_from_lines and the result is an identical inventory
        in memory.
        )r   Úwrite_inventory_to_chunks©r   r   s     r   r"   z$Serializer.write_inventory_to_chunks8   s   € õ " $Ô"@ÑAÔAÐAr   c                 ó*   — t          | j        ¦  «        ‚)a~  Produce a simple lines representation of an inventory.

        Note: this is a *whole inventory* operation, and should only be used
        sparingly, as it does not scale well with large trees.

        The requirement for the contents of the string is that it can be passed
        to read_inventory_from_lines and the result is an identical inventory
        in memory.
        )r   Úwrite_inventory_to_linesr#   s     r   r%   z#Serializer.write_inventory_to_linesD   s   € õ " $Ô"?Ñ@Ô@Ð@r   Nc                 ó*   — t          | j        ¦  «        ‚)a|  Read bytestring chunks into an inventory object.

        :param lines: The serialized inventory to read.
        :param revision_id: If not-None, the expected revision id of the
            inventory. Some serialisers use this to set the results' root
            revision. This should be supplied for deserialising all
            from-repository inventories so that xml5 inventories that were
            serialised without a revision identifier can be given the right
            revision id (but not for working tree inventories where users can
            edit the data without triggering checksum errors or anything).
        :param entry_cache: An optional cache of InventoryEntry objects. If
            supplied we will look up entries via (file_id, revision_id) which
            should map to a valid InventoryEntry (File/Directory/etc) object.
        :param return_from_cache: Return entries directly from the cache,
            rather than copying them first. This is only safe if the caller
            promises not to mutate the returned inventory entries, but it can
            make some operations significantly faster.
        )r   Úread_inventory_from_lines)r   ÚlinesÚrevision_idÚentry_cacheÚreturn_from_caches        r   r'   z$Serializer.read_inventory_from_linesP   s   € õ( " $Ô"@ÑAÔAÐAr   c                 ó*   — t          | j        ¦  «        ‚)zSee read_inventory_from_lines.)r   Úread_inventory)r   r    r)   s      r   r-   zSerializer.read_inventoryf   s   € å! $Ô"5Ñ6Ô6Ð6r   c                 ó*   — t          | j        ¦  «        ‚r   )r   Úwrite_revision_to_string©r   Úrevs     r   r/   z#Serializer.write_revision_to_stringj   s   € Ý! $Ô"?Ñ@Ô@Ð@r   c                 ó*   — t          | j        ¦  «        ‚r   )r   Úwrite_revision_to_linesr0   s     r   r3   z"Serializer.write_revision_to_linesm   s   € Ý! $Ô">Ñ?Ô?Ð?r   c                 ó*   — t          | j        ¦  «        ‚r   )r   Úread_revision)r   r    s     r   r5   zSerializer.read_revisionp   s   € Ý! $Ô"4Ñ5Ô5Ð5r   c                 ó*   — t          | j        ¦  «        ‚r   )r   Úread_revision_from_string)r   Ú
xml_strings     r   r7   z$Serializer.read_revision_from_strings   s   € Ý! $Ô"@ÑAÔAÐAr   )NNFr   )r   r   r	   Ú__doc__Úsquashes_xml_invalid_charactersr   r"   r%   r'   r-   r/   r3   r5   r7   r   r   r   r   r   +   sÏ   € € € € € Ø?Ð?à&+Ð#ð8ð 8ð 8ð
Bð 
Bð 
Bð
Að 
Að 
Að <@ØFKðBð Bð Bð Bð,7ð 7ð 7ð 7ðAð Að Að@ð @ð @ð6ð 6ð 6ðBð Bð Bð Bð Br   r   c                   ó   — e Zd ZdZdS )ÚSerializerRegistryzRegistry for serializer objectsN)r   r   r	   r9   r   r   r   r<   r<   w   s   € € € € € Ø)Ð)Ð)Ð)r   r<   Ú5zbreezy.bzr.xml5Úserializer_v5Ú6zbreezy.bzr.xml6Úserializer_v6Ú7zbreezy.bzr.xml7Úserializer_v7Ú8zbreezy.bzr.xml8Úserializer_v8Ú9zbreezy.bzr.chk_serializerÚchk_serializer_255_bigpageÚ10Úchk_bencode_serializerN)r9   Ú r   r   ÚBzrErrorr   r   r   r   ÚRegistryr<   Úformat_registryÚregister_lazyr   r   r   ú<module>rN      sÌ  ðð" (Ð 'à Ð Ð Ð Ð Ð Ð Ð ð;ð ;ð ;ð ;ð ;˜œñ ;ô ;ð ;ð
3ð 3ð 3ð 3ð 3Ð 2ñ 3ô 3ð 3ðð ð ð ð ˜vœñ ô ð ðIBð IBð IBð IBð IBñ IBô IBð IBðX*ð *ð *ð *ð *˜Ô*ñ *ô *ð *ð %Ð$Ñ&Ô&€Ø × Ò ˜cÐ#4°oÑ FÔ FÐ FØ × Ò ˜cÐ#4°oÑ FÔ FÐ FØ × Ò ˜cÐ#4°oÑ FÔ FÐ FØ × Ò ˜cÐ#4°oÑ FÔ FÐ FØ × Ò ˜cÐ#>Ø:ñ<ô <ð <à × Ò ˜dÐ$?Ø6ñ8ô 8ð 8ð 8ð 8r   