§
    cÌcjN ã                   ód  — d Z ddlmZ ddlmZ ddlZddlZddlZddlmZm	Z	 ddl
mZ ddlmZ  e e¦   «         d	¦  «         dd
lmZmZmZmZ ddlmZ ddlmZ ddlmZ  eeeef         e	f         ¦   «         Ze                     ddd¦  «         e                     ddd¦  «         dD ]fZe                     defdd¦  «         e                     defdd¦  «         e                     defdd¦  «         e                     defdd¦  «         Œg G d„ dej        ¦  «        Z G d„ d ej         ¦  «        Z! G d!„ d"¦  «        Z" G d#„ d$e"¦  «        Z# G d%„ d&e"¦  «        Z$ G d'„ d(e"¦  «        Z% G d)„ d*e"¦  «        Z& G d+„ d,e"¦  «        Z'd-„ Z( G d.„ d/¦  «        Z) G d0„ d1¦  «        Z* G d2„ d3¦  «        Z+ G d4„ d5e+¦  «        Z, G d6„ d7¦  «        Z- G d8„ d9e-¦  «        Z. G d:„ d;e-¦  «        Z/ G d<„ d=e/¦  «        Z0 G d>„ d?e/¦  «        Z1 G d@„ dAe1¦  «        Z2dB„ Z3 G dC„ dD¦  «        Z4 G dE„ dFe4¦  «        Z5 G dG„ dHe4¦  «        Z6 G dI„ dJe4¦  «        Z7 G dK„ dLe¦  «        Z8 G dM„ dNe8¦  «        Z9 G dO„ dPe4¦  «        Z: G dQ„ dR¦  «        Z;dS„ Z< G dT„ dU¦  «        Z=dV„ Z>dW„ Z?dX„ Z@dY„ ZA G dZ„ d[¦  «        ZBdS )\z Versioned text file storage api.é    )Úcopy)ÚBytesION)ÚTupleÚAny)Úadler32é   )Úlazy_importz¤
import fastbencode as bencode

from breezy import (
    multiparent,
    revision,
    urlutils,
    )
from breezy.bzr import (
    groupcompress,
    knit,
    )
)ÚerrorsÚgraphÚosutilsÚ	transport)ÚRegistry)Ú	TextMergeé   )Úindex)úknit-annotated-delta-gzúknit-delta-gzzbreezy.bzr.knitÚDeltaAnnotatedToUnannotated)úknit-annotated-ft-gzú
knit-ft-gzÚFTAnnotatedToUnannotated)ÚfulltextÚchunkedÚlinesr   ÚDeltaPlainToFullTextr   ÚFTPlainToFullTextr   ÚFTAnnotatedToFullTextr   ÚDeltaAnnotatedToFullTextc                   ó   — e Zd ZdZd„ ZdS )ÚUnavailableRepresentationz\The encoding '%(wanted)s' is not available for key %(key)s which is encoded as '%(native)s'.c                 ón   — t           j                             | ¦  «         || _        || _        || _        d S ©N)r
   ÚInternalBzrErrorÚ__init__ÚwantedÚnativeÚkey)Úselfr'   r%   r&   s       ú:/usr/lib/python3/dist-packages/breezy/bzr/versionedfile.pyr$   z"UnavailableRepresentation.__init__M   s2   € ÝÔ×(Ò(¨Ñ.Ô.Ð.ØˆŒØˆŒØˆŒˆˆó    N)Ú__name__Ú
__module__Ú__qualname__Ú_fmtr$   © r*   r)   r    r    H   s*   € € € € € ð*€Dðð ð ð ð r*   r    c                   ó   — e Zd ZdZdS )ÚExistingContentz.The content being inserted is already present.N)r+   r,   r-   r.   r/   r*   r)   r1   r1   T   s   € € € € € à;€D€D€Dr*   r1   c                   ó   — e Zd ZdZd„ ZdS )ÚContentFactoryaÕ  Abstract interface for insertion and retrieval from a VersionedFile.

    :ivar sha1: None, or the sha1 of the content fulltext.
    :ivar size: None, or the size of the content fulltext.
    :ivar storage_kind: The native storage kind of this factory. One of
        'mpdiff', 'knit-annotated-ft', 'knit-annotated-delta', 'knit-ft',
        'knit-delta', 'fulltext', 'knit-annotated-ft-gz',
        'knit-annotated-delta-gz', 'knit-ft-gz', 'knit-delta-gz'.
    :ivar key: The key of this content. Each key is a tuple with a single
        string in it.
    :ivar parents: A tuple of parent keys for self.key. If the object has
        no parent information, None (as opposed to () for an empty list of
        parents).
    c                 óL   — d| _         d| _        d| _        d| _        d| _        dS )úCreate a ContentFactory.N©Úsha1ÚsizeÚstorage_kindr'   Úparents©r(   s    r)   r$   zContentFactory.__init__i   s*   € àˆŒ	ØˆŒ	Ø ˆÔØˆŒØˆŒˆˆr*   N)r+   r,   r-   Ú__doc__r$   r/   r*   r)   r3   r3   Y   s-   € € € € € ðð ðð ð ð ð r*   r3   c                   ó&   — e Zd ZdZdd„Zd„ Zd„ ZdS )ÚChunkedContentFactoryaü  Static data content factory.

    This takes a 'chunked' list of strings. The only requirement on 'chunked' is
    that ''.join(lines) becomes a valid fulltext. A tuple of a single string
    satisfies this, as does a list of lines.

    :ivar sha1: None, or the sha1 of the content fulltext.
    :ivar size: None, or the size of the content fulltext.
    :ivar storage_kind: The native storage kind of this factory. Always
        'chunked'
    :ivar key: The key of this content. Each key is a tuple with a single
        string in it.
    :ivar parents: A tuple of parent keys for self.key. If the object has
        no parent information, None (as opposed to () for an empty list of
        parents).
    :ivar chunks_are_lines: Whether chunks are lines.
     Nc                 ó¨   — || _         t          t          t          |¦  «        ¦  «        | _        d| _        || _        || _        || _        || _	        dS )r5   r   N)
r7   ÚsumÚmapÚlenr8   r9   r'   r:   Ú_chunksÚ_chunks_are_lines)r(   r'   r:   r7   ÚchunksÚchunks_are_liness         r)   r$   zChunkedContentFactory.__init__…   sM   € àˆŒ	Ý��C Ñ(Ô(Ñ)Ô)ˆŒ	Ø%ˆÔØˆŒØˆŒØˆŒØ!1ˆÔÐÐr*   c                 ó  — |dk    r| j         S |dk    rd                     | j         ¦  «        S |dk    r4| j        r| j         S t          t	          j        | j         ¦  «        ¦  «        S t          | j        || j        ¦  «        ‚)Nr   r   r*   r   )	rC   ÚjoinrD   Úlistr   Úchunks_to_linesr    r'   r9   ©r(   r9   s     r)   Úget_bytes_asz"ChunkedContentFactory.get_bytes_as�   s‹   € Ø˜9Ò$Ð$Ø”<ÐØ˜ZÒ'Ð'Ø—8’8˜DœLÑ)Ô)Ð)Ø˜WÒ$Ð$ØÔ%ð $Ø”|Ð#Ý�Ô/°´Ñ=Ô=Ñ>Ô>Ð>Ý'¨¬°,Ø(,Ô(9ñ;ô ;ð 	;r*   c                 óú   — |dk    rt          | j        ¦  «        S |dk    rA| j        rt          | j        ¦  «        S t          t          j        | j        ¦  «        ¦  «        S t          | j        || j        ¦  «        ‚©Nr   r   )ÚiterrC   rD   r   rJ   r    r'   r9   rK   s     r)   Úiter_bytes_asz#ChunkedContentFactory.iter_bytes_as›   s|   € Ø˜9Ò$Ð$Ý˜œÑ%Ô%Ð%Ø˜WÒ$Ð$ØÔ%ð *Ý˜DœLÑ)Ô)Ð)Ý�Ô/°´Ñ=Ô=Ñ>Ô>Ð>Ý'¨¬°,Ø(,Ô(9ñ;ô ;ð 	;r*   r"   ©r+   r,   r-   r<   r$   rL   rP   r/   r*   r)   r>   r>   r   sP   € € € € € ð	ð 	ð$2ð 2ð 2ð 2ð
;ð 
;ð 
;ð;ð ;ð ;ð ;ð ;r*   r>   c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )ÚFulltextContentFactorya$  Static data content factory.

    This takes a fulltext when created and just returns that during
    get_bytes_as('fulltext').

    :ivar sha1: None, or the sha1 of the content fulltext.
    :ivar storage_kind: The native storage kind of this factory. Always
        'fulltext'.
    :ivar key: The key of this content. Each key is a tuple with a single
        string in it.
    :ivar parents: A tuple of parent keys for self.key. If the object has
        no parent information, None (as opposed to () for an empty list of
        parents).
     c                 ó¼   — || _         t          |¦  «        | _        d| _        || _        || _        t          |t          ¦  «        st          |¦  «        ‚|| _	        dS )r5   r   N)
r7   rB   r8   r9   r'   r:   Ú
isinstanceÚbytesÚ	TypeErrorÚ_text)r(   r'   r:   r7   Útexts        r)   r$   zFulltextContentFactory.__init__µ   sU   € àˆŒ	Ý˜‘I”IˆŒ	Ø&ˆÔØˆŒØˆŒÝ˜$¥Ñ&Ô&ð 	"Ý˜D‘/”/Ð!ØˆŒ
ˆ
ˆ
r*   c                 ó¶   — || j         k    r| j        S |dk    r| j        gS |dk    rt          j        | j        ¦  «        S t	          | j        || j         ¦  «        ‚rN   )r9   rX   r   Úsplit_linesr    r'   rK   s     r)   rL   z#FulltextContentFactory.get_bytes_asÀ   si   € Ø˜4Ô,Ò,Ð,Ø”:ÐØ˜YÒ&Ð&Ø”J�<ÐØ˜WÒ$Ð$ÝÔ& t¤zÑ2Ô2Ð2Ý'¨¬°,Ø(,Ô(9ñ;ô ;ð 	;r*   c                 óÆ   — |dk    rt          | j        g¦  «        S |dk    r&t          t          j        | j        ¦  «        ¦  «        S t	          | j        || j        ¦  «        ‚rN   )rO   rX   r   r[   r    r'   r9   rK   s     r)   rP   z$FulltextContentFactory.iter_bytes_asÊ   sc   € Ø˜9Ò$Ð$Ý˜œ˜Ñ%Ô%Ð%Ø˜WÒ$Ð$Ý�Ô+¨D¬JÑ7Ô7Ñ8Ô8Ð8Ý'¨¬°,Ø(,Ô(9ñ;ô ;ð 	;r*   NrQ   r/   r*   r)   rS   rS   ¥   sK   € € € € € ð	ð 	ð	ð 	ð 	ð;ð ;ð ;ð;ð ;ð ;ð ;ð ;r*   rS   c                   ó&   — e Zd ZdZdd„Zd„ Zd„ ZdS )ÚFileContentFactoryz File-based content factory.
    Nc                 óh   — || _         || _        || _        d| _        || _        || _        d| _        d S )NÚfileF)r'   r:   r`   r9   r7   r8   Ú_needs_reset)r(   r'   r:   Úfileobjr7   r8   s         r)   r$   zFileContentFactory.__init__×   s;   € ØˆŒØˆŒØˆŒ	Ø"ˆÔØˆŒ	ØˆŒ	Ø!ˆÔÐÐr*   c                 óv  — | j         r| j                             d¦  «         d| _         |dk    r| j                             ¦   «         S |dk    r&t	          t          j        | j        ¦  «        ¦  «        S |dk    r&t	          | j                             ¦   «         ¦  «        S t          | j	        || j
        ¦  «        ‚)Nr   Tr   r   r   )ra   r`   ÚseekÚreadrI   r   Úfile_iteratorÚ	readlinesr    r'   r9   rK   s     r)   rL   zFileContentFactory.get_bytes_asà   s±   € ØÔð 	ØŒI�NŠN˜1ÑÔÐØ ˆÔØ˜:Ò%Ð%Ø”9—>’>Ñ#Ô#Ð#Ø˜YÒ&Ð&Ý�Ô-¨d¬iÑ8Ô8Ñ9Ô9Ð9Ø˜WÒ$Ð$Ý˜œ	×+Ò+Ñ-Ô-Ñ.Ô.Ð.Ý'¨¬°,Ø(,Ô(9ñ;ô ;ð 	;r*   c                 óà   — | j         r| j                             d¦  «         d| _         |dk    rt          j        | j        ¦  «        S |dk    r| j        S t          | j        || j        ¦  «        ‚)Nr   Tr   r   )ra   r`   rd   r   rf   r    r'   r9   rK   s     r)   rP   z FileContentFactory.iter_bytes_así   sx   € ØÔð 	ØŒI�NŠN˜1ÑÔÐØ ˆÔØ˜9Ò$Ð$ÝÔ(¨¬Ñ3Ô3Ð3Ø˜WÒ$Ð$Ø”9ÐÝ'¨¬°,Ø(,Ô(9ñ;ô ;ð 	;r*   ©NNrQ   r/   r*   r)   r^   r^   Ó   sP   € € € € € ðð ð"ð "ð "ð "ð;ð ;ð ;ð	;ð 	;ð 	;ð 	;ð 	;r*   r^   c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )ÚAbsentContentFactoryzëA placeholder content factory for unavailable texts.

    :ivar sha1: None.
    :ivar storage_kind: 'absent'.
    :ivar key: The key of this content. Each key is a tuple with a single
        string in it.
    :ivar parents: None.
    c                 óL   — d| _         d| _        d| _        || _        d| _        dS )r5   NÚabsentr6   ©r(   r'   s     r)   r$   zAbsentContentFactory.__init__  s*   € àˆŒ	ØˆŒ	Ø$ˆÔØˆŒØˆŒˆˆr*   c                 ó2   — t          d| j        ›d�¦  «        ‚©NzA request was made for key: z[, but that content is not available, and the calling code does not handle if it is missing.©Ú
ValueErrorr'   rK   s     r)   rL   z!AbsentContentFactory.get_bytes_as  ó&   € Ýˆjð !œH˜H˜Hð'ñ (ô (ð 	(r*   c                 ó2   — t          d| j        ›d�¦  «        ‚rp   rq   rK   s     r)   rP   z"AbsentContentFactory.iter_bytes_as  rs   r*   NrQ   r/   r*   r)   rk   rk   ù   sK   € € € € € ðð ðð ð ð(ð (ð (ð(ð (ð (ð (ð (r*   rk   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚAdapterFactoryz0A content factory to adapt between key prefix's.c                 ó0   — || _         || _        || _        dS )z#Create an adapter factory instance.N)r'   r:   Ú_adapted)r(   r'   r:   Úadapteds       r)   r$   zAdapterFactory.__init__  s   € àˆŒØˆŒØˆŒˆˆr*   c                 óN   — |dv r| j         |         S t          | j        |¦  «        S )z(Return a member from the adapted object.)r'   r:   )Ú__dict__Úgetattrrx   )r(   Úattrs     r)   Ú__getattr__zAdapterFactory.__getattr__!  s-   € àÐ%Ð%Ð%Ø”= Ô&Ð&å˜4œ=¨$Ñ/Ô/Ð/r*   N)r+   r,   r-   r<   r$   r~   r/   r*   r)   rv   rv     s8   € € € € € Ø:Ð:ð ð  ð  ð0ð 0ð 0ð 0ð 0r*   rv   c              #   ó2   K  — | D ]}|j         dk    r|V — ŒdS )z/Adapt a record stream to remove absent records.rm   N)r9   )Úrecord_streamÚrecords     r)   Úfilter_absentr‚   )  s7   è è € àð ð ˆØÔ (Ò*Ð*ØˆLˆLˆLøðð r*   c                   ó6   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	Ú_MPDiffGeneratorz3Pull out the functionality for generating mp_diffs.c                 ó�   — || _         t          |¦  «        | _        d| _        i | _        i | _        d| _        i | _        i | _        d S )Nr/   )	ÚvfÚtupleÚordered_keysÚneeded_keysÚdiffsÚ
parent_mapÚghost_parentsÚ	refcountsrE   )r(   r†   Úkeyss      r)   r$   z_MPDiffGenerator.__init__3  sG   € ØˆŒå! $™KœKˆÔàˆÔàˆŒ
àˆŒàˆÔàˆŒàˆŒˆˆr*   c                 óö  — t          | j        ¦  «        }| j                             |¦  «        }|| _        |                     |¦  «        }|r-t          j        t          |¦  «        d         | j        ¦  «        ‚i }|j	        }t          ¦   «         }| 
                    ¦   «         D ]I\  }}|sŒ|                     |¦  «         |                     |¦  «         |D ]}	 ||	d¦  «        dz   ||	<   ŒŒJ|                     |¦  «         t          | j                             |¦  «        ¦  «        | _        |                     | j        ¦  «        | _        |                     | j        ¦  «         || _        || _        ||fS )a“  Find the set of keys we need to request.

        This includes all the original keys passed in, and the non-ghost
        parents of those keys.

        :return: (needed_keys, refcounts)
            needed_keys is the set of all texts we need to extract
            refcounts is a dict of {key: num_children} letting us know when we
                no longer need to cache a given parent text
        r   r   )Úsetrˆ   r†   Úget_parent_mapr‹   Ú
differencer
   ÚRevisionNotPresentrI   Ú
setdefaultÚitemsÚupdateÚdifference_updateÚpresent_parentsrŒ   r‰   r�   )
r(   r‰   r‹   Úmissing_keysr�   r”   Újust_parentsÚ	child_keyÚparent_keysÚps
             r)   Ú_find_needed_keysz"_MPDiffGenerator._find_needed_keysD  s‹  € õ ˜$Ô+Ñ,Ô,ˆØ”W×+Ò+¨KÑ8Ô8ˆ
Ø$ˆŒð #×-Ò-¨jÑ9Ô9ˆØð 	LÝÔ+­D°Ñ,>Ô,>¸qÔ,AÀ4Ä7ÑKÔKÐKð ˆ	ØÔ)ˆ
Ý‘u”uˆØ&0×&6Ò&6Ñ&8Ô&8ð 	4ð 	4Ñ"ˆI�{Øð ð Ø×Ò Ñ,Ô,Ð,Ø×Ò˜{Ñ+Ô+Ð+Ø ð 4ð 4�Ø)˜z¨!¨QÑ/Ô/°!Ñ3�	˜!‘�ð4à×&Ò& zÑ2Ô2Ð2å" 4¤7×#9Ò#9¸,Ñ#GÔ#GÑHÔHˆÔØ)×4Ò4°TÔ5IÑJÔJˆÔØ×%Ò% dÔ&8Ñ9Ô9Ð9Ø&ˆÔØ"ˆŒØ˜IÐ%Ð%r*   c                 óÌ   — t          |¦  «        dk    r#| j                             ||d         |¦  «        }nd}t          j                             |||¦  «        }|| j        |<   dS )z5Compute a single mp_diff, and store it in self._diffsr   N)rB   r†   Ú_extract_blocksÚmultiparentÚMultiParentÚ
from_linesrŠ   )r(   r'   Úparent_linesr   Úleft_parent_blocksÚdiffs         r)   Ú_compute_diffz_MPDiffGenerator._compute_diffp  sx   € åˆ|ÑÔ˜qÒ Ð ð
 "&¤×!8Ò!8¸Ø9EÀa¼È%ñ"Qô "QÐÐð "&ÐÝÔ&×1Ò1°%Ø2>Ð@RñTô TˆàˆŒ
�3‰ˆˆr*   c                 ó  — d }|| j         v ré| j                              |¦  «        }|€d}g }|D ]˜}|| j        v rŒ| j        |         }|dk    r5| j                             |¦  «         | j                             |¦  «        }n|dz
  | j        |<   | j        |         }t          j        |¦  «        }|                     |¦  «         ~Œ™t          j        |¦  «        }	|	}|                      |||	¦  «         ~	|| j        v r|| j        |<   d S d S )Nr/   r   )	r‹   ÚpoprŒ   r�   rE   r   rJ   Úappendr§   )
r(   r'   Úthis_chunksrœ   r¤   r�   ÚrefcountÚparent_chunksÚp_linesr   s
             r)   Ú_process_one_recordz$_MPDiffGenerator._process_one_record  s<  € ØˆØ�$”/Ð!Ð!ð œ/×-Ò-¨cÑ2Ô2ˆKð Ð"Ø �ØˆLØ ð ð �ð ˜Ô*Ð*Ð*ØØœ>¨!Ô,�Ø˜q’=�=Ø”N×&Ò& qÑ)Ô)Ð)Ø$(¤K§O¢O°AÑ$6Ô$6�M�Mà(0°1©�D”N 1Ñ%Ø$(¤K°¤N�MÝ!Ô1°-Ñ@Ô@�ð ×#Ò# GÑ,Ô,Ð,Ø�GÝÔ+¨KÑ8Ô8ˆEàˆKØ×Ò˜s L°%Ñ8Ô8Ð8Øà�$”.Ð Ð Ø*ˆDŒK˜ÑÐÐð !Ð r*   c                 ó"  — |                       ¦   «         \  }}| j                             |dd¦  «        D ]Z}|j        dk    rt	          j        |j        | j        ¦  «        ‚|                      |j        |                     d¦  «        ¦  «         Œ[d S )NÚtopologicalTrm   r   )	rž   r†   Úget_record_streamr9   r
   r“   r'   r¯   rL   )r(   r‰   r�   r�   s       r)   Ú_extract_diffsz_MPDiffGenerator._extract_diffs¥  s«   € Ø!%×!7Ò!7Ñ!9Ô!9Ñˆ�YØ”g×/Ò/°Ø0=¸tñEô Eð 	Eð 	EˆFàÔ" hÒ.Ð.ÝÔ/°´
¸D¼GÑDÔDÐDØ×$Ò$ V¤ZØ%+×%8Ò%8¸Ñ%CÔ%CñEô Eð Eð Eð		Eð 	Er*   c                 ój   ‡— |                       ¦   «          | j        j        Šˆfd„| j        D ¦   «         S )Nc                 ó&   •— g | ]} ‰|¦  «        ‘ŒS r/   r/   )Ú.0ÚkÚdpops     €r)   ú
<listcomp>z2_MPDiffGenerator.compute_diffs.<locals>.<listcomp>±  s!   ø€ Ð3Ð3Ð3˜A���Q‘”Ð3Ð3Ð3r*   )r³   rŠ   r©   rˆ   )r(   r¸   s    @r)   Úcompute_diffsz_MPDiffGenerator.compute_diffs®  s;   ø€ Ø×ÒÑÔÐØŒzŒ~ˆØ3Ð3Ð3Ð3 Ô!2Ð3Ñ3Ô3Ð3r*   N)
r+   r,   r-   r<   r$   rž   r§   r¯   r³   rº   r/   r*   r)   r„   r„   0  sy   € € € € € Ø=Ð=ðð ð ð"*&ð *&ð *&ðXð ð ð$+ð $+ð $+ðLEð Eð Eð4ð 4ð 4ð 4ð 4r*   r„   c                   ó   — e Zd ZdZed„ ¦   «         Zd„ Zd„ Zd„ Zd„ Z		 	 	 d!d
„Z
d„ Z	 	 d"d„Zd„ Zd#d„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZeZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	 	 d$d„Zd#d„Z e!j"        e!j#        fd „Z$dS )%ÚVersionedFileaÏ  Versioned text file storage.

    A versioned file manages versions of line-based text files,
    keeping track of the originating version for each line.

    To clients the "lines" of the file are represented as a list of
    strings. These strings will typically have terminal newline
    characters, but this is not required.  In particular files commonly
    do not have a newline at the end of the file.

    Texts are identified by a version-id string.
    c                 ó:   — t                                | ¦  «         d S r"   ©ÚrevisionÚcheck_not_reserved_id©Ú
version_ids    r)   rÀ   z#VersionedFile.check_not_reserved_idÂ  ó   € å×&Ò& zÑ2Ô2Ð2Ð2Ð2r*   c                 ó*   — t          | j        ¦  «        ‚)z.Copy this versioned file to name on transport.)ÚNotImplementedErrorÚcopy_to)r(   Únamer   s      r)   rÆ   zVersionedFile.copy_toÆ  s   € å! $¤,Ñ/Ô/Ð/r*   c                 ó*   — t          | j        ¦  «        ‚)aÛ  Get a stream of records for versions.

        :param versions: The versions to include. Each version is a tuple
            (version,).
        :param ordering: Either 'unordered' or 'topological'. A topologically
            sorted stream has compression parents strictly before their
            children.
        :param include_delta_closure: If True then the closure across any
            compression parents will be included (in the data content of the
            stream, not in the emitted records). This guarantees that
            'fulltext' can be used successfully on every record.
        :return: An iterator of ContentFactory objects, each of which is only
            valid until the iterator is advanced.
        ©rÅ   r²   )r(   ÚversionsÚorderingÚinclude_delta_closures       r)   r²   zVersionedFile.get_record_streamÊ  s   € õ " $Ô"8Ñ9Ô9Ð9r*   c                 ó*   — t          | j        ¦  «        ‚)z#Returns whether version is present.)rÅ   Úhas_version©r(   rÂ   s     r)   rÎ   zVersionedFile.has_versionÛ  s   € å! $Ô"2Ñ3Ô3Ð3r*   c                 ó   — t           ‚)z¸Insert a record stream into this versioned file.

        :param stream: A stream of records to insert.
        :return: None
        :seealso VersionedFile.get_record_stream:
        ©rÅ   ©r(   Ústreams     r)   Úinsert_record_streamz"VersionedFile.insert_record_streamß  ó
   € õ "Ð!r*   NFTc	           
      ób   — |                       ¦   «          |                      ||||||||¦  «        S )a	  Add a single text on top of the versioned file.

        Must raise RevisionAlreadyPresent if the new version is
        already present in file history.

        Must raise RevisionNotPresent if any of the given parents are
        not present in file history.

        :param lines: A list of lines. Each line must be a bytestring. And all
            of them except the last must be terminated with 
 and contain no
            other 
's. The last line may either contain no 
's or a single
            terminated 
. If the lines list does meet this constraint the add
            routine may error or may succeed - but you will be unable to read
            the data back accurately. (Checking the lines have been split
            correctly is expensive and extremely unlikely to catch bugs so it
            is not done at runtime unless check_content is True.)
        :param parent_texts: An optional dictionary containing the opaque
            representations of some or all of the parents of version_id to
            allow delta optimisations.  VERY IMPORTANT: the texts must be those
            returned by add_lines or data corruption can be caused.
        :param left_matching_blocks: a hint about which areas are common
            between the text and its left-hand-parent.  The format is
            the SequenceMatcher.get_matching_blocks format.
        :param nostore_sha: Raise ExistingContent and do not add the lines to
            the versioned file if the digest of the lines matches this.
        :param random_id: If True a random id has been selected rather than
            an id determined by some deterministic process such as a converter
            from a foreign VCS. When True the backend may choose not to check
            for uniqueness of the resulting key within the versioned file, so
            this should only be done when the result is expected to be unique
            anyway.
        :param check_content: If True, the lines supplied are verified to be
            bytestrings that are correctly formed lines.
        :return: The text sha1, the number of bytes in the text, and an opaque
                 representation of the inserted version which can be provided
                 back to future add_lines calls in the parent_texts dictionary.
        )Ú_check_write_okÚ
_add_lines©	r(   rÂ   r:   r   Úparent_textsÚleft_matching_blocksÚnostore_shaÚ	random_idÚcheck_contents	            r)   Ú	add_lineszVersionedFile.add_linesè  sA   € ðP 	×ÒÑÔÐØ�Š˜z¨7°E¸<Ø3°[À)È]ñ\ô \ð 	\r*   c	                 ó*   — t          | j        ¦  «        ‚)z*Helper to do the class specific add_lines.©rÅ   rß   rÙ   s	            r)   rØ   zVersionedFile._add_lines  s   € õ " $¤.Ñ1Ô1Ð1r*   c	           
      ób   — |                       ¦   «          |                      ||||||||¦  «        S )z“Add lines to the versioned file, allowing ghosts to be present.

        This takes the same parameters as add_lines and returns the same.
        )r×   Ú_add_lines_with_ghosts©	r(   rÂ   r:   r   rÚ   rÜ   rÝ   rÞ   rÛ   s	            r)   Úadd_lines_with_ghostsz#VersionedFile.add_lines_with_ghosts  sD   € ð 	×ÒÑÔÐØ×*Ò*¨:°wÀØ+7¸ÀiÐQ^Ð`tñvô vð 	vr*   c	                 ó*   — t          | j        ¦  «        ‚)z2Helper to do class specific add_lines_with_ghosts.)rÅ   rå   rä   s	            r)   rã   z$VersionedFile._add_lines_with_ghosts$  s   € õ " $Ô"<Ñ=Ô=Ð=r*   c                 ó*   — t          | j        ¦  «        ‚)z'Check the versioned file for integrity.©rÅ   Úcheck©r(   Úprogress_bars     r)   ré   zVersionedFile.check)  s   € å! $¤*Ñ-Ô-Ð-r*   c                 ób   — |D ]+}t          |t          ¦  «        st          j        d¦  «        ‚Œ,dS ©zACheck that lines being added to a versioned file are not unicode.r   N)rU   rV   r
   ÚBzrBadParameterUnicode©r(   r   Úlines      r)   Ú_check_lines_not_unicodez&VersionedFile._check_lines_not_unicode-  sC   € àð 	=ð 	=ˆDÝ˜d¥EÑ*Ô*ð =ÝÔ3°GÑ<Ô<Ð<ð=ð	=ð 	=r*   c                 óP   — |D ]"}d|dd…         v rt          j        d¦  «        ‚Œ#dS ©z>Check that the lines really are full lines without inline EOL.ó   
Néÿÿÿÿr   ©r
   ÚBzrBadParameterContainsNewlinerï   s      r)   Ú_check_lines_are_linesz$VersionedFile._check_lines_are_lines3  óH   € àð 	Eð 	EˆDØ˜˜S˜b˜Sœ	Ð!Ð!ÝÔ;¸GÑDÔDÐDð "ð	Eð 	Er*   c                 ó*   — t          | j        ¦  «        ‚)zXGet a text description of the data encoding in this file.

        :since: 0.90
        )rÅ   Úget_format_signaturer;   s    r)   rû   z"VersionedFile.get_format_signature9  s   € õ
 " $Ô";Ñ<Ô<Ð<r*   c                 ó  ‡‡	— t          ¦   «         Š‰                     |¦  «         |                      |¦  «        }|D ]A}	 ‰                     ||         ¦  «         Œ# t          $ r t	          j        || ¦  «        ‚w xY wt          |                      ‰¦  «        ¦  «        Št          t          ‰|                      ‰¦  «        ¦  «        ¦  «        Š	g }|D ]«}‰	|         }	 ˆˆ	fd„||         D ¦   «         }n## t          $ r t	          j        || ¦  «        ‚w xY wt          |¦  «        dk    r|  
                    ||d         |¦  «        }nd}|                     t          j                             |||¦  «        ¦  «         Œ¬|S )z0Create multiparent diffs for specified versions.c                 ó(   •— g | ]}|‰v ¯‰|         ‘ŒS r/   r/   )r¶   r�   Úknit_versionsr   s     €€r)   r¹   z.VersionedFile.make_mpdiffs.<locals>.<listcomp>V  s=   ø€ ð *ð *ð *¨ÀqØ(ðH)ð H)˜5 œ8ð H)ð H)ð H)r*   r   N)r�   r–   r‘   ÚKeyErrorr
   r“   ÚdictÚzipÚ_get_lf_split_line_listrB   r    rª   r¡   r¢   r£   )
r(   Úversion_idsr‹   rÂ   rŠ   Útargetr:   r¥   rþ   r   s
           @@r)   Úmake_mpdiffszVersionedFile.make_mpdiffs@  sú  øø€ õ ™œˆØ×Ò˜[Ñ)Ô)Ð)Ø×(Ò(¨Ñ5Ô5ˆ
Ø%ð 	Bð 	BˆJðBØ×$Ò$ Z°
Ô%;Ñ<Ô<Ð<Ð<øÝð Bð Bð BÝÔ/°
¸DÑAÔAÐAðBøøøõ ˜D×/Ò/°Ñ>Ô>Ñ?Ô?ˆÝ•S˜Ø×5Ò5°mÑDÔDñFô Fñ Gô GˆàˆØ%ð 	Qð 	QˆJØ˜:Ô&ˆFðBð*ð *ð *ð *ð *¨Z¸
Ô-Cð *ñ *ô *��øåð Bð Bð Bõ
 Ô/°
¸DÑAÔAÐAðBøøøõ �7‰|Œ|˜aÒÐØ%)×%9Ò%9¸*Ø:AÀ!¼*Àfñ&Nô &NÐ"Ð"ð &*Ð"Ø�LŠL�Ô0×;Ò;¸FÀGØ<NñPô Pñ Qô Qð Qð Qàˆs   Á AÁ A<Ã C6Ã6 Dc                 ó   — d S r"   r/   ©r(   rÂ   Úsourcer  s       r)   r    zVersionedFile._extract_blocksg  ó   € Øˆtr*   c           
      ó,  ‡— i }t                                ¦   «         Šg }|D ]3\  }}}}|                     |¦  «         ‰                     |||¦  «         Œ4t	          ¦   «         }|D ](\  }}}}|                     ˆfd„|D ¦   «         ¦  «         Œ)t	          |                      |¦  «        ¦  «        }	t          |	|                      |	¦  «        ¦  «        D ]\  }
}‰ 	                    ||
g ¦  «         Œt          |‰ 
                    |¦  «        ¦  «        D ]Á\  \  }}}}}t          |¦  «        dk    rOt          |                     d‰                     |d         ¦  «                             ¦   «         ¦  «        ¦  «        }nd}	 |                      |||||¬¦  «        \  }}}n.# t"          $ r! |                      |||||¬¦  «        \  }}}Y nw xY w|||<   ŒÂ|                      |¦  «        }|D ]'\  }}}}|||         k    rt)          j        |¦  «        ‚Œ(dS )ú­Add mpdiffs to this VersionedFile.

        Records should be iterables of version, parents, expected_sha1,
        mpdiff. mpdiff should be a MultiParent instance.
        c              3   óF   •K  — | ]}‰                      |¦  «        °|V — Œd S r"   ©rÎ   ©r¶   r�   Úmpvfs     €r)   ú	<genexpr>z,VersionedFile.add_mpdiffs.<locals>.<genexpr>y  óI   øè è € ð ">ð ">¨Ø)-×)9Ò)9¸!Ñ)<Ô)<ð"> !ð ">ð ">ð ">ð ">ð ">ð ">r*   r   r   N©rÛ   )r¡   ÚMultiMemoryVersionedFilerª   Úadd_diffr�   r–   r‘   r  r  Úadd_versionÚget_line_listrB   rI   Úget_matching_blocksÚget_diffÚ	num_linesrå   rÅ   rß   Ú	get_sha1sr
   ÚVersionedFileInvalidChecksum)r(   ÚrecordsÚ
vf_parentsrÊ   ÚversionÚ
parent_idsÚexpected_sha1ÚmpdiffÚneeded_parentsr˜   Ú	parent_idr   rÛ   Ú_Úversion_textÚsha1sr  s                   @r)   Úadd_mpdiffszVersionedFile.add_mpdiffsj  sÉ  ø€ ð ˆ
Ý×3Ò3Ñ5Ô5ˆØˆØ:Að 	7ð 	7Ñ6ˆG�Z °Ø�OŠO˜GÑ$Ô$Ð$Ø�MŠM˜& '¨:Ñ6Ô6Ð6Ð6Ý™œˆØ:Að 	>ð 	>Ñ6ˆG�Z °Ø×!Ò!ð ">ð ">ð ">ð ">¨Zð ">ñ ">ô ">ñ >ô >ð >ð >å˜d×1Ò1°.ÑAÔAÑBÔBˆÝ # OØ$(×$@Ò$@ÀÑ$QÔ$Qñ!Sô !Sð 	3ð 	3ÑˆI�uà×Ò˜U I¨rÑ2Ô2Ð2Ð2ÝCFØ˜×+Ò+¨HÑ5Ô5ñD7ô D7ð 	/ð 	/Ñ?Ñ8ˆW�j -°¸%å�:‰Œ !Ò#Ð#Ý'+¨F×,FÒ,FÀqØGKÇ}Â}ÐU_Ð`aÔUbÑGcÔGc×GmÒGmÑGoÔGoñ-qô -qñ (rô (rÐ$Ð$ð (,Ð$ð	_Ø%)×%?Ò%?ÀØ@JÈEÐS]ØUið &@ñ &kô &kÑ"��1�l�løõ 'ð _ð _ð _ð &*§^¢^°GØ4>ÀÀzØI]ð &4ñ &_ô &_Ñ"��1�l�l�lð_øøøð #/ˆJ�wÑÐØ—’˜xÑ(Ô(ˆØ:Að 	Cð 	CÑ6ˆG�Z °Ø  g¤Ò.Ð.ÝÔ9¸'ÑBÔBÐBð /ð	Cð 	Cs   ÆF!Æ!(GÇGc                 óR   — d                      |                      |¦  «        ¦  «        S )zˆReturn version contents as a text string.

        Raises RevisionNotPresent if version is not present in
        file history.
        r*   ©rH   Ú	get_linesrÏ   s     r)   Úget_textzVersionedFile.get_text–  s"   € ð �xŠx˜Ÿš zÑ2Ô2Ñ3Ô3Ð3r*   c                 ó    ‡ — ˆ fd„|D ¦   «         S )z˜Return the texts of listed versions as a list of strings.

        Raises RevisionNotPresent if version is not present in
        file history.
        c                 ó`   •— g | ]*}d                       ‰                     |¦  «        ¦  «        ‘Œ+S )r*   r)  )r¶   Úvr(   s     €r)   r¹   z+VersionedFile.get_texts.<locals>.<listcomp>¥  s1   ø€ ÐAÐAÐA°�—’˜Ÿš¨Ñ*Ô*Ñ+Ô+ÐAÐAÐAr*   r/   ©r(   r  s   ` r)   Ú	get_textszVersionedFile.get_textsŸ  s    ø€ ð BÐAÐAÐA°[ÐAÑAÔAÐAr*   c                 ó*   — t          | j        ¦  «        ‚)zŽReturn version contents as a sequence of lines.

        Raises RevisionNotPresent if version is not present in
        file history.
        )rÅ   r*  rÏ   s     r)   r*  zVersionedFile.get_lines§  s   € õ " $¤.Ñ1Ô1Ð1r*   c                 ó@   — d„ |                       |¦  «        D ¦   «         S )Nc                 óP   — g | ]#}t          |¦  «                             ¦   «         ‘Œ$S r/   )r   rg   )r¶   Úts     r)   r¹   z9VersionedFile._get_lf_split_line_list.<locals>.<listcomp>°  s*   € ÐLÐLÐL¨1•˜‘
”
×$Ò$Ñ&Ô&ÐLÐLÐLr*   )r0  r/  s     r)   r  z%VersionedFile._get_lf_split_line_list¯  s"   € ØLÐL°·²¸{Ñ0KÔ0KÐLÑLÔLÐLr*   c                 ó*   — t          | j        ¦  «        ‚)zÑReturn a list of all ancestors of given version(s). This
        will not include the null revision.

        Must raise RevisionNotPresent if any of the given versions are
        not present in file history.)rÅ   Úget_ancestryr/  s     r)   r6  zVersionedFile.get_ancestry²  s   € õ " $Ô"3Ñ4Ô4Ð4r*   c                 ó*   — t          | j        ¦  «        ‚)aI  Return a list of all ancestors of given version(s). This
        will not include the null revision.

        Must raise RevisionNotPresent if any of the given versions are
        not present in file history.

        Ghosts that are known about will be included in ancestry list,
        but are not explicitly marked.
        )rÅ   Úget_ancestry_with_ghostsr/  s     r)   r8  z&VersionedFile.get_ancestry_with_ghostsº  s   € õ " $Ô"?Ñ@Ô@Ð@r*   c                 ó*   — t          | j        ¦  «        ‚)z­Get a map of the parents of version_ids.

        :param version_ids: The version ids to look up parents for.
        :return: A mapping from version id to parents.
        ©rÅ   r‘   r/  s     r)   r‘   zVersionedFile.get_parent_mapÆ  s   € õ " $Ô"5Ñ6Ô6Ð6r*   c                 óœ   — 	 t          |                      |g¦  «        |         ¦  «        S # t          $ r t          j        || ¦  «        ‚w xY w)a  Return version names for parents of version_id.

        Will raise RevisionNotPresent if version_id is not present
        in the history.

        Ghosts that are known about will be included in the parent list,
        but are not explicitly marked.
        )rI   r‘   rÿ   r
   r“   rÏ   s     r)   Úget_parents_with_ghostsz%VersionedFile.get_parents_with_ghostsÎ  sX   € ð	>Ý˜×+Ò+¨Z¨LÑ9Ô9¸*ÔEÑFÔFÐFøÝð 	>ð 	>ð 	>ÝÔ+¨J¸Ñ=Ô=Ð=ð	>øøøs	   ‚(+ « Ac                 ó*   — t          | j        ¦  «        ‚)z¤Return a list of (version-id, line) tuples for version_id.

        :raise RevisionNotPresent: If the given version is
        not present in file history.
        ©rÅ   ÚannotaterÏ   s     r)   r?  zVersionedFile.annotateÜ  s   € õ " $¤-Ñ0Ô0Ð0r*   c                 ó*   — t          | j        ¦  «        ‚)aã  Iterate over the lines in the versioned file from version_ids.

        This may return lines from other versions. Each item the returned
        iterator yields is a tuple of a line and a text version that that line
        is present in (not introduced in).

        Ordering of results is in whatever order is most suitable for the
        underlying storage format.

        If a progress bar is supplied, it may be used to indicate progress.
        The caller is responsible for cleaning up progress bars (because this
        is an iterator).

        NOTES: Lines are normalised: they will all have 
 terminators.
               Lines are returned in arbitrary order.

        :return: An iterator over (line, version_id).
        )rÅ   Ú'iter_lines_added_or_present_in_versions)r(   r  Úpbs      r)   rA  z5VersionedFile.iter_lines_added_or_present_in_versionsä  s   € õ( " $Ô"NÑOÔOÐOr*   c                 ó4   — t          t          j        ¦  «        ‚)a�  Return pseudo-annotation indicating how the two versions merge.

        This is computed between versions a and b and their common
        base.

        Weave lines present in none of them are skipped entirely.

        Legend:
        killed-base Dead in base revision
        killed-both Killed in each revision
        killed-a    Killed in a
        killed-b    Killed in b
        unchanged   Alive in both a and b (possibly created in both)
        new-a       Created in a
        new-b       Created in b
        ghost-a     Killed in a, unborn in b
        ghost-b     Killed in b, unborn in a
        irrelevant  Not in either revision
        )rÅ   r¼   Ú
plan_merge)r(   Úver_aÚver_bÚbases       r)   rD  zVersionedFile.plan_mergeú  s   € õ( "¥-Ô":Ñ;Ô;Ð;r*   c                 óT   — t          |||¦  «                             ¦   «         d         S ©Nr   )ÚPlanWeaveMergeÚmerge_lines©r(   ÚplanÚa_markerÚb_markers       r)   Úweave_mergezVersionedFile.weave_merge  s%   € å˜d H¨hÑ7Ô7×CÒCÑEÔEÀaÔHÐHr*   ©NNNFT)NNFTNr"   ri   )%r+   r,   r-   r<   ÚstaticmethodrÀ   rÆ   r²   rÎ   rÔ   rß   rØ   rå   rã   ré   rñ   rø   rû   r  r    r'  r+  Ú
get_stringr0  r*  r  r6  r8  r‘   r<  r?  rA  rD  r   ÚA_MARKERÚB_MARKERrP  r/   r*   r)   r¼   r¼   ´  sF  € € € € € ðð ð ð3ð 3ñ „\ð3ð0ð 0ð 0ð:ð :ð :ð"4ð 4ð 4ð"ð "ð "ð BFØINØ $ð*\ð *\ð *\ð *\ðX2ð 2ð 2ð NSØGKð	vð 	vð 	vð 	vð>ð >ð >ð
.ð .ð .ð .ð=ð =ð =ðEð Eð Eð=ð =ð =ð%ð %ð %ðNð ð ð*Cð *Cð *CðX4ð 4ð 4ð €JðBð Bð Bð2ð 2ð 2ðMð Mð Mð5ð 5ð 5ð
Að 
Að 
Að7ð 7ð 7ð>ð >ð >ð1ð 1ð 1ð CGØ37ðPð Pð Pð Pð,<ð <ð <ð <ð, *3Ô);Ø&Ô/ðIð Ið Ið Ið Ið Ir*   r¼   c                   óZ   — e Zd ZdZd„ Z	 	 	 dd„Z	 	 	 dd„Zd„ Zd	„ Zd
„ Z	d„ Z
dd„Zd„ ZdS )Ú RecordingVersionedFilesDecoratorzíA minimal versioned files that records calls made on it.

    Only enough methods have been added to support tests using it to date.

    :ivar calls: A list of the calls made; can be reset at any time by
        assigning [] to it.
    c                 ó"   — || _         g | _        dS )z�Create a RecordingVersionedFilesDecorator decorating backing_vf.

        :param backing_vf: The versioned file to answer all methods.
        N)Ú_backing_vfÚcalls)r(   Ú
backing_vfs     r)   r$   z)RecordingVersionedFilesDecorator.__init__  s   € ð
 &ˆÔØˆŒ
ˆ
ˆ
r*   NFTc	                 óŠ   — | j                              d||||||||f	¦  «         | j                             ||||||||¦  «        S )Nrß   )rZ  rª   rY  rß   ©	r(   r'   r:   r   rÚ   rÛ   rÜ   rÝ   rÞ   s	            r)   rß   z*RecordingVersionedFilesDecorator.add_lines&  sj   € ð 	Œ
×Ò˜;¨¨W°e¸\Ø/°¸iÈðXñ 	Yô 	Yð 	YàÔ×)Ò)¨#¨w¸¸|Ø*>ÀÈYÐXeñgô gð 	gr*   c           	      ó‚   — | j                              d||||||f¦  «         | j                             ||||||¦  «        S )NÚadd_content)rZ  rª   rY  r_  ©r(   ÚfactoryrÚ   rÛ   rÜ   rÝ   rÞ   s          r)   r_  z,RecordingVersionedFilesDecorator.add_content.  s`   € ð 	Œ
×Ò˜=¨'°<Ø/°¸iÈðXñ 	Yô 	Yð 	YàÔ×+Ò+Ø�\Ð#7¸Ø�}ñ&ô &ð 	&r*   c                 ó8   — | j                              ¦   «          d S r"   )rY  ré   r;   s    r)   ré   z&RecordingVersionedFilesDecorator.check7  s   € ØÔ×ÒÑ Ô Ð Ð Ð r*   c                 óˆ   — | j                              dt          |¦  «        f¦  «         | j                             |¦  «        S )Nr‘   )rZ  rª   r   rY  r‘   ©r(   rŽ   s     r)   r‘   z/RecordingVersionedFilesDecorator.get_parent_map:  s;   € ØŒ
×ÒÐ+­T°$©Z¬ZÐ8Ñ9Ô9Ð9ØÔ×.Ò.¨tÑ4Ô4Ð4r*   c                 ó�   — | j                              dt          |¦  «        ||f¦  «         | j                             |||¦  «        S )Nr²   )rZ  rª   rI   rY  r²   )r(   rŽ   Ú
sort_orderrÌ   s       r)   r²   z2RecordingVersionedFilesDecorator.get_record_stream>  sV   € ØŒ
×ÒÐ.µ°T±
´
¸JØ0ð2ñ 	3ô 	3ð 	3àÔ×1Ò1°$¸
Ø2GñIô Ið 	Ir*   c                 óˆ   — | j                              dt          |¦  «        f¦  «         | j                             |¦  «        S )Nr  )rZ  rª   r   rY  r  rd  s     r)   r  z*RecordingVersionedFilesDecorator.get_sha1sD  s:   € ØŒ
×Ò˜;­¨T©
¬
Ð3Ñ4Ô4Ð4ØÔ×)Ò)¨$Ñ/Ô/Ð/r*   c                 óŒ   — | j                              dt          |¦  «        f¦  «         | j                             ||¬¦  «        S )NÚ#iter_lines_added_or_present_in_keys)rB  )rZ  rª   r   rY  ri  ©r(   rŽ   rB  s      r)   ri  zDRecordingVersionedFilesDecorator.iter_lines_added_or_present_in_keysH  s@   € ØŒ
×ÒÐ@Å$ÀtÁ*Ä*ÐMÑNÔNÐNØÔ×CÒCÀDÈRÐCÑPÔPÐPr*   c                 óh   — | j                              d¦  «         | j                             ¦   «         S )N)rŽ   )rZ  rª   rY  rŽ   r;   s    r)   rŽ   z%RecordingVersionedFilesDecorator.keysL  s-   € ØŒ
×Ò˜)Ñ$Ô$Ð$ØÔ×$Ò$Ñ&Ô&Ð&r*   rQ  r"   )r+   r,   r-   r<   r$   rß   r_  ré   r‘   r²   r  ri  rŽ   r/   r*   r)   rW  rW    sÕ   € € € € € ðð ðð ð ð ;?ØINØ $ðgð gð gð gð 15ØKPØ"&ð&ð &ð &ð &ð!ð !ð !ð5ð 5ð 5ðIð Ið Ið0ð 0ð 0ðQð Qð Qð Qð'ð 'ð 'ð 'ð 'r*   rW  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚOrderingVersionedFilesDecoratorz¥A VF that records calls, and returns keys in specific order.

    :ivar calls: A list of the calls made; can be reset at any time by
        assigning [] to it.
    c                 óJ   — t                                | |¦  «         || _        dS )a×  Create a RecordingVersionedFilesDecorator decorating backing_vf.

        :param backing_vf: The versioned file to answer all methods.
        :param key_priority: A dictionary defining what order keys should be
            returned from an 'unordered' get_record_stream request.
            Keys with lower priority are returned first, keys not present in
            the map get an implicit priority of 0, and are returned in
            lexicographical order.
        N)rW  r$   Ú_key_priority)r(   r[  Úkey_prioritys      r)   r$   z(OrderingVersionedFilesDecorator.__init__X  s(   € õ 	)×1Ò1°$¸
ÑCÔCÐCØ)ˆÔÐÐr*   c              #   ó.  ‡ K  — ‰ j                              dt          |¦  «        ||f¦  «         |dk    r>ˆ fd„}t          ||¬¦  «        D ]%}‰ j                             |gd|¦  «        E d {V —† Œ&d S ‰ j                             |||¦  «        E d {V —† d S )Nr²   Ú	unorderedc                 ó>   •— ‰j                              | d¦  «        | fS rI  )ro  Úget)r'   r(   s    €r)   Úsort_keyzCOrderingVersionedFilesDecorator.get_record_stream.<locals>.sort_keyi  s!   ø€ ØÔ*×.Ò.¨s°AÑ6Ô6¸Ð<Ð<r*   )r'   )rZ  rª   rI   ÚsortedrY  r²   )r(   rŽ   rf  rÌ   ru  r'   s   `     r)   r²   z1OrderingVersionedFilesDecorator.get_record_streame  s/  øè è € ØŒ
×ÒÐ.µ°T±
´
¸JØ0ð2ñ 	3ô 	3ð 	3à˜Ò$Ð$ð=ð =ð =ð =ð =õ ˜d¨Ð1Ñ1Ô1ð eð e�ØÔ+×=Ò=¸s¸eØALÐNcñeô eð eð eð eð eð eð eð eð eðeð eð Ô'×9Ò9¸$À
Ø=RñTô Tð Tð Tð Tð Tð Tð Tð Tð Tð Tr*   N)r+   r,   r-   r<   r$   r²   r/   r*   r)   rm  rm  Q  sA   € € € € € ðð ð*ð *ð *ðTð Tð Tð Tð Tr*   rm  c                   ó   — e Zd ZdZd„ Zd„ ZdS )Ú	KeyMapperz?KeyMappers map between keys and underlying partitioned storage.c                 ó*   — t          | j        ¦  «        ‚)zàMap key to an underlying storage identifier.

        :param key: A key tuple e.g. (b'file-id', b'revision-id').
        :return: An underlying storage identifier, specific to the partitioning
            mechanism.
        )rÅ   rA   rn   s     r)   rA   zKeyMapper.mapx  s   € õ " $¤(Ñ+Ô+Ð+r*   c                 ó*   — t          | j        ¦  «        ‚)z×Map a partitioned storage id back to a key prefix.

        :param partition_id: The underlying partition id.
        :return: As much of a key (or prefix) as is derivable from the partition
            id.
        )rÅ   Úunmap©r(   Úpartition_ids     r)   r{  zKeyMapper.unmap�  s   € õ " $¤*Ñ-Ô-Ð-r*   N©r+   r,   r-   r<   rA   r{  r/   r*   r)   rx  rx  u  s8   € € € € € ØIÐIð,ð ,ð ,ð.ð .ð .ð .ð .r*   rx  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚConstantMapperz,A key mapper that maps to a constant result.c                 ó   — || _         dS )z>Create a ConstantMapper which will return result for all maps.N©Ú_result)r(   Úresults     r)   r$   zConstantMapper.__init__Ž  s   € àˆŒˆˆr*   c                 ó   — | j         S ©úSee KeyMapper.map().r‚  rn   s     r)   rA   zConstantMapper.map’  s
   € àŒ|Ðr*   N)r+   r,   r-   r<   r$   rA   r/   r*   r)   r€  r€  ‹  s8   € € € € € Ø6Ð6ðð ð ðð ð ð ð r*   r€  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚURLEscapeMapperz©Base class for use with transport backed storage.

    This provides a map and unmap wrapper that respectively url escape and
    unescape their outputs and inputs.
    c                 ó\   — t                                |                      |¦  «        ¦  «        S r†  )ÚurlutilsÚquoteÚ_maprn   s     r)   rA   zURLEscapeMapper.mapž  s   € å�~Š~˜dŸiši¨™nœnÑ-Ô-Ð-r*   c                 ó\   — |                       t                               |¦  «        ¦  «        S )úSee KeyMapper.unmap().)Ú_unmapr‹  Úunquoter|  s     r)   r{  zURLEscapeMapper.unmap¢  s"   € à�{Š{�8×+Ò+¨LÑ9Ô9Ñ:Ô:Ð:r*   Nr~  r/   r*   r)   r‰  r‰  —  s<   € € € € € ðð ð.ð .ð .ð;ð ;ð ;ð ;ð ;r*   r‰  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚPrefixMapperzyA key mapper that extracts the first component of a key.

    This mapper is for use with a transport based backend.
    c                 ó8   — |d                               d¦  «        S )r‡  r   úutf-8)Údecodern   s     r)   r�  zPrefixMapper._map­  s   € à�1Œv�}Š}˜WÑ%Ô%Ð%r*   c                 ó.   — |                      d¦  «        fS ©r�  r•  )Úencoder|  s     r)   r�  zPrefixMapper._unmap±  s   € à×#Ò# GÑ,Ô,Ð.Ð.r*   N)r+   r,   r-   r<   r�  r�  r/   r*   r)   r“  r“  §  s<   € € € € € ðð ð
&ð &ð &ð/ð /ð /ð /ð /r*   r“  c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚHashPrefixMapperz…A key mapper that combines the first component of a key with a hash.

    This mapper is for use with a transport based backend.
    c                 óª   — |                       |d         ¦  «        }d                     t          |¦  «        dz  |                     d¦  «        ¦  «        S )r‡  r   z	{:02x}/{}éÿ   r•  )Ú_escapeÚformatr   r–  )r(   r'   Úprefixs      r)   r�  zHashPrefixMapper._map¼  sD   € à—’˜c !œfÑ%Ô%ˆØ×!Ò!¥'¨&¡/¤/°DÑ"8¸&¿-º-ÈÑ:PÔ:PÑQÔQÐQr*   c                 ó   — |S )zNo escaping needed here.r/   )r(   r   s     r)   rž  zHashPrefixMapper._escapeÁ  s   € àˆr*   c                 óx   — |                       t          j        |¦  «        ¦  «                             d¦  «        fS r˜  )Ú	_unescaper   Úbasenamer™  r|  s     r)   r�  zHashPrefixMapper._unmapÅ  s0   € à—’�wÔ/°Ñ=Ô=Ñ>Ô>×EÒEÀgÑNÔNÐPÐPr*   c                 ó   — |S )z*No unescaping needed for HashPrefixMapper.r/   ©r(   r¤  s     r)   r£  zHashPrefixMapper._unescapeÉ  s   € àˆr*   N)r+   r,   r-   r<   r�  rž  r�  r£  r/   r*   r)   r›  r›  ¶  s`   € € € € € ðð ð
Rð Rð Rð
ð ð ðQð Qð Qðð ð ð ð r*   r›  c                   ó4   — e Zd ZdZ ed¦  «        Zd„ Zd„ ZdS )ÚHashEscapedPrefixMapperz{Combines the escaped first component of a key with a hash.

    This mapper is for use with a transport based backend.
    s)   abcdefghijklmnopqrstuvwxyz0123456789-_@,.c                 óŠ   ‡ — ˆ fd„t          |¦  «        D ¦   «         }d                     |¦  «                             d¦  «        S )zåTurn a key element into a filesystem safe string.

        This is similar to a plain urlutils.quote, except
        it uses specific safe characters, so that it doesn't
        have to translate a lot of valid file ids.
        c                 óJ   •— g | ]}|‰j         v rt          |¦  «        pd |z  ‘Œ S )z%%%02x)Ú_safeÚchr)r¶   Úcr(   s     €r)   r¹   z3HashEscapedPrefixMapper._escape.<locals>.<listcomp>à  sC   ø€ ð )ð )ð )Øð �4”:ˆoÐ)¥3 q¡6¤6Ð;¨h¸©lð )ð )ð )r*   Ú Úascii)Ú	bytearrayrH   r™  )r(   r   Úrs   `  r)   rž  zHashEscapedPrefixMapper._escapeÖ  sQ   ø€ ð)ð )ð )ð )Ý Ñ'Ô'ð)ñ )ô )ˆà�wŠw�q‰zŒz× Ò  Ñ)Ô)Ð)r*   c                 ó6   — t                                |¦  «        S )z/Escaped names are easily unescaped by urlutils.)r‹  r‘  r¦  s     r)   r£  z!HashEscapedPrefixMapper._unescapeä  s   € å×Ò Ñ)Ô)Ð)r*   N)r+   r,   r-   r<   r°  r«  rž  r£  r/   r*   r)   r¨  r¨  Î  sN   € € € € € ðð ð
 ˆIÐBÑCÔC€Eð*ð *ð *ð*ð *ð *ð *ð *r*   r¨  c                 ó   ‡ ‡— ˆˆ fd„}|S )a  Create a ThunkedVersionedFiles factory.

    This will create a callable which when called creates a
    ThunkedVersionedFiles on a transport, using mapper to access individual
    versioned files, and versioned_file_factory to create each individual file.
    c                 ó*   •— t          | ‰‰d„ ¦  «        S )Nc                  ó   — dS )NTr/   r/   r*   r)   ú<lambda>z?make_versioned_files_factory.<locals>.factory.<locals>.<lambda>ò  s   € ¨T€ r*   )ÚThunkedVersionedFiles)r   ÚmapperÚversioned_file_factorys    €€r)   ra  z-make_versioned_files_factory.<locals>.factoryð  s!   ø€ Ý$ YÐ0FÈØ%1 \ñ3ô 3ð 	3r*   r/   )r¹  r¸  ra  s   `` r)   Úmake_versioned_files_factoryrº  é  s)   øø€ ð3ð 3ð 3ð 3ð 3ð 3ð €Nr*   c                   óÐ   — e Zd ZdZ	 	 	 dd„Z	 	 	 dd„Zd„ Zd„ Zdd	„Ze	d
„ ¦   «         Z
d„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zej        Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zej        Zd„ Zd„ ZdS )ÚVersionedFilesa  Storage for many versioned files.

    This object allows a single keyspace for accessing the history graph and
    contents of named bytestrings.

    Currently no implementation allows the graph of different key prefixes to
    intersect, but the API does allow such implementations in the future.

    The keyspace is expressed via simple tuples. Any instance of VersionedFiles
    may have a different length key-size, but that size will be constant for
    all texts added to or retrieved from it. For instance, breezy uses
    instances with a key-size of 2 for storing user files in a repository, with
    the first element the fileid, and the second the version of that file.

    The use of tuples allows a single code base to support several different
    uses with only the mapping logic changing from instance to instance.

    :ivar _immediate_fallback_vfs: For subclasses that support stacking,
        this is a list of other VersionedFiles immediately underneath this
        one.  They may in turn each have further fallbacks.
    NFTc	                 ó*   — t          | j        ¦  «        ‚)aì  Add a text to the store.

        :param key: The key tuple of the text to add. If the last element is
            None, a CHK string will be generated during the addition.
        :param parents: The parents key tuples of the text to add.
        :param lines: A list of lines. Each line must be a bytestring. And all
            of them except the last must be terminated with 
 and contain no
            other 
's. The last line may either contain no 
's or a single
            terminating 
. If the lines list does meet this constraint the add
            routine may error or may succeed - but you will be unable to read
            the data back accurately. (Checking the lines have been split
            correctly is expensive and extremely unlikely to catch bugs so it
            is not done at runtime unless check_content is True.)
        :param parent_texts: An optional dictionary containing the opaque
            representations of some or all of the parents of version_id to
            allow delta optimisations.  VERY IMPORTANT: the texts must be those
            returned by add_lines or data corruption can be caused.
        :param left_matching_blocks: a hint about which areas are common
            between the text and its left-hand-parent.  The format is
            the SequenceMatcher.get_matching_blocks format.
        :param nostore_sha: Raise ExistingContent and do not add the lines to
            the versioned file if the digest of the lines matches this.
        :param random_id: If True a random id has been selected rather than
            an id determined by some deterministic process such as a converter
            from a foreign VCS. When True the backend may choose not to check
            for uniqueness of the resulting key within the versioned file, so
            this should only be done when the result is expected to be unique
            anyway.
        :param check_content: If True, the lines supplied are verified to be
            bytestrings that are correctly formed lines.
        :return: The text sha1, the number of bytes in the text, and an opaque
                 representation of the inserted version which can be provided
                 back to future add_lines calls in the parent_texts dictionary.
        rá   r]  s	            r)   rß   zVersionedFiles.add_lines  s   € õJ " $¤.Ñ1Ô1Ð1r*   c                 ó*   — t          | j        ¦  «        ‚)aÝ  Add a text to the store from a chunk iterable.

        :param key: The key tuple of the text to add. If the last element is
            None, a CHK string will be generated during the addition.
        :param parents: The parents key tuples of the text to add.
        :param chunk_iter: An iterable over bytestrings.
        :param parent_texts: An optional dictionary containing the opaque
            representations of some or all of the parents of version_id to
            allow delta optimisations.  VERY IMPORTANT: the texts must be those
            returned by add_lines or data corruption can be caused.
        :param left_matching_blocks: a hint about which areas are common
            between the text and its left-hand-parent.  The format is
            the SequenceMatcher.get_matching_blocks format.
        :param nostore_sha: Raise ExistingContent and do not add the lines to
            the versioned file if the digest of the lines matches this.
        :param random_id: If True a random id has been selected rather than
            an id determined by some deterministic process such as a converter
            from a foreign VCS. When True the backend may choose not to check
            for uniqueness of the resulting key within the versioned file, so
            this should only be done when the result is expected to be unique
            anyway.
        :param check_content: If True, the lines supplied are verified to be
            bytestrings that are correctly formed lines.
        :return: The text sha1, the number of bytes in the text, and an opaque
                 representation of the inserted version which can be provided
                 back to future add_lines calls in the parent_texts dictionary.
        )rÅ   r_  r`  s          r)   r_  zVersionedFiles.add_content4  s   € õ< " $Ô"2Ñ3Ô3Ð3r*   c           
      óh  ‡— i }t                                ¦   «         Šg }|D ]3\  }}}}|                     |¦  «         ‰                     |||¦  «         Œ4t	          ¦   «         }|D ](\  }}}}|                     ˆfd„|D ¦   «         ¦  «         Œ)|                      |dd¦  «        D ]=}	|	j        dk    rŒ‰                     |	 	                    d¦  «        |	j
        g ¦  «         Œ>t          |‰                     |¦  «        ¦  «        D ]«\  \  }
}}}}t          |¦  «        dk    rOt          |                     d‰                     |d         ¦  «                             ¦   «         ¦  «        ¦  «        }nd}|                      |
||||¬	¦  «        \  }}}||k    rt'          j        |¦  «        ‚|||
<   Œ¬dS )
r  c              3   óF   •K  — | ]}‰                      |¦  «        °|V — Œd S r"   r  r  s     €r)   r  z-VersionedFiles.add_mpdiffs.<locals>.<genexpr>b  r  r*   rr  Trm   r   r   r   Nr  )r¡   r  rª   r  r�   r–   r²   r9   r  rL   r'   r  r  rB   rI   r  r  r  rß   r
   r  )r(   r  r  rÊ   r  r  r   r!  r"  r�   r'   rœ   r   rÛ   Úversion_sha1r$  r%  r  s                    @r)   r'  zVersionedFiles.add_mpdiffsT  s0  ø€ ð ˆ
Ý×3Ò3Ñ5Ô5ˆØˆØ:Að 	7ð 	7Ñ6ˆG�Z °Ø�OŠO˜GÑ$Ô$Ð$Ø�MŠM˜& '¨:Ñ6Ô6Ð6Ð6Ý™œˆØ:Að 	>ð 	>Ñ6ˆG�Z °Ø×!Ò!ð ">ð ">ð ">ð ">¨Zð ">ñ ">ô ">ñ >ô >ð >ð >ð ×,Ò,¨^¸[Ø-1ñ3ô 3ð 	Kð 	KˆFàÔ" hÒ.Ð.ØØ×Ò˜V×0Ò0°Ñ9Ô9¸6¼:ÀrÑJÔJÐJÐJÝ@CØ˜×+Ò+¨HÑ5Ô5ñA7ô A7ð 	+ð 	+Ñ<Ñ5ˆS�+˜}¨f°uå�;ÑÔ 1Ò$Ð$Ý'+¨F×,FÒ,FÀqØGKÇ}Â}ÐU`ÐabÔUcÑGdÔGd×GnÒGnÑGpÔGpñ-rô -rñ (sô (sÐ$Ð$ð (,Ð$Ø,0¯NªN¸3Ø;FÈÈzØPdð -;ñ -fô -fÑ)ˆL˜!˜\ð ˜}Ò,Ð,ÝÔ9¸'ÑBÔBÐBØ*ˆJ�s‰OˆOð	+ð 	+r*   c                 ó*   — t          | j        ¦  «        ‚)úˆReturn a list of (version-key, line) tuples for the text of key.

        :raise RevisionNotPresent: If the key is not present.
        r>  rn   s     r)   r?  zVersionedFiles.annotatey  s   € õ
 " $¤-Ñ0Ô0Ð0r*   c                 ó*   — t          | j        ¦  «        ‚)añ  Check this object for integrity.

        :param progress_bar: A progress bar to output as the check progresses.
        :param keys: Specific keys within the VersionedFiles to check. When
            this parameter is not None, check() becomes a generator as per
            get_record_stream. The difference to get_record_stream is that
            more or deeper checks will be performed.
        :return: None, or if keys was supplied a generator as per
            get_record_stream.
        rè   rê   s     r)   ré   zVersionedFiles.check€  s   € õ " $¤*Ñ-Ô-Ð-r*   c                 ó:   — t                                | ¦  «         d S r"   r¾   rÁ   s    r)   rÀ   z$VersionedFiles.check_not_reserved_id�  rÃ   r*   c                 ó   — dS )zÊClear whatever caches this VersionedFile holds.

        This is generally called after an operation has been performed, when we
        don't expect to be using this versioned file again soon.
        Nr/   r;   s    r)   Úclear_cachezVersionedFiles.clear_cache‘  s   € € € r*   c                 óT   — |D ]$}|j         t          urt          j        d¦  «        ‚Œ%dS rí   )Ú	__class__rV   r
   rî   rï   s      r)   rñ   z'VersionedFiles._check_lines_not_unicode˜  s>   € àð 	=ð 	=ˆDØŒ~¥UÐ*Ð*ÝÔ3°GÑ<Ô<Ð<ð +ð	=ð 	=r*   c                 óP   — |D ]"}d|dd…         v rt          j        d¦  «        ‚Œ#dS ró   rö   rï   s      r)   rø   z%VersionedFiles._check_lines_are_linesž  rù   r*   c                 óR  — t          |¦  «        }i }|r|                      |¦  «        }|                     |¦  «         t          t          j                             |                     ¦   «         ¦  «        ¦  «        }|                     |¦  «         |°t          j	        |¦  «        }|S ©z4Get a KnownGraph instance with the ancestry of keys.)
r�   r‘   r–   Ú	itertoolsÚchainÚfrom_iterableÚvaluesr—   Ú
_mod_graphÚ
KnownGraph)r(   rŽ   Úpendingr‹   Úthis_parent_mapÚkgs         r)   Úget_known_graph_ancestryz'VersionedFiles.get_known_graph_ancestry¤  sª   € õ �d‘)”)ˆØˆ
Øð 	2Ø"×1Ò1°'Ñ:Ô:ˆOØ×Ò˜oÑ.Ô.Ð.Ý�)œ/×7Ò7Ø×&Ò&Ñ(Ô(ñ*ô *ñ +ô +ˆGà×%Ò% jÑ1Ô1Ð1ð ð 	2õ Ô" :Ñ.Ô.ˆØˆ	r*   c                 ó*   — t          | j        ¦  «        ‚)úÇGet a map of the parents of keys.

        :param keys: The keys to look up parents for.
        :return: A mapping from keys to parents. Absent keys are absent from
            the mapping.
        r:  rd  s     r)   r‘   zVersionedFiles.get_parent_map²  s   € õ " $Ô"5Ñ6Ô6Ð6r*   c                 ó*   — t          | j        ¦  «        ‚)a  Get a stream of records for keys.

        :param keys: The keys to include.
        :param ordering: Either 'unordered' or 'topological'. A topologically
            sorted stream has compression parents strictly before their
            children.
        :param include_delta_closure: If True then the closure across any
            compression parents will be included (in the opaque data).
        :return: An iterator of ContentFactory objects, each of which is only
            valid until the iterator is advanced.
        rÉ   )r(   rŽ   rË   rÌ   s       r)   r²   z VersionedFiles.get_record_stream»  s   € õ " $Ô"8Ñ9Ô9Ð9r*   c                 ó*   — t          | j        ¦  «        ‚)a  Get the sha1's of the texts for the given keys.

        :param keys: The names of the keys to lookup
        :return: a dict from key to sha1 digest. Keys of texts which are not
            present in the store are not present in the returned
            dictionary.
        )rÅ   r  rd  s     r)   r  zVersionedFiles.get_sha1sÉ  s   € õ " $¤.Ñ1Ô1Ð1r*   c                 ó*   — t          | j        ¦  «        ‚)a´  Return an iterable of keys of missing compression parents.

        Check this after calling insert_record_stream to find out if there are
        any missing compression parents.  If there are, the records that
        depend on them are not able to be inserted safely. The precise
        behaviour depends on the concrete VersionedFiles class in use.

        Classes that do not support this will raise NotImplementedError.
        )rÅ   Ú#get_missing_compression_parent_keysr;   s    r)   rÜ  z2VersionedFiles.get_missing_compression_parent_keysÕ  s   € õ " $Ô"JÑKÔKÐKr*   c                 ó   — t           ‚)ú³Insert a record stream into this container.

        :param stream: A stream of records to insert.
        :return: None
        :seealso VersionedFile.get_record_stream:
        rÑ   rÒ   s     r)   rÔ   z#VersionedFiles.insert_record_streamá  rÕ   r*   c                 ó*   — t          | j        ¦  «        ‚)áü  Iterate over the lines in the versioned files from keys.

        This may return lines from other keys. Each item the returned
        iterator yields is a tuple of a line and a text version that that line
        is present in (not introduced in).

        Ordering of results is in whatever order is most suitable for the
        underlying storage format.

        If a progress bar is supplied, it may be used to indicate progress.
        The caller is responsible for cleaning up progress bars (because this
        is an iterator).

        NOTES:
         * Lines are normalised by the underlying store: they will all have 

           terminators.
         * Lines are returned in arbitrary order.

        :return: An iterator over (line, key).
        )rÅ   ri  rj  s      r)   ri  z2VersionedFiles.iter_lines_added_or_present_in_keysê  s   € õ* " $Ô"JÑKÔKÐKr*   c                 ó*   — t          | j        ¦  «        ‚)z:Return a iterable of the keys for all the contained texts.)rÅ   rŽ   r;   s    r)   rŽ   zVersionedFiles.keys  s   € å! $¤)Ñ,Ô,Ð,r*   c                 óJ   — t          | |¦  «        }|                     ¦   «         S )z,Create multiparent diffs for specified keys.)r„   rº   )r(   rŽ   Ú	generators      r)   r  zVersionedFiles.make_mpdiffs  s#   € å$ T¨4Ñ0Ô0ˆ	Ø×&Ò&Ñ(Ô(Ð(r*   c                 ó$   — ddl m}  || ¦  «        S )Nr   )Ú	Annotator)r?  rå  )r(   rå  s     r)   Úget_annotatorzVersionedFiles.get_annotator
  s"   € Ø(Ð(Ð(Ð(Ð(Ð(Øˆy˜‰ŒÐr*   c                 ó   — d S r"   r/   r  s       r)   r    zVersionedFiles._extract_blocks  r	  r*   c                 ó–   — g }| j         D ]>}|                     |¦  «         |                     |                     ¦   «         ¦  «         Œ?|S )a  Return the whole stack of fallback versionedfiles.

        This VersionedFiles may have a list of fallbacks, but it doesn't
        necessarily know about the whole stack going down, and it can't know
        at open time because they may change after the objects are opened.
        )Ú_immediate_fallback_vfsrª   ÚextendÚ_transitive_fallbacks)r(   Úall_fallbacksÚa_vfss      r)   rë  z$VersionedFiles._transitive_fallbacks  sZ   € ð ˆØÔ1ð 	@ð 	@ˆEØ× Ò  Ñ'Ô'Ð'Ø× Ò  ×!<Ò!<Ñ!>Ô!>Ñ?Ô?Ð?Ð?ØÐr*   rQ  r"   )r+   r,   r-   r<   rß   r_  r'  r?  ré   rR  rÀ   rÇ  rñ   rø   rÖ  r‘   r²   r  r   Ú_has_key_from_parent_mapÚ__contains__rÜ  rÔ   ri  rŽ   r  ræ  Ú_missing_keys_from_parent_mapr™   r    rë  r/   r*   r)   r¼  r¼  ö  s°  € € € € € ðð ð, ;?ØINØ $ð%2ð %2ð %2ð %2ðN 15ØKPØ"&ð4ð 4ð 4ð 4ð@#+ð #+ð #+ðJ1ð 1ð 1ð.ð .ð .ð .ð ð3ð 3ñ „\ð3ðð ð ð=ð =ð =ðEð Eð Eðð ð ð7ð 7ð 7ð:ð :ð :ð2ð 2ð 2ð Ô1€Lð
Lð 
Lð 
Lð"ð "ð "ðLð Lð Lð Lð.-ð -ð -ð)ð )ð )ð
ð ð ð Ô6€Lðð ð ðð ð ð ð r*   r¼  c                   ó„   — e Zd ZdZd„ Z	 	 dd„Z	 	 	 dd„Zd„ Zdd	„Zd
„ Z	d„ Z
d„ Zd„ Zd„ Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ ZdS )r·  aU  Storage for many versioned files thunked onto a 'VersionedFile' class.

    This object allows a single keyspace for accessing the history graph and
    contents of named bytestrings.

    Currently no implementation allows the graph of different key prefixes to
    intersect, but the API does allow such implementations in the future.
    c                 ó>   — || _         || _        || _        || _        dS )zCreate a ThunkedVersionedFiles.N)Ú
_transportÚ_file_factoryÚ_mapperÚ
_is_locked)r(   r   Úfile_factoryr¸  Ú	is_lockeds        r)   r$   zThunkedVersionedFiles.__init__+  s#   € à#ˆŒØ)ˆÔØˆŒØ#ˆŒˆˆr*   NFc           
      óz   — |                      d¦  «        }|                      |j        |j        |||||d¬¦  «        S )z!See VersionedFiles.add_content().r   T©rÚ   rÛ   rÜ   rÝ   rÞ   )rL   rß   r'   r:   )r(   ra  rÚ   rÛ   rÜ   rÝ   r   s          r)   r_  z!ThunkedVersionedFiles.add_content2  sL   € ð ×$Ò$ WÑ-Ô-ˆØ�~Š~ØŒK˜œ¨%Ø%Ø!5Ø#ØØð ñ  ô  ð 	 r*   Tc	                 ó<  — | j                              |¦  «        }	|d         }
d„ |D ¦   «         }|                      |	¦  «        }	 	 |                     |
|||||||¬¦  «        S # t          $ r  |                     |
|||||||¬¦  «        cY S w xY w# t          j        $ r| | j         	                    t          j        |	¦  «        ¦  «         	 |                     |
|||||||¬¦  «        cY S # t          $ r" |                     |
|||||||¬¦  «        cY cY S w xY ww xY w)zSee VersionedFiles.add_lines().rõ   c                 ó   — g | ]
}|d          ‘ŒS )rõ   r/   ©r¶   Úparents     r)   r¹   z3ThunkedVersionedFiles.add_lines.<locals>.<listcomp>D  s   € Ð4Ð4Ð4 &�6˜"”:Ð4Ð4Ð4r*   rú  )rõ  rA   Ú_get_vfrå   rÅ   rß   Ú_mod_transportÚ
NoSuchFileró  Úmkdirr   Údirname)r(   r'   r:   r   rÚ   rÛ   rÜ   rÝ   rÞ   ÚpathrÂ   r†   s               r)   rß   zThunkedVersionedFiles.add_lines>  sÜ  € ð Œ|×Ò Ñ$Ô$ˆØ˜”Wˆ
Ø4Ð4¨GÐ4Ñ4Ô4ˆØ�\Š\˜$ÑÔˆð	AðAØ×/Ò/°
¸GÀUØ=IØEYØ<GÐS\Ø>Kð	 0ñ Mô Mð Møõ
 'ð Að Að AØ—|’| J°¸Ø1=Ø9MØ0;ÀyØ2?ð	 $ñ Aô Að Að Að AðAøøøøõ Ô(ð 	Að 	Að 	AàŒO×!Ò!¥'¤/°$Ñ"7Ô"7Ñ8Ô8Ð8ðAØ×/Ò/°
¸GÀUØ=IØEYØ<GÐS\Ø>Kð	 0ñ Mô Mð Mð Mð Møõ
 'ð Að Að AØ—|’| J°¸Ø1=Ø9MØ0;ÀyØ2?ð	 $ñ Aô Að Að Að Að Að AðAøøøð	AøøøsH   ÁA# Á#'BÂ
B ÂBÂB Â;DÃC+Ã(DÃ+'DÄDÄDÄDc                 óø   — |dd…         }| j                              |¦  «        }|                      |¦  «        }|                     |d         ¦  «        }g }|D ] \  }}|                     ||fz   |f¦  «         Œ!|S )rÃ  Nrõ   )rõ  rA   rÿ  r?  rª   )	r(   r'   r   r  r†   Úoriginsr„  Úoriginrð   s	            r)   r?  zThunkedVersionedFiles.annotatec  sŠ   € ð
 �S�b�S”ˆØŒ|×Ò Ñ'Ô'ˆØ�\Š\˜$ÑÔˆØ—+’+˜c "œgÑ&Ô&ˆØˆØ#ð 	6ð 	6‰LˆF�DØ�MŠM˜6 V IÑ-¨tÐ4Ñ5Ô5Ð5Ð5Øˆr*   c                 ó”   — |                       ¦   «         D ]\  }}|                     ¦   «          Œ|�|                      |dd¦  «        S dS )zSee VersionedFiles.check().Nrr  T)Ú_iter_all_componentsré   r²   )r(   rë   rŽ   r   r†   s        r)   ré   zThunkedVersionedFiles.checkq  sX   € ð
 ×3Ò3Ñ5Ô5ð 	ð 	‰JˆF�BØ�HŠH‰JŒJˆJˆJØÐØ×)Ò)¨$°¸TÑBÔBÐBð Ðr*   c                 ój  ‡
— |                       |¦  «        }i }|                     ¦   «         D ]…\  Š
}| j                             ‰
¦  «        }|                      |¦  «        }|                     |¦  «        }|                     ¦   «         D ]'\  }}	t          ˆ
fd„|	D ¦   «         ¦  «        |‰
|fz   <   Œ(Œ†|S )rØ  c              3   ó$   •K  — | ]
}‰|fz   V — Œd S r"   r/   ©r¶   rþ  r   s     €r)   r  z7ThunkedVersionedFiles.get_parent_map.<locals>.<genexpr>‰  s;   øè è € ð 0>ð 0>Ø+1�F˜f˜YÑ&ð0>ð 0>ð 0>ð 0>ð 0>ð 0>r*   )Ú_partition_keysr•   rõ  rA   rÿ  r‘   r‡   )r(   rŽ   Úprefixesr„  Úsuffixesr  r†   r‹   r'   r:   r   s             @r)   r‘   z$ThunkedVersionedFiles.get_parent_map{  sâ   ø€ ð ×'Ò'¨Ñ-Ô-ˆØˆØ (§¢Ñ 0Ô 0ð 	>ð 	>ÑˆF�HØ”<×#Ò# FÑ+Ô+ˆDØ—’˜dÑ#Ô#ˆBØ×*Ò*¨8Ñ4Ô4ˆJØ *× 0Ò 0Ñ 2Ô 2ð >ð >‘��WÝ*/ð 0>ð 0>ð 0>ð 0>Ø5<ð0>ñ 0>ô 0>ñ +>ô +>��v  ‘Ñ'Ð'ð>ð ˆr*   c                 ó�   — |                       ¦   «         st          j        | ¦  «        ‚|                      || j        dd„ ¬¦  «        S )NTc                  ó   — d S r"   r/   r/   r*   r)   r¶  z/ThunkedVersionedFiles._get_vf.<locals>.<lambda>‘  s   € °D€ r*   )ÚcreateÚ	get_scope)rö  r
   ÚObjectNotLockedrô  ró  )r(   r  s     r)   rÿ  zThunkedVersionedFiles._get_vf�  sO   € Ø�ŠÑ Ô ð 	/ÝÔ(¨Ñ.Ô.Ð.Ø×!Ò! $¨¬ÀØ,8¨Lð "ñ :ô :ð 	:r*   c                 ó†   — i }|D ];}|                      |dd…         g ¦  «        }|                     |d         ¦  «         Œ<|S )z,Turn keys into a dict of prefix:suffix_list.Nrõ   )r”   rª   )r(   rŽ   r„  r'   Úprefix_keyss        r)   r  z%ThunkedVersionedFiles._partition_keys“  sS   € àˆØð 	(ð 	(ˆCØ ×+Ò+¨C°°°¬H°bÑ9Ô9ˆKØ×Ò˜s 2œwÑ'Ô'Ð'Ð'Øˆr*   c                 ó’  ‡ — t          ‰ j        t          ¦  «        r‰ j                             d¦  «        g}dg}n~t	          ¦   «         }‰ j                             ¦   «         D ]9}t          j         	                    |¦  «        \  }}| 
                    |¦  «         Œ:t          |¦  «        }ˆ fd„|D ¦   «         }t          ||¦  «        S )Nr/   c                 óD   •— g | ]}‰j                              |¦  «        ‘ŒS r/   )rõ  r{  )r¶   r  r(   s     €r)   r¹   z<ThunkedVersionedFiles._iter_all_prefixes.<locals>.<listcomp>§  s)   ø€ ÐCÐCÐC°T˜œ×*Ò*¨4Ñ0Ô0ÐCÐCÐCr*   )rU   rõ  r€  rA   r�   ró  Úiter_files_recursiveÚosr  ÚsplitextÚaddrI   r  )r(   Úpathsr  ÚrelpathsÚquoted_relpathr  Úexts   `      r)   Ú_iter_all_prefixesz(ThunkedVersionedFiles._iter_all_prefixes›  sÃ   ø€ õ �d”l¥NÑ3Ô3ð 		DØ”\×%Ò% bÑ)Ô)Ð*ˆEØ�tˆHˆHå‘u”uˆHØ"&¤/×"FÒ"FÑ"HÔ"Hð #ð #�ÝœG×,Ò,¨^Ñ<Ô<‘	��cØ—’˜TÑ"Ô"Ð"Ð"Ý˜‘N”NˆEØCÐCÐCÐC¸UÐCÑCÔCˆHÝ�5˜(Ñ#Ô#Ð#r*   c              #   ó,  ‡K  — t          |¦  «        }|                      |¦  «        D ]k\  Š}}d„ |D ¦   «         }|                     |||¦  «        D ]A}|j        �%t	          ˆfd„|j        D ¦   «         ¦  «        |_        ‰|j        z   |_        |V — ŒBŒldS )z'See VersionedFiles.get_record_stream().c                 ó   — g | ]}|f‘ŒS r/   r/   )r¶   Úsuffixs     r)   r¹   z;ThunkedVersionedFiles.get_record_stream.<locals>.<listcomp>°  s   € Ð9Ð9Ð9 f˜˜	Ð9Ð9Ð9r*   Nc              3   ó"   •K  — | ]	}‰|z   V — Œ
d S r"   r/   r  s     €r)   r  z:ThunkedVersionedFiles.get_record_stream.<locals>.<genexpr>´  s@   øè è € ð +Fð +FØ,2˜ ™ð+Fð +Fð +Fð +Fð +Fð +Fr*   )rv  Ú_iter_keys_vfr²   r:   r‡   r'   )r(   rŽ   rË   rÌ   r  r†   r�   r   s          @r)   r²   z'ThunkedVersionedFiles.get_record_streamª  så   øè è € õ �d‰|Œ|ˆØ$(×$6Ò$6°tÑ$<Ô$<ð 	ð 	Ñ ˆF�H˜bØ9Ð9°Ð9Ñ9Ô9ˆHØ×.Ò.¨x¸Ø/DñFô Fð ð �à”>Ð-Ý%*ð +Fð +Fð +Fð +FØ6<´nð+Fñ +Fô +Fñ &Fô &F�F”Nà# f¤jÑ0�”
Ø����ðð	ð 	r*   c              #   óØ   K  — |                       |¦  «        }i }|                     ¦   «         D ];\  }}| j                             |¦  «        }|                      |¦  «        }|||fV — Œ<d S r"   )r  r•   rõ  rA   rÿ  )r(   rŽ   r  r&  r   r  r  r†   s           r)   r&  z#ThunkedVersionedFiles._iter_keys_vf¹  s‚   è è € Ø×'Ò'¨Ñ-Ô-ˆØˆØ (§¢Ñ 0Ô 0ð 	'ð 	'ÑˆF�HØ”<×#Ò# FÑ+Ô+ˆDØ—’˜dÑ#Ô#ˆBØ˜( BÐ&Ð&Ð&Ð&Ð&ð	'ð 	'r*   c                 ó²   — i }|                       |¦  «        D ]>\  }}}|                     |¦  «        }|                     ¦   «         D ]\  }}||||fz   <   ŒŒ?|S )zSee VersionedFiles.get_sha1s().)r&  r  r•   )	r(   rŽ   r&  r   r  r†   Úvf_sha1sr$  r7   s	            r)   r  zThunkedVersionedFiles.get_sha1sÁ  sw   € àˆØ$(×$6Ò$6°tÑ$<Ô$<ð 	1ð 	1Ñ ˆF�H˜bØ—|’| HÑ-Ô-ˆHØ (§¢Ñ 0Ô 0ð 1ð 1‘�˜Ø,0��f ˜yÑ(Ñ)Ð)ð1àˆr*   c                 ó.  — |D ]‘}|j         dd…         }|j         dd…         }|j        �d„ |j        D ¦   «         }nd}t          |||¦  «        }| j                             |¦  «        }|                      |¦  «        }|                     |g¦  «         Œ’dS )rÞ  Nrõ   c                 ó"   — g | ]}|d d…         ‘ŒS )rõ   Nr/   rý  s     r)   r¹   z>ThunkedVersionedFiles.insert_record_stream.<locals>.<listcomp>Õ  s    € ÐDÐDÐD¨6˜6 " # #œ;ÐDÐDÐDr*   )r'   r:   rv   rõ  rA   rÿ  rÔ   )	r(   rÓ   r�   r   r'   r:   Úthunk_recordr  r†   s	            r)   rÔ   z*ThunkedVersionedFiles.insert_record_streamÊ  s±   € ð ð 	4ð 	4ˆFØ”Z   ”_ˆFØ”*˜R˜S˜S”/ˆCØŒ~Ð)ØDÐD°V´^ÐDÑDÔD��à�Ý)¨#¨w¸Ñ?Ô?ˆLØ”<×#Ò# FÑ+Ô+ˆDð —’˜dÑ#Ô#ˆBØ×#Ò# \ NÑ3Ô3Ð3Ð3ð	4ð 	4r*   c              #   óŒ   K  — |                       |¦  «        D ]+\  }}}|                     |¦  «        D ]\  }}|||fz   fV — ŒŒ,dS )rà  N)r&  rA  )r(   rŽ   rB  r   r  r†   rð   r  s           r)   ri  z9ThunkedVersionedFiles.iter_lines_added_or_present_in_keysà  sw   è è € ð* %)×$6Ò$6°tÑ$<Ô$<ð 	0ð 	0Ñ ˆF�H˜bØ!#×!KÒ!KÈHÑ!UÔ!Uð 0ð 0‘��gØ˜F g ZÑ/Ð/Ð/Ð/Ð/Ð/ð0ð	0ð 	0r*   c              #   óp   K  — |                       ¦   «         D ]\  }}||                      |¦  «        fV — Œd S r"   )r!  rÿ  )r(   r  r   s      r)   r	  z*ThunkedVersionedFiles._iter_all_componentsù  sO   è è € Ø ×3Ò3Ñ5Ô5ð 	-ð 	-‰LˆD�&Ø˜$Ÿ,š, tÑ,Ô,Ð,Ð,Ð,Ð,Ð,ð	-ð 	-r*   c                 ó¶   — t          ¦   «         }|                      ¦   «         D ]5\  }}|                     ¦   «         D ]}|                     ||fz   ¦  «         ŒŒ6|S )zSee VersionedFiles.keys().)r�   r	  rÊ   r  )r(   r„  r   r†   r$  s        r)   rŽ   zThunkedVersionedFiles.keysý  sg   € å‘”ˆØ×3Ò3Ñ5Ô5ð 	/ð 	/‰JˆF�BØŸ+š+™-œ-ð /ð /�Ø—
’
˜6 V IÑ-Ñ.Ô.Ð.Ð.ð/àˆr*   )NNNFrQ  ri   r"   )r+   r,   r-   r<   r$   r_  rß   r?  ré   r‘   rÿ  r  r!  r²   r&  r  rÔ   ri  r	  rŽ   r/   r*   r)   r·  r·  !  s>  € € € € € ðð ð$ð $ð $ð 15ØKPð
 ð 
 ð 
 ð 
 ð ;?ØINØ $ð#Að #Að #Að #AðJð ð ðCð Cð Cð Cðð ð ð$:ð :ð :ðð ð ð$ð $ð $ðð ð ð'ð 'ð 'ðð ð ð4ð 4ð 4ð,0ð 0ð 0ð 0ð2-ð -ð -ðð ð ð ð r*   r·  c                   ó    — e Zd Zd„ Zd„ Zd„ ZdS )ÚVersionedFilesWithFallbacksc                 ó*   — t          | j        ¦  «        ‚)z?Return a clone of this object without any fallbacks configured.)rÅ   Úwithout_fallbacksr;   s    r)   r3  z-VersionedFilesWithFallbacks.without_fallbacks  s   € å! $Ô"8Ñ9Ô9Ð9r*   c                 ó*   — t          | j        ¦  «        ‚)z~Add a source of texts for texts not present in this knit.

        :param a_versioned_files: A VersionedFiles object.
        )rÅ   Úadd_fallback_versioned_files)r(   Úa_versioned_filess     r)   r5  z8VersionedFilesWithFallbacks.add_fallback_versioned_files  s   € õ
 " $Ô"CÑDÔDÐDr*   c                 ó  — | j                              |¦  «        \  }}|                      ¦   «         D ]:}|s n5|j                              |¦  «        \  }}|                     |¦  «         |}Œ;t	          j        |¦  «        }|S rÌ  )Ú_indexÚfind_ancestryrë  r–   rÑ  rÒ  )r(   rŽ   r‹   r™   ÚfallbackÚf_parent_mapÚf_missing_keysrÕ  s           r)   rÖ  z4VersionedFilesWithFallbacks.get_known_graph_ancestry  s“   € à#'¤;×#<Ò#<¸TÑ#BÔ#BÑ ˆ
�LØ×2Ò2Ñ4Ô4ð 	*ð 	*ˆHØð Ø�Ø-5¬_×-JÒ-JØñ.ô .Ñ*ˆ\˜>à×Ò˜lÑ+Ô+Ð+Ø)ˆLˆLÝÔ" :Ñ.Ô.ˆØˆ	r*   N)r+   r,   r-   r3  r5  rÖ  r/   r*   r)   r1  r1    sD   € € € € € ð:ð :ð :ðEð Eð Eðð ð ð ð r*   r1  c                   ó@   — e Zd ZdZd„ Zd
d„Zd
d„Zd„ Zd„ Zd„ Z	d	„ Z
dS )Ú_PlanMergeVersionedFileaº  A VersionedFile for uncommitted and committed texts.

    It is intended to allow merges to be planned with working tree texts.
    It implements only the small part of the VersionedFiles interface used by
    PlanMerge.  It falls back to multiple versionedfiles for data not stored in
    _PlanMergeVersionedFile itself.

    :ivar: fallback_versionedfiles a list of VersionedFiles objects that can be
        queried for missing texts.
    c                 ó|   — || _         g | _        i | _        i | _        t	          j        | j        ¦  «        g| _        dS )z–Create a _PlanMergeVersionedFile.

        :param file_id: Used with _PlanMerge code which is not yet fully
            tuple-keyspace aware.
        N)Ú_file_idÚfallback_versionedfilesÚ_parentsÚ_linesrÑ  ÚDictParentsProviderÚ
_providers)r(   Úfile_ids     r)   r$   z _PlanMergeVersionedFile.__init__-  s<   € ð  ˆŒà')ˆÔ$àˆŒàˆŒå%Ô9¸$¼-ÑHÔHÐIˆŒˆˆr*   Nc                 óV  — ddl m} |€& |||| | j        f¦  «                             ¦   «         S t	           |||| | j        f¦  «                             ¦   «         ¦  «        }t	           |||| | j        f¦  «                             ¦   «         ¦  «        }|                     ||¦  «        S )zSee VersionedFile.plan_merger   )Ú
_PlanMerge)ÚmergerH  r@  rD  rI   Ú_subtract_plans)r(   rE  rF  rG  rH  Úold_planÚnew_plans          r)   rD  z"_PlanMergeVersionedFile.plan_merge=  sÂ   € à&Ð&Ð&Ð&Ð&Ð&Øˆ<Ø�:˜e U¨D°4´=Ð2BÑCÔC×NÒNÑPÔPÐPÝ˜
˜
 5¨$°Ø$(¤MÐ#3ñ5ô 5ß5?²Z±\´\ñCô Cˆå˜
˜
 5¨%°Ø$(¤MÐ#3ñ5ô 5ß5?²Z±\´\ñCô Cˆà×)Ò)¨(°HÑ=Ô=Ð=r*   c                 ó:  — ddl m} t          j        | ¦  «        } |||| | j        f|¦  «                             ¦   «         }|€|S  |||| | j        f|¦  «                             ¦   «         }|                     t          |¦  «        t          |¦  «        ¦  «        S )Nr   )Ú_PlanLCAMerge)rI  rN  rÑ  ÚGraphr@  rD  rJ  rI   )r(   rE  rF  rG  rN  r   rL  rK  s           r)   Úplan_lca_mergez&_PlanMergeVersionedFile.plan_lca_mergeH  sª   € Ø)Ð)Ð)Ð)Ð)Ð)ÝÔ  Ñ&Ô&ˆØ �=Ø�5˜$ ¤Ð 0°%ñ9ô 9ß9Cº¹¼ð 	àˆ<ØˆOØ �=Ø�4˜ ¤Ð/°ñ8ô 8ß8Bº
¹¼ð 	à×,Ò,­T°(©^¬^½TÀ(¹^¼^ÑLÔLÐLr*   c                 ój   — |                       |j        |j        |                     d¦  «        ¦  «        S )Nr   )rß   r'   r:   rL   )r(   ra  s     r)   r_  z#_PlanMergeVersionedFile.add_contentS  s4   € Ø�~Š~ØŒK˜œ¨'×*>Ò*>¸wÑ*GÔ*GñIô Ið 	Ir*   c                 ó2  — t          |t          ¦  «        st          |¦  «        ‚t                               |d         ¦  «        st          d¦  «        ‚|€t          d¦  «        ‚|€t          d¦  «        ‚t          |¦  «        | j        |<   || j        |<   dS )z®See VersionedFiles.add_lines

        Lines are added locally, not to fallback versionedfiles.  Also, ghosts
        are permitted.  Only reserved ids are permitted.
        rõ   zOnly reserved ids may be usedNzParents may not be NonezLines may not be None)rU   r‡   rW   r¿   Úis_reserved_idrr   rB  rC  )r(   r'   r:   r   s       r)   rß   z!_PlanMergeVersionedFile.add_linesW  s—   € õ ˜#�uÑ%Ô%ð 	!Ý˜C‘.”.Ð Ý×&Ò& s¨2¤wÑ/Ô/ð 	>ÝÐ<Ñ=Ô=Ð=Øˆ?ÝÐ6Ñ7Ô7Ð7Øˆ=ÝÐ4Ñ5Ô5Ð5Ý" 7™^œ^ˆŒ�cÑØ ˆŒ�CÑÐÐr*   c              #   ó   K  — t          |¦  «        }|D ]P}|| j        v rE| j        |         }| j        |         }|                     |¦  «         t	          ||d |d¬¦  «        V — ŒQ| j        D ]K}|                     |dd¦  «        D ],}	|	j        dk    rŒ|                     |	j        ¦  «         |	V — Œ-|s d S ŒL|D ]}t          |¦  «        V — Œd S )NT)rF   rr  rm   )
r�   rC  rB  Úremover>   rA  r²   r9   r'   rk   )
r(   rŽ   rË   rÌ   rÓ  r'   r   r:   Úversionedfiler�   s
             r)   r²   z)_PlanMergeVersionedFile.get_record_streamh  s5  è è € Ý�d‘)”)ˆØð 	+ð 	+ˆCØ�d”kÐ!Ð!Øœ CÔ(�Øœ-¨Ô,�Ø—’˜sÑ#Ô#Ð#Ý+Ø˜ $¨Ø%)ð+ñ +ô +ð +ð +ð +øð "Ô9ð 		ð 		ˆMØ'×9Ò9Ø˜[¨$ñ0ô 0ð !ð !�àÔ&¨(Ò2Ð2Øà—N’N 6¤:Ñ.Ô.Ð.Ø �L�L�L�LØð Ø��ðð ð 	,ð 	,ˆCÝ& sÑ+Ô+Ð+Ð+Ð+Ð+ð	,ð 	,r*   c                 ó¶  — t          |¦  «        }i }t          j        |v r.|                     t          j        ¦  «         d|t          j        <   | j        dd…         | j        z   | _        |                     t          j        | j        ¦  «         	                    |¦  «        ¦  «         | 
                    ¦   «         D ]\  }}|dk    rt          j        f||<   Œ|S )z!See VersionedFiles.get_parent_mapr/   Nr   )r�   r¿   ÚNULL_REVISIONrU  rE  rA  r–   rÑ  ÚStackedParentsProviderr‘   r•   )r(   rŽ   r„  r'   r:   s        r)   r‘   z&_PlanMergeVersionedFile.get_parent_map€  sÑ   € õ
 �4‰yŒyˆØˆÝÔ! TÐ)Ð)Ø�KŠK�Ô.Ñ/Ô/Ð/Ø-/ˆF•8Ô)Ñ*Øœ/¨"¨1¨"Ô-°Ô0LÑLˆŒØ�ŠÝÔ-Ø”ñ!ô !ß!/¢°Ñ!5Ô!5ñ	7ô 	7ð 	7ð #ŸLšL™NœNð 	8ð 	8‰LˆC�Ø˜"Š}ˆ}Ý'Ô5Ð7��s‘øØˆr*   r"   )r+   r,   r-   r<   r$   rD  rP  r_  rß   r²   r‘   r/   r*   r)   r>  r>  !  s›   € € € € € ð	ð 	ðJð Jð Jð 	>ð 	>ð 	>ð 	>ð	Mð 	Mð 	Mð 	MðIð Ið Ið!ð !ð !ð",ð ,ð ,ð0ð ð ð ð r*   r>  c                   ó>   — e Zd ZdZej        ej        fd„Zd„ Zd„ Z	dS )rJ  zªWeave merge that takes a plan as its input.

    This exists so that VersionedFile.plan_merge is implementable.
    Most callers will want to use WeaveMerge instead.
    c                 óZ   — t          j        | ||¦  «         t          |¦  «        | _        d S r"   )r   r$   rI   rM  rL  s       r)   r$   zPlanWeaveMerge.__init__›  s(   € åÔ˜4 ¨8Ñ4Ô4Ð4Ý˜‘J”JˆŒ	ˆ	ˆ	r*   c              #   óv  ‡‡‡‡K  — g Šg ŠdxŠŠˆˆˆˆfd„}| j         D �]	\  }}|dk    r |¦   «         E d {V —† g Šg ŠdxŠŠ|dk    r	|r|gfV — Œ3|dk    rdŠ‰                     |¦  «         ŒQ|dk    rdŠ‰                     |¦  «         Œo|dk    rdŠ‰                     |¦  «         Œ�|dk    rdŠ‰                     |¦  «         Œ«|d	k    rdxŠŠ‰                     |¦  «         ŒË|d
k    rdxŠŠ‰                     |¦  «         Œë|dk    rdxŠŠŒö|dvrt          |¦  «        ‚�Œ |¦   «         E d {V —† d S )NFc               3   ój   •K  — ‰s‰sd S ‰ r	‰s‰fV — d S ‰r	‰ s‰fV — d S ‰‰k    r‰fV — d S ‰‰fV — d S r"   r/   )Úch_aÚch_bÚlines_aÚlines_bs   €€€€r)   Úoutstanding_structz8PlanWeaveMerge._merge_struct.<locals>.outstanding_struct¥  s—   øè è € Øð 
) 7ð 
)Ø�Øð )˜dð )à�jÐ Ð Ð Ð Ð Øð )˜dð )Ø�jÐ Ð Ð Ð Ð Ø˜GÒ#Ð#Ø�jÐ Ð Ð Ð Ð à Ð(Ð(Ð(Ð(Ð(Ð(r*   Ú	unchangedúkilled-aTúkilled-búnew-aúnew-búconflicted-aúconflicted-búkilled-both)Ú
irrelevantúghost-aúghost-búkilled-base)rM  rª   ÚAssertionError)r(   rb  Ústaterð   r^  r_  r`  ra  s       @@@@r)   Ú_merge_structzPlanWeaveMerge._merge_struct   s  øøøøè è € ØˆØˆØÐˆˆtð	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð   œ9ð $	0ñ $	0‰KˆE�4Ø˜Ò#Ð#à-Ð-Ñ/Ô/Ð/Ð/Ð/Ð/Ð/Ð/Ð/Ø�Ø�Ø#Ð#��tà˜Ò#Ð#Øð $Ø ˜6˜)�O�O�OøØ˜*Ò$Ð$Ø�Ø—’˜tÑ$Ô$Ð$Ð$Ø˜*Ò$Ð$Ø�Ø—’˜tÑ$Ô$Ð$Ð$Ø˜'Ò!Ð!Ø�Ø—’˜tÑ$Ô$Ð$Ð$Ø˜'Ò!Ð!Ø�Ø—’˜tÑ$Ô$Ð$Ð$Ø˜.Ò(Ð(Ø"Ð"��tØ—’˜tÑ$Ô$Ð$Ð$Ø˜.Ò(Ð(Ø"Ð"��tØ—’˜tÑ$Ô$Ð$Ð$Ø˜-Ò'Ð'ð #Ð"��t�tàð !0ð 0ð 0å(¨Ñ/Ô/Ð/ñ0ð &Ð%Ñ'Ô'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'r*   c                 ó¤   — g }| j         D ]E\  }}|dv r|                     |¦  «         Œ|dvr"t          d                     |¦  «        ¦  «        ‚ŒF|S )z)Construct a BASE file from the plan text.)rd  re  rj  rc  )rn  rk  rl  rm  rf  rg  rh  ri  zUnknown state: {})rM  rª   ro  rŸ  )r(   Ú
base_linesrp  rð   s       r)   Úbase_from_planzPlanWeaveMerge.base_from_planÜ  sˆ   € àˆ
Øœ9ð 0	Lð 0	L‰KˆE�4ØÐLÐLÐLð ×!Ò! $Ñ'Ô'Ð'Ð'àð !Að Að AõT )Ð)<×)CÒ)CÀEÑ)JÔ)JÑKÔKÐKðUAðV Ðr*   N)
r+   r,   r-   r<   r   rT  rU  r$   rq  rt  r/   r*   r)   rJ  rJ  ”  s_   € € € € € ðð ð '0Ô&8Ø#Ô,ðð ð ð ð
:(ð :(ð :(ðx4ð 4ð 4ð 4ð 4r*   rJ  c                   ó2   — e Zd ZdZej        ej        fd„ZdS )Ú
WeaveMergezEWeave merge that takes a VersionedFile and two versions as its input.c                 ól   — |                      ||¦  «        }t                               | |||¦  «         d S r"   )rD  rJ  r$   )r(   rV  rE  rF  rN  rO  rM  s          r)   r$   zWeaveMerge.__init__  s7   € à×'Ò'¨¨uÑ5Ô5ˆÝ×Ò  d¨H°hÑ?Ô?Ð?Ð?Ð?r*   N)r+   r,   r-   r<   rJ  rT  rU  r$   r/   r*   r)   rv  rv    sA   € € € € € ØOÐOð )Ô1¸NÔ<Sð@ð @ð @ð @ð @ð @r*   rv  c                   óJ   ‡ — e Zd ZdZˆ fd„Zd
d„Zd„ Zd„ Zd„ Zd„ Z	d
d	„Z
ˆ xZS )ÚVirtualVersionedFileszÜDummy implementation for VersionedFiles that uses other functions for
    obtaining fulltexts and parent maps.

    This is always on the bottom of the stack and uses string keys
    (rather than tuples) internally.
    c                 ód   •— t          ¦   «                              ¦   «          || _        || _        dS )zéCreate a VirtualVersionedFiles.

        :param get_parent_map: Same signature as Repository.get_parent_map.
        :param get_lines: Should return lines for specified key or None if
                          not available.
        N)Úsuperr$   Ú_get_parent_mapÚ
_get_lines)r(   r‘   r*  rÉ  s      €r)   r$   zVirtualVersionedFiles.__init__$  s.   ø€ õ 	‰Œ×ÒÑÔÐØ-ˆÔØ#ˆŒˆˆr*   Nc                 ó   — dS )zaSee VersionedFiles.check.

        :note: Always returns True for VirtualVersionedFiles.
        Tr/   )r(   Úprogressbars     r)   ré   zVirtualVersionedFiles.check/  s	   € ð
 ˆtr*   c                 ó*   — t          | j        ¦  «        ‚)z_See VersionedFiles.mpdiffs.

        :note: Not implemented for VirtualVersionedFiles.
        )rÅ   r'  )r(   r  s     r)   r'  z!VirtualVersionedFiles.add_mpdiffs6  s   € õ
 " $Ô"2Ñ3Ô3Ð3r*   c                 ó|   — |                       d„ |D ¦   «         ¦  «                             ¦   «         }d„ |D ¦   «         S )z"See VersionedFiles.get_parent_map.c              3   ó   K  — | ]\  }|V — Œ	d S r"   r/   )r¶   r·   s     r)   r  z7VirtualVersionedFiles.get_parent_map.<locals>.<genexpr>?  s$   è è € Ð*>Ð*>±°!¨1Ð*>Ð*>Ð*>Ð*>Ð*>Ð*>r*   c                 óJ   — i | ] \  }}|ft          d „ |D ¦   «         ¦  «        “Œ!S )c              3   ó   K  — | ]}|fV — Œd S r"   r/   ©r¶   r�   s     r)   r  zBVirtualVersionedFiles.get_parent_map.<locals>.<dictcomp>.<genexpr>@  s$   è è € Ð,Ð, Q˜Q˜DÐ,Ð,Ð,Ð,Ð,Ð,r*   ©r‡   )r¶   r·   r.  s      r)   ú
<dictcomp>z8VirtualVersionedFiles.get_parent_map.<locals>.<dictcomp>@  s7   € ÐEÐEÐE±°°A��•eÐ,Ð,¨!Ð,Ñ,Ô,Ñ,Ô,ÐEÐEÐEr*   )r|  r•   )r(   rŽ   Úparent_views      r)   r‘   z$VirtualVersionedFiles.get_parent_map=  sD   € à×*Ò*Ð*>Ð*>¸Ð*>Ñ*>Ô*>Ñ>Ô>×DÒDÑFÔFˆØEÐE¸ÐEÑEÔEÐEr*   c                 ó®   — i }|D ]O\  }|                       |¦  «        }|�4t          |t          ¦  «        st          ‚t	          j        |¦  «        ||f<   ŒP|S )zSee VersionedFiles.get_sha1s.)r}  rU   rI   ro  r   Úsha_strings)r(   rŽ   Úretr·   r   s        r)   r  zVirtualVersionedFiles.get_sha1sB  sc   € àˆØð 	7ð 	7‰DˆQØ—O’O AÑ&Ô&ˆEØÐ Ý! %­Ñ.Ô.ð )Ý(Ð(Ý#Ô/°Ñ6Ô6��Q�D‘	øØˆ
r*   c              #   ó  K  — t          |¦  «        D ]s\  }|                      |¦  «        }|�Ft          |t           ¦  «        st          ‚t	          |fdt          j        |¦  «        |d¬¦  «        V — Œat          |f¦  «        V — ŒtdS )z%See VersionedFiles.get_record_stream.NT)r7   rE   rF   )rI   r}  rU   ro  r>   r   rŠ  rk   )r(   rŽ   rË   rÌ   r·   r   s         r)   r²   z'VirtualVersionedFiles.get_record_streamM  s°   è è € å˜‘J”Jð 		1ð 		1‰DˆQØ—O’O AÑ&Ô&ˆEØÐ Ý! %­Ñ.Ô.ð )Ý(Ð(Ý+Ø�D˜$¥WÔ%8¸Ñ%?Ô%?Ø °4ð9ñ 9ô 9ð 9ð 9ð 9ð 9õ +¨A¨4Ñ0Ô0Ð0Ð0Ð0Ð0ð		1ð 		1r*   c              #   óÀ   K  — t          |¦  «        D ]K\  }\  }|�$|                     d|t          |¦  «        ¦  «         |                      |¦  «        D ]}||fV — Œ	ŒLdS )z<See VersionedFile.iter_lines_added_or_present_in_versions().NzFinding changed lines)Ú	enumerater–   rB   r}  )r(   rŽ   rB  Úir'   Úls         r)   ri  z9VirtualVersionedFiles.iter_lines_added_or_present_in_keysZ  s|   è è € å" 4™œð 	ð 	‰IˆA‰v�Øˆ~Ø—	’	Ð1°1µc¸$±i´iÑ@Ô@Ð@Ø—_’_ SÑ)Ô)ð ð �Ø˜#�h����ðð	ð 	r*   r"   )r+   r,   r-   r<   r$   ré   r'  r‘   r  r²   ri  Ú__classcell__)rÉ  s   @r)   ry  ry    s©   ø€ € € € € ðð ð	$ð 	$ð 	$ð 	$ð 	$ðð ð ð ð4ð 4ð 4ðFð Fð Fð
	ð 	ð 	ð1ð 1ð 1ðð ð ð ð ð ð ð r*   ry  c                   ó,   — e Zd ZdZd„ Z	 	 	 dd„Zd„ ZdS )	ÚNoDupeAddLinesDecoratorzdDecorator for a VersionedFiles that skips doing an add_lines if the key
    is already present.
    c                 ó   — || _         d S r"   )Ú_store)r(   Ústores     r)   r$   z NoDupeAddLinesDecorator.__init__h  s   € ØˆŒˆˆr*   NFTc	           
      ób  — |rt          d¦  «        ‚|d         €t          j        |¦  «        }	d|	z   f}nd}	|| j                             |g¦  «        v r;|	€t          j        |¦  «        }	|	t          t          t          |¦  «        ¦  «        dfS | j                             ||||||||¬¦  «        S )z¦See VersionedFiles.add_lines.

        This implementation may return None as the third element of the return
        value when the original store wouldn't.
        zONoDupeAddLinesDecorator.add_lines does not implement the nostore_sha behaviour.rõ   Ns   sha1:rú  )	rÅ   r   rŠ  r•  r‘   r@   rA   rB   rß   )
r(   r'   r:   r   rÚ   rÛ   rÜ   rÝ   rÞ   r7   s
             r)   rß   z!NoDupeAddLinesDecorator.add_linesk  sÖ   € ð ð 	*Ý%ð)ñ*ô *ð *ð ˆrŒ7ˆ?ÝÔ& uÑ-Ô-ˆDØ˜d‘?Ð$ˆCˆCàˆDØ�$”+×,Ò,¨c¨UÑ3Ô3Ð3Ð3àˆ|ÝÔ*¨5Ñ1Ô1�Ø��S¥ e™_œ_Ñ-Ô-¨tÐ3Ð3ØŒ{×$Ò$ S¨'°5Ø2>Ø:NØ1<È	Ø3@ð	 %ñ Bô Bð 	Br*   c                 ó,   — t          | j        |¦  «        S r"   )r|   r•  )r(   rÇ   s     r)   r~   z#NoDupeAddLinesDecorator.__getattr__‡  s   € Ý�t”{ DÑ)Ô)Ð)r*   rQ  )r+   r,   r-   r<   r$   rß   r~   r/   r*   r)   r“  r“  c  s_   € € € € € ðð ðð ð ð ;?ØINØ $ðBð Bð Bð Bð8*ð *ð *ð *ð *r*   r“  c                 ót   — |                       d¦  «        }| d|…                              d¦  «        }||dz   fS )z­Strip of a record kind from the front of network_bytes.

    :param network_bytes: The bytes of a record.
    :return: A tuple (storage_kind, offset_of_remaining_bytes)
    rô   Nr¯  r   )Úfindr–  )Únetwork_bytesÚline_endr9   s      r)   Ú network_bytes_to_kind_and_offsetr�  ‹  sB   € ð ×!Ò! %Ñ(Ô(€HØ   ( Ô+×2Ò2°7Ñ;Ô;€LØ˜ A™Ð%Ð%r*   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚNetworkRecordStreamz8A record_stream which reconstitures a serialised stream.c                 ó´   — || _         t          t          j        t          j        t          j        t          j        t          j        t          j        dœ| _        dS )zïCreate a NetworkRecordStream.

        :param bytes_iterator: An iterator of bytes. Each item in this
            iterator should have been obtained from a record_streams'
            record.get_bytes_as(record.storage_kind) call.
        )r   zgroupcompress-blockr   r   r   r   zknit-delta-closureN)Ú_bytes_iteratorÚfulltext_network_to_recordÚgroupcompressÚnetwork_block_to_recordsÚknitÚknit_network_to_recordÚknit_delta_closure_to_recordsÚ_kind_factory)r(   Úbytes_iterators     r)   r$   zNetworkRecordStream.__init__™  sH   € ð  .ˆÔå2Ý#0Ô#IÝÔ5Ý!Ô8Ý$(Ô$?Ý'+Ô'BÝ"&Ô"Dðð ˆÔÐÐr*   c              #   ó~   K  — | j         D ]2}t          |¦  «        \  }} | j        |         |||¦  «        E d{V —† Œ3dS )zbRead the stream.

        :return: An iterator as per VersionedFiles.get_record_stream().
        N)r¡  r�  r¨  )r(   rV   r9   rœ  s       r)   re   zNetworkRecordStream.read«  s|   è è € ð
 Ô)ð 	3ð 	3ˆEÝ%EÀeÑ%LÔ%LÑ"ˆL˜(Ø7�tÔ)¨,Ô7Ø  %¨ñ3ô 3ð 3ð 3ð 3ð 3ð 3ð 3ð 3ð 3ð	3ð 	3r*   N)r+   r,   r-   r<   r$   re   r/   r*   r)   rŸ  rŸ  –  s8   € € € € € ØBÐBðð ð ð$3ð 3ð 3ð 3ð 3r*   rŸ  c                 óü   — t          j        d|||dz   …         ¦  «        \  }||dz   |dz   |z   …         }t                               |¦  «        \  }}|dk    rd}||dz   |z   d…         }t	          ||d|¦  «        gS )z,Convert a network fulltext record to record.ú!Lé   ó   nilN)ÚstructÚunpackÚbencodeÚbdecode_as_tuplerS   )ÚkindrV   rœ  Úmeta_lenÚrecord_metar'   r:   r   s           r)   r¢  r¢  ¶  s–   € å”˜d E¨(°8¸a±<Ð*?Ô$@ÑAÔA�I€HØ˜ 1™ X°¡\°HÑ%<Ð<Ô=€KÝ×+Ò+¨KÑ8Ô8�L€CˆØ�&ÒÐØˆØ�X ‘\ HÑ,Ð-Ð-Ô.€HÝ" 3¨°°xÑ@Ô@ÐAÐAr*   c                 óF   — t          j        dt          | ¦  «        ¦  «        S )Nr¬  )r¯  ÚpackrB   )rV   s    r)   Ú_length_prefixr¸  Á  s   € ÝŒ;�t�S ™ZœZÑ(Ô(Ð(r*   c                 óè   — | j         €d}nt          d„ | j         D ¦   «         ¦  «        }t                               | j        |f¦  «        }|                      d¦  «        }dt          |¦  «        ||fz  S )Nr®  c                 ó,   — g | ]}t          |¦  «        ‘ŒS r/   r†  r…  s     r)   r¹   z,record_to_fulltext_bytes.<locals>.<listcomp>É  s   € Ð:Ð:Ð: a�˜q™œÐ:Ð:Ð:r*   r   s   fulltext
%s%s%s)r:   r‡   r±  r'   rL   r¸  )r�   r:   rµ  Úrecord_contents       r)   Úrecord_to_fulltext_bytesr¼  Å  s~   € Ø„~ÐØˆˆåÐ:Ð:¨6¬>Ð:Ñ:Ô:Ñ;Ô;ˆÝ—/’/ 6¤:¨wÐ"7Ñ8Ô8€KØ×(Ò(¨Ñ4Ô4€NØÝ�{Ñ#Ô# [°.ð"Bñ Bð Br*   c           	      ó¨  — ddl m} i }|                      ¦   «         D ]o}|d         }t          |t          ¦  «        st          |¦  «        dk    rd}n|d         }	 ||                              |¦  «         ŒZ# t          $ r	 |g||<   Y Œlw xY wg }t          |¦  «        D ]3}| 	                    t           |||         ¦  «        ¦  «        ¦  «         Œ4|S )zÏSort and group the keys in parent_map into groupcompress order.

    groupcompress is defined (currently) as reverse-topological order, grouped
    by the key prefix.

    :return: A sorted-list of keys
    r   )Ú	topo_sortr   r   r*   )Útsortr¾  r•   rU   rV   rB   rª   rÿ   rv  rê  Úreversed)r‹   r¾  Úper_prefix_mapÚitemr'   r   Úpresent_keyss          r)   Úsort_groupcompressrÄ  Ð  s  € ð "Ð!Ð!Ð!Ð!Ð!ð €NØ× Ò Ñ"Ô"ð 	,ð 	,ˆØ�1ŒgˆÝ�c�5Ñ!Ô!ð 	¥S¨¡X¤X°¢] ]ØˆFˆFà˜”VˆFð	,Ø˜6Ô"×)Ò)¨$Ñ/Ô/Ð/Ð/øÝð 	,ð 	,ð 	,Ø&* VˆN˜6Ñ"Ð"Ð"ð	,øøøð €LÝ˜Ñ(Ô(ð Ið IˆØ×Ò�H Y Y¨~¸fÔ/EÑ%FÔ%FÑGÔGÑHÔHÐHÐHØÐs   ÁA7Á7B
Â	B
c                   óF   — e Zd Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ ZdS )Ú_KeyRefsFc                 óP   — i | _         |rt          ¦   «         | _        d S d | _        d S r"   )Úrefsr�   Únew_keys)r(   Útrack_new_keyss     r)   r$   z_KeyRefs.__init__ï  s+   € àˆŒ	Øð 	!å™EœEˆDŒMˆMˆMà ˆDŒMˆMˆMr*   c                 óŠ   — | j         r| j                              ¦   «          | j        r| j                             ¦   «          d S d S r"   )rÈ  ÚclearrÉ  r;   s    r)   rÌ  z_KeyRefs.clearø  sL   € ØŒ9ð 	ØŒI�OŠOÑÔÐØŒ=ð 	"ØŒM×ÒÑ!Ô!Ð!Ð!Ð!ð	"ð 	"r*   c                 óÒ   — |D ]N}	 | j         |         }n(# t          $ r t          ¦   «         x}| j         |<   Y nw xY w|                     |¦  «         ŒO|                      |¦  «         d S r"   )rÈ  rÿ   r�   r  Úadd_key)r(   r'   rÈ  Ú
referencedÚ	needed_bys        r)   Úadd_referencesz_KeyRefs.add_referencesþ  s‡   € àð 	ð 	ˆJð:Ø œI jÔ1�	�	øÝð :ð :ð :Ý47±E´EÐ9�	˜DœI jÑ1Ð1Ð1ð:øøøà�MŠM˜#ÑÔÐÐà�Š�SÑÔÐÐÐs   †”"9¸9c                 ó   — | j         S r"   )rÉ  r;   s    r)   Úget_new_keysz_KeyRefs.get_new_keys	  s
   € ØŒ}Ðr*   c                 ó4   — | j                              ¦   «         S r"   )rÈ  rŽ   r;   s    r)   Úget_unsatisfied_refsz_KeyRefs.get_unsatisfied_refs  s   € ØŒy�~Š~ÑÔÐr*   c                 ó:   — 	 | j         |= d S # t          $ r Y d S w xY wr"   )rÈ  rÿ   rn   s     r)   Ú_satisfy_refs_for_keyz_KeyRefs._satisfy_refs_for_key  s6   € ð	Ø”	˜#���øÝð 	ð 	ð 	àˆDˆDð	øøøs   ‚ Œ
™c                 óv   — |                       |¦  «         | j        �| j                             |¦  «         d S d S r"   )r×  rÉ  r  rn   s     r)   rÎ  z_KeyRefs.add_key  sB   € à×"Ò" 3Ñ'Ô'Ð'ØŒ=Ð$ØŒM×Ò˜cÑ"Ô"Ð"Ð"Ð"ð %Ð$r*   c                 ó:   — |D ]}|                       |¦  «         Œd S r"   )r×  )r(   rŽ   r'   s      r)   Úsatisfy_refs_for_keysz_KeyRefs.satisfy_refs_for_keys  s2   € Øð 	,ð 	,ˆCØ×&Ò& sÑ+Ô+Ð+Ð+ð	,ð 	,r*   c                 óˆ   — t          t          j                             | j                             ¦   «         ¦  «        ¦  «        S r"   )r�   rÍ  rÎ  rÏ  rÈ  rÐ  r;   s    r)   Úget_referrersz_KeyRefs.get_referrers   s.   € Ý•9”?×0Ò0°´×1AÒ1AÑ1CÔ1CÑDÔDÑEÔEÐEr*   N)F)r+   r,   r-   r$   rÌ  rÑ  rÓ  rÕ  r×  rÎ  rÚ  rÜ  r/   r*   r)   rÆ  rÆ  í  s¥   € € € € € ð!ð !ð !ð !ð"ð "ð "ð	ð 	ð 	ðð ð ð ð  ð  ðð ð ð#ð #ð #ð,ð ,ð ,ðFð Fð Fð Fð Fr*   rÆ  )Cr<   r   Úior   rÍ  r  r¯  Útypingr   r   Úzlibr   r	   Úglobalsr®  r
   r   rÑ  r   r   r   Úregistryr   Ú	textmerger   r   ÚstrÚadapter_registryÚregister_lazyÚtarget_storage_kindr#   r    ÚBzrErrorr1   r3   r>   rS   r^   rk   rv   r‚   r„   r¼   rW  rm  rx  r€  r‰  r“  r›  r¨  rº  r¼  r·  r1  r>  rJ  rv  ry  r“  r�  rŸ  r¢  r¸  r¼  rÄ  rÆ  r/   r*   r)   ú<module>rè     s¾  ðð" 'Ð &à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ð &Ð %Ð %Ð %Ð %Ð %Ø €ˆGˆG‰IŒIð ñ ô ð ðð ð ð ð ð ð ð ð ð ð ð ð  Ð Ð Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !ðð ð ð ð ð ð
 2�8˜E # s (œO¨SÐ0Ô1Ñ3Ô3Ð Ø × Ò ÐKØ0Ð2OñQô Qð Qà × Ò ÐEØ0Ð2LñNô Nð Nà;ð Rð RÐØ×"Ò" OÐ5HÐ#IÐK\Ø#9ñ;ô ;ð ;à×"Ò" LÐ2EÐ#FÐHYØ#6ñ8ô 8ð 8à×"Ò"Ð$:Ð<OÐ#PØ#4Ð6MñOô Oð Oà×"Ò"Ð$=Ð?RÐ#SØ#4Ð6PñRô Rð Rð Rð	ð 	ð 	ð 	ð 	 Ô 7ñ 	ô 	ð 	ð<ð <ð <ð <ð <�f”oñ <ô <ð <ð
ð ð ð ð ñ ô ð ð21;ð 1;ð 1;ð 1;ð 1;˜Nñ 1;ô 1;ð 1;ðf+;ð +;ð +;ð +;ð +;˜^ñ +;ô +;ð +;ð\#;ð #;ð #;ð #;ð #;˜ñ #;ô #;ð #;ðL(ð (ð (ð (ð (˜>ñ (ô (ð (ð>0ð 0ð 0ð 0ð 0�^ñ 0ô 0ð 0ð"ð ð ðA4ð A4ð A4ð A4ð A4ñ A4ô A4ð A4ðH^Ið ^Ið ^Ið ^Ið ^Iñ ^Iô ^Ið ^IðB9'ð 9'ð 9'ð 9'ð 9'ñ 9'ô 9'ð 9'ðx!Tð !Tð !Tð !Tð !TÐ&Fñ !Tô !Tð !TðH.ð .ð .ð .ð .ñ .ô .ð .ð,	ð 	ð 	ð 	ð 	�Yñ 	ô 	ð 	ð;ð ;ð ;ð ;ð ;�iñ ;ô ;ð ;ð /ð /ð /ð /ð /�?ñ /ô /ð /ðð ð ð ð �ñ ô ð ð0*ð *ð *ð *ð *Ð.ñ *ô *ð *ð6
ð 
ð 
ðhð hð hð hð hñ hô hð hðV	bð bð bð bð b˜Nñ bô bð bðJð ð ð ð  .ñ ô ð ð6pð pð pð pð p˜nñ pô pð pðf|ð |ð |ð |ð |�Yñ |ô |ð |ð~@ð @ð @ð @ð @�ñ @ô @ð @ðDð Dð Dð Dð D˜Nñ Dô Dð DðN%*ð %*ð %*ð %*ð %*ñ %*ô %*ð %*ðP&ð &ð &ð3ð 3ð 3ð 3ð 3ñ 3ô 3ð 3ð@Bð Bð Bð)ð )ð )ðBð Bð Bðð ð ð:4Fð 4Fð 4Fð 4Fð 4Fñ 4Fô 4Fð 4Fð 4Fð 4Fr*   