§
    cÌcDX ã                   ó°  — d Z ddlmZ ddlZddlmZ ddlZddlmZ ddl	Z	ddl
Z
ddlZddlZddlZddlmZ dd	lmZ  ej         e¦   «         d
¦  «         ddlmZmZmZmZ ddlmZ ddlmZ ddlmZmZ ddlm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) ddl*m+Z+m,Z,m-Z- dZ.dZ/dZ0 G d„ dej1        ¦  «        Z2 G d„ de+e¦  «        Z3 G d„ dej4        e,¦  «        Z5dS )a  InventoryWorkingTree object and friends.

A WorkingTree represents the editable working copy of a branch.
Operations which represent the WorkingTree are also done here,
such as renaming or adding files.  The WorkingTree has an inventory
which is updated by these operations.  A commit produces a
new revision based on the workingtree and its inventory.

At the moment every WorkingTree has its own branch.  Remote
WorkingTrees aren't supported.

To get a WorkingTree, call bzrdir.open_workingtree() or
WorkingTree.open(dir).
é    )Úbisect_leftN)Údeque)ÚBytesIOé   )Úbzrdiré   )Úlazy_importa#  
import contextlib
from breezy import (
    cache_utf8,
    conflicts as _mod_conflicts,
    globbing,
    ignores,
    merge,
    )
from breezy.bzr import (
    conflicts as _mod_bzr_conflicts,
    generate_ids,
    inventory,
    rio as _mod_rio,
    serializer,
    xml5,
    xml7,
    )
)ÚerrorsÚosutilsÚrevisionÚ	transport)Ú
ControlDir)ÚLogicalLockResult)ÚInventoryRevisionTreeÚMutableInventoryTree)ÚmutterÚnote)Úget_canonical_pathÚMissingNestedTreeÚTreeDirectoryÚ	TreeEntryÚTreeFileÚTreeLinkÚTreeReference)ÚWorkingTreeÚWorkingTreeFormatÚformat_registrys    BZR merge-modified list format 1s   BZR conflict list format 1é   c                   ó   — e Zd ZdZd„ ZdS )ÚInventoryModifiedzuThe current inventory for the tree %(tree)r has been modified, so a clean inventory cannot be read without data loss.c                 ó   — || _         d S ©N)Útree)Úselfr#   s     ú8/usr/lib/python3/dist-packages/breezy/bzr/workingtree.pyÚ__init__zInventoryModified.__init__l   s   € ØˆŒ	ˆ	ˆ	ó    N)Ú__name__Ú
__module__Ú__qualname__Ú_fmtr&   © r'   r%   r    r    g   s+   € € € € € ðF€Dðð ð ð ð r'   r    c                   óÆ  ‡ — e Zd ZdZ	 	 	 	 	 	 	 d_ˆ fd„	Zd„ Zd„ Zd`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d„ Zd„ Z	 	 dad„Zd„ Zd „ Zdbd!„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-d0„ Z.d1„ Z/d2„ Z0d3„ Z1d`d4„Z2d5„ Z3d6„ Z4e5j6        e7j8        fd7„Z9d8„ Z:d9„ Z;d:„ Z<d;„ Z=d<„ Z>d=„ Z?d`d>„Z@d?„ ZAeBjC        fd@„ZDdA„ ZEdB„ ZFdC„ ZGdD„ ZHd`dE„ZI	 	 dadF„ZJdcdG„ZKdbdH„ZL G dI„ dJ¦  «        ZMdbdK„ZNdL„ ZOdM„ ZPdN„ ZQdO„ ZRdP„ ZSdQ„ ZTdddS„ZUdddT„ZVdU„ ZWd`dV„ZXdcˆ fdW„	ZYdX„ ZZd`dY„Z[dZ„ Z\ded[„Z]d`d\„Z^ e_¦   «         Z`ddde`dfd]„Za	 	 dfd^„Zbˆ xZcS )gÚInventoryWorkingTreea  Base class for working trees that are inventory-oriented.

    The inventory is held in the `Branch` working-inventory, and the
    files are in a directory on disk.

    It is possible for a `WorkingTree` to have a filename which is
    not listed in the Inventory and vice versa.
    ú.NFc                 ó  •— t          ¦   «                              |||j        |||¬¦  «         || _        |                      ¦   «          |                      ¦   «          |€d| _        d| _        dS |                      |d¬¦  «         dS )z’Construct a InventoryWorkingTree instance. This is not a public API.

        :param branch: A branch to override probing for the branch.
        )ÚbasedirÚbranchÚ
_transportÚ	_internalÚ_formatÚ_controldirNF©Údirty)	Úsuperr&   r3   Ú_control_filesÚ_detect_case_handlingÚ"_setup_directory_is_tree_referenceÚ_inventory_is_modifiedÚ
_inventoryÚ_set_inventory)	r$   r1   r2   r>   r:   r4   r5   r6   Ú	__class__s	           €r%   r&   zInventoryWorkingTree.__init__z   s    ø€ õ 	‰Œ×ÒØ FØ%Ô0¸IØ¨ð 	ñ 	6ô 	6ð 	6ð
 -ˆÔØ×"Ò"Ñ$Ô$Ð$Ø×/Ò/Ñ1Ô1Ð1àÐà*/ˆDÔ'Ø"ˆDŒOˆOˆOð ×Ò 
°%ÐÑ8Ô8Ð8Ð8Ð8r'   c                 ó"   — || _         || _        dS )a»  Set the internal cached inventory.

        :param inv: The inventory to set.
        :param dirty: A boolean indicating whether the inventory is the same
            logical inventory as whats on disk. If True the inventory is not
            the same and should be written to disk or data will be lost, if
            False then the inventory is the same as that on disk and any
            serialisation would be unneeded overhead.
        N)r>   r=   )r$   Úinvr8   s      r%   r?   z#InventoryWorkingTree._set_inventory™   s   € ð ˆŒØ&+ˆÔ#Ð#Ð#r'   c                 óÂ   — | j                              d ¦  «        }	 |                     | j        j        ¦  «         d| _        d S # t          j        $ r d| _        Y d S w xY w)NFT)Ú
controldirÚget_workingtree_transportÚstatr5   Úcase_sensitive_filenameÚcase_sensitiveÚ_mod_transportÚ
NoSuchFile)r$   Úwt_transs     r%   r;   z*InventoryWorkingTree._detect_case_handling¦   st   € Ø”?×<Ò<¸TÑBÔBˆð	(Ø�MŠM˜$œ,Ô>Ñ?Ô?Ð?ð #(ˆDÔÐÐøõ Ô(ð 	'ð 	'ð 	'Ø"&ˆDÔÐÐÐð	'øøøs   œA ÁAÁAc                 ó(   — ddl m}  || |¬¦  «        S )Nr   )ÚInventoryTreeTransform)Úpb)Ú	transformrM   )r$   rN   rM   s      r%   rO   zInventoryWorkingTree.transform¯   s*   € Ø5Ð5Ð5Ð5Ð5Ð5Ø%Ð% d¨rÐ2Ñ2Ô2Ð2r'   c                 óf   — | j         j        j        j        r| j        | _        d S | j        | _        d S r"   )Ú_branchÚ
repositoryr5   Úsupports_tree_referenceÚ _directory_may_be_tree_referenceÚ_directory_is_tree_referenceÚ"_directory_is_never_tree_reference©r$   s    r%   r<   z7InventoryWorkingTree._setup_directory_is_tree_reference³   s?   € ØŒ<Ô"Ô*ÔBð 	8àÔ5ð Ô-Ð-Ð-ð Ô7ð Ô-Ð-Ð-r'   c                 ó   — dS ©NFr,   ©r$   Úrelpaths     r%   rV   z7InventoryWorkingTree._directory_is_never_tree_reference»   s   € Øˆur'   c                 óZ   — |o)t          j        |                      |¦  «        dz   ¦  «        S )Nz/.bzr)r   ÚisdirÚabspathrZ   s     r%   rT   z5InventoryWorkingTree._directory_may_be_tree_reference¾   s*   € ð ÐI�7œ=¨¯ª°gÑ)>Ô)>ÀÑ)HÑIÔIÐIr'   c                 óT   — t           j                             | j        |d¬¦  «         d S )NT)Úworking)Úxml5Úserializer_v5Úwrite_inventoryr>   )r$   Ú	inventoryÚout_files      r%   Ú
_serializezInventoryWorkingTree._serializeÍ   s5   € ÝÔ×*Ò*ØŒO˜X¨tð 	+ñ 	5ô 	5ð 	5ð 	5ð 	5r'   c                 ó@   — t           j                             |¦  «        S r"   )ra   rb   Úread_inventory)ÚseltÚin_files     r%   Ú_deserializez!InventoryWorkingTree._deserializeÑ   s   € ÝÔ!×0Ò0°Ñ9Ô9Ð9r'   c                 ój   — | j                              ¦   «          | j                             ¦   «          dS )zäBreak a lock if one is present from another instance.

        Uses the ui factory to ask for confirmation if the lock may be from
        an active process.

        This will probe the repository for its lock as well.
        N)r:   Ú
break_lockr2   rW   s    r%   rm   zInventoryWorkingTree.break_lockÔ   s3   € ð 	Ô×&Ò&Ñ(Ô(Ð(ØŒ×ÒÑ Ô Ð Ð Ð r'   c                 ó4   — | j                              ¦   «         S r"   )r:   Ú	is_lockedrW   s    r%   ro   zInventoryWorkingTree.is_lockedß   s   € ØÔ"×,Ò,Ñ.Ô.Ð.r'   c                 óV   — |                       ¦   «         st          j        | ¦  «        ‚d S r"   )ro   r
   ÚObjectNotLockedrW   s    r%   Ú_must_be_lockedz$InventoryWorkingTree._must_be_lockedâ   s/   € Ø�~Š~ÑÔð 	/ÝÔ(¨Ñ.Ô.Ð.ð	/ð 	/r'   c                 ó0  — |                       ¦   «         s|                      ¦   «          | j                             ¦   «          	 | j                             ¦   «          t          | j        ¦  «        S # t          $ r | j                             ¦   «          ‚ w xY w)z¢Lock the tree for reading.

        This also locks the branch, and can be unlocked via self.unlock().

        :return: A breezy.lock.LogicalLockResult.
        )ro   Ú_reset_datar2   Ú	lock_readr:   r   ÚunlockÚBaseExceptionrW   s    r%   ru   zInventoryWorkingTree.lock_readæ   s˜   € ð �~Š~ÑÔð 	Ø×ÒÑÔÐØŒ×ÒÑÔÐð	ØÔ×)Ò)Ñ+Ô+Ð+Ý$ T¤[Ñ1Ô1Ð1øÝð 	ð 	ð 	ØŒK×ÒÑ Ô Ð Øð	øøøó   Á,A0 Á0%Bc                 ó0  — |                       ¦   «         s|                      ¦   «          | j                             ¦   «          	 | j                             ¦   «          t          | j        ¦  «        S # t          $ r | j                             ¦   «          ‚ w xY w)ztSee MutableTree.lock_tree_write, and WorkingTree.unlock.

        :return: A breezy.lock.LogicalLockResult.
        )	ro   rt   r2   ru   r:   Ú
lock_writer   rv   rw   rW   s    r%   Úlock_tree_writez$InventoryWorkingTree.lock_tree_write÷   s˜   € ð
 �~Š~ÑÔð 	Ø×ÒÑÔÐØŒ×ÒÑÔÐð	ØÔ×*Ò*Ñ,Ô,Ð,Ý$ T¤[Ñ1Ô1Ð1øÝð 	ð 	ð 	ØŒK×ÒÑ Ô Ð Øð	øøørx   c                 ó0  — |                       ¦   «         s|                      ¦   «          | j                             ¦   «          	 | j                             ¦   «          t          | j        ¦  «        S # t          $ r | j                             ¦   «          ‚ w xY w)zoSee MutableTree.lock_write, and WorkingTree.unlock.

        :return: A breezy.lock.LogicalLockResult.
        )ro   rt   r2   rz   r:   r   rv   rw   rW   s    r%   rz   zInventoryWorkingTree.lock_write  s˜   € ð
 �~Š~ÑÔð 	Ø×ÒÑÔÐØŒ×ÒÑ Ô Ð ð	ØÔ×*Ò*Ñ,Ô,Ð,Ý$ T¤[Ñ1Ô1Ð1øÝð 	ð 	ð 	ØŒK×ÒÑ Ô Ð Øð	øøørx   c                 ó4   — | j                              ¦   «         S r"   )r:   Úget_physical_lock_statusrW   s    r%   r~   z-InventoryWorkingTree.get_physical_lock_status  s   € ØÔ"×;Ò;Ñ=Ô=Ð=r'   c                 ó¶   — |                       ¦   «         5  |                      |d¬¦  «         |                      ¦   «          ddd¦  «         dS # 1 swxY w Y   dS )z)Write inventory as the current inventory.Tr7   N)r{   r?   Úflush)r$   rB   s     r%   Ú_write_inventoryz%InventoryWorkingTree._write_inventory  sž   € à×!Ò!Ñ#Ô#ð 	ð 	Ø×Ò ¨4ÐÑ0Ô0Ð0Ø�JŠJ‰LŒLˆLð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   •,AÁAÁAc           	      óT  — ddl m}m}m}m} |                      ¦   «         5   ||                      d¦  «        ¦  «        }|D ]¸\  }}}	}
t          j         	                    |¦  «        }|dk    rŒ-|
dk    r!| 
                     ||||	¦  «        ¦  «         ŒT|
dk    r!| 
                     ||||	¦  «        ¦  «         Œ{|
dk    r!| 
                     ||||	¦  «        ¦  «         Œ¢t          j        d|
z  ¦  «        ‚|                      |¦  «         d d d ¦  «         d S # 1 swxY w Y   d S )Nr   )Ú	InventoryÚInventoryDirectoryÚInventoryFileÚInventoryLinkÚ Ú	directoryÚfileÚsymlinkzunknown kind %r)rd   rƒ   r„   r…   r†   r{   Úpath2idÚosÚpathÚbasenameÚaddr
   ÚBzrErrorr�   )r$   Únew_inventory_listrƒ   r„   r…   r†   rB   r�   Úfile_idÚparentÚkindÚnames               r%   Úset_inventoryz"InventoryWorkingTree.set_inventory   sÀ  € ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð
 ×!Ò!Ñ#Ô#ð 	'ð 	'Ø�)˜DŸLšL¨Ñ,Ô,Ñ-Ô-ˆCØ/Að Dð DÑ+��g˜v tÝ”w×'Ò'¨Ñ-Ô-�Ø˜2’:�:Øà˜;Ò&Ð&Ø—G’GÐ.Ð.¨w¸¸fÑEÔEÑFÔFÐFÐFØ˜V’^�^Ø—G’G˜M˜M¨'°4¸Ñ@Ô@ÑAÔAÐAÐAØ˜YÒ&Ð&Ø—G’G˜M˜M¨'°4¸Ñ@Ô@ÑAÔAÐAÐAå œ/Ð*;¸dÑ*BÑCÔCÐCØ×!Ò! #Ñ&Ô&Ð&ð	'ð 	'ð 	'ñ 	'ô 	'ð 	'ð 	'ð 	'ð 	'ð 	'ð 	'ð 	'øøøð 	'ð 	'ð 	'ð 	'ð 	'ð 	's   ¡C/DÄD!Ä$D!c                 óÚ   — |                       ¦   «         }t          d                     |¦  «        ¦  «        }| j                             ||| j                             ¦   «         ¬¦  «         dS )z9Write the basis inventory XML to the basis-inventory filer'   ©ÚmodeN)Ú_basis_inventory_namer   Újoinr3   Úput_filerD   Ú_get_file_mode)r$   Úxmlr�   Úsios       r%   Ú_write_basis_inventoryz+InventoryWorkingTree._write_basis_inventory7  sm   € à×)Ò)Ñ+Ô+ˆÝ�c—h’h˜s‘m”mÑ$Ô$ˆØŒ× Ò   sØ&*¤o×&DÒ&DÑ&FÔ&Fð 	!ñ 	Hô 	Hð 	Hð 	Hð 	Hr'   c                 óÐ   — d| _         | j                             d¦  «        5 }|                      |¦  «        }ddd¦  «         n# 1 swxY w Y   |                      |d¬¦  «         dS )z0Reset transient data that cannot be revalidated.Frd   Nr7   )r=   r3   Úgetrk   r?   ©r$   ÚfÚresults      r%   rt   z InventoryWorkingTree._reset_data>  s¤   € à&+ˆÔ#ØŒ_× Ò  Ñ-Ô-ð 	*°Ø×&Ò& qÑ)Ô)ˆFð	*ð 	*ð 	*ñ 	*ô 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*øøøð 	*ð 	*ð 	*ð 	*à×Ò˜F¨%ÐÑ0Ô0Ð0Ð0Ð0s   ¢AÁAÁAc                 ó  — |                       ¦   «         5  |                      ¦   «         }ddlm}  || |¦  «        }	 |                     ¦   «         s"	 |                     ¦   «          ddd¦  «         dS | j                             |¦  «         |                     ¦   «          |                     ¦   «          n# |                     ¦   «          w xY wt          d| j        j
        ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )z6Store uncommitted changes from the tree in the branch.r   )ÚShelfCreatorNz*Uncommitted changes stored in branch "%s".)rz   Ú
basis_treeÚshelfr§   Ú
shelve_allÚfinalizer2   Ústore_uncommittedrO   r   Únick)r$   Útarget_treer§   Úshelf_creators       r%   r¬   z&InventoryWorkingTree.store_uncommittedE  st  € à�_Š_ÑÔð 	#ð 	#ØŸ/š/Ñ+Ô+ˆKØ,Ð,Ð,Ð,Ð,Ð,Ø(˜L¨¨{Ñ;Ô;ˆMð)Ø$×/Ò/Ñ1Ô1ð Øð ×&Ò&Ñ(Ô(Ð(ð	#ð 	#ð 	#ñ 	#ô 	#ð 	#ð 	#ð 	#ð ”×-Ò-¨mÑ<Ô<Ð<Ø×'Ò'Ñ)Ô)Ð)à×&Ò&Ñ(Ô(Ð(Ð(ø�×&Ò&Ñ(Ô(Ð(Ð(øøøÝÐ=Ø”Ô!ñ#ô #ð #ð	#ð 	#ð 	#ñ 	#ô 	#ð 	#ð 	#ð 	#ð 	#ð 	#ð 	#ð 	#øøøð 	#ð 	#ð 	#ð 	#ð 	#ð 	#s4   •'C6½B6ÁC6Á3.B6Â!C6Â6CÃC6Ã6C:Ã=C:c                 ó¦  — |                       ¦   «         5  | j                             | ¦  «        }|€	 ddd¦  «         dS 	 |                     ¦   «         }d|_        |                     ¦   «          | j                             d¦  «         |                     ¦   «          n# |                     ¦   «          w xY w	 ddd¦  «         dS # 1 swxY w Y   dS )z:Restore uncommitted changes from the branch into the tree.NT)rz   r2   Úget_unshelverÚmake_mergerÚignore_zeroÚdo_merger¬   r«   )r$   Ú	unshelverÚmergers      r%   Úrestore_uncommittedz(InventoryWorkingTree.restore_uncommittedU  s0  € à�_Š_ÑÔð 
	%ð 
	%Øœ×1Ò1°$Ñ7Ô7ˆIØÐ Øð
	%ð 
	%ð 
	%ñ 
	%ô 
	%ð 
	%ð 
	%ð 
	%ð%Ø"×.Ò.Ñ0Ô0�Ø%)�Ô"Ø—’Ñ!Ô!Ð!Ø”×-Ò-¨dÑ3Ô3Ð3à×"Ò"Ñ$Ô$Ð$Ð$ø�	×"Ò"Ñ$Ô$Ð$Ð$øøøÐ$ð
	%ð 
	%ð 
	%ñ 
	%ô 
	%ð 
	%ð 
	%ð 
	%ð 
	%ð 
	%ð 
	%ð 
	%øøøð 
	%ð 
	%ð 
	%ð 
	%ð 
	%ð 
	%s*   •CÁA	BÂ
CÂB5Â5CÃC
ÃC
c                 ó0   — ddl m}  || | j        ¦  «        S )z-Return the ShelfManager for this WorkingTree.r   )ÚShelfManager)r©   r¹   r3   )r$   r¹   s     r%   Úget_shelf_managerz&InventoryWorkingTree.get_shelf_managerc  s(   € à(Ð(Ð(Ð(Ð(Ð(Øˆ|˜D $¤/Ñ2Ô2Ð2r'   c                 óR  — | j         }|j        j        }d| _        |                     |j        j        ¦  «         ||j        _        |j        |j        |j        j        <   |                     ¦   «         D ]3}|                     |¦  «        }|j        |k    r|j        j        |_        Œ4dS )a  Set the root id for this tree, in a format specific manner.

        :param file_id: The file id to assign to the root. It must not be
            present in the current inventory or an error will occur. It must
            not be None, but rather a valid file id.
        TN)	r>   Úrootr’   r=   ÚdeleteÚ_byidÚiter_all_idsÚ	get_entryÚ	parent_id)r$   r’   rB   Úorig_root_idÚfidÚentrys         r%   Ú_set_root_idz!InventoryWorkingTree._set_root_idh  s§   € ð ŒoˆØ”xÔ'ˆð '+ˆÔ#ð 	�
Š
�3”8Ô#Ñ$Ô$Ð$Ø"ˆŒÔà&)¤hˆŒ	�#”(Ô"Ñ#ð ×#Ò#Ñ%Ô%ð 	3ð 	3ˆCØ—M’M #Ñ&Ô&ˆEØŒ ,Ò.Ð.Ø"%¤(Ô"2�”øð	3ð 	3r'   Tc                 óf  ‡ ‡‡‡— t          |t          ¦  «        r|g}g }t          ¦   «         Š|€t          j        }g Šˆˆˆ fd„}‰                      ¦   «         5  |D ]_}‰                      |¦  «        }	‰                      |	¦  «        }t          |¦  «        dk    r ‰ 	                    |¦  «          ||¦  «         Œ`t          ‰¦  «        }t          |¦  «        dk    r	 ddd¦  «         dS |                     d¬¦  «         |sµ|s³‰                      ‰                      ¦   «         ddd|¬¦  «        D ]†}
|
j        d         du r!‰                     |
j        d         ¦  «         Œ2|
j        rM|
j        d         �@t'          j        ||
j        d         ¦  «        r ‰                     |
j        d         ¦  «         Œ‡ˆˆ fd	„}|D �]Â}‰                      |¦  «        }d}|sd
                     |¦  «        }n’|rb‰                      |¦  «        rd}nd}t'          j        ‰                      |¦  «        ¦  «        }|                     |dz   |z   |z   dz   ¦  «         |                     |d|df¦  «         d                     |¦  «        }|së‰                      |¦  «        Št'          j        ‰¦  «        r«t'          j        ‰¦  «        r]t          t9          j        ‰¦  «        ¦  «        dk    r8|r*t'          j        ‰¦  «         d                     |¦  «        }n] ||¦  «        }nQ|‰v r ||¦  «        }nAt'          j        ‰¦  «         d                     |¦  «        }n|�d                     |¦  «        }|�tA          |¦  «         �ŒÄ‰  !                    |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )a-  Remove nominated files from the working tree metadata.

        :files: File paths relative to the basedir.
        :keep_files: If true, the files will also be kept.
        :force: Delete files and directories, even if they are changed and
            even if the directories are not empty.
        Nc                 óÔ   •— ‰	                      | ¦  «        D ]P\  }}|D ]H\  }}}}}‰	                     |¦  «        r‰                     |¦  «         Œ3‰                     |¦  «         ŒIŒQd S r"   )ÚwalkdirsÚis_versionedr�   Úappend)
rˆ   Úparent_pathÚ
file_infosr[   rŽ   r”   ÚlstatÚ	all_filesÚfiles_to_backupr$   s
          €€€r%   Úrecurse_directory_to_add_fileszCInventoryWorkingTree.remove.<locals>.recurse_directory_to_add_files–  s’   ø€ ð ,0¯=ª=¸Ñ+CÔ+Cð 	8ð 	8Ñ'�˜ZØ<Fð 8ð 8Ñ8�G˜X t¨U°Dà×(Ò(¨Ñ1Ô1ð 8à!Ÿš gÑ.Ô.Ð.Ð.ð (×.Ò.¨wÑ7Ô7Ð7Ð7ð8ð	8ð 	8r'   r   T)ÚreverseF)Úinclude_unchangedÚrequire_versionedÚwant_unversionedÚspecific_filesr   c                 ó´   •— ‰j                              | ¦  «        }t          j        ‰‰                     |¦  «        ¦  «         d                     | |¦  «        S )Nz removed {} (but kept a copy: {}))rD   Ú_available_backup_namer   Úrenamer^   Úformat)Úfile_to_backupÚbackup_nameÚabs_pathr$   s     €€r%   Úbackupz+InventoryWorkingTree.remove.<locals>.backupÆ  s[   ø€ Ø"œo×DÒDØ"ñ$ô $�å”˜x¨¯ª°kÑ)BÔ)BÑCÔCÐCØ9×@Ò@ÀØ=HñJô Jð Jr'   z{} is not versioned.ÚIú?z       ú
z
removed {}z
deleted {}z{} does not exist.)"Ú
isinstanceÚstrÚsetÚsysÚstdoutr{   r^   r[   Úlenr�   ÚlistÚsortÚiter_changesr¨   Ú	versionedrÊ   r�   Úchanged_contentr”   r   Úis_inside_anyr‹   rÙ   Ú
is_ignoredÚkind_markerÚwriteÚlexistsr]   rŒ   ÚlistdirÚrmtreeÚ
delete_anyr   Úapply_inventory_delta)r$   ÚfilesÚverboseÚto_fileÚ
keep_filesÚforceÚ	inv_deltarÐ   Úfilenamer^   ÚchangerÝ   r¤   rÃ   ÚmessageÚ
new_statusÚkind_chrÜ   rÎ   rÏ   s   `                @@@r%   ÚremovezInventoryWorkingTree.remove‚  s­  øøøø€ õ �e�SÑ!Ô!ð 	Ø�GˆEàˆ	å‘E”Eˆ	Øˆ?Ý”jˆGàˆð	8ð 	8ð 	8ð 	8ð 	8ð 	8ð 	8ð ×!Ò!Ñ#Ô#ð X	2ð X	2à!ð =ð =�àŸ,š, xÑ0Ô0�ØŸ<š<¨Ñ0Ô0�Ý�x‘=”= 1Ò$Ð$Ø—M’M (Ñ+Ô+Ð+Ø2Ð2°8Ñ<Ô<Ð<øå˜‘O”OˆEå�5‰zŒz˜QŠˆØðX	2ð X	2ð X	2ñ X	2ô X	2ð X	2ð X	2ð X	2ð" �JŠJ˜tˆJÑ$Ô$Ð$ð ð ? eð ?Ø"×/Ò/ØŸšÑ)Ô)¸TØ*/À$Ø',ð 0ñ .ô .ð ?ð ?�Fð Ô'¨Ô*¨eÐ3Ð3à'×.Ò.¨v¬{¸1¬~Ñ>Ô>Ð>Ð>Ø Ô0ð ?°f´kÀ!´nÐ6PÝ 'Ô 5°e¸V¼[È¼^Ñ LÔ Lð 7Qð (×.Ò.¨v¬{¸1¬~Ñ>Ô>Ð>øðJð Jð Jð Jð Jð Jð ð ,"ñ ,"�Ø—l’l 1‘o”o�Ø�Øð 5Ø4×;Ò;¸AÑ>Ô>�G�Gàð Ið  Ÿ?š?¨1Ñ-Ô-ð -Ø),˜J˜Jà),˜Jõ #*Ô"5°d·i²iÀ±l´lÑ"CÔ"C˜ØŸšØ&¨Ñ2°QÑ6¸Ñ@À4ÑGñIô Ið Ið ×$Ò$ a¨¨s°DÐ%9Ñ:Ô:Ð:Ø*×1Ò1°!Ñ4Ô4�Gà!ð AØ#Ÿ|š|¨A™œ�HÝ” xÑ0Ô0ð AÝ#œM¨(Ñ3Ô3ð AÝ$'­¬
°8Ñ(<Ô(<Ñ$=Ô$=ÀÒ$AÐ$AØ$ð 4Ý '¤¨xÑ 8Ô 8Ð 8Ø*6×*=Ò*=¸aÑ*@Ô*@  à*0¨&°©)¬)  à  OÐ3Ð3Ø*0¨&°©)¬)  å 'Ô 2°8Ñ <Ô <Ð <Ø*6×*=Ò*=¸aÑ*@Ô*@  Ø Ð,à"6×"=Ò"=¸aÑ"@Ô"@˜ð Ð&Ý˜‘M”M�MùØ×&Ò& yÑ1Ô1Ð1ðqX	2ð X	2ð X	2ñ X	2ô X	2ð X	2ð X	2ð X	2ð X	2ð X	2ð X	2ð X	2øøøð X	2ð X	2ð X	2ð X	2ð X	2ð X	2s   ÁBN&Ã+J.N&Î&N*Î-N*c                 ó    — 	 t          j        |                      |¦  «        ¦  «        S # t          j        $ r}t          |¦  «        |‚d }~ww xY wr"   )r   Úopenr^   r
   ÚNotBranchErrorr   ©r$   r�   Úes      r%   Úget_nested_treez$InventoryWorkingTree.get_nested_treeþ  sV   € ð	1ÝÔ# D§L¢L°Ñ$6Ô$6Ñ7Ô7Ð7øÝÔ$ð 	1ð 	1ð 	1Ý# DÑ)Ô)¨qÐ0øøøøð	1øøøs   ‚&) ©A¸AÁAc                 ó,   — |                       |¦  «        S r"   )r  )r$   r�   r’   Úreference_revisions       r%   Ú_get_nested_treez%InventoryWorkingTree._get_nested_tree  s   € Ø×#Ò# DÑ)Ô)Ð)r'   c                 óD  — d„ |D ¦   «         }|D ]}t          j        |¦  «         Œ|                      ¦   «         5  |                      ||¬¦  «         |                      |¦  «        }t          |¦  «        dk    rt           j        }d}n|d         \  }}|                      |¦  «        rJ|€|                      |¦  «         n2|j	        }|  
                    ||¦  «        }|                      |¦  «         |                      |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )z!See MutableTree.set_parent_trees.c                 ó   — g | ]\  }}|‘ŒS r,   r,   )Ú.0Úrevr#   s      r%   ú
<listcomp>z9InventoryWorkingTree.set_parent_trees.<locals>.<listcomp>	  s   € Ð:Ð:Ð:™k˜s D�cÐ:Ð:Ð:r'   )Úallow_leftmost_as_ghostr   N)Ú_mod_revisionÚcheck_not_reserved_idr{   Ú_check_parents_for_ghostsÚ_filter_parent_ids_by_ancestryræ   ÚNULL_REVISIONÚ_change_last_revisionÚ_cache_basis_inventoryÚroot_inventoryÚ _create_basis_xml_from_inventoryr    Ú_set_merges_from_parent_ids)	r$   Úparents_listr  Ú
parent_idsÚrevision_idÚleftmost_parent_idÚleftmost_parent_treerB   rž   s	            r%   Úset_parent_treesz%InventoryWorkingTree.set_parent_trees  sœ  € à:Ð:¨\Ð:Ñ:Ô:ˆ
Ø%ð 	=ð 	=ˆKÝÔ/°Ñ<Ô<Ð<Ð<à×!Ò!Ñ#Ô#ð 	9ð 	9Ø×*Ò*¨:ØCZð +ñ \ô \ð \ð ×<Ò<¸ZÑHÔHˆJå�:‰Œ !Ò#Ð#Ý%2Ô%@Ð"Ø'+Ð$Ð$à;GÈ¼?Ñ8Ð"Ð$8à×)Ò)Ð*<Ñ=Ô=ð 	5Ø'Ð/ð ×/Ò/Ð0BÑCÔCÐCÐCà.Ô=�CØ×?Ò?Ø*¨Cñ1ô 1�Cà×/Ò/°Ñ4Ô4Ð4Ø×,Ò,¨ZÑ8Ô8Ð8ð-	9ð 	9ð 	9ñ 	9ô 	9ð 	9ð 	9ð 	9ð 	9ð 	9ð 	9ð 	9øøøð 	9ð 	9ð 	9ð 	9ð 	9ð 	9s   ºCDÄDÄDc                 óJ  — 	 | j         j                             |¦  «        }|d         }d|vsd|vr;| j         j        j                             ||¦  «        }|                      ||¦  «        }|                      |¦  «         dS # t          j        t          j	        f$ r Y dS w xY w)z*Cache new_revision as the basis inventory.r   s   revision_id="s
   format="7"N)
r2   rR   Ú_get_inventory_xmlÚ_serializerÚread_inventory_from_linesr  r    r
   ÚNoSuchRevisionÚRevisionNotPresent)r$   Únew_revisionÚlinesÚ	firstlinerB   s        r%   r  z+InventoryWorkingTree._cache_basis_inventory%  s¾   € ð
	ð ”KÔ*×=Ò=¸lÑKÔKˆEØ˜aœˆIØ ¨	Ð1Ð1Ø$¨IÐ5Ð5Ø”kÔ,Ô8×RÒRØ˜<ñ)ô )�à×=Ò=¸lÈCÑPÔP�Ø×'Ò'¨Ñ.Ô.Ð.Ð.Ð.øÝÔ%¥vÔ'@ÐAð 	ð 	ð 	ØˆDˆDð	øøøs   ‚A?B ÂB"Â!B"c                 ó   — dS )Nzbasis-inventory-cacher,   rW   s    r%   rš   z*InventoryWorkingTree._basis_inventory_name@  s   € Ø&Ð&r'   c                 óN   — ||_         t          j                             |¦  «        S )z5Create the text that will be saved in basis-inventory)r  Úxml7Úserializer_v7Úwrite_inventory_to_lines)r$   r  rd   s      r%   r  z5InventoryWorkingTree._create_basis_xml_from_inventoryC  s!   € à +ˆ	ÔÝÔ!×:Ò:¸9ÑEÔEÐEr'   c                 óð   — t                                |¦  «        }|                      ¦   «         5  |                      d|                     ¦   «         t
          ¦  «         d d d ¦  «         d S # 1 swxY w Y   d S )NÚ	conflicts)Ú_mod_bzr_conflictsÚConflictListr{   Ú_put_rioÚ
to_stanzasÚCONFLICT_HEADER_1)r$   r/  Úconflict_lists      r%   Úset_conflictsz"InventoryWorkingTree.set_conflictsH  s´   € Ý*×7Ò7¸	ÑBÔBˆØ×!Ò!Ñ#Ô#ð 	-ð 	-Ø�MŠM˜+ }×'?Ò'?Ñ'AÔ'AÝ+ñ-ô -ð -ð	-ð 	-ð 	-ñ 	-ô 	-ð 	-ð 	-ð 	-ð 	-ð 	-ð 	-ð 	-øøøð 	-ð 	-ð 	-ð 	-ð 	-ð 	-s   ¯/A+Á+A/Á2A/c                 óf  — |                       ¦   «         5  t          |                      ¦   «         ¦  «        }|                     t          t	          |¦  «        ¦  «        ¦  «         |                      t          |t          j        j	        ¬¦  «        ¦  «         d d d ¦  «         d S # 1 swxY w Y   d S )N©Úkey)
r{   rã   r/  Úupdaterç   r6  Úsortedr0  ÚConflictÚsort_key)r$   Únew_conflictsÚconflict_sets      r%   Úadd_conflictsz"InventoryWorkingTree.add_conflictsN  sù   € Ø×!Ò!Ñ#Ô#ð 	Pð 	PÝ˜tŸ~š~Ñ/Ô/Ñ0Ô0ˆLØ×Ò¥¥D¨Ñ$7Ô$7Ñ 8Ô 8Ñ9Ô9Ð9Ø×ÒÝ�|Õ);Ô)DÔ)MÐNÑNÔNñPô Pð Pð	Pð 	Pð 	Pñ 	Pô 	Pð 	Pð 	Pð 	Pð 	Pð 	Pð 	Pð 	Pøøøð 	Pð 	Pð 	Pð 	Pð 	Pð 	Ps   •BB&Â&B*Â-B*c                 óz  — |                       ¦   «         5  	 | j                             d¦  «        }n:# t          j        $ r( t
                               ¦   «         cY cd d d ¦  «         S w xY w	 	 t          |¦  «        t          dz   k    rt          j
        ¦   «         ‚n!# t          $ r t          j
        ¦   «         ‚w xY wt                               |¦  «        }t
          j                             |¦  «        |                     ¦   «          cd d d ¦  «         S # |                     ¦   «          w xY w# 1 swxY w Y   d S )Nr/  ó   
)ru   r3   r¢   rI   rJ   r0  r1  Únextr4  r
   ÚConflictFormatErrorÚStopIterationÚ_mod_rioÚ	RioReaderÚfrom_stanzasÚclose)r$   ÚconfileÚreaders      r%   r/  zInventoryWorkingTree.conflictsU  s–  € Ø�^Š^ÑÔð 	 ð 	 ð9Øœ/×-Ò-¨kÑ:Ô:��øÝ!Ô,ð 9ð 9ð 9Ý)×6Ò6Ñ8Ô8Ð8Ð8ð		 ð 	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð 	 ð9øøøð	 ð7Ý˜G‘}”}Õ(9¸EÑ(AÒAÐAÝ$Ô8Ñ:Ô:Ð:ð Bøå$ð 7ð 7ð 7Ý Ô4Ñ6Ô6Ð6ð7øøøå!×+Ò+¨GÑ4Ô4�Ý)Ô6×CÒCÀFÑKÔKà—’‘”�ð	 ð 	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð 	 øð —’‘”��øøøð	 ð 	 ð 	 ð 	 øøøð 	 ð 	 ð 	 ð 	 ð 	 ð 	 s[   •D0—2±D0²(A)ÁD0Á(A)Á)D0Á..BÂDÂB;Â;;DÃ6D0ÄD-Ä-D0Ä0D4Ä7D4c                 ó  — t          | dd¦  «        }|�|S t          ¦   «         }|                     t                               ¦   «         ¦  «         |                     t                               ¦   «         ¦  «         |                      | j        j        ¦  «        rd|  	                    | j        j        ¦  «        5 }|                     t           
                    |¦  «        ¦  «         ddd¦  «         n# 1 swxY w Y   || _        |S )zaReturn list of ignore patterns.

        Cached in the Tree object after the first call.
        Ú
_ignoresetN)Úgetattrrã   r:  ÚignoresÚget_runtime_ignoresÚget_user_ignoresÚhas_filenamer5   Úignore_filenameÚget_fileÚparse_ignore_filerM  )r$   Ú	ignoresetÚignore_globsr¤   s       r%   Úget_ignore_listz$InventoryWorkingTree.get_ignore_listf  s.  € õ
 ˜D ,°Ñ5Ô5ˆ	ØÐ ØÐå‘u”uˆØ×Ò�G×7Ò7Ñ9Ô9Ñ:Ô:Ð:Ø×Ò�G×4Ò4Ñ6Ô6Ñ7Ô7Ð7Ø×Ò˜Tœ\Ô9Ñ:Ô:ð 	BØ—’˜tœ|Ô;Ñ<Ô<ð BÀØ×#Ò#¥G×$=Ò$=¸aÑ$@Ô$@ÑAÔAÐAðBð Bð Bñ Bô Bð Bð Bð Bð Bð Bð Bøøøð Bð Bð Bð Bà&ˆŒØÐs   Â:.C4Ã4C8Ã;C8c                 ó.   — |                       ¦   «          d S r"   )Ú_flush_ignore_list_cacherW   s    r%   Ú_cleanupzInventoryWorkingTree._cleanupx  s   € Ø×%Ò%Ñ'Ô'Ð'Ð'Ð'r'   c                 ó"   — d| _         d| _        dS )z7Resets the cached ignore list to force a cache rebuild.N)rM  Ú_ignoreglobsterrW   s    r%   rZ  z-InventoryWorkingTree._flush_ignore_list_cache{  s   € àˆŒØ#ˆÔÐÐr'   c                 óº   — t          | dd¦  «        €1t                               |                      ¦   «         ¦  «        | _        | j                             |¦  «        S )aù  Check whether the filename matches an ignore pattern.

        Patterns containing '/' or '\' need to match the whole path;
        others match against only the last component.  Patterns starting
        with '!' are ignore exceptions.  Exceptions take precedence
        over regular patterns and cause the filename to not be ignored.

        If the file is ignored, returns the pattern which caused it to
        be ignored, otherwise None.  So this can simply be used as a
        boolean if desired.r]  N)rN  ÚglobbingÚExceptionGlobsterrX  r]  Úmatch)r$   rû   s     r%   rí   zInventoryWorkingTree.is_ignored€  sU   € õ �4Ð*¨DÑ1Ô1Ð9Ý#+×#=Ò#=Ø×$Ò$Ñ&Ô&ñ$(ô $(ˆDÔ àÔ#×)Ò)¨(Ñ3Ô3Ð3r'   c                 ó‚   — |                       ¦   «         }t          j        | j                             |¦  «        ¦  «        S )z Read the cached basis inventory.)rš   r   Úsplit_linesr3   Ú	get_bytes©r$   r�   s     r%   Úread_basis_inventoryz)InventoryWorkingTree.read_basis_inventory�  s4   € à×)Ò)Ñ+Ô+ˆÝÔ" 4¤?×#<Ò#<¸TÑ#BÔ#BÑCÔCÐCr'   c                 óJ  — |                       ¦   «         5  | j        rt          | ¦  «        ‚| j                             d¦  «        5 }|                      |¦  «        }ddd¦  «         n# 1 swxY w Y   |                      |d¬¦  «         |cddd¦  «         S # 1 swxY w Y   dS )z´Read the working inventory.

        :raises errors.InventoryModified: read_working_inventory will fail
            when the current in memory inventory has been modified.
        rd   NFr7   )ru   r=   r    r3   r¢   rk   r?   r£   s      r%   Úread_working_inventoryz+InventoryWorkingTree.read_working_inventory•  s(  € ð �^Š^ÑÔð 	ð 	ØÔ*ð .Ý'¨Ñ-Ô-Ð-Ø”×$Ò$ [Ñ1Ô1ð .°QØ×*Ò*¨1Ñ-Ô-�ð.ð .ð .ñ .ô .ð .ð .ð .ð .ð .ð .øøøð .ð .ð .ð .à×Ò ¨eÐÑ4Ô4Ð4Øð	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s5   •1BÁA(ÁBÁ(A,	Á,BÁ/A,	Á0BÂBÂBc                 ó>   — d„ |                       ¦   «         D ¦   «         S )z¡Iterate through file_ids for this tree.

        file_ids are in a WorkingTree if they are in the working inventory
        and the working file exists.
        c                 ó"   — h | ]\  }}|j         ’ŒS r,   )r’   ©r  r�   Úies      r%   ú	<setcomp>z4InventoryWorkingTree.all_file_ids.<locals>.<setcomp>­  s   € ÐFÐFÐF™x˜t R�”
ÐFÐFÐFr'   ©Úiter_entries_by_dirrW   s    r%   Úall_file_idsz!InventoryWorkingTree.all_file_ids§  s%   € ð GÐF¨4×+CÒ+CÑ+EÔ+EÐFÑFÔFÐFr'   c                 ó>   — d„ |                       ¦   «         D ¦   «         S )Nc                 ó   — h | ]\  }}|’ŒS r,   r,   rk  s      r%   rm  z;InventoryWorkingTree.all_versioned_paths.<locals>.<setcomp>°  s   € Ð@Ð@Ð@™˜˜r�Ð@Ð@Ð@r'   rn  rW   s    r%   Úall_versioned_pathsz(InventoryWorkingTree.all_versioned_paths¯  s"   € Ø@Ð@ T×%=Ò%=Ñ%?Ô%?Ð@Ñ@Ô@Ð@r'   c                 ó´   — |                       ¦   «         5  |                      |¦  «        r|                      |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )z-Change the last revision in the working tree.N)r{   r  r  )r$   r&  s     r%   Úset_last_revisionz&InventoryWorkingTree.set_last_revision²  s¢   € à×!Ò!Ñ#Ô#ð 	:ð 	:Ø×)Ò)¨,Ñ7Ô7ð :Ø×+Ò+¨LÑ9Ô9Ð9ð	:ð 	:ð 	:ñ 	:ô 	:ð 	:ð 	:ð 	:ð 	:ð 	:ð 	:ð 	:øøøð 	:ð 	:ð 	:ð 	:ð 	:ð 	:s   •+AÁAÁAc                 ó   — g S )a!  Return the references needed to perform a check of this tree.

        The default implementation returns no refs, and is only suitable for
        trees that have no local caching and can commit on ghosts at any time.

        :seealso: breezy.check for details about check_refs.
        r,   rW   s    r%   Ú_get_check_refsz$InventoryWorkingTree._get_check_refs¸  s	   € ð ˆ	r'   c           	      óÎ  — |                       ¦   «         5  |                      ¦   «         }|                      ¦   «         5  |d|                      ¦   «         f         }t          t	          |                     |¦  «        ¦  «        ¦  «        dk    rt          j        d¦  «        ‚|                      ¦   «          ddd¦  «         n# 1 swxY w Y   ddd¦  «         dS # 1 swxY w Y   dS )zÝCheck the tree for consistency.

        :param references: A dict with keys matching the items returned by
            self._get_check_refs(), and values from looking those keys up in
            the repository.
        Útreesr   z#Mismatched basis inventory content.N)	ru   r¨   Úlast_revisionræ   rç   ré   r
   ÚBzrCheckErrorÚ	_validate)r$   Ú
referencesÚ
tree_basisÚ
repo_basiss       r%   Ú_checkzInventoryWorkingTree._checkÂ  sZ  € ð �^Š^ÑÔð 	!ð 	!ØŸšÑ*Ô*ˆJØ×%Ò%Ñ'Ô'ð !ð !Ø'¨°$×2DÒ2DÑ2FÔ2FÐ(GÔH�
Ý•t˜J×3Ò3°JÑ?Ô?Ñ@Ô@ÑAÔAÀAÒEÐEÝ Ô.Ø=ñ?ô ?ð ?à—’Ñ Ô Ð ð!ð !ð !ñ !ô !ð !ð !ð !ð !ð !ð !øøøð !ð !ð !ð !ð	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!ð 	!ð 	!ð 	!ð 	!ð 	!øøøð 	!ð 	!ð 	!ð 	!ð 	!ð 	!s5   •)C¾A8CÂ6CÃC	ÃCÃ	C	Ã
CÃCÃ!Cc                 ó  — |                       ¦   «         5  |                      ¦   «         }i }|D ]/}|\  }}|dk    r"| j        j                             |¦  «        ||<   Œ0|                      |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )z,Check that the working state is/isn't valid.ry  N)ru   rw  r2   rR   Úrevision_treer€  )r$   Ú
check_refsÚrefsÚrefr”   Úvalues         r%   Úcheck_statez InventoryWorkingTree.check_stateÒ  sÞ   € à�^Š^ÑÔð 	ð 	Ø×-Ò-Ñ/Ô/ˆJØˆDØ!ð Lð L�Ø!‘��eØ˜7’?�?Ø $¤Ô 6× DÒ DÀUÑ KÔ K�D˜‘IøØ�KŠK˜ÑÔÐð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   •AB Â BÂBc                 óŒ  — |                       ¦   «         5  |€|                      ¦   «         }|s*| j        j                             t
          j        ¦  «        }n%| j        j                             |d         ¦  «        }|                      |j        ¦  «         |  	                    |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )zÈReset the state of the working tree.

        This does a hard-reset to a last-known-good state. This is a way to
        fix if something got corrupted (like the .bzr/checkout/dirstate file)
        Nr   )
r{   Úget_parent_idsr2   rR   r‚  r  r  r�   r  Úset_parent_ids)r$   Úrevision_idsÚrts      r%   Úreset_statez InventoryWorkingTree.reset_stateÝ  s  € ð ×!Ò!Ñ#Ô#ð 		.ð 		.ØÐ#Ø#×2Ò2Ñ4Ô4�Øð KØ”[Ô+×9Ò9Ý!Ô/ñ1ô 1��ð ”[Ô+×9Ò9¸,Àq¼/ÑJÔJ�Ø×!Ò! "Ô"3Ñ4Ô4Ð4Ø×Ò Ñ-Ô-Ð-ð		.ð 		.ð 		.ñ 		.ô 		.ð 		.ð 		.ð 		.ð 		.ð 		.ð 		.ð 		.øøøð 		.ð 		.ð 		.ð 		.ð 		.ð 		.s   •BB9Â9B=Ã B=c                 ó@  — | j         j        dk    rt          j        | ¦  «        ‚t	          ¦   «         }|                      | j        |¦  «         |                     d¦  «         | j         	                    d|| j
                             ¦   «         ¬¦  «         d| _        dS )z&Write the in memory inventory to disk.Úwr   rd   r˜   FN)r:   Ú
_lock_moder
   ÚNotWriteLockedr   rf   r>   Úseekr3   rœ   rD   r�   r=   )r$   rŸ   s     r%   r€   zInventoryWorkingTree.flushî  s™   € ð ÔÔ)¨SÒ0Ð0ÝÔ'¨Ñ-Ô-Ð-Ý‰iŒiˆØ�Š˜œ¨Ñ-Ô-Ð-Ø�Š�‰ŒˆØŒ× Ò  ¨cØ&*¤o×&DÒ&DÑ&FÔ&Fð 	!ñ 	Hô 	Hð 	Hà&+ˆÔ#Ð#Ð#r'   c                 óÔ   — 	 t          j        |                      |¦  «        ¦  «        j        S # t          $ r/}|j        t
          j        k    rt          j        |¦  «        ‚‚ d}~ww xY w)zSee Tree.get_file_mtime.N)	rŒ   rÍ   r^   Úst_mtimeÚOSErrorÚerrnoÚENOENTrI   rJ   r  s      r%   Úget_file_mtimez#InventoryWorkingTree.get_file_mtimeú  sh   € ð	Ý”8˜DŸLšL¨Ñ.Ô.Ñ/Ô/Ô8Ð8øÝð 	ð 	ð 	ØŒw�%œ,Ò&Ð&Ý$Ô/°Ñ5Ô5Ð5Øøøøøð	øøøs   ‚+. ®
A'¸*A"Á"A'c                 ó   — |                       |¦  «        }	  ||¦  «        }n8# t          $ r+}t          |dd¦  «        t          j        k    rY d}~dS ‚ d}~ww xY w ||j        ¦  «        }|dk    r|                      ||¦  «        S |dk    r|                      |¦  «        rd}|dddfS |dk    rt          j	        |¦  «        }ddd|fS |dddfS )zSee Tree.path_content_summary.r–  N)ÚmissingNNNr‰   rˆ   útree-referencerŠ   )
r^   r•  rN  r–  r—  Úst_modeÚ_file_content_summaryrU   r   Úreadlink)	r$   r�   Ú_lstatÚ_mapperr^   Ústat_resultr  r”   Útargets	            r%   Úpath_content_summaryz)InventoryWorkingTree.path_content_summary  s  € ð —,’,˜tÑ$Ô$ˆð	Ø ˜& ™/œ/ˆKˆKøÝð 	ð 	ð 	Ý�q˜' 4Ñ(Ô(­E¬LÒ8Ð8à4Ð4Ð4Ð4Ð4Ð4àøøøøð	øøøð ˆw�{Ô*Ñ+Ô+ˆØ�6Š>ˆ>Ø×-Ò-¨d°KÑ@Ô@Ð@Ø�[Ò Ð ð ×0Ò0°Ñ6Ô6ð (Ø'�Ø˜˜t TÐ)Ð)Ø�YÒÐÝÔ% gÑ.Ô.ˆFØ˜t T¨6Ð2Ð2à˜$  dÐ+Ð+s   —# £
A­AÁAÁAc                 óp   — |j         }|                      ||¦  «        }d|||                      ||¦  «        fS )Nr‰   )Úst_sizeÚ!_is_executable_from_path_and_statÚ_sha_from_stat)r$   r�   r¡  ÚsizeÚ
executables        r%   r�  z*InventoryWorkingTree._file_content_summary  sG   € ØÔ"ˆØ×;Ò;¸DÀ+ÑNÔNˆ
à˜˜j¨$×*=Ò*=Ø�+ñ+ô +ð  ð 	 r'   c                 ód   — 	 |                       |¦  «        j        S # t          j        $ r Y dS w xY wrY   )Ú_path2ier©  rI   rJ   ©r$   r�   r¡  s      r%   Ú,_is_executable_from_path_and_stat_from_basiszAInventoryWorkingTree._is_executable_from_path_and_stat_from_basis%  sC   € ð	Ø—=’= Ñ&Ô&Ô1Ð1øÝÔ(ð 	ð 	ð 	ð �5�5ð	øøøs   ‚ œ/®/c                 óp   — |j         }t          t          j        |¦  «        ot          j        |z  ¦  «        S r"   )rœ  ÚboolrF   ÚS_ISREGÚS_IEXEC)r$   r�   r¡  r™   s       r%   Ú+_is_executable_from_path_and_stat_from_statz@InventoryWorkingTree._is_executable_from_path_and_stat_from_stat-  s.   € ØÔ"ˆÝ•D”L Ñ&Ô&Ð>­4¬<¸$Ñ+>Ñ?Ô?Ð?r'   c                 ó  — |                       ¦   «         s|                      |¦  «        }|j        S t          j        |                      |¦  «        ¦  «        j        }t          t          j	        |¦  «        ot          j
        |z  ¦  «        S r"   )Ú_supports_executabler«  r©  rŒ   rÍ   r^   rœ  r¯  rF   r°  r±  )r$   r�   rl  r™   s       r%   Úis_executablez"InventoryWorkingTree.is_executable1  sr   € Ø×(Ò(Ñ*Ô*ð 	DØ—’˜tÑ$Ô$ˆBØ”=Ð å”8˜DŸLšL¨Ñ.Ô.Ñ/Ô/Ô7ˆDÝ�œ TÑ*Ô*ÐB­t¬|¸dÑ/BÑCÔCÐCr'   c                 ó‚   — |                       ¦   «         s|                      ||¦  «        S |                      ||¦  «        S r"   )r´  r­  r²  r¬  s      r%   r¦  z6InventoryWorkingTree._is_executable_from_path_and_stat9  sR   € Ø×(Ò(Ñ*Ô*ð 	#Ø×DÒDØ�kñ#ô #ð #ð ×CÒCØ�kñ#ô #ð #r'   c                 ó  — |                       ¦   «         5  | j        }t          |||¦  «        D ]?\  }}}|€|                     ||¬¦  «         n|                     |||¬¦  «         d| _        Œ@	 ddd¦  «         dS # 1 swxY w Y   dS )zSee MutableTree._add.N)r”   )r”   r’   T)r{   r  ÚzipÚadd_pathr=   )r$   rõ   ÚkindsÚidsrB   r¤   r’   r”   s           r%   Ú_addzInventoryWorkingTree._addA  sê   € à×!Ò!Ñ#Ô#ð 	3ð 	3ð Ô%ˆCÝ$'¨¨s°EÑ$:Ô$:ð 3ð 3Ñ ��7˜DØ�?Ø—L’L ¨�LÑ.Ô.Ð.Ð.à—L’L ¨°w�LÑ?Ô?Ð?Ø.2�Ô+Ð+ð3ð	3ð 	3ð 	3ñ 	3ô 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3øøøð 	3ð 	3ð 	3ð 	3ð 	3ð 	3s   •AA<Á<B ÂB c                 óÆ  — |€L|                       ¦   «         r7t                               t          j                             |¦  «        ¦  «        }n"|                       ¦   «         st          ¦   «         ‚|                      ¦   «         5  t          j        |  	                    |¦  «        ¦  «         |  
                    |gdg|g¬¦  «         |cddd¦  «         S # 1 swxY w Y   dS )zSee MutableTree.mkdir().Nrˆ   )r»  )Úsupports_setting_file_idsÚgenerate_idsÚgen_file_idrŒ   r�   rŽ   ÚSettingFileIdUnsupportedrz   Úmkdirr^   r�   )r$   r�   r’   s      r%   rÂ  zInventoryWorkingTree.mkdirQ  s  € àˆ?Ø×-Ò-Ñ/Ô/ð KÝ&×2Ò2µ2´7×3CÒ3CÀDÑ3IÔ3IÑJÔJ�øà×1Ò1Ñ3Ô3ð 1Ý.Ñ0Ô0Ð0Ø�_Š_ÑÔð 	ð 	ÝŒH�T—\’\ $Ñ'Ô'Ñ(Ô(Ð(Ø�HŠH�d�V˜k˜]°°	ˆHÑ:Ô:Ð:Øð	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ÂACÃCÃCc                 óh  — ||                       ¦   «         k    r†	 |                      ¦   «         }	 t          j                             |¦  «        }|j        |k    rt          | j        j        ||¦  «        S n*# t          j
        $ r Y nw xY w# t          j        $ r Y nw xY wt          j        | |¦  «        ‚)zSee WorkingTree.revision_id.)rz  rf  r+  r,  r#  r  r   r2   rR   Ú
serializerÚBadInventoryFormatrI   rJ   r
   ÚNoSuchRevisionInTree)r$   r  Ú	xml_linesrB   s       r%   r‚  z"InventoryWorkingTree.revision_tree^  sÞ   € à˜$×,Ò,Ñ.Ô.Ò.Ð.ðØ ×5Ò5Ñ7Ô7�	ðÝÔ,×FÒFÀyÑQÔQ�Cð ”¨+Ò5Ð5Ý4Ø œKÔ2°C¸ñ Fô  Fð Fð 6øõ "Ô4ð ð ð Ø�Dðøøøøõ "Ô,ð ð ð Ø�ðøøøõ Ô)¨$°Ñ<Ô<Ð<s#   šB
 ¯AA5 Á5BÂBÂ
BÂBc                 ó„  — |                       ¦   «         5  |                      |¦  «        }|€t          j        |¦  «        ‚g }|                      ¦   «         D �]	}	 |                      |¦  «        }n4# t          j        $ r" | j        j	                             |¦  «        }Y nw xY w|                      ¦   «         5  	 | 
                    |¦  «        }n # t          j        $ r Y ddd¦  «         Œ–w xY w|dk    r	 ddd¦  «         Œ­|                     |¦  «        }||                     |¦  «        f}	|	|vr|                     |	¦  «         ddd¦  «         n# 1 swxY w Y   �Œ| j        j	                             ¦   «         }
|
                     |¦  «        }g }|D ]}||v r|                     |¦  «         Œ| j        j	        j                             ¦   «         }|                      |¦  «        }||f}|                     |||¦  «         d„ |                     |¦  «        D ¦   «         }|cddd¦  «         S # 1 swxY w Y   dS )ap  See Tree.annotate_iter

        This implementation will use the basis tree implementation if possible.
        Lines not in the basis are attributed to CURRENT_REVISION

        If there are pending merges, lines added by those merges will be
        incorrectly attributed to CURRENT_REVISION (but after committing, the
        attribution will be correct).
        Nr‰   c                 ó(   — g | ]\  }}|d          |f‘ŒS )éÿÿÿÿr,   )r  r9  Úlines      r%   r  z6InventoryWorkingTree.annotate_iter.<locals>.<listcomp>¦  s:   € ð Oð Oð OÙ(˜s Dð   œG T˜?ð Oð Oð Or'   )ru   r‹   rI   rJ   r‰  r‚  r
   rÆ  r2   rR   r”   Úid2pathÚget_file_revisionrÊ   Úget_file_graphÚheadsÚtextsÚget_annotatorÚget_file_textÚadd_special_textÚannotate_flat)r$   r�   Údefault_revisionr’   Úmaybe_file_parent_keysrÁ   Úparent_treer”   rË   Úparent_text_keyÚgraphrÏ  Úfile_parent_keysr9  Ú	annotatorÚtextÚthis_keyÚannotationss                     r%   Úannotate_iterz"InventoryWorkingTree.annotate_iterr  sj  € ð �^Š^ÑÔð +	ð +	Ø—l’l 4Ñ(Ô(ˆGØˆÝ$Ô/°Ñ5Ô5Ð5Ø%'Ð"Ø!×0Ò0Ñ2Ô2ð Gñ G�	ð#Ø"&×"4Ò"4°YÑ"?Ô"?�K�KøÝÔ2ð #ð #ð #Ø"&¤+Ô"8×"FÒ"FØ!ñ##ô ##�K�K�Kð#øøøð !×*Ò*Ñ,Ô,ð Gð Gð!Ø*×/Ò/°Ñ5Ô5˜˜øÝ)Ô4ð !ð !ð !Ø ðGð Gð Gñ Gô Gð Gð Gð!øøøà˜v’~�~ð
 !ðGð Gð Gñ Gô Gð Gð Gð #.×"5Ò"5°gÑ">Ô">�KàØ#×5Ò5°kÑBÔBð'D�Oð 'Ð.DÐDÐDØ.×5Ò5°oÑFÔFÐFð#Gð Gð Gñ Gô Gð Gð Gð Gð Gð Gð Gøøøð Gð Gð Gð Gùð$ ”KÔ*×9Ò9Ñ;Ô;ˆEØ—K’KÐ 6Ñ7Ô7ˆEØ!ÐØ-ð 1ð 1�Ø˜%�<�<Ø$×+Ò+¨CÑ0Ô0Ð0øð œÔ.Ô4×BÒBÑDÔDˆIØ×%Ò% dÑ+Ô+ˆDØÐ!1Ð2ˆHØ×&Ò& xÐ1AÀ4ÑHÔHÐHðOð OØ,5×,CÒ,CÀHÑ,MÔ,MðOñ Oô OˆKàðW+	ð +	ð +	ð +	ñ +	ô +	ð +	ð +	ð +	ð +	ð +	ð +	øøøð +	ð +	ð +	ð +	ð +	ð +	s’   •AH5ÁA1Á0H5Á1.B"ÂH5Â!B"Â"H5Â9EÂ;CÃEÃC.	Ã EÃ!H5Ã-C.	Ã.
EÃ8H5ÄAEÅ	H5ÅEÅH5ÅEÅCH5È5H9È<H9c                 óÌ   — |                       ¦   «          t                               ||¦  «        }| j                             ||| j                             ¦   «         ¬¦  «         d S )Nr˜   )rr   rF  Úrio_filer3   rœ   rD   r�   )r$   rû   ÚstanzasÚheaderÚmy_files        r%   r2  zInventoryWorkingTree._put_rioª  sl   € Ø×ÒÑÔÐÝ×#Ò# G¨VÑ4Ô4ˆØŒ× Ò  ¨7Ø&*¤o×&DÒ&DÑ&FÔ&Fð 	!ñ 	Hô 	Hð 	Hð 	Hð 	Hr'   c                 ó¸   ‡ ‡— ˆˆ fd„}‰                       ¦   «         5  ‰                      d |¦   «         t          ¦  «         d d d ¦  «         d S # 1 swxY w Y   d S )Nc               3   óÒ   •K  — ‰                      ¦   «         D ]N\  } }‰                     | ¦  «        }|€Œt                               |                     d¦  «        |¬¦  «        V — ŒOd S )NÚutf8)r’   Úhash)Úitemsr‹   rF  ÚStanzaÚdecode)r�   Úsha1r’   Úmodified_hashesr$   s      €€r%   Úiter_stanzasz=InventoryWorkingTree.set_merge_modified.<locals>.iter_stanzas±  s„   øè è € Ø-×3Ò3Ñ5Ô5ð 1ð 1‘
��dØŸ,š, tÑ,Ô,�Ø�?ØÝ—o’o¨g¯nªn¸VÑ.DÔ.DØ+/ð &ñ 1ô 1ð 1ð 1ð 1ð 1ð	1ð 1r'   úmerge-hashes)r{   r2  ÚMERGE_MODIFIED_HEADER_1)r$   rí  rî  s   `` r%   Úset_merge_modifiedz'InventoryWorkingTree.set_merge_modified°  s½   øø€ ð	1ð 	1ð 	1ð 	1ð 	1ð 	1ð ×!Ò!Ñ#Ô#ð 	3ð 	3Ø�MŠM˜.¨,¨,©.¬.Ý1ñ3ô 3ð 3ð	3ð 	3ð 	3ñ 	3ô 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3øøøð 	3ð 	3ð 	3ð 	3ð 	3ð 	3s   �%AÁAÁAc                 óZ  — |                       ¦   «         5  	 | j                             d¦  «        }n## t          j        $ r i cY cddd¦  «         S w xY w	 i }	 t          |¦  «        t          dz   k    rt          j        ¦   «         ‚n!# t          $ r t          j        ¦   «         ‚w xY wt                               |¦  «        D ]¡}t                               |                     d¦  «        ¦  «        }	 |                      |¦  «        }n# t          j        $ r Y ŒWw xY w|                     d¦  «                             d¦  «        }||                      |¦  «        k    r|||<   Œ¢||                     ¦   «          cddd¦  «         S # |                     ¦   «          w xY w# 1 swxY w Y   dS )a{  Return a dictionary of files modified by a merge.

        The list is initialized by WorkingTree.set_merge_modified, which is
        typically called after we make some automatic updates to the tree
        because of a merge.

        This returns a map of file_id->sha1, containing only files which are
        still in the working inventory and have that text hash.
        rï  NrB  r’   rè  Úascii)ru   r3   r¢   rI   rJ   rC  rð  r
   ÚMergeModifiedFormatErrorrE  rF  rG  Ú
cache_utf8ÚencoderÌ  ÚNoSuchIdÚget_file_sha1rI  )r$   ÚhashfileÚmerge_hashesÚsr’   r�   Ú	text_hashs          r%   Úmerge_modifiedz#InventoryWorkingTree.merge_modified¼  s+  € ð �^Š^ÑÔð 	!ð 	!ðØœ?×.Ò.¨~Ñ>Ô>��øÝ!Ô,ð ð ð Ø�	�	ð		!ð 	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!ðøøøð!Ø!�ð<Ý˜H‘~”~Õ)@À5Ñ)HÒHÐHÝ$Ô=Ñ?Ô?Ð?ð Iøå$ð <ð <ð <Ý Ô9Ñ;Ô;Ð;ð<øøøå!×+Ò+¨HÑ5Ô5ð 
7ð 
7�Aõ )×/Ò/°·²°iÑ0@Ô0@ÑAÔA�Gð!Ø#Ÿ|š|¨GÑ4Ô4˜˜øÝ!œ?ð !ð !ð !Ø ˜ð!øøøà !§¢ f¡¤× 4Ò 4°WÑ =Ô =�IØ  D×$6Ò$6°tÑ$<Ô$<Ò<Ð<Ø-6˜ TÑ*øØ#à—’Ñ Ô Ð ð3	!ð 	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!øð2 —’Ñ Ô Ð Ð øøøð3	!ð 	!ð 	!ð 	!øøøð 	!ð 	!ð 	!ð 	!ð 	!ð 	!s‡   •F —2±F ²AÁF ÁAÁF ÁFÁ.BÂFÂB&Â&AFÃ3D	ÄFÄ	DÄFÄDÄAFÅ&F ÆFÆF Æ F$Æ'F$c                 ób  ‡— ˆfd„Š|                       ¦   «         5  |                     d¦  «        |                      d¦  «        k    rt          j        | |d¦  «        ‚	 |                      |j        ¦  «        }n)# t          j        $ r t          j        | |d¦  «        ‚w xY w|                      t          j        |¦  «        ¦  «        }|€t          j        | |d¦  «        ‚| j	        j
                             ¦   «         st          j        |¦  «        ‚|                     ¦   «         5  |j        j        }||_        t          j        |¦  «        |_        | j                             |¦  «          ‰| j        |¦  «         |                      | j        ¦  «         |                     ¦   «         D ]7}| j	                             |j	        |¦  «         |                      |¦  «         Œ8	 d d d ¦  «         n# 1 swxY w Y   |j                             ¦   «          d d d ¦  «         d S # 1 swxY w Y   d S )Nc                 óŒ   •— |j                              ¦   «         D ](}|| j        |j        <   |j        dk    r ‰| |¦  «         Œ)d S )Nrˆ   )ÚchildrenÚvaluesr¾   r’   r”   )rd   rÄ   Úchild_entryÚadd_childrens      €r%   r  z2InventoryWorkingTree.subsume.<locals>.add_childrenâ  sZ   ø€ Ø$œ~×4Ò4Ñ6Ô6ð 9ð 9�Ø7B�	” Ô 3Ñ4ØÔ# {Ò2Ð2Ø �L ¨KÑ8Ô8Ð8øð9ð 9r'   r‡   zTrees have the same rootz"Tree is not contained by the otherz"Parent directory is not versioned.)rz   r‹   r
   ÚBadSubsumeSourcer[   r1   ÚPathNotChildr   Údirnamer2   rR   Úsupports_rich_rootÚSubsumeTargetNeedsUpgrader{   r  r¼   rÁ   rŽ   r•   r�   r�   r‰  ÚfetchÚadd_parent_tree_idrD   Úretire_bzrdir)r$   Ú
other_treeÚother_tree_pathÚnew_root_parentÚ
other_rootrÁ   r  s         @r%   ÚsubsumezInventoryWorkingTree.subsumeá  sÞ  ø€ ð	9ð 	9ð 	9ð 	9ð 	9ð
 �_Š_ÑÔð 	2ð 	2Ø×!Ò! "Ñ%Ô%¨¯ª°bÑ)9Ô)9Ò9Ð9ÝÔ-¨d°JØ.HñJô Jð JðLØ"&§,¢,¨zÔ/AÑ"BÔ"B��øÝÔ&ð Lð Lð LÝÔ-Ø˜*Ð&JñLô Lð LðLøøøð #Ÿlšl­7¬?¸?Ñ+KÔ+KÑLÔLˆOØÐ&ÝÔ-Ø˜*Ð&JñLô Lð Lð
 ”;Ô)×<Ò<Ñ>Ô>ð CÝÔ6°zÑBÔBÐBØ×+Ò+Ñ-Ô-ð 7ð 7Ø'Ô6Ô;�
Ø'6�
Ô$Ý")Ô"2°?Ñ"CÔ"C�
”ØÔ#×'Ò'¨
Ñ3Ô3Ð3Ø�˜TÔ0°*Ñ=Ô=Ð=Ø×%Ò% dÔ&9Ñ:Ô:Ð:ð ",×!:Ò!:Ñ!<Ô!<ð 7ð 7�IØ”K×%Ò% jÔ&7¸ÑCÔCÐCØ×+Ò+¨IÑ6Ô6Ð6Ð6ð7ð7ð 7ð 7ñ 7ô 7ð 7ð 7ð 7ð 7ð 7ð 7øøøð 7ð 7ð 7ð 7ð Ô!×/Ò/Ñ1Ô1Ð1ð=	2ð 	2ð 	2ñ 	2ô 	2ð 	2ð 	2ð 	2ð 	2ð 	2ð 	2ð 	2øøøð 	2ð 	2ð 	2ð 	2ð 	2ð 	2sP   ›AH$ÁA:Á9H$Á:&B Â BH$Ä(B>G3Ç'H$Ç3G7	Ç7H$Ç:G7	Ç;H$È$H(È+H(c                 óR  ‡ — ˆ fd„}‰                       ¦   «         5  ‰                      ¦   «           ||¦  «        }|€‰ j                             ¦   «         }|                     ¦   «          |                     |¦  «        }	 |                     ¦   «         }n)# t          j        $ r | 	                    ¦   «         }Y nw xY w| 
                    ¦   «         st          j        ¦   «         ‚|                     ¦   «         }|                     ‰ j        ¦  «         ‰                      ¦   «         D ]}|                     ‰ j        |¦  «         Œ‰ j        j                             |¦  «        }	|	j        |j        k    r+|                     |	¦  «        }
|
                     |¦  «         n|}
|
                     t,          j        ¦  «        }|                     ‰                      ¦   «         ¦  «         ‰ j        }t4                               d¬¦  «        }‰                      |¦  «        }|                     |¦  «        }|                     |¦  «         d|_        |                      |¦  «         ‰  !                    |¦  «         | !                    |¦  «         |cddd¦  «         S # 1 swxY w Y   dS )zuExtract a subtree from this tree.

        A new branch will be created, relative to the path for this tree.
        c                 ó®   •— t          j        | ¦  «        }‰j        j        j        }|D ]+}|                     |¦  «        }|                     ¦   «          Œ,|S r"   )r   Ú	splitpathr2   rD   Úroot_transportÚcloneÚensure_base)r�   Úsegmentsr   r•   r$   s       €r%   Úmkdirsz,InventoryWorkingTree.extract.<locals>.mkdirs  s[   ø€ ÝÔ(¨Ñ.Ô.ˆHØœÔ.Ô=ˆIØ ð (ð (�Ø%ŸOšO¨DÑ1Ô1�	Ø×%Ò%Ñ'Ô'Ð'Ð'ØÐr'   N)Úroot_id)"r{   r€   rD   Úcloning_metadirr  Úinitialize_on_transportÚfind_repositoryr
   ÚNoRepositoryPresentÚcreate_repositoryr  ÚRootNotRichÚcreate_branchÚpullr2   r‰  r	  r  r  ÚbaseÚset_branch_referenceÚcreate_workingtreer  r  rŠ  r  rd   rƒ   r‹   rÀ   Úremove_recursive_idrÁ   r�   r�   )r$   Úsub_pathrÙ   r  Úbranch_transportÚbranch_bzrdirÚrepoÚ
new_branchrÁ   Útree_transportÚtree_bzrdirÚwtÚmy_invÚ	child_invr’   Únew_roots   `               r%   ÚextractzInventoryWorkingTree.extract  sã  ø€ ð
	ð 	ð 	ð 	ð 	ð ×!Ò!Ñ#Ô#ð #	ð #	Ø�JŠJ‰LŒLˆLØ%˜v hÑ/Ô/ÐØˆ~Øœ×8Ò8Ñ:Ô:�Ø×(Ò(Ñ*Ô*Ð*Ø"×:Ò:Ð;KÑLÔLˆMð9Ø$×4Ò4Ñ6Ô6��øÝÔ-ð 9ð 9ð 9Ø$×6Ò6Ñ8Ô8���ð9øøøà×*Ò*Ñ,Ô,ð +ÝÔ(Ñ*Ô*Ð*Ø&×4Ò4Ñ6Ô6ˆJØ�OŠO˜DœKÑ(Ô(Ð(Ø!×0Ò0Ñ2Ô2ð 9ð 9�	Ø× Ò  ¤¨iÑ8Ô8Ð8Ð8Ø!œ_Ô;×AÒAÀ(ÑKÔKˆNØÔ"Ð&6Ô&;Ò;Ð;Ø$×<Ò<¸^ÑLÔL�Ø×0Ò0°Ñ<Ô<Ð<Ð<à+�Ø×/Ò/µÔ0KÑLÔLˆBØ×Ò˜d×1Ò1Ñ3Ô3Ñ4Ô4Ð4àÔ(ˆFÝ!×+Ò+°DÐ+Ñ9Ô9ˆIØ—l’l 8Ñ,Ô,ˆGØ×'Ò'¨Ñ0Ô0ˆHØ×&Ò& wÑ/Ô/Ð/Ø!%ˆHÔØ�MŠM˜(Ñ#Ô#Ð#Ø×!Ò! &Ñ)Ô)Ð)Ø×Ò 	Ñ*Ô*Ð*ØðG#	ð #	ð #	ð #	ñ #	ô #	ð #	ð #	ð #	ð #	ð #	ð #	øøøð #	ð #	ð #	ð #	ð #	ð #	s7   ›A$JÂ BÂJÂ#B;Â8JÂ:B;Â;GJÊJ Ê#J c              #   ó   K  — t                                ¦   «         5 }|                     |                      ¦   «         ¦  «         |€|du rddd| j        j        fV — t          j        }| j        j	        j
                             dd¦  «        d         }t          t          t          t          d	œ}|�:|                      |¦  «        \  }	}
|
€	 ddd¦  «         dS  || j        |¦  «        }n| j        }	|	j        j        }
| j        }t'          t)          j        |¦  «        ¦  «        }t-          |¦  «        }|	|
d||fg}|�rw|d
         \  }}
}}}|�rO|                     ¦   «         }||k    rŒ|dz   |z   }|dz   |z   }|                     |
¦  «        }|j        dk    r|j                             |¦  «        }nd}|rd}n‘|                      |dd…         ¦  «        rd}nqt          j        |¦  «        \  }}||k    s|sd}nO|}|dz   |z   }|dz   |z   }|                     |
|¦  «        }|rd}n"|                      |dd…         ¦  «        rd}nd}t          j        |¦  «        }|dk    ry|                       |¦  «        rd|sd}n_|  !                    |¦  «        }|                     |                     ¦   «         ¦  «         |j        }|                     |j        ¦  «        }d}|r|dd…         |||fV — nN	 |dd…         || ||         ¦   «         fV — n,# tD          $ r |dd…         ||tG          ¦   «         fV — Y nw xY w�Œõ|dk    r�Œý|rPt'          t)          j        |¦  «        ¦  «        }t-          |¦  «        }| $                    ||j        |||f¦  «         n|�°O| %                    ¦   «          |�°wddd¦  «         dS # 1 swxY w Y   dS )a¿  List all files as (path, class, kind, id, entry).

        Lists, but does not descend into unversioned directories.
        This does not include files that have been deleted in this
        tree. Skips the control directory.

        :param include_root: if True, return an entry for the root
        :param from_dir: start from this directory or None for the root
        :param recursive: whether to recurse into subdirectories or not
        NTr‡   ÚVrˆ   ú/r   r   )rˆ   r‰   rŠ   r›  rÊ  rÞ   rß   r›  )&Ú
contextlibÚ	ExitStackÚenter_contextru   r  r¼   r   ÚpathjoinrD   r   r"  Úrsplitr   r   r   r   Ú_path2inv_file_idr1   r’   r;  rŒ   rñ   r   ÚpopleftrÀ   r”   r   r¢   rí   Únormalized_filenameÚ	get_childÚ	file_kindrU   r  ÚKeyErrorr   rÊ   Úpop)r$   Úinclude_rootÚfrom_dirÚ	recursiveÚrecurse_nestedÚ
exit_stackr8  Útransport_base_dirÚ
fk_entriesÚfrom_invÚfrom_dir_idÚfrom_dir_abspathr   ÚstackrB   Úfrom_dir_relpathr¤   ÚfpÚfapÚdir_ieÚf_ieÚcÚf_normÚ
can_accessÚfkÚsubtreeÚnew_childrens                              r%   Ú
list_fileszInventoryWorkingTree.list_files9  s  è è € õ ×!Ò!Ñ#Ô#ð ~	  zØ×$Ò$ T§^¢^Ñ%5Ô%5Ñ6Ô6Ð6ØÐ L°DÐ$8Ð$8Ø˜3 ¨TÔ-@Ô-EÐFÐFÐFÐFåÔ'ˆHð "&¤Ô!:Ô!?×!FÒ!FØ�Qñ"ô "Øô"Ðõ +Ý Ý#Ý"/ð	ð ˆJð Ð#Ø(,×(>Ò(>¸xÑ(HÔ(HÑ%�˜+ØÐ&àð3~	 ð ~	 ð ~	 ñ ~	 ô ~	 ð ~	 ð ~	 ð ~	 ð4 $, 8¨D¬L¸(Ñ#CÔ#CÐ Ð àÔ.�Ø&œmÔ3�Ø#'¤<Ð Ý�bœjÐ)9Ñ:Ô:Ñ;Ô;ˆHõ ˜X‘”ˆHØ ¨RÐ1AÀ8ÐLÐMˆEØñ Y à" 2œYñ��kÐ#3Ð5EØàñ U Ø ×(Ò(Ñ*Ô*�Að *¨QÒ.Ð.Ø ð *¨CÑ/°!Ñ3�Bð +¨SÑ0°1Ñ4�Cà Ÿ]š]¨;Ñ7Ô7�FØ”{ kÒ1Ð1Ø%œ×2Ò2°1Ñ5Ô5˜˜à#˜Øð (Ø˜˜ØŸš¨¨A¨B¨B¬Ñ0Ô0ð (Ø˜˜õ
 .5Ô-HÈÑ-KÔ-KÑ*˜ 
Ø š;˜;¨j˜;à #˜A˜Að
 !'˜AØ!1°CÑ!7¸!Ñ!;˜BØ"2°SÑ"8¸1Ñ"<˜CØ#&§=¢=°¸aÑ#@Ô#@˜DØ#ð (Ø$'  Ø!%§¢°°A°B°B´Ñ!8Ô!8ð (Ø$'  à$' å Ô*¨3Ñ/Ô/�BØ˜[Ò(Ð(¨T×-NÒ-NÈqÑ-QÔ-QÐ(Ø-ð -Ø!1˜B˜Bà&*×&:Ò&:¸1Ñ&=Ô&=˜GØ&×4Ò4°W×5FÒ5FÑ5HÔ5HÑIÔIÐIØ")Ô"8˜CØ#&§=¢=°´Ñ#>Ô#>˜DØ!,˜Bð ð !Ø    œf a¨¨TÐ1Ð1Ð1Ð1Ð1ð=Ø"$ Q R R¤&¨!¨R°°¸B´Ñ1AÔ1AÐ"AÐAÐAÐAÐAøÝ'ð =ð =ð =Ø"$ Q R R¤&¨!¨Rµ±´Ð"<Ð<Ð<Ð<Ð<Ð<ð=øøøá à˜[Ò(Ð(Ù ð !ð Ý'-­b¬j¸©o¬oÑ'>Ô'>˜Ý',¨\Ñ':Ô':˜ØŸš c¨4¬<¸¸SÀ,Ð%OÑPÔPÐPð ðe ñ U ðj —I’I‘K”K�Kðs ñ Y ðK~	 ð ~	 ð ~	 ñ ~	 ô ~	 ð ~	 ð ~	 ð ~	 ð ~	 ð ~	 ð ~	 ð ~	 øøøð ~	 ð ~	 ð ~	 ð ~	 ð ~	 ð ~	 s>   œB/OÃHOË5LÌOÌ&L=Ì:OÌ<L=Ì=A9OÏOÏ
Oc                 ó®  — g }g }|€t          d¦  «        ‚t          |t          ¦  «        rt          ¦   «         ‚|                      ¦   «         5  |                      |¦  «        }t          j        |¦  «        s(t          j	        d|t          j
        |¦  «        ¦  «        ‚|                      |¦  «        s(t          j	        d|t          j        |¦  «        ¦  «        ‚|                      |¦  «        \  }}|€)t          j	        d|t          j        |¬¦  «        ¦  «        ‚|                     |¦  «        }	|	j        dk    r(t          j	        d|t          j
        |¦  «        ¦  «        ‚|D ]Ý}
t          j        |
¦  «        d         }|                      |
¦  «        \  }}|€)t          j	        |
|t          j        |
¬¦  «        ¦  «        ‚|                     |¦  «        }|j        }t          j        ||¦  «        }t(                               |
||||||¬¦  «        }|                     |¦  «         |                     |
|f¦  «         ŒÞ|                      ||¦  «        }| j        }	 t3          |¦  «        rd| _        |                      |¦  «         n# t6          $ r	 || _        ‚ w xY w|                      |¦  «         |cddd¦  «         S # 1 swxY w Y   dS )	aî  Rename files.

        to_dir must exist in the inventory.

        If to_dir exists and is a directory, the files are moved into
        it, keeping their old names.

        Note that to_dir is only the last component of the new name;
        this doesn't change the directory.

        For each entry in from_paths the move mode will be determined
        independently.

        The first mode moves the file in the filesystem and updates the
        inventory. The second mode only updates the inventory without
        touching the file on the filesystem.

        move uses the second mode if 'after == True' and the target is
        either not versioned or newly added, and present in the working tree.

        move uses the second mode if 'after == False' and the source is
        versioned but no longer in the working tree, and the target is not
        versioned but present in the working tree.

        move uses the first mode if 'after == False' and the source is
        versioned and present in the working tree, and the target is not
        versioned and not present in the working tree.

        Everything else results in an error.

        This returns a list of (from_path, to_path) pairs for each
        entry that is moved.
        Nz"You must supply a target directoryr‡   ©r�   rˆ   rÊ  ©Úfrom_relÚfrom_idÚ	from_tailÚfrom_parent_idÚto_relÚto_tailÚto_parent_idT)Ú	TypeErrorrá   râ   Ú
ValueErrorr{   r^   r   r]   r
   ÚBzrMoveFailedErrorÚNotADirectoryrR  ÚNotInWorkingDirectoryr:  ÚNotVersionedErrorrÀ   r”   r  rÁ   r8  r.   Ú_RenameEntryrÊ   Ú_determine_mv_moder=   ræ   Ú_moverw   r�   )r$   Ú
from_pathsÚto_dirÚafterÚrename_entriesÚrename_tuplesÚto_absÚto_invÚ	to_dir_idÚ	to_dir_ier[  r]  rH  r\  Ú
from_entryr^  r_  Úrename_entryÚoriginal_modifieds                      r%   ÚmovezInventoryWorkingTree.moveÅ  sg  € ðD ˆØˆð ˆ>ÝÐ@ÑAÔAÐAå�j¥#Ñ&Ô&ð 	Ý‘,”,ÐØ×!Ò!Ñ#Ô#ð 5	!ð 5	!Ø—\’\ &Ñ)Ô)ˆFÝ”= Ñ(Ô(ð >ÝÔ/Ø˜¥Ô 4°VÑ <Ô <ñ>ô >ð >à×$Ò$ VÑ,Ô,ð FÝÔ/Ø˜¥Ô <¸VÑ DÔ DñFô Fð Fà $× 6Ò 6°vÑ >Ô >ÑˆF�IØÐ ÝÔ/Ø˜¥Ô 8¸fÐ EÑ EÔ EñGô Gð Gð ×(Ò(¨Ñ3Ô3ˆIØŒ~ Ò,Ð,ÝÔ/Ø˜¥Ô 4°VÑ <Ô <ñ>ô >ð >ð 'ð 9ð 9�Ý#Ô-¨hÑ7Ô7¸Ô;�	Ø$(×$:Ò$:¸8Ñ$DÔ$DÑ!�˜'Ø�?Ý Ô3°H¸fÝ4:Ô4LÐRZÐ4[Ñ4[Ô4[ñ]ô ]ð ]ð &×/Ò/°Ñ8Ô8�
Ø!+Ô!5�Ý Ô)¨&°)Ñ<Ô<�Ý3×@Ò@Ø%Ø#Ø'Ø#1Ø!¨9Ø!*ð  Añ  ,ô  ,�ð ×%Ò% lÑ3Ô3Ð3Ø×$Ò$ h°Ð%7Ñ8Ô8Ð8Ð8ð "×4Ò4°^ÀUÑKÔKˆNà $Ô ;ÐðÝ�z‘?”?ð 7Ø26�DÔ/Ø—
’
˜>Ñ*Ô*Ð*Ð*øÝ ð ð ð à.?�Ô+Øðøøøð
 ×!Ò! &Ñ)Ô)Ð)Ø ðk5	!ð 5	!ð 5	!ð 5	!ñ 5	!ô 5	!ð 5	!ð 5	!ð 5	!ð 5	!ð 5	!ð 5	!øøøð 5	!ð 5	!ð 5	!ð 5	!ð 5	!ð 5	!s+   ÁHK
É%+JÊK
ÊJ$Ê$K
Ë
KËKc           
      ó¨  — |                       ¦   «         5  g }t          j        |¦  «        d         }|                      |¦  «        \  }}|€Ë| j        }| j                             ¦   «         }|                     |¦  «        \  }	}|€)t          j        ||t          j	        |¬¦  «        ¦  «        ‚	 | 
                    |¦  «        }
n~# t          j        $ r? |	 
                    |¦  «                             ¦   «         }
|                     |
¦  «         Y n1w xY w|                      |¦  «        \  }}| 
                    |¦  «        }
|
j        }t           j                             |¦  «        \  }}|                      |¦  «        \  }}t&                               |||||||¬¦  «        }|                     |¦  «         |                      ||¦  «        }|€)t          j        ||t          j	        |¬¦  «        ¦  «        ‚t1          d|||||¦  «         |                      |¦  «         |                      |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )aƒ  Rename one file.

        This can change the directory or the filename or both.

        rename_one has several 'modes' to work. First, it can rename a physical
        file and change the file_id. That is the normal mode. Second, it can
        only change the file_id without touching any physical file.

        rename_one uses the second mode if 'after == True' and 'to_rel' is not
        versioned but present in the working tree.

        rename_one uses the second mode if 'after == False' and 'from_rel' is
        versioned but no longer in the working tree, and 'to_rel' is not
        versioned but present in the working tree.

        rename_one uses the first mode if 'after == False' and 'from_rel' is
        versioned and present in the working tree, and 'to_rel' is not
        versioned and not present in the working tree.

        Everything else results in an error.
        rÊ  NrY  rZ  z[rename_one:
  from_id   {%s}
  from_rel: %r
  to_rel:   %r
  to_dir    %r
  to_dir_id {%s}
)r{   r   r  r:  r  r2   r¨   r
   ÚBzrRenameFailedErrorrg  rÀ   r÷  Úcopyr�   Ú_unpack_file_idrÁ   rŒ   r�   Úsplitr.   rh  rÊ   ri  rd  r   rj  r�   )r$   r[  r_  rm  rn  r]  rH  r\  r¨   Úbasis_from_invrt  Úfrom_inv_idr^  rl  r`  rq  rr  ru  s                     r%   Ú
rename_onezInventoryWorkingTree.rename_one'  sÏ  € ð, ×!Ò!Ñ#Ô#ð 9	*ð 9	*ØˆNõ  Ô)¨(Ñ3Ô3°BÔ7ˆIØ $× 6Ò 6°xÑ @Ô @ÑˆH�gØˆð  Ô.�Ø!œ[×3Ò3Ñ5Ô5�
Ø*4×*FÒ*FÀxÑ*PÔ*PÑ'� Ø�?Ý Ô5Ø  &ÝÔ0°hÐ?Ñ?Ô?ñAô Að Að-Ø!)×!3Ò!3°GÑ!<Ô!<�J�JøÝ”ð -ð -ð -à!/×!9Ò!9¸'Ñ!BÔ!B×!GÒ!GÑ!IÔ!I�JØ—L’L Ñ,Ô,Ð,Ð,Ð,ð-øøøð
 )-×(<Ò(<¸WÑ(EÔ(EÑ%�˜+Ø%×/Ò/°Ñ<Ô<�
Ø'Ô1ˆNÝ œgŸmšm¨FÑ3Ô3‰OˆF�GØ $× 6Ò 6°vÑ >Ô >ÑˆF�IÝ/×<Ò<Ø!ØØ#Ø-Ø wØ&ð =ñ (ô (ˆLð ×!Ò! ,Ñ/Ô/Ð/ð "×4Ò4°^ÀUÑKÔKˆNð Ð ÝÔ/Ø˜f¥fÔ&>ÀFÐ&KÑ&KÔ&KñMô Mð Mõ ð (ð ˜H f¨f°iñAô Að Að �JŠJ�~Ñ&Ô&Ð&Ø×!Ò! &Ñ)Ô)Ð)ðs9	*ð 9	*ð 9	*ñ 9	*ô 9	*ð 9	*ð 9	*ð 9	*ð 9	*ð 9	*ð 9	*ð 9	*øøøð 9	*ð 9	*ð 9	*ð 9	*ð 9	*ð 9	*s8   •BIÂ0CÃIÃADÄIÄDÄD&IÉIÉIc                   ó   — e Zd Z	 	 dd„ZdS )ú!InventoryWorkingTree._RenameEntryFc
                 ó„   — || _         || _        || _        || _        || _        || _        || _        |	| _        || _        d S r"   )	r[  r\  r]  r^  r_  r`  ra  Ú	change_idÚonly_change_inv)
r$   r[  r\  r]  r^  r_  r`  ra  r„  rƒ  s
             r%   r&   z*InventoryWorkingTree._RenameEntry.__init__y  sL   € ð %ˆDŒMØ"ˆDŒLØ&ˆDŒNØ"0ˆDÔØ ˆDŒKØ"ˆDŒLØ ,ˆDÔØ&ˆDŒNØ#2ˆDÔ Ð Ð r'   N)FF)r(   r)   r*   r&   r,   r'   r%   rh  r�  x  s.   € € € € € àDIØ$ð	3ð 	3ð 	3ð 	3ð 	3ð 	3r'   rh  c           	      óÎ  — | j         }|D �]Y}|j        }|j        }|j        }|                     |¦  «        }d}	|€)t          j        ||t          j        |¬¦  «        ¦  «        ‚|�¤d}
|ru|                      ¦   «         }| 	                    ¦   «         5  	 | 
                    |¦  «         n# t
          j        $ r d|_        d}
Y nw xY wddd¦  «         n# 1 swxY w Y   |
s)t          j        ||t          j        |¬¦  «        ¦  «        ‚|rC|                      |¦  «        s*t          j        ||t          j        |d¬¦  «        ¦  «        ‚d}	�n|                      |¦  «        s|                      |¦  «        rd}	nà|                      |¦  «        r|                      |¦  «        sd}	n³| j        sB|                     ¦   «         |                     ¦   «         k    r|                      |¦  «        rd}	nj|                      |¦  «        s@|                      |¦  «        s+t          j        ||t          j        ||f¬¦  «        ¦  «        ‚t          j        ||¦  «        ‚|	|_        �Œ[|S )zªDetermines for each from-to pair if both inventory and working tree
        or only the inventory has to be changed.

        Also does basic plausability tests.
        FNrY  Tz!New file has not been created yet)r�   Úextra)Úpaths)r  r[  r\  r_  r‹   r
   rd  rg  r¨   ru   rÌ  r÷  rƒ  ÚAlreadyVersionedErrorrR  rI   rJ   rH   Úlowerry  ÚPathsDoNotExistÚRenameFailedFilesExistr„  )r$   rn  rm  rB   ru  r[  r\  r_  Úto_idr„  ÚallowedÚbasiss               r%   ri  z'InventoryWorkingTree._determine_mv_mode†  s"  € ð Ô!ˆà*ð 7	;ñ 7	;ˆLà#Ô,ˆHØ"Ô*ˆGØ!Ô(ˆFØ—K’K Ñ'Ô'ˆEØ#ˆOð ˆÝÔ/Ø˜f¥fÔ&>ÀHÐ&MÑ&MÔ&MñOô Oð OàÐ Ø�àð +Ø ŸOšOÑ-Ô-�EØŸšÑ*Ô*ð +ð +ð+Ø!ŸMšM¨%Ñ0Ô0Ð0Ð0øÝ%œð +ð +ð +Ø59˜LÔ2Ø&*˜G˜G˜Gð+øøøð+ð +ð +ñ +ô +ð +ð +ð +ð +ð +ð +øøøð +ð +ð +ð +ð ð CÝ Ô3Ø  &ÝÔ4¸&ÐAÑAÔAñCô Cð Cð ð JØ×(Ò(¨Ñ0Ô0ð HÝ Ô3Ø  &Ý&Ô1Ø!'Ø"EðGñ Gô GñHô Hð Hð
 #'�‘Ø×&Ò& xÑ0Ô0ð J°T×5FÒ5FÀvÑ5NÔ5Nð JØ"&��Ø×"Ò" 8Ñ,Ô,ð J°T×5FÒ5FÀvÑ5NÔ5Nð JØ"'��ØÔ)ð JØ—.’.Ñ"Ô" f§l¢l¡n¤nÒ4Ð4Ø×#Ò# HÑ-Ô-ð 5à"'��ð ×(Ò(¨Ñ2Ô2ð JØ×(Ò(¨Ñ0Ô0ðJå Ô5Ø  &ÝÔ.°hÀÐ5GÐHÑHÔHñJô Jð Jõ !Ô7¸À&ÑIÔIÐIØ+:ˆLÔ(Ñ(ØÐs6   ÂCÂB*Â)CÂ*CÃCÃCÃCÃC	ÃC	c                 ó´   — g }|D ]R}	 |                       |¦  «         n$# t          $ r |                      |¦  «         ‚ w xY w|                     |¦  «         ŒSdS )z˜Moves a list of files.

        Depending on the value of the flag 'only_change_inv', the
        file will be moved on the file system or not.
        N)Ú_move_entryrw   Ú_rollback_moverÊ   )r$   rn  ÚmovedrÄ   s       r%   rj  zInventoryWorkingTree._moveÉ  s‡   € ð ˆà#ð 	 ð 	 ˆEðØ× Ò  Ñ'Ô'Ð'Ð'øÝ ð ð ð Ø×#Ò# EÑ*Ô*Ð*Øðøøøð �LŠL˜ÑÔÐÐð	 ð 	 s   ˆž!?c                 ó  — |D ]‰}	 |                       t          j        |j        |j        |j        |j        |j        |j        |j	        |j
        ¦  «        ¦  «         ŒZ# t          j        $ r}t          j        ddd|z  ¦  «        ‚d}~ww xY wdS )z?Try to rollback a previous move in case of an filesystem error.r‡   zyRollback failed. The working tree is in an inconsistent state. Please consider doing a 'bzr revert'. Error message is: %sN)r�  r   rh  r_  r\  r`  ra  r[  r]  r^  r„  r
   rd  )r$   r’  rÄ   r  s       r%   r‘  z#InventoryWorkingTree._rollback_moveÙ  sÀ   € àð 	1ð 	1ˆEð1Ø× Ò ¥Ô!9Ø”L %¤-Ø”M 5Ô#5°u´~Ø”O UÔ%9ØÔ)ñ	"+ô "+ñ ,ô ,ð ,ð ,øõ
 Ô,ð 1ð 1ð 1ÝÔ/Ø˜ð ,ð /0ñ0ñ1ô 1ð 1øøøøð1øøøð	1ð 	1s   †AAÁB
Á,BÂB
c                 ó,  — | j         }|                      |j        ¦  «        }|                      |j        ¦  «        }||k    r t	          j        |j        |j        d¦  «        ‚|j        sO	 t          j        ||¦  «         n8# t          $ r+}t	          j        |j        |j        |d         ¦  «        ‚d }~ww xY w|j
        r/|                     |j        ¦  «        }|                     |¦  «         |                     |j        |j        |j        ¦  «         d S )Nz Source and target are identical.r   )r  r^   r[  r_  r
   rd  r„  r   rØ   r•  rƒ  r‹   r%  r\  ra  r`  )r$   rÄ   rB   Úfrom_rel_absÚ
to_rel_absr  rŒ  s          r%   r�  z InventoryWorkingTree._move_entryé  s  € ØÔ!ˆØ—|’| E¤NÑ3Ô3ˆØ—\’\ %¤,Ñ/Ô/ˆ
Ø˜:Ò%Ð%ÝÔ+¨E¬N¸E¼LØ,NñPô Pð Pð Ô$ð 	8ð8Ý”˜|¨ZÑ8Ô8Ð8Ð8øÝð 8ð 8ð 8ÝÔ/Ø”N E¤L°!°A´$ñ8ô 8ð 8øøøøð8øøøð Œ?ð 	+Ø—K’K ¤Ñ-Ô-ˆEØ×#Ò# EÑ*Ô*Ð*Ø�
Š
�5”= %Ô"4°e´mÑDÔDÐDÐDÐDs   Á*B  Â 
B5Â
&B0Â0B5c                 óÖ  — |                       ¦   «         5  t          ¦   «         }|D ]H}| j                             |¦  «        }|€t	          j        || ¦  «        ‚|                     |¦  «         ŒI|D ]6}| j                             |¦  «        r| j                             |¦  «         Œ7t          |¦  «        r|  
                    | j        ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )a  Remove the paths in paths from the current versioned set.

        When a path is unversioned, all of its children are automatically
        unversioned.

        :param paths: The paths to stop versioning.
        :raises NoSuchFile: if any path is not currently versioned.
        N)r{   rã   r>   r‹   rI   rJ   r�   Úhas_idr%  ræ   r�   )r$   r‡  Úfile_idsr�   r’   s        r%   Ú	unversionzInventoryWorkingTree.unversionü  s;  € ð ×!Ò!Ñ#Ô#ð 	7ð 	7Ý‘u”uˆHØð &ð &�Øœ/×1Ò1°$Ñ7Ô7�Ø�?Ý(Ô3°D¸$Ñ?Ô?Ð?Ø—’˜WÑ%Ô%Ð%Ð%Ø#ð Að A�Ø”?×)Ò)¨'Ñ2Ô2ð AØ”O×7Ò7¸Ñ@Ô@Ð@øÝ�8‰}Œ}ð 	7ð ×%Ò% d¤oÑ6Ô6Ð6ð'	7ð 	7ð 	7ñ 	7ô 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7øøøð 	7ð 	7ð 	7ð 	7ð 	7ð 	7s   •B<CÃC"Ã%C"c                 ó6   — |                       |¦  «        j        S )zSee Tree.stored_kind)r«  r”   re  s     r%   Ústored_kindz InventoryWorkingTree.stored_kind  s   € à�}Š}˜TÑ"Ô"Ô'Ð'r'   c              #   ó~  K  — |                       ¦   «         D �]$\  }}|j        dk    rŒ|                      |¦  «        }t          j        |¦  «        sŒ<g }t          j        t          j        |¦  «        ¦  «        D ]�}t          j        |¦  «        }| j	         
                    |¦  «        rŒ1||j        vrSt          j        |¦  «        \  }}||k    r!|r||j        vr|                     |¦  «         Œx|                     |¦  «         ŒŽ|                     ¦   «          |D ]}t          j        ||¦  «        }|V — Œ�Œ&dS )a”  Yield all unversioned files in this WorkingTree.

        If there are any unversioned directories then only the directory is
        returned, not all its children.  But if there are unversioned files
        under a versioned subdirectory, they are returned.

        Currently returned depth-first, sorted by name within directories.
        This is the same order used by 'osutils.walkdirs'.
        rˆ   N)ro  r”   r^   r   r]   rŒ   rñ   ÚfsencodeÚfsdecoderD   Úis_control_filenamer   r<  rÊ   rè   r8  )	r$   r�   Ú	dir_entryÚdirabsÚflÚsubfÚ	subf_normrS  Úsubps	            r%   ÚextraszInventoryWorkingTree.extras  s^  è è € ð  $×7Ò7Ñ9Ô9ð 	ñ 	‰OˆD�)ØŒ~ Ò,Ð,Øà—\’\ $Ñ'Ô'ˆFÝ”= Ñ(Ô(ð ààˆBÝœ
¥2¤;¨vÑ#6Ô#6Ñ7Ô7ð (ð (�Ý”{ 4Ñ(Ô(�à”?×6Ò6°tÑ<Ô<ð ØØ˜yÔ1Ð1Ð1å#*Ô#>¸tÑ#DÔ#Dñ!�YØØ  DÒ(Ð(¨ZÐ(Ø$¨IÔ,>Ð>Ð>ØŸIšI iÑ0Ô0Ð0øàŸ	š	 $™œ˜øà�GŠG‰IŒIˆIØð ð �ÝÔ'¨¨dÑ3Ô3�Ø�
�
�
�
ñð3	ð 	r'   r‡   c           	   #   óN  K  — |                       |¦  «        }|                     d¦  «        r
|dd…         }t          |¦  «        dz   }|                      |¦  «        }t	          j        ||¦  «        }	 t          |¦  «        }d}nQ# t          $ rD}|j        t          j	        k    s!t          j        dk    r|j        t          k    s‚ d}d}Y d}~nd}~ww xY w	 t          |¦  «        }	d}
n# t          $ r d}	d}
Y nw xY w|
r|�s"|r	|\  \  }}}nd\  \  }}}|sm||d…         d	k    r_t          |¦  «        d
k    rLt          |d¦  «        }|t          |¦  «        k     r)| j                             ||         d
         ¦  «        r||= |
rd}n*|rd}n%|	d
         d
         |k    |	d
         d
         |k     z
  }|d
k    r7d„ |D ¦   «         }||fV — 	 t          |¦  «        }�n?# t          $ r d}Y �n0w xY w|d
k     rId„ |	d         D ¦   «         }|	d
         d
         |fV — 	 t          |¦  «        }	�nð# t          $ r d}
Y �náw xY wg }t#          j        t'          |	d         |z   t)          j        d
¦  «        ¬¦  «        t)          j        d¦  «        ¦  «        D �]0\  }}t-          |¦  «        }t          |¦  «        dk    r>|\  }}|                     |d
         |d         |d         |d         |d         f¦  «         Œft          |d
         ¦  «        dk    rK|                     |d
         d
         |d
         d         |d
         d         |d
         d         df¦  «         ŒÊt          |d
         ¦  «        dk    r@|                     |d
         d
         |d
         d         dd|d
         d         f¦  «         �Œ#t1          d¦  «        ‚|	d
         d
         |fV — 	 t          |¦  «        }	n# t          $ r d}
Y nw xY w	 t          |¦  «        }n# t          $ r d}Y nw xY w|
�¯|�¯ dS dS )a	  Walk the directories of this tree.

        returns a generator which yields items in the form:
                (current_directory_path,
                 [(file1_path, file1_name, file1_kind, (lstat),
                   file1_kind), ... ])

        This API returns a generator, which is only valid during the current
        tree transaction - within a single lock_read or lock_write duration.

        If the tree is not locked, it may cause an error to be raised,
        depending on the tree implementation.
        r4  NrÊ  r   FÚwin32T)©NNNr‡   r   )ú.bzrr«  c                 ó(   — g | ]\  }}}}}||||d f‘ŒS r"   r,   )r  r[   rŽ   r”   rF   Útop_paths         r%   r  z1InventoryWorkingTree.walkdirs.<locals>.<listcomp>Š  s=   € ð 2ð 2ð 2ÙC˜G X¨t°T¸8ð % h°°d¸DÐAð 2ð 2ð 2r'   c                 ó*   — g | ]\  }}}}}}||d d|f‘ŒS )ÚunknownNr,   )r  r[   rŽ   ÚdkindrF   Úfileidr”   s          r%   r  z1InventoryWorkingTree.walkdirs.<locals>.<listcomp>”  s?   € ð ,ð ,ð ,Ù L ¨°5¸$ÀÈð % h°	¸4ÀÐFð ,ð ,ð ,r'   r8  r   r   é   é   r¯  zunreachable code)r^   Úendswithræ   Ú	_walkdirsr   rÈ   rC  r•  r–  r—  rä   ÚplatformÚERROR_PATH_NOT_FOUNDrE  r   rD   r   Ú	itertoolsÚgroupbyr;  ÚoperatorÚ
itemgetterrç   rÊ   ÚNotImplementedError)r$   ÚprefixÚdisk_topÚtop_strip_lenÚinventory_iteratorÚdisk_iteratorÚcurrent_diskÚdisk_finishedr  Úcurrent_invÚinv_finishedÚcur_disk_dir_relpathÚcur_disk_dir_path_from_topÚcur_disk_dir_contentÚ
bzrdir_locÚ	directionÚdirblockr[   ÚsubiteratorÚpath_elementsÚinv_rowÚdisk_rows                         r%   rÈ   zInventoryWorkingTree.walkdirsF  s¾  è è € ð —<’< Ñ'Ô'ˆØ×Ò˜SÑ!Ô!ð 	%Ø   ”}ˆHÝ˜H™œ¨Ñ)ˆØ!Ÿ^š^¨FÑ3Ô3ÐÝÔ(¨°6Ñ:Ô:ˆð	!Ý Ñ.Ô.ˆLØ!ˆMˆMøÝð 	!ð 	!ð 	!Ø”G�uœ|Ò+Ð+Ýœ¨Ò/Ð/°A´GÕ?SÒ4SÐ4SØØˆLØ ˆMˆMˆMˆMˆMˆMøøøøð	!øøøð	 ÝÐ1Ñ2Ô2ˆKØ ˆLˆLøÝð 	 ð 	 ð 	 ØˆKØˆLˆLˆLð	 øøøð ð U	) mñ U	)Øð Aà,8ñ*ÑCÐ&Ð(BØ(Ð(ð -Añ*ÑCÐ&Ð(BØ(Ø ð =à.¨}¨~¨~Ô>À"ÒDÐDÝÐ 4Ñ5Ô5¸Ò9Ð9õ "-Ð-AØ-=ñ"?ô "?�Jà"¥SÐ)=Ñ%>Ô%>Ò>Ð>Øœ×;Ò;Ø0°Ô<¸QÔ?ñAô Að ?ð 1°Ð<Øð Kà�	�	Øð Kà�	�	à)¨!œn¨QÔ/Ð2FÒFØ +¨A¤¨qÔ 1Ð4HÒ HñJ�	ð ˜1Š}ˆ}ð2ð 2à0ð2ñ 2ô 2�ð +¨HÐ4Ð4Ð4Ð4ð)Ý#'¨Ñ#6Ô#6�L‘LøÝ$ð )ð )ð )Ø$(�M�M‘Mð)øøøà˜Q’�ð,ð ,à'¨œNð,ñ ,ô ,�ð " !”n QÔ'¨Ð1Ð1Ð1Ð1ð(Ý"&Ð'9Ñ":Ô":�K‘KøÝ$ð (ð (ð (Ø#'�L�L‘Lð(øøøð
 �Ý,5Ô,=½fØ# AœÐ)=Ñ=Ý$Ô/°Ñ2Ô2ð?4ñ ?4ô ?4å5=Ô5HÈÑ5KÔ5Kñ-Mô -Mð Fñ FÑ(�G˜[õ %)¨Ñ$5Ô$5�MÝ˜=Ñ)Ô)¨QÒ.Ð.Ø,9Ñ)˜ à Ÿš¨°¬Ø)0°¬°X¸a´[Ø)1°!¬°g¸a´jð)Bñ Cô Cð Cð Cõ ˜]¨1Ô-Ñ.Ô.°!Ò3Ð3à ŸšØ*¨1Ô-¨aÔ0°-ÀÔ2BÀ1Ô2EØ*¨1Ô-¨aÔ0°-ÀÔ2BÀ1Ô2EÀtðMñNô Nð Nð Nõ ˜]¨1Ô-Ñ.Ô.°!Ò3Ð3à ŸšØ*¨1Ô-¨aÔ0°-ÀÔ2BÀ1Ô2EØ&¨¨m¸AÔ.>¸qÔ.AðCñDô Dð Dñ Dõ 2Ð2DÑEÔEÐEØ! !”n QÔ'¨Ð1Ð1Ð1Ð1ð(Ý"&Ð'9Ñ":Ô":�K�KøÝ$ð (ð (ð (Ø#'�L�L�Lð(øøøð)Ý#'¨Ñ#6Ô#6�L�LøÝ$ð )ð )ð )Ø$(�M�M�Mð)øøøði ñ U	) mñ U	)ð U	)ð U	)ð U	)ð U	)sr   Á4B Â
CÂ:CÃCÃC* Ã*C;Ã:C;ÇG ÇG.Ç-G.ÈH- È-H=È<H=ÏO( Ï(O7Ï6O7Ï;P ÐPÐPc           	   #   ó(  K  — d}|                       |¦  «        \  }}|€g }n	|d|d|dfg}|råg }|                     ¦   «         }|d         }|d         r|d         dz   }nd}|                     |¦  «        }	|	j        dk    rG|	                     ¦   «         D ]2\  }
}|                     ||
z   |
|j        d|j        |j        f¦  «         Œ3|d         |	j        f|fV — t          |¦  «        D ]#}|d         |k    r|                     |¦  «         Œ$|°ãdS dS )a@  Walk the directories of this tree.

        :param prefix: is used as the directrory to start with.
        :returns: a generator which yields items in the form::

            ((curren_directory_path, fileid),
             [(file1_path, file1_name, file1_kind, None, file1_id,
               file1_kind), ... ])
        rˆ   Nr‡   é   r   r4  r   )r:  r@  rÀ   r”   Úsorted_childrenrÊ   r’   Úreversed)r$   r½  Ú
_directoryrB   Útop_idÚpendingrË  Ú
currentdirÚrelrootrÄ   r•   ÚchildÚdirs                r%   rµ  zInventoryWorkingTree._walkdirsÀ  sr  è è € ð !ˆ
à×,Ò,¨VÑ4Ô4‰ˆˆVØˆ>ØˆGˆGà  J°°f¸dÐCÐDˆGØð 	(ØˆHØ Ÿš™œˆJà ”]ˆFØ˜!Œ}ð Ø$ Qœ-¨#Ñ-��à�à—M’M &Ñ)Ô)ˆEØŒz˜[Ò(Ð(Ø#(×#8Ò#8Ñ#:Ô#:ð (ð (‘K�D˜%Ø—O’O W¨t¡^°T¸5¼:ÀtØ%*¤]°E´Jð%'ñ (ô (ð (ð (ð ˜a”= %¤-Ð0°(Ð:Ð:Ð:Ð:å Ñ)Ô)ð (ð (�Ø�q”6˜ZÒ'Ð'Ø—N’N 3Ñ'Ô'Ð'øð) ð 	(ð 	(ð 	(ð 	(ð 	(r'   c                 óø   — |                       ¦   «         5  | j                             |¦  «         | j                             d| j                             ¦   «         ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )zÏUpdate the feature flags for this branch.

        :param updated_flags: Dictionary mapping feature names to necessities
            A necessity can be None to indicate the feature should be removed
        rÙ   N)rz   r5   Ú_update_feature_flagsÚcontrol_transportÚ	put_bytesÚ	as_string)r$   Úupdated_flagss     r%   Úupdate_feature_flagsz)InventoryWorkingTree.update_feature_flagsç  s¼   € ð �_Š_ÑÔð 	4ð 	4ØŒL×.Ò.¨}Ñ=Ô=Ð=ØÔ"×,Ò,Ø˜$œ,×0Ò0Ñ2Ô2ñ4ô 4ð 4ð	4ð 	4ð 	4ñ 	4ô 	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4øøøð 	4ð 	4ð 	4ð 	4ð 	4ð 	4s   •AA/Á/A3Á6A3c              #   ó.  K  — t          ¦   «         }|D �] \  }}|j        |v r&|j        dk    r|                     |j        ¦  «         Œ5|j        dk    rZ|                      |¦  «        rEt                               |j        |j        |j        ¦  «        }|                     |j        ¦  «         |j        dk    rU|rS|  	                    |¦  «        }| 
                    ||¬¦  «        D ]%\  }}|rt          j        ||¦  «        }	n|}	|	|fV — Œ&Œú||fV — �ŒdS )z/See if directories have become tree-references.rˆ   r›  ©rD  rÕ   N)rã   rÁ   r”   r�   r’   rU   rd   r   r•   r  ro  r   r8  )
r$   ÚiteratorrD  rÕ   Úblocked_parent_idsr�   rl  rU  ÚsubpathÚfull_subpaths
             r%   Ú_check_for_tree_referencesz/InventoryWorkingTree._check_for_tree_referencesò  s\  è è € å ™UœUÐØ ð 	ñ 	‰HˆD�"ØŒ|Ð1Ð1Ð1ð ”7˜kÒ)Ð)Ø&×*Ò*¨2¬:Ñ6Ô6Ð6ØØ”˜;Ò&Ð&Ø×5Ò5°dÑ;Ô;ð 'õ ×,Ò,¨R¬Z¸¼À"Ä,ÑOÔO�Ø"×&Ò& r¤zÑ2Ô2Ð2àŒwÐ*Ò*Ð*¨~Ð*Ø×.Ò.¨tÑ4Ô4�Ø#*×#>Ò#>Ø'5Ø'5ð $?ñ $7ô $7ð +ð +‘K�G˜Rð ð ,Ý'.Ô'7¸¸gÑ'FÔ'F˜˜à'+˜Ø&¨Ð*Ð*Ð*Ð*Ð*ð+ð ˜B�h���‘ð3	ð 	r'   c                 ó´   •— t          t          | ¦  «                             ||¬¦  «        }|                      ¦   «         s|S |                      |||¬¦  «        S )zSee Tree.iter_entries_by_dir())rÕ   rD  rã  )r9   r   ro  rS   rè  )r$   rÕ   rD  rä  r@   s       €r%   ro  z(InventoryWorkingTree.iter_entries_by_dir  so   ø€ õ � dÑ+Ô+×?Ò?Ø)¸.ð @ñ Jô Jˆà×+Ò+Ñ-Ô-ð 	/ØˆOà×2Ò2Ø¨Ø-ð 3ñ /ô /ð /r'   c              #   óD  ‡K  — |                       ¦   «         5  | j        sd„ }nt          j        dk    r
ddlŠˆfd„}nd}|D ]D}|�|                      |¦  «        r|                     d¦  «        V — Œ1t          | ||¦  «        V — ŒE	 ddd¦  «         dS # 1 swxY w Y   dS )a6  Look up canonical paths for multiple items.

        :param paths: A sequence of paths relative to the root of the tree.
        :return: A iterator over paths, with each item the corresponding input
            path adjusted to account for existing elements that match case
            insensitively.
        c                 ó*   — |                       ¦   «         S r"   )r‰  )Úxs    r%   Ú	normalizez;InventoryWorkingTree.get_canonical_paths.<locals>.normalize'  s   € ØŸ7š7™9œ9Ð$r'   Údarwinr   Nc                 ó0   •— ‰                      d| ¦  «        S )NÚNFC)rí  )rì  Úunicodedatas    €r%   rí  z;InventoryWorkingTree.get_canonical_paths.<locals>.normalize,  s   ø€ Ø&×0Ò0°¸Ñ:Ô:Ð:r'   r4  )ru   rH   rä   r¶  rñ  rÉ   Ústripr   )r$   r‡  rí  r�   rñ  s       @r%   Úget_canonical_pathsz(InventoryWorkingTree.get_canonical_paths  sR  øè è € ð �^Š^ÑÔð 	Dð 	DØÔ&ð 	!ð%ð %ð %ð %å” Ò)Ð)Ø"Ð"Ð"Ð"ð;ð ;ð ;ð ;ð ;ð ;ð !�	Øð Dð D�ØÐ$¨×(9Ò(9¸$Ñ(?Ô(?Ð$ØŸ*š* S™/œ/Ð)Ð)Ð)Ð)å,¨T°4¸ÑCÔCÐCÐCÐCÐCð	Dð	Dð 	Dð 	Dñ 	Dô 	Dð 	Dð 	Dð 	Dð 	Dð 	Dð 	Dð 	Døøøð 	Dð 	Dð 	Dð 	Dð 	Dð 	Ds   ˜A/BÂBÂBc                 ót   — |                       |¦  «        }|€d S | j                             |¦  «        d         S )Nr   )r‹   r2   Úget_reference_info)r$   r�   r2   r’   s       r%   rõ  z'InventoryWorkingTree.get_reference_info6  s8   € Ø—,’,˜tÑ$Ô$ˆØˆ?Ø�4ØŒ{×-Ò-¨gÑ6Ô6°qÔ9Ð9r'   c                 ó”   — |                       |¦  «        }|€t          j        |¦  «        ‚| j                             |||¦  «         d S r"   )r‹   rI   rJ   r2   Úset_reference_info)r$   Ú	tree_pathÚbranch_locationr’   s       r%   r÷  z'InventoryWorkingTree.set_reference_info<  sI   € Ø—,’,˜yÑ)Ô)ˆØˆ?Ý Ô+¨IÑ6Ô6Ð6ØŒ×&Ò& w°ÀÑKÔKÐKÐKÐKr'   c                 ób   — | j                              |                      |¦  «        ||¬¦  «        S )N)Úpossible_transports)r2   Úreference_parentr‹   )r$   r�   r2   rû  s       r%   rü  z%InventoryWorkingTree.reference_parentB  s6   € ØŒ{×+Ò+Ø�LŠL˜ÑÔØÐ&9ð ,ñ ;ô ;ð 	;r'   c                 ó„  — |                       ¦   «         5  t          |                      ¦   «         ¦  «        dk    r	 ddd¦  «         dS |€|                      ¦   «         }|                      |¦  «        }|                      ¦   «         rT	 t          |¦  «        }|j        dk    rt          |¦  «        }	 ddd¦  «         dS # t          $ r Y ddd¦  «         dS w xY wt          d„ |¦  «        }	 t          t          |¦  «        ¦  «         n# t          $ r Y ddd¦  «         dS w xY w	 ddd¦  «         dS # 1 swxY w Y   dS )a  Quickly check that the tree contains at least one commitable change.

        :param _from_tree: tree to compare against to find changes (default to
            the basis tree and is intended to be used by tests).

        :return: True if a change is found. False otherwise
        r   NTrª  Fc                 ó>   — | d         d         dk    o| d         dk    S )Nr³  r   rŠ   rÑ  rª  r,   )rQ  s    r%   ú<lambda>z2InventoryWorkingTree.has_changes.<locals>.<lambda>l  s!   € ˜a œd 1œg¨Ò2ÐK°q¸´t¸|Ò7K€ r'   )ru   ræ   r‰  r¨   ré   Úsupports_symlinksrC  rÁ   rE  ÚfilterÚiter)r$   Ú
_from_treeÚchangesrü   s       r%   Úhas_changesz InventoryWorkingTree.has_changesG  s  € ð �^Š^ÑÔð #	ð #	å�4×&Ò&Ñ(Ô(Ñ)Ô)¨AÒ-Ð-Øð#	ð #	ð #	ñ #	ô #	ð #	ð #	ð #	ð Ð!Ø!Ÿ_š_Ñ.Ô.�
Ø×'Ò'¨
Ñ3Ô3ˆGØ×%Ò%Ñ'Ô'ð ð!Ý! '™]œ]�FàÔ'¨<Ò7Ð7Ý!% g¡¤˜Øð#	ð #	ð #	ñ #	ô #	ð #	ð #	ð #	øõ %ð !ð !ð !à ð##	ð #	ð #	ñ #	ô #	ð #	ð #	ð #	ð!øøøõ !ØKÐKØñô �ð!Ý�˜g™œÑ'Ô'Ð'Ð'øÝ$ð !ð !ð !Ø ðE#	ð #	ð #	ñ #	ô #	ð #	ð #	ð #	ðB!øøøàðG#	ð #	ð #	ñ #	ô #	ð #	ð #	ð #	ð #	ð #	ð #	ð #	øøøð #	ð #	ð #	ð #	ð #	ð #	sY   •'D5Á	?D5Â	)C Ã 
CÃ
D5ÃCÃD5Ã.DÄ
D5Ä
D$ÄD5Ä#D$Ä$D5Ä5D9Ä<D9c                 óx  — | j                              ¦   «         �|                      ¦   «          || j        u }n|                      ¦   «          d}	 |r| j                              |¦  «        }n|| j        u rd}|                      ||||¦  «        |                      ¦   «          S # |                      ¦   «          w xY w)aÚ  Update a working tree along its branch.

        This will update the branch if its bound too, which means we have
        multiple trees involved:

        - The new basis tree of the master.
        - The old basis tree of the branch.
        - The old basis tree of the working tree.
        - The current working tree state.

        Pathologically, all three may be different, and non-ancestors of each
        other.  Conceptually we want to:

        - Preserve the wt.basis->wt.state changes
        - Transform the wt.basis to the new master basis.
        - Apply a merge of the old branch basis to get any 'local' changes from
          it into the tree.
        - Restore the wt.basis->wt.state changes.

        There isn't a single operation at the moment to do that, so we:

        - Merge current state -> basis tree of the master w.r.t. the old tree
          basis.
        - Do a 'normal' merge of the old branch basis if it is relevant.

        :param revision: The target revision to update to. Must be in the
            revision history.
        :param old_tip: If branch.update() has already been run, the value it
            returned (old tip of the branch or None). _marker is used
            otherwise.
        NF)r2   Úget_bound_locationrz   Ú_markerr{   r:  Ú_update_treerv   )r$   Úchange_reporterrû  r   Úold_tipÚ	show_baseÚupdate_branchs          r%   r:  zInventoryWorkingTree.updatev  s½   € ðB Œ;×)Ò)Ñ+Ô+Ð7Ø�OŠOÑÔÐØ$¨¬Ð4ˆMˆMà× Ò Ñ"Ô"Ð"Ø!ˆMð	Øð #Øœ+×,Ò,Ð-@ÑAÔA��à˜dœlÐ*Ð*Ø"�GØ×$Ò$ W¨o¸xÈÑSÔSà�KŠK‰MŒMˆMˆMøˆD�KŠK‰MŒMˆMˆMøøøs   Á?B# Â#B9c           	      ó  — |                       ¦   «         5  g }	 |                      ¦   «         d         }n# t          $ r t          j        }Y nw xY w|€| j                             ¦   «         }|pt          j        }t          j        |¦  «        s’||k    rŒ|                      ¦   «         }| j        j	         
                    |¦  «        }t                               | j        ||| ||¬¦  «        }|r2|                      ||f¦  «         t          |¦  «        cddd¦  «         S ||k    �r4| j        j	         
                    |¦  «        }	|	                     d¦  «        }
|                      ¦   «         }|                     ¦   «         5  |                     d¦  «        �|                     d¦  «        |
k    r)|                      |
¦  «         |                      ¦   «          ddd¦  «         n# 1 swxY w Y   | j        j	                             ¦   «         }|                     | j                             ¦   «         |¦  «        }| j        j	         
                    |¦  «        }t                               | j        |	|| ||¬¦  «        }|                      |¦  «         ||	fg}|                      ¦   «         dd…         }|D ]6}|                     || j        j	         
                    |¦  «        f¦  «         Œ7t          j        |¦  «        s4|                     || j        j	         
                    |¦  «        f¦  «         |                      |¦  «         |d         d         }t          |¦  «        cddd¦  «         S # 1 swxY w Y   dS )z¶Update a tree to the master branch.

        :param old_tip: if supplied, the previous tip revision the branch,
            before it was changed to the master branch's tip.
        r   N)Ú	this_treer
  r  r‡   r   )r{   r‰  Ú
IndexErrorr  r  r2   rz  Úis_nullr¨   rR   r‚  ÚmergeÚmerge_innerÚadd_parent_treeræ   r‹   ru   Úset_root_idr€   Ú	get_graphÚfind_unique_lcaru  rÊ   r  )r$   r  r
  r   r  Únb_conflictsÚlast_revÚ	base_treer  Úto_treeÚ
to_root_idrŽ  rÙ  Úbase_rev_idÚparent_treesÚmergesr“   s                    r%   r	  z!InventoryWorkingTree._update_tree§  sN  € ð" ×!Ò!Ñ#Ô#ð @	%ð @	%ØˆLð7Ø×.Ò.Ñ0Ô0°Ô3��øÝð 7ð 7ð 7Ý(Ô6���ð7øøøàÐØœ;×4Ò4Ñ6Ô6�àÐ<¥Ô!<ˆGå Ô(¨Ñ1Ô1ð -°gÀÒ6IÐ6Ið !ŸOšOÑ-Ô-�	Ø!œ[Ô3×AÒAÀ'ÑJÔJ�
Ý$×0Ò0°´¸jØ1:ÀdØAPØ;Dð  1ñ  Fô  F�ð  ð -Ø×(Ò(¨'°:Ð)>Ñ?Ô?Ð?Ý˜|Ñ,Ô,ð-@	%ð @	%ð @	%ð @	%ñ @	%ô @	%ð @	%ð @	%ð0 ˜8Ò#Ñ#ð œ+Ô0×>Ò>¸xÑHÔH�Ø$Ÿ_š_¨RÑ0Ô0�
àŸšÑ)Ô)�Ø—_’_Ñ&Ô&ð %ð %ØŸš bÑ)Ô)Ð1°U·]²]À2Ñ5FÔ5FÈ*Ò5TÐ5TØ×(Ò(¨Ñ4Ô4Ð4ØŸ
š
™œ˜ð%ð %ð %ñ %ô %ð %ð %ð %ð %ð %ð %øøøð %ð %ð %ð %ð œÔ.×8Ò8Ñ:Ô:�Ø#×3Ò3°D´K×4MÒ4MÑ4OÔ4OØ4<ñ>ô >�à œKÔ2×@Ò@ÀÑMÔM�	å$×0Ò0°´¸gÀyØ;?ØAPØ;Dð  1ñ  Fô  F�ð ×&Ò& xÑ0Ô0Ð0ð "*¨7Ð 3Ð4�Ø×,Ò,Ñ.Ô.¨q¨r¨rÔ2�ð %ð Pð P�FØ ×'Ò'Ø ¤Ô!7×!EÒ!EÀfÑ!MÔ!MÐNñPô Pð Pð På$Ô,¨WÑ5Ô5ð RØ ×'Ò'Ø  $¤+Ô"8×"FÒ"FÀwÑ"OÔ"OÐPñRô Rð Rà×%Ò% lÑ3Ô3Ð3Ø'¨œ?¨1Ô-�Ý�|Ñ$Ô$ðA@	%ð @	%ð @	%ð @	%ñ @	%ô @	%ð @	%ð @	%ð @	%ð @	%ð @	%ð @	%øøøð @	%ð @	%ð @	%ð @	%ð @	%ð @	%s_   •M5™4³M5´AÁ
M5ÁAÁCM5ÄA#M5ÆAG&ÇM5Ç&G*	Ç*M5Ç-G*	Ç.E:M5Í5M9Í<M9)r/   NNNFNNr"   )FNTF)FrY   )r‡   rª  )NNNF)dr(   r)   r*   Ú__doc__r&   r?   r;   rO   r<   rV   rT   rf   rk   rm   ro   rr   ru   r{   rz   r~   r�   r–   r    rt   r¬   r·   rº   rÅ   r   r  r	  r  r  rš   r  r6  r@  r/  rX  r[  rZ  rí   rf  rh  rp  rs  ru  rw  r€  r‡  r�  r€   r˜  rŒ   rÍ   r   Úfile_kind_from_stat_moder£  r�  r­  r²  rµ  r¦  r¼  rÂ  r‚  r  ÚCURRENT_REVISIONrß  r2  rñ  rý  r  r1  rW  rw  r  rh  ri  rj  r‘  r�  rš  rœ  r§  rÈ   rµ  rá  rè  ro  ró  rõ  r÷  rü  r  Úobjectr  r:  r	  Ú__classcell__)r@   s   @r%   r.   r.   p   s•  ø€ € € € € ðð ð  #ØØ Ø $Ø ØØ!ð9ð 9ð 9ð 9ð 9ð 9ð>,ð ,ð ,ð(ð (ð (ð3ð 3ð 3ð 3ð8ð 8ð 8ðð ð ðJð Jð Jð5ð 5ð 5ð:ð :ð :ð	!ð 	!ð 	!ð/ð /ð /ð/ð /ð /ðð ð ð"ð ð ðð ð ð>ð >ð >ðð ð ð'ð 'ð 'ð.Hð Hð Hð1ð 1ð 1ð#ð #ð #ð %ð %ð %ð3ð 3ð 3ð
3ð 3ð 3ð4 EIØðz2ð z2ð z2ð z2ðx1ð 1ð 1ð*ð *ð *ð9ð 9ð 9ð 9ð<ð ð ð6'ð 'ð 'ðFð Fð Fð
-ð -ð -ðPð Pð Pð ð  ð  ð"ð ð ð$(ð (ð (ð$ð $ð $ð
4ð 4ð 4ð Dð Dð Dð
ð ð ð$Gð Gð GðAð Að Að:ð :ð :ðð ð ð!ð !ð !ð 	ð 	ð 	ð.ð .ð .ð .ð"
,ð 
,ð 
,ðð ð ð 13´Ø%,Ô%Eð,ð ,ð ,ð ,ð6 ð  ð  ðð ð ð@ð @ð @ðDð Dð Dð#ð #ð #ð3ð 3ð 3ð ð ð ð ð=ð =ð =ð* (5Ô'Eð6ð 6ð 6ð 6ðpHð Hð Hð
3ð 
3ð 
3ð#!ð #!ð #!ðJ$2ð $2ð $2ðL0ð 0ð 0ð 0ðd GKØ"'ðJ ð J ð J ð J ðX`!ð `!ð `!ð `!ðDO*ð O*ð O*ð O*ðb3ð 3ð 3ð 3ð 3ñ 3ô 3ð 3ðAð Að Að AðF ð  ð  ð 1ð 1ð 1ð Eð Eð Eð&7ð 7ð 7ð<(ð (ð (ð&ð &ð &ðPx)ð x)ð x)ð x)ðt%(ð %(ð %(ð %(ðN	4ð 	4ð 	4ðð ð ð ð</ð /ð /ð /ð /ð /ðDð Dð Dð2:ð :ð :ð :ðLð Lð Lð;ð ;ð ;ð ;ð
+ð +ð +ð +ðZ ˆf‰hŒh€Gà%)¸tØ g¸ð/ð /ð /ð /ðb IMØ$ðQ%ð Q%ð Q%ð Q%ð Q%ð Q%ð Q%ð Q%r'   r.   c                   óT   — e Zd ZdZdZd„ Zed„ ¦   «         Zed„ ¦   «         Z	 	 d	d„Z	dS )
ÚWorkingTreeFormatMetaDirz?Base class for working trees that live in bzr meta directories.z
.bzrignorec                 ól   — t          j        | ¦  «         t          j                             | ¦  «         d S r"   )r   r&   r   Ú	BzrFormatrW   s    r%   r&   z!WorkingTreeFormatMetaDir.__init__   s0   € ÝÔ" 4Ñ(Ô(Ð(ÝÔ×!Ò! $Ñ'Ô'Ð'Ð'Ð'r'   c                 ó²   — 	 |                      d¦  «        }|                     d¦  «        S # t          j        $ r t	          j        |j        ¬¦  «        ‚w xY w)z=Return format name for the working tree object in controldir.NrÙ   )r"  )rE   rd  rI   rJ   r
   ÚNoWorkingTreer"  )ÚklassrD   r   s      r%   Úfind_format_stringz+WorkingTreeFormatMetaDir.find_format_string  sb   € ð	<Ø"×<Ò<¸TÑBÔBˆIØ×&Ò& xÑ0Ô0Ð0øÝÔ(ð 	<ð 	<ð 	<ÝÔ&¨I¬NÐ;Ñ;Ô;Ð;ð	<øøøs	   ‚), ¬*Ac                 ód   — |                       |¦  «        }|                      t          d|¦  «        S )z<Return the format for the working tree object in controldir.zworking tree)r,  Ú_find_formatr   )r+  rD   Úformat_strings      r%   Úfind_formatz$WorkingTreeFormatMetaDir.find_format  s6   € ð ×0Ò0°Ñ<Ô<ˆØ×!Ò!¥/°>Ø"/ñ1ô 1ð 	1r'   TNc                 ó|   — t          j        | |||¬¦  «         t          j                             | |||¬¦  «         d S )N)Úallow_unsupportedÚrecommend_upgrader1   )r   Úcheck_support_statusr   r(  )r$   r2  r3  r1   s       r%   r4  z-WorkingTreeFormatMetaDir.check_support_status  sg   € åÔ.ØÐ$5Ø/¸ð	Bñ 	Bô 	Bð 	Bõ 	Ô×-Ò-ØÐ$5Ø/¸ð 	.ñ 	Bô 	Bð 	Bð 	Bð 	Br'   )TN)
r(   r)   r*   r   rS  r&   Úclassmethodr,  r0  r4  r,   r'   r%   r&  r&  û  sˆ   € € € € € ØIÐIà"€Oð(ð (ð (ð ð<ð <ñ „[ð<ð ð1ð 1ñ „[ð1ð IMØ%)ðBð Bð Bð Bð Bð Br'   r&  )6r   Úbisectr   ÚbreezyÚcollectionsr   r–  Úior   r¸  rº  rŒ   rF   rä   r‡   r   r	   Úglobalsr
   r   r   r  r   rI   rD   r   Úlockr   Úinventorytreer   r   Útracer   r   r#   r   r   r   r   r   r   r   Úworkingtreer   r   r   rð  r4  r·  ÚInternalBzrErrorr    r.   r(  r&  r,   r'   r%   ú<module>r@     s®  ðð"ð ð  Ð Ð Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ø €€€Ø 	€	€	€	Ø €€€Ø 
€
€
€
ð Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø €Ô ˜˜™	œ	ð $ñ ô ð ð(ð ð ð ð ð ð ð ð ð ð ð ð $Ð #Ð #Ð #Ð #Ð #Ø $Ð $Ð $Ð $Ð $Ð $Ø FÐ FÐ FÐ FÐ FÐ FÐ FÐ FØ  Ð  Ð  Ð  Ð  Ð  Ð  Ð  ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð >Ð ð 2Ð ØÐ ðð ð ð ð ˜Ô/ñ ô ð ðH%ð H%ð H%ð H%ð H%˜;Ð(<ñ H%ô H%ð H%ðV< Bð  Bð  Bð  Bð  B˜vÔ/Ð1Bñ  Bô  Bð  Bð  Bð  Br'   