§
    cÌc¨À  ã                   ó(  — d dl Z d dlZd dlZd dlmZmZ d dlZd dlmZ ddl	m
ZmZmZmZmZmZmZmZ  ej         e¦   «         d¦  «         ddlmZmZmZ ddlmZmZ dd	lmZ dd
lmZmZmZmZm Z  ddl!m"Z" ddl#m$Z$m%Z% ddl&m'Z'm(Z( 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. G d„ de¦  «        Z/d„ Z0 G d„ d¦  «        Z1 G d„ d¦  «        Z2 G d „ d!ej        ¦  «        Z3 G d"„ d#e3¦  «        Z4d$„ Z5d%„ Z6 ej7        e8ee2e9e9gdf         f         ¦   «         Z:e: ;                    d&e6d'¦  «         e: ;                    d(e5d)¦  «         e: <                    d&¦  «          ej=        d*e:d+d,¬-¦  «        Z>d.„ Z? G d/„ d0¦  «        Z@d1„ ZAd2„ ZBd3„ ZC	 	 dId4„ZDd5„ ZE	 	 dId6„ZF	 	 dJd8„ZG	 dKd9„ZHdId:„ZId;„ ZJd<„ ZKd=„ ZLd>„ ZMd?„ ZNd@„ ZOdA„ ZPeJeKeLeMeNeOePdBœZQdKdC„ZR G dD„ dE¦  «        ZSdF„ ZT G dG„ dH¦  «        ZUdS )Lé    N)ÚS_ISREGÚS_IEXEC)ÚCallableé   )ÚconfigÚ
controldirÚerrorsÚlazy_importÚlockÚosutilsÚregistryÚtracezD
from breezy import (
    ui,
    )
from breezy.i18n import gettext
)ÚDuplicateKeyÚBzrErrorÚInternalBzrError)Úfiltered_output_bytesÚContentFilterContext)ÚMutableTree)Ú
delete_anyÚ	file_kindÚpathjoinÚsha_fileÚ	splitpath)ÚProgressPhase)Ú
FileExistsÚ
NoSuchFile)Ú	InterTreeÚfind_previous_pathzroot-parentc                   ó   — e Zd ZdZd„ ZdS )ÚNoFinalPathzINo final name for trans_id %(trans_id)r
root trans-id: %(root_trans_id)r
c                 ó,   — || _         |j        | _        d S ©N)Útrans_idÚrootÚroot_trans_id)Úselfr#   Ú	transforms      ú2/usr/lib/python3/dist-packages/breezy/transform.pyÚ__init__zNoFinalPath.__init__D   s   € Ø ˆŒØ&œ^ˆÔÐÐó    N©Ú__name__Ú
__module__Ú__qualname__Ú_fmtr)   © r*   r(   r    r    ?   s*   € € € € € ð1€Dð,ð ,ð ,ð ,ð ,r*   r    c                   ó   — e Zd ZdZdS )ÚReusingTransformz;Attempt to reuse a transform that has already been applied.N©r,   r-   r.   r/   r0   r*   r(   r2   r2   I   s   € € € € € àH€D€D€Dr*   r2   c                   ó   — e Zd ZdZdS )ÚMalformedTransformz)Tree transform is malformed %(conflicts)rNr3   r0   r*   r(   r5   r5   N   s   € € € € € à6€D€D€Dr*   r5   c                   ó   — e Zd ZdZdS )ÚCantMoveRootz7Moving the root directory is not supported at this timeNr3   r0   r*   r(   r7   r7   S   s   € € € € € àD€D€D€Dr*   r7   c                   ó   — e Zd ZdZd„ ZdS )ÚImmortalLimbozµUnable to delete transform temporary directory %(limbo_dir)s.
    Please examine %(limbo_dir)s to see if it contains any files you wish to
    keep, and delete it when you are done.c                 ó<   — t          j        | ¦  «         || _        d S r"   )r   r)   Ú	limbo_dir)r&   r;   s     r(   r)   zImmortalLimbo.__init__^   s   € ÝÔ˜$ÑÔÐØ"ˆŒˆˆr*   Nr+   r0   r*   r(   r9   r9   X   s*   € € € € € ð.€Dð#ð #ð #ð #ð #r*   r9   c                   ó   — e Zd ZdZd„ ZdS )ÚTransformRenameFailedz6Failed to rename %(from_path)s to %(to_path)s: %(why)sc                 ó>   — || _         || _        || _        || _        d S r"   )Ú	from_pathÚto_pathÚwhyÚerrno)r&   r?   r@   rA   rB   s        r(   r)   zTransformRenameFailed.__init__g   s"   € Ø"ˆŒØˆŒØˆŒØˆŒ
ˆ
ˆ
r*   Nr+   r0   r*   r(   r=   r=   c   s(   € € € € € àC€Dðð ð ð ð r*   r=   c                 ó8   — || v rt          |¬¦  «        ‚|| |<   d S )N)Úkey)r   )ÚmaprD   Úvalues      r(   Ú
unique_addrG   n   s)   € Ø
ˆc€z€zÝ˜sÐ#Ñ#Ô#Ð#Ø€Cˆ�H€H€Hr*   c                   ó   — e Zd Zd„ ZdS )Ú_TransformResultsc                 óV   — t                                | ¦  «         || _        || _        d S r"   )Úobjectr)   Úmodified_pathsÚrename_count)r&   rL   rM   s      r(   r)   z_TransformResults.__init__v   s*   € Ý�Š˜ÑÔÐØ,ˆÔØ(ˆÔÐÐr*   N)r,   r-   r.   r)   r0   r*   r(   rI   rI   t   s#   € € € € € ð)ð )ð )ð )ð )r*   rI   c                   ó@  — e Zd ZdZd2d„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd2d„Zd„ Zd„ Zd3d„Zd„ Zd„ Zd„ Zd„ Zd „ Z d!„ Z!d"„ Z"d#„ Z#	 	 d4d$„Z$d2d%„Z%d2d&„Z&d'„ Z'd(„ Z(d)„ Z)	 	 	 d5d*„Z*d6d+„Z+d,„ Z,d-„ Z-d.„ Z.d/„ Z/d0„ Z0d1„ Z1dS )7ÚTreeTransformaT  Represent a tree transformation.

    This object is designed to support incremental generation of the transform,
    in any order.

    However, it gives optimum performance when parent directories are created
    before their contents.  The transform is then able to put child files
    directly in their parent directory, avoiding later renames.

    It is easy to produce malformed transforms, but they are generally
    harmless.  Attempting to apply a malformed transform will cause an
    exception to be raised before any modifications are made to the tree.

    Many kinds of malformed transforms can be corrected with the
    resolve_conflicts function.  The remaining ones indicate programming error,
    such as trying to create a file with no path.

    Two sets of file creation methods are supplied.  Convenience methods are:
     * new_file
     * new_directory
     * new_symlink

    These are composed of the low-level methods:
     * create_path
     * create_file or create_directory or create_symlink
     * version_file
     * set_executability

    Transform/Transaction ids
    -------------------------
    trans_ids are temporary ids assigned to all files involved in a transform.
    It's possible, even common, that not all files in the Tree have trans_ids.

    trans_ids are only valid for the TreeTransform that generated them.
    Nc                 óì   — || _         || _        d| _        i | _        i | _        i | _        i | _        i | _        t          ¦   «         | _	        i | _
        i | _        t          ¦   «         | _        d| _        d S )Nr   F)Ú_treeÚ_pbÚ
_id_numberÚ_tree_path_idsÚ_tree_id_pathsÚ	_new_nameÚ_new_parentÚ_new_contentsÚsetÚ_removed_contentsÚ_new_executabilityÚ_new_reference_revisionÚ_removed_idÚ_done)r&   ÚtreeÚpbs      r(   r)   zTreeTransform.__init__¡   sq   € ØˆŒ
àˆŒØˆŒà ˆÔà ˆÔàˆŒàˆÔàˆÔå!$¡¤ˆÔà"$ˆÔà')ˆÔ$å™5œ5ˆÔàˆŒ
ˆ
ˆ
r*   c                 ó   — | S )úSupport Context Manager API.r0   ©r&   s    r(   Ú	__enter__zTreeTransform.__enter__»   s   € àˆr*   c                 ó.   — |                       ¦   «          dS )rb   N)Úfinalize)r&   Úexc_typeÚexc_valÚexc_tbs       r(   Ú__exit__zTreeTransform.__exit__¿   s   € à�Š‰Œˆˆˆr*   c                 ó*   — t          | j        ¦  «        ‚)z�Iterate through the entry's tree children, if any.

        :param trans_id: trans id to iterate
        :returns: Iterator over paths
        )ÚNotImplementedErrorÚiter_tree_children©r&   r#   s     r(   rm   z TreeTransform.iter_tree_childrenÃ   s   € õ " $Ô"9Ñ:Ô:Ð:r*   c                 ó   — |S r"   r0   ©r&   Úpaths     r(   Úcanonical_pathzTreeTransform.canonical_pathË   s   € Øˆr*   c                 ó*   — t          | j        ¦  «        ‚r"   )rl   Ú	tree_kindrn   s     r(   rt   zTreeTransform.tree_kindÎ   s   € Ý! $¤.Ñ1Ô1Ð1r*   c                 ó.  ‡ — i }t          ‰ j                             ¦   «         ¦  «        }|                     ˆ fd„t          ‰ j        ¦  «        D ¦   «         ¦  «         |D ]5\  }}||vrt          ¦   «         ||<   ||                              |¦  «         Œ6|S )zŠReturn a map of parent: children for known parents.

        Only new paths and parents of tree files with assigned ids are used.
        c              3   óF   •K  — | ]}|‰                      |¦  «        fV — Œd S r"   )Úfinal_parent©Ú.0Útr&   s     €r(   ú	<genexpr>z*TreeTransform.by_parent.<locals>.<genexpr>Ø   sJ   øè è € ð 9ð 9Øð ˜×*Ò*¨1Ñ-Ô-Ð.ð 9ð 9ð 9ð 9ð 9ð 9r*   )ÚlistrW   ÚitemsÚextendrU   rY   Úadd)r&   Ú	by_parentr}   r#   Ú	parent_ids   `    r(   r€   zTreeTransform.by_parentÑ   s¼   ø€ ð
 ˆ	Ý�TÔ%×+Ò+Ñ-Ô-Ñ.Ô.ˆØ�Šð 9ð 9ð 9ð 9Ý" 4Ô#6Ñ7Ô7ð9ñ 9ô 9ñ 	9ô 	9ð 	9à#(ð 	/ð 	/ÑˆH�iØ 	Ð)Ð)Ý'*¡u¤u�	˜)Ñ$Ø�iÔ ×$Ò$ XÑ.Ô.Ð.Ð.ØÐr*   c                 ó*   — t          | j        ¦  «        ‚)z–Release the working tree lock, if held.

        This is required if apply has not been invoked, but can be invoked
        even after apply.
        )rl   rf   rc   s    r(   rf   zTreeTransform.finalizeà   s   € õ " $¤-Ñ0Ô0Ð0r*   c                 ó†   — |                       ¦   «         }t          | j        ||¦  «         t          | j        ||¦  «         |S )z%Assign a transaction id to a new path)Ú	assign_idrG   rV   rW   ©r&   ÚnameÚparentr#   s       r(   Úcreate_pathzTreeTransform.create_pathè   s?   € à—>’>Ñ#Ô#ˆÝ�4”> 8¨TÑ2Ô2Ð2Ý�4Ô# X¨vÑ6Ô6Ð6Øˆr*   c                 ót   — |€t          d¦  «        ‚|| j        k    rt          ‚|| j        |<   || j        |<   dS )z5Change the path that is assigned to a transaction id.NzParent trans-id may not be None)Ú
ValueErrorr$   r7   rV   rW   r…   s       r(   Úadjust_pathzTreeTransform.adjust_pathï   sH   € àˆ>ÝÐ>Ñ?Ô?Ð?Ø�t”yÒ Ð ÝÐØ#'ˆŒ�xÑ Ø%+ˆÔ˜Ñ"Ð"Ð"r*   c                 ó*   — t          | j        ¦  «        ‚)a~  Emulate moving the root by moving all children, instead.

        We do this by undoing the association of root's transaction id with the
        current tree.  This allows us to create a new directory with that
        transaction id.  We unversion the root directory and version the
        physically new directory, and hope someone versions the tree root
        later.
        )rl   Úadjust_root_path)r&   r†   r‡   s      r(   r�   zTreeTransform.adjust_root_pathø   s   € õ " $Ô"7Ñ8Ô8Ð8r*   c                 ó*   — t          | j        ¦  «        ‚)aŸ  Reinterpret requests to change the root directory

        Instead of creating a root directory, or moving an existing directory,
        all the attributes and children of the new root are applied to the
        existing root directory.

        This means that the old root trans-id becomes obsolete, so it is
        recommended only to invoke this after the root trans-id has become
        irrelevant.
        )rl   Úfixup_new_rootsrc   s    r(   r�   zTreeTransform.fixup_new_roots  s   € õ " $Ô"6Ñ7Ô7Ð7r*   c                 ó:   — d| j         z  }| xj         dz  c_         |S )zProduce a new tranform idznew-%sr   )rS   )r&   Únew_ids     r(   r„   zTreeTransform.assign_id  s#   € à˜DœOÑ+ˆØˆŒ˜1ÑˆŒØˆr*   c                 óº   — |                       |¦  «        }|| j        vr1|                      ¦   «         | j        |<   || j        | j        |         <   | j        |         S )z=Determine (and maybe set) the transaction ID for a tree path.)rr   rT   r„   rU   rp   s     r(   Útrans_id_tree_pathz TreeTransform.trans_id_tree_path  s]   € à×"Ò" 4Ñ(Ô(ˆØ�tÔ*Ð*Ð*Ø(,¯ªÑ(8Ô(8ˆDÔ Ñ%Ø=AˆDÔ Ô 3°DÔ 9Ñ:ØÔ" 4Ô(Ð(r*   c                 óš   — | j         |         }|dk    rt          S |                      t          j                             |¦  «        ¦  «        S )z'Determine id of the parent in the tree.Ú )rU   ÚROOT_PARENTr“   Úosrq   Údirname)r&   r#   rq   s      r(   Úget_tree_parentzTreeTransform.get_tree_parent  s@   € àÔ" 8Ô,ˆØ�2Š:ˆ:ÝÐØ×&Ò&¥r¤w§¢°tÑ'<Ô'<Ñ=Ô=Ð=r*   c                 ól   — |                       |¦  «        }|�| j                             |¦  «         dS dS )z2Schedule the contents of a path entry for deletionN)rt   rZ   r   )r&   r#   Úkinds      r(   Údelete_contentszTreeTransform.delete_contents%  s>   € à�~Š~˜hÑ'Ô'ˆØÐØÔ"×&Ò& xÑ0Ô0Ð0Ð0Ð0ð Ðr*   c                 ó:   — | j                              |¦  «         dS )zCancel a scheduled deletionN)rZ   Úremovern   s     r(   Úcancel_deletionzTreeTransform.cancel_deletion+  s   € àÔ×%Ò% hÑ/Ô/Ð/Ð/Ð/r*   c                 óZ   — |                       |¦  «         |                      |¦  «         dS )z%Delete and unversion a versioned fileN)rœ   Úunversion_filern   s     r(   Údelete_versionedzTreeTransform.delete_versioned/  s0   € à×Ò˜XÑ&Ô&Ð&Ø×Ò˜HÑ%Ô%Ð%Ð%Ð%r*   c                 óJ   — |€
| j         |= dS t          | j         ||¦  «         dS )zQSchedule setting of the 'execute' bit
        To unschedule, set to None
        N)r[   rG   )r&   Úexecutabilityr#   s      r(   Úset_executabilityzTreeTransform.set_executability4  s6   € ð Ð ØÔ'¨Ð1Ð1Ð1å�tÔ.°¸-ÑHÔHÐHÐHÐHr*   c                 ó2   — t          | j        ||¦  «         dS )z-Set the reference associated with a directoryN)rG   r\   )r&   Úrevision_idr#   s      r(   Úset_tree_referencez TreeTransform.set_tree_reference=  s   € å�4Ô/°¸;ÑGÔGÐGÐGÐGr*   c                 ó*   — t          | j        ¦  «        ‚)z$Schedule a file to become versioned.)rl   Úversion_file)r&   r#   Úfile_ids      r(   rª   zTreeTransform.version_fileA  s   € å! $Ô"3Ñ4Ô4Ð4r*   c                 ó*   — t          | j        ¦  «        ‚)z$Undo a previous versioning of a file)rl   Úcancel_versioningrn   s     r(   r­   zTreeTransform.cancel_versioningE  s   € å! $Ô"8Ñ9Ô9Ð9r*   c                 ó:   — | j                              |¦  «         dS )z+Schedule a path entry to become unversionedN)r]   r   rn   s     r(   r¡   zTreeTransform.unversion_fileI  s   € àÔ×Ò˜XÑ&Ô&Ð&Ð&Ð&r*   Fc                 ó*   — t          | j        ¦  «        ‚)z½Determine the paths of all new and changed files.

        :param filesystem_only: if True, only calculate values for files
            that require renames or execute bit changes.
        )rl   Ú	new_paths)r&   Úfilesystem_onlys     r(   r°   zTreeTransform.new_pathsM  s   € õ " $¤.Ñ1Ô1Ð1r*   c                 ó„   — || j         v r|| j        v rdS | j         |         S || j        v rdS |                      |¦  «        S )a  Determine the final file kind, after any changes applied.

        :return: None if the file does not exist/has no contents.  (It is
            conceivable that a path would be created without the corresponding
            contents insertion command)
        útree-referenceN)rX   r\   rZ   rt   rn   s     r(   Ú
final_kindzTreeTransform.final_kindU  sY   € ð �tÔ)Ð)Ð)Ø˜4Ô7Ð7Ð7Ø'Ð'ØÔ% hÔ/Ð/Ø˜Ô/Ð/Ð/Ø�4à—>’> (Ñ+Ô+Ð+r*   c                 ó6   — | j                              |¦  «        S )z5Determine the tree path associated with the trans_id.)rU   Úgetrn   s     r(   Ú	tree_pathzTreeTransform.tree_pathe  s   € àÔ"×&Ò& xÑ0Ô0Ð0r*   c                 ó*   — t          | j        ¦  «        ‚r"   )rl   Úfinal_is_versionedrn   s     r(   r¹   z TreeTransform.final_is_versionedi  s   € Ý! $Ô"9Ñ:Ô:Ð:r*   c                 óh   — 	 | j         |         S # t          $ r |                      |¦  «        cY S w xY w)zyDetermine the parent file_id, after any changes are applied.

        ROOT_PARENT is returned for the tree root.
        )rW   ÚKeyErrorr™   rn   s     r(   rw   zTreeTransform.final_parentl  sJ   € ð
	2ØÔ# HÔ-Ð-øÝð 	2ð 	2ð 	2Ø×'Ò'¨Ñ1Ô1Ð1Ð1Ð1ð	2øøøs   ‚ �1°1c                 óÐ   — 	 | j         |         S # t          $ rL 	 t          j                             | j        |         ¦  «        cY S # t          $ r t          || ¦  «        ‚w xY ww xY w)z<Determine the final filename, after all changes are applied.)rV   r»   r—   rq   ÚbasenamerU   r    rn   s     r(   Ú
final_namezTreeTransform.final_namev  sƒ   € ð	2Ø”> (Ô+Ð+øÝð 	2ð 	2ð 	2ð2Ý”w×'Ò'¨Ô(;¸HÔ(EÑFÔFÐFÐFÐFøÝð 2ð 2ð 2Ý! (¨DÑ1Ô1Ð1ð2øøøð	2øøøs    ‚ �
A%š)AÁA%ÁA!Á!A%c                 ó&   — || j         v p|| j        v S )z-Return True if a trans_id's path has changed.)rV   rW   rn   s     r(   Úpath_changedzTreeTransform.path_changed€  s   € à˜DœNÐ*ÐM°¸DÔ<LÐ0LÐMr*   c                 ó   — || j         v S r"   )rX   rn   s     r(   Únew_contentszTreeTransform.new_contents„  s   € Ø˜DÔ.Ð.Ð/r*   c                 ó*   — t          | j        ¦  «        ‚)z9Find any violations of inventory or filesystem invariants)rl   Úfind_raw_conflictsrc   s    r(   rÄ   z TreeTransform.find_raw_conflicts‡  s   € å! $Ô"9Ñ:Ô:Ð:r*   c                 ó*   — t          | j        ¦  «        ‚)a¢  Convenience method to create files.

        name is the name of the file to create.
        parent_id is the transaction id of the parent directory of the file.
        contents is an iterator of bytestrings, which will be used to produce
        the file.
        :param file_id: The inventory ID of the file, if it is to be versioned.
        :param executable: Only valid when a file_id has been supplied.
        )rl   Únew_file)r&   r†   r�   Úcontentsr«   Ú
executableÚsha1s          r(   rÆ   zTreeTransform.new_file‹  s   € õ " $¤-Ñ0Ô0Ð0r*   c                 ó*   — t          | j        ¦  «        ‚)a  Convenience method to create directories.

        name is the name of the directory to create.
        parent_id is the transaction id of the parent directory of the
        directory.
        file_id is the inventory ID of the directory, if it is to be versioned.
        )rl   Únew_directory)r&   r†   r�   r«   s       r(   rË   zTreeTransform.new_directory˜  s   € õ " $Ô"4Ñ5Ô5Ð5r*   c                 ó*   — t          | j        ¦  «        ‚)a@  Convenience method to create symbolic link.

        name is the name of the symlink to create.
        parent_id is the transaction id of the parent directory of the symlink.
        target is a bytestring of the target of the symlink.
        file_id is the inventory ID of the file, if it is to be versioned.
        )rl   Únew_symlink)r&   r†   r�   Útargetr«   s        r(   rÍ   zTreeTransform.new_symlink¢  s   € õ " $Ô"2Ñ3Ô3Ð3r*   c                 ó*   — t          | j        ¦  «        ‚)a?  Schedule an item to be orphaned.

        When a directory is about to be removed, its children, if they are not
        versioned are moved out of the way: they don't have a parent anymore.

        :param trans_id: The trans_id of the existing item.
        :param parent_id: The parent trans_id of the item.
        )rl   Ú
new_orphan)r&   r#   r�   s      r(   rÐ   zTreeTransform.new_orphan¬  s   € õ " $¤/Ñ2Ô2Ð2r*   c                 ó*   — t          | j        ¦  «        ‚)a›  Produce output in the same format as Tree.iter_changes.

        Will produce nonsensical results if invoked while inventory/filesystem
        conflicts (as reported by TreeTransform.find_raw_conflicts()) are present.

        This reads the Transform, but only reproduces changes involving a
        file_id.  Files that are not versioned in either of the FROM or TO
        states are not reflected.
        )rl   Úiter_changesrc   s    r(   rÒ   zTreeTransform.iter_changes·  s   € õ " $Ô"3Ñ4Ô4Ð4r*   c                 ó*   — t          | j        ¦  «        ‚)zœReturn a tree representing the result of the transform.

        The tree is a snapshot, and altering the TreeTransform will invalidate
        it.
        )rl   Úget_preview_treerc   s    r(   rÔ   zTreeTransform.get_preview_treeÃ  s   € õ " $Ô"7Ñ8Ô8Ð8r*   c                 ó*   — t          | j        ¦  «        ‚)a  Commit the result of this TreeTransform to a branch.

        :param branch: The branch to commit to.
        :param message: The message to attach to the commit.
        :param merge_parents: Additional parent revision-ids specified by
            pending merges.
        :param strict: If True, abort the commit if there are unversioned
            files.
        :param timestamp: if not None, seconds-since-epoch for the time and
            date.  (May be a float.)
        :param timezone: Optional timezone for timestamp, as an offset in
            seconds.
        :param committer: Optional committer in email-id format.
            (e.g. "J Random Hacker <jrandom@example.com>")
        :param authors: Optional list of authors in email-id format.
        :param revprops: Optional dictionary of revision properties.
        :param revision_id: Optional revision id.  (Specifying a revision-id
            may reduce performance for some non-native formats.)
        :return: The revision_id of the revision committed.
        )rl   Úcommit)r&   ÚbranchÚmessageÚmerge_parentsÚstrictÚ	timestampÚtimezoneÚ	committerÚauthorsÚrevpropsr§   s              r(   rÖ   zTreeTransform.commitË  s   € õ. " $¤+Ñ.Ô.Ð.r*   c                 ó*   — t          | j        ¦  «        ‚)aP  Schedule creation of a new file.

        :seealso: new_file.

        :param contents: an iterator of strings, all of which will be written
            to the target destination.
        :param trans_id: TreeTransform handle
        :param mode_id: If not None, force the mode of the target file to match
            the mode of the object referenced by mode_id.
            Otherwise, we will try to preserve mode bits of an existing file.
        :param sha1: If the sha1 of this content is already known, pass it in.
            We can use it to prevent future sha1 computations.
        )rl   Úcreate_file)r&   rÇ   r#   Úmode_idrÉ   s        r(   rá   zTreeTransform.create_fileä  s   € õ " $Ô"2Ñ3Ô3Ð3r*   c                 ó*   — t          | j        ¦  «        ‚)zOSchedule creation of a new directory.

        See also new_directory.
        )rl   Úcreate_directoryrn   s     r(   rä   zTreeTransform.create_directoryô  s   € õ
 " $Ô"7Ñ8Ô8Ð8r*   c                 ó*   — t          | j        ¦  «        ‚)zqSchedule creation of a new symbolic link.

        target is a bytestring.
        See also new_symlink.
        )rl   Úcreate_symlink)r&   rÎ   r#   s      r(   ræ   zTreeTransform.create_symlinkû  s   € õ " $Ô"5Ñ6Ô6Ð6r*   c                 ó*   — t          | j        ¦  «        ‚r"   )rl   Úcreate_tree_reference)r&   Úreference_revisionr#   s      r(   rè   z#TreeTransform.create_tree_reference  s   € Ý! $Ô"<Ñ=Ô=Ð=r*   c                 ó*   — t          | j        ¦  «        ‚)z Schedule creation of a hard link)rl   Úcreate_hardlink©r&   rq   r#   s      r(   rë   zTreeTransform.create_hardlink  ó   € å! $Ô"6Ñ7Ô7Ð7r*   c                 ó*   — t          | j        ¦  «        ‚)z)Cancel the creation of new file contents.)rl   Úcancel_creationrn   s     r(   rï   zTreeTransform.cancel_creation
  rí   r*   c                 ó*   — t          | j        ¦  «        ‚)zCook conflicts.
        )rl   Úcook_conflicts)r&   Úraw_conflictss     r(   rñ   zTreeTransform.cook_conflicts  s   € õ " $Ô"5Ñ6Ô6Ð6r*   r"   )F)NNN)NFNNNNNN©NN)2r,   r-   r.   Ú__doc__r)   rd   rj   rm   rr   rt   r€   rf   rˆ   r‹   r�   r�   r„   r“   r™   rœ   rŸ   r¢   r¥   r¨   rª   r­   r¡   r°   r´   r·   r¹   rw   r¾   rÀ   rÂ   rÄ   rÆ   rË   rÍ   rÐ   rÒ   rÔ   rÖ   rá   rä   ræ   rè   rë   rï   rñ   r0   r*   r(   rO   rO   |   s  € € € € € ð"ð "ðHð ð ð ð4ð ð ðð ð ð;ð ;ð ;ðð ð ð2ð 2ð 2ðð ð ð1ð 1ð 1ðð ð ð,ð ,ð ,ð	9ð 	9ð 	9ð8ð 8ð 8ðð ð ð)ð )ð )ð>ð >ð >ð1ð 1ð 1ð0ð 0ð 0ð&ð &ð &ð
Ið Ið IðHð Hð Hð5ð 5ð 5ð 5ð:ð :ð :ð'ð 'ð 'ð2ð 2ð 2ð 2ð,ð ,ð ,ð 1ð 1ð 1ð;ð ;ð ;ð2ð 2ð 2ð2ð 2ð 2ðNð Nð Nð0ð 0ð 0ð;ð ;ð ;ð ;?Ø'+ð1ð 1ð 1ð 1ð6ð 6ð 6ð 6ð4ð 4ð 4ð 4ð	3ð 	3ð 	3ð
5ð 
5ð 
5ð9ð 9ð 9ð BGØFJØ*.ð/ð /ð /ð /ð24ð 4ð 4ð 4ð 9ð 9ð 9ð7ð 7ð 7ð>ð >ð >ð8ð 8ð 8ð8ð 8ð 8ð7ð 7ð 7ð 7ð 7r*   rO   c                   ó   — e Zd ZdZdZd„ ZdS )ÚOrphaningErrorTz(Error while orphaning %s in %s directoryc                 ó`   — t           j                             | ¦  «         || _        || _        d S r"   )r	   r   r)   Úorphanr‡   )r&   rø   r‡   s      r(   r)   zOrphaningError.__init__  s*   € ÝŒ× Ò  Ñ&Ô&Ð&ØˆŒØˆŒˆˆr*   N)r,   r-   r.   Úinternal_errorr/   r)   r0   r*   r(   rö   rö     s/   € € € € € ð €NØ5€Dðð ð ð ð r*   rö   c                   ó   — e Zd ZdZd„ ZdS )ÚOrphaningForbiddenz*Policy: %s doesn't allow creating orphans.c                 óR   — t           j                             | ¦  «         || _        d S r"   )r	   r   r)   Úpolicy)r&   rý   s     r(   r)   zOrphaningForbidden.__init__$  s#   € ÝŒ× Ò  Ñ&Ô&Ð&ØˆŒˆˆr*   Nr+   r0   r*   r(   rû   rû      s(   € € € € € à7€Dðð ð ð ð r*   rû   c                 ót  — d}|                       |¦  «        }|                      |¦  «        €|                      |¦  «         | j        |         }|                      |¦  «        }|                      ||¦  «        }|                      |||¦  «         t          j        t          ||¦  «        ›d|›�¦  «         dS )a.  See TreeTransformBase.new_orphan.

    This creates a new orphan in the `brz-orphans` dir at the root of the
    `TreeTransform`.

    :param tt: The TreeTransform orphaning `trans_id`.

    :param orphan_id: The trans id that should be orphaned.

    :param parent_id: The orphan parent trans id.
    zbrz-orphansNz has been orphaned in )
r“   r´   rä   rU   r¾   Ú_available_backup_namer‹   r   ÚwarningÚjoinpath)ÚttÚ	orphan_idr�   Úorphan_dir_basenameÚod_idÚparent_pathÚactual_nameÚnew_names           r(   Úmove_orphanr	  )  sÏ   € ð (ÐØ×!Ò!Ð"5Ñ6Ô6€EØ	‡}‚}�UÑÔÐ#Ø
×Ò˜EÑ"Ô"Ð"ØÔ# IÔ.€Kà—-’- 	Ñ*Ô*€KØ×(Ò(¨°eÑ<Ô<€HØ‡N‚N�8˜U IÑ.Ô.Ð.Ý	„MÝ˜k¨;Ñ7Ô7Ð7Ð7Ð9LÐ9LðNñ Oô Oð Oð Oð Or*   c                 ó    — t          d¦  «        ‚)zrSee TreeTransformBase.new_orphan.

    This refuses to create orphan, letting the caller handle the conflict.
    Únever)rû   )r  r  r�   s      r(   Úrefuse_orphanr  C  s   € õ
 ˜WÑ
%Ô
%Ð%r*   Úconflictz>Leave orphans in place and create a conflict on the directory.Úmovez,Move orphans into the brz-orphans directory.ztransform.orphan_policyz6Policy for orphaned files during transform operations.r   )ÚhelpÚinvalidc                 ó6   — | �| dk    r|S t          | |¦  «        S )z:Join tree-relative paths, handling the tree root speciallyNr•   )r   )r‡   Úchilds     r(   r  r  [  s$   € à€~˜ 2š˜Øˆå˜ Ñ&Ô&Ð&r*   c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )Ú
FinalPathsz¦Make path calculation cheap by memoizing paths.

    The underlying tree must not be manipulated between calls, or else
    the results will likely be incorrect.
    c                 óV   — t                                | ¦  «         i | _        || _        d S r"   )rK   r)   Ú_known_pathsr'   ©r&   r'   s     r(   r)   zFinalPaths.__init__j  s'   € Ý�Š˜ÑÔÐØˆÔØ"ˆŒˆˆr*   c                 ó  — || j         j        k    s|t          k    rdS | j                              |¦  «        }| j                              |¦  «        }|| j         j        k    r|S t          |                      |¦  «        |¦  «        S )Nr•   )r'   r$   r–   r¾   rw   r   Úget_path)r&   r#   r†   r�   s       r(   Ú_determine_pathzFinalPaths._determine_patho  s|   € Ø�t”~Ô*Ò*Ð*¨h½+Ò.EÐ.EØ�2ØŒ~×(Ò(¨Ñ2Ô2ˆØ”N×/Ò/°Ñ9Ô9ˆ	Ø˜œÔ+Ò+Ð+ØˆKå˜DŸMšM¨)Ñ4Ô4°dÑ;Ô;Ð;r*   c                 óh   — || j         vr|                      |¦  «        | j         |<   | j         |         S )z.Find the final path associated with a trans_id)r  r  rn   s     r(   r  zFinalPaths.get_pathy  s9   € à˜4Ô,Ð,Ð,Ø*.×*>Ò*>¸xÑ*HÔ*HˆDÔ˜hÑ'ØÔ  Ô*Ð*r*   c                 ó    ‡ — ˆ fd„|D ¦   «         S )Nc                 ó>   •— g | ]}‰                      |¦  «        |f‘ŒS r0   )r  rx   s     €r(   ú
<listcomp>z(FinalPaths.get_paths.<locals>.<listcomp>€  s*   ø€ Ð9Ð9Ð9¨!�—’˜qÑ!Ô! 1Ð%Ð9Ð9Ð9r*   r0   )r&   Ú	trans_idss   ` r(   Ú	get_pathszFinalPaths.get_paths  s   ø€ Ø9Ð9Ð9Ð9¨yÐ9Ñ9Ô9Ð9r*   N)r,   r-   r.   rô   r)   r  r  r   r0   r*   r(   r  r  c  sZ   € € € € € ðð ð#ð #ð #ð
<ð <ð <ð+ð +ð +ð:ð :ð :ð :ð :r*   r  c                 óŠ   — |                       |¦  «        D ],}|                      |                      |¦  «        ||¦  «         Œ-d S r"   )rm   r‹   r¾   )r  Ú
old_parentÚ
new_parentr  s       r(   Ú_reparent_childrenr$  ƒ  sR   € Ø×&Ò& zÑ2Ô2ð @ð @ˆØ
�Š�r—}’} UÑ+Ô+¨Z¸Ñ?Ô?Ð?Ð?ð@ð @r*   c                 ó¤   — |                       ¦   «         }||         D ],}|                      |                      |¦  «        ||¦  «         Œ-||         S r"   )r€   r‹   r¾   )r  r"  r#  r€   r  s        r(   Ú_reparent_transform_childrenr&  ˆ  sU   € Ø—’‘”€IØ˜:Ô&ð @ð @ˆØ
�Š�r—}’} UÑ+Ô+¨Z¸Ñ?Ô?Ð?Ð?Ø�ZÔ Ð r*   c                 ó2  — |j         }|j        }|dk    rt|                     | ¦  «        5 }|                     | ¦  «        }|                     ||t          j        |¦  «        |j        |¦  «        cddd¦  «         S # 1 swxY w Y   dS |dv r?|                     |||j        ¦  «        }	|dk    r| 	                    |j
        |	¦  «         |	S |dk    r2|                     | ¦  «        }
|                     |||
|j        ¦  «        S t          j        ||¦  «        ‚)z2Create a new file according to its inventory entryÚfileN©Ú	directoryr³   r³   Úsymlink)r†   r›   Úget_fileÚis_executablerÆ   r   Úfile_iteratorr«   rË   r¨   ré   Úget_symlink_targetrÍ   r	   ÚBadFileKindError)rq   r  Úentryr�   r_   r†   r›   ÚfrÈ   r#   rÎ   s              r(   Únew_by_entryr3  �  se  € àŒ:€DØŒ:€DØˆv‚~€~Ø�]Š]˜4Ñ Ô ð 	 AØ×+Ò+¨DÑ1Ô1ˆJØ—;’;Ø�i¥Ô!6°qÑ!9Ô!9¸5¼=Øñô ð	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	ð
 
Ð0Ð	0Ð	0Ø×#Ò# D¨)°U´]ÑCÔCˆØÐ#Ò#Ð#Ø×!Ò! %Ô":¸HÑEÔEÐEØˆØ	�Ò	Ð	Ø×(Ò(¨Ñ.Ô.ˆØ�~Š~˜d I¨v°u´}ÑEÔEÐEåÔ% d¨DÑ1Ô1Ð1s   ªAA<Á<B ÂB c                 óò  — |                      |¦  «        }|dk    r|                      |¦  «         dS |dk    rÌ|€*|                     |¦  «        }t          j        |¦  «        }nd}	 | j        }|                     ¦   «         r6|�4|                     |¦  «        }	t          ||	t          ||¦  «        ¦  «        }|  
                    ||¦  «         |�|                     ¦   «          dS dS # |�|                     ¦   «          w w xY w|dk    r+|                      |                     |¦  «        |¦  «         dS |dk    r+|                      |                     |¦  «        |¦  «         dS t!          d|z  ¦  «        ‚)a  Create new file contents according to tree contents.

    :param filter_tree_path: the tree path to use to lookup
      content filters to apply to the bytes output in the working tree.
      This only applies if the working tree supports content filtering.
    r*  r(  Nr+  r³   zUnknown kind %r)r›   rä   r,  r   r.  rQ   Úsupports_content_filteringÚ_content_filter_stackr   r   rá   Úcloseræ   r/  rè   Úget_reference_revisionÚAssertionError)
r  r#   r_   rq   ÚchunksÚfilter_tree_pathr›   r2  ÚwtÚfilterss
             r(   Úcreate_from_treer>  ¥  s›  € ð �9Š9�T‰?Œ?€DØˆ{ÒÐØ
×Ò˜HÑ%Ô%Ð%Ð%Ð%Ø	�ŠˆØˆ>Ø—’˜dÑ#Ô#ˆAÝÔ*¨1Ñ-Ô-ˆFˆFàˆAð
	Ø”ˆBØ×,Ò,Ñ.Ô.ð BÐ3CÐ3OØ×2Ò2Ð3CÑDÔD�Ý.Ø˜GÝ(Ð)9¸4Ñ@Ô@ñBô B�ð �NŠN˜6 8Ñ,Ô,Ð,àˆ}Ø—’‘	”	�	�	�	ð ˆ}øˆqˆ}Ø—’‘	”	�	�	ð øøøà	�Ò	Ð	Ø
×Ò˜$×1Ò1°$Ñ7Ô7¸ÑBÔBÐBÐBÐBØ	Ð!Ò	!Ð	!Ø
× Ò  ×!<Ò!<¸TÑ!BÔ!BÀHÑMÔMÐMÐMÐMåÐ.°Ñ5Ñ6Ô6Ð6s   Á(A'C) Ã)Dc                 óV   — |j         dk    r|                      |j        |¦  «         dS dS )zCSet the executability of a trans_id according to an inventory entryr(  N)r›   r¥   rÈ   )r  r1  r#   s      r(   Úcreate_entry_executabilityr@  É  s6   € à„z�VÒÐØ
×Ò˜UÔ-¨xÑ8Ô8Ð8Ð8Ð8ð Ðr*   c	                 ó�  ‡— t           j                             ¦   «         5 }	|€|                     ¦   «         }t	          | |‰||	||||¦	  «	        }d d d ¦  «         n# 1 swxY w Y   t           j                             ¦   «         5 }	t          ||	ˆfd„¦  «        }
d d d ¦  «         n# 1 swxY w Y   |                     |
¦  «        }||fS )Nc                 ó&   •— t          | |‰¦  «        S r"   )Úconflict_pass)rz   ÚcÚtarget_trees     €r(   ú<lambda>z+_prepare_revert_transform.<locals>.<lambda>Ú  s   ø€ ¥}°Q¸¸;Ñ'GÔ'G€ r*   )ÚuiÚ
ui_factoryÚnested_progress_barÚmerge_modifiedÚ_alter_filesÚresolve_conflictsrñ   )ÚesÚworking_treerE  r  Ú	filenamesÚbackupsÚppÚ
basis_treerJ  Úchild_pbrò   Ú	conflictss     `         r(   Ú_prepare_revert_transformrU  Ï  sq  ø€ õ 
Œ×	*Ò	*Ñ	,Ô	,ð B°ØÐ!Ø)×8Ò8Ñ:Ô:ˆNÝ% b¨,¸ÀRØ&.°	¸7Ø&4°jñBô BˆðBð Bð Bñ Bô Bð Bð Bð Bð Bð Bð Bøøøð Bð Bð Bð Bõ 
Œ×	*Ò	*Ñ	,Ô	,ð I°Ý)Ø�ÐGÐGÐGÐGñIô IˆðIð Ið Iñ Iô Ið Ið Ið Ið Ið Ið Iøøøð Ið Ið Ið Ið ×!Ò! -Ñ0Ô0€IØ�nÐ$Ð$s#    .AÁAÁ!AÂB$Â$B(Â+B(Fc           
      ó2  — t          j        ¦   «         5 }|                     t          j                             ¦   «         ¦  «        }|                     |                     ¦   «         ¦  «         |                     |                      |¦  «        ¦  «        }	t          dd|¦  «        }
t          || ||	|||
¦  «        \  }}|rIddl
m} |                     | j        ¬¦  «        }|                     |	                     ¦   «         |¦  «         |D ]#}t!          j        t%          |¦  «        ¦  «         Œ$|
                     ¦   «          |	                     ¦   «          |                      ¦   «         r|                      |¦  «         ddd¦  «         n# 1 swxY w Y   |S )z;Revert a working tree's contents to those of a target tree.zRevert phaseé   r   )Údelta)Úunversioned_filterN)Ú
contextlibÚ	ExitStackÚenter_contextrG  rH  rI  Ú	lock_readr'   r   rU  r•   rX  Ú_ChangeReporterÚ
is_ignoredÚreport_changesrÒ   r   r   ÚstrÚ
next_phaseÚapplyÚsupports_merge_modifiedÚset_merge_modified)rN  rE  rO  rP  r`   Úchange_reporterrJ  rR  rM  r  rQ  rT  rX  r  s                 r(   Úrevertrg  ß  sÊ  € õ 
Ô	Ñ	Ô	ð < 2Ø×Ò�bœm×?Ò?ÑAÔAÑBÔBˆØ
×Ò˜×.Ò.Ñ0Ô0Ñ1Ô1Ð1Ø×Ò˜l×4Ò4°RÑ8Ô8Ñ9Ô9ˆÝ˜>¨1¨bÑ1Ô1ˆÝ$=Ø�˜k¨2¨y¸'À2ñ%Gô %GÑ!ˆ	�>àð 	EØÐÐÐÐÐØ#×3Ò3Ø#/Ô#:ð 4ñ <ô <ˆOà× Ò  §¢Ñ!2Ô!2°OÑDÔDÐDØ!ð 	)ð 	)ˆHÝŒM�#˜h™-œ-Ñ(Ô(Ð(Ð(Ø
�Š‰ŒˆØ
�Š‰
Œ
ˆ
Ø×/Ò/Ñ1Ô1ð 	<Ø×+Ò+¨NÑ;Ô;Ð;ð#<ð <ð <ñ <ô <ð <ð <ð <ð <ð <ð <øøøð <ð <ð <ð <ð$ Ðs   ”E,FÆFÆFc	           	      ó,  — |�'|                       |                     ¦   «         ¦  «         |                     |||¬¦  «        }	|                     d¦  «        sd}
nd}
g }t	          |	¦  «        D �]\\  }}|j        \  }}|j        \  }}|j        \  }}|j        \  }}|j	        \  }}|
r|dk    rŒAd }|�| 
                    |¦  «        }n|                     ¦   «         }|j        �rþd}|dk    r½|s|€¹|                     |¦  «        }|                     |¦  «        |k    r‹|€;|                     ¦   «         }|                       |                     ¦   «         ¦  «         t!          j        ||¦  «        }|                     |¦  «        }|€|€|sd}n||                     |¦  «        k    rd}|�Ç|s|                     |¦  «         n¯|�­| 
                    t'          j        |¦  «        ¦  «        }|                     ||¦  «        }|                     |||¦  «         |                     ||¦  «        } |r=|r;|                     |¦  «         |                     | t5          |dd ¦  «        ¬¦  «         |}| }|dv rH|                     |¦  «         |d	k    r+|                     |¦  «        }!|                     |!|¦  «         �n$|d
k    r*|                     |                     |¦  «        |¦  «         nô|dk    rÝ|                      ||||ff¦  «         |€;|                     ¦   «         }|                       |                     ¦   «         ¦  «         |                     |¦  «        }"t!          j        ||¦  «        }|                     |¦  «        }|�!|"|                     |¦  «        k    r||v r||= n|"||<   |r||k    r| !                    ||¦  «         n|�tE          |¦  «        ‚|s(|r&|                     |t5          |dd ¦  «        ¬¦  «         |r|s|                     |¦  «         |�€||k    s| #                    ¦   «         rf|dk    rtH          }#n"|j%        d         }$| &                    |$¦  «        }#|dk    r|r| '                    ||#¦  «         n|                     ||#|¦  «         ||k    r|dk    r| !                    ||¦  «         �Œ^| (                    ¦   «         rk| )                    |¦  «        D ]T\  \  }}}}%| *                    |¦  «        }&tW          |%|&tY          ||¦  «        ¦  «        }%| -                    |%||¦  «         ŒUn6| )                    |¦  «        D ] \  \  }}}}%| -                    |%||¦  «         Œ!| .                    ¦   «          |S )N)Úspecific_filesr`   r•   TFr(  r«   ©r«   r)  r³   r+  r   )/r\  r]  rÒ   Úis_versionedÚ	enumeraterq   Ú	versionedr†   r›   rÈ   r“   r„   Úchanged_contentÚget_file_sha1r¶   rR  r   Úfind_source_pathrœ   r   r˜   rÿ   r‹   rˆ   r¡   rª   Úgetattrrä   r8  r¨   ræ   r/  Úappendr¥   r9  Úis_reparentedr–   r�   Útrans_id_file_idr�   r5  Úiter_files_bytesr6  r   r   rá   r�   )'rM  rN  rE  r  r`   ri  rP  rJ  rR  Úchange_listÚ	skip_rootÚdeferred_filesÚid_numÚchangeÚtarget_pathÚwt_pathÚtarget_versionedÚwt_versionedÚtarget_nameÚwt_nameÚtarget_kindÚwt_kindÚtarget_executableÚwt_executablerâ   r#   Úkeep_contentÚwt_sha1Úbasis_interÚ
basis_pathÚparent_trans_idÚbackup_nameÚnew_trans_idÚrevisionÚnew_sha1Úparent_transÚtarget_parentÚbytesr=  s'                                          r(   rK  rK  ÷  s¹  € àÐØ
×Ò˜×-Ò-Ñ/Ô/Ñ0Ô0Ð0ð
 ×+Ò+Ø N°rð ,ñ ;ô ;€Kà×#Ò# BÑ'Ô'ð Øˆ	ˆ	àˆ	Ø€NÝ# KÑ0Ô0ð b>ñ b>‰ˆ�Ø%œ{Ñˆ�WØ)/Ô)9Ñ&Ð˜,Ø%œ{Ñˆ�WØ%œ{Ñˆ�WØ+1Ô+<Ñ(Ð˜=Øð 	˜ Bš˜ØØˆØÐØ×,Ò,¨WÑ5Ô5ˆHˆHà—|’|‘~”~ˆHØÔ!ñ C	2Ø ˆLØ˜&Ò Ð  gÐ °Ð1DØ&×4Ò4°WÑ=Ô=�Ø!×%Ò% gÑ.Ô.°'Ò9Ð9ð "Ð)Ø%1×%<Ò%<Ñ%>Ô%>˜
Ø×(Ò(¨×)=Ò)=Ñ)?Ô)?Ñ@Ô@Ð@Ý"+¤-°
¸LÑ"IÔ"I�KØ!,×!=Ò!=¸gÑ!FÔ!F�JØ!Ð)Ø&Ð.Ð7GÐ.Ø+/˜Løà" j×&>Ò&>¸zÑ&JÔ&JÒJÐJØ+/˜LØÐ"Ø#ð ,Ø×&Ò& xÑ0Ô0Ð0Ð0Ø Ð,Ø&(×&;Ò&;½G¼OÈGÑ<TÔ<TÑ&UÔ&U�OØ"$×";Ò";Ø ñ#2ô #2�Kà—N’N ;°ÀÑJÔJÐJØ#%§>¢>°'¸?Ñ#KÔ#K�LØ#ð TÐ(8ð TØ×)Ò)¨(Ñ3Ô3Ð3ØŸšØ(µ'¸&À)ÈTÑ2RÔ2Rð (ñ Tô Tð Tð '�GØ+�HØÐ=Ð=Ð=Ø×#Ò# HÑ-Ô-Ð-ØÐ"2Ò2Ð2Ø*×AÒAØ#ñ %ô  %�Hà×)Ò)¨(°HÑ=Ô=Ð=ùØ 	Ò)Ð)Ø×!Ò! +×"@Ò"@Øñ#!ô #!Ø"*ñ,ô ,ð ,ð ,à Ò&Ð&Ø×%Ò%Ø  8¨W°kÐ"BÐCñEô Eð EàÐ%Ø!-×!8Ò!8Ñ!:Ô!:�JØ×$Ò$ Z×%9Ò%9Ñ%;Ô%;Ñ<Ô<Ð<Ø&×4Ò4°[ÑAÔA�Ý'œm¨J¸ÑDÔD�Ø(×9Ò9¸+ÑFÔF�
ØÐ*Ø  J×$<Ò$<¸ZÑ$HÔ$HÒHÐHð " ^Ð3Ð3Ø*¨:Ð6øà2:�N ;Ñ/ð  ð F MÐ5FÒ$FÐ$FØ×(Ò(Ð):¸HÑEÔEÐEøØÐ(Ý$ [Ñ1Ô1Ð1Øð 	DÐ 0ð 	DØ�OŠOØ¥'¨&°)¸TÑ"BÔ"Bð ñ Dô Dð Dàð 	(Ð 0ð 	(Ø×Ò˜hÑ'Ô'Ð'ØÐ#Ø Ò+Ð+¨v×/CÒ/CÑ/EÔ/EÐ+Ø˜bÒ Ð Ý*��à &Ô 0°Ô 3�Ø!×2Ò2°=ÑAÔA�Ø˜"Š}ˆ} ˆ}Ø×#Ò# K°Ñ>Ô>Ð>Ð>à—’˜{¨L¸(ÑCÔCÐCØÐ-Ò-Ð-°+ÀÒ2GÐ2GØ× Ò Ð!2°HÑ=Ô=Ð=ùØ×.Ò.Ñ0Ô0ð 5à×,Ò,¨^Ñ<Ô<ð		5ð 		5Ñ3Ñ,ˆX�w ¨eð
 #×8Ò8¸ÑEÔEˆGÝ)Ø�wÝ$ [°,Ñ?Ô?ñAô AˆEð �NŠN˜5 (¨GÑ4Ô4Ð4Ð4ð		5ð 8C×7SÒ7SØñ8 ô 8 ð 	5ð 	5Ñ3Ñ,ˆX�w ¨eà�NŠN˜5 (¨GÑ4Ô4Ð4Ð4Ø×ÒÑÔÐØÐr*   c                 óÆ  — |€t           }t          ¦   «         }t          j                             ¦   «         5 }t          d¦  «        D ]}|                     t          d¦  «        |dz   d¦  «         |                      ¦   «         }t          |¦  «        dk    r|c cddd¦  «         S |                      || |¦  «        ¦  «         Œ€t          |¬¦  «        ‚# 1 swxY w Y   dS )z<Make many conflict-resolution attempts, but die if they failNé
   zResolution passr   r   )rT  )rC  rY   rG  rH  rI  ÚrangeÚupdateÚgettextrÄ   Úlenr5   )r  r`   Ú	pass_funcÚnew_conflictsÚnrT  s         r(   rL  rL  |  s$  € àÐÝ!ˆ	Ý‘E”E€MÝ	Œ×	*Ò	*Ñ	,Ô	,ð 6°Ý�r‘”ð 	;ð 	;ˆAØ�IŠI•gÐ/Ñ0Ô0°!°a±%¸Ñ<Ô<Ð<Ø×-Ò-Ñ/Ô/ˆIÝ�9‰~Œ~ Ò"Ð"Ø$Ð$Ð$ð6ð 6ð 6ð 6ñ 6ô 6ð 6ð 6ð × Ò   ¨2¨yÑ!9Ô!9Ñ:Ô:Ð:Ð:Ý ¨9Ð5Ñ5Ô5Ð5ð6ð 6ð 6ð 6øøøð 6ð 6ð 6ð 6ð 6ð 6s   ¶A#CÂ&0CÃCÃCc              #   óD   K  — |                       |¦  «         |d||fV — d S )NzUnversioned existing file)r¡   )r  Ú	path_treeÚc_typeÚold_trans_idr#   s        r(   Úresolve_duplicate_idrž  ‹  s6   è è € Ø×Ò�lÑ#Ô#Ð#ØÐ.°¸hÐ
GÐGÐGÐGÐGÐGr*   c              #   ó  K  — |                       |¦  «        }|                      |¦  «        r||}}n||}}| j                             ¦   «         s„|                      |¦  «        dk    rk|                      |¦  «        dk    rRt          | ||¦  «         |                      |¦  «         |                      |¦  «         |                      |¦  «         d S |  	                    |¦  «        dz   }	|  
                    |	||¦  «         |d||fV — d S )Nr*  z.movedzMoved existing file to)rw   rÀ   rQ   Úhas_versioned_directoriesr´   r&  rœ   r¡   rï   r¾   r‹   )
r  r›  rœ  Úlast_trans_idr#   r†   rw   Úexisting_filerÆ   r  s
             r(   Úresolve_duplicater£  �  s   è è € à—?’? =Ñ1Ô1€LØ	‡‚�}Ñ%Ô%ð :Ø"*¨M�xˆˆà"/°�xˆØŒH×.Ò.Ñ0Ô0ð 
JØ�MŠM˜(Ñ#Ô# {Ò2Ð2Ø�MŠM˜-Ñ(Ô(¨KÒ7Ð7Ý$ R¨¸ÑAÔAÐAØ
×Ò˜=Ñ)Ô)Ð)Ø
×Ò˜-Ñ(Ô(Ð(Ø
×Ò˜=Ñ)Ô)Ð)Ð)Ð)à—=’= Ñ/Ô/°(Ñ:ˆØ
�Š�x ¨}Ñ=Ô=Ð=ØÐ/°ÀÐIÐIÐIÐIÐIÐIr*   c              #   ó8  K  — |                       |¦  «        s*|                      |¦  «        }|                       |¦  «        ¯*|d||                      |¦  «        fV — |                      |                      |¦  «        |                      |¦  «        |¦  «         d S )NzCancelled move)rÀ   rw   r‹   r¾   r™   )r  r›  rœ  Úcurs       r(   Úresolve_parent_loopr¦  ¤  s™   è è € à�oŠo˜cÑ"Ô"ð #Ø�oŠo˜cÑ"Ô"ˆð �oŠo˜cÑ"Ô"ð #àÐ# S¨"¯/ª/¸#Ñ*>Ô*>Ð
@Ð@Ð@Ð@Ø‡N‚N�2—=’= Ñ%Ô% r×'9Ò'9¸#Ñ'>Ô'>ÀÑDÔDÐDÐDÐDr*   c              #   ó  K  — || j         v rld}|                      |¦  «        }|r1d}|D ],}	 |                      ||¦  «         Œ# t          $ r d}Y  nw xY w|r|                      |¦  «         dd|fV — d S d S d}	 |                      |¦  «         nÚ# t          $ rÍ |�È|                      |¦  «        }|€|                      |¦  «        }t          | 
                    |                     |¦  «        g¬¦  «        ¦  «        \  }	}
|
j        €%d}t          | || j        ¦  «        }|D ]	}|d|fV — Œ
n6|                      |
j        ¦  «        }|                      |
j        ||¦  «         Y nw xY w|r|                      |¦  «         |d|fV — d S d S )NTFzdeleting parentzNot deleting)ri  zMoved to rootúCreated directory)rZ   Ú_get_potential_orphansrÐ   rö   rŸ   r¾   r    Úfinal_file_idÚinactive_file_idÚnextÚiter_entries_by_dirÚid2pathr�   r&  r$   rt  r‹   r†   rä   )r  r›  rœ  r#   rŸ   ÚorphansÚoÚcreater«   Ú_r1  Úmovedr  r‰  s                 r(   Úresolve_missing_parentr´  ¬  sP  è è € Ø�2Ô'Ð'Ð'ØˆØ×+Ò+¨HÑ5Ô5ˆØð 	Ø#ˆOàð ð �ð
Ø—M’M ! XÑ.Ô.Ð.Ð.øÝ%ð ð ð ð '+�OØ�E�Eðøøøð ð 	@à×Ò˜xÑ(Ô(Ð(Ø$ n°hÐ?Ð?Ð?Ð?Ð?Ð?ð	@ð 	@ð
 ˆð	-Ø�MŠM˜(Ñ#Ô#Ð#Ð#øÝð 	-ð 	-ð 	-ØÐ$Ø×*Ò*¨8Ñ4Ô4�Ø�?Ø ×1Ò1°(Ñ;Ô;�GÝ 	× =Ò =Ø$-×$5Ò$5°gÑ$>Ô$>Ð#?ð !>ñ !Aô !Añ Bô B‘��5ð ”?Ð*Ø"�FÝ8Ø˜H b¤gñ/ô /�Eà!&ð ?ð ?˜Ø% ¸Ð>Ð>Ð>Ð>Ð>ð?ð ')×&9Ò&9Øœñ')ô ')�Oà—N’N 5¤:¨Ø#+ñ-ô -ð -øøð%	-øøøð( ð 	:Ø×Ò Ñ)Ô)Ð)ØÐ.°Ð9Ð9Ð9Ð9Ð9Ð9ð	:ð 	:s$   ¬AÁAÁAÁ;B ÂCE(Å'E(c              #   óª   K  — |                       |¦  «        }|r|                     d¦  «        |k    rd S |                      ||¬¦  «         |d|fV — d S )Nr•   rj  zVersioned directory)r«  Úpath2idrª   )r  r›  rœ  r#   r«   s        r(   Úresolve_unversioned_parentr·  à  sn   è è € Ø×!Ò! (Ñ+Ô+€Gàð �Y×&Ò& rÑ*Ô*¨gÒ5Ð5àˆØ‡O‚O�H g€OÑ.Ô.Ð.ØÐ(¨(Ð
3Ð3Ð3Ð3Ð3Ð3r*   c              #   óR  K  — |                       |¦  «        }|                      |¦  «        }| j                             ¦   «         r|                      |¦  «        }nd}|                      |dz   ||¦  «        }t          | ||¦  «         |�|                      |¦  «         |d|fV — d S )Ns   DUMMYz.newr¨  )rw   r¾   rQ   Úsupports_setting_file_idsrª  rË   r&  r¡   )r  r›  rœ  r�   Úparent_parentÚparent_nameÚparent_file_idÚnew_parent_ids           r(   Úresolve_non_directory_parentr¾  ê  sÁ   è è € Ø—O’O IÑ.Ô.€MØ—-’- 	Ñ*Ô*€Kà	„x×)Ò)Ñ+Ô+ð "Ø×)Ò)¨)Ñ4Ô4ˆˆà!ˆØ×$Ò$ [°6Ñ%9Ø%2°NñDô D€Må   Y°Ñ>Ô>Ð>ØÐ!Ø
×Ò˜)Ñ$Ô$Ð$ØÐ&¨Ð
6Ð6Ð6Ð6Ð6Ð6r*   c                 ó0   — |                       |¦  «         g S r"   )r­   )r  r›  rœ  r#   s       r(   Úresolve_versioning_no_contentsrÀ  ú  s   € Ø×Ò˜Ñ"Ô"Ð"Ø€Ir*   )zduplicate idÚ	duplicatezparent loopzmissing parentzunversioned parentznon-directory parentzversioning no contentsc                 ó¬   — t          ¦   «         }|D ]B}t                               |d         ¦  «        }|€Œ%|                      || |g|¢R Ž ¦  «         ŒC|S )zÈResolve some classes of conflicts.

    :param tt: The transform to resolve conflicts in
    :param conflicts: The conflicts to resolve
    :param path_tree: A Tree to get supplemental paths from
    r   )rY   ÚCONFLICT_RESOLVERSr¶   r”  )r  rT  r›  r˜  r  Úresolvers         r(   rC  rC  
  so   € õ ‘E”E€MØð Að AˆÝ%×)Ò)¨(°1¬+Ñ6Ô6ˆØÐØØ×Ò˜X˜X b¨)Ð?°hÐ?Ð?Ð?Ñ@Ô@Ð@Ð@ØÐr*   c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú
_FileMoverz>Moves and deletes files for TreeTransform, tracking operationsc                 ó"   — g | _         g | _        d S r"   )Úpast_renamesÚpending_deletionsrc   s    r(   r)   z_FileMover.__init__  s   € ØˆÔØ!#ˆÔÐÐr*   c                 óP  — 	 t          j        ||¦  «         nr# t          $ re}|j        t          j        t          j        fv rt          |t          |¦  «        ¦  «        ‚t          ||t          |¦  «        |j        ¦  «        ‚d}~ww xY w| j	         
                    ||f¦  «         dS )z'Rename a file from one path to another.N)r—   ÚrenameÚOSErrorrB   ÚEEXISTÚ	ENOTEMPTYr   ra  r=   rÈ  rr  ©r&   Úfrom_ÚtoÚes       r(   rË  z_FileMover.rename!  s­   € ð	DÝŒI�e˜RÑ Ô Ð Ð øÝð 	Dð 	Dð 	DØŒw�5œ<­¬Ð9Ð9Ð9Ý  ¥S¨¡V¤VÑ,Ô,Ð,õ (¨¨rµ3°q±6´6¸1¼7ÑCÔCÐCøøøøð	Døøøð 	Ô× Ò  %¨ Ñ-Ô-Ð-Ð-Ð-s   ‚ ˜
B¢A BÂBc                 óf   — |                       ||¦  «         | j                             |¦  «         dS )zêRename a file out of the way and mark it for deletion.

        Unlike os.unlink, this works equally well for files and directories.
        :param from_: The current file path
        :param to: A temporary path for the file
        N)rË  rÉ  rr  )r&   rÐ  rÑ  s      r(   Ú
pre_deletez_FileMover.pre_delete-  s5   € ð 	�Š�E˜2ÑÔÐØÔ×%Ò% bÑ)Ô)Ð)Ð)Ð)r*   c           	      óî   — t          | j        ¦  «        D ]Q\  }}	 t          j        ||¦  «         Œ# t          $ r)}t          ||t          |¦  «        |j        ¦  «        ‚d}~ww xY wd| _        d| _        dS )z,Reverse all renames that have been performedN)	ÚreversedrÈ  r—   rË  rÌ  r=   ra  rB   rÉ  rÏ  s       r(   Úrollbackz_FileMover.rollback7  s”   € å! $Ô"3Ñ4Ô4ð 	Hð 	H‰IˆE�2ðHÝ”	˜"˜eÑ$Ô$Ð$Ð$øÝð Hð Hð HÝ+¨B°µs¸1±v´v¸q¼wÑGÔGÐGøøøøðHøøøð !ˆÔØ!%ˆÔÐÐs   ›1±
A$»$AÁA$c                 óT   — | j         D ]}t          |¦  «         Œd| _        d| _         dS )zApply all marked deletionsN)rÉ  r   rÈ  rp   s     r(   Úapply_deletionsz_FileMover.apply_deletionsB  s;   € àÔ*ð 	ð 	ˆDÝ�tÑÔÐÐà ˆÔØ!%ˆÔÐÐr*   N)	r,   r-   r.   rô   r)   rË  rÔ  r×  rÙ  r0   r*   r(   rÆ  rÆ    se   € € € € € ØHÐHð$ð $ð $ð
.ð 
.ð 
.ð*ð *ð *ð	&ð 	&ð 	&ð&ð &ð &ð &ð &r*   rÆ  c                 óð  — |                       ¦   «         5 }|                      |d¬¦  «        D ]œ}|j        rŒ
|j        dk    rŒ|j        d         |j        d         k    rŒ3|                     |j        d         ¦  «        }|                     |¦  «         |                     | 	                    |j        d         ¦  «        |¦  «         Œ�| 
                    ¦   «          ddd¦  «         dS # 1 swxY w Y   dS )zŸWhere possible, hard-link files in a tree to those in another tree.

    :param target_tree: Tree to change
    :param source_tree: Tree to hard-link from
    T)Úinclude_unchanged)r(  r(  r   r   N)r'   rÒ   rn  r›   rÈ   r“   rq   rœ   rë   Úabspathrc  )rE  Úsource_treer  rz  r#   s        r(   Ú	link_treerÞ  K  s?  € ð 
×	Ò	Ñ	 Ô	 ð  BØ!×.Ò.¨{ÈdÐ.ÑSÔSð 		Nð 		NˆFØÔ%ð ØØŒ{Ð.Ò.Ð.ØØÔ  Ô# vÔ'8¸Ô';Ò;Ð;ØØ×,Ò,¨V¬[¸¬^Ñ<Ô<ˆHØ×Ò˜xÑ(Ô(Ð(Ø×Ò˜{×2Ò2°6´;¸q´>ÑBÔBÀHÑMÔMÐMÐMØ
�Š‰
Œ
ˆ
ðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s   •C	C+Ã+C/Ã2C/c                   ó¶   — e Zd ZdZd„ Zd„ Zd„ Zed„ ¦   «         Zd„ Z	d„ Z
d„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zdd„Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚPreviewTreezPreview tree.c                 óZ   — || _         g | _        d | _        i | _        i | _        i | _        d S r"   )Ú
_transformÚ_parent_idsÚ_PreviewTree__by_parentÚ_path2trans_id_cacheÚ_all_children_cacheÚ_final_name_cacher  s     r(   r)   zPreviewTree.__init__b  s7   € Ø#ˆŒØˆÔØˆÔØ$&ˆÔ!Ø#%ˆÔ Ø!#ˆÔÐÐr*   c                 ó*   — t          | j        ¦  «        ‚r"   )rl   r¹  rc   s    r(   r¹  z%PreviewTree.supports_setting_file_idsj  s   € Ý! $Ô"@ÑAÔAÐAr*   c                 ó>   — | j         j                             ¦   «         S r"   )râ  rQ   Úsupports_symlinksrc   s    r(   rê  zPreviewTree.supports_symlinksm  s   € ØŒÔ$×6Ò6Ñ8Ô8Ð8r*   c                 óZ   — | j         €| j                             ¦   «         | _         | j         S r"   )rä  râ  r€   rc   s    r(   Ú
_by_parentzPreviewTree._by_parentp  s*   € àÔÐ#Ø#œ×8Ò8Ñ:Ô:ˆDÔØÔÐr*   c                 ó   — | j         S r"   ©rã  rc   s    r(   Úget_parent_idszPreviewTree.get_parent_idsv  s   € ØÔÐr*   c                 ó   — || _         d S r"   rî  )r&   Ú
parent_idss     r(   Úset_parent_idszPreviewTree.set_parent_idsy  s   € Ø%ˆÔÐÐr*   c                 ó@   — | j         j                             |¦  «        S r"   )râ  rQ   Úget_revision_tree©r&   r§   s     r(   rô  zPreviewTree.get_revision_tree|  s   € ØŒÔ$×6Ò6°{ÑCÔCÐCr*   c                 ó   — dS ©NFr0   rc   s    r(   Ú	is_lockedzPreviewTree.is_locked  s   € Øˆur*   c                 ó4   — t          j        | j        ¦  «        S r"   )r   ÚLogicalLockResultÚunlockrc   s    r(   r]  zPreviewTree.lock_read‚  s   € åÔ% d¤kÑ2Ô2Ð2r*   c                 ó   — d S r"   r0   rc   s    r(   rû  zPreviewTree.unlock†  s   € Øˆr*   c                 ó˜  — | j                              |t          ¦  «        }|t          ur|S t          j        |¦  «        }| j        j        }|D ]q}|                      |¦  «        D ]L}| j                             |¦  «        }|€$| j         	                    |¦  «        }|| j        |<   ||k    r|} nŒMd| j         |<    dS Œr|| j         |<   |S )z˜Look up the trans id associated with a path.

        :param path: path to look up, None when the path does not exist
        :return: trans_id
        N)
rå  r¶   rK   r   r   râ  r$   Ú_all_childrenrç  r¾   )r&   rq   r#   ÚsegmentsÚ
cur_parentÚcur_segmentr  r¾   s           r(   Ú_path2trans_idzPreviewTree._path2trans_id‰  sú   € ð Ô,×0Ò0°µvÑ>Ô>ˆØ�6Ð!Ð!ØˆOÝÔ$ TÑ*Ô*ˆØ”_Ô)ˆ
Ø#ð 	ð 	ˆKØ×+Ò+¨JÑ7Ô7ð 
ð 
�Ø!Ô3×7Ò7¸Ñ>Ô>�
ØÐ%Ø!%¤×!;Ò!;¸EÑ!BÔ!B�JØ4>�DÔ*¨5Ñ1Ø Ò,Ð,Ø!&�JØ�Eð -ð 37�Ô)¨$Ñ/Ø�t�tð ð +5ˆÔ! $Ñ'ØÐr*   c                 ó>  — | j                              |¦  «        }|�|S t          | j                             |¦  «        ¦  «        }|                     | j        j        ¦  «         |                     | j                             |g ¦  «        ¦  «         || j         |<   |S r"   )	ræ  r¶   rY   râ  rm   Údifference_updaterW   r”  rì  )r&   r#   Úchildrens      r(   rþ  zPreviewTree._all_children¤  s�   € ØÔ+×/Ò/°Ñ9Ô9ˆØÐØˆOÝ�t”×9Ò9¸(ÑCÔCÑDÔDˆà×"Ò" 4¤?Ô#>Ñ?Ô?Ð?Ø�Š˜œ×+Ò+¨H°bÑ9Ô9Ñ:Ô:Ð:Ø-5ˆÔ  Ñ*Øˆr*   c                 ó0   — |                       |¦  «        d fS r"   )r,  rp   s     r(   Úget_file_with_statzPreviewTree.get_file_with_stat¯  s   € Ø�}Š}˜TÑ"Ô" DÐ(Ð(r*   c                 ó2  — |                       |¦  «        }|€dS 	 | j        j        |         S # t          $ r_ 	 | j        j                             |¦  «        cY S # t          $ r"}|j        t          j        k    rY d }~Y dS ‚ d }~wt          $ r Y Y dS w xY ww xY wr÷  )
r  râ  r[   r»   rQ   r-  rÌ  rB   ÚENOENTr   )r&   rq   r#   rÒ  s       r(   r-  zPreviewTree.is_executable²  sÏ   € Ø×&Ò& tÑ,Ô,ˆØÐØ�5ð
	Ø”?Ô5°hÔ?Ð?øÝð 	ð 	ð 	ðØ”Ô,×:Ò:¸4Ñ@Ô@Ð@Ð@Ð@øÝð ð ð Ø”7�eœlÒ*Ð*Ø ˜5˜5˜5˜5˜5˜5ØøøøøÝð ð ð Ø�u�u�uðøøøð	øøøsD   ›- ­
B¸AÁBÁ
BÁ#B Á8BÁ?B Â BÂBÂBÂBc                 óª   — |                       |¦  «        }|| j        j        v rdS || j        j        v rdS | j        j                             |¦  «        S )NTF)r  râ  rX   rZ   rQ   Úhas_filenamerì   s      r(   r  zPreviewTree.has_filenameÂ  sX   € Ø×&Ò& tÑ,Ô,ˆØ�t”Ô4Ð4Ð4Ø�4Ø˜œÔ:Ð:Ð:Ø�5à”?Ô(×5Ò5°dÑ;Ô;Ð;r*   Nc                 ód  — |                       |¦  «        }|€t          |¦  «        ‚| j        j                             |¦  «        }|€| j        j                             |¦  «        S |dk    rC|                      |¦  «        5 }t          j	        |¦  «        cd d d ¦  «         S # 1 swxY w Y   d S d S )Nr(  )
r  r   râ  rX   r¶   rQ   ro  r,  r   r   ©r&   rq   Ú
stat_valuer#   r›   Úfileobjs         r(   ro  zPreviewTree.get_file_sha1Ë  sð   € Ø×&Ò& tÑ,Ô,ˆØÐÝ˜TÑ"Ô"Ð"ØŒÔ,×0Ò0°Ñ:Ô:ˆØˆ<Ø”?Ô(×6Ò6°tÑ<Ô<Ð<Ø�6Š>ˆ>Ø—’˜tÑ$Ô$ð 1¨ÝÔ'¨Ñ0Ô0ð1ð 1ð 1ð 1ñ 1ô 1ð 1ð 1ð 1ð 1ð 1ð 1øøøð 1ð 1ð 1ð 1ð 1ð 1ð ˆ>s   ÂB#Â#B'Â*B'c                 óh  — |                       |¦  «        }|€t          |¦  «        ‚| j        j                             |¦  «        }|€| j        j                             |¦  «        S |dk    rE|                      |¦  «        5 }dt          j	        |¦  «        fcd d d ¦  «         S # 1 swxY w Y   d S d S )Nr(  ÚSHA1)
r  r   râ  rX   r¶   rQ   Úget_file_verifierr,  r   r   r  s         r(   r  zPreviewTree.get_file_verifierÖ  sõ   € Ø×&Ò& tÑ,Ô,ˆØÐÝ˜TÑ"Ô"Ð"ØŒÔ,×0Ò0°Ñ:Ô:ˆØˆ<Ø”?Ô(×:Ò:¸4Ñ@Ô@Ð@Ø�6Š>ˆ>Ø—’˜tÑ$Ô$ð ;¨Ø¥Ô 0°Ñ 9Ô 9Ð:ð;ð ;ð ;ð ;ñ ;ô ;ð ;ð ;ð ;ð ;ð ;ð ;øøøð ;ð ;ð ;ð ;ð ;ð ;ð ˆ>s   ÂB%Â%B)Â,B)c                 ó‚   — |                       |¦  «        }|€t          |¦  «        ‚| j                             |¦  «        S r"   )r  r   râ  r´   rì   s      r(   r›   zPreviewTree.kindá  s?   € Ø×&Ò& tÑ,Ô,ˆØÐÝ˜TÑ"Ô"Ð"ØŒ×)Ò)¨(Ñ3Ô3Ð3r*   c                 óÒ   — |                       |¦  «        }|€t          |¦  «        ‚	 | j        j        |         S # t          $ r" | j        j                             |¦  «        cY S w xY wr"   )r  r   râ  rX   r»   rQ   Ústored_kindrì   s      r(   r  zPreviewTree.stored_kindç  sx   € Ø×&Ò& tÑ,Ô,ˆØÐÝ˜TÑ"Ô"Ð"ð	;Ø”?Ô0°Ô:Ð:øÝð 	;ð 	;ð 	;Ø”?Ô(×4Ò4°TÑ:Ô:Ð:Ð:Ð:ð	;øøøs   ¨: º)A&Á%A&c                 ól   — t          | j        j        dd ¦  «        }|€| j        j        j        j        }|S )NÚ_repository)rq  râ  rQ   r×   Ú
repository)r&   Úrepos     r(   Ú_get_repositoryzPreviewTree._get_repositoryð  s2   € Ý�t”Ô,¨m¸TÑBÔBˆØˆ<Ø”?Ô(Ô/Ô:ˆDØˆr*   c              #   óä   K  — |                       ¦   «         D ]X}	 |                      |¦  «        V — Œ# t          j        $ r, |                      ¦   «                              |¦  «        V — Y ŒUw xY wd S r"   )rï  Úrevision_treer	   ÚNoSuchRevisionInTreer  rõ  s     r(   Ú_iter_parent_treeszPreviewTree._iter_parent_treesö  s    è è € Ø×.Ò.Ñ0Ô0ð 	Hð 	HˆKðHØ×(Ò(¨Ñ5Ô5Ð5Ð5Ð5Ð5øÝÔ.ð Hð Hð HØ×*Ò*Ñ,Ô,×:Ò:¸;ÑGÔGÐGÐGÐGÐGÐGðHøøøð	Hð 	Hs   š2²8A-Á,A-c                 óV  — |                       |¦  «        }|€t          |¦  «        ‚| j                             |¦  «        }|dk    rdS || j        j        v r|                      |¦  «        j        S |                      |¦  «        dk    r| j        j         	                    |¦  «        S dS )zSee Tree.get_file_sizeNr(  )
r  r   râ  r´   rX   Ú_stat_limbo_fileÚst_sizer›   rQ   Úget_file_size)r&   rq   r#   r›   s       r(   r"  zPreviewTree.get_file_sizeý  s¦   € à×&Ò& tÑ,Ô,ˆØÐÝ˜TÑ"Ô"Ð"ØŒ×)Ò)¨(Ñ3Ô3ˆØ�6Š>ˆ>Ø�4Ø�t”Ô4Ð4Ð4Ø×(Ò(¨Ñ2Ô2Ô:Ð:Ø�9Š9�T‰?Œ?˜fÒ$Ð$Ø”?Ô(×6Ò6°tÑ<Ô<Ð<à�4r*   c                 óÒ   — |                       |¦  «        }|€t          |¦  «        ‚| j        j                             |¦  «        }|€| j        j                             |¦  «        S |S r"   )r  r   râ  r\   r¶   rQ   r8  )r&   rq   r#   ré   s       r(   r8  z"PreviewTree.get_reference_revision  sg   € Ø×&Ò& tÑ,Ô,ˆØÐÝ˜TÑ"Ô"Ð"Ø!œ_ÔD×HÒHÈÑRÔRÐØÐ%Ø”?Ô(×?Ò?ÀÑEÔEÐEØ!Ð!r*   c                 ó’   — | j                              |¦  «        }|€d S | j                             |¦  «        d         }|dk    rd }|S )Nr   Úmissing)rU   r¶   rQ   Úpath_content_summary)r&   r#   rq   r›   s       r(   rt   zPreviewTree.tree_kind  sQ   € ØÔ"×&Ò& xÑ0Ô0ˆØˆ<Ø�4ØŒz×.Ò.¨tÑ4Ô4°QÔ7ˆØ�9ÒÐØˆDØˆr*   r"   )r,   r-   r.   rô   r)   r¹  rê  Úpropertyrì  rï  rò  rô  rø  r]  rû  r  rþ  r  r-  r  ro  r  r›   r  r  r  r"  r8  rt   r0   r*   r(   rà  rà  _  s¡  € € € € € ØÐð$ð $ð $ðBð Bð Bð9ð 9ð 9ð ð ð  ñ „Xð ð
 ð  ð  ð&ð &ð &ðDð Dð Dðð ð ð3ð 3ð 3ðð ð ðð ð ð6	ð 	ð 	ð)ð )ð )ðð ð ð <ð <ð <ð	1ð 	1ð 	1ð 	1ð	;ð 	;ð 	;ð 	;ð4ð 4ð 4ð;ð ;ð ;ðð ð ðHð Hð Hðð ð ð"ð "ð "ðð ð ð ð r*   rà  ró   )NFNNNNr"   )VrZ  r—   rB   Ústatr   r   ÚtimeÚtypingr   r•   r   Ú_mod_configr   r	   r
   r   r   r   r   Úglobalsr   r   r   r=  r   r   Úmutabletreer   r   r   r   r   r   Úprogressr   Ú	transportr   r   r_   r   r   r–   r    r2   r5   r7   r9   r=   rG   rI   rO   rö   rû   r	  r  ÚRegistryra  r�  Úorphaning_registryÚregisterÚ_set_default_keyÚRegistryOptionÚopt_transform_orphanr  r  r$  r&  r3  r>  r@  rU  rg  rK  rL  rž  r£  r¦  r´  r·  r¾  rÀ  rÃ  rC  rÆ  rÞ  rà  r0   r*   r(   ú<module>r6     sœ  ðð" Ð Ð Ð Ø 	€	€	€	Ø €€€Ø !Ð !Ð !Ð !Ð !Ð !Ð !Ð !Ø €€€Ø Ð Ð Ð Ð Ð ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð €Ô ˜˜™	œ	ð $ñ ô ð ð1ð 1ð 1ð 1ð 1ð 1ð 1ð 1ð 1ð 1à @Ð @Ð @Ð @Ð @Ð @Ð @Ð @Ø $Ð $Ð $Ð $Ð $Ð $ðð ð ð ð ð ð ð ð ð ð ð ð ð ð $Ð #Ð #Ð #Ð #Ð #Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -ðð ð ð ð ð ð ð ð €ð,ð ,ð ,ð ,ð ,�(ñ ,ô ,ð ,ðIð Ið Ið Ið I�xñ Iô Ið Ið
7ð 7ð 7ð 7ð 7Ð)ñ 7ô 7ð 7ð
Eð Eð Eð Eð E�8ñ Eô Eð Eð
#ð #ð #ð #ð #�Hñ #ô #ð #ðð ð ð ð ˜Hñ ô ð ðð ð ð)ð )ð )ð )ð )ñ )ô )ð )ðU7ð U7ð U7ð U7ð U7ñ U7ô U7ð U7ðp	ð 	ð 	ð 	ð 	�V”_ñ 	ô 	ð 	ðð ð ð ð ˜ñ ô ð ðOð Oð Oð4&ð &ð &ð [�XÔ& s¨H°mÀUÈEÐ5RÐTXÐ5XÔ,YÐ'YÔZÑ\Ô\Ð Ø × Ò Ø�ØDñFô Fð Fð × Ò Ø
ˆKØ2ñ4ô 4ð 4ð × #Ò # JÑ /Ô /Ð /ð 2�{Ô1ØÐ1Ø	AØðñ ô Ð ð'ð 'ð 'ð:ð :ð :ð :ð :ñ :ô :ð :ð@@ð @ð @ð
!ð !ð !ð2ð 2ð 2ð, 7;Ø&*ð!7ð !7ð !7ð !7ðH9ð 9ð 9ð 7;Ø-1ð%ð %ð %ð %ð  ?DØJNðð ð ð ð2 6:ðBð Bð Bð BðJ6ð 6ð 6ð 6ðHð Hð Hð
Jð Jð Jð(Eð Eð Eð1:ð 1:ð 1:ðh4ð 4ð 4ð7ð 7ð 7ð ð ð ð )Ø"Ø&Ø,Ø4Ø8Ø<ðð Ð ðð ð ð ð .&ð .&ð .&ð .&ð .&ñ .&ô .&ð .&ðbð ð ð(}ð }ð }ð }ð }ñ }ô }ð }ð }ð }r*   