PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/alt/python313/lib/python3.13/site-packages/pip/_internal/vcs/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib/python3.13/site-packages/pip/_internal/vcs/__pycache__/git.cpython-313.pyc

�

�ZLg�F����SSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
Jr SSKJ
r
Jr SSKJrJrJr SSKJr SSKJrJrJrJrJrJrJr \R:R<r\R:R>r\R@"\!5r"\RF"S5r$\RF"S5r%\RF"S	\RL5r'S
\(S\)4Sjr*"S
S\5r+\RX"\+5 g)�N)�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�>�[[RU55$�N)�bool�
HASH_REGEX�match)rs ڇ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-1.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/vcs/git.py�looks_like_hashr7s���
� � ��%�&�&�c
��^�\rSrSrSrSrSrSrSrSr	\
S\S	\\4S
j5r
S\S\S	\4S
jrS	\\S44Sjr\S\S	\\4Sj5r\S\S\S	\\\\44Sj5r\S\S\S	\4Sj5r\S\S\S\S	\4Sj5r\S\S\\S	\4Sj5rS\S\S\S\S	S4
SjrS\S\S\S	S4SjrS\S\S\S	S4Sjr\S\S	\4Sj5r\
S\S	\4Sj5r \S\S\S	\4Sj5r!\S(S\S\\S	\4S jj5r"\S\S	\\4S!j5r#\S\S	\\\\\$44U4S"jj5r%\S\S	S4S#j5r&\S\S	\\4U4S$jj5r'\
S%\S	\4S&j5r(S'r)U=r*$))�Git�;�gitz.git�clone)zgit+httpz	git+httpszgit+sshzgit+gitzgit+file)�GIT_DIR�
GIT_WORK_TREE�HEAD�revrc��U/$r��r%s r�get_base_rev_args�Git.get_base_rev_argsKs	���u�r�url�destc��UR[U55up4UR(dgURX$R5(dg[	URX$R5S5nU(+$)NFr)�get_url_rev_optionsr
r%�is_commit_id_equalr�get_revision_sha)�selfr+r,�_�rev_options�is_tag_or_branchs      r�is_immutable_rev_checkout�Git.is_immutable_rev_checkoutOsf���1�1�(�3�-�@��������&�&�t�_�_�=�=�� �� 5� 5�d�O�O� L�Q� O�P��#�#�#r.c��URS/SSSS9n[RU5nU(d[R	SU5 g[UR
S55[UR
S	554$)
N�versionzgit versionFT)�command_desc�show_stdout�stdout_onlyzCan't parse git version: %sr'��)�run_command�GIT_VERSION_REGEXr�logger�warning�int�group)r1r8rs   r�get_git_version�Git.get_git_version]sq���"�"�
�K�&���	#�
��"�'�'��0����N�N�8�'�B���E�K�K��N�#�S����Q��%8�9�9r�locationc��/SQnURUSSSUS9nUR5nURS5(aU[S5S$g)zT
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_returncodesr:r;�cwdzrefs/heads/N)r>�strip�
startswith�len)�clsrF�args�output�refs     r�get_current_branch�Git.get_current_branchjs]��.������!%����!�
���l�l�n���>�>�-�(�(��s�=�)�+�,�,�rc��URSU/USSSS9n0nUR5RS5H4nURS5nU(dMURSS	S
9upgXdU'M6 SU3nS
U3n	URU5n
U
bU
S4$URU	5n
U
S4$![a [	SU<35ef=f)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)rLr:r;�
on_returncode�
�
� r=)�maxsplitzunexpected show-ref line: zrefs/remotes/origin/z
refs/tags/)r>rM�split�rstrip�
ValueError�get)rPr,r%rR�refs�line�ref_sha�ref_name�
branch_ref�tag_refrs           rr0�Git.get_revision_sha�s������
������"�!�
�����L�L�N�(�(��.�D��;�;�t�$�D���
H�$(�J�J�s�Q�J�$?�!��%��N�/�,�C�5�1�
��s�e�$���h�h�z�"���?���;���h�h�w����U�|���!�
H�!�#=�d�X�!F�G�G�
H�s�B&�&Cc��URS5(ag[U5(dgURX5(agg)z�
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)rNr�
has_commit)rPr,r%s   r�
_should_fetch�Git._should_fetch�s9���>�>�'�"�"���s�#�#���>�>�$�$�$��rr3c	��URnUceURX5upVUb)URU5nU(aXClU$SUlU$[	U5(d[
R
SU5 URX5(dU$UR[SSX#R55US9 URUSS9nURU5nU$)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.
Nz:Did not find branch or tag '%s', assuming revision or ref.�fetchrH�rL�
FETCH_HEADr()�arg_revr0�make_new�branch_namerr@rArjr>r�to_args�get_revision)rPr,r+r3r%r�	is_branchs       r�resolve_revision�Git.resolve_revision�s����!�!�������-�-�d�8����?�%�.�.�s�3�K�-6�c�#���=A�K�#����s�#�#��N�N�L��
�
� � ��+�+���	�����$��-@�-@�-B�C��	�	
�
���t���6��!�*�*�3�/���r�namec�:�U(dgURU5U:H$)z
Return whether the current commit hash equals the given name.

Args:
  dest: the repository directory.
  name: a string name.
F)rt)rPr,rxs   rr/�Git.is_commit_id_equal�s ��������%��-�-r�	verbosityNc�d�UR5n[RSX%[U55 US::aSnOUS:XaSnOSnUR	5S:�a!UR[
SS	/UQUPUP765 OUR[
S/UQUPUP765 UR(a�URXU5n[US
S5n[RSX75 UcKURXR5(d*[
SS
UR55nURX�S9 OSURU5U:waSU3n	SSUSU	/nURX�S9 O"URU5n
URU
5n[RSX#R5 UR!U5 g)NzCloning %s%s to %sr)z--quietr<r')z	--verbosez
--progress)r=�r!z--filter=blob:nonerrzRev options %s, branch_name %s�checkoutrHrnzorigin/z-bz--trackzResolved %s to commit %s)�
to_displayr@�infor	rDr>rr%rv�getattr�debugr/rsrTrtrq�update_submodules)r1r,r+r3r{�rev_display�flagsrr�cmd_args�track_branchrs           r�	fetch_new�
Git.fetch_news���"�,�,�.�����(�#�L��<N�O���>�%1�E�
�!�^��E�/�E����!�W�,�
�����(�����	�
��
�
���\�'�E�E�E�3�E��E�F��?�?��/�/��;�G�K�!�+�}�d�C�K��L�L�9�;�T��"��.�.�t�_�_�E�E�+�"��#�+�+�-� �H�
�$�$�X�$�8���(�(��.�+�=�")��
�6������ ���� � �� �4���#�#�D�)�C�%�.�.�s�3�K����.��_�_�E�	
���t�$rc��UR[SSU5US9 [SSUR55nURXAS9 URU5 g)N�configzremote.origin.urlrnr~rH)r>rrsr��r1r,r+r3r�s     r�switch�
Git.switchDs]�������#6��<��	�	
� �
�D�+�2E�2E�2G�H�������,����t�$rc��UR5S:�aUR/SQUS9 OURSS/US9 URXU5n[SSSUR	55nURXAS9 URU5 g)N)r<�	)rmrHz--tagsrnrmrH�resetz--hard)rDr>rvrrsr�r�s     r�update�
Git.updateNs������!�V�+����6�D��A����g�t�_�$��7��+�+�D�{�C�����4��9L�9L�9N�O�������,����t�$rc�,�UR/SQSSSUS9nUR5nUSnUHnUR	S5(dMUn O URS5S	nUR
UR55$![a [ef=f)
z�
Return URL of the first remote encountered.

Raises RemoteNotFoundError if the repository does not have a remote
url configured.
)r�z--get-regexpzremote\..*\.urlrIFTrJrzremote.origin.url r[r<)r>�
splitlines�
IndexErrorr
rNr]�_git_remote_to_pip_urlrM)rPrF�stdout�remotes�found_remote�remoter+s       r�get_remote_url�Git.get_remote_url\s������:�!%����!�
���#�#�%��	&�"�1�:�L��F�� � �!5�6�6�%����� � ��%�a�(���)�)�#�)�)�+�6�6���	&�%�%�	&�s�B�Bc�>�[R"SU5(aU$[RR	U5(a$[
R"U5R5$[RU5nU(aURS5$[U5e)a�
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��Git._git_remote_to_pip_urlzsw��"�8�8�I�s�#�#��J�
�7�7�>�>�#����#�#�C�(�/�/�1�1��O�O�C�(�	���#�#�$4�5�5�!�#�&�&rc�V�URSSSSU-/USS9 g![a gf=f)zE
Check if rev is a commit that is available in the local repository.
�	rev-parserHz--verifyzsha^F)rL�log_failed_cmdT)r>r)rPrFr%s   rri�Git.has_commit�sG��
		��O�O��d�J����=��$�
�
���!�	��	�s��
(�(c�T�UcSnURSU/SSUS9nUR5$)Nr$r�FT�r:r;rL)r>rM)rPrFr%�current_revs    rrt�Git.get_revision�sA���;��C��o�o�
�#�����	&�
��� � �"�"rc�\�URSS/SSUS9R5n[RR	U5(d[RRX5n[RR
[RRUS55n[X5$)zy
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>rMr�r��isabs�join�abspathr)rPrF�git_dir�	repo_roots    r�get_subdirectory�Git.get_subdirectory�s����/�/�
�+�&����	"�
�
�%�'�	��w�w�}�}�W�%�%��g�g�l�l�8�5�G��G�G�O�O�B�G�G�L�L��$�$?�@�	�7��L�Lrc�>�[U5up#pEnURS5(a�US[URS55*nU[R
R
U5RSS5RS5-nURS5S-n	USU	[X)SX8XV45-nSU;a?SU;deURS	S
5n[TU]-U5upnURSS5nO[TU]-U5upnXU4$)
a
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�endswithrO�lstrip�urllib�request�url2pathname�replace�find�
urlunsplit�super�get_url_rev_and_auth)
rPr+�scheme�netlocr��query�fragment�initial_slashes�newpath�
after_plusr%�	user_pass�	__class__s
            �rr��Git.get_url_rev_and_auth�s���19��
�-���X��?�?�6�"�"�"�#;�c�$�+�+�c�*:�&;�%;�<�O�%����(C�(C�D�(I�(Q�(Q��c�)��f�S�k��G� ���S�)�A�-�J���*�%�
���$�f�u�G�)��C�����#�%�%�%��+�+�f�l�3�C�"'�'�">�s�"C��C�i��+�+�h��+�C�"'�'�">�s�"C��C�i���"�"rc��[RR[RRUS55(dgUR	/SQUS9 g)Nz.gitmodules)�	submoduler�z--initz--recursiverHrn)r�r�r�r�r>)rPrFs  rr��Git.update_submodules�s>���w�w�~�~�b�g�g�l�l�8�]�C�D�D�����B��	�	
rc	� >�[TU]U5nU(aU$URSS/USSSSS9n[RRURS55$![a [RSU5 g[a gf=f)	Nr�z--show-toplevelFT�raise)rLr:r;rXr�zKcould not determine if %s is under git control because git is not availablez
)r��get_repository_rootr>rr@r�rr�r��normpathr^)rPrF�loc�rr�s    �rr��Git.get_repository_root�s�����g�)�(�3����J�	�����/�0��!� �%�$�
 ��A�"�w�w������� 0�1�1���	��L�L�/��
�
� �	��	�s�A� B
�	B
�B
�repo_urlc��g)zEIn either https or ssh form, requirements must be prefixed with git+.Tr')r�s r�should_add_vcs_url_prefix�Git.should_add_vcs_url_prefixs��rr'r)+�__name__�
__module__�__qualname__�__firstlineno__rx�dirname�	repo_name�schemes�
unset_environ�default_arg_rev�staticmethod�strrr)rr5rrBrD�classmethodrrTr0rjrrrvr/r�r�r�r�r�rirtr�rr�r�r�r��__static_attributes__�
__classcell__)r�s@rrr;s0����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�:�'�C�'�C�'��'�<�
�#�
�C�
�D�
��
��	#�C�	#�h�s�m�	#�s�	#��	#��M��M���
�M��M�"�#�s�#�u�S�(�3�-��5Q�/R�#��#�<�
��
��
��
��2�3�2�8�C�=�2��2�0��C��D���rr)-�logging�os.pathr�r�r��urllib.parser��urllib.request�typingrrr�pip._internal.exceptionsrr�pip._internal.utils.miscrr	r
�pip._internal.utils.subprocessr� pip._internal.vcs.versioncontrolrr
rrrrr�parser�r��	getLoggerr�r@�compiler?r�VERBOSEr�r�rrr�registerr'rr�<module>r�s������	���(�(�B�G�G�7�����<�<� � ��
�\�\�
$�
$�
�
�	�	�8�	$���J�J�����Z�Z�+�
,�
�
�J�J�		��J�J�
�	�'��'��'�P�.�P�f���S�r

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic