File "mercurial.cpython-34.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python34/lib/python3.4/site-packages/pip/vcs/__pycache__/mercurial.cpython-34.pyc
File size: 5.53 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


Re@sddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZGdd	d	eZejedS)
N)call_subprocess)display_pathrmtree)logger)vcsVersionControl)path_to_url)ConfigParserc@seZdZdZdZdZd!ZdZd	Zd
dZ	dd
Z
ddZddZddZ
ddZddZddZddZddZddZd S)"	Mercurialhgz.hgclonehg+httphg+httpshg+sshhg+static-httpzhg-clone.txtzg# This was a Mercurial repo; to make it a repo again run:
hg init
hg pull %(url)s
hg update -r %(rev)s
cCsd}}x|jD]}|js|jjdrEqntjd|}|ru|jdj}ntjd|}|r|jdj}n|r|r||fSqWdS)N#zhg\s*pull\s*(.*)\s*z^hg\s*update\s*-r\s*(.*)\s*)NN)
splitlinesstrip
startswithresearchgroup)selfcontenturlrevline	url_match	rev_matchr ,/tmp/pip-ztkk0jow-build/pip/vcs/mercurial.pyparse_vcs_bundle_files
"zMercurial.parse_vcs_bundle_filecCs`tjdd}|j|z/t|jd|gd|jddd|Wdt|XdS)	z?Export the Hg repository at the url to the destination locationz-exportzpip-archive
filter_stdoutshow_stdoutFcwdN)tempfilemkdtempunpackrcmd_filterr)rlocationtemp_dirr r r!export%s
zMercurial.exportcCstjj||jd}tj}yJ|j||jdd|t|d}|j	||j
WnBttjfk
rt
jd}tjd||fYn!Xt|jddg|d	|dS)
Nhgrcpathsdefaultwrz/Could not switch Mercurial repository to %s: %supdatez-qr&)ospathjoindirnamer	SafeConfigParserreadsetopenwritecloseOSErrorNoSectionErrorsysexc_inforwarnrr*)rdestrrev_optionsrepo_configconfigconfig_fileer r r!switch0s

zMercurial.switchcCs@t|jddgd|t|jddg|d|dS)Npullz-qr&r3)rr*)rrCrDr r r!r3AszMercurial.updatecCs|j\}}|r.|g}d|}ng}d}|j||||rtjd||t|ft|jddd||gt|jddg|d|ndS)	Nz (to revision %s)zCloning hg %s%s to %srz
--noupdatez-qr3r&)get_url_revcheck_destinationrnotifyrrr*)rrCrrrDrev_displayr r r!obtainFs	
	zMercurial.obtaincCsRt|jddgddd|j}|j|rHt|}n|jS)N
showconfigz
paths.defaultr%Fr&)rr*r_is_local_repositoryr)rr,rr r r!get_urlTszMercurial.get_urlcCst|jdgddd|}g}x{|jD]m}tjd|}|r4|jd}|jd}d|kr|j|j|jfqq4q4Wt|S)	Ntagsr%Fr&z([\w\d\.-]+)\s*([\d]+):.*$rtip)	rr*rrrrappendrdict)rr,rTtag_revsr
tags_matchtagrr r r!get_tag_revs\s)zMercurial.get_tag_revscCst|jdgddd|}g}x{|jD]m}tjd|}|r4|jd}|jd}d|kr|j|j|jfqq4q4Wt|S)	Nbranchesr%Fr&z([\w\d\.-]+)\s*([\d]+):.*$rrUr1)	rr*rrrrrWrrX)rr,r]branch_revsrbranches_matchbranchrr r r!get_branch_revsis)zMercurial.get_branch_revscCs.t|jddgddd|j}|S)Nparentsz--template={rev}r%Fr&)rr*r)rr,current_revisionr r r!get_revisionvszMercurial.get_revisioncCs.t|jddgddd|j}|S)Nrbz--template={node}r%Fr&)rr*r)rr,current_rev_hashr r r!get_revision_hash|szMercurial.get_revision_hashcCs|j|}|jjds1d|}n|jjddd}|sWdS|j|}|j|}|j|}|j|}	||krd|||f}
n-||	krd||	|f}
n
d|}
d|||
fS)	Nzhg:zhg+-rrz%s-%sz%s-devz%s@%s#egg=%s)	rSlowerregg_namesplitrdrfr\ra)rdistr,	find_tagsrepoegg_project_namecurrent_revrerYr^
full_egg_namer r r!get_src_requirements 

zMercurial.get_src_requirementN)zhgr
rrr)__name__
__module____qualname__namer7	repo_nameschemesbundle_fileguider"r.rIr3rPrSr\rardrfrqr r r r!r

s"

r
)r4r'rr@pip.utilrrrpip.logrpip.vcsrrpip.downloadrZpip.backwardcompatr	r
registerr r r r!<module>s