§
    cÌcÛ–  ã                   óæ  — d Z dZddlmZmZmZmZmZmZm	Z	m
Z
 ddlmZmZmZmZmZ ddlmZ  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¦  «        Z G d„ d¦  «        Z G d„ dee         ¦  «        Z	 d%dededee         ded eeee         f         f
d!„Z d%d"„Z!d#„ Z"d$S )&z7Tree classes, representing directory at point in time.
Úgoogleé    )ÚListÚTypeÚTYPE_CHECKINGÚOptionalÚIteratorÚDictÚUnionÚcasté   )ÚerrorsÚlockÚosutilsÚrevisionÚtrace)ÚInterObjectc                   ó   — e Zd ZdZdZd„ ZdS )ÚFileTimestampUnavailablez,The filestamp for %(path)s is not available.Tc                 ó   — || _         d S ©N©Úpath©Úselfr   s     ú-/usr/lib/python3/dist-packages/breezy/tree.pyÚ__init__z!FileTimestampUnavailable.__init__(   ó   € ØˆŒ	ˆ	ˆ	ó    N)Ú__name__Ú
__module__Ú__qualname__Ú_fmtÚinternal_errorr   © r   r   r   r   "   s-   € € € € € à9€Dà€Nðð ð ð ð r   r   c                   ó   — e Zd ZdZd„ ZdS )ÚMissingNestedTreez1The nested tree for %(path)s can not be resolved.c                 ó   — || _         d S r   r   r   s     r   r   zMissingNestedTree.__init__0   r   r   N)r   r    r!   r"   r   r$   r   r   r&   r&   ,   s(   € € € € € à@€Dðð ð ð ð r   r&   c                   óJ   — e Zd ZU dZg Zee         ed<   d„ Zeed<   d„ Z	d„ Z
dS )Ú	TreeEntryzEAn entry that implements the minimum interface used by commands.
    Ú	__slots__c                 óL   — t          |t          ¦  «        o|j        | j        k    S r   )Ú
isinstancer)   Ú	__class__©r   Úothers     r   Ú__eq__zTreeEntry.__eq__:   s%   € å˜5¥)Ñ,Ô,ð 6Ø”O t¤~Ò5ð	7r   Úkindc                 ó   — dS )Nz???r$   ©r   s    r   Úkind_characterzTreeEntry.kind_characterA   ó   € Øˆur   c                 ó   — dS )z·Does this entry reference the same entry?

        This is mostly the same as __eq__, but returns False
        for entries without enough information (i.e. revision is None)
        Fr$   r.   s     r   Úis_unmodifiedzTreeEntry.is_unmodifiedD   s	   € ð ˆur   N)r   r    r!   Ú__doc__r*   r   ÚstrÚ__annotations__r0   r4   r7   r$   r   r   r)   r)   4   sn   € € € € € € ðð ð €Iˆt�CŒyÐÐÑð7ð 7ð 7ð
 €I€I�Iðð ð ðð ð ð ð r   r)   c                   ó8   — e Zd ZU dZg Zee         ed<   dZd„ Z	dS )ÚTreeDirectoryz5See TreeEntry. This is a directory in a working tree.r*   Ú	directoryc                 ó   — dS )Nú/r$   r3   s    r   r4   zTreeDirectory.kind_characterT   ó   € Øˆsr   N©
r   r    r!   r8   r*   r   r9   r:   r1   r4   r$   r   r   r<   r<   M   sD   € € € € € € Ø?Ð?à€Iˆt�CŒyÐÐÑà€Dðð ð ð ð r   r<   c                   ó8   — e Zd ZU dZg Zee         ed<   dZd„ Z	dS )ÚTreeFilez8See TreeEntry. This is a regular file in a working tree.r*   Úfilec                 ó   — dS ©NÚ r$   r3   s    r   r4   zTreeFile.kind_character_   ó   € Øˆrr   NrA   r$   r   r   rC   rC   X   sD   € € € € € € ØBÐBà€Iˆt�CŒyÐÐÑà€Dðð ð ð ð r   rC   c                   ó8   — e Zd ZU dZg Zee         ed<   dZd„ Z	dS )ÚTreeLinkz3See TreeEntry. This is a symlink in a working tree.r*   Úsymlinkc                 ó   — dS rF   r$   r3   s    r   r4   zTreeLink.kind_characterj   rH   r   NrA   r$   r   r   rJ   rJ   c   sD   € € € € € € Ø=Ð=à€Iˆt�CŒyÐÐÑà€Dðð ð ð ð r   rJ   c                   ó8   — e Zd ZU dZg Zee         ed<   dZd„ Z	dS )ÚTreeReferencezFSee TreeEntry. This is a reference to a nested tree in a working tree.r*   útree-referencec                 ó   — dS )Nú+r$   r3   s    r   r4   zTreeReference.kind_characteru   r@   r   NrA   r$   r   r   rN   rN   n   sD   € € € € € € ØPÐPà€Iˆt�CŒyÐÐÑà€Dðð ð ð ð r   rN   c                   ód   — e Zd ZdZg d¢Z	 dd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
ed
„ ¦   «         Zd„ Zd„ ZdS )Ú
TreeChangezCDescribes the changes between the same item in two different trees.©r   Úchanged_contentÚ	versionedÚnamer1   Ú
executableÚcopiedFc                 óh   — || _         || _        || _        || _        || _        || _        || _        d S r   rT   )r   r   rU   rV   rW   r1   rX   rY   s           r   r   zTreeChange.__init__   s8   € àˆŒ	Ø.ˆÔØ"ˆŒØˆŒ	ØˆŒ	Ø$ˆŒØˆŒˆˆr   c                 óf   — d                      | j        j        |                      ¦   «         ¦  «        S )Nz{}{!r})Úformatr-   r   Ú	_as_tupler3   s    r   Ú__repr__zTreeChange.__repr__‰   s%   € Ø�Š˜tœ~Ô6¸¿ºÑ8HÔ8HÑIÔIÐIr   c                 óZ   — | j         | j        | j        | j        | j        | j        | j        fS r   rT   r3   s    r   r]   zTreeChange._as_tupleŒ   s-   € Ø”	˜4Ô/°´Ø”	˜4œ9 d¤o°t´{ðDð 	Dr   c                 óÞ   — t          |t          ¦  «        r*|                      ¦   «         |                     ¦   «         k    S t          |t          ¦  «        r|                      ¦   «         |k    S dS ©NF)r,   rS   r]   Útupler.   s     r   r0   zTreeChange.__eq__�   s_   € Ý�e�ZÑ(Ô(ð 	9Ø—>’>Ñ#Ô# u§¢Ñ'8Ô'8Ò8Ð8Ý�e�UÑ#Ô#ð 	-Ø—>’>Ñ#Ô# uÒ,Ð,Øˆur   c                 óV   — |                       ¦   «         |                      ¦   «         k     S r   )r]   r.   s     r   Ú__lt__zTreeChange.__lt__—   s!   € Ø�~Š~ÑÔ %§/¢/Ñ"3Ô"3Ò3Ð3r   c                 óT   — | j         dk    r| j        d         | j        d         k    S dS )N)TTr   r   F)rV   rX   r3   s    r   Úmeta_modifiedzTreeChange.meta_modifiedš   s-   € ØŒ>˜\Ò)Ð)Ø”O AÔ&¨$¬/¸!Ô*<Ò<Ð=Øˆur   c                 ó\   — | j          o$d | j        vo| j        d         | j        d         k    S ©Nr   r   )rY   rW   r   r3   s    r   ÚrenamedzTreeChange.renamedŸ   s8   € ð ”ˆOð )Ø˜œ	Ð!ð)àŒI�aŒL˜DœI aœLÒ(ð	*r   c                 ó‚   — t          j        | j        d         ¦  «        t          j        | j        d         ¦  «        k    S rh   )r   Údirnamer   r3   s    r   Úis_reparentedzTreeChange.is_reparented¦   s-   € ÝŒ˜tœy¨œ|Ñ,Ô,µ´ÀÄ	È!ÄÑ0MÔ0MÒMÐMr   c           	      óÆ   — |                       | j        d         d f| j        | j        d         d f| j        d         d f| j        d         d f| j        d         d fd¬¦  «        S )Nr   F)rY   )r-   r   rU   rV   rW   r1   rX   r3   s    r   Údiscard_newzTreeChange.discard_new©   sl   € Ø�~Š~ØŒY�qŒ\˜4Ð  $Ô"6ØŒ^˜AÔ Ð%ØŒY�qŒ\˜4Ð  4¤9¨Q¤<°Ð"6ØŒ_˜QÔ Ð&Øð ñ ô ð 	r   N)F)r   r    r!   r8   r*   r   r^   r]   r0   rd   rf   Úpropertyri   rl   rn   r$   r   r   rS   rS   y   sÑ   € € € € € ØMÐMð9ð 9ð 9€Ið 16ðð ð ð ðJð Jð JðDð Dð Dðð ð ð4ð 4ð 4ðð ð ð
 ð*ð *ñ „Xð*ðNð Nð Nðð ð ð ð r   rS   c                   ó\  — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Ze	d„ ¦   «         Z
	 	 	 dDd
„Z	 	 	 dEd„Zd„ Zd„ Zd„ Zd„ Zd„ Zdee         fd„Z	 	 dFdeee                  defd„Zd„ Z	 	 dGd„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&dHd%„Z'dHd&„Z(d'„ Z)d(„ Z*d)„ Z+d*„ Z,d+„ Z-e.j/        fd,„Z0d-edefd.„Z1g dfd/„Z2d0„ Z3d1„ Z4dee         fd2„Z5d3„ Z6d4„ Z7dId6„Z8d7„ Z9dHd8„Z:d9„ Z;	 	 dJd:„Z<d;„ Z=	 	 	 	 dKd<ed=ed>ed?ee         d@ee>e?e@f                  dedeeA         fdA„ZBeCdB„ ¦   «         ZDdHdC„ZEd	S )LÚTreea+  Abstract file tree.

    There are several subclasses:

    * `WorkingTree` exists as files on disk editable by the user.

    * `RevisionTree` is a tree as recorded at some point in the past.

    Trees can be compared, etc, regardless of whether they are working
    trees or versioned trees.
    c                 ó   — dS )zŽWhether this tree supports rename tracking.

        This defaults to True, but some implementations may want to override
        it.
        Tr$   r3   s    r   Úsupports_rename_trackingzTree.supports_rename_tracking¿   ó	   € ð ˆtr   c                 ó   — dS )z¢Whether this tree can contain explicitly versioned directories.

        This defaults to True, but some implementations may want to override
        it.
        Tr$   r3   s    r   Úhas_versioned_directorieszTree.has_versioned_directoriesÇ   rt   r   c                 ó*   — t          | j        ¦  «        ‚r   )ÚNotImplementedErrorÚsupports_tree_referencer3   s    r   ry   zTree.supports_tree_referenceÏ   s   € Ý! $Ô">Ñ?Ô?Ð?r   c                 ó   — dS )z/Does this tree support symbolic links?
        Tr$   r3   s    r   Úsupports_symlinkszTree.supports_symlinksÒ   s	   € ð ˆtr   c                 ó   — dS )z2Is the specified path special to the VCS.
        Fr$   r   s     r   Úis_special_pathzTree.is_special_path×   s	   € ð ˆur   c                 ó*   — t          | j        ¦  «        ‚)z)Does this tree support file ids?
        )rx   Úsupports_file_idsr3   s    r   r   zTree.supports_file_idsÜ   s   € õ " $Ô"8Ñ9Ô9Ð9r   FNc                 ój   — t                                || ¦  «                             ||||||¬¦  «        S )a
  Return a TreeDelta of the changes from other to this tree.

        Args:
          other: A tree to compare with.
          specific_files: An optional list of file paths to restrict the
            comparison to. When mapping filenames to ids, all matches in all
            trees (including optional extra_trees) are used, and all children of
            matched directories are included.
          want_unchanged: An optional boolean requesting the inclusion of
            unchanged entries in the result.
          extra_trees: An optional list of additional trees to use when
            mapping the contents of specific_files (paths) to their identities.
          require_versioned: An optional boolean (defaults to False). When
            supplied and True all the 'specific_files' must be versioned, or
            a PathsNotVersionedError will be thrown.
          want_unversioned: Scan for unversioned paths.

        The comparison will be performed by an InterTree object looked up on
        self and other.
        )Úwant_unchangedÚspecific_filesÚextra_treesÚrequire_versionedÚinclude_rootÚwant_unversioned)Ú	InterTreeÚgetÚcompare)r   r/   r�   r‚   rƒ   r„   r…   r†   s           r   Úchanges_fromzTree.changes_fromâ   sA   € õ4 �}Š}˜U DÑ)Ô)×1Ò1Ø)Ø)Ø#Ø/Ø%Ø-ð 2ñ ô ð 	r   Tc                 ón   — t                                || ¦  «        }|                     ||||||¬¦  «        S )zSee InterTree.iter_changes)r†   )r‡   rˆ   Úiter_changes)	r   Ú	from_treeÚinclude_unchangedr‚   Úpbrƒ   r„   r†   Ú	intertrees	            r   rŒ   zTree.iter_changes  sG   € õ —M’M )¨TÑ2Ô2ˆ	Ø×%Ò%Ð&7¸ÈØ&1Ð3DØ7Gð &ñ Iô Ið 	Ir   c                 ó6   — ddl m} |                     ¦   «         S )zuGet a list of the conflicts in the tree.

        Each conflict is an instance of breezy.conflicts.Conflict.
        r   )Ú	conflicts)rG   r’   ÚConflictList)r   Ú_mod_conflictss     r   r’   zTree.conflicts  s(   € ð
 	2Ð1Ð1Ð1Ð1Ð1Ø×*Ò*Ñ,Ô,Ð,r   c                 ó   — g S )zAFor trees that can have unversioned files, return all such paths.r$   r3   s    r   ÚextraszTree.extras  s   € àˆ	r   c                 ó*   — t          | j        ¦  «        ‚)zÏGet the parent ids for this tree.

        Returns: a list of parent ids. [] is returned to indicate
        a tree with no parents.
        Raises:
          BzrError: if the parents are not known.
        )rx   Úget_parent_idsr3   s    r   r˜   zTree.get_parent_ids  s   € õ " $Ô"5Ñ6Ô6Ð6r   c                 ó*   — t          | j        ¦  «        ‚)z$True if the tree has given filename.)rx   Úhas_filename©r   Úfilenames     r   rš   zTree.has_filename$  s   € å! $Ô"3Ñ4Ô4Ð4r   c                 ó   — dS )z¸Check whether the filename is ignored by this tree.

        Args:
          filename: The relative filename within the tree.
        Returns: True if the filename is ignored.
        Fr$   r›   s     r   Ú
is_ignoredzTree.is_ignored(  s	   € ð ˆur   Úreturnc                 ó*   — t          | j        ¦  «        ‚)z=Iterate through all paths, including paths for missing files.)rx   Úall_versioned_pathsr3   s    r   r¡   zTree.all_versioned_paths1  s   € å! $Ô":Ñ;Ô;Ð;r   r‚   Úrecurse_nestedc                 ó*   — t          | j        ¦  «        ‚)aJ  Walk the tree in 'by_dir' order.

        This will yield each entry in the tree as a (path, entry) tuple.
        The order that they are yielded is:

        Directories are walked in a depth-first lexicographical order,
        however, whenever a directory is reached, all of its direct child
        nodes are yielded in  lexicographical order before yielding the
        grandchildren.

        For example, in the tree::

           a/
             b/
               c
             d/
               e
           f/
             g

        The yield order (ignoring root) would be::

          a, f, a/b, a/d, a/b/c, a/d/e, f/g

        If recurse_nested is enabled then nested trees are included as if
        they were a part of the tree. If is disabled then TreeReference
        objects (without any children) are yielded.
        )rx   Úiter_entries_by_dir)r   r‚   r¢   s      r   r¤   zTree.iter_entries_by_dir5  s   € õ< " $Ô":Ñ;Ô;Ð;r   c                 ó*   — t          | j        ¦  «        ‚)zôIterate over the children of a directory or tree reference.

        Args:
          path: Path of the directory
        Raises:
          NoSuchFile: When the path does not exist
        Returns: Iterator over entries in the directory
        )rx   Úiter_child_entriesr   s     r   r¦   zTree.iter_child_entriesU  s   € õ " $Ô"9Ñ:Ô:Ð:r   c                 ó*   — t          | j        ¦  «        ‚)au  List all files in this tree.

        Args:
          include_root: Whether to include the entry for the tree root
          from_dir: Directory under which to list files
          recursive: Whether to list files recursively
          recurse_nested: enter nested trees
        Returns: iterator over tuples of
            (path, versioned, kind, inventory entry)
        )rx   Ú
list_files)r   r…   Úfrom_dirÚ	recursiver¢   s        r   r¨   zTree.list_files`  s   € õ " $¤/Ñ2Ô2Ð2r   c              #   óˆ   K  — |                       ¦   «         r)|                      ¦   «         D ]\  }}|j        dk    r|V — Œd S d S )NrO   )ry   r¤   r1   )r   r   Úentrys      r   Úiter_referenceszTree.iter_referencesn  se   è è € Ø×'Ò'Ñ)Ô)ð 	Ø#×7Ò7Ñ9Ô9ð ð ‘��eØ”:Ð!1Ò1Ð1Ø�J�J�Jøð	ð 	ðð r   c                 óÈ   — |                       ¦   «         D ]L}|dz  }|                     |¦  «        r0|                      |¦  «        }||t          |¦  «        d…         fc S ŒMdS )z~Find the nested tree that contains a path.

        Returns: tuple with (nested tree and path inside the nested tree)
        r?   N©NN)r­   Ú
startswithÚget_nested_treeÚlen)r   r   Únested_pathÚnested_trees       r   Úget_containing_nested_treezTree.get_containing_nested_treet  s€   € ð
  ×/Ò/Ñ1Ô1ð 	ð 	ˆKØ˜3ÑˆKØ�Š˜{Ñ+Ô+ð <Ø"×2Ò2°;Ñ?Ô?�Ø" D­¨[Ñ)9Ô)9Ð):Ð):Ô$;Ð;Ð;Ð;Ð;ð<ð �:r   c                 ó*   — t          | j        ¦  «        ‚)a  Open the nested tree at the specified path.

        Args:
          path: Path from which to resolve tree reference.
        Returns: A Tree object for the nested tree
        Raises:
          MissingNestedTree: If the nested tree can not be resolved
        )rx   r±   r   s     r   r±   zTree.get_nested_tree�  s   € õ " $Ô"6Ñ7Ô7Ð7r   c                 ó:   — t          d| j        j        z  ¦  «        ‚)Nz$Tree subclass %s must implement kind©rx   r-   r   r   s     r   r1   z	Tree.kindŒ  s$   € Ý!Ð"HØ$(¤NÔ$;ñ#<ñ =ô =ð 	=r   c                 ó,   — |                       |¦  «        S )z´File kind stored for this path.

        May not match kind on disk for working trees.  Always available
        for versioned files, even when the file itself is missing.
        )r1   r   s     r   Ústored_kindzTree.stored_kind�  s   € ð �yŠy˜‰ŒÐr   c                 ó*   — t          | j        ¦  «        ‚)aë  Get a summary of the information about path.

        All the attributes returned are for the canonical form, not the
        convenient form (if content filters are in use.)

        Args:
          path: A relative path within the tree.
        Returns: A tuple containing kind, size, exec, sha1-or-link.
            Kind is always present (see tree.kind()).
            size is present if kind is file and the size of the
                canonical form can be cheaply determined, None otherwise.
            exec is None unless kind is file and the platform supports the 'x'
                bit.
            sha1-or-link is the link target if kind is symlink, or the sha1 if
                it can be obtained without reading the file.
        )rx   Úpath_content_summaryr   s     r   r¼   zTree.path_content_summary˜  s   € õ" " $Ô";Ñ<Ô<Ð<r   c                 ó:   — t          d| j        j        z  ¦  «        ‚)Nz6Tree subclass %s must implement get_reference_revisionr¸   r   s     r   Úget_reference_revisionzTree.get_reference_revision«  s&   € Ý!ð #;à$(¤NÔ$;ñ#<ñ =ô =ð 	=r   c                 ó*   — t          | j        ¦  «        ‚)a@  Return a tuple of kind, executable, stat_value for a file.

        entry may be None if there is no inventory entry for the file, but
        path must always be supplied.

        kind is None if there is no file present (even if an inventory id is
        present).  executable is False for non-file entries.
        )rx   Ú_comparison_data)r   r¬   r   s      r   rÀ   zTree._comparison_data°  s   € õ " $Ô"7Ñ8Ô8Ð8r   c                 ó*   — t          | j        ¦  «        ‚)z<Return a file object for the file path in the tree.
        )rx   Úget_filer   s     r   rÂ   zTree.get_file»  s   € õ " $¤-Ñ0Ô0Ð0r   c                 ó0   — |                       |¦  «        dfS )a¯  Get a file handle and stat object for path.

        The default implementation returns (self.get_file, None) for backwards
        compatibility.

        Args:
          path: The path of the file.
        Returns: A tuple (file_handle, stat_value_or_None). If the tree has
            no stat facility, or need for a stat cache feedback during commit,
            it may return None for the second element of the tuple.
        N)rÂ   r   s     r   Úget_file_with_statzTree.get_file_with_statÀ  s   € ð —’˜dÑ#Ô# TÐ*Ð*r   c                 óˆ   — |                       |¦  «        5 }|                     ¦   «         cddd¦  «         S # 1 swxY w Y   dS )z›Return the byte content of a file.

        Args:
          path: The path of the file.

        Returns: A single byte string for the whole file.
        N)rÂ   Úread)r   r   Úmy_files      r   Úget_file_textzTree.get_file_textÎ  s‚   € ð �]Š]˜4Ñ Ô ð 	" GØ—<’<‘>”>ð	"ð 	"ð 	"ð 	"ñ 	"ô 	"ð 	"ð 	"ð 	"ð 	"ð 	"ð 	"øøøð 	"ð 	"ð 	"ð 	"ð 	"ð 	"s   –7·;¾;c                 óP   — t          j        |                      |¦  «        ¦  «        S )zeReturn the content of a file, as lines.

        Args:
          path: The path of the file.
        )r   Úsplit_linesrÈ   r   s     r   Úget_file_lineszTree.get_file_linesÙ  s#   € õ Ô" 4×#5Ò#5°dÑ#;Ô#;Ñ<Ô<Ð<r   c                 ó4   — d|                       ||¬¦  «        fS )aH  Return a verifier for a file.

        The default implementation returns a sha1.

        Args:
          path: The path that this file can be found at.
            These must point to the same object.
          stat_value: Optional stat value for the object
        Returns: Tuple with verifier name and verifier data
        ÚSHA1)Ú
stat_value)Úget_file_sha1©r   r   rÎ   s      r   Úget_file_verifierzTree.get_file_verifierá  s"   € ð ˜×*Ò*¨4¸JÐ*ÑGÔGÐHÐHr   c                 ó*   — t          | j        ¦  «        ‚)ak  Return the SHA1 file for a file.

        :note: callers should use get_file_verifier instead
            where possible, as the underlying repository implementation may
            have quicker access to a non-sha1 verifier.

        Args:
          path: The path that this file can be found at.
          stat_value: Optional stat value for the object
        )rx   rÏ   rÐ   s      r   rÏ   zTree.get_file_sha1î  s   € õ " $Ô"4Ñ5Ô5Ð5r   c                 ó*   — t          | j        ¦  «        ‚)zyReturn the modification time for a file.

        Args:
          path: The path that this file can be found at.
        )rx   Úget_file_mtimer   s     r   rÔ   zTree.get_file_mtimeû  s   € õ " $Ô"5Ñ6Ô6Ð6r   c                 ó*   — t          | j        ¦  «        ‚)zžReturn the size of a file in bytes.

        This applies only to regular files.  If invoked on directories or
        symlinks, it will return None.
        )rx   Úget_file_sizer   s     r   rÖ   zTree.get_file_size  ó   € õ " $Ô"4Ñ5Ô5Ð5r   c                 ó*   — t          | j        ¦  «        ‚)zoCheck if a file is executable.

        Args:
          path: The path that this file can be found at.
        )rx   Úis_executabler   s     r   rÙ   zTree.is_executable  r×   r   c              #   óR   K  — |D ]!\  }}|                       |¦  «        f}||fV — Œ"dS )a#  Iterate through file contents.

        Files will not necessarily be returned in the order they occur in
        desired_files.  No specific order is guaranteed.

        Yields pairs of identifier, bytes_iterator.  identifier is an opaque
        value supplied by the caller as part of desired_files.  It should
        uniquely identify the file version in the caller's context.  (Examples:
        an index number or a TreeTransform trans_id.)

        bytes_iterator is an iterable of bytestrings for the file.  The
        kind of iterable and length of the bytestrings are unspecified, but for
        this implementation, it is a tuple containing a single bytestring with
        the complete text of the file.

        Args:
          desired_files: a list of (path, identifier) pairs
        N)rÈ   )r   Údesired_filesr   Ú
identifierÚcur_files        r   Úiter_files_byteszTree.iter_files_bytes  sR   è è € ð& !.ð 	'ð 	'ÑˆD�*ð
 ×*Ò*¨4Ñ0Ô0Ð2ˆHØ˜hÐ&Ð&Ð&Ð&Ð&ð	'ð 	'r   c                 ó*   — t          | j        ¦  «        ‚)zðGet the target for a given path.

        It is assumed that the caller already knows that path is referencing
        a symlink.

        Args:
          path: The path of the file.
        Returns: The path the symlink points to.
        )rx   Úget_symlink_targetr   s     r   rà   zTree.get_symlink_target.  s   € õ " $Ô"9Ñ:Ô:Ð:r   c                 ó*   — t          | j        ¦  «        ‚)aí  Return an iterator of revision_id, line tuples.

        For working trees (and mutable trees in general), the special
        revision_id 'current:' will be used for lines that are new in this
        tree, e.g. uncommitted changes.

        Args;
          path: The file to produce an annotated version from
          default_revision: For lines that don't match a basis, mark them
            with this revision id. Not all implementations will make use of
            this value.
        )rx   Úannotate_iter)r   r   Údefault_revisions      r   râ   zTree.annotate_iter:  s   € õ " $Ô"4Ñ5Ô5Ð5r   r   c                 ó*   — t          | j        ¦  «        ‚)zoCheck whether path is versioned.

        Args:
          path: Path to check
        Returns: boolean
        )rx   Úis_versionedr   s     r   rå   zTree.is_versionedJ  s   € õ " $Ô"3Ñ4Ô4Ð4r   c                 ó*   — t          | j        ¦  «        ‚)aG  Find related paths in tree corresponding to specified filenames in any
        of `lookup_trees`.

        All matches in all trees will be used, and all children of matched
        directories will be used.

        Args:
          paths: The filenames to find related paths for (if None, returns
            None)
          trees: The trees to find file_ids within
          require_versioned: if true, all specified filenames must occur in
            at least one tree.
        Returns: a set of paths for the specified filenames and their children
            in `tree`
        )rx   Úfind_related_paths_across_trees)r   ÚpathsÚtreesr„   s       r   rç   z$Tree.find_related_paths_across_treesS  s   € õ" " $Ô"FÑGÔGÐGr   c                 ó4   — t          j        | j        ¦  «        S )zmLock this tree for multiple read only operations.

        Returns: A breezy.lock.LogicalLockResult.
        )r   ÚLogicalLockResultÚunlockr3   s    r   Ú	lock_readzTree.lock_readf  s   € õ
 Ô% d¤kÑ2Ô2Ð2r   c                 ó,   — t          j        | |¦  «        ‚)aX  Obtain a revision tree for the revision revision_id.

        The intention of this method is to allow access to possibly cached
        tree data. Implementors of this method should raise NoSuchRevision if
        the tree is not locally available, even if they could obtain the
        tree via a repository or some other means. Callers are responsible
        for finding the ultimate source for a revision tree.

        Args:
          revision_id: The revision_id of the requested tree.
        Returns: A Tree.
        Raises:
          NoSuchRevision: if the tree cannot be obtained.
        )r   ÚNoSuchRevisionInTree)r   Úrevision_ids     r   Úrevision_treezTree.revision_treem  s   € õ Ô)¨$°Ñ<Ô<Ð<r   c                 ó    — t          g ¦  «        S )zoWhat files are present in this tree and unknown.

        Returns: an iterator over the unknown files.
        )Úiterr3   s    r   ÚunknownszTree.unknowns~  s   € õ
 �B‰xŒxˆr   c                 ó   — d S r   r$   r3   s    r   rì   zTree.unlock…  s   € Øˆr   c                 ó    ‡ — ˆ fd„|D ¦   «         S )zMFilter out paths that are versioned.

        Returns: set of paths.
        c                 ó>   •— h | ]}‰                      |¦  «        °|’ŒS r$   )rå   )Ú.0Úpr   s     €r   ú	<setcomp>z0Tree.filter_unversioned_files.<locals>.<setcomp>�  s,   ø€ Ð=Ð=Ð=�a¨×(9Ò(9¸!Ñ(<Ô(<Ð=�Ð=Ð=Ð=r   r$   )r   rè   s   ` r   Úfilter_unversioned_fileszTree.filter_unversioned_filesˆ  s   ø€ ð >Ð=Ð=Ð=˜5Ð=Ñ=Ô=Ð=r   rG   c                 ó*   — t          | j        ¦  «        ‚)a–  Walk the contents of this tree from path down.

        This yields all the data about the contents of a directory at a time.
        After each directory has been yielded, if the caller has mutated the
        list to exclude some directories, they are then not descended into.

        The data yielded is of the form:
        (directory-relpath,
        [(relpath, basename, kind, lstat, path_from_tree_root,
          versioned_kind), ...]),
         - directory-path-from-root is the containing dirs path from /
         - relpath is the relative path within the subtree being walked.
         - basename is the basename
         - kind is the kind of the file now. If unknonwn then the file is not
           present within the tree - but it may be recorded as versioned. See
           versioned_kind.
         - lstat is the stat data *if* the file was statted.
         - path_from_tree_root is the path from the root of the tree.
         - versioned_kind is the kind of the file as last recorded in the
           versioning system. If 'unknown' the file is not versioned.
        One of 'kind' and 'versioned_kind' must not be 'unknown'.

        Args:
          prefix: Start walking from prefix within the tree rather than
            at the root. This allows one to walk a subtree but get paths that are
            relative to a tree rooted higher up.
        Returns: an iterator over the directory data.
        )rx   Úwalkdirs)r   Úprefixs     r   rý   zTree.walkdirs’  s   € õ: " $¤-Ñ0Ô0Ð0r   c                 ó   — dS ra   r$   r3   s    r   Úsupports_content_filteringzTree.supports_content_filtering±  r5   r   c                 ó>  — ddl m}m} |                     ¦   «         }t	          |¦  «        dk    rg S t          |                      |g|¦  «        ¦  «        }|                     |¦  «        }d|j        v r)t          j
        d¦  «                             |||¦  «         |S )a™  The stack of content filters for a path if filtering is supported.

        Readers will be applied in first-to-last order.
        Writers will be applied in last-to-first order.
        Either the path or the file-id needs to be provided.

        Args:
          path: path relative to the root of the tree
            or None if unknown
        Returns: the list of filters - [] if there are none
        r   )ÚdebugÚfiltersr   r  z$*** {0} content-filter: {1} => {2!r})rG   r  r  Ú_get_registered_namesr²   ÚnextÚiter_search_rulesÚ_get_filter_stack_forÚdebug_flagsr   Únoter\   )r   r   r  r  Úfilter_pref_namesÚprefsÚstks          r   Ú_content_filter_stackzTree._content_filter_stack´  s±   € ð 	%Ð$Ð$Ð$Ð$Ð$Ð$Ð$Ø#×9Ò9Ñ;Ô;ÐÝÐ Ñ!Ô! QÒ&Ð&ØˆIÝ�T×+Ò+¨T¨FÐ4EÑFÔFÑGÔGˆØ×+Ò+¨EÑ2Ô2ˆØ˜Ô)Ð)Ð)ÝŒJÐ=Ñ>Ô>×EÒEÀdÈEÐSVÑWÔWÐWØˆ
r   c                 ó<   — |                       ¦   «         r| j        S dS )zðA function that returns a stack of ContentFilters.

        The function takes a path (relative to the top of the tree) and a
        file-id as parameters.

        Returns: None if content filtering is not supported by this tree.
        N)r   r  r3   s    r   Ú_content_filter_stack_providerz#Tree._content_filter_stack_providerÊ  s&   € ð ×*Ò*Ñ,Ô,ð 	ØÔ-Ð-à�4r   c              #   óÔ   K  — ddl m} |€|j        }|                      |¦  «        }|�=|�|D ]}|                     ||¦  «        V — ŒdS |D ]}|                     |¦  «        V — ŒdS dS )aæ  Find the preferences for filenames in a tree.

        Args:
          path_names: an iterable of paths to find attributes for.
          Paths are given relative to the root of the tree.
          pref_names: the list of preferences to lookup - None for all
          _default_searcher: private parameter to assist testing - don't use
        Returns: an iterator of tuple sequences, one per path-name.
          See _RulesSearcher.get_items for details on the tuple sequence.
        r   )ÚrulesN)rG   r  Ú_per_user_searcherÚ_get_rules_searcherÚget_selected_itemsÚ	get_items)r   Ú
path_namesÚ
pref_namesÚ_default_searcherr  Úsearcherr   s          r   r  zTree.iter_search_rules×  sÅ   è è € ð 	ÐÐÐÐÐØÐ$Ø %Ô 8ÐØ×+Ò+Ð,=Ñ>Ô>ˆØÐØÐ%Ø&ð Hð H�DØ"×5Ò5°d¸JÑGÔGÐGÐGÐGÐGðHð Hð 'ð 3ð 3�DØ"×,Ò,¨TÑ2Ô2Ð2Ð2Ð2Ð2ð  Ðð
3ð 3r   c                 ó
   — |}|S )z:Get the RulesSearcher for this tree given the default one.r$   )r   Údefault_searcherr  s      r   r  zTree._get_rules_searcherï  s   € à#ˆØˆr   r\   rW   ÚrootÚsubdirÚforce_mtimec           
      óŽ   — ddl m} |                      ¦   «         5   ||| |||||¬¦  «        cddd¦  «         S # 1 swxY w Y   dS )a  Create an archive of this tree.

        Args:
          format: Format name (e.g. 'tar')
          name: target file name
          root: Root directory name (or None)
          subdir: Subdirectory to export (or None)
        Returns: Iterator over archive chunks
        r   )Úcreate_archive)r  r¢   N)Úarchiver   rí   )r   r\   rW   r  r  r  r¢   r   s           r   r!  zTree.archiveô  sÅ   € ð 	,Ð+Ð+Ð+Ð+Ð+Ø�^Š^ÑÔð 	Að 	AØ!�> &¨$°°dØ"(°kØ1?ðAñ Aô Að	Að 	Að 	Að 	Añ 	Aô 	Að 	Að 	Að 	Að 	Að 	Að 	Aøøøð 	Að 	Að 	Að 	Að 	Að 	As   ›:º>Á>c                 ó
   — |dv S )z;Check if this tree support versioning a specific file kind.)rD   r=   rK   rO   r$   )Úclsr1   s     r   Úversionable_kindzTree.versionable_kind  s   € ð ÐJÐJÐKr   c                 ó*   — t          | j        ¦  «        ‚)zObtain a transform object.)rx   Úpreview_transform)r   r�   s     r   r&  zTree.preview_transform  s   € å! $Ô"8Ñ9Ô9Ð9r   ©FNNFFF)FNNNTFra   )FNTFr   )rG   r¯   )rG   NNF)Fr   r    r!   r8   rs   rv   ry   r{   r}   ro   r   rŠ   rŒ   r’   r–   r˜   rš   rž   r   r9   r¡   r   r   Úboolr¤   r¦   r¨   r­   rµ   r±   r1   rº   r¼   r¾   rÀ   rÂ   rÄ   rÈ   rË   rÑ   rÏ   rÔ   rÖ   rÙ   rÞ   rà   Ú_mod_revisionÚCURRENT_REVISIONrâ   rå   rç   rí   rñ   rô   rì   rû   rý   r   r  r  r  r  r
   ÚintÚfloatÚbytesr!  Úclassmethodr$  r&  r$   r   r   rq   rq   ²   s¨  € € € € € ð
ð 
ðð ð ðð ð ð@ð @ð @ðð ð ð
ð ð ð
 ð:ð :ñ „Xð:ð
 HLØMRØ&+ð!ð !ð !ð !ðF 9>Ø?CØ>CðIð Ið Ið Ið-ð -ð -ðð ð ð7ð 7ð 7ð5ð 5ð 5ðð ð ð< X¨c¤]ð <ð <ð <ð <ð IMØ38ð<ð <°(¸4À¼9Ô2Eð <Ø,0ð<ð <ð <ð <ð@	;ð 	;ð 	;ð GKØ"'ð3ð 3ð 3ð 3ðð ð ðð ð ð	8ð 	8ð 	8ð=ð =ð =ðð ð ð=ð =ð =ð&=ð =ð =ð
	9ð 	9ð 	9ð1ð 1ð 1ð
+ð +ð +ð	"ð 	"ð 	"ð=ð =ð =ðIð Ið Ið Ið6ð 6ð 6ð 6ð7ð 7ð 7ð6ð 6ð 6ð6ð 6ð 6ð'ð 'ð 'ð6
;ð 
;ð 
;ð (5Ô'Eð6ð 6ð 6ð 6ð 5 ð 5¨ð 5ð 5ð 5ð 5ð <>Ø:>ðHð Hð Hð Hð&3ð 3ð 3ð=ð =ð =ð"˜( 3œ-ð ð ð ð ðð ð ð>ð >ð >ð1ð 1ð 1ð 1ð>ð ð ðð ð ð ð,ð ð ð 8<Ø,0ð3ð 3ð 3ð 3ð0ð ð ð
 ;=Ø(,Ø;?Ø',ðAð A˜cð A¨ð A°Cð AØ  œðAà% e¨C°¨JÔ&7Ô8ðAð !%ðAð 2:¸%´ðAð Að Að Að& ðLð Lñ „[ðLð:ð :ð :ð :ð :ð :r   rq   c                   ó$  ‡ — e Zd ZU dZerddlmZ dZed         e	d<   dZ
ed         e	d<   g Zed„ ¦   «         Zed	ed
edd fˆ fd„¦   «         Z	 	 	 	 	 	 d#dedeee                  deee                  dededefd„Zdddg ddfdedeee                  dee         dedef
d„Z	 d$dedefd„Z	 d%dededee         fd„Z	 d%dededee         fd„Z	 d%d ee         deeee         f         fd!„Z	 d%d ee         dedeeee         f         fd"„Zˆ xZS )&r‡   a¨  This class represents operations taking place between two Trees.

    Its instances have methods like 'compare' and contain references to the
    source and target trees these operations are to be carried out on.

    Clients of breezy should not need to use InterTree directly, rather they
    should use the convenience methods on Tree such as 'Tree.compare()' which
    will pass through to InterTree as appropriate.
    r   )ÚWorkingTreeFormatNr0  Ú_matching_from_tree_formatÚ_matching_to_tree_formatc                 ó   — dS )NTr$   )ÚklsÚsourceÚtargets      r   Úis_compatiblezInterTree.is_compatible&  s	   € ð ˆtr   r5  r6  rŸ   c                 ón   •— t          t          t          ¦   «                              ||¦  «        ¦  «        S r   )r   r‡   Úsuperrˆ   )r#  r5  r6  r-   s      €r   rˆ   zInterTree.get,  s%   ø€ å•I�u™wœwŸ{š{¨6°6Ñ:Ô:Ñ;Ô;Ð;r   Fr�   r‚   rƒ   r„   r…   r†   c                 óÖ   — ddl m} | j        g}|�||z   }|                      ¦   «         5  |                     | j        | j        ||||||¬¦  «        cddd¦  «         S # 1 swxY w Y   dS )a€  Return the changes from source to target.

        Returns: A TreeDelta.
        Args:
          specific_files: An optional list of file paths to restrict the
            comparison to. When mapping filenames to ids, all matches in all
            trees (including optional extra_trees) are used, and all children of
            matched directories are included.
          want_unchanged: An optional boolean requesting the inclusion of
            unchanged entries in the result.
          extra_trees: An optional list of additional trees to use when
            mapping the contents of specific_files (paths) to file_ids.
          require_versioned: An optional boolean (defaults to False). When
            supplied and True all the 'specific_files' must be versioned, or
            a PathsNotVersionedError will be thrown.
          want_unversioned: Scan for unversioned paths.
        r   )ÚdeltaN)rƒ   r„   r†   )rG   r;  r5  rí   Ú_compare_treesr6  )	r   r�   r‚   rƒ   r„   r…   r†   r;  ré   s	            r   r‰   zInterTree.compare0  sé   € ð. 	ÐÐÐÐÐØ”�ˆØÐ"Ø˜KÑ'ˆEØ�^Š^ÑÔð 	Kð 	KØ×'Ò'¨¬°T´[À.Ø(6¸ÐR]Ø:KØ9Ið (ñ Kô Kð	Kð 	Kð 	Kð 	Kñ 	Kô 	Kð 	Kð 	Kð 	Kð 	Kð 	Kð 	Køøøð 	Kð 	Kð 	Kð 	Kð 	Kð 	Ks   ª'AÁA"Á%A"TrŽ   c                 ó*   — t          | j        ¦  «        ‚)a  Generate an iterator of changes between trees.

        A TreeChange object is returned.

        Changed_content is True if the file's content has changed.  This
        includes changes to its kind, and to a symlink's target.

        versioned, parent, name, kind, executable are tuples of (from, to).
        If a file is missing in a tree, its kind is None.

        Iteration is done in parent-to-child order, relative to the target
        tree.

        There is no guarantee that all paths are in sorted order: the
        requirement to expand the search due to renames may result in children
        that should be found early being found late in the search, after
        lexically later results have been returned.

        Args:
          require_versioned: Raise errors.PathsNotVersionedError if a
            path in the specific_files list is not versioned in one of
            source, target or extra_trees.
          specific_files: An optional list of file paths to restrict the
            comparison to. When mapping filenames to ids, all matches in all
            trees (including optional extra_trees) are used, and all children
            of matched directories are included. The parents in the target tree
            of the specific files up to and including the root of the tree are
            always evaluated for changes too.
          want_unversioned: Should unversioned files be returned in the
            output. An unversioned file is defined as one with (False, False)
            for the versioned pair.
        )rx   rŒ   )r   rŽ   r‚   r�   rƒ   r„   r†   s          r   rŒ   zInterTree.iter_changesQ  s   € õJ " $Ô"3Ñ4Ô4Ð4r   Úsource_pathÚtarget_pathc                 ó¢  — |                       ¦   «         5  | j                             ||¦  «        \  }}| j                             ||¦  «        \  }}||k    r||k    cddd¦  «         S |dk    r| j                             ||¦  «        }	n|}	|dk    r| j                             ||¦  «        }
n|}
|	|
k    cddd¦  «         S # 1 swxY w Y   dS )a  Check if two files are the same in the source and target trees.

        This only checks that the contents of the files are the same,
        it does not touch anything else.

        Args:
          source_path: Path of the file in the source tree
          target_path: Path of the file in the target tree
          source_stat: Optional stat value of the file in the source tree
          target_stat: Optional stat value of the file in the target tree
        Returns: Boolean indicating whether the files have the same contents
        NrÍ   )rí   r5  rÑ   r6  rÏ   )r   r>  r?  Úsource_statÚtarget_statÚsource_verifier_kindÚsource_verifier_dataÚtarget_verifier_kindÚtarget_verifier_dataÚsource_sha1Útarget_sha1s              r   Úfile_content_matcheszInterTree.file_content_matchesx  sh  € ð �^Š^ÑÔð 	0ð 	0à”×-Ò-¨k¸;ÑGÔGñ 7Ð Ð"6ð ”×-Ò-Ø ñ.ô .ñ 7Ð Ð"6ð $Ð';Ò;Ð;Ø,Ð0DÒDð	0ð 	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð $ vÒ-Ð-Ø"œk×7Ò7Ø ñ.ô .��ð 3�Ø# vÒ-Ð-Ø"œk×7Ò7Ø ñ.ô .��ð 3�Ø ;Ò.ð'	0ð 	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	0ð 	0s   •ACÁ*ACÃCÃCÚnoner   Úrecursec                 ó*   — t          | j        ¦  «        ‚)z÷Find target tree path.

        Args:
          path: Path to search for (exists in source)
        Returns: path in target, or None if there is no equivalent path.
        Raises:
          NoSuchFile: If the path doesn't exist in source
        )rx   Úfind_target_path©r   r   rK  s      r   rM  zInterTree.find_target_pathœ  ó   € õ " $Ô"7Ñ8Ô8Ð8r   c                 ó*   — t          | j        ¦  «        ‚)zûFind the source tree path.

        Args:
          path: Path to search for (exists in target)
        Returns: path in source, or None if there is no equivalent path.
        Raises:
          NoSuchFile: if the path doesn't exist in target
        )rx   Úfind_source_pathrN  s      r   rQ  zInterTree.find_source_path¨  rO  r   rè   c                 óH   — i }|D ]}|                       ||¬¦  «        ||<   Œ|S )zëFind target tree paths.

        Args:
          paths: Iterable over paths in target to search for
        Returns: Dictionary mapping from source paths to paths in target , or
            None if there is no equivalent path.
        ©rK  )rM  ©r   rè   rK  Úretr   s        r   Úfind_target_pathszInterTree.find_target_paths´  ó=   € ð ˆØð 	Eð 	EˆDØ×-Ò-¨d¸GÐ-ÑDÔDˆC�‰IˆIØˆ
r   c                 óH   — i }|D ]}|                       ||¬¦  «        ||<   Œ|S )zêFind source tree paths.

        Args:
          paths: Iterable over paths in target to search for
        Returns: Dictionary mapping from target paths to paths in source, or
            None if there is no equivalent path.
        rS  )rQ  rT  s        r   Úfind_source_pathszInterTree.find_source_pathsÂ  rW  r   r'  r¯   ©rJ  )r   r    r!   r8   r   Úworkingtreer0  r1  r   r:   r2  Ú_optimisersr.  r7  rq   rˆ   r(  r   r9   r‰   rŒ   rI  rM  rQ  r	   rV  rY  Ú__classcell__)r-   s   @r   r‡   r‡     sÞ  ø€ € € € € € ðð ð ð 3Ø2Ð2Ð2Ð2Ð2Ð2Ø@DÐ Ð)<Ô =ÐDÐDÑDØ>BÐ˜hÐ':Ô;ÐBÐBÑBà€Kàðð ñ „[ðð
 ð<˜ð < tð <°ð <ð <ð <ð <ð <ñ „[ð<ð .3Ø6:Ø48Ø*/Ø%*Ø).ðKð K dð KØ (¨¨c¬Ô 3ðKà% d¨4¤jÔ1ðKð $(ðKð #ð	Kð
 #'ðKð Kð Kð KðB 6;Ø;?Ø¸Ø/3Ø.3ð	%5ð %5¨dð %5Ø%-¨d°3¬iÔ%8ð%5à+/°¬:ð%5ð )-ð%5ð (,ð	%5ð %5ð %5ð %5ðR +/ð"0ð "0Ø"ð"0Ø14ð"0ð "0ð "0ð "0ðJ )/ð
9ð 
9 Sð 
9Ø"%ð
9Ø3;¸C´=ð
9ð 
9ð 
9ð 
9ð )/ð
9ð 
9 Sð 
9Ø"%ð
9Ø3;¸C´=ð
9ð 
9ð 
9ð 
9ð #)ðð  t¨C¤yð Ø-1°#°xÀ´}Ð2DÔ-Eðð ð ð ð *0ðð  t¨C¤yð Ø#&ðØ48¸¸hÀs¼mÐ9KÔ4Lðð ð ð ð ð ð ð r   r‡   rJ  r�   Úto_treerè   rK  rŸ   c                 ób   — t                                || ¦  «                             ||¬¦  «        S )a  Find previous tree paths.

    Args:
      from_tree: From tree
      to_tree: To tree
      paths: Iterable over paths in from_tree to search for
    Returns: Dictionary mapping from from_tree paths to paths in to_tree, or
        None if there is no equivalent path.
    rS  )r‡   rˆ   rY  )r�   r^  rè   rK  s       r   Úfind_previous_pathsr`  Ñ  s+   € õ �=Š=˜ )Ñ,Ô,×>Ò>¸uÈgÐ>ÑVÔVÐVr   c                 ób   — t                                || ¦  «                             ||¬¦  «        S )a  Find previous tree path.

    Args:
      from_tree: From tree
      to_tree: To tree
      path: Path to search for (exists in from_tree)
    Returns: path in to_tree, or None if there is no equivalent path.
    Raises:
      NoSuchFile: If the path doesn't exist in from_tree
    rS  )r‡   rˆ   rQ  )r�   r^  r   rK  s       r   Úfind_previous_pathrb  à  s4   € õ �=Š=˜ )Ñ,Ô,×=Ò=Ø�gð >ñ ô ð r   c                 óö  — d}t          |                     d¦  «        ¦  «        }|D ]Ñ}|sŒ ||¦  «        }d}	 |                      |¦  «        D ]m}	 |j        |k    rt	          j        ||j        ¦  «        } nD ||j        ¦  «        |k    rt	          j        ||j        ¦  «        }ŒY# t          j        $ r Y Œjw xY wn# t          j        $ r Y nw xY w|r|}Œ±t	          j        ||gt          |¦  «        ¢R Ž } |S )zíFind the canonical path of an item, ignoring case.

    Args:
      tree: Tree to traverse
      path: Case-insensitive path to look up
      normalize: Function to normalize a filename for comparison
    Returns: The canonical path
    rG   r?   N)
ró   Úsplitr¦   rW   r   Úpathjoinr   ÚNoSuchIdÚNotADirectoryÚlist)	Útreer   Ú	normalizeÚcur_pathÚbit_iterÚeltÚleltÚnew_pathÚchilds	            r   Úget_canonical_pathrq  ï  sH  € ð €HÝ�D—J’J˜s‘O”OÑ$Ô$€HØð ð ˆØð 	ØØˆy˜‰~Œ~ˆØˆð	Ø×0Ò0°Ñ:Ô:ð ð �ðØ”z SÒ(Ð(õ
 $+Ô#3°H¸e¼jÑ#IÔ#I˜Ø˜Ø"˜ 5¤:Ñ.Ô.°$Ò6Ð6Ý#*Ô#3°H¸e¼jÑ#IÔ#I˜øøÝ”ð ð ð à�Hðøøøøøõ Ô#ð 	ð 	ð 	ØˆDð	øøøàð 	ØˆHˆHõ Ô'¨°#ÐG½¸X¹¼ÐGÐGÐGˆHØØ€OsA   ºB>Á%B(Á7B>Á9.B(Â'B>Â(B:Â7B>Â9B:Â:B>Â>CÃCNrZ  )#r8   Ú__docformat__Útypingr   r   r   r   r   r	   r
   r   rG   r   r   r   r   r)  r   Úinterr   ÚBzrErrorr   r&   r)   r<   rC   rJ   rN   rS   rq   r‡   r9   r`  rb  rq  r$   r   r   ú<module>rv     só  ðð"ð ð €à SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ Sðð ð ð ð ð ð ð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð ðð ð ð ð ˜vœñ ô ð ðð ð ð ð ˜œñ ô ð ðð ð ð ð ñ ô ð ð2ð ð ð ð �Iñ ô ð ðð ð ð ð ˆyñ ô ð ðð ð ð ð ˆyñ ô ð ðð ð ð ð �Iñ ô ð ð6ð 6ð 6ð 6ð 6ñ 6ô 6ð 6ðr\	:ð \	:ð \	:ð \	:ð \	:ñ \	:ô \	:ð \	:ð~}ð }ð }ð }ð }�˜DÔ!ñ }ô }ð }ðD (.ðWð W 4ð W°$ð WØ# CœyðWà!$ðWà26°s¸HÀS¼MÐ7IÔ2JðWð Wð Wð Wðð ð ð ð)ð )ð )ð )ð )r   