Ñò 9ÕÒTc @@sÒddklZddkZddkZddkZddkZddklZddklZl Z ddk l Z l Z ddk lZddklZeieƒZde fd „ƒYZe ieƒdS( i(tabsolute_importN(tcall_subprocess(t display_pathtrmtree(tvcstVersionControl(t path_to_url(t configparsert MercurialcB@szeZdZdZdZdZd„Zd„Zd „Zd „Z d „Z d „Z d „Z d„Z d„Zd„ZRS(thgs.hgtcloneshg+httpshg+httpsshg+sshshg+static-httpc C@s`tiddƒ}|i|ƒz/t|id|gd|idtd|ƒWdt|ƒXdS(s?Export the Hg repository at the url to the destination locations-exportspip-tarchivet filter_stdoutt show_stdouttcwdN(ttempfiletmkdtemptunpackRtcmdt_filtertFalseR(tselftlocationttemp_dir((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytexports c C@sÜtii||idƒ}tiƒ}y]|i|ƒ|idd|ƒt|dƒi i ƒ}z|~}|i |ƒWdQXWn1t ti fj o}tid||ƒn"Xt|iddg|d|ƒdS( Nthgrctpathstdefaulttws/Could not switch Mercurial repository to %s: %stupdates-qR(tostpathtjointdirnameRtSafeConfigParsertreadtsettopent__exit__t __enter__twritetOSErrortNoSectionErrortloggertwarningRR( Rtdestturlt rev_optionst repo_configtconfigt_[1]t config_filetexc((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytswitch#s  &cC@s@t|iddgd|ƒt|iddg|d|ƒdS(Ntpulls-qRR(RR(RR-R/((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pyR2scC@s¸|iƒ\}}|o|g}d|}n g}d}|i||||ƒo_tid||t|ƒƒt|iddd||gƒt|iddg|d|ƒndS( Ns (to revision %s)tsCloning hg %s%s to %sR s --noupdates-qRR(t get_url_revtcheck_destinationR+tinfoRRR(RR-R.trevR/t rev_display((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytobtain7s  cC@sTt|iddgdtd|ƒiƒ}|i|ƒot|ƒ}n|iƒS(Nt showconfigs paths.defaultR R(RRRtstript_is_local_repositoryR(RRR.((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytget_urlIs cC@s³t|idgdtd|ƒ}g}x|iƒD]q}tid|ƒ}|oR|idƒ}|idƒ}d|jo#|i|iƒ|iƒfƒq¥q4q4Wt |ƒS(NttagsR Rs([\w\d\.-]+)\s*([\d]+):.*$iittip( RRRt splitlinestretsearchtgrouptappendR?tdict(RRRBttag_revstlinet tags_matchttagR;((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pyt get_tag_revsQs  +cC@s³t|idgdtd|ƒ}g}x|iƒD]q}tid|ƒ}|oR|idƒ}|idƒ}d|jo#|i|iƒ|iƒfƒq¥q4q4Wt |ƒS(NtbranchesR Rs([\w\d\.-]+)\s*([\d]+):.*$iiR( RRRRDRERFRGRHR?RI(RRROt branch_revsRKtbranches_matchtbranchR;((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytget_branch_revs^s  +cC@s.t|iddgdtd|ƒiƒ}|S(Ntparentss--template={rev}R R(RRRR?(RRtcurrent_revision((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pyt get_revisionkscC@s.t|iddgdtd|ƒiƒ}|S(NRTs--template={node}R R(RRRR?(RRtcurrent_rev_hash((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytget_revision_hashqsc C@sü|i|ƒ}|iƒidƒpd|}n|iƒiddƒd}|pdS|i|ƒ}|i|ƒ}|i|ƒ}|i |ƒ} ||jod|||f} n0|| jod|| |f} n d|} d||| fS( Nshg:shg+t-iis%s-%ss%s-devs %s@%s#egg=%s( RAtlowert startswithtegg_nametsplittNoneRVRXRNRS( RtdistRt find_tagstrepotegg_project_namet current_revRWRJRPt full_egg_name((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pytget_src_requirementws$   (R shg+httpshg+httpsshg+sshshg+static-http(t__name__t __module__tnameR!t repo_nametschemesRR5RR=RARNRSRVRXRe(((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pyRs      (t __future__RtloggingRRREt pip.utilsRRRtpip.vcsRRt pip.downloadRtpip._vendor.six.movesRt getLoggerRfR+Rtregister(((s7/usr/lib/python2.6/vendor-packages/pip/vcs/mercurial.pyts    }