403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/breezy/bzr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/breezy/bzr/__pycache__/workingtree_4.cpython-313.pyc
�

p��g̑���SrSSKrSSKJr SSKJr \"\"5S5 SSKJr SSKJr	 SS	K
Jr SS
KJ
r
 SSKJr SSKJrJr SS
KJrJrJrJrJr SSKJrJr SSKJr SSKJrJ r J!r! SSK"J#r# SSKJ$r$ SSK%J&r&J'r'J(r( SSK)J*r*J+r+J,r, SSK"J-r-J.r. "SS\-5r/"SS\$R`5r1"SS\/5r2"SS\/5r3"SS \25r4"S!S"\25r5"S#S$\.5r6"S%S&\65r7"S'S(\65r8"S)S*\65r9"S+S,\,5r:"S-S.\*5r;\ Rx"\;5 "S/S05r="S1S25r>"S3S45r?g)5z�WorkingTree4 format and implementation.

WorkingTree4 provides the dirstate based working tree logic.

To get a WorkingTree, call bzrdir.open_workingtree() or
WorkingTree.open(dir).
�N)�BytesIO�)�lazy_importa1
import contextlib
import errno
import stat

from breezy import (
    branch as _mod_branch,
    cache_utf8,
    controldir,
    debug,
    filters as _mod_filters,
    osutils,
    revisiontree,
    trace,
    views,
    )
from breezy.bzr import (
    generate_ids,
    transform as bzr_transform,
    )
)�errors)�revision)�LogicalLockResult)�
LockableFiles)�LockDir)�BadReferenceTarget�MutableTree)�	file_kind�isdir�pathjoin�realpath�safe_unicode)�
NoSuchFile�get_transport_from_path)�LocalTransport)�FileTimestampUnavailable�	InterTree�MissingNestedTree)�WorkingTree�)�dirstate)�ROOT_ID�	Inventory�
entry_factory)�InterInventoryTree�InventoryRevisionTree�
InventoryTree)�InventoryWorkingTree�WorkingTreeFormatMetaDirc��^�\rSrSrS@SjrSrSrSrSrSr	Sr
SAS	jrS
rSr
SrS
rSrSrSrSrSASjrSBSjrSr\"\SS9rSrSrSrSCSjrSrSrSrSr Sr!S r"S!r#S"r$S#r%S$r&S%r'S&r(S'r)SDS(jr*S)r+S*r,S+r-SEU4S,jjr.SFS-jr/SFS.jr0S/r1S0r2S1r3SDS2jr4SDS3jr5S4r6S5r7S6r8S7r9S8r:SDU4S9jjr;S:r<S;r=S<r>S=r?SBS>jr@S?rAU=rB$)G�DirStateWorkingTree�Hc��X@lXPl[U5n[R	SU5 X l[
U5UlX0lURRUl	SUl
SUlSUlUR5 UR5 SUlUR!5Ul[$R&Ul[+UR
R,RSS5Ulg)z�Construct a WorkingTree for basedir.

If the branch is not supplied, it is opened automatically.
If the branch is supplied, it must be the branch for this basedir.
(branch.base is not cross checked, because for remote branches that
would be meaningless).
zopening working tree %rN�supports_tree_referenceF)�_format�
controldirr�trace�mutter�_branchr�basedir�_control_files�
_transport�_dirty�	_dirstate�
_inventory�"_setup_directory_is_tree_reference�_detect_case_handling�_rules_searcher�_make_views�viewsr�_process_entry�
_iter_changes�getattr�
repository�_repo_supports_tree_reference)�selfr-�branchr.r(�_controldirs      �:/usr/lib/python3/dist-packages/breezy/bzr/workingtree_4.py�__init__�DirStateWorkingTree.__init__Is�����%���w�'��
���.��8�����(���-���-�-�8�8�������������/�/�1��"�"�$�#����%�%�'��
�%�4�4���-4��L�L�#�#�+�+�-F��.
��*�c	���UR5 UR5n[XU5H�upVnURS5nUR	U5(aFUS:Xa>UR	U5[
:Xa%UR
S[RU55 MsUc[RU5nURXVUSS5 M� URSS9 SSS5 g!,(df   g=f)zSee MutableTree._add.�/rCNT��reset_inventory)�lock_tree_write�current_dirstate�zip�strip�path2idr�set_path_id�generate_ids�gen_file_id�add�_make_dirty)r=�files�kinds�ids�state�f�file_id�kinds        r@�_add�DirStateWorkingTree._addns���
�
!�
!�
#��)�)�+�E�$'��E�$:� ��D��G�G�C�L���<�<��?�?��C�x�D�L�L��O�w�$>��)�)�#�|�/G�/G��/J�K���?�*�6�6�q�9�G��	�	�!�d�D�#�6�%;�
���T��2�$�
#�
#�s�CC)�)
C7c�(�SUR54/$)z=Return the references needed to perform a check of this tree.�trees)�
last_revision�r=s r@�_get_check_refs�#DirStateWorkingTree._get_check_refs�s���$�,�,�.�/�0�0rCc�L�SUlU(aURbSUlggg)z�Make the tree state dirty.

:param reset_inventory: True if the cached inventory should be removed
    (presuming there is one).
TN)r0r2)r=rGs  r@rQ�DirStateWorkingTree._make_dirty�s%������t���:�"�D�O� ;�?rCc���UR5 URUR5nUR
S5nX0R
S5:Xa[XS5eURU5 [XS5e![Ra
 [XS5ef=f![Ra Of=fURU/S/U/5 SSS5 g!,(df   g=f)NzTarget not inside tree.�zTrees have the same root id.zRoot id already present in tree�tree-reference)
rH�relpathr-r�PathNotChildrrL�id2path�NoSuchIdrY)r=�sub_tree�
sub_tree_path�sub_tree_ids    r@�
add_reference�!DirStateWorkingTree.add_reference�s���
�
!�
!�
#�
T� $���X�-=�-=� >�
�#�*�*�2�.�K��l�l�2�.�.�(��9W�X�X�
����[�)�)��$E�����&�&�
T�(��9R�S�S�
T���?�?�
��
��
�I�I�}�o�(8�'9�K�=�I�!$�
#�
#�sE�C�A=�1C� B!�1C�=!B�C�!B8�5C�7B8�8C�
C(c��URcSnOSnUR5nURb [R"UR
5eUR
5 UR5 U(aSUlURR5 URR5 g![Ra! [R"UR
5ef=f!W(aSUlff=f)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.
NTF)r1�_current_dirstate�_lock_tokenr�
LockActiver-�
lock_write�unlock�LockContentionr.�
break_lockr>)r=�clearrUs   r@rv�DirStateWorkingTree.break_lock�s���	&��~�~�%������*�*�,�E�� � �,��'�'����5�5�
#��$�$�&��L�L�N��!%������&�&�(������ ���,�,�:�!�+�+�D�L�L�9�9�	:���!%����s$�AC.�B6�"C.�65C+�+C.�.C?c��[R"XU5up4nUR(aUS:XaUbURS:XaSnX4U4$)N�	directoryre)r�_comparison_datar<rX)r=�entry�pathrX�
executable�
stat_values      r@r{�$DirStateWorkingTree._comparison_data�sP��'2�'C�'C�D�QU�'V�$��*�
�.�.���#��!��
�
�.�.�#�D���+�+rCc��UR5 [R"XU/UQ70UD6nURSS9 UsSSS5 $!,(df   g=f)NTrF)rsr�commitrQ)r=�message�revprops�args�kwargs�results      r@r��DirStateWorkingTree.commit�sJ��
�_�_�
�!�'�'��x�Q�$�Q�&�Q�F����T��2���
�
�s�,A�
Ac�B�UR5 UR5$)z�Return the current dirstate object.

This is not part of the tree interface and only exposed for ease of
testing.

:raises errors.NotWriteLocked: when not in a lock.
)�_must_be_lockedrpr^s r@rI�$DirStateWorkingTree.current_dirstate�s��	
�����%�%�'�'rCc�B�URbUR$URRS5RS5n[R
R
UUR5UR5UR55UlUR$)zqInternal function that does not check lock status.

This is needed for break_lock which also needs the dirstate.
Nr)
r1r)�get_workingtree_transport�
local_abspathr�DirState�on_file�_sha1_provider�_worth_saving_limit�_supports_executable)r=�
local_paths  r@rp�%DirStateWorkingTree._current_dirstate�s���
�>�>�%��>�>�!��_�_�>�>�t�D�R�R��
�
�"�*�*�2�2�����!��$�$�&��%�%�'�	
����~�~�rCc�D�UR5(a[U5$g)z�A function that returns a SHA1Provider suitable for this tree.

:return: None if content filtering is not supported by this tree.
  Otherwise, a SHA1Provider is returned that sha's the canonical
  form of files, i.e. after read filters are applied.
N)�supports_content_filtering�ContentFilterAwareSHA1Providerr^s r@r��"DirStateWorkingTree._sha1_provider�s!���*�*�,�,�1�$�7�7�rCc�D�UR5nURS5$)zjHow many hash changes are ok before we must save the dirstate.

:return: an integer. -1 means never save.
z"bzr.workingtree.worth_saving_limit)�get_config_stack�get)r=�confs  r@r��'DirStateWorkingTree._worth_saving_limit	s"��
�$�$�&���x�x�<�=�=rCc�"�[U5n[5nUR5nUHcn[RRUR
S55upVURXVS5u  pxU(aMRURU5 Me U$)z=Filter out paths that are versioned.

:return: set of paths.
�utf8r)	�sorted�setrI�osr}�split�encode�_get_block_entry_indexrP)	r=�pathsr�rUr}�dirname�basename�_�path_is_versioneds	         r@�filter_unversioned_files�,DirStateWorkingTree.filter_unversioned_filess����u�
������%�%�'���D� "���
�
�d�k�k�&�.A� B��G�).�)E�)E��1�*�&�A�q�!�%�$��
�
�4� �
��
rCc��URRS:wa[R"U5eUR	5R5 SUlSUlg)zWrite all cached data to disk.�wNF)r.�
_lock_moder�NotWriteLockedrI�saver2r0r^s r@�flush�DirStateWorkingTree.flush&sJ�����)�)�S�0��'�'��-�-�����$�$�&������rCc��UR5 [U5Hup4X#bMURU5X#'M! SSS5 g!,(df   g=f)zSee MutableTree._gather_kinds.N)rH�	enumeraterX)r=rRrS�posrVs     r@�
_gather_kinds�!DirStateWorkingTree._gather_kinds.sB��
�
!�
!�
#�#�E�*����:�%�!%���1��E�J�+�$�
#�
#�s�A	�A	�	
Ac	���UR5nUR5 URSS9up#USnUSSS:Xd[U5e[	US9n[
RRn[n[RnURn	SUR0n
URSS	GH)nUSnX�n
USGHup�USunnnnnUS
;aMUSnU"U5SnUSnUUnUU"UUU
R5nUS:XaUUlOWUS:XaUX�S
-U-R#S
5'O7US:XaU=(d S	UlO US:wa[SR'U55eUU	;a[SR'UU	U55eUU
R(;a[SR'U55eUU	U'UU
R(U'GM GM, XPlg	![a GMCf=f)z�Create and set self.inventory from the dirstate object.

This is relatively expensive: we have to walk the entire dirstate.
Ideally we would not, and can deprecate this function.
rd�r}rr�d)�root_idrCrN��a�r�filerz�/re�symlinkzunknown kind {!r}�%file_id {} already in inventory as {}�name {!r} already in parent)rI�_read_dirblocks_if_needed�
_get_entry�AssertionErrorrrr��_minikind_to_kindr�
cache_utf8�_utf8_decode�_byid�root�
_dirblocks�KeyErrorrWr~rK�reference_revision�format�childrenr2)r=rU�root_key�
current_entry�
current_id�inv�minikind_to_kind�factory�utf8_decode�inv_byid�
parent_ies�blockr��	parent_ie�keyr|�minikind�link_or_sha1�sizer~�stat�name�name_unicoderWrX�	inv_entrys                          r@�_generate_inventory�'DirStateWorkingTree._generate_inventory5s:���%�%�'��
�'�'�)�"&�/�/�r�/�":����a�[�
��a� ��#�t�+� ��/�/��
�+��#�,�,�>�>���� �-�-���9�9���3�8�8�_�
��%�%�a�b�)�E��A�h�G�
�&�/�	�$�A�h�
��AF�q��>��,��j�$��|�+���1�v��*�4�0��3���a�&��'��1��#�D�M�'�<��AR�AR�S�	��6�>�,6�I�(��[�(�FO�J�$��� 5�<�<�T�B�C��-�-�3?�3G�4�I�0��Y�&�(�)<�)C�)C�D�)I�J�J��h�&�(�?�F�F�#�X�g�%6����
 �9�#5�#5�5�(�5�<�<�\�J���%.���!�3<�	�"�"�<�0�I'�*�X���Q�
��
�s�:G%�%
G4�3G4c��UcUc[R"S5eUR5nUbURS5nUR	SXS9$)�Get the dirstate row for file_id or path.

If either file_id or path is supplied, it is used as the key to lookup.
If both are supplied, the fastest lookup is used, and an error is
raised if they do not both point at the same row.

:param file_id: An optional unicode file_id to be looked up.
:param path: An optional unicode path to be looked up.
:return: The dirstate row tuple for path/file_id, or (None, None)
�must supply file_id or pathr�r��fileid_utf8�	path_utf8)r�BzrErrorrIr�r�)r=rWr}rUs    r@r��DirStateWorkingTree._get_entryzsU���?�t�|��/�/�"?�@�@��%�%�'�����;�;�v�&�D�����w��G�GrCc��URUS9nUSc[X5eUc'[USSUSS5RS5nUR	U5nUR5nUc[RU5n[R"XSXBS9nUSSSS:XaSUcNURU5up�[RU5n
UR5 UR!XU	45 U
$U$g![a)nUR[R:XaSnAgeSnAff=f!UR5 f=f)Nr�rrr�)r�f)r�rr�decode�abspathrI�osutils�lstat�OSError�errno�ENOENTr�update_entry�get_file_with_stat�sha_file�close�_observed_sha1)r=r}rr|�file_abspathrU�er��file_obj�	statvalue�sha1s           r@�
get_file_sha1�!DirStateWorkingTree.get_file_sha1�sC�����T��*����8���T�(�(��<��E�!�H�Q�K��q��!��5�<�<�V�D�D��|�|�D�)���%�%�'����
�$�]�]�<�8�
� �,�,��,�
����8�A�;�q�>�T�!��#�&*�&=�&=�d�&C�#��%�"�+�+�H�5�D��N�N�$��#�#�D��*;�<���#�#���'�
��7�7�e�l�l�*����	
���N�N�$�s*�0C=�D3�=
D0�D+�*D+�+D0�3Ec���S[R;a[RSS5 URbUR$UR5 UR
5 UR$)zAGet the inventory for the tree. This is only valid within a lock.�evilrz7accessing .inventory forces a size of tree translation.)�debug�debug_flagsr*�mutter_callsiter2r�r�r^s r@�_get_root_inventory�'DirStateWorkingTree._get_root_inventory�s\���U�&�&�&��!�!��L�
��?�?�&��?�?�"������ � �"����rCzRoot inventory of this tree��docc��UR5 UR5R5sSSS5 $!,(df   g=f)z\See Tree.get_parent_ids.

This implementation requests the ids list from the dirstate file.
N)�	lock_readrI�get_parent_idsr^s r@r�"DirStateWorkingTree.get_parent_ids�s/��
�^�^�
��(�(�*�9�9�;��
�
�s	�9�
Ac��URU5R5$![a. URUS9nUS:Xa[	X5eUSSSs$f=f)Nr��NNrr)�get_nested_treer]rr�r�r=r}r|s   r@�get_reference_revision�*DirStateWorkingTree.get_reference_revision�se��	"��'�'��-�;�;�=�=�� �	"��O�O��O�.�E���$� ��,�,���8�A�;�q�>�!�		"�s�!�5A�Ac��[R"URU55$![Ra [U5ef=f�N)r�openr�r�NotBranchErrorr�r=r}s  r@r�#DirStateWorkingTree.get_nested_tree�sA��	*��#�#�D�L�L��$6�7�7���$�$�	*�#�D�)�)�	*�s	�$'� Ac�r�UR5 UR5 URUS9nUS:Xa�US:Xa�S[R;a[
R
SS5 UR5HBnURU5n[RXERU55s sSSS5 $ [R"XS9e[RUS	S	US	S
5nURS5sSSS5 $![Ra M�f=f!,(df   g=f�zConvert a file-id to a path.)rWr�downrrz$Tree.id2path scans all nested trees.N)�treerWrrr�)rrIr�rrr*r	�iter_referencesrr�rrhrrir��r=rW�recurser|�nested_path�nested_treer�s       r@rh�DirStateWorkingTree.id2path�s��
�^�^�
��!�!�#��O�O�G�O�4�E���$��f�$���!2�!2�2��-�-�a�1W�X�'+�';�';�'=��&*�&:�&:�;�&G��!�#*�#3�#3� +�-@�-@��-I�$���
�(>��o�o�4�A�A��(�(��q��!��e�A�h�q�k�B�I��#�#�F�+�#�
�� &���!� �!���
�s7�A:D(�#D
�/D(�;AD(�
D%�!D(�$D%�%D(�(
D6c�D�URUS9nUS:XagUSSS$)Nr�rFrr�)r�)r=r}�stat_resultr|s    r@�,_is_executable_from_path_and_stat_from_basis�@DirStateWorkingTree._is_executable_from_path_and_stat_from_basis�s/�����T��*���L� ���Q�x��{�1�~�rCc�Z�UR5(d!URUS9nUS:XagUSSS$UR5 [R	URU55Rn[[RU5=(a [RU-5$)zlTest if a file is executable or not.

Note: The caller is expected to take a read-lock before calling this.
r�rFrrr))r�r�r�r�r�r��st_mode�boolr��S_ISREG�S_IEXEC)r=r}r|�modes    r@�
is_executable�!DirStateWorkingTree.is_executable�s���
�(�(�*�*��O�O��O�.�E���$����8�A�;�q�>�!�� � �"��=�=����d�!3�4�<�<�D�����T�*�B�t�|�|�d�/B�C�CrCc���UR5 [5nUR5R5H'up#USSS;aMUR	US5 M) U$)zSee Tree.iter_all_file_ids.rr�r)r�r�rI�
_iter_entriesrP)r=r�r��tree_detailss    r@�all_file_ids� DirStateWorkingTree.all_file_ids�s`���������!%�!6�!6�!8�!F�!F�!H��C��A��q�!�\�1���J�J�s�1�v��"I��
rCc��UR5 URRSS9VVs1sHupUiM	 snn$s snnf)NT)�	recursive)r��root_inventory�iter_entriesrs   r@�all_versioned_paths�'DirStateWorkingTree.all_versioned_pathssF������$(�$7�$7�$D�$D�t�$D�$T�
�$T�[�T�D�$T�
�	
��
s�?c	��UR5 /nUR5R5H~up#USSS;aM[URUSRS5USRS55n[RU5(dMjURUS5 M� [U5sSSS5 $!,(df   g=f)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.
rr�r�rrN)
rrIr6rr-r�r��lexists�append�iter)r=r�r�r7r}s     r@�__iter__�DirStateWorkingTree.__iter__s����^�^�
��F�%)�%:�%:�%<�%J�%J�%L�!����?�1�%��5����L�L�#�a�&�-�-��"7��Q����v�9N����?�?�4�(�(��M�M�#�a�&�)�&M���<��
�
�s�BC�"C�
Cc#�# �UR(dgUR5 UR5R5HkupUSSS;aMUS(dM[	USRS5USRS55nUR
U5S:XaUv� MkMm SSS5 g![a M�f=f!,(df   g=f7f)Nrr�rr�re)r<rrIr6rr�rXr)r=r�r7rfs    r@r"�#DirStateWorkingTree.iter_references!s�����1�1�
�
�^�^�
�%)�%:�%:�%<�%J�%J�%L�!����?�1�%��5���1�v��"�3�q�6�=�=��#8�#�a�&�-�-��:O�P����y�y��)�-=�=�%�
�>�&M��
��"������
�sA�#C�A.C
�B<�-C
�3	C�<
C
�C
�	C
�
C
�
C�Cc�h�UR5nURUS9nUR"U/UQ76 g)zSee MutableTree._observed_sha1.r�N)rIr�r�)r=r}�sha_and_statrUr|s     r@r��"DirStateWorkingTree._observed_sha16s3���%�%�'�����T��*��
���U�2�\�2rCc��URU5n[U5nUR(aGUS:XaAUR5 UR	US9nUSbUSSSS:XaSnSSS5 U$U$!,(df   U$=f)Nrzr�rr�tre)r�r
r<rr�)r=rfr�rXr|s     r@rX�DirStateWorkingTree.kind<s����,�,�w�'����!���-�-�$�+�2E����!����W��5����8�'��Q�x��{�1�~��-�/��	"�
��t��"�!�
��s�'A7�7
Bc���UR5 UR5R5nU(aUSsSSS5 $[RsSSS5 $!,(df   g=f)zSee Mutable.last_revision.rN)rrIr�
_mod_revision�
NULL_REVISION)r=�
parent_idss  r@�_last_revision�"DirStateWorkingTree._last_revisionGsL��
�^�^�
��.�.�0�?�?�A�J��!�!�}��
�
%�2�2��
�
�s�*A�A�
A,c��URR5 URR5 UR5nUR(dUR5 [URRRSS5Ul[UR5$![a URR5 ef=f![a URR5 ef=f)zYSee Branch.lock_read, and WorkingTree.unlock.

:return: A breezy.lock.LogicalLockResult.
r'F)r>rr.rIrqr:r;r(r<�
BaseExceptionrtr�r=rUs  r@r�DirStateWorkingTree.lock_readPs���
	
������	����)�)�+�
��-�-�/���(�(��O�O�%�6=��K�K�*�*�2�2�4M�u�6��2�!����-�-��
!�
��#�#�*�*�,��
���	��K�K��� ��	�s�C�A!B-�-&C�C�&C<c���URR5 UR5nUR(dUR5 [	UR
RRSS5Ul[UR5$![a URR5 ef=f![a UR
R5 ef=f)z1This should be called after the branch is locked.r'F)r.rsrIrqr:r>r;r(r<rUrtrrVs  r@�_lock_self_write�$DirStateWorkingTree._lock_self_writeis���	����*�*�,�
��-�-�/���(�(��$�$�&�6=��K�K�*�*�2�2�4M�u�6��2�!����-�-��
!�
��#�#�*�*�,��
���	��K�K��� ��	�s�B<�A!B�&B9�9B<�<&C"c�V�URR5 UR5$)zdSee MutableTree.lock_tree_write, and WorkingTree.unlock.

:return: A breezy.lock.LogicalLockResult.
)r>rrYr^s r@rH�#DirStateWorkingTree.lock_tree_write~s#��
	
�������$�$�&�&rCc�V�URR5 UR5$)z_See MutableTree.lock_write, and WorkingTree.unlock.

:return: A breezy.lock.LogicalLockResult.
)r>rsrYr^s r@rs�DirStateWorkingTree.lock_write�s#��
	
����� ��$�$�&�&rCc�
^.^/^0^1�/nU(dU$UR5 UR5m0[U[[45(a
[5eUR
S5n[RRU5upgT0RXgS5up�p�U(d,[R"SU[R"U55eT0RUSU	nT0RX�U5n
T0RU
nUR!U5n[#U5(d,[R"SU[R$"U55eUSSSS:wa,[R"SU[R$"U55eUR&bSnUR(nUSSnOS	n[*R-5m/U/U04S
jm.UGHnUR
S5n[.RU5unn[.RU5unnUR1US9nUS:Xa*[R"UU[R"US95eUSSn[3UU5n[3UU5nUR1US9nUS:wa[R"UUS
5eUU:Xa[R"UUS5eUR5U5(+nUR5U5(+nU(aS	nOSnU(a[U(d [R"UU[7USS95eU(a,[R8"UU[R:"UU4S95eO(U(aS	nOU(d[R<"UU5eU(aZUR!U5n UR!U5n![.R?U U!5 T/RC[.R>U!U 5 U(aNWREU5nURFn#UR?UWU5 T/RCUR>UU#U5 T0RUUS5un$n%n
n&T0RU$Sn'U'U%n(U(un)n*U*Sn+US4U)SS-n,U+Sn-T."U(UU-U+SU+SU+SU+SUU,US9
 U-S:XaU.U0U14Sjm1T1"UU,U5 URMUU45 T0RO5 URQS	S9 GM UsSSS5 $![@a n"[R"UUU"S5eSn"A"ff=f![Ha T/RK5 ef=f!,(df   g=f)zSee WorkingTree.move().r�rrdrr�NTrFc
�>�TRU5 USn
TRTRU
UUUUUUS9 TRUUUUUUU	S9 TRX�S5up�USUn
TRTRU
5 g)Nr)r~�fingerprint�packed_statr�r�r)�_make_absent�callback�update_minimal�_find_entry_index)�	old_entry�from_path_utf8r�r~rarbr��to_block�to_key�to_path_utf8�from_key�added_entry_indexr��	new_entry�	rollbacksrUs              ��r@�move_one�*DirStateWorkingTree.move.<locals>.move_one�s�����"�"�9�-�$�Q�<���"�"��(�(���)� +� +��,�#�	��$�$���)� +� +��*�%��(-�'>�'>�v�PQ�{�'S�$�!�$�Q�K�(9�:�	��"�"�5�#5�#5�y�ArCr�rzTarget is already versioned.z Source and target are identical.z!New file has not been created yet)r}�extra)r�r)��	rhr�r~rarbr�rirjrkc�f>�US:Xa[S5eUS4nTRU5upEU(dgTRUnTRUSUSS5upx n	TR	XxU5nTRUn
USSSH�nUSSU:Xd
[5eUSSnX+SSUSS4n[
R
USSUSS5n
[
R
X+SS5nUSnUS;aM{T"UU
UUS	USUS
USU
UUS9
 US:XdM�T"X�U5 M� g)
z0Recursively update all entries in this dirblock.rCzrenaming root not supportedrdNrrrr�r)rsrtr�)r��_find_block_index_from_keyr�r��
_ensure_blockr�r)�from_dirrj�to_dir_utf8rl�from_block_idx�present�
from_block�to_block_index�to_entry_indexr�rir|�cur_detailsrhrkr�rprU�update_dirblocks                ���r@r��1DirStateWorkingTree.move.<locals>.update_dirblockGs����'�3��&4�5R�&S� S�(0�"�~�H�6;�6V�6V� (�7�3�N�$+�
!'�).�)9�)9�.�)I�J� %� <� <�V�A�Y��q�	�ST� U�A�N�A�q�.3�-@�-@� .��.�N�(-�'7�'7��'G�H�*4�A��q�)9��(-�a����x�(?�*8�*:�$:�.3�A�h�q�k��*5�Q�x��{�E�!�H�Q�K�)P��18�1A�1A�$)�!�H�Q�K��q��!��2"��07�/?�/?�$/�q��!��0"��,7�q�>��#+�|�#;�
%-� (�$)�3A�-5�/:�1�~�0;�A��0;�A��)4�Q��-5�+1�1=�!"�$,�t�#3�%4�(6��%&�C*:rCrF))rHrI�
isinstance�str�bytes�
ValueErrorr�r�r}r�r�r�BzrMoveFailedError�NotVersionedErrorr�rwr�r�
NotADirectoryr2r<�
contextlib�	ExitStackr�r�r�has_filenamer�BzrRenameFailedError�PathsDoNotExist�RenameFailedFilesExist�renamer�rd�	get_entry�	parent_idrUr�rB�_mark_modifiedrQ)2r=�
from_paths�to_dir�afterr�ry�to_entry_dirname�to_basename�to_entry_block_index�to_entry_entry_index�dir_present�
entry_present�to_entryr}ri�to_abs�update_inventoryr��	to_dir_id�from_rel�
from_rel_utf8�from_dirname�	from_tail�from_tail_utf8�
from_entry�from_id�to_rel�to_rel_utf8�
item_to_entry�from_missing�
to_missing�	move_file�from_rel_abs�
to_rel_absr��current_parent�old_block_index�old_entry_index�file_present�	old_blockrgrl�old_entry_detailsrrjr�rprorUr�s2                                              @@@@r@�move�DirStateWorkingTree.move�sf�������M�
�
!�
!�
#��)�)�+�E��*�s�E�l�3�3� �l�"� �-�-��/�K�,.�G�G�M�M�+�,F�)���,�,�-=�A�N�
U�
!��!��/�/���� 8� 8�� @����'�'�(<�=�a�@�AU�V�H�"�0�0�$�K��N��'�'��7�H��\�\�&�)�F���=�=��/�/���� 4� 4�V� <�����{�1�~�a� �D�(��/�/���� 4� 4�V� <������*�#'� ��)�)��$�Q�K��N�	�#(� �#�,�,�.�I�#
B�J'�� (���� 7�
�*1�-�-��*A�'��i�/6�}�}�]�/K�,��n�!�_�_�(�_�;�
���-� �3�3� �&�&�*B�*B��*Q���%�Q�-��*��!�&�)�4��&�{�N�C�� $���V�� <�
� �L�0� �3�3� �&�*H����v�%� �3�3� �&�*L���$(�#4�#4�X�#>�>��!%�!2�!2�6�!:�:�
�� %�I� $�I��$�$�7�7�$�"�&�%+�3V����&�$�9�9�$�"�"�2�2�(�F�9K�L���&�$�$)�	�"�$�;�;�H�f�M�M��#'�<�<��#9�L�!%���f�!5�J�P����|�Z�@��&�&�w�~�~�z�<�P�f�(�%(�]�]�7�%;�
�)3�)=�)=���
�
�7�I�y�A�!�*�*��J�J������4�4�\�>�ST�U�P�O�_�k�<�!&� 0� 0�� A�!� D�I� )�/� :�I�2;�/�H�/�"3�A�"6�K�&�q�k�^�h�q��m�;�F�*�1�~�H��!�'4�!)�#.�q�>�$/��N�$/��N�(��^�!)�%�%0�� �4�'�;&�z(�
�v�{�K��
�
�x��0�1��$�$�&�� � �� �7�O'�R�s$�
#��V#�P�$�7�7��&�!�A�$�O�O��P��N%���O�O�%����e$�
#�sI�NU�,S8�!U�$CT%�68U�8
T"�T�T"�"U�%U�U�
Uc�f�URR(d[R"U5egr)r.�_lock_countr�ObjectNotLockedr^s r@r��#DirStateWorkingTree._must_be_locked�s'���"�"�.�.��(�(��.�.�/rCc��SUlg)z3Initialize the state in this tree to be a new tree.TN)r0r^s r@�	_new_tree�DirStateWorkingTree._new_tree�s	����rCc��UR5 [U[5(aU/:XaS/n[R"U6nURS5nUR
US9nUS:Xa:URU5up4UbURU5sSSS5 $SSS5 gUSSsSSS5 $!,(df   g=f)�$Return the id for path in this tree.rdrEr�rNrr)	rr��listr�rrKr��get_containing_nested_treerL�r=r}r|r&�subpaths     r@rL�DirStateWorkingTree.path2id�s���
�^�^�
��$��%�%��2�:��4�D��'�'��.���:�:�c�?�D��O�O��O�.�E���$�'+�'F�'F�t�'L�$���*�&�.�.�w�7��
���
���8�A�;��
�
�s�A>B4�B4�#B4�4
Cc��>�Uc/nUcgUR5nUH:n[U[5(aURU;aM*[T
U]XU5s $ S/UVs/sH!nSUR
UR5-PM# sn-n[5nUH#nURURS55 M% UR5 URn	U	"XvUS9$s snf)zhSee Tree.paths2ids().

This specialisation fast-paths the case where all the trees are in the
dirstate.
Nrrr�)�require_versioned)
rr��DirStateRevisionTree�_revision_id�super�	paths2ids�indexr�rPr�rI�_paths2ids_using_bisect�_paths2ids_in_memory)r=r�r\r��parentsr!�search_indexes�
paths_utf8r}r��	__class__s          �r@r��DirStateWorkingTree.paths2ids�s�����=��E��=���%�%�'���D��4�!5�6�6�4�;L�;L�PW�;W��w�(��7H�I�I�	�
��QV�W�QV���G�M�M�$�2C�2C�$D� D�QV�W�W���U�
��D��N�N�4�;�;�v�.�/��	
������1�1�I���:K�
�	
�� Xs�!(C%c�.^^^^^�UR5mTR5 U4SjnU(a�SnUHInU"U5nU(dSn O7SnUH n	THn
U	SU
SS:wdMSn M M" U(aMGSn O U(d5[R"UVs/sHo�R	S5PM sn5e[
R
U5m[5m[5mUUUU4SjnT(GaTR5n
TRU
5 U"U
5nU(dM:UHn	U"U	5 M
 U
S	S	4nTRU5unnU[TR5:a�[
RU
TRUS5(alTRUSHn	U"U	5 M
 US-
nU[TR5:a-[
RU
TRUS5(aMlT(aGMT$s snf)
Nc�>�[RRU5upXS4nT
RU5upEU(d/$/nT
RUSnT
RX75up�U[
U5:aKXxSSSUSS:Xa:URXx5 US-
nU[
U5:aXxSSSUSS:XaM:U$)z?Return a list with all the entries that match path for all ids.rCrrr)r�r}r�rvr�rf�lenrB)r}r�r�r��block_indexr{r�r��entry_indexr�rUs          �r@�_entries_for_path�CDirStateWorkingTree._paths2ids_in_memory.<locals>._entries_for_path�s���� "���
�
�d� 3��G��c�*�C�#(�#C�#C�C�#H� �K���	��F��$�$�[�1�!�4�E�"�4�4�S�@�N�K���E�
�*�u�/A�!�/D�Q�q�/I�S�QR�ST�X�/U��
�
�e�0�1��q� ����E�
�*�u�/A�!�/D�Q�q�/I�S�QR�ST�X�/U��MrCTFrrr��utf-8c�
>�TH|nUSUSS:XaB[RTUSUS5(dTRUSUS5 MRMTUSUSS:wdMeTRUSS5 M~ g)z�Look at search_indexes within entry.

If a specific tree's details are relocated, add the relocation
target to search_paths if not searched already. If it is absent, do
nothing. Otherwise add the id to found_ids.
rrr�r�rN)r��
is_inside_anyrP)r|r��	found_idsr��search_paths�searched_pathss  ����r@r8�@DirStateWorkingTree._paths2ids_in_memory.<locals>._process_entry�s����(����8�E�?�1�%��-�"�0�0���q��%��QR�AS�T�T�$�(�(��q��%���);�<�U��1�X�e�_�Q�'�4�/��M�M�%��(�1�+�.�(rCrC)rIr�r�PathsNotVersionedErrorr�r��minimum_path_selectionr��poprPrvr�r��	is_inside)r=r�r�r�r��
all_versionedr}�path_entries�found_versionedr|r��pr8�current_root�root_entries�initial_keyr�r�r�r�r�rUs  `               @@@@r@r��(DirStateWorkingTree._paths2ids_in_memory�s
����%�%�'��
�'�'�)�	�$� �M���0��6��#�$)�M��"'��)�E�!/�� ��8�E�?�1�-��5�.2�O�!�	"0�*�'��%*�M��'�(!��3�3�PU�4V�PU�1�X�X�g�5F�PU�4V�W�W��5�5�e�<������E�	�	/�	/��'�+�+�-�L����|�,�-�\�:�L���%���u�%�&�'��c�2�K�"�=�=�k�J�N�K����E�$4�$4� 5�5�'�:K�:K��e�.�.�{�;�A�>�;�;�#�-�-�k�:�1�=�E�"�5�)�>��q� ����E�$4�$4� 5�5�'�:K�:K��e�.�.�{�;�A�>�;�;��l�&���Y5Ws�Hc	���UR5n[5n[SU55nURU5nU(aWUVs1sHo�SSiM	 n	nUH=n
X�;dM
[R
"UVs/sHo�R
S5PM sn5e UR5H/up�UH$n
X�SS;dMURUS5 M& M1 U$s snfs snf)Nc3�L# �UHn[RU5v� M g7fr)r�r�)�.0r�s  r@�	<genexpr>�>DirStateWorkingTree._paths2ids_using_bisect.<locals>.<genexpr>$s���=�u�!�W�]�]�1�-�-�u�s�"$rr�r)r�r�)	rIr�r��_bisect_recursiverr�r��itemsrP)r=r�r�r�rUr��split_paths�found�dir_name_id�found_dir_names�dir_namer��
trees_infor�s              r@r��+DirStateWorkingTree._paths2ids_using_bisect s����%�%�'���E�	��=�u�=�=���'�'��4���BG�H�%�;�2�A��%�O�H�'���2� �7�7�49�:�E�q���'�*�E�:���(�(-�{�{�}�#�K�'���$�Q�'�|�;��M�M�+�a�.�1�(�(5����I��;s�	C!�9C&
c��UR$)zbRead the working inventory.

This is a meaningless operation for dirstate, but we obey it anyhow.
)r<r^s r@�read_working_inventory�*DirStateWorkingTree.read_working_inventory5s��
�"�"�"rCc	��UR5 UR5nUR"5nX;a[R"X5eXR
"5;a[R"X5e[
UUURR[UR55sSSS5 $!,(df   g=f)zRSee Tree.revision_tree.

WorkingTree4 supplies revision_trees for any basis tree.
N)rrIrr�NoSuchRevisionInTree�
get_ghostsr�r>r;rr-)r=�revision_idrrQs    r@�
revision_tree�!DirStateWorkingTree.revision_tree<s���
�^�^�
��,�,�.�H�!�0�0�2�J��,��1�1�$�D�D��1�1�3�3��1�1�$�D�D�'������&�&�'����5�	��
�
�s�BB6�6
Cc�*�UR5 UR5nU[RS4;a,[	U5S:�a[S5eUR
/5 OUR
U/USS-SS9 SSS5 g!,(df   g=f)z-Change the last revision in the working tree.NrzDsetting the last parent to none with a pending merge is unsupported.rT��allow_leftmost_as_ghost)rHrrOrPr�r��set_parent_ids)r=�new_revisionr�s   r@�set_last_revision�%DirStateWorkingTree.set_last_revisionOs���
�
!�
!�
#��)�)�+�G��
� ;� ;�T�B�B��w�<�1�$�(�*����#�#�B�'��#�#�!�N�W�Q�R�[�0�$�$��$�
#�
#�s�A*B�
Bc�T�UR5 /nUH;nURRRU5nURXE45 M= URX2S9 SSS5 g![R
[R4a SnNVf=f!,(df   g=f)a�Set the parent ids to revision_ids.

See also set_parent_trees. This api will try to retrieve the tree data
for each element of revision_ids from the trees repository. If you have
tree data already available, it is more efficient to use
set_parent_trees rather than set_parent_ids. set_parent_ids is however
an easier API to use.

:param revision_ids: The revision_ids to set as the parent ids of this
    working tree. Any of these may be ghosts.
Nr)	rHr>r;rr�NoSuchRevision�RevisionNotPresentrB�set_parent_trees)r=�revision_idsrr\r�revtrees      r@r�"DirStateWorkingTree.set_parent_ids_s����
!�
!�
#��E�+��#�"�k�k�4�4�B�B�;�O�G����k�3�4� ,�
�!�!��
"�
�$�
#���-�-�v�/H�/H�I�#�"�G�#��$�
#�s-�B�%A-�%B�-&B�B�B�B�
B'c�~�UR5 UR5n[U5S:�a,U(d%USSc[R"USS5e/n/nUVVs/sHupgUPM	 nnnUR
RR5n	U	RU5n
[5nUH�upg[U5S:�aXk;dXj;aM [R"U5 UbURXg45 OUURUUR
RR[R545 URU5 URU5 M� Sn[U5S:Xa�U(d�UR
RR R"(a�[%USS[&5(a�UR)5(azUSupmUR)5SnUR
RRU5nU
R*R-UR*5nUR."UU5 SnU(dUR2"XES9 UR5SS9 SSS5 gs snnf![R0a NKf=f!,(df   g=f)z�Set the parents of the working tree.

:param parents_list: A list of (revision_id, tree) tuples.
    If tree is None, then that element is treated as an unreachable
    parent tree - i.e. a ghost.
rrNFT)�ghostsrF)rHrIr�r�GhostRevisionUnusableHerer>r;�	get_graph�headsr�rO�check_not_reserved_idrBrrPrPr(�fast_deltasr�rrr<�_make_delta�update_basis_by_deltarrrQ)r=�parents_listrr�
real_treesr�rev_idr!rQ�graphr�accepted_revisions�updated�rev_tree�basis_id�
basis_tree�deltas                 r@r�$DirStateWorkingTree.set_parent_trees{sj���
!�
!�
#��,�,�.�H��<� �1�$�.�<��?�1�3E�3M� �:�:�<��?�1�;M�N�N��J��F�5A�B�\�\�V�&�\�J�B��K�K�*�*�4�4�6�E��K�K�
�+�E�!$���!-����)�*�Q�.��3�v�7J�!��3�3�F�;��#��%�%�v�n�5��%�%�"� �K�K�2�2�@�@� -� ;� ;�����M�M�&�)�"�&�&�v�.�)!-�*�G��J��1�$���K�K�*�*�2�2�>�>��z�!�}�Q�/�1F�G�G��'�'�)�)�#-�a�=� ���.�.�0��3��#�!%���!7�!7�!E�!E�h�!O�J�%�3�3�?�?�"�1�1��E��2�2�5�&�A�"�G���)�)�*�D����U��3�}$�
#��C��T�,�,�����e$�
#�sD�AJ.�&J�4FJ.�%J�%A J.�J.�J+�(J.�*J+�+J.�.
J<c��UR5nURSU5 UR[RR
:XaUR
SS9 gg)zSee WorkingTree.set_root_id.rCTrFN)rIrM�_dirblock_staterr��IN_MEMORY_MODIFIEDrQ)r=rWrUs   r@�_set_root_id� DirStateWorkingTree._set_root_id�sQ���%�%�'��
���#�w�'�� � �H�$5�$5�$H�$H�H����T��2�IrCc�@�UR5RX5$)z�Get a sha digest from the tree's stat cache.

The default implementation assumes no stat cache is present.

:param path: The path.
:param stat_result: The stat result being looked up.
)rI�sha1_from_stat)r=r}r*s   r@�_sha_from_stat�"DirStateWorkingTree._sha_from_stat�s���$�$�&�5�5�d�H�HrCc��UR$r)r<r^s r@r'�+DirStateWorkingTree.supports_tree_reference�s���1�1�1rCc��URRS:Xa�UR5 URRS:Xa!UR(aUR5 URb4URR5 URR5 SUlSUl	URR5URR5 $!URR5 f=f)z<Unlock in format 4 trees needs to write the entire dirstate.rr�N)r.r��_cleanupr�r0r�r1r�rtr2r>r^s r@rt�DirStateWorkingTree.unlock�s������*�*�a�/��M�M�O��"�"�-�-��4��;�;��J�J�L��~�~�)����#�#�%����%�%�'�
"�D�N�"�D�O�	!��&�&�-�-�/��K�K��� ��D�K�K��� �s�6C*�*Dc	���UR5 U(d
SSS5 gUR5nUR5 [5nUH3nUR	U5nUc[X5eUR
U5 M5 [U5n[5nURSSH2up�U	SSS;dMUSU;dM[R"S5e Sn
U
[UR5:Ga�URU
nSnUHRnUSRU5(dM[US5[U5:XdUS[U5S:XdMPS	n O U(aSn
U
[US5:acUSU
nUSSSS;aU
S-
n
O2URUSS5 URU5(dU
S-
n
U
[US5:aMcU
S-
n
GM	Sn
U
[US5:a�USU
nUSSSS;dUSSU;aU
S-
n
M<USSSS
:Xa'UR
[USSUSS55 URU5(dU
S-
n
URUSS5 U
[US5:aM�U
S-
n
U
[UR5:aGM�U(a)[R "U[#[%U555eUR'SS9 UR(bFUH@nUR(R+U5(dM%UR(R-U5 MB SSS5 g!,(df   g=f)z�Remove the file ids in paths from the current versioned set.

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

:param paths: The file ids to stop versioning.
:raises: NoSuchId if any fileid is not currently versioned.
Nrrr�rz-Unversioning the / is not currently supportedFrETr�rF)rHrIr�r�rLrrPr�rr�r��
startswith�discardrcr�removeri�nextrCrQr2�has_id�remove_recursive_id)r=r�rU�file_idsr}rW�ids_to_unversion�paths_to_unversionr��detailsr�r��delete_blockr�r|s               r@�	unversion�DirStateWorkingTree.unversion�sh���
!�
!�
#���$�
#��)�)�+�E��+�+�-��u�H����,�,�t�,���?�$�T�0�0����W�%�	�
 #�8�}��!$���
!&� 0� 0�� 3�A� 6����A�J�q�M��5��A��"2�2�!�/�/�G���!7��K���E�$4�$4� 5�5��(�(��5��$��.�D��Q�x�*�*�4�0�0��E�!�H�
��T��2�e�A�h�s�4�y�6I�S�6P�(,���/� �#$�K�%��E�!�H�
�5� %�a��� 5�� ��8�A�;�q�>�\�9�'�1�,�K�-�4�4�U�1�X�a�[�A�#(�#5�#5�e�#<�#<� +�q� 0��&��E�!�H�
�5� �1�$�K����!�C��a��M�1�!�!�H�[�1�E��a����A��,�6��a����+;�;�$�q�(�� ��Q�x��{�1�~��-�*�.�.�x��a����U�1�X�a�[�/Q�R� �-�-�e�4�4�#�q�(��$�+�+�E�!�H�Q�K�8�!"�C��a��M�1�"�q� ��i��E�$4�$4� 5�5�j ��o�o�d�D��6F�1G�,H�I�I����U��3����*�'�G����-�-�g�6�6����;�;�G�D� (�m$�
#�
#�sE�	M$�BM$�M$�A!M$�0.M$�"BM$�&CM$�(M$�	A/M$�<M$�$
M2c�>�UR5 UR5 [TU]
XU5 SSS5 g!,(df   g=f)zSee WorkingTree.rename_one.N)rHr�r��
rename_one)r=r�r�r�r�s    �r@rC�DirStateWorkingTree.rename_oneTs3���
�
!�
!�
#��J�J�L��G��x��7�$�
#�
#�s	�!<�
A
c��UR5 UR5nURU5 URSS9 SSS5 g!,(df   g=f)z&See MutableTree.apply_inventory_delta.TrFN)rHrI�update_by_deltarQ)r=�changesrUs   r@�apply_inventory_delta�)DirStateWorkingTree.apply_inventory_deltaZsG��
�
!�
!�
#��)�)�+�E��!�!�'�*����T��2�$�
#�
#�s�1A�
Ac�~�UR5U:Xa
[5eUR5RX!5 g)z&See MutableTree.update_basis_by_delta.N)r]r�rIr)r=�	new_revidr$s   r@r�)DirStateWorkingTree.update_basis_by_deltaas3������9�,� �"�"�����5�5�e�GrCc��UR5 URR5 SSS5 g!,(df   g=fr)rr1�	_validater^s r@rN�DirStateWorkingTree._validategs(��
�^�^�
��N�N�$�$�&��
�
�s	�5�
Ac�L�UR(a[S5eUR5 URSLnSUlUR	UR
5nUR
U5 U(aXlUR5 SSS5 g!,(df   g=f)z)Write inventory as the current inventory.zUattempting to write an inventory when the dirstate is dirty will lose pending changesN)r0r�rHr2rr<rHr�)r=r��
had_inventoryr$s    r@�_write_inventory�$DirStateWorkingTree._write_inventoryks���;�;� �>��
��
!�
!�
#� �O�O�4�7�M�
#�D�O��O�O�D�$7�$7�8�E��&�&�u�-��"%���J�J�L�$�
#�
#�s�AB�
B#c	���UR5 UcUR5nU(d6URRR	[
R5n/nO@[[UURRRU555nUSSnUR5nURURU/5 SSS5 g!,(df   g=f)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)
Nrr)
rHrr>r;rrOrPr�rJ�revision_treesrI�set_state_from_scratchr<)r=r�	base_treer\rUs     r@�reset_state�DirStateWorkingTree.reset_state�s����
!�
!�
#��#�#�2�2�4��� �K�K�2�2�@�@�!�/�/��	�����$����.�.�=�=�l�K����"�!�H�Q�K�	��)�)�+�E��(�(��)A�)A�5�"�M�%$�
#�
#�s�B>C�
C&)
r,r.r1r0r(r2r9r<r5r/r-r)r7)NNNrr�r �F�NT)T)C�__name__�
__module__�__qualname__�__firstlineno__rArYr_rQrmrvr{r�rIrpr�r�r�r�r�r�r�rr
�propertyr<rrrrhr+r3r8r>rDr"r�rXrRrrYrHrsr�r�r�rLr�r�r�r�rr	rrr)r-r'rtr@rCrHrrNrRrX�__static_attributes__�
__classcell__�r�s@r@r$r$HsW���NR�#
�J3�&1�#�J�.#!�J,��	(��$
�>��*�.�C�JH�$ �D
��1�7T�U�N�<�"�*�,�*�
D��
� �&�*3�	�3�.�2.�*'�'�~�@/��� 
�<Z�x�*#��&� �8E4�N3�I�2�!�6aE�F8�3�H�'��,N�NrCr$c�&�\rSrSrSrSrSrSrg)r�i�c��Xlgr�r!�r=r!s  r@rA�'ContentFilterAwareSHA1Provider.__init__�s���	rCc��URRURR[R	U555n[
R
X5S$)z!See dirstate.SHA1Provider.sha1().r)r!�_content_filter_stackrfr�r�_mod_filters�internal_size_sha_file_byname)r=r��filterss   r@r�#ContentFilterAwareSHA1Provider.sha1�sK���)�)�1�1��I�I���g�2�2�7�;�<�
���9�9�'�K�A�N�NrCc���URRURR[R	U555n[USS5n[R"UR55nU(a,[RX25up5[RXE5n[RU5SnSSS5 XF4$!,(df   WW4$=f)z*See dirstate.SHA1Provider.stat_and_sha1().�rbi�rN)
r!rkrfr�rrr��fstat�filenorl�filtered_input_file�FilteredStat�
size_sha_file)r=r�rnrrr�rs       r@�
stat_and_sha1�,ContentFilterAwareSHA1Provider.stat_and_sha1�s����)�)�1�1��I�I���g�2�2�7�;�<�
���'�4��
'�8�������!2�3�I��!-�!A�!A�(�!T���(�5�5�i�F�	��(�(��2�1�5�D�(����
(�
'��$���s
�A0C�
C!rgN)r]r^r_r`rArrwrb�rCr@r�r��s���O�rCr�c��\rSrSrSrSrSrg)�#ContentFilteringDirStateWorkingTreei�z�Dirstate working tree that supports content filtering.

The dirstate holds the hash and size of the canonical form of the file,
and most methods must return that.
c�d�URRX5nURX5nSSXC4$)Nr�)r1r,�!_is_executable_from_path_and_stat)r=r}r*�
dirstate_sha1r~s     r@�_file_content_summary�9ContentFilteringDirStateWorkingTree._file_content_summary�s5�����5�5�d�H�
��;�;�D�N�
���j�8�8rCryN)r]r^r_r`�__doc__rrbryrCr@r{r{�s���9rCr{c��\rSrSrSrSrg)�WorkingTree4i�aCThis is the Format 4 working tree.

This differs from WorkingTree by:
 - Having a consolidated internal dirstate, stored in a
   randomly-accessible sorted file on disk.
 - Not having a regular inventory attribute.  One can be synthesized
   on demand but this is expensive and should be avoided.

This is new in bzr 0.15.
ryN�r]r^r_r`r�rbryrCr@r�r��s��	rCr�c��\rSrSrSrSrg)�WorkingTree5i�z�This is the Format 5 working tree.

This differs from WorkingTree4 by:
 - Supporting content filtering.

This is new in bzr 1.11.
ryNr�ryrCr@r�r��s��rCr�c��\rSrSrSrSrSrg)�WorkingTree6i�z�This is the Format 6 working tree.

This differs from WorkingTree5 by:
 - Supporting a current view that may mask the set of files in a tree
   impacted by most user operations.

This is new in bzr 1.14.
c�,�[RU5$r)r7�PathBasedViewsr^s r@r6�WorkingTree6._make_views�s���#�#�D�)�)rCryN)r]r^r_r`r�r6rbryrCr@r�r��s���*rCr�c�n�\rSrSrSrSr\rSrSr	S
Sjr
SrSSjrS	r
S
rSr\"\5rSrg)�DirStateWorkingTreeFormati�T�lockc�d�URS5n[X RUR5$r)r�r	�_lock_file_name�_lock_class)r=�a_controldir�	transports   r@�_open_control_files�-DirStateWorkingTreeFormat._open_control_files�s+�� �:�:�4�@�	��Y�(<�(<�d�>N�>N�O�OrCNc	��[UR[5(d*[R"URR
5eUR
U5nURU5nUR5 UR5 URSUR5UR5S9 UbUnOUR5nUcUR5nURS5n	[ R"R%U	5n
U
R'5 A
UR)UR*RS5UUUUS9nUR-5 UR/5 UR1U5 US[2R44;ahUR6R95(a$UR;[<R?55 OUR;[@5 URC5 SnUbUREU5nUcUR6REU5nU[2R4:Xa/n
OX,4/n
URI5 URKU
SS9 URC5 URMS	5nUb!UR;U5 URC5 URO5(aS
nOSn[PRSUUUUUS9 [TRVSHnU"U5 M
 SSS5 UR'5 UR'5 U$![RFa GN3f=f!,(df   NK=f!UR'5 UR'5 f=f)
a:See WorkingTreeFormat.initialize().

:param revision_id: allows creating a working tree at a different
    revision than the branch is at.
:param accelerator_tree: A tree which can be used for retrieving file
    contents more quickly than the revision tree, i.e. a workingtree.
    The revision tree will be used for cases where accelerator_tree's
    content is different.
:param hardlink: If true, hard-link files from accelerator_tree,
    where possible.

These trees get an initial random root id, if their repository supports
rich root data, TREE_ROOT otherwise.
r��r2Nr�.)r(r?r.TrrdF)�hardlink�delta_from_tree�post_build_tree),r�r�rr�NotLocalUrl�baser�r��create_lockrs�	put_bytes�	as_string�_get_file_mode�open_branchr]r�rr��
initializert�_tree_class�root_transportr�rH�_init_custom_control_filesrOrPr;�supports_rich_rootr)rN�gen_root_idrr�rrrrrLr��
bzr_transform�
build_treer�hooks)r=r�r�from_branch�accelerator_treer�r��
control_filesr>r�rU�wt�basisr�
basis_root_idr��hooks                 r@r��$DirStateWorkingTreeFormat.initializes��,�,�0�0�.�A�A��$�$�\�%;�%;�%@�%@�A�A� �:�:�4�@�	��0�0��>�
��!�!�#�� � �"�����d�n�n�&�\�-H�-H�-J�	�	
��"� �F�!�-�-�/�F��� �.�.�0�K��,�,�Z�8�
��!�!�,�,�Z�8��
�����
�
�
��'�'�5�5�c�:���$�(��
��	����
����5	��+�+�B�/��t�]�%@�%@�A�A��$�$�7�7�9�9��O�O�L�$<�$<�$>�?��O�O�G�,����
��E� �+��,�:�:�;�G�E��}��)�)�7�7��D���m�9�9�9�!��!,� 4�5�����"��#�#�L�$�#�O����
�!&�
�
�b� 1�
� �,��O�O�M�2��H�H�J��0�0�2�2�',�O�&*�O��(�(���$�%�$3�)��(�-�-�.?�@�D���H�A�5#�:
� � �"��I�I�K��	��O�,�,�����#�"��:
� � �"��I�I�K�sK�0BM�L2�A	M�B)M
�M�2M
�M�	M
�
M�
M�M�"Nc��g)z�Subclasses with custom control files should override this method.

The working tree and control files are locked for writing when this
method is called.

:param wt: the WorkingTree object
Nry�r=r�s  r@r��4DirStateWorkingTreeFormat._init_custom_control_filesks�rCc���U(d[e[UR[5(d*[R
"URR5eURXRU55nU$)z�Return the WorkingTree object for a_controldir.

_found is a private parameter, do not use it. It is used to indicate
       if format probing has already been done.
)	�NotImplementedErrorr�r�rrr�r��_openr�)r=r��_foundr�s    r@r�DirStateWorkingTreeFormat.opents[���%�%��,�0�0�.�A�A��$�$�\�%;�%;�%@�%@�A�A�
�Z�Z��&>�&>�|�&L�
M���	rCc�v�URURRS5UR5UUUS9$)zxOpen the tree itself.

:param a_controldir: the dir for the tree.
:param control_files: the control files for the tree.
r�)r>r(r?r.)r�r�r�r�)r=r�r�s   r@r��DirStateWorkingTreeFormat._open�sE������'�'�5�5�c�:��+�+�-��$�(� �
�	
rCc�"�UR5$r)�_get_matchingcontroldirr^s r@�__get_matchingcontroldir�2DirStateWorkingTreeFormat.__get_matchingcontroldir�s���+�+�-�-rCc�@�[RRS5$�z0Overrideable method to get a bzrdir for testing.zdevelopment-subtree�r)�format_registry�make_controldirr^s r@r��1DirStateWorkingTreeFormat._get_matchingcontroldir�s���)�)�9�9�:O�P�PrCry)NNNFr[)r]r^r_r`�missing_parent_conflicts�supports_versioned_directoriesr
r�r�r�r�r�rr��2_DirStateWorkingTreeFormat__get_matchingcontroldirr�ra�_matchingcontroldirrbryrCr@r�r��s[��#��%)�"��K��O�P�����
i�V��
�.�Q�
#�#;�<�rCr�c�6�\rSrSrSrSr\r\S5r	Sr
Srg)�WorkingTreeFormat4i�aSThe first consolidated dirstate working tree format.

This format:
    - exists within a metadir controlling .bzr
    - includes an explicit version marker for the workingtree control
      files, separate from the ControlDir format
    - modifies the hash cache format
    - is new in bzr 0.15
    - uses a LockDir to guard access to it.
Fc��g)�*See WorkingTreeFormat.get_format_string().s(Bazaar Working Tree Format 4 (bzr 0.15)
ry��clss r@�get_format_string�$WorkingTreeFormat4.get_format_string����<rCc��g)�/See WorkingTreeFormat.get_format_description().zWorking tree format 4ryr^s r@�get_format_description�)WorkingTreeFormat4.get_format_description����&rCryN)r]r^r_r`r��upgrade_recommendedr�r��classmethodr�r�rbryrCr@r�r��s+��	� ���K��<��<�'rCr�c�<�\rSrSrSrSr\r\S5r	Sr
SrSrg)	�WorkingTreeFormat5i�z0WorkingTree format supporting content filtering.Fc��g)r�s(Bazaar Working Tree Format 5 (bzr 1.11)
ryr�s r@r��$WorkingTreeFormat5.get_format_string�r�rCc��g)r�zWorking tree format 5ryr^s r@r��)WorkingTreeFormat5.get_format_description�r�rCc��gr\ryr^s r@r��-WorkingTreeFormat5.supports_content_filtering����rCryN)
r]r^r_r`r�r�r�r�r�r�r�r�rbryrCr@r�r��s,��:����K��<��<�'�rCr�c�N�\rSrSrSrSr\r\S5r	Sr
SrSrSr
S	rS
rg)�WorkingTreeFormat6i�z$WorkingTree format supporting views.Fc��g)r�s(Bazaar Working Tree Format 6 (bzr 1.14)
ryr�s r@r��$WorkingTreeFormat6.get_format_string�r�rCc��g)r�zWorking tree format 6ryr^s r@r��)WorkingTreeFormat6.get_format_description�r�rCc�j�URRSSURR5S9 g)zASubclasses with custom control files should override this method.r7rCr�N�r/r�r)r�r�s  r@r��-WorkingTreeFormat6._init_custom_control_files�s(��
�
�
�����2�=�=�3O�3O�3Q��RrCc��gr\ryr^s r@r��-WorkingTreeFormat6.supports_content_filtering�r�rCc��gr\ryr^s r@�supports_views�!WorkingTreeFormat6.supports_views�r�rCc�@�[RRS5$r�r�r^s r@r��*WorkingTreeFormat6._get_matchingcontroldir�s���)�)�9�9�:O�P�PrCryN)r]r^r_r`r�r�r�r�r�r�r�r�r�r�r�rbryrCr@r�r��s=��.����K��<��<�'�S���QrCr�c�H^�\rSrSrSrSrSr\R4Sjr	Sr
SrSrS,S	jr
S
rSrU4SjrS
rS-SjrSrSrS.SjrSrSrSrSrSrSrSrSrSr\"\SS9r Sr!Sr"Sr#S r$S!r%S"r&S#r'S/S$jr(S%r)S&r*S'r+S(r,S)r-S0S*jr.S+r/U=r0$)1r�i�z�A revision tree pulling the inventory from a dirstate.

Note that this is one of the historical (ie revision) trees cached in the
dirstate for easy access, not the workingtree.
c��XlX lX0lSUlSUlSUlX@l[URSS5Ul	g)NrFr')
r1r��_repositoryr2�_locked�_dirstate_locked�_nested_tree_transportr:r(r<)r=rrr;�nested_tree_transports     r@rA�DirStateRevisionTree.__init__�sJ��!��'��%�������� %���&;�#�-4���� 9�5�.
��*rCc�x�SRURRURUR5$)Nz<{} of {} in {}>)r�r�r]r�r1r^s r@�__repr__�DirStateRevisionTree.__repr__�s2��!�(�(��N�N�#�#�����N�N�
�	
rCc���URU5nX0RU54nURRR	U5nUVVs/sHupgUSU4PM snn$s snnf)zSee Tree.annotate_iter.���)rL�get_file_revisionr��texts�annotate)r=r}�default_revisionrW�text_key�annotationsr��lines        r@�
annotate_iter�"DirStateRevisionTree.annotate_itersa���,�,�t�$���3�3�D�9�:���&�&�,�,�5�5�h�?��3>�?�;�K�S��R��$��;�?�?��?s�A%c�<�UcgURURS4$)zSee Tree._comparison_data.N)NFN)rXr~)r=r|r}s   r@r{�%DirStateRevisionTree._comparison_datas#���=�$��z�z�5�+�+�T�1�1rCc��URU5nURRnXcR;aURR	U5 U$)z>Ensure that file_id, tree_revision is in vf to plan the merge.)rr�r�fallback_versionedfilesrB)r=r}rW�vf�
tree_revisionr]�base_vfs       r@�_get_file_revision�'DirStateRevisionTree._get_file_revisionsI���.�.�t�4�
��"�"�(�(���4�4�4��&�&�-�-�g�6��rCc�f�URnUVs1sHo2"U5(aMUiM sn$s snf)zAFilter out paths that are not versioned.

:return: set of paths.
)r�)r=r��predr�s    r@r��-DirStateRevisionTree.filter_unversioned_filess-��
� � �� �0�5�a��Q���5�0�0��0s�.�.c�R�UR5 URUS9nUS:Xa�US:Xa�S[R;a[RSS5 UR
5HBnURU5n[RXERU55s sSSS5 $ [R"XS9e[RUS	S	US	S
5nURS5sSSS5 $![Ra M�f=f!,(df   g=fr)rr�rrr*r	r"rr�rrhrrir�r#s       r@rh�DirStateRevisionTree.id2path#s��
�^�^�
��O�O�G�O�4�E���$��f�$���!2�!2�2��-�-�a�1W�X�'+�';�';�'=��&*�&:�&:�;�&G��!�#*�#3�#3� +�-@�-@��-I�$���
�(>��o�o�4�A�A��(�(��q��!��e�A�h�q�k�B�I��#�#�F�+�#�
�� &���!� �!���
�s7�A*D�<#C=�D�+AD�=D�D�D�D�
D&c��UR5 URU5nURUSU5sSSS5 $!,(df   g=fr)rr�_get_nested_tree)r=r}�nested_revids   r@r�$DirStateRevisionTree.get_nested_tree8s:��
�^�^�
��6�6�t�<�L��(�(��t�\�B��
�
�s	�$?�
A
c���[RRURR	U55nURRU5nUb?URS5U:wa*[SRURS5U55eU$![
Ran[U5UeSnAff=f![
Ran[U5UeSnAff=f)Nrdz!mismatching file id: {!r} != {!r})�_mod_branch�Branch�open_from_transportr��clonerrrr;rrrLr�r�)r=r}rWr�r>r�rs       r@r�%DirStateRevisionTree._get_nested_tree=s���	1� �'�'�;�;��+�+�1�1�$�7��F�
	1��'�'�5�5�6H�I�G���7�?�?�2�#6�'�#A� �3�:�:�7�?�?�2�;N�PW�X��
�����$�$�	1�#�D�)�q�0��	1���$�$�	1�#�D�)�q�0��	1�s.�8B�C�B?�.B:�:B?�C'�C"�"C'c�X>�UR(d[/5$[TU]
5$r)r<rCr�r")r=r�s �r@r"�$DirStateRevisionTree.iter_referencesNs%����1�1���8�O��w�&�(�(rCc�n�URR5RUR5S-$)z9Return the index in the dirstate referenced by this tree.r)r1rr�r�r^s r@�_get_parent_index�&DirStateRevisionTree._get_parent_indexVs+���~�~�,�,�.�4�4�T�5F�5F�G�!�K�KrCc�*�UcUc[R"S5eUbURS5nUR5nURRX1US9$![a, [R
"URUR5ef=f)r�r�r�r�)	rr�r�r&r�r�r1r�r�)r=rWr}�parent_indexs    r@r��DirStateRevisionTree._get_entryZs����?�t�|��/�/�"?�@�@����;�;�v�&�D�	Q��1�1�3�L��~�~�(�(���)�
�	
���	Q��-�-�d�n�n�d�>O�>O�P�P�	Q�s�A�6Bc	��UR(d[S5eURR5 URURR5;a=[SR
URURR555eURR5RUR5S-nURRUSS9up#USnX1SS:wa
[5e[X@RS	9nX1S
URl[RRn[n[ R"nUR$n	SUR0n
URR&SSGHNnUSnX�n
USGH6up�X�unnnnnUS;aMUSnU"U5SnUSnUUnUU"UUU
R*5nUUlUS
:XaUUlUUlUUlOhUS:XaUX�S-U-R3S5'OHUS:XaU"U5SUlO1US:XaU=(d SUlO[SR
U55eUU	;a[SR
UU	U55eUU
R8;a[SR
U55eUU	U'UU
R8U'GM9 GMQ XPlg![(a GMhf=f)aCreate and set self.inventory from the dirstate object.

(So this is only called the first time the inventory is requested for
this tree; it then remains in memory until it's out of date.)

This is relatively expensive: we have to walk the entire dirstate.
z?cannot generate inventory of an unlocked dirstate revision treez!parent {} has disappeared from {}rrC)r�rrr�)r�rrsNr�r�rzr�r�rez0cannot convert entry {!r} into an InventoryEntryr�r�)r�r�r1r�r�rr�r�r�rr�rrr�r�rr�r�r�r�r�rWr~�	text_size�	text_sha1rK�symlink_targetr�r�r2)r=r)r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�rar�r~�revidr�r�rWrXr�s                          r@r��(DirStateRevisionTree._generate_inventoryqs���|�|� �Q��
�	
���0�0�2����D�N�N�$A�$A�$C�C� �3�:�:��%�%�t�~�~�'D�'D�'F���
�
�~�~�4�4�6�<�<�T�=N�=N�O�RS�S��#'�.�.�";�";�L�TW�";�"X����a�[�
��&�q�)�T�1� �"�"��
�8I�8I�J��)�7��:�����#�,�,�>�>���� �-�-���9�9���3�8�8�_�
��^�^�.�.�q�r�2�E��A�h�G�
�&�/�	�$�A�h�
��CH�CV�@��;��j�%��|�+���1�v��*�4�0��3���a�&��'��1��#�D�M�'�<��AR�AR�S�	�%*�	�"��6�>�+5�I�(�*.�I�'�*5�I�'��[�(�FO�J�$��� 5�<�<�T�B�C��Y�&�/:�;�/G��/J�I�,��-�-�3>�3F�$�I�0�(�J�Q�Q�RW�X����h�&�(�?�F�F�#�X�g�%6����
 �9�#5�#5�5�(�5�<�<�\�J���%.���!�3<�	�"�"�<�0�K'�3�Z���S�
��
�s�K.�.
K=�<K=c�\�URUS9nUS:Xa2URU5up4UbURU5$[U5eUR	5nUSUSnUR
R
U5nUR$![Ra [U5ef=f)zeReturn the modification time for this record.

We return the timestamp of the last-changed revision.
r�rrrs)r�r��get_file_mtimerr&r��get_revisionrrr�	timestamp)r=r}r|r&r�r)�last_changed_revision�revs        r@r2�#DirStateRevisionTree.get_file_mtime�s������T��*���L� �#'�#B�#B�4�#H� �K��&�"�1�1�'�:�:��T�"�"��-�-�/�� %�a��� 6�q� 9��	1��"�"�/�/�0E�F�C��}�}����$�$�	1�*�4�0�0�	1�s�$B� B+c�n�URUS9nUR5nUSUnUSS:XaUS$g)Nr�rrr�)r�r&)r=r}rr|r)�parent_detailss      r@r�"DirStateRevisionTree.get_file_sha1�sI�����T��*���-�-�/���q��,�/���!���$�!�!�$�$�rCc��UR5 URU5up#URU5RsSSS5 $!,(df   g=fr)r�_path2inv_file_idr�r�r=r}r��inv_file_ids    r@r�&DirStateRevisionTree.get_file_revision�s=��
�^�^�
�#�5�5�d�;��C��=�=��-�6�6��
�
�s�.A	�	
Ac�6�[URU55$r)r�
get_file_textrs  r@�get_file�DirStateRevisionTree.get_file�s���t�)�)�$�/�0�0rCc�^�URU5up#URU5R$)zSee Tree.get_file_size.)r<r�r,r=s    r@�
get_file_size�"DirStateRevisionTree.get_file_size�s*���1�1�$�7����}�}�[�)�3�3�3rCc��SnURUS4/5H$up4Ub[S5eSRU5nM& Uc[S5eU$)Nz*iter_files_bytes returned too many entriesrCz2iter_files_bytes did not return the requested data)�iter_files_bytesr��join)r=r}�contentr��content_iters     r@rA�"DirStateRevisionTree.get_file_text�s_����#�4�4�t�T�l�^�D�O�A��"�$�%Q�R�R��h�h�|�,�G� E��?� �!U�V�V��rCc�^�URU5up#URU5R$r)r<r�r�r=s    r@r�+DirStateRevisionTree.get_reference_revision�s*���1�1�$�7����}�}�[�)�<�<�<rCc��UR5n/nUHHupEURUS9nUS:Xa[U5eURUSSUSUSU45 MJ URRU5$)z^See Tree.iter_files_bytes.

This version is implemented on top of Repository.iter_files_bytes
r�rrrrrs)r&r�rrBr�rH)r=�
desired_filesr)�repo_desired_filesr}�
identifierr|s       r@rH�%DirStateRevisionTree.iter_files_bytes�s���
�-�-�/���� -��D��O�O��O�.�E���$� ��&�&��%�%��q��!��e�A�h�|�4�Q�7��D�
�	!.����0�0�1C�D�DrCc��URUS9nUc	[XS9eUR5nUSUSS:wagUSUSnURS5nU$)Nr�)r!r}rr�lr�)r�rr&r�)r=r}r|r)�targets     r@�get_symlink_target�'DirStateRevisionTree.get_symlink_targetso�����T��*���=��$�2�2��-�-�/����8�L�!�!�$��,���1�X�l�+�A�.�F��]�]�6�*�F��MrCc��UR$)z%Return the revision id for this tree.)r�r^s r@�get_revision_id�$DirStateRevisionTree.get_revision_ids��� � � rCc��URbUR$UR5 UR5 UR$r)r2r�r�r^s r@r
�(DirStateRevisionTree._get_root_inventorys8���?�?�&��?�?�"������ � �"����rCzInventory of this Treerc�`�URRUR5R$)z5The parents of a tree in the dirstate are not cached.)r�r3r�rQr^s r@r�#DirStateRevisionTree.get_parent_ids's%�����,�,�T�->�->�?�J�J�JrCc�6�[URU55$r)r/rL)r=�filenames  r@r��!DirStateRevisionTree.has_filename+s���D�L�L��*�+�+rCc��URUS9SnUc[U5eUR5n[RR
X#S$)Nr�rr)r�rr&rr�r�)r=r}r|r)s    r@rX�DirStateRevisionTree.kind.sT�����T��*�1�-���=��T�"�"��-�-�/��� � �2�2�5�3F�q�3I�J�JrCc�$�URU5$)zSee Tree.stored_kind.)rXrs  r@�stored_kind� DirStateRevisionTree.stored_kind5s���y�y���rCc���URU5up#UcgURU5nURnUS:Xa#XTRURUR
4$US:XaUSSUR4$USSS4$)zSee Tree.path_content_summary.N)�missingNNNr�r�)r<r�rXr,r~r-r.)r=r}r�r>r|rXs      r@�path_content_summary�)DirStateRevisionTree.path_content_summary9s����1�1�$�7�����0��
�
�k�*���z�z���6�>��/�/�5�+;�+;�U�_�_�M�M�
�Y�
��$��e�&:�&:�;�;��$��d�+�+rCc��URU5up#Uc[U5eURU5nURS:wagUR$)Nr�F)r<rr�rXr~)r=r}r�r>�ies     r@r3�"DirStateRevisionTree.is_executableGsM���1�1�$�7������T�"�"�
�]�]�;�
'��
�7�7�f����}�}�rCc��UR$r)r�r^s r@�	is_locked�DirStateRevisionTree.is_lockedPs���|�|�rCc�^^^^^^�TcSmTRnO"TRT5unmTc[/5$UUUUUU4SjnU"U5$)Nc3�># �URT
T
S9nURbT(dT	c[U5 UH�up#URS:XaoT(ahTR	X#R
UR5nURST
TS9H+upVpsU(a[RX%5nOUnX�Xs4v� M- M�USURU4v� M� g7f)N)rxr;reT)�include_rootr;�recurse_nested�V)
r=r�r8rXrrWr��
list_filesr�r)r��entriesr}r|�subtreer��statusrX�full_subpathrx�from_dir_idrtrur;r=s         ������r@r=�5DirStateRevisionTree.list_files.<locals>.iter_entries`s������&�&��y�&�Q�G��x�x�#�L�X�=M��W�
�&����:�:�!1�1�n�"�3�3��m�m�U�-E�-E��G�9@�8J�8J�%)�"+�'5�9K�9�4���
#�+2�+;�+;�D�+J�L�+/�L�*�D�?�?�9���U�Z�Z��6�6�! '�s�CC)r<r<rC)r=rtrxr;rur�r=r|s`````  @r@rw�DirStateRevisionTree.list_filesSsV������K��%�%�C�#�5�5�h�?��C���"��B�x��	7�	7�.�C� � rCc��UR(dRURR5 URRc!URR5 SUlU=RS-
sl[
UR5$)zRLock the tree for a set of operations.

:return: A breezy.lock.LogicalLockResult.
Tr)r�r�rr1rqr�rrtr^s r@r�DirStateRevisionTree.lock_readysb��
�|�|����&�&�(��~�~�)�)�1����(�(�*�(,��%������� ����-�-rCc�R�UR(d[R"U5egr)r�rr�r^s r@r��$DirStateRevisionTree._must_be_locked�s���|�|��(�(��.�.�rCc�h�[U[5(aU/:XaS/n[R"U6nUR	5 URUS9nUS:Xa:UR
U5up4UbURU5sSSS5 $SSS5 gUSSsSSS5 $!,(df   g=f)r�rdr�rNrr)r�r�r�rrr�r�rLr�s     r@rL�DirStateRevisionTree.path2id�s����d�D�!�!��r�z��t���#�#�T�*�D�
�^�^�
��O�O��O�.�E���$�'+�'F�'F�t�'L�$���*�&�.�.�w�7��
��
�
���8�A�;��
�
�s�<B#�B#�B#�#
B1c��U=RS-slUR(d[SUlSUlUR(a!URR	5 SUlUR
R	5 gg)z6Unlock, freeing any cache memory used during the lock.rNrF)r�r2r�r1rtr�r^s r@rt�DirStateRevisionTree.unlock�s_��	
�������|�|�"�D�O��D�L��$�$����%�%�'�(-��%����#�#�%�
rCc�p�UR5 URsSSS5 $!,(df   g=fr)rr<r^s r@r'�,DirStateRevisionTree.supports_tree_reference�s!��
�^�^�
��5�5��
�
�s�'�
5c#�# �SnUR5nURU5nUc/nOX4/nU(a�/nUR5upxU(aUS-n	OSn	URU5n
/nU
R	5H`up�X�-nURX�U
RSU
R45 U
RU:XdMDURX�R45 Mb Xv4v� UR[U55 U(aM�gg7f)NrzrErd)
r
rLr�r��sorted_childrenrBrXrW�extend�reversed)r=�prefix�
_directoryr��top_id�pending�dirblockrfrW�relrootr|�subdirsr��child�toppaths               r@�walkdirs�DirStateRevisionTree.walkdirs�s����!�
��&�&�(�����V�$���>��G��'�(�G���H�&�{�{�}��G��!�C�-�����M�M�'�*�E��G�$�4�4�6���!�.�������
�
�D�%�*�*� M�N��:�:��+��N�N�G�]�]�#;�<�	 7�
�#�#��N�N�8�G�,�-�%�g�s�B;D�AD�	D)r1r�r2r�r�r<r�r�rZrr)FNTF)rd)1r]r^r_r`r�rAr�rO�CURRENT_REVISIONr	r{rr�rhrrr"r&r�r�r2rrrBrErArrHrWrZr
rar<rr�rXrfrjr3rprwrr�rLrtr'r�rbrcrds@r@r�r��s�����

�
�4A�3Q�3Q�@�2��1�,�*C�
�")�L�
�.R�h�(�7�
1�4�

�=�E� 
�!���1�7O�P�N�K�,�K��,���QV�$!�L.�/�� 
&�6�.�.rCr�c�^�\rSrSrSrU4Sjr\S5r\S5r	\S5r
\"5r\"5r
\S5rSU4Sjjr\S	5rS
rU=r$)�InterDirStateTreei�z�Fast path optimiser for changes_from with dirstate trees.

This is used only when both trees are in the dirstate working file, and
the source is any parent within the dirstate, and the destination is
the current working tree of the same dirstate.
c�>�[TU]X5 [RX5(d[	SRX55eg)Nz#invalid source {!r} and target {!r})r�rAr��
is_compatible�	Exceptionr�)r=�sourcerVr�s   �r@rA�InterDirStateTree.__init__�sA���
����(� �.�.�v�>�>��5�<�<�V�L��
�?rCc��URS5nURRURU5 URU/5 UR	5U4$)z3Change the source tree into a parent of the target.zrecord tree)r�r>�fetchrr#)r�rVr/s   r@�make_source_parent_tree�)InterDirStateTree.make_source_parent_tree�sN���
�
�m�,���
�
���F�M�M�5�1����u�g�&�� � �"�F�*�*rCc�X�URX#5n[RUSlU$)Nr)r�r�ProcessEntryPythonr9)�klass�	test_caser�rVr�s     r@�'make_source_parent_tree_python_dirstate�9InterDirStateTree.make_source_parent_tree_python_dirstate�s)���.�.�v�>��"*�"=�"=��q�	���
rCc�t�SSKJn URU5 SSKJn URX#5nXVSlU$)Nr)�!compiled_dirstate_helpers_feature)�
ProcessEntryC)�tests.test__dirstate_helpersr��requireFeature�_dirstate_helpers_pyxr�r�r9)r�r�r�rVr�r�r�s       r@�)make_source_parent_tree_compiled_dirstate�;InterDirStateTree.make_source_parent_tree_compiled_dirstate�s6��S�� � �!B�C�8��.�.�v�>��"/�q�	���
rCc��[er)r�)r�r�r�rVs    r@�!_test_mutable_trees_to_test_trees�3InterDirStateTree._test_mutable_trees_to_test_trees�s
��"�!rCc
��>�Uc/nU(dU/:Xa[TU]UUUUUUS9$URR5nURR
U;dlURR
[R:XdD[SRURR
URUR55eSnURR
[R:XaSn	U4n
OtURR
U;a/[SRURR
U55eSURURR
5-n	X�4n
UcS1nURR5nUR5 U(a�/nUHn
URU
RS55nU(dURU
5 M=S	nUH nU
HnUSUSS
:wdMSn M M" U(aMnURU
5 M� [!U5S:�a["R$"U5e['5n[(R+U5H#n
UR-U
RS55 M% URR/UURR15UUU	UUUR5nUR5$)
a�Return the changes from source to target.

:return: An iterator that yields tuples. See InterTree.iter_changes
    for details.
:param specific_files: An optional list of file paths to restrict the
    comparison to. When mapping filenames to ids, all matches in all
    trees (including optional extra_trees) are used, and all children of
    matched directories are included.
:param include_unchanged: An optional boolean requesting the inclusion of
    unchanged entries in the result.
:param extra_trees: An optional list of additional trees to use when
    mapping the contents of specific_files (paths) to file_ids.
:param require_versioned: If True, all files in specific_files must be
    versioned in one of source, target, extra_trees or
    PathsNotVersionedError is raised.
:param want_unversioned: Should unversioned files be returned in the
    output. An unversioned file is defined as one with (False, False)
    for the versioned pair.
N)�want_unversionedzarevision {{{}}} is not stored in {{{}}}, but {} can only be used for trees stored in the dirstaterz=Failure: source._revision_id: {} not in target.parent_ids({})rrdr�Fr�Tr�)r��iter_changesrVrr�r�rOrPr�r�r�rIr�r�r�rBr�rr�r�r�r�rPr9r�)r=�include_unchanged�specific_files�pb�extra_treesr�r�rQ�target_index�source_index�indicesrU�
not_versionedr}r�r�r|r��search_specific_files_utf8r�r�s                    �r@r��InterDirStateTree.iter_changes	s����:���K��.�B�.��7�'�!����!�!1�
(��
��[�[�/�/�1�
��K�K�$�$�
�2��{�{�'�'�=�+F�+F�F� �D�DJ�F��K�K�,�,�d�k�k�4�;L�;L�E��
����;�;�#�#�}�'B�'B�B��L�#�o�G��{�{�'�'�z�9�$�S�Z�Z����0�0�*����
�z�/�/����0H�0H�I�I�L�#�2�G��!� �T�N����,�,�.��
�'�'�)���M�&��$�6�6�t�{�{�7�7K�L��#�!�(�(��.��"'��)�E�!(�� ��8�E�?�1�-��5�.2�O�!�	")�*�'��"�(�(��.�%'�&�=�!�A�%��3�3�M�B�B�&)�U�"��2�2�>�B�D�
'�*�*�4�;�;�v�+>�?�C�
�{�{�0�0���K�K�,�,�.�&������K�K�	
���(�(�*�*rCc��[U[5(dg[U[R[45(dgUR
[R:XdUR
UR5;dgg)NFT)	r�r$�revisiontree�RevisionTreer�r�rOrPr)r�rVs  r@r��InterDirStateTree.is_compatibleu	sf���&�"5�6�6���&�<�#<�#<�>R�"S�T�T��
���=�#>�#>�>��"�"�f�&;�&;�&=�=��rCry)FNNNTF)r]r^r_r`r�rA�staticmethodr�r�r�r�r��_matching_from_tree_format�_matching_to_tree_formatr�r�r�rbrcrds@r@r�r��s�������+��+�����
����"4�!5��1�3���"��"� ������s+�j���rCr�c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�
Converter3to4i�	z:Perform an in-place upgrade of format 3 to format 4 trees.c�"�[5Ulgr)r��
target_formatr^s r@rA�Converter3to4.__init__�	�
��/�1��rCc�2�URR5 UR5 URU5 UR	U5 URU5 URR
5 g!URR
5 f=fr)r.rsr��create_dirstate_data�
update_format�remove_xml_filesrtrhs  r@�convert�Converter3to4.convert�	sv��	
���&�&�(�	)��'�'�)��%�%�d�+����t�$��!�!�$�'����&�&�(��D���&�&�(�s�AA:�:Bc���URRS5RS5n[RRX5nUR
5 UR5 g)z(Create the dirstate based data for tree.Nr)r)r�r�rr��	from_treer�rt)r=r!r�rUs    r@r��"Converter3to4.create_dirstate_data�	sN���_�_�>�>�t�D�R�R��
�
��!�!�+�+�D�=��
�
�
��
���rCc��URRS5nSHnURU5 M g![a M'f=f)zRemove the oldformat 3 data.N)zbasis-inventory-cache�	inventoryz
last-revisionzpending-mergesz
stat-cache)r)r��deleter)r=r!r�r}s    r@r��Converter3to4.remove_xml_files�	sI���O�O�=�=�d�C�	�
�D�
�� � ��&�
���
��
�s�8�
A�Ac��URRSURR5URR5S9 g�zChange the format marker.r�r�N�r/r�r�r�r)r�rhs  r@r��Converter3to4.update_format�	�>�����!�!�����(�(�*����/�/�1�	"�	
rC�r�N)r]r^r_r`r�rAr�r�r�r�rbryrCr@r�r��	s��D�2�)��� 
rCr�c�*�\rSrSrSrSrSrSrSrg)�
Converter4to5i�	z:Perform an in-place upgrade of format 4 to format 5 trees.c�"�[5Ulgr)r�r�r^s r@rA�Converter4to5.__init__�	r�rCc���URR5 URU5 URR5 g!URR5 f=fr)r.rsr�rtrhs  r@r��Converter4to5.convert�	sN��	
���&�&�(�	)����t�$����&�&�(��D���&�&�(�s�A�A$c��URRSURR5URR5S9 gr�r�rhs  r@r��Converter4to5.update_format�	r�rCr�N)	r]r^r_r`r�rAr�r�rbryrCr@r�r��	s��D�2�)�
rCr�c�0�\rSrSrSrSrSrSrSrSr	g)	�Converter4or5to6i�	z?Perform an in-place upgrade of format 4 or 5 to format 6 trees.c�"�[5Ulgr)r�r�r^s r@rA�Converter4or5to6.__init__�	r�rCc���URR5 URU5 URU5 URR	5 g!URR	5 f=fr)r.rs�init_custom_control_filesr�rtrhs  r@r��Converter4or5to6.convert�	s\��	
���&�&�(�	)��*�*�4�0����t�$����&�&�(��D���&�&�(�s�"A�A5c�j�URRSSURR5S9 g)z Initialize custom control files.r7rCr�Nr�rhs  r@r��*Converter4or5to6.init_custom_control_files�	s(�����!�!�'�3�T�_�_�5S�5S�5U�!�VrCc��URRSURR5URR5S9 gr�r�rhs  r@r��Converter4or5to6.update_format�	r�rCr�N)
r]r^r_r`r�rAr�r�r�rbryrCr@r�r��	s��I�2�	)�W�
rCr�)@r�r��iorr�globalsrdrrrOr�r�lockable_filesr	�lockdirr
�mutabletreerrr�r
rrrrr�rr�transport.localrr!rrr�workingtreerrr�rrr�
inventorytreerrr r!r"r$�SHA1Providerr�r{r�r�r�r�r�r�r�r�r��register_optimiserr�r�r�ryrCr@�<module>r�sC��"�
��%���I���2�(�$�*��9�H�H�;�,�I�I�%��8�8�S�S�G�QN�.�QN�h*�X�%:�%:��29�*=�9�4
�&�
��6��*�6�*�d=� 8�d=�N'�2�'�4�2��(Q�2�Q�B_.�=�_.�Dy�*�y�x
���.�/�2
�2
�j
�
�2
�
rC

Youez - 2016 - github.com/yon3zu
LinuXploit