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/git/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g����SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	 SSK
Jr SSK
JrJr SSKJr SSKJrJrJrJrJrJrJrJrJrJr SSKJr SS	KJ r  S
SK!J"r# S
SK!J$r% S
S
K!J&r' S
SK!J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/ S
SK!J0r1 S
SK!J2r3 S
SK4J5r5 S
SK6J7r7J8r8 SSK9J:r:J;r; SSK<J=r=J>r>J?r? SSK-J@r@ /SQrA"SS\%R�5rC"SS\%R�5rD"SS\@\/R�5rF"SS\/R�5rHg) z9An adapter between a Git index and a Bazaar Working Tree.�N)�defaultdict)�
ConfigFile)�
FileLocked�GitFile)�IgnoreFilterManager)
�ConflictedIndexEntry�Index�
IndexEntry�
SHA1Writer�build_index_from_tree�index_entry_from_path�index_entry_from_stat�read_submodule_head�
validate_path�write_index_dict)�iter_tree_contents)�S_ISGITLINK�)�branch)�	conflicts)�
controldir)�errors�globbing�lock�osutils�trace�tree�urlutils�workingtree)�revision)�	transport)�only_raises)�BadReferenceTarget�MutableTree�)�BareLocalGitControlDirFormat�LocalGitDir)�decode_git_path�encode_git_path�	mode_kind)�MutableGitIndexTree��.BASE�.OTHER�.THISc�^�\rSrSrSrSrSr\R"S5r	U4Sjr
SrSrS	r
S
rSrSrS
rSrSrSrSr\S5rSrSrU=r$)�TextConflict�@zBThe merge algorithm could not resolve all differences encountered.T�
text conflicts^(<{7}|={7}|>{7})c�$>�[TU]U5 g�N)�super�__init__)�self�path�	__class__s  ��8/usr/lib/python3/dist-packages/breezy/git/workingtree.pyr7�TextConflict.__init__Is���
�����c�J�SVs/sHoRU-PM sn$s snf�Nr,�r9�r8�suffixs  r;�associated_filenames�!TextConflict.associated_filenamesL�#��1M�N�1M�v�	�	�F�"�1M�N�N��N�� c���URUR5nURU5nURS-U-nURU5nURU5nUR[R
"UR5Xv5 UR[R
"U5XC5 UR
U5 URU5 UR5 g)atResolve the conflict by copying one of .THIS or .OTHER into file.

:param tt: The TreeTransform where the conflict is resolved.
:param winner_suffix: Either 'THIS' or 'OTHER'

The resolution is symmetric, when taking THIS, item.THIS is renamed
into item and vice-versa. This takes one of the files as a whole
ignoring every difference that could have been merged cleanly.
�.N)	�trans_id_tree_pathr9�get_tree_parent�adjust_pathr�basename�unversion_file�version_file�apply)r8�tt�
winner_suffix�item_tid�item_parent_tid�winner_path�
winner_tid�winner_parent_tids        r;�_resolve�TextConflict._resolveOs����(�(����3���,�,�X�6���i�i�#�o�
�5���*�*�;�7�
��.�.�z�:��
���w�'�'��	�	�2�4E�R�
���w�'�'��4�o�P�
���(�#�
���
�#�
���
r=c�n�UR"UR5nUS:wa[	S5eUR
RnUR"UR5nUHnU"U5(dM[	S5e SSS5 g![Ra gf=f!,(df   g=f)N�filezConflict is not a filezConflict markers present)�kindr9�_mod_transport�
NoSuchFile�NotImplementedError�_conflict_re�search�get_file)r8rr[�conflict_markers_in_line�f�lines      r;�action_auto�TextConflict.action_autogs���	��9�9�T�Y�Y�'�D��6�>�%�&>�?�?�#'�#4�#4�#;�#;� �
�]�]�4�9�9�
%����+�D�1�1�-�.H�I�I��&�
%���(�(�	��	��
&�
%�s#�B�!B&�6
B&�B#�"B#�&
B4c��UR"5nUR"U/UQ70UD6 SSS5 g!,(df   g=fr5��	transformrW�r8r�args�kwargsrPs     r;�_resolve_with_cleanups�#TextConflict._resolve_with_cleanupsv�0��
�^�^�
���M�M�"�.�t�.�v�.��
�
��	�2�
Ac�(�URUS5 g�N�THIS�rm�r8rs  r;�action_take_this�TextConflict.action_take_thisz����#�#�D�&�1r=c�(�URUS5 g�N�OTHERrtrus  r;�action_take_other�TextConflict.action_take_other}����#�#�D�'�2r=c��[USRU5S5nUc%[URRS-U-5eU"U5 g)z�Apply the specified action to the conflict.

:param action: The method name to call.

:param tree: The tree passed as a parameter to the method.
z	action_{}NrH)�getattr�formatr^r:�__name__)r8�actionr�meths    r;�do�TextConflict.do�sH���t�[�/�/��7��>���<�%�d�n�n�&=�&=��&C�f�&L�M�M��T�
r=c��g)z5Mark the conflict as solved once it has been handled.N�rus  r;�action_done�TextConflict.action_done�s��	
r=c�:�SR"S0URD6$)NzText conflict in {path}r�)r��__dict__�r8s r;�describe�TextConflict.describe�s��(�/�/�@�$�-�-�@�@r=c�"�UR5$r5)r�r�s r;�__str__�TextConflict.__str__�s���}�}��r=c�`�SR[U5RUR5$)Nz{}({!r}))r��typer�r9r�s r;�__repr__�TextConflict.__repr__�s#��� � ��d��!4�!4�d�i�i�@�@r=c��U"U5$�z)Create a conflict from a Git index entry.r�)�clsr9�entrys   r;�from_index_entry�TextConflict.from_index_entry�s���4�y�r=c�&�[UR"UR55n[US-5n[US-5n[US-5n[XTUS9$![a SnN6f=f![a SnN9f=f![a SnN<f=f�z*Convert the conflict to a Git index entry.s.BASENs.OTHERs.THIS)�this�other�ancestor�r)�abspathr9r
�FileNotFoundErrorr�r8r�encoded_path�baser�r�s      r;�to_index_entry�TextConflict.to_index_entry����&�t�|�|�D�I�I�'>�?��	�(���)@�A�D�	�)�,��*B�C�E�	�(���)@�A�D�$��T�J�J��!�	��D�	��!�	��E�	��!�	��D�	��4�A�A/�B�A,�+A,�/A>�=A>�B�Br�)r��
__module__�__qualname__�__firstlineno__�__doc__�	has_files�
typestring�re�compiler_r7rCrWrermrvr|r�r�r�r�r��classmethodr�r��__static_attributes__�
__classcell__)r:s@r;r1r1@s���L��I� �J��:�:�2�3�L��O��0
J�/�2�3�
�
�
A��A�����K�Kr=r1c�n�\rSrSrSrSrSrSrSSjrSr	S	r
S
rSrSr
S
r\S5rSrSrSrg)�ContentsConflict�zBThe files are of different types (or both binary), or not present.T�contents conflictzContents conflict in %(path)sNc��SH*nURU5(dMUS[U5*n O [RR	X5 X lg)N)r-r/r.)�endswith�len�_mod_conflicts�Conflictr7�
conflict_path)r8r9r�rBs    r;r7�ContentsConflict.__init__�sL��2�F��}�}�V�$�$��N�s�6�{�l�+���	3�
	���(�(��4�*�r=c�L�URRRU5$r5)r�
repository�
revision_tree)r8r�revids   r;�_revision_tree�ContentsConflict._revision_tree�s���{�{�%�%�3�3�E�:�:r=c�J�SVs/sHoRU-PM sn$s snfr?r@rAs  r;rC�%ContentsConflict.associated_filenames�rErFc���URURURS-U-55 UR
R
UR5nURU5nUbRURU5nUR[R"UR5XT5 UR5 gg![Ra N�f=f![Ra SnN�f=f)z�Resolve the conflict.

:param tt: The TreeTransform where the conflict is resolved.
:param suffix_to_remove: Either 'THIS' or 'OTHER'

The resolution is symmetric: when taking THIS, OTHER is deleted and
item.THIS is renamed into item and vice-versa.
rHN)�delete_contentsrIr9r\r]�_tree�id2path�file_idr�NoSuchIdrJrKrrLrO)r8rP�suffix_to_remove�	this_path�this_tid�
parent_tids      r;rW�ContentsConflict._resolve�s���
	�
����%�%�d�i�i�#�o�8H�&H�I�
�
	8����(�(����6�I��,�,�Y�7�H����+�+�H�5�J��N�N�7�+�+�D�I�I�6�
�M��H�H�J� ��!�(�(�	�
�		�����	��H�
	�s"�0B?�%C�?C�C�C2�1C2c��UR"5nUR"U/UQ70UD6 SSS5 g!,(df   g=fr5rhrjs     r;rm�'ContentsConflict._resolve_with_cleanups�rorpc�(�URUS5 grzrtrus  r;rv�!ContentsConflict.action_take_this�r~r=c�(�URUS5 grrrtrus  r;r|�"ContentsConflict.action_take_other�rxr=c�&�U"UR5$r�r@)r�r�s  r;r��!ContentsConflict.from_index_entry�s���5�:�:��r=c�&�SURS3$)NzContents conflict in r9)r�r�s r;r��ContentsConflict.describe�s��&�t�}�}�V�'<�&=�>�>r=c�&�[UR"UR55n[US-5n[US-5n[US-5n[XTUS9$![a SnN6f=f![a SnN9f=f![a SnN<f=fr�r�r�s      r;r��ContentsConflict.to_index_entryr�r�)r�r5)r�r�r�r�r�r�r�r�r7r�rCrWrmrvr|r�r�r�r�r�r�r=r;r�r��sX��L��I�$�J�
,�F�+�;�O�$�L/�3�2�����?�Kr=r�c��\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSQSjr
S
rSrSr\"\R&\R(5S5rSrSrSrSrSRSjrSrSRSjrSrSrSSSjrSTSjr Sr!SUSjr"Sr#S r$S!r%S"r&S#r'S$r(S%r)S&r*S'r+S(r,SQS)jr-SQS*jr.S+r/S,r0S-r1S.r2S/r3S0r4S1r5S2r6SSS3jr7S4r8S5r9S6r:S7r;S8r<SVS9jr=SVS:jr>S;r?S<r@\AR�4S=jrCS>rDS?rESQS@jrFSWSAjrGSXSBjrHSCrISDrJSErKSFrLSGrMSQSHjrNSIrOSQSJjrPSQSKjrQSLrRSMrS\T"5rUSSS\US4SNjrVSYSOjrWSPrXg)Z�GitWorkingTreeizA Git working tree.c�D�[R"U5 URRS5n[R
"U5UlXlX lURRRUlURR5Ul
X0lURRRUl[#5UlSUlSUlUR+5UlSUlUR15 UR35 g)NrH)r+r7�root_transport�
local_abspathr�realpath�basedirrr��_git�object_store�store�get_mapping�mapping�_branch�_controltransport�
_transport�GitWorkingTreeFormat�_format�index�_index_file�_make_views�views�_rules_searcher�_detect_case_handling�_reset_data)r8r�reporr�s     r;r7�GitWorkingTree.__init__s����$�$�T�*��+�+�9�9�#�>���'�'��0���$�����_�_�)�)�6�6��
����2�2�4������/�/�.�.�@�@���+�-�����
�����%�%�'��
�#����"�"�$����r=c��g)NTr�r�s r;�supports_tree_reference�&GitWorkingTree.supports_tree_reference(s��r=c��g�NFr�r�s r;�supports_rename_tracking�'GitWorkingTree.supports_rename_tracking+���r=c�d�[URRS55UlSUlg)Nr�F)r	�control_transportr�r��_index_dirtyr�s r;�_read_index�GitWorkingTree._read_index.s'���4�1�1�?�?��H�I��
�!��r=c	���[U[5(d[U5eUR5UnURR[R"S[US555n[5RU5n['URR)S55$![Ran[R"U5UeSnAff=f![a� UR R[U55nUR"R$RU5nN�![Ran[R"U5UeSnAff=ff=f)N�modulesr%r�)�
isinstance�bytes�	TypeError�_submodule_infor�clone�	posixpath�joinr(r&�openr�NotBranchErrorr�MissingNestedTree�KeyError�user_transportr��_matchingcontroldirr	r�)r8�relpath�info�submodule_transport�
submodule_dir�es      r;�_get_submodule_index�#GitWorkingTree._get_submodule_index2s=���'�5�)�)��G�$�$�	=��'�'�)�'�2�D�#'�"8�"8�">�">����y�/�$�q�'�*B�C�#��
=� <� >� C� C�DW� X�
��]�4�4�B�B�7�K�L�L���(�(�
=��,�,�W�5�1�<��
=���	=�"&�"5�"5�";�";�O�G�<T�"U��
=� $��� @� @� E� E�'�!�
���(�(�
=��,�,�W�5�1�<��
=��
	=�sA�C"�2B/�/C�C�C�".E,�%D8�8E(�E#�#E(�(E,c��UR(dSUlSUlUR5 OU=RS-
slURR	5 [
R"UR5$)zTLock the repository for read operations.

:return: A breezy.lock.LogicalLockResult.
�rr%)�
_lock_mode�_lock_countrr�	lock_readr�LogicalLockResult�unlockr�s r;r"�GitWorkingTree.lock_readIs\��
���!�D�O� �D����������!���������%�%�d�k�k�2�2r=c�x�UR(dJSUlSUl[URR	S5S5UlUR5 gURS:Xa[R"U5eU=RS-
slg![a [R"S5ef=f)N�wr%r��wbr)r r!rrr�r�rr�LockContentionr�
ReadOnlyErrorr�s r;�_lock_write_tree�GitWorkingTree._lock_write_treeWs������!�D�O� �D��
5�#*��*�*�8�8��A�4�$�� �

����
�_�_��
#��&�&�t�,�,�����!���
�
5��+�+�G�4�4�
5�s�*B�!B9c���URR5 UR5 [R"UR
5$![a URR5 ef=fr5)rr"r+rr#r$�
BaseExceptionr�s r;�lock_tree_write�GitWorkingTree.lock_tree_writegsZ��������	��!�!�#��)�)�$�+�+�6�6���	��K�K��� ��	���/A�&A2Nc���URR5 UR5 [R"UR
5$![a URR5 ef=fr5)r�
lock_writer+rr#r$r.)r8�tokens  r;r3�GitWorkingTree.lock_writepsZ������� �	��!�!�#��)�)�$�+�+�6�6���	��K�K��� ��	�r1c� �URS:�$)Nr%)r!r�s r;�	is_locked�GitWorkingTree.is_lockedys�����1�$�$r=c��gr�r�r�s r;�get_physical_lock_status�'GitWorkingTree.get_physical_lock_status|rr=c��URRS5 URR5 g![Ra N1f=f)Nz
index.lock)r�deleter\r]r�
break_lockr�s r;r>�GitWorkingTree.break_locksG��	��"�"�)�)�,�7�	
����� ���(�(�	��	�s�8�A�Ac�n�UR(d[R"U5$UR5 U=RS-slURS:�aURR5 gURbhUR(a6URUR5 URR5 OURR5 SUlSUlSUlURR5 g!URR5 f=f)Nr%r)
r!r�cant_unlock_not_held�_cleanuprr$r�r�_flush�close�abortr r�r�s r;r$�GitWorkingTree.unlock�s�������,�,�T�2�2�	!��M�M�O�����!�����!�#��
�K�K��� ����+��$�$��K�K�� 0� 0�1��$�$�*�*�,��$�$�*�*�,�#'�� �"�D�O��D�J��K�K��� ��D�K�K��� �s�5D�:BD�D4c��gr5r�r�s r;rB�GitWorkingTree._cleanup����r=c��URRS5 SUlg![Ra
 SUlgf=f)Nz.git/cOnFiGFT)r��stat�case_sensitiver\r]r�s r;r��$GitWorkingTree._detect_case_handling�sB��	(��O�O� � ��/�#(�D����(�(�	'�"&�D��	'�s�%�A�Ac��0$r5r�r�s r;�merge_modified�GitWorkingTree.merge_modified�s���	r=c�D�[R"URU5er5)r�UnsupportedOperation�set_merge_modified)r8�modified_hashess  r;rS�!GitWorkingTree.set_merge_modified�s���)�)�$�*A�*A�4�H�Hr=Fc�\�URUVVs/sHup4UPM	 snn5 gs snnfr5)�set_parent_ids)r8�parents_list�allow_leftmost_as_ghost�p�ts     r;�set_parent_trees�GitWorkingTree.set_parent_trees�s$�����<�8�<�4�1�Q�<�8�9��8s�(
c���UVs/sH o RRU5SPM" nnU(aCURRSSRU5URR5S9 gURRS5 gs snf![Ra%n[R"UR
5eSnAff=f![Ra gf=f)Nr�
MERGE_HEAD�
��mode)r�lookup_bzr_revision_idr�NoSuchRevision�GhostRevisionUnusableHerer r�	put_bytesrr�_get_file_moder=r\r])r8�rhs_parent_idsr��mergesrs     r;�_set_merges_from_parent_ids�*GitWorkingTree._set_merges_from_parent_ids�s���	?�JX��JX����2�2�5�9�!�<�.�
��
��"�"�,�,��e�j�j��0�t���7U�7U�7W�
-�
�
��&�&�-�-�l�;�����$�$�	?��2�2�1�:�:�>�>��	?��"�,�,�
��
�s9�B�'B�B�:C�B�C�/ C�C�C.�-C.c��UR5 URXS9 UHn[R"U5 M UR	U5n[U5S:�aUR
US5 OUR
[R5 URUSS5 SSS5 g!,(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.
)rYrr%N)	r/�_check_parents_for_ghosts�
_mod_revision�check_not_reserved_id�_filter_parent_ids_by_ancestryr��set_last_revision�
NULL_REVISIONrj)r8�revision_idsrY�revision_ids    r;rW�GitWorkingTree.set_parent_ids�s����
!�
!�
#��*�*��
+�
� ,���3�3�K�@� ,� �>�>�|�L�L��<� �1�$��&�&�|�A��7��&�&�}�'B�'B�C��,�,�\�!�"�-=�>�$�
#�
#�s�BB1�1
B?c�x�UR5nU[R:Xa/nOU/nURR	S5n[
R"U5H>nURS5nURURRU55 M@ U$![Ra U$f=f)z�See Tree.get_parent_ids.

This implementation reads the pending merges list and last_revision
value and uses that to decide what the parents list should be.
r_r`)
�_last_revisionrnrrr�	get_bytesr�split_lines�rstrip�appendr�lookup_foreign_revision_idr\r])r8�last_rev�parents�merges_bytes�lrts      r;�get_parent_ids�GitWorkingTree.get_parent_ids�s����&�&�(���}�2�2�2��G��j�G�	T��1�1�;�;�L�I�L��(�(��6���h�h�u�o�����t�{�{�E�E�k�R�S�7����
�(�(�	��
��
	�s�B!�!B9�8B9c��g)z,Check that the working state is/isn't valid.Nr�r�s r;�check_state�GitWorkingTree.check_state�s��r=c	�*^^^�[U[5(dU/nUc[RnU4Sjn/m[	5mUUU4SjnTR5 UHGnTR
U5n	TRU	5nU(dM.TRU5 U"U5 MI [T5n[U5S:Xa
SSS5 gURSS9 U(Gd5U(Gd-TRTR5SSSUS9GHn
U
RSSLaRTRU
RS	5 TR!["R$"U
RS	55 MhU
R&(dM{U
R(S	cM�["R*"XRS	5(dM�TRU
RS	5 TR!["R$"U
RS	55 GM
 UGH9nUS
:XaMTR)U5nTR
U5n
U(aNTR1U5(aSnOSn["R2"U5nUR5US
-U-U-S-5 UcSR7U5nOsU(d[UT;aU(d	U"U5nOVUS:Xa["R8"U
5 O["R:"U
5 SR7U5nOSR7U5nTR=U5 UcGM#[>R@"U5 GM< STl!SSS5 g![,R.a SnGNIf=f!,(df   g=f)aRemove nominated files from the working tree metadata.

:param files: File paths relative to the basedir.
:param keep_files: If true, the files will also be kept.
:param force: Delete files and directories, even if they are changed
    and even if the directories are not empty.
Nc��>�TRU5nTRRU5n[R"UTRU55 SRX5$)Nz removed {} (but kept a copy: {}))r�r�_available_backup_namer�renamer�)�file_to_backup�abs_path�backup_namer8s   �r;�backup�%GitWorkingTree.remove.<locals>.backupsR����|�|�N�3�H��/�/�@�@��P�K��N�N�8�T�\�\�+�%>�?�5�<�<���
r=c��>�T	RU5HLupUHAup4pVnT	RU5(aTRU5 M0TRU5 MC MN gr5)�walkdirs�is_versioned�addr{)
�	directory�_parent_path�
file_infosr�	_basename�_kind�_lstat�	all_files�files_to_backupr8s
       ���r;�recurse_directory_to_add_files�=GitWorkingTree.remove.<locals>.recurse_directory_to_add_filess\���-1�M�M�)�,D�(��@J�<�G��u��(�(��1�1�!�
�
�g�.�(�.�.�w�7�AK�-Er=rT)�reverseF)�include_unchanged�require_versioned�want_unversioned�specific_filesr%��I�?z       �
z{} does not existr�z
deleted {}z
removed {})"r
�list�sys�stdout�setr/r�rr�r��sort�iter_changes�
basis_tree�	versionedr{r9�extendr�parent_directories�changed_contentr[�
is_inside_anyr\r]�
is_ignored�kind_marker�writer��rmtree�
delete_any�_unversion_pathr�note�_versioned_dirs)r8�files�verbose�to_file�
keep_files�forcer�r��filepathr��changercr[r��
new_status�kind_ch�messager�r�s`                @@r;�remove�GitWorkingTree.remove�s����%��&�&��G�E��?��j�j�G�	����E�	�	8��
!�
!�
#�!���,�,�x�0���<�<��0���8��M�M�(�+�2�8�<�"���O�E��5�z�Q���$�
#�"
�J�J�t�J�$��e�"�/�/��O�O�%�&*�&+�%)�#(�0��F��'�'��*�e�3�'�.�.�v�{�{�1�~�>�'�.�.�#�6�6�v�{�{�1�~�F���.�.�.�#�[�[��^�7�#�1�1�%���Q��H�H�(�.�.�v�{�{�1�~�>�'�.�.�#�6�6�v�{�{�1�~�F��+�2����7�� ��9�9�Q�<�D� �<�<��?������q�)�)�%(�
�%(�
�%�1�1�$�7�G��M�M�*�y�"8�1�"<�w�"F��"M�N��<�1�8�8��;�G�%���/��&,�Q�i�G�#�{�2� '���x� 8� '� 2� 2�8� <�&2�&9�&9�!�&<�G�".�"5�"5�a�"8���$�$�Q�'��&��J�J�w�'�I�J$(�D� �g$�
#��h&�0�0� ��D� ��i$�
#�sW�-N�
8N�B7N�N�&N�A#N�&M'�7DN�<"N�'N�=N�N�N�
Nc�
^^�U(dS/nTR5(a#[[[RU55n[5nTR
5H"nURUR55 M$ /n0n/n	UU4Sjn
TR5 [R"TRU5GHn[R"U5up�U(d[R"U5eTRU5n
[R "U
5nUS;aXTR#[%U55unnUU;aM�U
"X�5 U(aTR'X�5 UR)U5 M�US:XaITR#[%U55unnUU;aU
"X�5 U(aU	R)U5 GM
GM
[R*"X�S9e U	GH�nTRU5nUS:wa9[,R."U5n[0R2R5U5 SnOSnU(a[:R<"S	U5 Mv[>R@"U5GH4n[>RBREUU5nTRGU5(d TRHRKU5(aM\TRMU5nUb#UROU/5R)U5 M�TRU5n
[R "U
5nUS:XaU	R)U5 M�TR#[%U55unnUU;aM�UU;aGMU
"UU5 U(aTR'UU5 UR)U5 GM7 GM� Xx4sSSS5 $![R6a SnGN�[R8a SnGN�f=f!,(df   g=f)
NrHc��>�US:XagTb[[R"U5nTRU5nTRX#5nT"TX@U5nUb[R
"5egg)Nr�)r�dirname�path2id�_get_dir_ier�SettingFileIdUnsupported)r�r[�parent_path�	parent_id�	parent_ier�r�r8s      ��r;�call_action�-GitWorkingTree.smart_add.<locals>.call_action�sn����2�~���!�'�/�/��9�� �L�L��5�	� �,�,�[�D�	� ��y�D�A���&�%�>�>�@�@�'�"r=)rZ�symlinkr�)�filenamer[r�TFzskipping nested tree %r)(�supports_symlinksr��mapr�
normalizepathr�r�updaterCr/�canonical_relpathsr��normalized_filenamer�InvalidNormalizationr��	file_kind�
_lookup_indexr)�_index_add_entryr{�BadFileKindErrorr\�get_transport_from_path�_mod_controldir�ControlDirFormat�find_formatr�UnsupportedFormatErrorr�warning�os�listdirr9r�is_control_filenamer��is_special_filer��
setdefault)r8�	file_list�recurser��save�conflicts_related�c�added�ignored�	user_dirsr�r��
can_accessr�r[r��subpath�user_dir�abs_user_dirr!�subtree�name�subp�ignore_globs`  `                    r;�	smart_add�GitWorkingTree.smart_adduse������I�
�!�!�#�#��S��!6�!6�	�B�C�I��E�����!�A��$�$�Q�%;�%;�%=�>�"������	�		A��
!�
!�
#�#�6�6�t�|�|�Y�O��'.�'B�'B�8�'L�$��!� �5�5�h�?�?��,�,�x�0���(�(��1���.�.�'+�'9�'9�/�(�:S�'T�$�U�G��%�'� ���/���-�-�h�=��L�L��*��[�(�'+�'9�'9�/�(�:S�'T�$�U�G��e�+�#�H�3��!�(�(��2��!�1�1�7�N�N�/P�0&��#�|�|�H�5���r�>�(�$2�$J�$J�<�$X�	�'�8�8�D�D�Y�O�"&��$�G���M�M�";�\�J���J�J�|�4�D��7�7�<�<��$�7�D��/�/��5�5����9U�9U��:�:�!�"&�/�/�$�"7�K�"�.��*�*�;��;�B�B�4�H� �"�l�l�4�0�G�"�,�,�W�5�D��{�*�!�(�(��.�+/�+=�+=�o�d�>S�+T�(���"�e�+�$��#4�4�$�#�D�$�/�� �1�1�$��=����T�*�15�#&�T�>�G$�
#��@"�0�0�(�"'��!�8�8�(�"'��(��E$�
#�s>�"E"O4�7N?�<E9O4�?O1�O4�O1�-O4�0O1�1O4�4
Pc�L�[R"URU55$r5�r�lexistsr�)r8r�s  r;�has_filename�GitWorkingTree.has_filename�s�����t�|�|�H�5�6�6r=c	#�R# �UcSn[U[5(d[U5e[R"URU55n[R"U5GH,upVnU[UR5SRS5nURR[R"U55(aMd[U5GH n	URR[R"U	55(aURU	5 MK[RR!X�5n
U(d;UR#[R"U
55(aURU	5 U(dM�[R"U
5v� UR%[R"[R"U
555(aGMURU	5 GM# UH�n	UR(R+U	5(aM%URR[R"U	55(aM[[RR!X�5n[R"U5v� M� GM/ g![&a GM�f=f7f)Nr��/)r
�strrr��fsencoder��walkr�r��striprr��fsdecoder�r�r9r�_directory_is_tree_referencer��
ValueErrorr�r�)r8�from_dir�include_dirs�recurse_nested�encoded_from_dir�dirpath�dirnames�	filenames�dir_relpathr�r�yps            r;�_iter_files_recursive�$GitWorkingTree._iter_files_recursive�s�������H��(�C�(�(��H�%�%��;�;�t�|�|�H�'=�>��,.�G�G�4D�,E�(�G�y�!�#�d�l�l�"3�"5�6�<�<�T�B�K����2�2�2�;�;�{�3K�L�L���X����?�?�6�6�r�{�{�4�7H�I�I��O�O�D�)���'�'�,�,�{�9��%�$�*K�*K��K�K��(�+�+��O�O�D�)��<��+�+�g�.�.��,�,�R�[�[����W�9M�-N�O�O�!�$�O�O�D�1�'� "���<�<�/�/��5�5���?�?�6�6�r�{�{�4�7H�I�I���W�W�\�\�+�4���k�k�"�o�%�
"�)-F��$ *�!� �!�s2�FJ'�AJ'�!J�2B#J'�
J$�J'�#J$�$J'c��UR5 UR5VVs1sHup[U5iM nnn[UR	SS95n[XC-
5sSSS5 $s snnf!,(df   g=f)z0Yield all unversioned files in this WorkingTree.F)r
N)r"�_recurse_index_entriesr(r�r�iter)r8rZ�_entry�index_paths�	all_pathss     r;�extras�GitWorkingTree.extras�st��
�^�^�
�48�4O�4O�4Q��4Q�y�q���"�4Q�
���D�6�6�E�6�J�K�I��	�/�0��
����
�s�A3�A-�'A3�-A3�3
Bc���UR5 [U5Hjup4X#bM[R"UR	U55n[R
"U5nUS:waURU5(aSnWX#'Ml SSS5 g![a>nUR[R:Xa[R"U5eSnANrSnAff=f!,(df   g=f)zSee MutableTree._gather_kinds.Nr��tree-reference)r/�	enumerater�normpathr�r��OSError�errno�ENOENTr\r]r)r8r��kinds�posrc�fullpathr[rs        r;�
_gather_kinds�GitWorkingTree._gather_kindss���
�
!�
!�
#�#�E�*����:�%�&�/�/����Q��@�H�F�&�0�0��:���B�w�4�#D�#D�Q�#G�#G�/��!%�E�J�+�$�
#��#�F��7�7�e�l�l�2�"0�";�";�H�"E�E�3��F��
$�
#�s:�C�%C�B�%&C�
C�4C�C�C�C�
C-c��URS:wa[R"U5e[URRS5S5nUR
U5 g)Nr'r�r()r r�NotWriteLockedrrr�rC)r8rcs  r;�flush�GitWorkingTree.flushsI���?�?�c�!��'�'��-�-�
��'�'�5�5�g�>��E�����A�r=c��[U5n[X R5 UR5 SUlg![a UR5 ef=fr�)rrr�rDr.rEr)r8rc�shafs   r;rC�GitWorkingTree._flush sL��	��a�=�D��T�:�:�.��J�J�L�"�����	�
�G�G�I��	�s	�0:�Ac���URU5R$![a:nUR[R:Xa[
R"U5eeSnAff=f)zSee Tree.get_file_mtime.N)r��st_mtimer r!r"r\r]�r8r9rs   r;�get_file_mtime�GitWorkingTree.get_file_mtime*sP��	��;�;�t�$�-�-�-���	��w�w�%�,�,�&�$�/�/��5�5���	�s��
A!�5A�A!c�f�[USS5ciSSKJn [5nUR	UR55 UR	UR
55 [R"U5Ul	URRU5nUbU$URU5S:XaUS-
nURS5nUR5n[!UR#U55nU(dgUSR$(dg['US5$![Ra N|f=f)z�Check whether the filename matches an ignore pattern.

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.
�_global_ignoreglobsterNr)�ignoresr��/���)r��breezyr6r�r��get_runtime_ignores�get_user_ignoresr�ExceptionGlobsterr5�matchr[r\r]�lstrip�_get_ignore_managerr��
find_matching�
is_excluder)r8r�r6�ignore_globsr=�ignore_manager�pss       r;r��GitWorkingTree.is_ignored3s���4�1�4�8�@�&��5�L����� ;� ;� =�>����� 8� 8� :�;�*2�*D�*D�\�*R�D�'��+�+�1�1�(�;�����L�	��y�y��"�k�1��C����?�?�3�'���1�1�3��
�.�.�.�x�8�
9�����"�v� � ���R��V�}����(�(�	��	�s�D�D0�/D0c��[USS5nUbU$[R"URR5nX lU$)N�_ignoremanager)r�r�	from_repor�r�rG)r8�
ignoremanagerrCs   r;r?�"GitWorkingTree._get_ignore_managerRsC����&6��=�
��$� � �,�6�6�t���7K�7K�L��,���r=c��SUlgr5)rGr�s r;�_flush_ignore_list_cache�'GitWorkingTree._flush_ignore_list_cache[s
��"��r=c�4�[R"U5(aURRSU5 g[R"U5 URRU5 g![Ra [R"U5ef=f)NrF)	rn�is_nullr�set_last_revision_inforo�generate_revision_historyrrdre�r8r�s  r;rq� GitWorkingTree.set_last_revision^su��� � ��'�'��K�K�.�.�q�%�8���+�+�E�2�	:��K�K�1�1�%�8���$�$�	:��2�2�5�9�9�	:�s�A,�,+Bc��gr5r�r�s r;r��GitWorkingTree._reset_datahrIr=c�:�UR5 UR[U55up4SX4R4sSSS5 $![a7 URU5(a
SSS5 g[R"U5ef=f!,(df   g=f)N�GIT)rWN)r"r�r)�shar�_has_dirr\r])r8r9�
stat_valuer�r�s     r;�get_file_verifier� GitWorkingTree.get_file_verifierks���
�^�^�
�#�1�1�/�$�2G�H��U�
6��u�~�1�1�2��
���
6��=�=��&�&�(�
�
�%�/�/��5�5�
6��	�
�s(�B�A� B	�(B�2B	�	B�
Bc��UR5 URU5(d[R"U5eUR	U5n[
R"U5sSSS5 $![aAnUR[R[R4;a
SnASSS5 geSnAff=f!,(df   g=fr5)r"r�r\r]r�r�sha_file_by_namer r!�EISDIRr")r8r9rZr�rs     r;�
get_file_sha1�GitWorkingTree.get_file_sha1us���
�^�^�
��$�$�T�*�*�$�/�/��5�5��l�l�4�(�G�
��/�/��8��
���
��7�7�u�|�|�U�\�\�:�:���
���
��
�
�s5�>B=�A/�/
B:�9.B5�'B=�4B5�5B:�:B=�=
Cc�8�URRU5$r5)r�r�rRs  r;r��GitWorkingTree.revision_tree�s�����,�,�U�3�3r=c��URn[[R"U5=(a [RU-5$r5)�st_mode�boolrK�S_ISREG�S_IEXEC)r8r9�stat_resultrbs    r;�+_is_executable_from_path_and_stat_from_stat�:GitWorkingTree._is_executable_from_path_and_stat_from_stat�s/���"�"���D�L�L��&�>�4�<�<�$�+>�?�?r=c�@�UR5RU5$r5)r��
is_executable�r8r9ris   r;�,_is_executable_from_path_and_stat_from_basis�;GitWorkingTree._is_executable_from_path_and_stat_from_basis�s����� �.�.�t�4�4r=c�j�UR5 [U5nURU5up4X4n[USU5n[UR5sSSS5 $![a7 UR	U5(a
SSS5 g[
R"U5ef=f!,(df   g=f)Nr�r�)
r"r)r�rrYr\r]r�r*rb)r8r9r�r�r�r�s      r;�stored_kind�GitWorkingTree.stored_kind�s���
�^�^�
�*�4�0�L�#�1�1�,�?��U�
6�����E�6�5�1�E��U�Z�Z�(��
��
�
6��=�=��.�.�&��
�%�/�/��5�5�	
6���
�s-�B$�A �!B$�  B!�B$�
B!�!B$�$
B2c�L�[R"URU55$r5)r��lstatr��r8r9s  r;r��GitWorkingTree._lstat�s���x�x����T�*�+�+r=c�t�[R"UR[U555n[	U5$r5)r�rr�r(r
)r8r9r�s   r;�_live_entry�GitWorkingTree._live_entry�s)���{�{�4�<�<���0E�#F�G��$�\�2�2r=c��UR5 UR5(aURU5RnO+UR	[U55up4X4Rn[[R"U5=(a [RU-5sSSS5 $![a SnNPf=f!,(df   g=f�Nr)r"�_supports_executabler�rer�r)rbrrfrKrgrh)r8r9rbr�r�s     r;rm�GitWorkingTree.is_executable�s���
�^�^�
��(�(�*�*��{�{�4�(�0�0��#'�#5�#5�o�d�6K�#L� ��� �>�.�.�D�����T�*�B�t�|�|�d�/B�C��
�� ���D����
�s0�AC� B0�.8C�0B?�<C�>B?�?C�
Cc�p�UR5(aURX5$URX5$r5)r}rjrorns   r;�!_is_executable_from_path_and_stat�0GitWorkingTree._is_executable_from_path_and_stat�s3���$�$�&�&��C�C�D�V�V��D�D�T�W�Wr=c#�# �UbUS:XaSn0n[R[R[R[RS.nUR5 UR
SS5nU(aU(dSSURU4v� URUS'U(a[URUSUS95nO�[R"URU55n	[[R"U	5V
s/sH�n
URR![R""U
55(aM9UR$R'[R""U
55(aMo[R(R+U[R""U
55PM� sn
5nUGH�n[-U5nUR/U5up�X�nURU5n[2R4"U5unn
UR7UU5HunnM US:XaEU(a>UR
X�R9U55n[2R:"X�5SSU4v� M�US:Xa�X�:wa�UR=U5(a#UR
X�R9U55nSnO/UR?U5(a
S	nUU"5nOS
nUU"5n[2R:"X�5UUU4v� GMJUb>URAX�X�U5n[2R:"X�5SURU4v� GM�UU"5n[2R:"X�5UR?U5(aS	OS
UU4v� GM� SSS5 gs sn
f![0a SnGN�f=f![0a GM�f=f!,(df   g=f7f)NrHr�)r�rZr�r�VT)r
rrr�r�r�)!r�
TreeDirectory�TreeFile�TreeLink�
TreeReferencer"r�r[r��sortedrr�rr�r�rr�rr�r�r9rr)r�rr�split�_add_missing_parent_idsr�rrYr��_get_file_ie)r8�include_rootr	�	recursiver�dir_ids�
fk_entries�root_ie�
path_iteratorrr�r9r�r��
index_path�valuer[�parent�	_dir_path�_dir_ie�ie�statuss                      r;�
list_files�GitWorkingTree.list_files�sV�����x�3���H����+�+��M�M��}�}�"�0�0�	
�
��^�^�
��&�&�r�4�0�G��H��#�w�|�|�W�4�4�!�/�/�G�B�K�� &��.�.� �t�N�/��!�
�$&�;�;�t�|�|�H�/E�#F� � &�%'�J�J�/?�$@��$@�D�#���B�B�2�;�;�t�CT�U�B�!%��� <� <�R�[�[��=N� O�B������X�r�{�{�4�/@�A�$@��!�
�&��.�t�4��&*�&8�&8��&F�#��!�!�-�E��y�y����(���t�4����*.�*F�*F�v�w�*W�&�I�w��+X��+�+���)�)�$���T�0B�C�B�$�,�,�T�<�c�;�PR�S�S���;�&��'��=�=��6�6�!%�!1�!1�$���T�8J�!K�B�%(�F�!�_�_�T�2�2�%(�F�!+�D�!1�!3�B�%(�F�!+�D�!1�!3�B�(�0�0��@�&�$�PR�S�S���$��*�*�4�u�f�o�N�B�$�,�,�T�<�c�2�7�7�B�O�O�!�'��-�/��
"�)�)�$�9� $���� 5� 5��3���	��K&�+�
���� �!� �E�!��:$�!� �!��o�
�s��AO�B&N:�8N
�2N
�78N
�/+N:�N�E$N:�
N(�9N:�	O�N:�N%�!N:�$N%�%N:�(
N7�2N:�6N7�7N:�:
O�Oc��UR5 S1nURH�nURRU5(aM%[	U5nURU5 US:wdMI[R"U5RS5nX!;aMuURU5 US:waMEM� UsSSS5 $!,(df   g=f)Nr�r7)	r"r�r�r�r(r�rr�r)r8�pathsr9s   r;�all_versioned_paths�"GitWorkingTree.all_versioned_paths�s���
�^�^�
��D�E��
�
���<�<�/�/��5�5��&�t�,���	�	�$���b�j�$�,�,�T�2�8�8��=�D��}���I�I�d�O�	�b�j�#���
�
�s�AB>�*AB>�/B>�>
Cc#��# �[U5 UR5 URU5nSnURR	5H�upE[U5nURRU5(aM2[R"X5(dMOSn[R"Xa5nSU;a<URSS5SnUR[R"X5U5n	O*[R"U5up�URX�XR5n	U	v� M� U(dUS:wa[ R""U5eSSS5 g!,(df   g=f7f)NFTr7r%rr�)r)r"r�r��	iteritemsr(r�r�r�	is_insiderrr�r�rr�r\r])r8r9r��	found_any�	item_pathr��decoded_item_pathr�r��file_ie�
unused_parentr�s            r;�iter_child_entries�!GitWorkingTree.iter_child_entriess������
�^�^�
����T�*�I��I�$(�J�J�$8�$8�$:� �	�$3�I�$>�!��<�<�/�/�	�:�:���(�(��A�A�� �	�#�+�+�,=�D���'�>�%�m�m�C��3�A�6�G�"�.�.�y�~�~�d�/L�i�X�G�,5�O�O�<M�,N�)�]�"�/�/����G��
�!%;�"����$�/�/��5�5�+�
�
�s�E$�D,E�
	E$�
E!�E$c	�@�UR5 [R"5nURR	5H?up#[U[5(dMUR[[U555 MA UsSSS5 $!,(df   g=fr5)
r"r��ConflictListr�r�r
rr{r1r()r8rr�r�s    r;r�GitWorkingTree.conflicts'sk��
�^�^�
�&�3�3�5�I�$(�J�J�$8�$8�$:� �	��e�%9�:�:��$�$�\�/�)�2L�%M�N�%;���
�
�s�AB�(B�
Bc�8�0nUH�n[U[[45(d![R"UR
U5eURS;aX2[UR5'Mh[R"UR
U5e UR5 [5nURH�nSUlURU5nUb URU5URU'M>[URU[5(a?URUR nUcUR#U5 M�X`RU'M�M� UHnURU	M SSS5 g![$a M�f=f!,(df   g=f�N)r3r�T)r
r1r�rrR�
set_conflictsr�r)r9r/r�r�r�getr�rr�r�r)r8r�by_path�conflict�	to_deleter9�news       r;r��GitWorkingTree.set_conflicts/s^����!�H��h��7G�(H�I�I��1�1�$�2D�2D�d�K�K��"�"�&L�L�:B���
�
�6�7��1�1�$�2D�2D�d�K�K�
"��
!�
!�
#���I��
�
��$(��!�"�;�;�t�,���'�'/�'>�'>�t�'D�D�J�J�t�$��%�d�j�j��&6�8L�M�M�"&�*�*�T�"2�"7�"7�C�"�{� )�
�
�d� 3�36�
�
�4� 0�N�#�"���J�J�t�$�"�#$�
#��$�����$�
#�s>� AF�6AE:�F�E:�F�:
F�F�F�F�
Fc�h�UR5 UH�n[U[[45(d![R
"URU5eURS;aeSUlURU5nURcURcURcM�X0R[UR5'M�[R
"UR"U5e SSS5 g![ a" [R
"UR"U5ef=f!,(df   g=fr�)r/r
r1r�rrRr�r�rr�r�r�r�r�r)r9r�
add_conflicts)r8�
new_conflictsr�r�s    r;r��GitWorkingTree.add_conflictsLs���
�
!�
!�
#�)��!�(�\�;K�,L�M�M� �5�5�d�6H�6H�$�O�O��&�&�*P�P�(,�D�%�
T� (� 7� 7�� =��!�J�J�.� %��� 6� %��� 3�$�EJ�
�
�?�8�=�=�#A�B�!�5�5�d�6H�6H�$�O�O�%*�$�
#�� $�T�$�9�9�$�:L�:L�d�S�S�T��!$�
#�s0�AD#�+8C4�#D#�%!C4�%D#�4,D � D#�#
D1c#��# �SSKnSSKJn URU5nUR	S5(aUSSn[U5S-nUR
U5n[R"XA5n[U5nSn	[U5nSnU(aU	(GdU(aUuup�nOS
uup�nU	(dXX�SS:XaP[U5S:�aAU"US5nU[U5:a)UR"R%UUS5(aUU	U(aSnO!U	(aSnOUSSU
:�USSU
:-
nUS:�a9UVVVVVs/sHunnnnnUUUUS4PM nnnnnnU
U4v� [U5nGO�US:aEUSVVVVVVs/sHunnnnnnUUS
SU4PM nnnnnnnUSSU4v� [U5nGO@/n[&R("[+USU-UR-S5S9UR-S55H�unn[/U5n[U5S:Xa,UunnUR1USUSUSUSUS45 ML[US5S:Xa0UR1USSUSSUSSUSSS45 M�[US5S:Xa*UR1USSUSSS
SUSS45 M�[3S5e USSU4v� [U5n[U5nU(dGMtU	(dGM~gg![aVn
U
R[R:Xd)[RS:XaU
R[:XdeSnS	n	Sn
A
GN�Sn
A
ff=f![ a SnS	nGNf=fs snnnnnf![ a S	n	N�f=fs snnnnnnf![ a S	nN�f=f![ a S	nN�f=f![ a S	n	N�f=f7f)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.
rN)�bisect_leftr7r8r%F�win32T))NNNr�)�.gitr��unknown)�keyr���zunreachable code)�operator�bisectr�r�r�r��	_walkdirsrr��nextr r!r"r��platform�ERROR_PATH_NOT_FOUND�
StopIterationrr��	itertools�groupbyr��
itemgetterr�r{r^)r8�prefixr�r��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�	directionrrLr[rK�top_path�dirblock�dkind�fileid�_relpath�subiterator�
path_elements�inv_row�disk_rows                               r;r��GitWorkingTree.walkdirsbs����	�&��<�<��'�����S�!�!����}�H��H�
��)�
�!�^�^�F�3���(�(��:�
�
	!��
�.�L�!�M�	 ��1�2�K� �L��m��!��F�)�(�)��F�)�(� �/�~�>�"�D��0�1�A�5�
"-�-A�CS�!T�J�!�C�,�%���/�/�=�=�,�Z�8��;���1��<���	���	�(��^�A�.�1E�E���N�1�%�(<�<��	��1�}�DX��CW�?���4��x��h��d�D�9�CW���+�H�4�4�)�#'�
�#6�L��Q��IT�TU����HV�D���5�$����h�	�4��>�HV���"�!�n�Q�'��1�1�(�"&�'9�":�K���-6�->�->��#�A��)=�=�$�/�/��2���'�'��*�.�)�H�k�%)��$5�M��=�)�Q�.�,9�)��� ��� '��
� '��
� (��� (��� '��
����]�1�-�.�!�3� ��� -�a� 0�� 3� -�a� 0�� 3� -�a� 0�� 3� -�a� 0�� 3� $����]�1�-�.�!�3� ��� -�a� 0�� 3� -�a� 0�� 3� )� $� -�a� 0�� 3���2�2D�E�E�W.�X"�!�n�Q�'��1�1�(�"&�'9�":�K�)�#'�
�#6�L�e�,�m�m���	!����5�<�<�'��L�L�G�+����;O�0O���L� �M��	!���	 ��K��L�	 ��V��%�)�$(�M�)����%�(�#'�L�(��j%�(�#'�L�(��%�)�$(�M�)�s��A,O,�/
L�=
M<�
B=O,�N�O,�+N�6O,�
N,�"O,�6N6�D*O,�,O�8O�O,�
O,�O,�
M9�#AM4�.O,�4M9�9O,�<N�
O,�
N�O,�N)�&O,�(N)�)
O,�6O�O,�O�O,�O�O,�O�O,�O)�&O,�(O)�)O,c�:^^^^^�TS:waTS-
m[T5m[[5mTS:Xa[5TSTRS54'UUUUU4SjmTR	5 TR
R
5H\unmTRRU5(aM(URT5(dM@T"U[TR55 M^ SSS5 S[TR555$!,(df   N.=f)Nr�r7r=c�>�US:XdURT5(dg[R"U5up#T"US5 [U5nTR	U5n[T	[[45(d[T	5eTX$4R[U5[U5USTR	[U55U45 g)Nr=r�)
�
startswithrr�r(r�r
�tupler
rr�)
r9r[r��
child_name�dir_file_id�	add_entry�per_dirr�r8r�s
     �����r;r��+GitWorkingTree._walkdirs.<locals>.add_entrys�����s�{�$�/�/�&�"9�"9��$-�O�O�D�$9�!�W��g�{�+�%�g�.�G��,�,�w�/�K��e�e�Z�%8�9�9� ��'�'��W�*�+�/�/�#�D�)�#�J�/����L�L���!6�7��
�	
r=c3�@# �UHupU[U54v� M g7fr5)r�)�.0�k�vs   r;�	<genexpr>�+GitWorkingTree._walkdirs.<locals>.<genexpr>#s���E�-D�6�A��F�1�I��-D�s�)r)rr�r�r"r�r�r�r�r�r*rbr��items)r8r�r9r�r�r�s`` @@@r;r��GitWorkingTree._walkdirss�����R�<��c�M�F� ��(���c�"���S�=�.1�e�G�R����b�)�*�+�	�	�(�^�^�
�#�z�z�3�3�5���e��<�<�/�/��5�5�����v�.�.���$�	�%�*�*� 5�6� 6��F�V�G�M�M�O�-D�E�E��
�s
�)A;D�
Dc�,�[R"5er5)r�ShelvingUnsupportedr�s r;�get_shelf_manager� GitWorkingTree.get_shelf_manager%s���-�-�/�/r=c�.�[R"U5er5)r�StoringUncommittedNotSupportedr�s r;�store_uncommitted� GitWorkingTree.store_uncommitted(s���3�3�D�9�9r=c��UR5 /nUR5H|nURU5nUR5 UnURU5nUS:waSSS5 MKUURU54nX�;aURU5 SSS5 M~ SSKJ
n	 SSKJn
 U
"UR
RR 5nU	"U5nSSKJn
 U
"U5nUR'U5n/nUHnUU;dMURU5 M UR)U5nX4nUR+UUU5 UR-U5VVs/sH
unnUSU4PM nnnUsSSS5 $![Ra) UR
RRU5nGN�f=f![Ra
 SSS5 GM�f=f!,(df   GM�=fs snnf!,(df   g=f)	aASee 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).
NrZr)�	Annotatorr%)�AnnotateProvider)�Graphr8)r"r�r�r�NoSuchRevisionInTreerr�r[r\r]�get_file_revisionr{�breezy.annotater��annotater��_file_change_scanner�breezy.graphr�heads�
get_file_text�add_special_text�
annotate_flat)r8r9�default_revision�maybe_file_parent_keysr��parent_treer�r[�parent_text_keyr�r��annotate_provider�	annotatorr�graphr�file_parent_keysr��text�this_keyrd�annotationss                      r;�
annotate_iter�GitWorkingTree.annotate_iter+s���^�^�
�%'�"�!�0�0�2�	�R�"&�"4�"4�Y�"?�K�!�*�*�,�#'�K�!�*�/�/��<���v�~�
!�-�,�$�#�5�5�k�B�'�O�'�D�.�5�5�o�F�'-�,�3�4
2�2� 0����&�&�;�;�!��"�"3�4�I�*��+�,�E��K�K� 6�7�E�!��-���%�<�$�+�+�C�0�.��%�%�d�+�D��/�H��&�&�x�1A�4�H�1:�1H�1H��1R��1R�I�C���R��$��1R�
���i�
��
�2�2�R�"&�+�+�"8�"8�"F�"F�y�"Q�K�R��*�4�4�!� �-�,�!��
-�,��T�c�
�s��G;�E>�G;�	G"�
F>�G"�%
G;�/)G"�A0G;�AG;�G5�0G;�>9F;�7G;�:F;�;G;�>G	�G"�G;�G	�G"�"
G2�,G;�;
H	c�n�[R"URU5URU55 gr5)r�r�r�)r8�from_rel�to_rels   r;�_rename_one�GitWorkingTree._rename_oneks"��
�	�	�$�,�,�x�(�$�,�,�v�*>�?r=c�:�[URRS5URRS5URUR
RcSO,URUR
RRUR5S9 g)NrHr�)�honor_filemode)	rrr�rr�r�headrr}r�s r;�_build_checkout_with_index�)GitWorkingTree._build_checkout_with_indexnsr������-�-�c�2��"�"�0�0��9��J�J��K�K�$�$�,�D�$�*�*�T�[�[�=M�=M�2N�2S�2S��4�4�6�	
r=c��UR5 UbURU5 URR5 SUlUR
Rb�[URURUR
RR5H�n[UR5(dM[UR5(aO4URUR[!UR555nUR/UR5upV[1WUR$URS9XV'M� SSS5 g!["a] URUR$n[&R("URSSSSS[+UR-55SSS4
5nN�f=f!,(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 .git/index file)
NTrra)r/rWr��clearrrrrr�rrr9rrbr�r�r(r rXr�rir��
as_raw_stringr�r)r8rsr��st�objr�r�s       r;�reset_state�GitWorkingTree.reset_statewss���
!�
!�
#��'��#�#�L�1��J�J���� $�D���{�{���+�/��J�J��
�
�4�;�;�+;�+;� <� A� A��E�)����4�4� �"�5�:�:�.�.���!%���T�\�\�/�%�*�*�:U�-V�!W�B�$(,�'9�'9�%�*�*�'E�$�U�%:��E�I�I�E�J�J�&�E�N�=�
$�
#��$ '��"&�*�*�U�Y�Y�"7�C�!#���$)�J�J�$%�$%�$%�$%�$%�$'��(9�(9�(;�$<�$%�$%�$%�!"�
"�B���%$�
#�s2�CG�3E�
AG�A$F?�<G�>F?�?G�
Gc
���URU5nX!:waOSSKJn UR5 URR5nU"URUUUUUS9 SSS5 gg!,(df   g=f)Nr��merge_inner��	this_tree�change_reporter�	show_base)r��merger+r"rr�)r8�old_revision�new_revisionr.r/r�r+�new_basis_trees        r;�_update_git_tree�GitWorkingTree._update_git_tree�so���'�'��5�
��'�+��%�%�'�!%���!7�!7�!9����K�K�"��"�$3�'�
�(�'�(�(�'�s�0A'�'
A5c	��UR5 UR5 URR5n	URR	UUUUUUS9n
URU	URR5UUS9 U
sSSS5 sSSS5 $!,(df   O=fSSS5 g!,(df   g=f)N)�	overwrite�
stop_revision�possible_transports�local�tag_selector)r1r2r.r/)r3r"r�
last_revision�pullr4)r8�sourcer7r8r.r9r:r/r;r1�counts           r;r=�GitWorkingTree.pull�s����_�_�
�� 0� 0� 2��;�;�4�4�6�L��K�K�$�$��#�+�$7��)�
%��E�
�!�!�)�!�[�[�6�6�8� /�#�	
"�
��!!3� 2�
�
� 2� 2��
�
�
�s#�B3�A$B�	B3�
B'	�#B3�3
Cc�f�UR5 URUR5n[R"U5up4U(d[R"U5eURUS5 SSS5 g![Ra
 [XS5ef=f!,(df   g=f)zYAdd a TreeReference to the tree, pointing at sub_tree.

:param sub_tree: subtree to add.
zTarget not inside tree.rN)
r/rr�r�PathNotChildr#rr�r�r�)r8�sub_tree�
sub_tree_pathr9r�s     r;�
add_reference�GitWorkingTree.add_reference�s���
�
!�
!�
#�
T� $���X�-=�-=� >�
� '�:�:�=�I��D���1�1�$�7�7��!�!�-�1A�B�$�
#���&�&�
T�(��9R�S�S�
T��$�
#�s"�B"�A>�AB"�>!B�B"�"
B0c�6�[URU55$r5)rr�rvs  r;�_read_submodule_head�#GitWorkingTree._read_submodule_head�s��"�4�<�<��#5�6�6r=c���URU5nUcCUR[U55up4Uc[R"U5eX4R
nURRU5$r5)rHr�r)r\r]rXrr|)r8r9�hexshar�r�s     r;�get_reference_revision�%GitWorkingTree.get_reference_revision�sg���*�*�4�0���>�#�1�1�/�$�2G�H��U���$�/�/��5�5��^�'�'�F��{�{�5�5�f�=�=r=c���[RRURU55$![R
an[R"U5UeSnAff=fr5)r�WorkingTreerr�rrrrr1s   r;�get_nested_tree�GitWorkingTree.get_nested_tree�sP��	6��*�*�/�/����T�0B�C�C���$�$�	6��(�(��.�A�5��	6�s�-0�A �A�A c�d�U=(a( [R"URU5S-5$)Nz/.gitr�)r8rs  r;r�+GitWorkingTree._directory_is_tree_reference�s&���K�7�?�?�4�<�<��+@�7�+J�K�Kr=c��^�U4SjnTR5 TR5 U"U5nUcTRR5nUR	5 URU5nUR
5nUR5(d[R"5eUR5nURTR5 TR5HnUR!TRU5 M! TRR"R%U5n	U	R&UR&:wa#URU	5n
U
R)U5 OUn
U
R+[,R.5nUR1TR55 UsSSS5 $![Ra UR5nGN\f=f!,(df   g=f)zeExtract a subtree from this tree.

A new branch will be created, relative to the path for this tree.
c��>�[R"U5nTRRRnUH$nURU5nUR
5 M& U$r5)r�	splitpathrrr�r�ensure_base)r9�segmentsr!r�r8s    �r;�mkdirs�&GitWorkingTree.extract.<locals>.mkdirssT����(�(��.�H����.�.�=�=�I� ��%�O�O�D�1�	��%�%�'�!��r=N)r/r*r�cloning_metadirrW�initialize_on_transport�find_repositoryr�NoRepositoryPresent�create_repository�supports_rich_root�RootNotRich�
create_branchr=rr��fetchr�rr��set_branch_reference�create_workingtreernrrrW)r8�sub_pathr�rY�branch_transport�
branch_bzrdirr��
new_branchr��tree_transport�tree_bzrdir�wts`           r;�extract�GitWorkingTree.extract�s����	��
!�
!�
#��J�J�L�%�h�/���~����8�8�:���(�(�*�"�:�:�;K�L�M�
9�$�4�4�6���*�*�,�,��(�(�*�*�&�4�4�6�J��O�O�D�K�K�(�!�0�0�2�	�� � ����i�8�3�!�_�_�;�;�A�A�(�K�N��"�"�&6�&;�&;�;�$�<�<�^�L���0�0��<�+���/�/�
�0K�0K�L�B����d�1�1�3�4��3$�
#���-�-�
9�$�6�6�8��
9��$�
#�s1�AG �0F5�D+G �5$G�G �G�G � 
G.c��/$)aReturn 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�r�s r;�_get_check_refs�GitWorkingTree._get_check_refs$s	���	r=c��SSKJn UR5 UcURX5 OOUR	U5nURX5 U[R:Xa/nOU/nUR"U5 SSS5 g![
Ra( URRR	U5nN�f=f!,(df   g=f)z?Copy the current content and user files of this tree into tree.r)r0N)r�r0r"�transform_treer�rrdrr�rnrrrW)r8rrtr0�
other_tree�new_parentss      r;�copy_content_into� GitWorkingTree.copy_content_into.s����
�^�^�
��"��$�$�T�0�S�!%�!3�!3�K�!@�J��$�$�T�6��-�"=�"=�=�"$�K�#.�-�K��#�#�K�0�!�
���,�,�S�!%���!7�!7�!E�!E�k�!R�J�S���
�s-�C�B�=C�9C�>C�C�C�
Cc��URU5nUc[R"SU5 g[RRX2S9$)Nz$Unable to find submodule info for %s)r9)�get_reference_inforr��_mod_branch�Branchr)r8r9r9�
remote_urls    r;�reference_parent�GitWorkingTree.reference_parentDsK���,�,�T�2�
����M�M�@�$�G���!�!�&�&��'�
�	
r=c�z�UR5nUR[U55nUcg[US5$r|)r
r�r)r()r8r9�submodule_infors    r;ry�!GitWorkingTree.get_reference_infoMs<���-�-�/���!�!�/�$�"7�8���<���t�A�w�'�'r=c�Z�URS5n[R"U5nS[
U54nUcXF	O}[R"[R"URR5U5nURUS[
U55 URUSURS55 URU5 UR!S5 g![a3nUR[R
:Xa[5nSnAN�eSnAff=f![a Nof=f)Nz.gitmoduless	submodulespathsurlzutf-8)r��
GitConfigFile�	from_pathr r!r"r)rrr�strip_segment_parametersr�user_urlr��encode�
write_to_pathr�)r8�	tree_path�branch_locationr9�configr�sections       r;�set_reference_info�!GitWorkingTree.set_reference_infoTs����|�|�M�*��	�"�,�,�T�2�F� ���!;�<���"�
��O�'�m�m��1�1�$�+�+�2F�2F�G���O�
�J�J�w����)C�D��J�J�w���(>�(>�w�(G�H����T�"�������%�	��w�w�%�,�,�&�&�����		���
��
�s.�C�D�
D�'(D�D�D�
D*�)D*c�n�URR5bUR5 X@RLnOUR	5 SnU(aURRU5nOX@RLaSnUR
XAX55UR5 $!UR5 f=f)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)r�get_bound_locationr3�_markerr/r��_update_treer$)r8r.r9r �old_tipr/�
update_branchs       r;r��GitWorkingTree.updatens���N�;�;�)�)�+�7��O�O��#�|�|�3�M�� � �"�!�M�	���+�+�,�,�-@�A���l�l�*�"�G��$�$�W�x�S��K�K�M��D�K�K�M�s
�
AB"�"B4c
��UR5 SSKJn /nUR5SnUcURR5nU=(d [
Rn[
R"U5(d|X:wawUR5nURRRU5n	U"URU	UUUUS9nU(a&URX45 [U5sSSS5 $Xs:wGa|URRRU5n
URRR5nUR!URR5U5nURRRU5nU"URU
UUUUS9nUR#U5 X:4/n
UR5SSnUH8nU
R%X�RRRU545 M: [
R"U5(d5U
R%XRRRU545 UR'U
5 U
SSn[U5sSSS5 $![a [
RnGN�f=f!,(df   g=f)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.
rr*rNr,r%)r/r0r+r��
IndexErrorrnrrrr<rOr�r�r��add_parent_treer��	get_graph�find_unique_lcarqr{r\)r8r�r.r r/r+�nb_conflictsr}�	base_treert�to_treer�base_rev_id�parent_treesrir�s                r;r��GitWorkingTree._update_tree�so��$�
!�
!�
#�+��L�
7��.�.�0��3�����;�;�4�4�6���<��!<�!<�G� �(�(��1�1�g�6I�!�O�O�-�	�!�[�[�3�3�A�A�'�J�
�*��K�K���"�$3�'�
 �� ��(�(�'�)>�?��|�,�9$�
#�<�#��+�+�0�0�>�>�x�H�����.�.�8�8�:��#�3�3��K�K�-�-�/����!�K�K�2�2�@�@��M�	�*��K�K���"�$3�'�
 ���&�&�x�0�"*� 3�4���,�,�.�q�r�2��%�F� �'�'����!7�!7�!E�!E�f�!M�N��%�%�,�,�W�5�5� �'�'� �+�+�"8�"8�"F�"F�w�"O�P���%�%�l�3�'��?�1�-���|�$�I$�
#���
7�(�6�6��
7��
$�
#�s5�	J2�J�CJ2�;FJ2�J/�+J2�.J/�/J2�2
K)r�r�r5rGrr�r!r r�r�r�r�rLrr�r�r�r�r�r5)F)FNTF)TNT)NFF)r�r�)FNNNFFN�NNNF)Yr�r�r�r�r�r7r�rrrr"r+r/r3r7r:r>r"r�LockNotHeld�
LockBrokenr$rBr�rOrSr\rjrWr�r�r�r�r�rrr&r*rCr2r�r?rLrqr�r[r`r�rjrorrr�ryrmr�r�r�r�rr�r�r�r�r�r�rn�CURRENT_REVISIONrrr r'r4r=rErHrLrPrrmrprvr}ryr��objectr�r�r�r�r�r=r;r�r�s����$��"�M�.3�"� ��%��!���#�#�V�%6�%6�7�!�8�!�,
�(��I�:��"?�8�*
�|(�|`"�D7�AF�"&�H1�
&��"���>�#�:�
�6�
�4�@�5�)�,�3�
D�X�QV�K�Z
�6�2�%�:P�,\)�|#F�J0�:�4A�3Q�3Q�>�@@�
�,�^KP��*��� �����:C� 7�>�6�L�
'�R�1�,
�(� �0�h�G�� ����
5�pLQ�V%r=r�c�`�\rSrSr\rSrSrSrSr	Sr
SrSrSr
\S5rSrS
SjrS	rg)r�i�FTz
.gitignorec��SSKJn U"5$)Nr%)�LocalGitControlDirFormat)�dirr�)r8r�s  r;r�(GitWorkingTreeFormat._matchingcontroldirs��1�'�)�)r=c��g)NzGit Working Treer�r�s r;�get_format_description�+GitWorkingTreeFormat.get_format_descriptions��!r=Nc��[U[5(d[R"X5eUR	SS9nUbURU5 [
XR5U5n[RSHnU"U5 M
 U$)z#See WorkingTreeFormat.initialize().T)�
nascent_ok�post_build_tree)
r
r'r�IncompatibleFormat�open_branchrqr��open_repositoryr$�hooks)	r8�a_controldirrt�from_branch�accelerator_tree�hardlinkrrl�hooks	         r;�
initialize�GitWorkingTreeFormat.initializes����,��4�4��+�+�D�?�?��)�)�T�)�:���"��$�$�[�1�
�L�*F�*F�*H�&�
Q���%�%�&7�8�D���H�9��	r=r�r�)r�r�r�r�r��_tree_class�supports_versioned_directories�supports_setting_file_ids�supports_store_uncommitted�$supports_leftmost_parent_id_as_ghost�%supports_righthand_parent_id_as_ghost�%requires_normalized_unicode_filenames�supports_merge_modified�ignore_filename�propertyrr�r�r�r�r=r;r�r��s`�� �K�%*�"� %��!&��+0�(�,1�)�,0�)�#��"�O�
�*��*�
"�����
r=r�)Ir�r!r�r�rr�rKr��collectionsr�dulwich.configrr��dulwich.filerr�dulwich.ignorer�
dulwich.indexrr	r
rrr
rrrr�dulwich.object_storer�dulwich.objectsrr�rrzrr�rr�rrrrrrrrr rnr!r\�
decoratorsr"�mutabletreer#r$r�r&r'r�r(r)r*r+�CONFLICT_SUFFIXESr�r1r�rOr��WorkingTreeFormatr�r�r=r;�<module>r�s���$@���	��	��
�#�6�,�.����4�'�$�*�,�R�R�R�(�*�$�9�:�@�@�%�0��
nK�>�*�*�nK�b_K�~�.�.�_K�Dh%�(�+�*A�*A�h%�V/-�;�8�8�-r=

Youez - 2016 - github.com/yon3zu
LinuXploit