§
    |{ÈcÌ  ã            	       óÀ   — d Z ddlmZmZmZ d„ Zd„ Zd„ Zd„ Zdd„Z		 dd	ee
ee
         eee
e
f                  f         d
efd„Zd„ Zd„ Z G d„ de¦  «        Zd„ Zd„ ZdS )zObject specification.é    )ÚUnionÚListÚTuplec                 óR   — t          | dd ¦  «        �|                      d¦  «        } | S )NÚencodeÚascii)Úgetattrr   )Útexts    ú4/usr/lib/python3/dist-packages/dulwich/objectspec.pyÚto_bytesr      s*   € Ýˆt�X˜tÑ$Ô$Ð0Ø�{Š{˜7Ñ#Ô#ˆØ€Kó    c                 ó0   — t          |¦  «        }| |         S )zØParse a string referring to an object.

    Args:
      repo: A `Repo` object
      objectish: A string referring to an object
    Returns: A git object
    Raises:
      KeyError: If the object can not be found
    )r   )ÚrepoÚ	objectishs     r   Úparse_objectr       s   € õ ˜Ñ#Ô#€IØ�	Œ?Ðr   c                 ó¨   — t          |¦  «        }	 t          | |¦  «        }n# t          $ r Y nw xY w| |         }|j        dk    r| |j                 S |S )zÐParse a string referring to a tree.

    Args:
      repo: A `Repo` object
      treeish: A string referring to a tree
    Returns: A git object
    Raises:
      KeyError: If the object can not be found
    s   commit)r   Ú	parse_refÚKeyErrorÚ	type_nameÚtree)r   ÚtreeishÚos      r   Ú
parse_treer   .   sn   € õ �wÑÔ€GðÝ˜D 'Ñ*Ô*ˆˆøÝð ð ð ØˆðøøøàˆWŒ€AØ„{�iÒÐØ�A”FŒ|ÐØ€Hs   ‘" ¢
/®/c                 óŒ   — t          |¦  «        }|d|z   d|z   d|z   d|z   d|z   dz   g}|D ]
}|| v r|c S Œt          |¦  «        ‚)zÖParse a string referring to a reference.

    Args:
      container: A RefsContainer object
      refspec: A string referring to a ref
    Returns: A ref
    Raises:
      KeyError: If the ref can not be found
    s   refs/s
   refs/tags/ó   refs/heads/s   refs/remotes/s   /HEAD)r   r   )Ú	containerÚrefspecÚpossible_refsÚrefs       r   r   r   C   s€   € õ �wÑÔ€GàØ�7ÑØ˜ÑØ˜Ñ Ø˜7Ñ"Ø˜7Ñ" XÑ-ð€Mð ð ð ˆØ�)ÐÐØˆJˆJˆJð å
�7Ñ
Ô
Ðr   Fc                 óH  — t          |¦  «        }|                     d¦  «        rd}|dd…         }d|v r|                     d¦  «        \  }}n|x}}|dk    rd}nt          | |¦  «        }|dk    rd}n+	 t          ||¦  «        }n# t          $ r d|vrd|z   }Y nw xY w|||fS )	a  Parse a reftuple spec.

    Args:
      lh_container: A RefsContainer object
      rh_container: A RefsContainer object
      refspec: A string
    Returns: A tuple with left and right ref
    Raises:
      KeyError: If one of the refs can not be found
    ó   +Té   Nó   :r   ó   /r   )r   Ú
startswithÚsplitr   r   )Úlh_containerÚrh_containerr   ÚforceÚlhÚrhs         r   Úparse_reftupler,   \   sæ   € õ �wÑÔ€GØ×Ò˜$ÑÔð ØˆØ˜!˜"˜"”+ˆØˆw€€Ø—=’= Ñ&Ô&‰ˆˆRˆRàÐˆˆRØ	ˆS‚y€yØˆˆå�| RÑ(Ô(ˆØ	ˆS‚y€yØˆˆð	)Ý˜<¨Ñ,Ô,ˆBˆBøÝð 	)ð 	)ð 	)à˜2ˆ~ˆ~Ø# bÑ(�øøð	)øøøð ��Eˆ?Ðs   Á5B ÂBÂBÚrefspecsr)   c           	      ó�   — t          |t          ¦  «        s|g}g }|D ](}|                     t          | |||¬¦  «        ¦  «         Œ)|S )aX  Parse a list of reftuple specs to a list of reftuples.

    Args:
      lh_container: A RefsContainer object
      rh_container: A RefsContainer object
      refspecs: A list of refspecs or a string
      force: Force overwriting for all reftuples
    Returns: A list of refs
    Raises:
      KeyError: If one of the refs can not be found
    )r)   )Ú
isinstanceÚlistÚappendr,   )r'   r(   r-   r)   Úretr   s         r   Úparse_reftuplesr3      s^   € õ �h¥Ñ%Ô%ð Ø�:ˆØ
€Càð Uð UˆØ�
Š
•> ,°¸gÈUÐSÑSÔSÑTÔTÐTÐTØ€Jr   c                 óŠ   — t          |t          ¦  «        s|g}g }|D ]%}|                     t          | |¦  «        ¦  «         Œ&|S )zîParse a list of refspecs to a list of refs.

    Args:
      container: A RefsContainer object
      refspecs: A list of refspecs or a string
    Returns: A list of refs
    Raises:
      KeyError: If one of the refs can not be found
    )r/   r0   r1   r   )r   r-   r2   r   s       r   Ú
parse_refsr5   —   sU   € õ �h¥Ñ%Ô%ð Ø�:ˆØ
€CØð 2ð 2ˆØ�
Š
•9˜Y¨Ñ0Ô0Ñ1Ô1Ð1Ð1Ø€Jr   c                 ó\   — t          |¦  «        }t          t          | |¦  «        g¦  «        S )a@  Parse a string referring to a range of commits.

    Args:
      repo: A `Repo` object
      committishs: A string referring to a range of commits.
    Returns: An iterator over `Commit` objects
    Raises:
      KeyError: When the reference commits can not be found
      ValueError: If the range can not be parsed
    )r   ÚiterÚparse_commit)r   Úcommittishss     r   Úparse_commit_ranger:   ª   s,   € õ ˜;Ñ'Ô'€Kå•˜d KÑ0Ô0Ð1Ñ2Ô2Ð2r   c                   ó   — e Zd ZdZd„ ZdS )ÚAmbiguousShortIdzThe short id is ambiguous.c                 ó"   — || _         || _        d S )N)ÚprefixÚoptions)Úselfr>   r?   s      r   Ú__init__zAmbiguousShortId.__init__½   s   € ØˆŒØˆŒˆˆr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rA   © r   r   r<   r<   º   s)   € € € € € Ø$Ð$ðð ð ð ð r   r<   c                 óè   — g }| D ]2}|                      |¦  «        r|                     | |         ¦  «         Œ3|st          |¦  «        ‚t          |¦  «        dk    r|d         S t	          ||¦  «        ‚)z$Scan an object store for a short id.r"   r   )r%   r1   r   Úlenr<   )Úobject_storer>   r2   Ú	object_ids       r   Úscan_for_short_idrK   Â   s„   € ð €CØ!ð 0ð 0ˆ	Ø×Ò Ñ'Ô'ð 	0Ø�JŠJ�| IÔ.Ñ/Ô/Ð/øØð Ý�vÑÔÐÝ
ˆ3�x„x�1‚}€}Ø�1ŒvˆÝ
˜6 3Ñ
'Ô
'Ð'r   c                 ó˜  — t          |¦  «        }	 | |         S # t          $ r Y nw xY w	 | t          | |¦  «                 S # t          $ r Y nw xY wt          |¦  «        dk    rZt          |¦  «        dk     rG	 t	          |d¦  «         	 t          | j        |¦  «        S # t          $ r Y nw xY w# t          $ r Y nw xY wt          |¦  «        ‚)a'  Parse a string referring to a single commit.

    Args:
      repo: A` Repo` object
      committish: A string referring to a single commit.
    Returns: A Commit object
    Raises:
      KeyError: When the reference commits can not be found
      ValueError: If the range can not be parsed
    é   é(   é   )r   r   r   rH   ÚintrK   rI   Ú
ValueError)r   Ú
committishs     r   r8   r8   Ñ   s  € õ ˜*Ñ%Ô%€JðØ�JÔÐøÝð ð ð ØˆðøøøðØ•I˜d JÑ/Ô/Ô0Ð0øÝð ð ð Øˆðøøøå
ˆ:�„˜!ÒÐ¥ J¡¤°"Ò 4Ð 4ð	Ý�
˜BÑÔÐðÝ(¨Ô):¸JÑGÔGÐGøÝð ð ð Ø�ðøøøøõ ð 	ð 	ð 	ØˆDð	øøøõ �:Ñ
Ô
ÐsA   ‘ ™
&¥&ªA  Á 
AÁAÁ7B- ÂB Â
B*Â)B*Â-
B:Â9B:N)F)rE   Útypingr   r   r   r   r   r   r   r,   ÚbytesÚboolr3   r5   r:   Ú	Exceptionr<   rK   r8   rF   r   r   ú<module>rW      s:  ðð* Ð à %Ð %Ð %Ð %Ð %Ð %Ð %Ð %Ð %Ð %ðð ð ðð ð ðð ð ð*ð ð ð2 ð  ð  ð  ðL ðð à˜˜t Eœ{¨D°°u¸e°|Ô1DÔ,EÐEÔFðð ðð ð ð ð0ð ð ð&3ð 3ð 3ð ð ð ð ð �yñ ô ð ð(ð (ð (ðð ð ð ð r   