File "mercurial.cpython-33.pyc"

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


7Rec@sddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZGdd	d	eZejedS(
iN(ucall_subprocess(udisplay_pathurmtree(ulogger(uvcsuVersionControl(upath_to_url(uConfigParsercBs|EeZdZdZdZdZd!ZdZd	Zd
dZ	dd
Z
ddZddZddZ
ddZddZddZddZddZddZd S("u	Mercurialuhgu.hgucloneuhg+httpuhg+httpsuhg+sshuhg+static-httpuhg-clone.txtug# 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(Nu#uhg\s*pull\s*(.*)\s*iu^hg\s*update\s*-r\s*(.*)\s*(NN(uNoneu
splitlinesustripu
startswithureusearchugroup(uselfucontentuurlurevulineu	url_matchu	rev_match((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuparse_vcs_bundle_files
"uMercurial.parse_vcs_bundle_filecCs`tjdd}|j|z/t|jd|gd|jddd|Wdt|XdS(	u?Export the Hg repository at the url to the destination locationu-exportupip-uarchiveu
filter_stdoutushow_stdoutucwdNF(utempfileumkdtempuunpackucall_subprocessucmdu_filteruFalseurmtree(uselfulocationutemp_dir((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuexport%s
uMercurial.exportcCstjj||jd}tj}yJ|j||jdd|t|d}|j	||j
WnBttjfk
rt
jd}tjd||fYn!Xt|jddg|d	|dS(
Nuhgrcupathsudefaultuwiu/Could not switch Mercurial repository to %s: %suupdateu-qucwd(uosupathujoinudirnameuConfigParseruSafeConfigParserureadusetuopenuwriteucloseuOSErroruNoSectionErrorusysuexc_infouloggeruwarnucall_subprocessucmd(uselfudestuurlurev_optionsurepo_configuconfiguconfig_fileue((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuswitch0s

uMercurial.switchcCs@t|jddgd|t|jddg|d|dS(Nupullu-qucwduupdate(ucall_subprocessucmd(uselfudesturev_options((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuupdateAsuMercurial.updatecCs|j\}}|r.|g}d|}ng}d}|j||||rtjd||t|ft|jddd||gt|jddg|d|ndS(	Nu (to revision %s)uuCloning hg %s%s to %sucloneu
--noupdateu-quupdateucwd(uget_url_revucheck_destinationuloggerunotifyudisplay_pathucall_subprocessucmd(uselfudestuurlurevurev_optionsurev_display((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuobtainFs	
	uMercurial.obtaincCsRt|jddgddd|j}|j|rHt|}n|jS(Nu
showconfigu
paths.defaultushow_stdoutucwdF(ucall_subprocessucmduFalseustripu_is_local_repositoryupath_to_url(uselfulocationuurl((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_urlTsuMercurial.get_urlcCst|jdgddd|}g}x{|jD]m}tjd|}|r4|jd}|jd}d|kr|j|j|jfqq4q4Wt	|S(	Nutagsushow_stdoutucwdu([\w\d\.-]+)\s*([\d]+):.*$iiutipF(
ucall_subprocessucmduFalseu
splitlinesureusearchugroupuappendustripudict(uselfulocationutagsutag_revsulineu
tags_matchutagurev((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_tag_revs\s)uMercurial.get_tag_revscCst|jdgddd|}g}x{|jD]m}tjd|}|r4|jd}|jd}d|kr|j|j|jfqq4q4Wt	|S(	Nubranchesushow_stdoutucwdu([\w\d\.-]+)\s*([\d]+):.*$iiudefaultF(
ucall_subprocessucmduFalseu
splitlinesureusearchugroupuappendustripudict(uselfulocationubranchesubranch_revsulineubranches_matchubranchurev((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_branch_revsis)uMercurial.get_branch_revscCs.t|jddgddd|j}|S(Nuparentsu--template={rev}ushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationucurrent_revision((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_revisionvsuMercurial.get_revisioncCs.t|jddgddd|j}|S(Nuparentsu--template={node}ushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationucurrent_rev_hash((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_revision_hash|suMercurial.get_revision_hashcCs|j|}|jjds1d|}n|jjddd}|sWdS|j|}|j|}|j|}|j	|}	||krd|||f}
n-||	krd||	|f}
n
d|}
d|||
fS(	Nuhg:uhg+u-iiu%s-%su%s-devu%s@%s#egg=%s(
uget_urluloweru
startswithuegg_nameusplituNoneuget_revisionuget_revision_hashuget_tag_revsuget_branch_revs(uselfudistulocationu	find_tagsurepouegg_project_nameucurrent_revucurrent_rev_hashutag_revsubranch_revsu
full_egg_name((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_src_requirements 

uMercurial.get_src_requirementN(uhguhg+httpuhg+httpsuhg+sshuhg+static-http(u__name__u
__module__u__qualname__unameudirnameu	repo_nameuschemesubundle_fileuguideuparse_vcs_bundle_fileuexportuswitchuupdateuobtainuget_urluget_tag_revsuget_branch_revsuget_revisionuget_revision_hashuget_src_requirement(u
__locals__((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu	Mercurial
s"

u	Mercurial(uosutempfileureusysupip.utilucall_subprocessudisplay_pathurmtreeupip.loguloggerupip.vcsuvcsuVersionControlupip.downloadupath_to_urlupip.backwardcompatuConfigParseru	Mercurialuregister(((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu<module>s