ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/vcs/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pyo

�
�2{Yc@s�ddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZdefd	��YZeje�dS(
i����N(tcall_subprocess(tdisplay_pathtrmtree(tlogger(tvcstVersionControl(tpath_to_url(tConfigParsert	MercurialcBs�eZdZdZdZdZdZdZd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�ZRS(thgs.hgtcloneshg+httpshg+httpsshg+sshshg+static-httpshg-clone.txtsg# This was a Mercurial repo; to make it a repo again run:
hg init
hg pull %(url)s
hg update -r %(rev)s
cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}ntjd|�}|r�|jd�j�}n|r|r||fSqWdS(Nt#shg\s*pull\s*(.*)\s*is^hg\s*update\s*-r\s*(.*)\s*(NN(tNonet
splitlineststript
startswithtretsearchtgroup(tselftcontentturltrevtlinet	url_matcht	rev_match((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytparse_vcs_bundle_files
"cCs`tjdd�}|j|�z/t|jd|gd|jdtd|�Wdt|�XdS(s?Export the Hg repository at the url to the destination locations-exportspip-tarchivet
filter_stdouttshow_stdouttcwdN(ttempfiletmkdtemptunpackRtcmdt_filtertFalseR(Rtlocationttemp_dir((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytexport%s
cCs�tjj||jd�}tj�}yJ|j|�|jdd|�t|d�}|j	|�|j
�WnAttjfk
r�t
j�d}tjd||f�n!Xt|jddg|d	|�dS(
Nthgrctpathstdefaulttwis/Could not switch Mercurial repository to %s: %stupdates-qR(tostpathtjointdirnameRtSafeConfigParsertreadtsettopentwritetclosetOSErrortNoSectionErrortsystexc_infoRtwarnRR"(RtdestRtrev_optionstrepo_configtconfigtconfig_filete((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytswitch0s

cCs@t|jddgd|�t|jddg|d|�dS(Ntpulls-qRR,(RR"(RR<R=((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pyR,AscCs�|j�\}}|r.|g}d|}ng}d}|j||||�r�tjd||t|�f�t|jddd||g�t|jddg|d|�ndS(	Ns (to revision %s)tsCloning hg %s%s to %sR
s
--noupdates-qR,R(tget_url_revtcheck_destinationRtnotifyRRR"(RR<RRR=trev_display((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytobtainFs	
	cCsRt|jddgdtd|�j�}|j|�rHt|�}n|j�S(Nt
showconfigs
paths.defaultRR(RR"R$Rt_is_local_repositoryR(RR%R((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytget_urlTscCs�t|jdgdtd|�}g}x{|j�D]m}tjd|�}|r4|jd�}|jd�}d|kr�|j|j�|j�f�q�q4q4Wt	|�S(NttagsRRs([\w\d\.-]+)\s*([\d]+):.*$iittip(
RR"R$R
RRRtappendRtdict(RR%RMttag_revsRt
tags_matchttagR((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytget_tag_revs\s)cCs�t|jdgdtd|�}g}x{|j�D]m}tjd|�}|r4|jd�}|jd�}d|kr�|j|j�|j�f�q�q4q4Wt	|�S(NtbranchesRRs([\w\d\.-]+)\s*([\d]+):.*$iiR*(
RR"R$R
RRRRORRP(RR%RUtbranch_revsRtbranches_matchtbranchR((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytget_branch_revsis)cCs.t|jddgdtd|�j�}|S(Ntparentss--template={rev}RR(RR"R$R(RR%tcurrent_revision((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytget_revisionvscCs.t|jddgdtd|�j�}|S(NRZs--template={node}RR(RR"R$R(RR%tcurrent_rev_hash((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytget_revision_hash|scCs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}|j|�}|j	|�}	||kr�d|||f}
n-||	kr�d||	|f}
n
d|}
d|||
fS(	Nshg:shg+t-iis%s-%ss%s-devs%s@%s#egg=%s(
RLtlowerRtegg_nametsplitRR\R^RTRY(RtdistR%t	find_tagstrepotegg_project_nametcurrent_revR]RQRVt
full_egg_name((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pytget_src_requirement�s 

(R	shg+httpshg+httpsshg+sshshg+static-http(t__name__t
__module__tnameR0t	repo_nametschemestbundle_filetguideRR'RBR,RIRLRTRYR\R^Ri(((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pyR
s"							
	
		(R-RRR9tpip.utilRRRtpip.logRtpip.vcsRRtpip.downloadRtpip.backwardcompatRRtregister(((sB/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/mercurial.pyt<module>s�

Zerion Mini Shell 1.0