File "git.cpython-33.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/__pycache__/git.cpython-33.pyc
File size: 9.26 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


7Rec@sddlZddlZddlZddlmZddlmZmZddlm	Z	m
Z
ddlmZddl
mZmZejZejZGddde
Ze	jedS(	iN(ucall_subprocess(udisplay_pathurmtree(uvcsuVersionControl(ulogger(uurl2pathnameuurlparsecs|EeZdZdZdZdZd%Zd	Zd
Zd&fddZ
d
dZddZddZ
ddZddZddZddZddZddZdd Zfd!d"Zd#d$ZS('uGitugitu.gitucloneugit+httpu	git+httpsugit+sshugit+gitugit+fileu
git-clone.txtus# This was a Git repo; to make it a repo again run:
git init
git remote add origin %(url)s -f
git checkout %(rev)s
cs|rt|\}}}}}|jdr|dt|jd}	|	t|jddjd}
t|||
||f}|jdd}|d|t||d||
||f}qntt	|j
|||dS(Nufileu/u\u+i(uurlsplituendswithulenulstripuurl2pathnameureplaceu
urlunsplitufindusuperuGitu__init__(uselfuurluargsukwargsuschemeunetlocupathuqueryufragmentuinitial_slashesunewpathu
after_plus(u	__class__(u$/tmp/pip-zej_zi-build/pip/vcs/git.pyu__init__s %9uGit.__init__cCsd}}x|jD]}|js|jjdrEqntjd|}|ru|jdj}ntjd|}|r|jdj}n|r|r||fSqWdS(Nu#u$git\s*remote\s*add\s*origin(.*)\s*-fiu^git\s*checkout\s*-q\s*(.*)\s*(NN(uNoneu
splitlinesustripu
startswithureusearchugroup(uselfucontentuurlurevulineu	url_matchu	rev_match((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuparse_vcs_bundle_file%s
"uGit.parse_vcs_bundle_filecCstjdd}|j|zT|jds>|d}nt|jdddd|gd|jd	dd
|Wdt|XdS(
u@Export the Git repository at the url to the destination locationu-exportupip-u/ucheckout-indexu-au-fu--prefixu
filter_stdoutushow_stdoutucwdNF(	utempfileumkdtempuunpackuendswithucall_subprocessucmdu_filteruFalseurmtree(uselfulocationutemp_dir((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuexport4s

u
Git.exportcCs`|j|}d|}||kr0||gS||krG||gStjd||SdS(uCheck the revision options before checkout to compensate that tags
        and branches may need origin/ as a prefix.
        Returns the SHA1 of the branch or tag if found.
        u	origin/%su5Could not find a tag or branch '%s', assuming commit.N(uget_refsuloggeruwarn(uselfurevudesturev_optionsu	revisionsu
origin_rev((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyucheck_rev_optionsAs
uGit.check_rev_optionscCsPt|jdd|gd|t|jddg|d||j|dS(Nuconfiguremote.origin.urlucwducheckoutu-q(ucall_subprocessucmduupdate_submodules(uselfudestuurlurev_options((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuswitchSs
u
Git.switchcCsrt|jddgd||r>|j|d||}nt|jdddg|d||j|dS(Nufetchu-qucwdiuresetu--hard(ucall_subprocessucmducheck_rev_optionsuupdate_submodules(uselfudesturev_options((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuupdate[s
#u
Git.updatecCs|j\}}|r.|g}d|}ndg}d}|j||||rtjd||t|ft|jdd||g|j||r|j|||}|j	|j
|dst|jddg|d	|qqndS(
Nu (to %s)u
origin/masteruuCloning %s%s to %sucloneu-qiucheckoutucwd(uget_url_revucheck_destinationuloggerunotifyudisplay_pathucall_subprocessucmduupdate_submodulesucheck_rev_optionsuget_revisionu
startswith(uselfudestuurlurevurev_optionsurev_display((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuobtaines	
	 
u
Git.obtaincCs.t|jddgddd|}|jS(Nuconfiguremote.origin.urlushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationuurl((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_urlxsuGit.get_urlcCs.t|jddgddd|}|jS(Nu	rev-parseuHEADushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationucurrent_rev((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_revision~s!uGit.get_revisioncCs	t|jdgdd
d|}i}x|jjD]}|jdd\}}|j}d}|jdr|tdd}nP|jdr|tdd}n(|jd	r|td	d}n|dk	r:|j||<q:q:W|S(u=Return map of named refs (branches or tags) to commit hashes.ushow-refushow_stdoutucwdu iu
refs/remotes/Nurefs/heads/u
refs/tags/F(	ucall_subprocessucmduFalseustripu
splitlinesusplituNoneu
startswithulen(uselfulocationuoutputurvulineucommiturefuref_name((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_refss uGit.get_refsc
Cs|j|}|jjds1d|}n|jjddd}|sWdS|j|}|j|}tdd|j	D}||krd|||f}	n
d	|}	d
|||	fS(Nugit:ugit+u-iicss!|]\}}||fVqdS(N((u.0urefucommit((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyu	<genexpr>su*Git.get_src_requirement.<locals>.<genexpr>u%s-%su%s-devu%s@%s#egg=%s(
uget_urluloweru
startswithuegg_nameusplituNoneuget_revisionuget_refsudictuitems(
uselfudistulocationu	find_tagsurepouegg_project_nameucurrent_revurefsunames_by_commitu
full_egg_name((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_src_requirements

uGit.get_src_requirementcsd|jkrld|jks$t|jjdd|_tt|j\}}|jdd}ntt|j\}}||fS(u;
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes doesn'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.
        u://ufile:ugit+u
git+ssh://ussh://u(uurluAssertionErrorureplaceusuperuGituget_url_rev(uselfuurlurev(u	__class__(u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_url_revsuGit.get_url_revcCsNtjjtjj|ds%dSt|jdddddgd|dS(Nu.gitmodulesu	submoduleuupdateu--initu--recursiveu-qucwd(uosupathuexistsujoinucall_subprocessucmd(uselfulocation((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuupdate_submoduless!uGit.update_submodules(ugitugit+httpu	git+httpsugit+sshugit+gitugit+fileN(u__name__u
__module__u__qualname__unameudirnameu	repo_nameuschemesubundle_fileuguideuNoneu__init__uparse_vcs_bundle_fileuexportucheck_rev_optionsuswitchuupdateuobtainuget_urluget_revisionuget_refsuget_src_requirementuget_url_revuupdate_submodules(u
__locals__((u	__class__u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuGit
s&

uGit(utempfileureuos.pathuosupip.utilucall_subprocessudisplay_pathurmtreeupip.vcsuvcsuVersionControlupip.loguloggerupip.backwardcompatuurl2pathnameuurlparseuurlsplitu
urlunsplituGituregister(((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyu<module>s