Ñò 9ÕÒTc @@sØddklZddkZddkZddkZddklZddkl Z ddk l Z ddk l Z lZddklZlZeiZeiZeieƒZdefd „ƒYZeieƒdS( i(tabsolute_importN(tparse(trequest(tcall_subprocess(t display_pathtrmtree(tvcstVersionControltGitcB@seZdZdZdZdZdd„Zd „Zd „Z d „Z d „Z d „Z d„Z d„Zd„Zd„Zd„Zd„ZRS(tgits.gittclonesgit+https git+httpssgit+sshsgit+gitsgit+filec O@sñ|oÊt|ƒ\}}}}}|idƒo›|t|idƒƒ } | ti|ƒiddƒidƒ} t||| ||fƒ}|idƒd} || t|| || ||fƒ}qÑnt t |ƒi |||ŽdS(Ntfilet/s\t+i( turlsplittendswithtlentlstripturllib_requestt url2pathnametreplacet urlunsplittfindtsuperRt__init__( tselfturltargstkwargstschemetnetloctpathtquerytfragmenttinitial_slashestnewpatht after_plus((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pyRs %c C@s‡tiddƒ}|i|ƒzV|idƒp|d}nt|idddd|gd|id td |ƒWd t|ƒXd S( s@Export the Git repository at the url to the destination locations-exportspip-R scheckout-indexs-as-fs--prefixt filter_stdoutt show_stdouttcwdN( ttempfiletmkdtemptunpackRRtcmdt_filtertFalseR(Rtlocationttemp_dir((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pytexport3s cC@sc|i|ƒ}d|}||jo ||gS||jo ||gStid|ƒ|SdS(s¶Check the revision options before checkout to compensate that tags and branches may need origin/ as a prefix. Returns the SHA1 of the branch or tag if found. s origin/%ss5Could not find a tag or branch '%s', assuming commit.N(tget_refstloggertwarning(Rtrevtdestt rev_optionst revisionst origin_rev((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pytcheck_rev_options@s      cC@sPt|idd|gd|ƒt|iddg|d|ƒ|i|ƒdS(Ntconfigsremote.origin.urlR'tcheckouts-q(RR+tupdate_submodules(RR5RR6((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pytswitchTs cC@stt|iddgd|ƒ|o|i|d||ƒ}nt|idddg|d|ƒ|i|ƒdS(Ntfetchs-qR'itresets--hard(RR+R9R<(RR5R6((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pytupdate\scC@s|iƒ\}}|o|g}d|}ndg}d}|i||||ƒoªtid||t|ƒƒt|idd||gƒ|oZ|i|||ƒ}|i|ƒi |dƒp$t|iddg|d |ƒqñn|i |ƒndS( Ns (to %s)s origin/mastertsCloning %s%s to %sR s-qiR;R'( t get_url_revtcheck_destinationR2tinfoRRR+R9t get_revisiont startswithR<(RR5RR4R6t rev_display((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pytobtainks"  cC@s.t|iddgdtd|ƒ}|iƒS(NR:sremote.origin.urlR&R'(RR+R-tstrip(RR.R((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pytget_url„scC@s.t|iddgdtd|ƒ}|iƒS(Ns rev-parsetHEADR&R'(RR+R-RI(RR.t current_rev((s1/usr/lib/python2.6/vendor-packages/pip/vcs/git.pyREŠs!cC@sÿt|idgdtd|ƒ}h}xÑ|iƒiƒD]½}|iddƒ\}}|iƒ}d }|idƒo|tdƒ}nI|idƒo|tdƒ}n%|idƒo|tdƒ}n|d j o|iƒ||s     Á