§
    cÌc2  ã                   ó*   — d Z d„ Z G d„ d¦  «        ZdS )z	Map Tree.c                 óD  — t          |¦  «        t          |¦  «        k    sJ ‚i }t          ||¦  «        D ]j\  }}|                      |¦  «        }|                      |¦  «        }|                     ¦   «         D ]&\  }}	|                     |¦  «        }
|
�
|
||	j        <   Œ'Œk|S )zçTry to determine the equivalent file ids in two sets of parents.

    :param repository: Repository to use
    :param old_parents: List of revision ids of old parents
    :param new_parents: List of revision ids of new parents
    )ÚlenÚzipÚrevision_treeÚiter_entries_by_dirÚpath2idÚfile_id)Ú
repositoryÚold_parentsÚnew_parentsÚretÚoldpÚnewpÚoldtreeÚnewtreeÚpathÚier   s              ú@/usr/lib/python3/dist-packages/breezy/plugins/rewrite/maptree.pyÚmap_file_idsr      s»   € õ ˆ{ÑÔ�s ;Ñ/Ô/Ò/Ð/Ð/Ð/Ø
€CÝ˜K¨Ñ5Ô5ð *ð *‰ˆˆtØ×*Ò*¨4Ñ0Ô0ˆØ×*Ò*¨4Ñ0Ô0ˆØ×3Ò3Ñ5Ô5ð 	*ð 	*‰HˆD�"Ø—o’o dÑ+Ô+ˆGØÐ"Ø")��B”J‘øð	*ð €Jó    c                   ój   — e Zd ZdZd„ Zd„ Zd„ Zdd„Zdd„Zdd„Z	dd	„Z
d
„ Zd„ Zd„ Zd„ Zd„ Zdd„ZdS )ÚMapTreez4Wrapper around a tree that translates file ids.
    c                 ó"   — || _         || _        dS )z„Create a new MapTree.

        :param oldtree: Old tree to map to.
        :param fileid_map: Map with old -> new file ids.
        N)r   Úmap)Úselfr   Ú
fileid_maps      r   Ú__init__zMapTree.__init__)   s   € ð ˆŒØˆŒˆˆr   c                 óD   — | j         D ]}| j         |         |k    r|c S Œ|S )z“Look up the original file id of a file.

        :param file_id: New file id
        :return: Old file id if mapped, otherwise new file id
        )r   )r   r   Úxs      r   Úold_idzMapTree.old_id2   s9   € ð ”ð 	ð 	ˆAØŒx˜Œ{˜gÒ%Ð%Ø���ð &àˆr   c                 óB   — 	 | j         |         S # t          $ r |cY S w xY w)zmLook up the new file id of a file.

        :param file_id: Old file id
        :return: New file id
        )r   ÚKeyError)r   r   s     r   Únew_idzMapTree.new_id=   s8   € ð	Ø”8˜GÔ$Ð$øÝð 	ð 	ð 	ØˆNˆNˆNð	øøøs   ‚ ��Nc                 ó6   — | j                              |¦  «        S )zSee Tree.get_file_sha1().)r   Úget_file_sha1©r   r   r   s      r   r$   zMapTree.get_file_sha1H   ó   € àŒ|×)Ò)¨$Ñ/Ô/Ð/r   c                 ó’   — t          | j        dd¦  «        �| j                             |¬¦  «        S |                      |¦  «        dfS )zSee Tree.get_file_with_stat().Úget_file_with_statN)r   )Úgetattrr   r(   Úget_filer%   s      r   r(   zMapTree.get_file_with_statL   sG   € å�4”<Ð!5°tÑ<Ô<ÐHØ”<×2Ò2¸Ð2Ñ=Ô=Ð=à—=’= Ñ&Ô&¨Ð,Ð,r   c                 ó6   — | j                              |¦  «        S )zSee Tree.get_file().)r   r*   r%   s      r   r*   zMapTree.get_fileS   s   € àŒ|×$Ò$ TÑ*Ô*Ð*r   c                 ó6   — | j                              |¦  «        S )zSee Tree.is_executable().)r   Úis_executabler%   s      r   r-   zMapTree.is_executableW   r&   r   c                 ó6   — | j                              |¦  «        S )zSee Tree.has_filename().)r   Úhas_filename)r   Úfilenames     r   r/   zMapTree.has_filename[   s   € àŒ|×(Ò(¨Ñ2Ô2Ð2r   c                 ó6   — | j                              |¦  «        S )z See Tree.path_content_summary().)r   Úpath_content_summary)r   r   s     r   r2   zMapTree.path_content_summary_   s   € àŒ|×0Ò0°Ñ6Ô6Ð6r   c                 óª   — |                      ¦   «         }|                      |j        ¦  «        |_        |                      |j        ¦  «        |_        |S )z’Fix the references to old file ids in an inventory entry.

        :param ie: Inventory entry to map
        :return: New inventory entry
        )Úcopyr"   r   Ú	parent_id)r   r   Únew_ies      r   Úmap_iezMapTree.map_iec   sB   € ð —’‘”ˆØŸš V¤^Ñ4Ô4ˆŒØŸ;š; vÔ'7Ñ8Ô8ˆÔØˆr   c              #   óz   K  — | j                              ¦   «         D ]\  }}||                      |¦  «        fV — ŒdS )zSee Tree.iter_entries_by_dir.N)r   r   r7   )r   r   r   s      r   r   zMapTree.iter_entries_by_dirn   sO   è è € àœ×8Ò8Ñ:Ô:ð 	(ð 	(‰HˆD�"Ø˜Ÿš B™œÐ'Ð'Ð'Ð'Ð'ð	(ð 	(r   c                 óh   — | j                              |¦  «        }|€d S |                      |¦  «        S ©N)r   r   r"   r%   s      r   r   zMapTree.path2ids   s3   € Ø”,×&Ò& tÑ,Ô,ˆØˆ?Ø�4Ø�{Š{˜7Ñ#Ô#Ð#r   Údownc                 ób   — | j                              |                      |¬¦  «        |¬¦  «        S )N)r   )Úrecurse)r   Úid2pathr   )r   r   r=   s      r   r>   zMapTree.id2pathy   s+   € ØŒ|×#Ò# D§K¢K¸ KÑ$@Ô$@È'Ð#ÑRÔRÐRr   r:   )r;   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r"   r$   r(   r*   r-   r/   r2   r7   r   r   r>   © r   r   r   r   %   s   € € € € € ðð ðð ð ð	ð 	ð 	ð	ð 	ð 	ð0ð 0ð 0ð 0ð-ð -ð -ð -ð+ð +ð +ð +ð0ð 0ð 0ð 0ð3ð 3ð 3ð7ð 7ð 7ð	ð 	ð 	ð(ð (ð (ð
$ð $ð $ðSð Sð Sð Sð Sð Sr   r   N)rB   r   r   rC   r   r   ú<module>rD      sa   ðð  €ðð ð ð&USð USð USð USð USñ USô USð USð USð USr   