ok

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyc

�
x�_c@@scddlmZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZmZejd�Zejd	�Zejd
�Zejd�Zer-ddlmZmZdd
lmZddlmZddlmZmZneje �Z!defd��YZ"ej#e"�dS(i(tabsolute_importN(t
indent_log(tdisplay_pathtis_console_interactivetrmtreetsplit_auth_from_netloc(tmake_command(tMYPY_CHECK_RUNNING(tVersionControltvcss
url="([^"]+)"scommitted-rev="(\d+)"s\s*revision="(\d+)"s<url>(.*)</url>(tOptionaltTuple(tCommandArgs(t
HiddenText(tAuthInfot
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((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pytshould_add_vcs_url_prefix+scC@s
d|gS(Ns-r((trev((sM/opt/alt/python27/lib/python2.7/site-packages/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(	Rtlocationtrevisiontbasetdirst_t
entries_fntdirurltlocalrev((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pytget_revision3s"
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(tsuperRtget_netloc_and_authR(Rtnetloctscheme((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyR0OscC@sJtt|�j|�\}}}|jd�r=d|}n|||fS(Nsssh://ssvn+(R/Rtget_url_rev_and_authR#(RturlRt	user_pass((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyR3\s!
cC@s<g}|r|d|g7}n|r8|d|g7}n|S(Ns
--usernames
--password((tusernametpasswordt
extra_args((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyt
make_rev_argses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(	RRR!R RtloggertwarningtNoneR"(RR%t
orig_locationt
last_location((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pytget_remote_urlps$c
	C@sKddlm}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|�}	|	sVtdjt����n|	jd
�}gtj|�D]}
t|
jd
��^qudg}n�ye|jdd|g�}tj|�jd
�}gtj|�D]}
t|
jd
��^q�}Wn|k
r%dg}}nX|r;t|�}nd}||fS(Ni(tSubProcessErrorRtt8t9t10s

ii	s<?xmlsBadly formatted data: {data!r}itinfos--xml(tpip._internal.exceptionsR@RRR RR!topentreadR#tlisttmaptstrt
splitlinestsplittlentintt_svn_xml_url_retsearcht
ValueErrortformattlocalstgroupt_svn_rev_retfinditertrun_commandt_svn_info_xml_url_ret_svn_info_xml_rev_reR<R$(
RR%R@tentries_pathtftdataR4tdtrevstmatchtmtxmlR((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyR"�s>!I;5
cC@stS(s&Always assume the versions don't match(tFalse(Rtdesttname((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pytis_commit_id_equal�scC@sA|dkrt�}n||_d|_tt|�j�dS(N(R<Rtuse_interactivet_vcs_versionR/Rt__init__(tselfRg((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyRi�s
		cC@s�d}|jdg�}|j|�s+dS|t|�j�d}|jd�djd�}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	--versionit-t.(((	RXR#RNRMt	partitionttupleRJRORR(Rjtversion_prefixtversiontversion_listtparsed_version((sM/opt/alt/python27/lib/python2.7/site-packages/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(RhR<Rs(Rjtvcs_version((sM/opt/alt/python27/lib/python2.7/site-packages/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(RgRu(Rjtsvn_version((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pytget_remote_call_options�s		c
C@s�|j|�\}}tjd||�t��Utjj|�rQt|�ntd|j	�|j
�||�}|j|�WdQXdS(s@Export the svn repository at the url to the destination locations!Exporting svn repository %s to %stexportN(tget_url_rev_optionsR:RERRRR!RRRwtto_argsRX(RjR%R4trev_optionstcmd_args((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyRxs

cC@s`|j�}tjd||t|��tdd|j�|j�||�}|j|�dS(NsChecking out %s%s to %sRs-q(t
to_displayR:RERRRwRzRX(RjRdR4R{trev_displayR|((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyt	fetch_new0s
cC@s5td|j�|j�||�}|j|�dS(Ntswitch(RRwRzRX(RjRdR4R{R|((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyR�?scC@s2td|j�|j�|�}|j|�dS(Ntupdate(RRwRzRX(RjRdR4R{R|((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyR�Gs	(Rssvn+sshssvn+https	svn+httpsssvn+svnN(t__name__t
__module__ReRt	repo_nametschemestclassmethodRtstaticmethodRR-R0R3R9R?R"RfR<RiRsRuRwRxRR�R�(((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyR%s*
	2			!			($t
__future__RtloggingRtretpip._internal.utils.loggingRtpip._internal.utils.miscRRRRtpip._internal.utils.subprocessRtpip._internal.utils.typingRt pip._internal.vcs.versioncontrolRR	tcompileRPRVRZRYttypingR
RRR
RRt	getLoggerR�R:Rtregister(((sM/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/subversion.pyt<module>s*"�,

Zerion Mini Shell 1.0