σ οRec @@ s d d l m Z d d l Z d d l Z d d l m Z d d l m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z m Z e rγ d d l m Z d d l m Z n e j e Z d e f d YZ e j e d S( i ( t absolute_importN( t configparser( t BadCommandt SubProcessError( t display_path( t make_command( t TempDirectory( t MYPY_CHECK_RUNNING( t path_to_url( t VersionControlt! find_path_to_setup_from_repo_roott vcs( t HiddenText( t RevOptionst Mercurialc B@ s e Z d Z d Z d Z d Z e d Z d Z d Z d Z d Z e d Z e d Z e d Z e d Z e d Z e d Z RS( t hgs .hgt clones hg+files hg+https hg+httpss hg+sshs hg+static-httpc C@ s | g S( N( ( t rev( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyt get_base_rev_args' s c C@ sN t d d 9 } | j | j d | | j d | g d | j Wd QXd S( s? Export the Hg repository at the url to the destination locationt kindt exportt urlt archivet cwdN( R t unpackt patht run_command( t selft locationR t temp_dir( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyR + s c C@ sp | j } t j d | | t | | j t d d d | | | j t d d | j d | d S( Ns Cloning hg %s%s to %sR s --noupdates -qt updateR ( t to_displayt loggert infoR R R t to_args( R t destR t rev_optionst rev_display( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyt fetch_new5 s c C@ sΤ t j j | | j d } t j } yL | j | | j d d | j t | d } | j | Wd QXWn/ t t j f k r€ } t j d | | n, Xt d d | j } | j | d | d S( Nt hgrct pathst defaultt ws/ Could not switch Mercurial repository to %s: %sR s -qR ( t osR t joint dirnameR t RawConfigParsert readt sett secrett opent writet OSErrort NoSectionErrorR t warningR R" R ( R R# R R$ t repo_configt configt config_filet exct cmd_args( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyt switchD s c C@ sH | j d d g d | t d d | j } | j | d | d S( Nt pulls -qR R ( R R R" ( R R# R R$ R; ( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyR U s c C@ sI | j d d g d | j } | j | r? t | } n | j S( Nt showconfigs paths.defaultR ( R t stript _is_local_repositoryR ( t clsR R ( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyt get_remote_url[ s c C@ s% | j d d g d | j } | S( sW Return the repository-local changeset revision number, as an integer. t parentss --template={rev}R ( R R? ( RA R t current_revision( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyt get_revisiond s c C@ s% | j d d g d | j } | S( sh Return the changeset identification hash, as a 40-character hexadecimal string RC s --template={node}R ( R R? ( RA R t current_rev_hash( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/vcs/mercurial.pyt get_requirement_revisionm s c C@ s t S( s&