ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
abc           @@  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 d  d l m Z d  d l m Z m Z d  d l m Z m Z e j Z e j Z e j e  Z d	 e f d
     YZ e j e  d S(   i    (   t   absolute_importN(   t   samefile(   t
   BadCommand(   t   parse(   t   request(   t   display_patht   rmtree(   t   vcst   VersionControlt   Gitc           B@  s   e  Z d  Z d Z d Z d Z d d  Z d	   Z d
   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e d    Z RS(    t   gits   .gitt   clones   git+https	   git+httpss   git+sshs   git+gits   git+filec         O@  s   | r t  |  \ } } } } } | j d  r | t | j d    }	 |	 t j |  j d d  j d  }
 t | | |
 | | f  } | j d  d } | |  t | | | |
 | | f  } q n  t	 t
 |   j | | |  d  S(   Nt   filet   /s   \t   +i   (   t   urlsplitt   endswitht   lent   lstript   urllib_requestt   url2pathnamet   replacet
   urlunsplitt   findt   superR	   t   __init__(   t   selft   urlt   argst   kwargst   schemet   netloct   patht   queryt   fragmentt   initial_slashest   newpatht
   after_plus(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyR       s    
#c         C@  sl   d } |  j  d g d t } | j |  r@ | t |  } n d } d j | j d  d   } t |  S(   Ns   git version t   versiont   show_stdoutt    t   .i   (   t   run_commandt   Falset
   startswithR   t   joint   splitt   parse_version(   R   t   VERSION_PFXR&   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   get_git_version5   s    c         C@  sy   t  j d d  } |  j |  zH | j d  s> | d } n  |  j d d d d | g d t d	 | Wd
 t |  Xd
 S(   s@   Export the Git repository at the url to the destination locations   -exports   pip-R   s   checkout-indexs   -as   -fs   --prefixR'   t   cwdN(   t   tempfilet   mkdtempt   unpackR   R*   R+   R   (   R   t   locationt   temp_dir(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   exportB   s    c         C@  s_   |  j  |  } d | } | | k r0 | | g S| | k rG | | g St j d |  | Sd S(   s   Check the revision options before checkout to compensate that tags
        and branches may need origin/ as a prefix.
        Returns the SHA1 of the branch or tag if found.
        s	   origin/%ss5   Could not find a tag or branch '%s', assuming commit.N(   t   get_short_refst   loggert   warning(   R   t   revt   destt   rev_optionst	   revisionst
   origin_rev(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   check_rev_optionsO   s    

c         C@  s   |  j  |  j | d  S(   s
  
        Compare the current sha to the ref. ref may be a branch or tag name,
        but current rev will always point to a sha. This means that a branch
        or tag will never compare as True. So this ultimately only matches
        against exact shas.
        i    (   t   get_revisionR,   (   R   R=   R>   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   check_versionc   s    c         C@  sJ   |  j  d d | g d | |  j  d d g | d | |  j |  d  S(   Nt   configs   remote.origin.urlR2   t   checkouts   -q(   R*   t   update_submodules(   R   R=   R   R>   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   switchl   s    c         C@  s   |  j    t d  k r7 |  j d d d g d | n |  j d d g d | | rr |  j | d | |  } n  |  j d d d g | d | |  j |  d  S(	   Ns   1.9.0t   fetchs   -qs   --tagsR2   i    t   resets   --hard(   R1   R/   R*   RA   RF   (   R   R=   R>   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   updater   s     c         C@  s   |  j    \ } } | r. | g } d | } n d g } d } |  j | | | |  r t j d | | t |   |  j d d | | g  | r |  j | | |  } |  j | |  s |  j d d g | d | q n  |  j |  n  d  S(	   Ns    (to %s)s   origin/masterR(   s   Cloning %s%s to %sR   s   -qRE   R2   (	   t   get_url_revt   check_destinationR:   t   infoR   R*   RA   RC   RF   (   R   R=   R   R<   R>   t   rev_display(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   obtain   s"    		c         C@  s   |  j  d d d g d t d | } | j   } | d } x' | D] } | j d  rA | } PqA qA W| j d  d	 } | j   S(
   s+   Return URL of the first remote encountered.RD   s   --get-regexps   remote\..*\.urlR'   R2   i    s   remote.origin.url t    i   (   R*   R+   t
   splitlinesR,   R.   t   strip(   R   R6   t   remotest   found_remotet   remoteR   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   get_url   s    
c         C@  s+   |  j  d d g d t d | } | j   S(   Ns	   rev-parset   HEADR'   R2   (   R*   R+   RR   (   R   R6   t   current_rev(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyRB      s    c         c@  sn   |  j  d g d t d | } xI | j   j   D]5 } | j d d  \ } } | j   | j   f Vq1 Wd S(   s4   Yields tuples of (commit, ref) for branches and tagss   show-refR'   R2   RP   i   N(   R*   R+   RR   RQ   R.   (   R   R6   t   outputt   linet   committ   ref(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   get_full_refs   s
    c         C@  s   | j  d  S(   Ns   refs/remotes/(   R,   (   R   R\   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   is_ref_remote   s    c         C@  s   | j  d  S(   Ns   refs/heads/(   R,   (   R   R\   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   is_ref_branch   s    c         C@  s   | j  d  S(   Ns
   refs/tags/(   R,   (   R   R\   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt
   is_ref_tag   s    c         C@  s/   t  |  j |  |  j |  |  j |  f  S(   s0   A ref is a commit sha if it is not anything else(   t   anyR^   R_   R`   (   R   R\   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   is_ref_commit   s    c         C@  s   |  j  |  S(   N(   R9   (   R   R6   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   get_refs   s    c         C@  s   i  } x |  j  |  D] \ } } d } |  j |  rJ | t d  } nD |  j |  rl | t d  } n" |  j |  r | t d  } n  | d k	 r | | | <q q W| S(   s=   Return map of named refs (branches or tags) to commit hashes.s   refs/remotes/s   refs/heads/s
   refs/tags/N(   R]   t   NoneR^   R   R_   R`   (   R   R6   t   rvR[   R\   t   ref_name(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyR9      s    c         C@  s   |  j  d d g d t d | j   } t j j |  sQ t j j | |  } n  t j j | d  } | } x] t j j t j j | d   s | } t j j |  } | | k ro t	 j
 d |  d Sqo Wt | |  r d St j j | |  S(	   s:   Return the relative path of setup.py to the git repo root.s	   rev-parses	   --git-dirR'   R2   s   ..s   setup.pysG   Could not find setup.py for directory %s (tried all parent directories)N(   R*   R+   RR   t   osR    t   isabsR-   t   existst   dirnameR:   R;   Rd   R   t   relpath(   R   R6   t   git_dirt   root_dirt   orig_locationt   last_location(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   _get_subdirectory   s"    $c         C@  s   |  j  |  } | j   j d  s1 d | } n  | j   j d d  d } | sW d  S|  j |  } d | | | f } |  j |  } | r | d | 7} n  | S(   Ns   git:s   git+t   -i   i    s   %s@%s#egg=%ss   &subdirectory=(   RV   t   lowerR,   t   egg_nameR.   Rd   RB   Rp   (   R   t   distR6   t   repot   egg_project_nameRX   t   reqt   subdirectory(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   get_src_requirement   s    c         C@  s   d |  j  k rl d |  j  k s$ t  |  j  j d d  |  _  t t |   j   \ } } | j d d  } n t t |   j   \ } } | | f S(   s;  
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes doesn'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.
        s   ://s   file:s   git+s
   git+ssh://s   ssh://R(   (   R   t   AssertionErrorR   R   R	   RK   (   R   R   R<   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyRK     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	   submoduleRJ   s   --inits   --recursives   -qR2   (   Rg   R    Ri   R-   R*   (   R   R6   (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyRF     s
    !c         C@  su   t  t |   j |  r t Sy0 |    j d g d | d t d d } | SWn" t k
 rp t j d |  t SXd  S(   Ns	   rev-parseR2   R'   t   on_returncodet   ignoresK   could not determine if %s is under git control because git is not available(	   R   R	   t   controls_locationt   TrueR*   R+   R   R:   t   debug(   t   clsR6   t   r(    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyR~     s    			(   R
   s   git+https	   git+httpss   git+sshs   git+gits   git+fileN(   t   __name__t
   __module__t   nameRj   t	   repo_namet   schemesRd   R   R1   R8   RA   RC   RG   RJ   RO   RV   RB   R]   R^   R_   R`   Rb   Rc   R9   Rp   Ry   RK   RF   t   classmethodR~   (    (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyR	      s4   																						(   t
   __future__R    t   loggingR3   t   os.pathRg   t
   pip.compatR   t   pip.exceptionsR   t   pip._vendor.six.moves.urllibR   t   urllib_parseR   R   t   pip._vendor.packaging.versionR/   t	   pip.utilsR   R   t   pip.vcsR   R   R   R   t	   getLoggerR   R:   R	   t   register(    (    (    s/   /usr/lib/python2.7/site-packages/pip/vcs/git.pyt   <module>   s    		 