%1E !^E !^"E,E g|OeOSO$OP   AE A;+>+>+@ A  rcLg}tjj||jd}t j }|dkr|j d |j||jdd|jt|d5}|j|dddtdg||j} |j| |y#1swY9xYw#ttj f$r!} t"j%d || Yd} ~ yd} ~ wwxYw) Nhgrcr-qpathsdefaultwrrz/Could not switch Mercurial repository to %s: %s)ospathjoindirname configparserRawConfigParserappendreadsetsecretopenwriterr#r"OSErrorNoSectionErrorr warning) r$r%r&r'r( extra_flags repo_configconfig config_filecmd_argsexcs rswitchzMercurial.switch=s ggll4v> --/ >   t $ 1 KK $ JJw 3:: 6k3' *; [) * $HR{RK   t $ &/;/T:N;N 8K8K8MN t,rc|jddgdd|j}|j|r t|}|jS)N showconfigz paths.defaultFT show_stdout stdout_onlyr)r"strip_is_local_repositoryr )clslocationr&s rget_remote_urlzMercurial.get_remote_urlfsXoo ? +  %'  # #C (c"Cyy{rcP|jddgdd|j}|S)zW Return the repository-local changeset revision number, as an integer. parentsz--template={rev}FTrLr"rO)rQrRcurrent_revisions r get_revisionzMercurial.get_revisionrs= ?? * + + %'   rcP|jddgdd|j}|S)zh Return the changeset identification hash, as a 40-character hexadecimal string rUz--template={node}FTrLrV)rQrRcurrent_rev_hashs rget_requirement_revisionz"Mercurial.get_requirement_revisions= ?? + , + %'   rcy)z&Always assume the versions don't matchFr)rQr%names ris_commit_id_equalzMercurial.is_commit_id_equalsrc|jdgdd|j}tjj |s=tjj tjj ||}t||S)z Return the path to Python project root, relative to the repo root. Return None if the project root is in the repo root. rootFTrL)r"rOr2r3isabsabspathr4r )rQrR repo_roots rget_subdirectoryzMercurial.get_subdirectoryslOO H%Tx$ %' ww}}Y' Xy(IJI7)LLrct||}|r|S |jdg|dddd}tjj|jdS#t$rtj d|Yyt $rYywxYw)Nr`FTraise)rrMrN on_returncodelog_failed_cmdzIcould not determine if %s is under hg control because hg is not availablez ) superget_repository_rootr"rr debugrr2r3normpathrstrip)rQrRlocr __class__s rrjzMercurial.get_repository_rootsg)(3 J ! %$  A"ww 011  LL.     sAB=BB)rstrreturnz list[str]) r%rqr&rr'r r(intrrNone)r)rRrqrrrq)r%rqr] str | Nonerrbool)rRrqrrru)__name__ __module__ __qualname__r]r5 repo_nameschemes staticmethodrr+rGr classmethodrSrXr[r^rdrj __classcell__)rps@rrrsH DGIG    ( 7A NQ  : 111 1  1  1< --- -  -  -            M M22rr) __future__rr6loggingr2pip._internal.exceptionsrrpip._internal.utils.miscrrpip._internal.utils.subprocessrpip._internal.utils.urlsr pip._internal.vcs.versioncontrolr r r r getLoggerrwr rregisterrrrrsZ" B=70   8 $b2b2J  Yr