????

Your IP : 216.73.216.152


Current Path : /usr/lib/python2.7/site-packages/pip/_internal/vcs/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyc

�
}�\]c@@s9ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZmZejd�Zejd�Zejd	�Zejd
�Ze
rddlmZmZmZddlmZneje�Zd
efd��YZeje�dS(i(tabsolute_importN(t
indent_log(tdisplay_pathtrmtreetsplit_auth_from_netloc(tMYPY_CHECK_RUNNING(tVersionControltvcss
url="([^"]+)"scommitted-rev="(\d+)"s\s*revision="(\d+)"s<url>(.*)</url>(tListtOptionaltTuple(t
RevOptionst
SubversioncB@s�eZdZdZdZdZed��Zed��Z	ed	��Z
ed
��Zed��Zed��Z
ed
��Zed��Zed��Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(tsvns.svntcheckoutssvn+sshssvn+https	svn+httpsssvn+svncC@stS(N(tTrue(tclst
remote_url((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytshould_add_vcs_url_prefix"scC@s
d|gS(Ns-r((trev((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytget_base_rev_args&sc	C@s�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
        itentriest/(
tostwalktdirnametremovetpathtjointexistst_get_svn_url_revt
startswithtmax(	Rtlocationtrevisiontbasetdirstfilest
entries_fntdirurltlocalrev((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytget_revision*s"
cC@s/|dkr%tt|�j||�St|�S(s�
        This override allows the auth information to be passed to svn via the
        --username and --password options instead of via the URL.
        tssh(tsuperRtget_netloc_and_authR(Rtnetloctscheme((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyR,FscC@sJtt|�j|�\}}}|jd�r=d|}n|||fS(Nsssh://ssvn+(R+Rtget_url_rev_and_authR(RturlRt	user_pass((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyR/Ss!
cC@s<g}|r|d|g7}n|r8|d|g7}n|S(Ns
--usernames
--password((tusernametpasswordt
extra_args((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyt
make_rev_args[scC@sw|}x]tjjtjj|d��se|}tjj|�}||kr	tjd|�dSq	W|j|�dS(Nssetup.pysGCould not find setup.py for directory %s (tried all parent directories)i(	RRRRRtloggertwarningtNoneR(RR!t
orig_locationt
last_location((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytget_remote_urles$c
	C@sIddlm}tjj||jd�}tjj|�rat|��}|j�}WdQXnd}|j	d�s�|j	d�s�|j	d�rt
ttj
|jd���}|dd=|dd	}g|D]2}t|�d
kr�|d
r�t|d
�^q�dg}n
|j	d�r�tj|�}	|	sNtd|��n|	jd
�}gtj|�D]}
t|
jd
��^qmdg}n�yk|jdd|gdt�}tj|�jd
�}gtj|�D]}
t|
jd
��^q�}Wn|k
r#dg}}nX|r9t|�}nd}||fS(Ni(tInstallationErrorRtt8t9t10s

ii	s<?xmlsBadly formatted data: %ritinfos--xmltshow_stdout(tpip._internal.exceptionsR<RRRRRtopentreadRtlisttmaptstrt
splitlinestsplittlentintt_svn_xml_url_retsearcht
ValueErrortgroupt_svn_rev_retfinditertrun_commandtFalset_svn_info_xml_url_ret_svn_info_xml_rev_reR8R (
RR!R<tentries_pathtftdataR0tdtrevstmatchtmtxmlR((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyRzs>!I;	5
cC@stS(s&Always assume the versions don't match(RT(Rtdesttname((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytis_commit_id_equal�scC@sG|dkrtjj�}n||_d|_tt|�j�dS(N(	R8tsyststdintisattytuse_interactivet_vcs_versionR+Rt__init__(tselfRe((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyRg�s
		cC@s�d}|jdgdt�}|j|�s1dS|t|�j�d}|jd�}yttt|��}Wntk
r�dSX|S(sQuery the version of the currently installed Subversion client.

        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        s
svn, version s	--versionRBit.(((	RSRTRRKRJttupleRGRLRO(Rhtversion_prefixtversiontversion_listtparsed_version((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytcall_vcs_version�s

cC@s/|jdk	r|jS|j�}||_|S(s�Return the version of the currently installed Subversion client.

        If the version of the Subversion client has already been queried,
        a cached value will be used.

        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        N(RfR8Ro(Rhtvcs_version((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytget_vcs_version�s
	cC@s3|jsdgS|j�}|dkr/dgSgS(sXReturn options to be used on calls to Subversion that contact the server.

        These options are applicable for the following ``svn`` subcommands used
        in this class.

            - checkout
            - export
            - switch
            - update

        :return: A list of command line arguments to pass to ``svn``.
        s--non-interactiveiis--force-interactive(ii(ReRq(Rhtsvn_version((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pytget_remote_call_options�s		cC@s�|j|�\}}tjd||�t��^tjj|�rQt|�ndg|j�|j	�||g}|j
|dt�WdQXdS(s@Export the svn repository at the url to the destination locations!Exporting svn repository %s to %stexportRBN(tget_url_rev_optionsR6RARRRRRRstto_argsRSRT(RhR!R0trev_optionstcmd_args((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyRts

'cC@sc|j�}tjd||t|��ddg|j�|j�||g}|j|�dS(NsChecking out %s%s to %sRs-q(t
to_displayR6RARRsRvRS(RhR_R0Rwtrev_displayRx((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyt	fetch_news
*cC@s8dg|j�|j�||g}|j|�dS(Ntswitch(RsRvRS(RhR_R0RwRx((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyR|-s'cC@s5dg|j�|j�|g}|j|�dS(Ntupdate(RsRvRS(RhR_R0RwRx((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyR}3s$(ssvnssvn+sshssvn+https	svn+httpsssvn+svnN(t__name__t
__module__R`Rt	repo_nametschemestclassmethodRtstaticmethodRR)R,R/R5R;RRaR8RgRoRqRsRtR{R|R}(((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyRs*

2			!			( t
__future__RtloggingRtreRbtpip._internal.utils.loggingRtpip._internal.utils.miscRRRtpip._internal.utils.typingRt pip._internal.vcs.versioncontrolRRtcompileRMRQRVRUttypingRR	R
Rt	getLoggerR~R6Rtregister(((s;/tmp/pip-install-ewDPok/pip/pip/_internal/vcs/subversion.pyt<module>s&�