???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
ïRec           @@  s‡  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l m Z d  d l	 m Z
 d  d l	 m Z d  d l m Z 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 m Z m Z m Z e r'd  d l m Z m  Z  d  d l m! Z! d  d l m" Z" m# Z# n  e
 j$ Z$ e
 j% Z% e j& e' ƒ Z( e j) d ƒ Z* d „  Z+ d e f d „  ƒ  YZ, e j- e, ƒ d S(   i    (   t   absolute_importN(   t   parse(   t   request(   t
   BadCommandt   SubProcessError(   t   display_patht   hide_url(   t   make_command(   t   TempDirectory(   t   MYPY_CHECK_RUNNING(   t   RemoteNotFoundErrort   VersionControlt!   find_path_to_setup_from_repo_roott   vcs(   t   Optionalt   Tuple(   t
   HiddenText(   t   AuthInfot
   RevOptionss   ^[a-fA-F0-9]{40}$c         C@  s   t  t j |  ƒ ƒ S(   N(   t   boolt
   HASH_REGEXt   match(   t   sha(    (    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/git.pyt   looks_like_hash*   s    t   Gitc           B@  s
  e  Z d  Z d Z d Z d Z d Z d
 Z e d „  ƒ Z	 d „  Z
 d „  Z e d „  ƒ Z d „  Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z d „  Z d „  Z d „  Z e d „  ƒ Z e d d „ ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z RS(   t   gits   .gitt   clones   git+https	   git+httpss   git+sshs   git+gits   git+filet   GIT_DIRt   GIT_WORK_TREEt   HEADc         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/git.pyt   get_base_rev_args:   s    c         C@  se   |  j  t | ƒ ƒ \ } } | j s( t S|  j | | j ƒ sA t St |  j | | j ƒ d ƒ } | S(   Ni    (   t   get_url_rev_optionsR   R   t   Falset   is_commit_id_equalR   t   get_revision_sha(   t   selft   urlt   destt   _t   rev_optionst   is_tag_or_branch(    (    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/git.pyt   is_immutable_rev_checkout>   s    	c         C@  sp   d } |  j  d g ƒ } | j | ƒ rD | t | ƒ j ƒ  d } n d } d j | j d ƒ d  ƒ } t | ƒ S(   Ns   git version t   versioni    t    t   .i   (   t   run_commandt
   startswitht   lent   splitt   joint   parse_version(   R$   t   VERSION_PFXR+   (    (    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/git.pyt   get_git_versionO   s    c         C@  sW   d d d g } |  j  | d d d | ƒ} | j ƒ  } | j d ƒ rS | t d ƒ Sd	 S(
   sl   
        Return the current branch, or None if HEAD isn't at a branch
        (e.g. detached HEAD).
        s   symbolic-refs   -qR   t   extra_ok_returncodesi   t   cwds   refs/heads/(   i   N(   R.   t   stripR/   R0   t   None(   t   clst   locationt   argst   outputt   ref(    (    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/git.pyt   get_current_branch\   s    
c      
   C@  ss   | j  d ƒ s | d } n  t d d ƒ B } |  j | j d | ƒ|  j d d d d | g d	 | j ƒWd
 QXd
 S(   s@   Export the Git repository at the url to the destination locationt   /t   kindt   exportR%   s   checkout-indexs   -as   -fs   --prefixR7   N(   t   endswithR   t   unpackt   pathR.   (   R$   R;   R%   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/git.pyRB   q   s    c   
      C@  s  d } y |  j  d | g d | ƒ} Wn t k
 r8 n Xi  } xc | j ƒ  j ƒ  D]O } y | j ƒ  \ } } Wn& t k
 r– t d j | ƒ ƒ ‚ n X| | | <qR Wd j | ƒ } d j | ƒ }	 | j | ƒ } | d k	 rè | t	 f S| j |	 ƒ } | t
 f S(   sö   
        Return (sha_or_none, is_branch), where sha_or_none is a commit hash
        if the revision names a remote branch or tag, otherwise None.

        Args:
          dest: the repository directory.
          rev: the revision name.
        R,   s   show-refR7   s   unexpected show-ref line: {!r}s   refs/remotes/origin/{}s   refs/tags/{}N(   R.   R   R8   t
   splitlinesR1   t
   ValueErrort   formatt   getR9   t   TrueR!   (
   R:   R&   R   R=   t   refst   lineR   R>   t
   branch_reft   tag_ref(    (    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/git.pyR#   ~   s&    
c         C@  sé   | j  } | d k	 s t ‚ |  j | | ƒ \ } } | d k	 rg | j | ƒ } | rZ | n d | _ | St | ƒ s† t j d | ƒ n  | j	 d ƒ s™ | S|  j
 t d d | | j ƒ  ƒ d | ƒ|  j | d d ƒ} | j | ƒ } | S(	   sµ   
        Resolve a revision to a new RevOptions object with the SHA1 of the
        branch, tag, or ref if found.

        Args:
          rev_options: a RevOptions object.
        s:   Did not find branch or tag '%s', assuming revision or ref.s   refs/t   fetchs   -qR7   R   t
   FETCH_HEADN(   t   arg_revR9   t   AssertionErrorR#   t   make_newt   branch_nameR   t   loggert   warningR/   R.   R   t   to_argst   get_revision(   R:   R&   R%   R(   R   R   t	   is_branch(    (    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/git.pyt   resolve_revision¦   s&    
	
c         C@  s   | s
 t  S|  j | ƒ | k S(   s§   
        Return whether the current commit hash equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        (   R!   RY   (   R:   R&   t   name(    (    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/git.pyR"   Ó   s    	c         C@  s)  | j  ƒ  } t j d | | t | ƒ ƒ |  j t d d | | ƒ ƒ | j r|  j | | | ƒ } t | d d  ƒ } | d  k rÆ |  j
 | | j ƒ st d d | j ƒ  ƒ } |  j | d | ƒqq|  j | ƒ | k rd j | ƒ } d d | d	 | g } |  j | d | ƒqn  |  j | ƒ d  S(
   Ns   Cloning %s%s to %sR   s   -qRU   t   checkoutR7   s	   origin/{}s   -bs   --track(   t
   to_displayRV   t   infoR   R.   R   R   R[   t   getattrR9   R"   RX   R?   RI   t   update_submodules(   R$   R&   R%   R(   t   rev_displayRU   t   cmd_argst   track_branch(    (    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/git.pyt	   fetch_newâ   s     	c         C@  s[   |  j  t d d | ƒ d | ƒt d d | j ƒ  ƒ } |  j  | d | ƒ|  j | ƒ d  S(   Nt   configs   remote.origin.urlR7   R]   s   -q(   R.   R   RX   Ra   (   R$   R&   R%   R(   Rc   (    (    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/git.pyt   switch   s    c         C@  s¤   |  j  ƒ  t d ƒ k r7 |  j d d d g d | ƒn |  j d d g d | ƒ|  j | | | ƒ } t d d d | j ƒ  ƒ } |  j | d | ƒ|  j | ƒ d  S(   Ns   1.9.0RP   s   -qs   --tagsR7   t   resets   --hard(   R5   R3   R.   R[   R   RX   Ra   (   R$   R&   R%   R(   Rc   (    (    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/git.pyt   update  s    c         C@  sŸ   |  j  d d d g d d
 d | ƒ} | j ƒ  } y | d } Wn t k
 rW t ‚ n Xx' | D] } | j d ƒ r_ | } Pq_ q_ W| j d	 ƒ d } | j ƒ  S(   s¢   
        Return URL of the first remote encountered.

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        Rf   s   --get-regexps   remote\..*\.urlR6   i   R7   i    s   remote.origin.url t    (   i   (   R.   RG   t
   IndexErrorR
   R/   R1   R8   (   R:   R;   t   stdoutt   remotest   found_remotet   remoteR%   (    (    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/git.pyt   get_remote_url  s    

c         C@  s:   | d  k r d } n  |  j d | g d | ƒ} | j ƒ  S(   NR   s	   rev-parseR7   (   R9   R.   R8   (   R:   R;   R   t   current_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/git.pyRY   5  s
    	c         C@  sy   |  j  d d g d | ƒj ƒ  } t j j | ƒ sK t j j | | ƒ } n  t j j t j j | d ƒ ƒ } t | | ƒ S(   s~   
        Return the path to setup.py, relative to the repo root.
        Return None if setup.py is in the repo root.
        s	   rev-parses	   --git-dirR7   s   ..(   R.   R8   t   osRE   t   isabsR2   t   abspathR   (   R:   R;   t   git_dirt	   repo_root(    (    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/git.pyt   get_subdirectory>  s    !c         C@  sX  t  | ƒ \ } } } } } | j d ƒ rÄ | t | j d ƒ ƒ  } | t j | ƒ j d d ƒ j d ƒ } t | | | | | f ƒ } | j d ƒ d }	 | |	  t | |	 | | | | f ƒ } n  d | k r*d | k sâ t	 ‚ | j d d	 ƒ } t
 t |  ƒ j | ƒ \ } }
 } | j d
 d ƒ } n! t
 t |  ƒ j | ƒ \ } }
 } | |
 | f S(   s9  
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes don't
        work with a ssh:// scheme (e.g. GitHub). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        t   fileR@   s   \t   +i   s   ://s   file:s   git+s
   git+ssh://s   ssh://R,   (   t   urlsplitRC   R0   t   lstript   urllib_requestt   url2pathnamet   replacet
   urlunsplitt   findRS   t   superR   t   get_url_rev_and_auth(   R:   R%   t   schemet   netlocRE   t   queryt   fragmentt   initial_slashest   newpatht
   after_plusR   t	   user_pass(    (    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/git.pyR‚   M  s"    
 !!c         C@  sK   t  j j t  j j | d ƒ ƒ s% d  S|  j d d d d d g d | ƒd  S(   Ns   .gitmodulest	   submoduleRi   s   --inits   --recursives   -qR7   (   Rr   RE   t   existsR2   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/git.pyRa   p  s
    !c         C@  s–   t  t |  ƒ j | ƒ } | r" | Sy% |  j d d g d | d t ƒ} Wn3 t k
 rk t j d | ƒ d  St	 k
 r| d  SXt
 j j | j d ƒ ƒ S(   Ns	   rev-parses   --show-toplevelR7   t   log_failed_cmdsK   could not determine if %s is under git control because git is not availables   
(   R   R   t   get_repository_rootR.   R!   R   RV   t   debugR9   R   Rr   RE   t   normpatht   rstrip(   R:   R;   t   loct   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/git.pyRŽ   y  s    	(   R   s   git+https	   git+httpss   git+sshs   git+gits   git+file(   R   R   N(   t   __name__t
   __module__R\   t   dirnamet	   repo_namet   schemest   unset_environt   default_arg_revt   staticmethodR   R*   R5   t   classmethodR?   RB   R#   R[   R"   Re   Rg   Ri   Rp   R9   RY   Rw   R‚   Ra   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/git.pyR   .   s0   			(-			#	(.   t
   __future__R    t   loggingt   os.pathRr   t   ret   pip._vendor.packaging.versionR   R3   t   pip._vendor.six.moves.urllibt   urllib_parseR   R|   t   pip._internal.exceptionsR   R   t   pip._internal.utils.miscR   R   t   pip._internal.utils.subprocessR   t   pip._internal.utils.temp_dirR   t   pip._internal.utils.typingR	   t    pip._internal.vcs.versioncontrolR
   R   R   R   t   typingR   R   R   R   R   Rz   R   t	   getLoggerR”   RV   t   compileR   R   R   t   register(    (    (    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/git.pyt   <module>   s0   "			ÿ `