ó œ0{Yc@sºdZddlZddlZddlmZmZddlmZddlm Z m Z m Z m Z m Z ddgZdefd „ƒYZeƒZd efd „ƒYZd „ZdS( s)Handles all VCS (version control) supportiÿÿÿÿN(turlparseturllib(tlogger(t display_patht backup_dirt find_commandtrmtreetask_path_existstvcstget_src_requirementt VcsSupportcBs˜eZiZddddddgZd„Zd„Zed„ƒZed „ƒZed „ƒZ d „Z ddd „Z d „Z d„Zd„ZRS(tsshtgitthgtbzrtsftptsvncCsRtjj|jƒttddƒr;tjj|jƒntt|ƒj ƒdS(Nt uses_fragment( Rt uses_netloctextendtschemestgetattrtNoneRtsuperR t__init__(tself((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyRscCs |jjƒS(N(t _registryt__iter__(R((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyRscCst|jjƒƒS(N(tlistRtvalues(R((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytbackendsscCsg|jD]}|j^q S(N(Rtdirname(Rtbackend((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytdirnames"scCs.g}x!|jD]}|j|jƒqW|S(N(RRR(RRR ((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyt all_schemes&scCsPt|dƒs'tjd|jƒdS|j|jkrL||j|j+://, e.g. svn+http://myrepo/svn/MyApp#egg=MyAppt+it@R7N(R8tsplitRturlsplitRtrsplitt urlunsplit( Rt error_messageR8tschemetnetlocR+tquerytfragtrev((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyt get_url_revss cCs|j|ƒ|j|ƒfS(sA Returns (url, revision), where both are strings (tget_urlt get_revision(RR.((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytget_info…scCstj|ƒjdƒS(sa Normalize a URL for comparison by unquoting it and removing any trailing slash. t/(Rtunquotetrstrip(RR8((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyt normalize_urlŒscCs|j|ƒ|j|ƒkS(sV Compare two repo URLs for identity, ignoring incidental differences. (R\(Rturl1turl2((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyt compare_urls’scCs t‚dS(sÌ Takes the contents of the bundled text file that explains how to revert the stripped off version control data of the given package and returns the URL and revision of it. N(tNotImplementedError(Rtcontent((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytparse_vcs_bundle_file˜scCs t‚dS(sx Called when installing or updating an editable package, takes the source path of the checkout. N(R`(Rtdest((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytobtain scCs t‚dS(sB Switch the repo at ``dest`` to point to ``URL``. N(tNotImplemented(RRcR8t rev_options((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytswitch§scCs t‚dS(sO Update an already-existing repo to the given ``rev_options``. N(R`(RRcRf((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytupdate­sc CsLt}t}tjj|ƒr/t}tjjtjj||jƒƒr|j|ƒ}|j||ƒrÈt j d|j j ƒt |ƒ|fƒt jdt |ƒ|j |fƒ|j||ƒq,t jd|j|j t |ƒ|fƒddf}q/t jd ||j|j fƒd df}n|rHt jd |j|fƒtd |d |dƒ}|dkr²t jd|j t |ƒ||fƒ|j|||ƒqH|dkrÁqH|dkr÷t jdt |ƒƒt|ƒt}qH|dkrHt|ƒ} t jdt |ƒ| fƒtj|| ƒt}qHn|S(s­ Prepare a location to receive a checkout/clone. Return True if the location is ready for (and requires) a checkout/clone, False otherwise. s)%s in %s exists, and has correct URL (%s)sUpdating %s %s%ss%s %s in %s exists with URL %ss%(s)witch, (i)gnore, (w)ipe, (b)ackup tstitwtbs0Directory %s already exists, and is not a %s %s.s(i)gnore, (w)ipe, (b)ackup s+The plan is to install the %s repository %ssWhat to do? %siisSwitching %s %s to %s%ss Deleting %ssBacking up %s to %s(RiRjRkRl(RjRkRl(tTruetFalseR*R+R-R,RRVR_RRFt repo_namettitleRtnotifyRhR%R#RRgRRtshutiltmove( RRcR8Rft rev_displaytcheckouttpromptt existing_urltresponsetdest_dir((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytcheck_destination³sZ$                     cCs0tjj|ƒrt|ƒn|j|ƒdS(N(R*R+R-RRd(RR.((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pytunpackís cCs t‚dS(N(R`(RtdistR.t find_tags((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyR òsN(R&R4R#RRRR>RER5RHRURXR\R_RbRdRgRhRzR{RnR (((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyR6Vs"            : cCsFtj|ƒ}|r+|ƒj|||ƒStjd|ƒ|jƒS(Nstcannot determine version of editable source in %s (is not SVN checkout, Git clone, Mercurial clone or Bazaar branch)(RR3R RR%tas_requirement(R|R.R}tversion_control((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyR ös (t__doc__R*Rrtpip.backwardcompatRRtpip.logRtpip.utilRRRRRt__all__tobjectR RR6R (((sA/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__init__.pyts  ( D