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/subversion.pyc

�
�2{Yc@sddlZddlZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZejd�Zejd�Zejd	�Zejd
�Zejd�Zejd�Zd
efd��YZd�Ze
je�dS(i����N(turlparse(tLink(trmtreetdisplay_pathtcall_subprocess(tlogger(tvcstVersionControls
url="([^"]+)"scommitted-rev="(\d+)"s	URL: (.+)sRevision: (.+)s\s*revision="(\d+)"s<url>(.*)</url>t
SubversioncBs�eZdZdZdZdZdZdZd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zed�ZRS(tsvns.svntcheckoutssvn+sshssvn+https	svn+httpsssvn+svnssvn-checkout.txtsg# This was an svn checkout; to make it a checkout again run:
svn checkout --force -r %(rev)s %(url)s .
cCs|jd�j|j�s,td|��t|jd|gdtdidd6�}tj|�}|s�t	j
dt|��t	jd	|�d
S|jd
�j�}tj|�}|s�t	j
dt|��t	jd	|�|dfS||jd
�fS(s/Returns (url, revision), where both are stringst/sBad directory: %stinfotshow_stdoutt
extra_environtCtLANGs'Cannot determine URL of svn checkout %ss!Output that cannot be parsed: 
%sis,Cannot determine revision of svn checkout %sN(NN(trstriptendswithtdirnametAssertionErrorRtcmdtFalset_svn_url_retsearchRtwarnRRtNonetgrouptstript_svn_revision_re(tselftlocationtoutputtmatchturl((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytget_infos,(
cCs�x�|j�D]�}|j�s
|j�jd�r;q
ntjd|�}|sWdS|jd�}||j�j�jdd�d}||fSWdS(Nt#s
^-r\s*([^ ])?ii(NN(NN(	t
splitlinesRt
startswithtreRRRtendtsplit(RtcontenttlineR!trevtrest((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytparse_vcs_bundle_file,s"&cCs�|j�\}}t||�}tjd||f�tjd7_zStjj|�rit|�nt	|j
dg|||gd|jdt�Wdtjd8_XdS(s@Export the svn repository at the url to the destination locations!Exporting svn repository %s to %sitexportt
filter_stdoutR
N(
tget_url_revtget_rev_optionsRtnotifytindenttostpathtexistsRRRt_filterR(RRR"R,trev_options((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyR/8s
cCs%t|jdg|||g�dS(Ntswitch(RR(RtdestR"R9((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyR:IscCs"t|jdg||g�dS(Ntupdate(RR(RR;R9((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyR<MscCs�|j�\}}t||�}|r4d|}nd}|j||||�r�tjd||t|�f�t|jddg|||g�ndS(Ns (to revision %s)tsChecking out %s%s to %sR
s-q(R1R2tcheck_destinationRR3RRR(RR;R"R,R9trev_display((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytobtainQs
	cCs�x�|D]{}t|�j}|s(qnd|krYdj|jd�d �j�}n|}||jkr|jdd�dSqWdS(Nt-i����R$ii(Rtegg_fragmenttjoinR)tlowertkeyR(Rtdisttdependency_linksR"RBRE((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytget_location^s
%c
Cs�d}x�tj|�D]�\}}}|j|krAg|(qn|j|j�tjj||jd�}tjj|�s�qn|j|�\}}||kr�|d}	n$|s�|j|	�r�g|(qnt	||�}qW|S(sR
        Return the maximum revision for all files under a given location
        itentriesR(
R5twalkRtremoveR6RCR7t_get_svn_url_revR&tmax(
RRtrevisiontbasetdirstfilest
entries_fntdirurltlocalrevtbase_url((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytget_revisionls"
cCsAtt|�j�\}}|jd�r7d|}n||fS(Nsssh://ssvn+(tsuperRR1R&(RR"R,((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyR1�s
cCsx|}x^tjjtjj|d��sf|}tjj|�}||kr	tjd|�dSq	W|j|�dS(Nssetup.pysGCould not find setup.py for directory %s (tried all parent directories)i(	R5R6R7RCRRRRRL(RRt
orig_locationt
last_location((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytget_url�s$	cCs,ddlm}ttjj||jd��}|j�}|j�|j	d�st|j	d�st|j	d�r�t
ttj
|jd���}|dd=|dd	}g|D]2}t|�d
kr�|d
r�t|d
�^q�dg}n|j	d�rxtj|�}|s.td|��n|jd
�}gtj|�D]}	t|	jd
��^qMdg}n�ynt|jdd|gdt�}
tj|
�jd
�}gtj|
�D]}	t|	jd
��^q�}Wn|k
rdg}}nX|rt|�}nd}||fS(Ni����(tInstallationErrorRIt8t9t10s

iii	s<?xmlsBadly formatted data: %riRs--xmlR
(tpip.exceptionsR[topenR5R6RCRtreadtcloseR&tlisttmaptstrR%R)tlentintt_svn_xml_url_reRt
ValueErrorRt_svn_rev_retfinditerRRRt_svn_info_xml_url_ret_svn_info_xml_rev_reRRM(RRR[tftdataR"tdtrevsR!tmtxmlR,((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyRL�s2!
-!I;!5
cCs�t|jdd|gdt�}g}xV|j�D]H}|j�}t|d�}|djd�}|j||f�q4W|S(Ntlss-vR
ii����R(RRRR%R)RgRtappend(Rtsvn_tag_urltstdouttresultsR+tpartsR,ttag((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytget_tag_revs�scCsZd}d}xG|D]?\}}||kr|dksC||kr|}|}qqW|S(N(R(RR,ttag_revstbest_match_revtbest_tagRzttag_rev((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytfind_tag_match�s
cCs�|j|�}|dkrdS|jd�}|j�jdd�d}|j|�}|ddkr�d||d	f}n�|ddkr�d|j�|d	|f}n�|d	d
krTd|j�|f}|rudj|d	 �d}	|j|	�}
|j||
�}|rQtj	d|�d|	|f}d||f}qQqun!tj
d|�d||f}d|||fS(NRRAiii����ttagsRzs%s-%si����tbranchestbranchs	%s-%s-r%sttrunks
%s-dev_r%ss/tagss2trunk checkout %s seems to be equivalent to tag %ss%s/%ss?svn URL does not fit normal structure (tags/branches/trunk): %sssvn+%s@%s#egg=%s(R�stag(R�sbranch(RZRR)tegg_nameRVRCR{R�RR3R(RRFRt	find_tagstrepoRytegg_project_nameR,t
full_egg_namettag_urlR|R!((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pytget_src_requirement�s. (R	ssvn+sshssvn+https	svn+httpsssvn+svn(t__name__t
__module__tnameRt	repo_nametschemestbundle_filetguideR#R.R/R:R<R@RHRVR1RZRLR{R�RR�(((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyRs(						
					!		cCs�|rd|g}ng}tj|�}t|d�rO|j|j}}nl|d}d|kr�|jd�d}d|kr�|jdd�\}}q�|d}}nd	\}}|r�|d|g7}n|r�|d|g7}n|S(
Ns-rtusernameit@it:s
--usernames
--password(NN(RturlsplitthasattrR�tpasswordR)R(R"R,R9trR�R�tnetloctauth((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyR2�s$
(R5R'tpip.backwardcompatRt	pip.indexRtpip.utilRRRtpip.logRtpip.vcsRRtcompileRhRjRRRmRlRR2tregister(((sC/opt/alt/python33/lib/python3.3/site-packages/pip/vcs/subversion.pyt<module>s�	

Zerion Mini Shell 1.0