Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / pip / vcs / mercurial.pyc
Size: Mime:
ó
•èRc@sÃddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZdefd	„ƒYZejeƒdS(
iÿÿÿÿN(tcall_subprocess(tdisplay_pathtrmtree(tlogger(tvcstVersionControl(tpath_to_url2(tConfigParsert	MercurialcBseZdZdZdZdZdZdZd	„Zd
„Z	d„Z
d„Zd
„Zd„Z
d„Zd„Zd„Zd„Zd„ZRS(thgs.hgtcloneshg+httpshg+httpsshg+sshshg+static-httpshg-clone.txtsg# This was a Mercurial repo; to make it a repo again run:
hg init
hg pull %(url)s
hg update -r %(rev)s
cCsÃd}}x²|jƒD]¤}|jƒs|jƒjdƒrEqntjd|ƒ}|ru|jdƒjƒ}ntjd|ƒ}|r¥|jdƒjƒ}n|r|r||fSqWdS(Nt#shg\s*pull\s*(.*)\s*is^hg\s*update\s*-r\s*(.*)\s*(NN(tNonet
splitlineststript
startswithtretsearchtgroup(tselftcontentturltrevtlinet	url_matcht	rev_match((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytparse_vcs_bundle_files
"cCs`tjddƒ}|j|ƒz/t|jd|gd|jdtd|ƒWdt|ƒXdS(s?Export the Hg repository at the url to the destination locations-exportspip-tarchivet
filter_stdouttshow_stdouttcwdN(ttempfiletmkdtemptunpackRtcmdt_filtertFalseR(Rtlocationttemp_dir((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytexport%s
cCsÙtjj||jdƒ}tjƒ}yJ|j|ƒ|jdd|ƒt|dƒ}|j	|ƒ|j
ƒWnAttjfk
r´t
jƒd}tjd||fƒn!Xt|jddg|d	|ƒdS(
Nthgrctpathstdefaulttwis/Could not switch Mercurial repository to %s: %stupdates-qR(tostpathtjointdirnameRtSafeConfigParsertreadtsettopentwritetclosetOSErrortNoSectionErrortsystexc_infoRtwarnRR"(RtdestRtrev_optionstrepo_configtconfigtconfig_filete((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytswitch0s

cCs@t|jddgd|ƒt|jddg|d|ƒdS(Ntpulls-qRR,(RR"(RR<R=((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pyR,AscCs¸|jƒ\}}|r.|g}d|}ng}d}|j||||ƒr´tjd||t|ƒfƒt|jddd||gƒt|jddg|d|ƒndS(	Ns (to revision %s)tsCloning hg %s%s to %sR
s
--noupdates-qR,R(tget_url_revtcheck_destinationRtnotifyRRR"(RR<RRR=trev_display((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytobtainFs	
	cCsRt|jddgdtd|ƒjƒ}|j|ƒrHt|ƒ}n|jƒS(Nt
showconfigs
paths.defaultRR(RR"R$Rt_is_local_repositoryR(RR%R((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytget_urlTscCs¯t|jdgdtd|ƒ}g}x{|jƒD]m}tjd|ƒ}|r4|jdƒ}|jdƒ}d|kr¡|j|jƒ|jƒfƒq¡q4q4Wt	|ƒS(NttagsRRs([\w\d\.-]+)\s*([\d]+):.*$iittip(
RR"R$R
RRRtappendRtdict(RR%RMttag_revsRt
tags_matchttagR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytget_tag_revs\s)cCs¯t|jdgdtd|ƒ}g}x{|jƒD]m}tjd|ƒ}|r4|jdƒ}|jdƒ}d|kr¡|j|jƒ|jƒfƒq¡q4q4Wt	|ƒS(NtbranchesRRs([\w\d\.-]+)\s*([\d]+):.*$iiR*(
RR"R$R
RRRRORRP(RR%RUtbranch_revsRtbranches_matchtbranchR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytget_branch_revsis)cCs.t|jddgdtd|ƒjƒ}|S(Ntparentss--template={rev}RR(RR"R$R(RR%tcurrent_revision((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytget_revisionvscCs.t|jddgdtd|ƒjƒ}|S(NRZs--template={node}RR(RR"R$R(RR%tcurrent_rev_hash((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytget_revision_hash|scCsô|j|ƒ}|jƒjdƒs1d|}n|jƒjddƒd}|sWdS|j|ƒ}|j|ƒ}|j|ƒ}|j	|ƒ}	||kr¶d|||f}
n-||	krÙd||	|f}
n
d|}
d|||
fS(	Nshg:shg+t-iis%s-%ss%s-devs%s@%s#egg=%s(
RLtlowerRtegg_nametsplitRR\R^RTRY(RtdistR%t	find_tagstrepotegg_project_nametcurrent_revR]RQRVt
full_egg_name((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pytget_src_requirement‚s 

(shgshg+httpshg+httpsshg+sshshg+static-http(t__name__t
__module__tnameR0t	repo_nametschemestbundle_filetguideRR'RBR,RIRLRTRYR\R^Ri(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pyR
s"							
	
		(R-RRR9tpip.utilRRRtpip.logRtpip.vcsRRtpip.downloadRtpip.backwardcompatRRtregister(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/pip/vcs/mercurial.pyt<module>sŠ