Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.135.221.122
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : git.pyc
�
���cc@@s�ddlmZddlZddlZddlZddlmZddl	mZ
ddl	mZddl
mZmZddlmZmZddlmZddlmZdd	lmZdd
lmZmZmZmZer'ddlmZm Z ddlm!Z!dd
lm"Z"m#Z#ne
j$Z$e
j%Z%ej&e'�Z(ej)d�Z*d�Z+defd��YZ,ej-e,�dS(i(tabsolute_importN(tparse(trequest(t
BadCommandtInstallationError(tdisplay_paththide_url(tmake_command(t
TempDirectory(tMYPY_CHECK_RUNNING(tRemoteNotFoundErrortVersionControlt!find_path_to_setup_from_repo_roottvcs(tOptionaltTuple(t
HiddenText(tAuthInfot
RevOptionss^[a-fA-F0-9]{40}$cC@sttj|��S(N(tboolt
HASH_REGEXtmatch(tsha((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytlooks_like_hash+stGitcB@s(eZdZdZdZdZdZd
Zed��Z	d�Z
d
�Zed��Z
d�Zed��Zed��Zed��Zed��Zd�Zd�Zd�Zed��Zed��Zed d��Zed��Zed��Zed��Zed��ZRS(!tgits.gittclonesgit+https	git+httpssgit+sshsgit+gitsgit+filetGIT_DIRt
GIT_WORK_TREEtHEADcC@s|gS(N((trev((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_base_rev_args;scC@se|jt|��\}}|js(tS|j||j�sAtSt|j||j�d�}|S(Ni(tget_url_rev_optionsRRtFalsetis_commit_id_equalRtget_revision_sha(tselfturltdestt_trev_optionstis_tag_or_branch((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytis_immutable_rev_checkout?s	cC@s|d}|jdgdtdt�}|j|�rP|t|�j�d}nd}dj|jd�d �}t|�S(	Nsgit version tversiontshow_stdouttstdout_onlyitt.i(trun_commandR!tTruet
startswithtlentsplittjoint
parse_version(R$tVERSION_PFXR+((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_git_versionPsc
C@scdddg}|j|dd
dtdtd|�}|j�}|jd	�r_|td	�SdS(sl
        Return the current branch, or None if HEAD isn't at a branch
        (e.g. detached HEAD).
        ssymbolic-refs-qRtextra_ok_returncodesiR,R-tcwdsrefs/heads/(iN(R0R!R1tstripR2R3tNone(tclstlocationtargstoutputtref((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_current_branch_s
	c
C@sy|jd�s|d}ntdd��H}|j|jd|�|jdddd|gd	td
|j�WdQXdS(s@Export the Git repository at the url to the destination locationt/tkindtexportR%scheckout-indexs-as-fs--prefixR,R:N(tendswithRtunpacktpathR0R!(R$R>R%ttemp_dir((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyRExs
c

C@s�|jd|gd|dtdtdd�}i}xc|j�j�D]O}y|j�\}}Wn&tk
r�tdj|���nX|||<qFWdj|�}d	j|�}	|j|�}|d
k	r�|tfS|j|	�}|tfS(s�
        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.
        sshow-refR:R,R-t
on_returncodetignoresunexpected show-ref line: {!r}srefs/remotes/origin/{}srefs/tags/{}N(
R0R!R1R;t
splitlinesR4t
ValueErrortformattgetR<(
R=R&RR@trefstlineRRAt
branch_refttag_ref((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR#�s(	

cC@s=|jd�rtSt|�s#tS|j||�r9tStS(s$
        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``).
        srefs/(R2R1RR!t
has_commit(R=R&R((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyt
_should_fetch�s	cC@s�|j}|dk	st�|j||�\}}|dk	rg|j|�}|rZ|nd|_|St|�s�tjd|�n|j	||�s�|S|j
tdd||j��d|�|j
|dd�}|j|�}|S(s�
        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.
        s:Did not find branch or tag '%s', assuming revision or ref.tfetchs-qR:Rt
FETCH_HEADN(targ_revR<tAssertionErrorR#tmake_newtbranch_nameRtloggertwarningRUR0Rtto_argstget_revision(R=R&R%R(RRt	is_branch((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytresolve_revision�s&
	
cC@s|s
tS|j|�|kS(s�
        Return whether the current commit hash equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        (R!R_(R=R&tname((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR"�s	cC@s)|j�}tjd||t|��|jtdd||��|jr|j|||�}t|dd�}|dkr�|j
||j�stdd|j��}|j|d|�qq|j|�|krdj
|�}dd|d	|g}|j|d|�qn|j|�dS(
NsCloning %s%s to %sRs-qR[tcheckoutR:s	origin/{}s-bs--track(t
to_displayR\tinfoRR0RRRatgetattrR<R"R^RBRNtupdate_submodules(R$R&R%R(trev_displayR[tcmd_argsttrack_branch((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyt	fetch_news 	cC@s[|jtdd|�d|�tdd|j��}|j|d|�|j|�dS(Ntconfigsremote.origin.urlR:Rcs-q(R0RR^Rg(R$R&R%R(Ri((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytswitchscC@s�|j�td�kr7|jdddgd|�n|jddgd|�|j|||�}tddd|j��}|j|d|�|j|�dS(Ns1.9.0RVs-qs--tagsR:tresets--hard(R8R6R0RaRR^Rg(R$R&R%R(Ri((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytupdate)sc
C@s�|jdddgdddtdtd|�}|j�}y|d	}Wntk
rct�nXx'|D]}|jd
�rk|}PqkqkW|jd�d}|j�S(
s�
        Return URL of the first remote encountered.

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        Rls--get-regexpsremote\..*\.urlR9iR,R-R:isremote.origin.url t (i(	R0R!R1RLt
IndexErrorR
R2R4R;(R=R>tstdouttremotestfound_remotetremoteR%((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_remote_url8s"
	


cC@sJy-|jdddd|gd|dt�Wntk
rAtSXtSdS(sU
        Check if rev is a commit that is available in the local repository.
        s	rev-parses-qs--verifyssha^R:tlog_failed_cmdN(R0R!RR1(R=R>R((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyRTVs
cC@sF|dkrd}n|jd|gdtdtd|�}|j�S(NRs	rev-parseR,R-R:(R<R0R!R1R;(R=R>Rtcurrent_rev((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR_fs		cC@s�|jddgdtdtd|�j�}tjj|�sWtjj||�}ntjjtjj|d��}t	||�S(s~
        Return the path to setup.py, relative to the repo root.
        Return None if setup.py is in the repo root.
        s	rev-parses	--git-dirR,R-R:s..(
R0R!R1R;tosRHtisabsR5tabspathR(R=R>tgit_dirt	repo_root((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_subdirectoryrs!cC@s=t|�\}}}}}|jd�r�|t|jd�� }|tj|�jdd�jd�}|jd�d}	||	 t||	||||f�}nd|krd|ks�t	�|jdd	�}t
t|�j|�\}}
}|jd
d�}n!t
t|�j|�\}}
}||
|fS(s9
        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.
        tfileRCs\t+is://sfile:sgit+s
git+ssh://sssh://R.(
turlsplitRFR3tlstripturllib_requestturl2pathnametreplacetfindt
urlunsplitRYtsuperRtget_url_rev_and_auth(R=R%tschemetnetlocRHtquerytfragmenttinitial_slashestnewpatht
after_plusRt	user_pass((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR��s 
 !!cC@sKtjjtjj|d��s%dS|jdddddgd|�dS(Ns.gitmodulest	submoduleRos--inits--recursives-qR:(RyRHtexistsR5R0(R=R>((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyRg�s
!cC@s�tt|�j|�}|r"|Sy7|jddgd|dtdtdddt�}Wn3tk
r}tjd	|�dSt
k
r�dSXtjj
|jd
��S(Ns	rev-parses--show-toplevelR:R,R-RJtraiseRwsKcould not determine if %s is under git control because git is not availables
(R�Rtget_repository_rootR0R!R1RR\tdebugR<RRyRHtnormpathtrstrip(R=R>tloctr((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR��s$

	
(Rsgit+https	git+httpssgit+sshsgit+gitsgit+file(RRN(t__name__t
__module__Rbtdirnamet	repo_nametschemest
unset_environtdefault_arg_revtstaticmethodRR*R8tclassmethodRBRER#RURaR"RkRmRoRvRTR<R_R~R�RgR�(((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR/s4			
(-			"	(.t
__future__Rtloggingtos.pathRytretpip._vendor.packaging.versionRR6tpip._vendor.six.moves.urllibturllib_parseRR�tpip._internal.exceptionsRRtpip._internal.utils.miscRRtpip._internal.utils.subprocessRtpip._internal.utils.temp_dirRtpip._internal.utils.typingR	t pip._internal.vcs.versioncontrolR
RRR
ttypingRRRRRR�R�t	getLoggerR�R\tcompileRRRtregister(((s9/usr/lib/python2.7/site-packages/pip/_internal/vcs/git.pyt<module>s0"			��
© 2025 GrazzMean