Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyc

ó
“tÆ_c@@sddlmZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZmZmZerãddl	mZddlmZnejeƒZd
efd„ƒYZejeƒdS(i(tabsolute_importN(tconfigparser(t
BadCommandtSubProcessError(tdisplay_path(tmake_command(t
TempDirectory(tMYPY_CHECK_RUNNING(tpath_to_url(tVersionControlt!find_path_to_setup_from_repo_roottvcs(t
HiddenText(t
RevOptionst	MercurialcB@s­eZdZdZdZdZed„ƒZd	„Zd
„Z	d„Z
d„Zed
„ƒZ
ed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZRS(thgs.hgtcloneshg+fileshg+httpshg+httpsshg+sshshg+static-httpcC@s|gS(N((trev((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytget_base_rev_args'scC@sNtddƒ9}|j|jd|ƒ|jd|gd|jƒWdQXdS(s?Export the Hg repository at the url to the destination locationtkindtexportturltarchivetcwdN(Rtunpacktpathtrun_command(tselftlocationRttemp_dir((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyR+scC@sp|jƒ}tjd||t|ƒƒ|jtddd||ƒƒ|jtdd|jƒƒd|ƒdS(NsCloning hg %s%s to %sRs
--noupdates-qtupdateR(t
to_displaytloggertinfoRRRtto_args(RtdestRtrev_optionstrev_display((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyt	fetch_new5s
c	C@sÔtjj||jdƒ}tjƒ}yL|j|ƒ|jdd|jƒt	|dƒ}|j
|ƒWdQXWn/ttjfk
r€}t
jd||ƒn,Xtdd|jƒƒ}|j|d|ƒdS(	Nthgrctpathstdefaulttws/Could not switch Mercurial repository to %s: %sRs-qR(tosRtjointdirnameRtRawConfigParsertreadtsettsecrettopentwritetOSErrortNoSectionErrorR twarningRR"R(	RR#RR$trepo_configtconfigtconfig_filetexctcmd_args((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytswitchDs
cC@sH|jddgd|ƒtdd|jƒƒ}|j|d|ƒdS(Ntpulls-qRR(RRR"(RR#RR$R;((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyRUscC@sI|jddgd|ƒjƒ}|j|ƒr?t|ƒ}n|jƒS(Nt
showconfigs
paths.defaultR(Rtstript_is_local_repositoryR(tclsRR((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytget_remote_url[scC@s%|jddgd|ƒjƒ}|S(sW
        Return the repository-local changeset revision number, as an integer.
        tparentss--template={rev}R(RR?(RARtcurrent_revision((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytget_revisiondscC@s%|jddgd|ƒjƒ}|S(sh
        Return the changeset identification hash, as a 40-character
        hexadecimal string
        RCs--template={node}R(RR?(RARtcurrent_rev_hash((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytget_requirement_revisionmscC@stS(s&Always assume the versions don't match(tFalse(RAR#tname((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytis_commit_id_equalxscC@sa|jdgd|ƒjƒ}tjj|ƒsTtjjtjj||ƒƒ}nt||ƒS(s~
        Return the path to setup.py, relative to the repo root.
        Return None if setup.py is in the repo root.
        trootR(RR?R+RtisabstabspathR,R
(RARt	repo_root((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pytget_subdirectory}s
$cC@s“tt|ƒj|ƒ}|r"|Sy"|jdgd|dtƒ}Wn3tk
rhtjd|ƒdSt	k
rydSXt
jj|j
dƒƒS(NRKRtlog_failed_cmdsIcould not determine if %s is under hg control because hg is not availables
(tsuperRtget_repository_rootRRHRR tdebugtNoneRR+Rtnormpathtrstrip(RARtloctr((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyRRŠs	

	
(Rshg+fileshg+httpshg+httpsshg+sshshg+static-http(t__name__t
__module__RIR-t	repo_nametschemeststaticmethodRRR&R<RtclassmethodRBRERGRJRORR(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyRs	
					
(t
__future__RtloggingR+tpip._vendor.six.movesRtpip._internal.exceptionsRRtpip._internal.utils.miscRtpip._internal.utils.subprocessRtpip._internal.utils.temp_dirRtpip._internal.utils.typingRtpip._internal.utils.urlsRt pip._internal.vcs.versioncontrolR	R
RRR
t	getLoggerRYR Rtregister(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/mercurial.pyt<module>s 
Back to Directory File Manager