Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/git/objects/submodule/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/git/objects/submodule/__pycache__/root.cpython-311.pyc

�

�܋fpL��n�ddlmZmZddlmZddlmZddlZddlZddl	m
Z
mZddlm
Z
e
rddlmZdd	lmZd
dgZejd��Ze�ej����Gd
�de��ZejZejZejZejZejZejZGd�d
e��ZdS)�)�	Submodule�UpdateProgress)�find_first_remote_branch�)�InvalidGitRepositoryErrorN)�
TYPE_CHECKING�Union)�
Commit_ish)�Repo)�IterableList�
RootModule�RootUpdateProgresszgit.objects.submodule.rootc�z�eZdZdZd�eejejdz��D��\ZZZ	Z
ejdzZdZdS)rz;Utility class which adds more opcodes to the UpdateProgressc��g|]}d|z��S)r�)�.0�xs  �k/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/objects/submodule/root.py�
<listcomp>zRootUpdateProgress.<listcomp>s)��3�3�3���Q��3�3�3��rN)�__name__�
__module__�__qualname__�__doc__�ranger�
_num_op_codes�REMOVE�
PATHCHANGE�BRANCHCHANGE�	URLCHANGE�	__slots__rrrrrsg������E�E�3�3���n�:�N�<X�[\�<\�]�]�3�3�3�/�F�J��i�#�0�1�4�M��I�I�Irc���eZdZdZdZdZd�fd�Zdd	�Z									ddee	dfd
e
de
de
de
dedde
de
de
ddfd�Zdd�Z�xZ
S)r
z�A (virtual) Root of all submodules in the given repository. It can be used
    to more easily traverse all submodules of the master repositoryr�__ROOT__�reporc����tt|���||j|jd|j|jjdtj	�
|j�����dS)N�)�binsha�mode�path�name�
parent_commit�url�branch_path)�superr
�__init__�NULL_BIN_SHA�k_default_mode�k_root_name�head�commit�git�Head�to_full_path�k_head_default)�selfr%�	__class__s  �rr0zRootModule.__init__6sm���
�j�$���(�(���$��$���!��)�*����-�-�d�.A�B�B�	)�		
�		
�		
�		
�		
r�returnNc��dS)zMay not do anythingNr�r:s r�_clear_cachezRootModule._clear_cacheCs���rTF�previous_commit�	recursive�force_remove�init�to_latest_revision�progress)Nr�dry_run�force_reset�
keep_goingc

�8�(�|jjrtd���|�t��}d}
|rd}
|j}	|jj}|�]	|�|j�d��j��}|j|j	krt�n'#t$r|}YnwxYw|�|��}|�||���}
|�|��}t|
��}t|��}||z
}t|��}t|��D]�\}}t}|dkr
|t z}|�||||
d|j�d	|j��z��|jj|_|�d
d||���||d
z
kr
|t,z}|�||||
d|jzz����||z}t|��}t|��D�]g\}}|
|j}||j�(�(j|jkr�|���r�|�t t2z|||
d�(j�d|j�d�(j��z��|s|��(jdd
���|�t,t2z|||
d�(jzz���(����r�(j|jk�r.d}�(���}|j}t�(fd�|D����dk�r�|�t t<z|||
d�(j�d|j�d�(j��z��|�s~|d�|D��vsJ�|�|�(j��}|� |���t�(fd�|j!D����dkrtEd�(j#�d�(j�����d}|D]}|j|jkr|}n�|�3t|��d
kr	|d}ntd|jz���|j} |�$|��|�%| ���(j}!d
}"|j!|j#}#|#j�&��D]}$|$j|!krd}"n�|"s1tN�(d�(j)��|#jj�(_|�t,t<z|||
d�(jzz���(j*|j*k�r/|�t tVz|||
d�(j�d|j*�d�(j*��z��|s��(���}|j}%|%D]}|� |����	tXj-�.|�(j#d �!��}&n*#t^$rtYj-|�(j*��}&YnwxYw|&�0tc|%�(j#����|&|j_2|�t,tVz|||
d"�(jzz����inA#tf$r4}'|	s�tN�4tk|'����Yd}'~'nd}'~'wwxYw|D]y�(�(�d
||||||	�#��|rY�(���rEtm|���(������d|||||||	�$���z|S)%a�	Update the submodules of this repository to the current HEAD commit.
        This method behaves smartly by determining changes of the path of a submodules
        repository, next to changes to the to-be-checked-out commit or the branch to be
        checked out. This works if the submodules ID does not change.
        Additionally it will detect addition and removal of submodules, which will be handled
        gracefully.

        :param previous_commit: If set to a commit'ish, the commit we should use
            as the previous commit the HEAD pointed to before it was set to the commit it points to now.
            If None, it defaults to HEAD@{1} otherwise
        :param recursive: if True, the children of submodules will be updated as well
            using the same technique
        :param force_remove: If submodules have been deleted, they will be forcibly removed.
            Otherwise the update may fail if a submodule's repository cannot be deleted as
            changes have been made to it (see Submodule.update() for more information)
        :param init: If we encounter a new module which would need to be initialized, then do it.
        :param to_latest_revision: If True, instead of checking out the revision pointed to
            by this submodule's sha, the checked out tracking branch will be merged with the
            latest remote branch fetched from the repository's origin.
            Unless force_reset is specified, a local tracking branch will never be reset into its past, therefore
            the remote branch must be in the future for this to have an effect.
        :param force_reset: if True, submodules may checkout or reset their branch even if the repository has
            pending changes that would be overwritten, or if the local tracking branch is in the future of the
            remote tracking branch and would be reset into its past.
        :param progress: RootUpdateProgress instance or None if no progress should be sent
        :param dry_run: if True, operations will not actually be performed. Progress messages
            will change accordingly to indicate the WOULD DO state of the operation.
        :param keep_going: if True, we will ignore but log all errors, and keep going recursively.
            Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn't see
            otherwise.
            In conjunction with dry_run, it can be useful to anticipate all errors when updating submodules
        :return: selfz-Cannot update submodules in bare repositoriesNr'z	DRY-RUN: ���)r,rzRemoving submodule z at FT)�
configuration�module�forcerFrzDone removing submodule %rzMoving repository of submodule z from z to )rLrKz&Done moving repository of submodule %r�__new_origin__c�4��g|]}|j�jk�|��Sr)r-�r�r�sms  �rrz%RootModule.update.<locals>.<listcomp>�s"���C�C�C�a�1�5�B�F�?�?��?�?�?rzChanging url of submodule c��g|]	}|j��
Sr)r+)rrQs  rrz%RootModule.update.<locals>.<listcomp>�s��1G�1G�1G�Q�!�&�1G�1G�1Gr)rEc�4��g|]}|j�jk�|��Sr)�remote_head�branch_namerPs  �rrz%RootModule.update.<locals>.<listcomp>�s)���'_�'_�'_�a�q�}�PR�P^�?^�?^��?^�?^�?^rzSubmodule branch named z. was not available in new submodule remote at z,Couldn't find original remote-repo at url %rz�Current sha %s was not contained in the tracking             branch at the new remote, setting it the the remote's tracking branchz"Done adjusting url of submodule %rzChanging branch of submodule zbranch: Created from HEAD)�logmsgz$Done changing branch of submodule %r)rArCrDrErFrMrH)rArBrCrDrErFrGrH)7r%�barerrr4r5�	log_entry�	oldhexshar(r1�
IndexError�
list_items�set�len�	enumerater�BEGIN�updater+�abspath�_parent_commit�remove�ENDr*�
module_existsr�mover-rL�remotesr!�
create_remote�fetch�refs�
ValueErrorrV�
delete_remote�rename�traverse�log�warning�hexshar.r r6r7�create�OSError�set_tracking_branchr�	reference�	Exception�error�str�type))r:r@rArBrCrDrErFrGrH�prefixr%�
cur_commit�psms�sms�spsms�ssms�rrsm�len_rrsm�i�rsm�op�csms�len_csms�csm�psm�nn�smm�rmts�smr�rmt_for_deletion�remote�	orig_name�smsha�found�rref�c�smmr�tbr�errrRs)                                        @rrazRootModule.updateIs����X�9�>�	]�+�,[�\�\�\���)�+�+�H����	!� �F��y��x	 ���)�J��&�1�&*�k�k�$�)�2E�2E�b�2I�2I�2S�&T�&T�O�&�-��1M�M�M�(�(�N��"�1�1�1�&0�O�O�O�1����
#'�+�+�o�">�">��/3�o�o�d�Ra�o�.b�.b�D�-1�_�_�T�-B�-B�C���I�I�E��s�8�8�D��4�<�D��4�y�y�H�#�D�/�/�
c�
c���3�����6�6��%�K�B�
�������F�c�h�h�h����T�T�	���&*�Y�%5��"��
�
�"'��&�#�	������1��$�$��#�I�B�����A�x��:V�Y\�Ya�:a�1a�b�b�b�b��4�<�D��4�y�y�H�#�D�/�/�t
�t
���3�#'���>��"%�c�h�-���7�c�h�&�&�3�+<�+<�+>�+>�&��O�O��
�*�� ���VX�V]�V]�V]�_b�_j�_j�_j�ln�lv�lv�!w�w�	���#�L�������U��K�K�K��O�O��j�(�� ��!I�B�G�!S�S�	����#�#�%�%�[��v���(�(�.�� �i�i�k�k��"�{���C�C�C�C�4�C�C�C�D�D��I�I�$�O�O� %�	� 1� !� (� &��Y[�Y`�Y`�Y`�be�bi�bi�bi�km�kq�kq�)r� r�	���$+�LC�')�1G�1G�$�1G�1G�1G�'G�'G�'G�'G�&)�&7�&7��B�F�&C�&C�� #�	�	�8�	� <� <� <�$'�'_�'_�'_�'_�3�8�'_�'_�'_�#`�#`�de�#e�#e�*4�*�+-�>�>�>�2�6�6�)C�+&�+&�%&�48� 0�.2�!.�!.�F�'-�z�S�W�'<�'<�;A�(8�(-��(=�$4�#;�'*�4�y�y�A�~�~�;?��7�(8�(8�/H�,Z�]`�]d�,d�/*�/*�)*�-=�,A�	� #� 1� 1�2B� C� C� C�!$�
�
�9� 5� 5� 5�)+�	��(-��'*�x��0@�'A��)-��)=�)=�)?�)?�!.�!.�A�'(�x�5�'8�'8�04��(-��(9�(-�
!C�
%(�K�K�)T�(*�	�%&�%&�%&�
15��0B�B�I�
%�O�O� #�i�� !� (� &�)M�QS�QX�)Y� Y�	����~���8�8�!���!�L�0��$�"�F�!�w�w�w��������I�I�	��� '�5�"$�)�)�+�+�C�#&�;�D�*.�@�@�� &���h�� ?� ?� ?� ?�D�&)�h�o�o�$'�$&�N�+F�'6�'"�'"����
$+�D�D�D�&)�h�s�B�N�&C�&C����D����
 �3�3�4L�T�SU�Sa�4b�4b�c�c�c�
25�C�H�.�!����,�.��$�"�%K�b�g�%U�U�	����_t
��p�	 �	 �	 ��
���I�I�c�#�h�h�������������	 �����	�	�B��I�I���#5�!��!�%�
�
�
�
��
��#�#�%�%�
��D��J�J�r�y�y�{�{�+�+�2�2�"&�%1�!�+=�!)� '�$/�#-�3�	�	�	���sb�Y�
A	B�Y�B#� Y�"B#�#TY�$'W�Y�$W3�0Y�2W3�3A)Y�
Z�'*Z�Zc��|jS)z8:return: the actual repository containing the submodules)r%r>s rrLzRootModule.module�s
���y�r)r%r)r<N)	NTFTFNFFF)r<r)rrrrr"r3r0r?r	r
�boolrarL�
__classcell__)r;s@rr
r
-s5�������G�G��I��K�
�
�
�
�
�
�
�
�
�
�48��"��#(�6:��!� �X�X��z�4�/�0�X��X��	X�
�X�!�
X��2�3�X��X��X��X�
�X�X�X�X�t
�������r)�baserr�utilr�git.excrr6�logging�typingrr	�	git.typesr
�git.repor�git.utilr�__all__�	getLoggerrp�
addHandler�NullHandlerrr`rerr r!rr
rrr�<module>r�s���+�+�+�+�+�+�+�+�*�*�*�*�*�*�-�-�-�-�-�-�
�
�
�
�����(�'�'�'�'�'�'�'� � � � � � ��&�������%�%�%�%�%�%��-�
.���g��4�5�5�����"�w�"�$�$�%�%�%����������	� �����	�	"��!�.���(�	�
�
*�
�x�x�x�x�x��x�x�x�x�xr

Hacked By AnonymousFox1.0, Coded By AnonymousFox