[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.191.181.251: ~ $
�

��DgG���ddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZmZddlmZmZmZddlmZddlmZmZmZmZmZmZmZejj Z ejj!Z!ej"e#��Z$ej%d��Z&ej%d	��Z'ej%d
ej(��Z)de*de+fd
�Z,Gd�de��Z-ej.e-��dS)�N)�replace)�List�Optional�Tuple)�
BadCommand�InstallationError)�
HiddenText�display_path�hide_url)�make_command)�AuthInfo�RemoteNotFoundError�RemoteNotValidError�
RevOptions�VersionControl�(find_path_to_project_root_from_repo_root�vcsz(^git version (\d+)\.(\d+)(?:\.(\d+))?.*$z^[a-fA-F0-9]{40}$a/^
    # Optional user, e.g. 'git@'
    (\w+@)?
    # Server, e.g. 'github.com'.
    ([^/:]+):
    # The server-side path. e.g. 'user/project.git'. Must start with an
    # alphanumeric character so as not to be confusable with a Windows paths
    # like 'C:/foo/bar' or 'C:\foo\bar'.
    (\w[^:]*)
    $�sha�returnc�P�tt�|����S�N)�bool�
HASH_REGEX�match)rs �u/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/vcs/git.py�looks_like_hashr8s���
� � ��%�%�&�&�&�c
�0��eZdZdZdZdZdZdZdZe	de
dee
fd	���Zd
e
de
de
fd�Zdeed
ffd�Zede
dee
fd���Zede
de
deee
e
ffd���Zede
de
de
fd���Zede
d
ededefd���Zede
dee
de
fd���Zde
d
edededdf
d�Zde
d
ededdfd�Zde
d
ededdfd�Zede
de
fd���Ze	d
e
de
fd���Zede
de
de
fd���Z ed&de
dee
de
fd���Z!ede
dee
fd ���Z"ed
e
dee
ee
e#ff�fd!���Z$ede
ddfd"���Z%ede
dee
f�fd#���Z&e	d$e
de
fd%���Z'�xZ(S)'�Git�gitz.git�clone)zgit+httpz	git+httpszgit+sshzgit+gitzgit+file)�GIT_DIR�
GIT_WORK_TREE�HEAD�revrc��|gSr��r%s r�get_base_rev_argszGit.get_base_rev_argsLs	���u�r�url�destc��|�t|����\}}|jsdS|�||j��sdSt	|�||j��d��}|S)NFr)�get_url_rev_optionsrr%�is_commit_id_equalr�get_revision_sha)�selfr*r+�_�rev_options�is_tag_or_branchs      r�is_immutable_rev_checkoutzGit.is_immutable_rev_checkoutPs���1�1�(�3�-�-�@�@���;���	��5��&�&�t�[�_�=�=�	��5� �� 5� 5�d�K�O� L� L�Q� O�P�P��#�#�#r.c�0�|�dgddd���}t�|��}|st�d|��dSt|�d����t|�d	����fS)
N�versionzgit versionFT)�command_desc�show_stdout�stdout_onlyzCan't parse git version: %sr'��)�run_command�GIT_VERSION_REGEXr�logger�warning�int�group)r0r6rs   r�get_git_versionzGit.get_git_version^s����"�"�
�K�&���	#�
�
��"�'�'��0�0���	��N�N�8�'�B�B�B��2��E�K�K��N�N�#�#�S����Q���%8�%8�9�9r�locationc���gd�}|�|ddd|���}|���}|�d��r|td��d�SdS)zl
        Return the current branch, or None if HEAD isn't at a branch
        (e.g. detached HEAD).
        )zsymbolic-ref�-qr$�r:FT��extra_ok_returncodesr8r9�cwdzrefs/heads/N)r<�strip�
startswith�len)�clsrC�args�output�refs     r�get_current_branchzGit.get_current_branchksw��.�-�-������!%����!�
�
���l�l�n�n���>�>�-�(�(�	-��s�=�)�)�+�+�,�,��trc��|�d|g|ddd���}i}|����d��D][}|�d��}|s�	|�dd	�
��\}}n #t$rt	d|�����wxYw|||<�\d|��}d
|��}	|�|��}
|
�|
dfS|�|	��}
|
dfS)z�
        Return (sha_or_none, is_branch), where sha_or_none is a commit hash
        if the revision names a remote branch or tag, otherwise None.

        Args:
          dest: the repository directory.
          rev: the revision name.
        zshow-refFT�ignore)rIr8r9�
on_returncode�
�
� r;)�maxsplitzunexpected show-ref line: zrefs/remotes/origin/z
refs/tags/)r<rJ�split�rstrip�
ValueError�get)rMr+r%rO�refs�line�ref_sha�ref_name�
branch_ref�tag_refrs           rr/zGit.get_revision_sha�s6�����
������"�!�
�
�����L�L�N�N�(�(��.�.�	%�	%�D��;�;�t�$�$�D��
��
H�$(�J�J�s�Q�J�$?�$?�!������
H�
H�
H�!�!F�d�!F�!F�G�G�G�
H����
%�D��N�N�1�C�1�1�
�$�s�$�$���h�h�z�"�"���?���;���h�h�w�����U�|�s�!A<�<Bc��|�d��rdSt|��sdS|�||��rdSdS)a$
        Return true if rev is a ref or is a commit that we don't have locally.

        Branches and tags are not considered in this method because they are
        assumed to be always available locally (which is a normal outcome of
        ``git clone`` and ``git fetch --tags``).
        zrefs/TF)rKr�
has_commit)rMr+r%s   r�
_should_fetchzGit._should_fetch�sR���>�>�'�"�"�	��4��s�#�#�	��5��>�>�$��$�$�	��5��trr2c	��|j}|�J�|�||��\}}|�,|�|��}t||r|nd���}|St	|��st
�d|��|�||��s|S|�tdd||�
����|���|�|d���}|�|��}|S)	z�
        Resolve a revision to a new RevOptions object with the SHA1 of the
        branch, tag, or ref if found.

        Args:
          rev_options: a RevOptions object.
        N)�branch_namez:Did not find branch or tag '%s', assuming revision or ref.�fetchrE�rI�
FETCH_HEADr()�arg_revr/�make_newrrr>r?rer<r�to_args�get_revision)rMr+r*r2r%r�	is_branchs       r�resolve_revisionzGit.resolve_revision�s(���!�������-�-�d�C�8�8���Y��?�%�.�.�s�3�3�K�!�+�9�<V�C�C�RV�X�X�X�K����s�#�#�	��N�N�L��
�
�
�
� � ��s�+�+�	���	�����$��[�-@�-@�-B�-B�C�C��	�	
�	
�	
�
���t���6�6��!�*�*�3�/�/���r�namec�<�|sdS|�|��|kS)z�
        Return whether the current commit hash equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        F)rn)rMr+rqs   rr.zGit.is_commit_id_equal�s*���	��5�����%�%��-�-r�	verbosityNc���|���}t�d||t|����|dkrd}n|dkrd}nd}|���dkr&|�t
dd	g|�|�|�R���n$|�t
dg|�|�|�R���|jr�|�|||��}t|d
d��}t�
d||��|�V|�||j��s:t
dd
|�����}|�||���ng|�
|��|kr#d|��}	dd|d|	g}|�||���n*|�|��}
|�|
��}t�d||j��|�|��dS)NzCloning %s%s to %sr)z--quietr:r')z	--verbosez
--progress)r;�r!z--filter=blob:nonergzRev options %s, branch_name %s�checkoutrErizorigin/z-bz--trackzResolved %s to commit %s)�
to_displayr>�infor
rBr<rr%rp�getattr�debugr.rmrQrnrl�update_submodules)r0r+r*r2rs�rev_display�flagsrg�cmd_args�track_branchrs           r�	fetch_newz
Git.fetch_newsW��"�,�,�.�.�����(�#�{�L��<N�<N�O�O�O���>�>�%1�E�E�
�!�^�^��E�E�/�E����!�!�W�,�,�
�����(�����	�
����
�
�
�
�
���\�'�E�E�E�3�E��E�E�E�F�F�F��?�	4��/�/��c�;�G�G�K�!�+�}�d�C�C�K��L�L�9�;��T�T�T��"��.�.�t�[�_�E�E�9�+�"��#�+�+�-�-� � �H�
�$�$�X�4�$�8�8�8���(�(��.�.�+�=�=� 7��6�6������ ���� � ��t� �4�4�4���#�#�D�)�)�C�%�.�.�s�3�3�K����.��[�_�E�E�E�	
���t�$�$�$�$�$rc���|�tdd|��|���tdd|�����}|�||���|�|��dS)N�configzremote.origin.urlrirvrE)r<rrmr{�r0r+r*r2r~s     r�switchz
Git.switchEs��������#6��<�<��	�	
�	
�	
� �
�D�+�2E�2E�2G�2G�H�H������t��,�,�,����t�$�$�$�$�$rc�j�|���dkr|�gd�|���n|�ddg|���|�|||��}tddd|�����}|�||���|�|��dS)N)r:�	)rhrEz--tagsrirhrE�resetz--hard)rBr<rprrmr{r�s     r�updatez
Git.updateOs������!�!�V�+�+����6�6�6�D��A�A�A�A����g�t�_�$��7�7�7��+�+�D�#�{�C�C�����4��9L�9L�9N�9N�O�O������t��,�,�,����t�$�$�$�$�$rc�`�|�gd�ddd|���}|���}	|d}n#t$rt�wxYw|D]}|�d��r|}n�|�d��d	}|�|�����S)
z�
        Return URL of the first remote encountered.

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        )r�z--get-regexpzremote\..*\.urlrFFTrGrzremote.origin.url rWr:)r<�
splitlines�
IndexErrorrrKrY�_git_remote_to_pip_urlrJ)rMrC�stdout�remotes�found_remote�remoter*s       r�get_remote_urlzGit.get_remote_url]s������:�:�:�!%����!�
�
���#�#�%�%��	&�"�1�:�L�L���	&�	&�	&�%�%�	&�����	�	�F�� � �!5�6�6�
�%����
�� � ��%�%�a�(���)�)�#�)�)�+�+�6�6�6s	�;�A
c�:�tjd|��r|Stj�|��r&tj|�����St�|��}|r|�	d��St|���)a8
        Convert a remote url from what git uses to what pip accepts.

        There are 3 legal forms **url** may take:

            1. A fully qualified url: ssh://git@example.com/foo/bar.git
            2. A local project.git folder: /path/to/bare/repository.git
            3. SCP shorthand for form 1: git@example.com:foo/bar.git

        Form 1 is output as-is. Form 2 must be converted to URI and form 3 must
        be converted to form 1.

        See the corresponding test test_git_remote_url_to_pip() for examples of
        sample inputs/outputs.
        z\w+://z
ssh://\1\2/\3)�rer�os�path�exists�pathlib�PurePath�as_uri�	SCP_REGEX�expandr)r*�	scp_matchs  rr�zGit._git_remote_to_pip_url{s���"�8�I�s�#�#�	��J�
�7�>�>�#���	2��#�C�(�(�/�/�1�1�1��O�O�C�(�(�	��	6��#�#�$4�5�5�5�!�#�&�&�&rc�h�	|�dddd|zg|d���dS#t$rYdSwxYw)zU
        Check if rev is a commit that is available in the local repository.
        �	rev-parserEz--verifyzsha^F)rI�log_failed_cmdT)r<r)rMrCr%s   rrdzGit.has_commit�sc��
		��O�O��d�J����=��$�
�
�
�
��4��!�	�	�	��5�5�	���s�#�
1�1c�h�|�d}|�d|gdd|���}|���S)Nr$r�FT�r8r9rI)r<rJ)rMrCr%�current_revs    rrnzGit.get_revision�sI���;��C��o�o�
�#�����	&�
�
��� � �"�"�"rc�t�|�ddgdd|������}tj�|��s tj�||��}tj�tj�|d����}t||��S)z�
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        r�z	--git-dirFTr�z..)r<rJr�r��isabs�join�abspathr)rMrC�git_dir�	repo_roots    r�get_subdirectoryzGit.get_subdirectory�s����/�/�
�+�&����	"�
�
�
�%�'�'�	��w�}�}�W�%�%�	6��g�l�l�8�W�5�5�G��G�O�O�B�G�L�L��$�$?�$?�@�@�	�7��)�L�L�Lrc����t|��\}}}}}|�d��r�|dt|�d�����}|tj�|���dd���d��z}|�d��dz}	|d|	�t||	d�||||f��z}d|vrXd|vsJ�|�d	d
��}t���|��\}}
}|�dd��}n%t���|��\}}
}||
|fS)
a9
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes don't
        work with a ssh:// scheme (e.g. GitHub). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        �fileN�/�\�+r:z://zfile:zgit+z
git+ssh://zssh://�)�urlsplit�endswithrL�lstrip�urllib�request�url2pathnamer�find�
urlunsplit�super�get_url_rev_and_auth)
rMr*�scheme�netlocr��query�fragment�initial_slashes�newpath�
after_plusr%�	user_pass�	__class__s
            �rr�zGit.get_url_rev_and_auth�so���19��
�
�-����e�X��?�?�6�"�"�	�"�#;�c�$�+�+�c�*:�*:�&;�&;�%;�#;�<�O�%���(C�(C�D�(I�(I�(Q�(Q��c�)�)��f�S�k�k��G� ���S�)�)�A�-�J���*��%�
��
���$�f�g�u�h�G�)�)��C������#�%�%�%�%��+�+�f�l�3�3�C�"'�'�'�">�">�s�"C�"C��C��i��+�+�h��+�+�C�C�"'�'�'�">�">�s�"C�"C��C��i��C��"�"rc��tj�tj�|d����sdS|�gd�|���dS)Nz.gitmodules)�	submoduler�z--initz--recursiverEri)r�r�r�r�r<)rMrCs  rr{zGit.update_submodules�s^���w�~�~�b�g�l�l�8�]�C�C�D�D�	��F����B�B�B��	�	
�	
�	
�	
�	
rc�`��t���|��}|r|S	|�ddg|dddd���}n8#t$rt�d|��YdSt$rYdSwxYwtj�	|�
d����S)	Nr�z--show-toplevelFT�raise)rIr8r9rTr�zKcould not determine if %s is under git control because git is not availablez
)r��get_repository_rootr<rr>rzrr�r��normpathrZ)rMrC�loc�rr�s    �rr�zGit.get_repository_root�s�����g�g�)�)�(�3�3���	��J�	�����/�0��!� �%�$�
 ���A�A���	�	�	��L�L�/��
�
�
�
�4�4� �	�	�	��4�4�	�����w������� 0� 0�1�1�1s�A�%A;�.	A;�:A;�repo_urlc��dS)zEIn either https or ssh form, requirements must be prefixed with git+.Tr')r�s r�should_add_vcs_url_prefixzGit.should_add_vcs_url_prefix	s	���trr))�__name__�
__module__�__qualname__rq�dirname�	repo_name�schemes�
unset_environ�default_arg_rev�staticmethod�strrr)rr4rr@rB�classmethodrrQr/rer	rrpr.r�r�r�r�r�rdrnr�r
r�r{r�r��
__classcell__)r�s@rrr<sf��������D��G��I��G�1�M��O���s��t�C�y�����\��$�S�$��$��$�$�$�$�:��s�C�x��:�:�:�:���#��(�3�-�����[��0�+�C�+�c�+�e�H�S�M�4�<O�6P�+�+�+��[�+�Z����3��4�����[��,�+��+�'�+�6@�+�	�+�+�+��[�+�Z�.�c�.��#��.�4�.�.�.��[�.�=%��=%�(�=%�7A�=%�NQ�=%�	
�=%�=%�=%�=%�~%�3�%�Z�%�j�%�T�%�%�%�%�%�3�%�Z�%�j�%�T�%�%�%�%��7�c�7�c�7�7�7��[�7�:�'�C�'�C�'�'�'��\�'�<�
�#�
�C�
�D�
�
�
��[�
��	#�	#�C�	#�h�s�m�	#�s�	#�	#�	#��[�	#��M��M���
�M�M�M��[�M�"�#�s�#�u�S�(�3�-��5Q�/R�#�#�#�#�#��[�#�<�
��
��
�
�
��[�
��2�3�2�8�C�=�2�2�2�2�2��[�2�0��C��D�����\�����rr)/�logging�os.pathr�r�r��urllib.parser��urllib.request�dataclassesr�typingrrr�pip._internal.exceptionsrr�pip._internal.utils.miscr	r
r�pip._internal.utils.subprocessr� pip._internal.vcs.versioncontrolr
rrrrrr�parser�r��	getLoggerr�r>�compiler=r�VERBOSEr�r�rrr�registerr'rr�<module>r�s���������������	�	�	�	���������������(�(�(�(�(�(�(�(�(�(�B�B�B�B�B�B�B�B�G�G�G�G�G�G�G�G�G�G�7�7�7�7�7�7��������������������<� ��
�\�
$�
�
��	�8�	$�	$���B�J������R�Z�+�
,�
,�
�
�B�J�		��J�
�
�	�'��'��'�'�'�'�P�P�P�P�P�.�P�P�P�f
���S�����r

Filemanager

Name Type Size Permission Actions
__init__.cpython-311.pyc File 668 B 0644
bazaar.cpython-311.pyc File 5.79 KB 0644
git.cpython-311.pyc File 21 KB 0644
mercurial.cpython-311.pyc File 8.56 KB 0644
subversion.cpython-311.pyc File 14.33 KB 0644
versioncontrol.cpython-311.pyc File 31.06 KB 0644