Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/site-packages/pip/_internal/vcs/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/site-packages/pip/_internal/vcs/git.pyc

�
�+^c@@s�ddlmZddlZddlZddlZddlmZddl	mZ
ddl	mZddl
mZddlmZmZddlmZddlmZdd	lmZdd
lmZmZmZmZer!ddlmZmZdd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
BadCommand(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((s=/mingw64/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��Zd�Zd�Zd�Zed��Zedd��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((s=/mingw64/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((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pytis_immutable_rev_checkout>s	cC@svd}|jdgdt�}|j|�rJ|t|�j�d}nd}dj|jd�d �}t|�S(Nsgit version tversiontshow_stdoutitt.i(trun_commandR t
startswithtlentsplittjoint
parse_version(R#tVERSION_PFXR*((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_git_versionOscC@s]dddg}|j|dd	dtd|�}|j�}|jd�rY|td�Sd
S(sl
        Return the current branch, or None if HEAD isn't at a branch
        (e.g. detached HEAD).
        ssymbolic-refs-qRtextra_ok_returncodesiR+tcwdsrefs/heads/(iN(R.R tstripR/R0tNone(tclstlocationtargstoutputtref((s=/mingw64/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+R7N(tendswithRtunpacktpathR.R (R#R;R$ttemp_dir((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyRBqs
c
C@s�|jd|gd|dtdd�}i}xc|j�j�D]O}y|j�\}}Wn&tk
r�tdj|���nX|||<q@Wdj|�}dj|�}	|j|�}|d	k	r�|t	fS|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-refR7R+t
on_returncodetignoresunexpected show-ref line: {!r}srefs/remotes/origin/{}srefs/tags/{}N(
R.R R8t
splitlinesR1t
ValueErrortformattgetR9tTrue(
R:R%RR=trefstlineRR>t
branch_refttag_ref((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR"~s 

cC@s�|j}|dk	st�|j||�\}}|dk	rg|j|�}|rZ|nd|_|St|�s�tjd|�n|j	d�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.srefs/tfetchs-qR7Rt
FETCH_HEADN(targ_revR9tAssertionErrorR"tmake_newtbranch_nameRtloggertwarningR/R.Rtto_argstget_revision(R:R%R$R'RRt	is_branch((s=/mingw64/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((s=/mingw64/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-qRWtcheckoutR7s	origin/{}s-bs--track(t
to_displayRXtinfoRR.RRR]tgetattrR9R!RZR?RKtupdate_submodules(R#R%R$R'trev_displayRWtcmd_argsttrack_branch((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyt	fetch_new�s 	cC@s[|jtdd|�d|�tdd|j��}|j|d|�|j|�dS(Ntconfigsremote.origin.urlR7R_s-q(R.RRZRc(R#R%R$R'Re((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pytswitch�scC@s�|j�td�kr7|jdddgd|�n|jddgd|�|j|||�}tddd|j��}|j|d|�|j|�dS(Ns1.9.0RRs-qs--tagsR7tresets--hard(R5R3R.R]RRZRc(R#R%R$R'Re((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pytupdatescC@s�|jdddgdddtd|�}|j�}y|d}Wntk
r]t�nXx'|D]}|jd	�re|}PqeqeW|jd
�d}|j�S(s�
        Return URL of the first remote encountered.

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        Rhs--get-regexpsremote\..*\.urlR6iR+R7isremote.origin.url t (i(R.R RIt
IndexErrorR	R/R1R8(R:R;tstdouttremotestfound_remotetremoteR$((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_remote_urls



cC@s@|dkrd}n|jd|gdtd|�}|j�S(NRs	rev-parseR+R7(R9R.R R8(R:R;Rtcurrent_rev((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR[0s
	cC@s|jddgdtd|�j�}tjj|�sQtjj||�}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+R7s..(	R.R R8tosREtisabsR2tabspathR(R:R;tgit_dirt	repo_root((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pytget_subdirectory9s!cC@sXt|�\}}}}}|jd�r�|t|jd�� }|tj|�jdd�jd�}t|||||f�}|jd�d}	||	 t||	||||f�}nd|kr*d|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.
        tfileR@s\t+is://sfile:sgit+s
git+ssh://sssh://R,(
turlsplitRCR0tlstripturllib_requestturl2pathnametreplacet
urlunsplittfindRUtsuperRtget_url_rev_and_auth(R:R$tschemetnetlocREtquerytfragmenttinitial_slashestnewpatht
after_plusRt	user_pass((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR�Hs"
 !!cC@sKtjjtjj|d��s%dS|jdddddgd|�dS(Ns.gitmodulest	submoduleRks--inits--recursives-qR7(RtREtexistsR2R.(R:R;((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyRcks
!c
C@sxtt|�j|�rtSy3|jdgd|dtdddt�}|SWn"tk
rstjd|�tSXdS(Ns	rev-parseR7R+RGRHtlog_failed_cmdsKcould not determine if %s is under git control because git is not available(	R�Rtcontrols_locationRMR.R RRXtdebug(R:R;tr((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR�ts		
	(Rsgit+https	git+httpssgit+sshsgit+gitsgit+file(RRN(t__name__t
__module__R^tdirnamet	repo_nametschemest
unset_environtdefault_arg_revtstaticmethodRR)R5tclassmethodR?RBR"R]R!RgRiRkRrR9R[RyR�RcR�(((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyR.s0		
	
#-			#	(-t
__future__Rtloggingtos.pathRttretpip._vendor.packaging.versionRR3tpip._vendor.six.moves.urllibturllib_parseRR~tpip._internal.exceptionsRtpip._internal.utils.miscRRtpip._internal.utils.subprocessRtpip._internal.utils.temp_dirRtpip._internal.utils.typingRt pip._internal.vcs.versioncontrolR	R
RRttypingR
RRRRR|R�t	getLoggerR�RXtcompileRRRtregister(((s=/mingw64/lib/python2.7/site-packages/pip/_internal/vcs/git.pyt<module>s0"			�X