£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

7Re  c               @   s   d  d l  Z  d  d l 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 m Z d  d l m Z d  d l m Z Gd d	   d	 e  Z e j e  d S(
   i    N(   u   call_subprocess(   u   display_pathu   rmtree(   u   logger(   u   vcsu   VersionControl(   u   path_to_url(   u   ConfigParserc             B   s   |  Ee  Z d  Z d Z d Z d Z d! Z d Z d	 Z d
 d   Z	 d d   Z
 d d   Z d d   Z d d   Z d d   Z d d   Z d d   Z d d   Z d d   Z d d   Z d  S("   u	   Mercurialu   hgu   .hgu   cloneu   hg+httpu   hg+httpsu   hg+sshu   hg+static-httpu   hg-clone.txtug   # This was a Mercurial repo; to make it a repo again run:
hg init
hg pull %(url)s
hg update -r %(rev)s
c             C   s   d  } } x | j   D] } | j   s | j   j d  rE q n  t j d |  } | ru | j d  j   } n  t j d |  } | r | j d  j   } n  | r | r | | f Sq Wd S(   Nu   #u   hg\s*pull\s*(.*)\s*i   u   ^hg\s*update\s*-r\s*(.*)\s*(   NN(   u   Noneu
   splitlinesu   stripu
   startswithu   reu   searchu   group(   u   selfu   contentu   urlu   revu   lineu	   url_matchu	   rev_match(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   parse_vcs_bundle_file   s    
"u   Mercurial.parse_vcs_bundle_filec             C   s`   t  j d d  } |  j |  z/ t |  j d | g d |  j d d d | Wd t |  Xd S(	   u?   Export the Hg repository at the url to the destination locationu   -exportu   pip-u   archiveu   filter_stdoutu   show_stdoutu   cwdNF(   u   tempfileu   mkdtempu   unpacku   call_subprocessu   cmdu   _filteru   Falseu   rmtree(   u   selfu   locationu   temp_dir(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   export%   s    u   Mercurial.exportc             C   s   t  j j | |  j d  } t j   } yJ | j |  | j d d |  t | d  } | j	 |  | j
   WnB t t j f k
 r t j   d } t j d | | f  Yn! Xt |  j d d g | d	 | d  S(
   Nu   hgrcu   pathsu   defaultu   wi   u/   Could not switch Mercurial repository to %s: %su   updateu   -qu   cwd(   u   osu   pathu   joinu   dirnameu   ConfigParseru   SafeConfigParseru   readu   setu   openu   writeu   closeu   OSErroru   NoSectionErroru   sysu   exc_infou   loggeru   warnu   call_subprocessu   cmd(   u   selfu   destu   urlu   rev_optionsu   repo_configu   configu   config_fileu   e(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   switch0   s    u   Mercurial.switchc             C   s@   t  |  j d d g d | t  |  j d d g | d | d  S(   Nu   pullu   -qu   cwdu   update(   u   call_subprocessu   cmd(   u   selfu   destu   rev_options(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   updateA   s    u   Mercurial.updatec             C   s   |  j    \ } } | r. | g } d | } n g  } d } |  j | | | |  r t j d | | t |  f  t |  j d d d | | g  t |  j d d g | d | n  d  S(	   Nu    (to revision %s)u    u   Cloning hg %s%s to %su   cloneu
   --noupdateu   -qu   updateu   cwd(   u   get_url_revu   check_destinationu   loggeru   notifyu   display_pathu   call_subprocessu   cmd(   u   selfu   destu   urlu   revu   rev_optionsu   rev_display(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   obtainF   s    		u   Mercurial.obtainc             C   sR   t  |  j d d g d d d | j   } |  j |  rH t |  } n  | j   S(   Nu
   showconfigu   paths.defaultu   show_stdoutu   cwdF(   u   call_subprocessu   cmdu   Falseu   stripu   _is_local_repositoryu   path_to_url(   u   selfu   locationu   url(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   get_urlT   s    u   Mercurial.get_urlc             C   s   t  |  j d g d d d | } g  } x{ | j   D]m } t j d |  } | r4 | j d  } | j d  } d | k r | j | j   | j   f  q q4 q4 Wt	 |  S(	   Nu   tagsu   show_stdoutu   cwdu   ([\w\d\.-]+)\s*([\d]+):.*$i   i   u   tipF(
   u   call_subprocessu   cmdu   Falseu
   splitlinesu   reu   searchu   groupu   appendu   stripu   dict(   u   selfu   locationu   tagsu   tag_revsu   lineu
   tags_matchu   tagu   rev(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   get_tag_revs\   s    )u   Mercurial.get_tag_revsc             C   s   t  |  j d g d d d | } g  } x{ | j   D]m } t j d |  } | r4 | j d  } | j d  } d | k r | j | j   | j   f  q q4 q4 Wt	 |  S(	   Nu   branchesu   show_stdoutu   cwdu   ([\w\d\.-]+)\s*([\d]+):.*$i   i   u   defaultF(
   u   call_subprocessu   cmdu   Falseu
   splitlinesu   reu   searchu   groupu   appendu   stripu   dict(   u   selfu   locationu   branchesu   branch_revsu   lineu   branches_matchu   branchu   rev(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   get_branch_revsi   s    )u   Mercurial.get_branch_revsc             C   s.   t  |  j d d g d d d | j   } | S(   Nu   parentsu   --template={rev}u   show_stdoutu   cwdF(   u   call_subprocessu   cmdu   Falseu   strip(   u   selfu   locationu   current_revision(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   get_revisionv   s    u   Mercurial.get_revisionc             C   s.   t  |  j d d g d d d | j   } | S(   Nu   parentsu   --template={node}u   show_stdoutu   cwdF(   u   call_subprocessu   cmdu   Falseu   strip(   u   selfu   locationu   current_rev_hash(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   get_revision_hash|   s    u   Mercurial.get_revision_hashc             C   s   |  j  |  } | j   j d  s1 d | } n  | j   j d d  d } | sW d  S|  j |  } |  j |  } |  j |  } |  j	 |  }	 | | k r d | | | f }
 n- | |	 k r d | |	 | f }
 n
 d | }
 d | | |
 f S(	   Nu   hg:u   hg+u   -i   i    u   %s-%su   %s-devu   %s@%s#egg=%s(
   u   get_urlu   loweru
   startswithu   egg_nameu   splitu   Noneu   get_revisionu   get_revision_hashu   get_tag_revsu   get_branch_revs(   u   selfu   distu   locationu	   find_tagsu   repou   egg_project_nameu   current_revu   current_rev_hashu   tag_revsu   branch_revsu   full_egg_name(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   get_src_requirement   s     
u   Mercurial.get_src_requirementN(   u   hgu   hg+httpu   hg+httpsu   hg+sshu   hg+static-http(   u   __name__u
   __module__u   __qualname__u   nameu   dirnameu	   repo_nameu   schemesu   bundle_fileu   guideu   parse_vcs_bundle_fileu   exportu   switchu   updateu   obtainu   get_urlu   get_tag_revsu   get_branch_revsu   get_revisionu   get_revision_hashu   get_src_requirement(   u
   __locals__(    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu	   Mercurial   s"   u	   Mercurial(   u   osu   tempfileu   reu   sysu   pip.utilu   call_subprocessu   display_pathu   rmtreeu   pip.logu   loggeru   pip.vcsu   vcsu   VersionControlu   pip.downloadu   path_to_urlu   pip.backwardcompatu   ConfigParseru	   Mercurialu   register(    (    (    u*   /tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu   <module>   s   