Ë
    ùmxi¬  ã            	       ó¬  — U d dl Z g d¢Ze j                  dk(  rej                  d«       d dlmZ d dlZ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Zd dlZd dlZd dlZd dlZd dlZd dlmZmZ d dlZd d	lmZmZmZmZmZm Z m!Z!m"Z"m#Z# d d
l$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 e2rd dl7m8Z8 d dl9m:Z:m;Z; d dl<m=Z= d dl>m?Z? d dl@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZI  e3de4d   d¬«      ZJ e
j–                  eL«      ZMdeNdeOdeOfd„ZPdeNdeOdeOfd„ZQ eQdd«      ZR eQdd«      ZS e3d«      ZTde(deTf   de(deTf   fd„ZUej¬                  deEde*eEddf   fd „«       ZWej¬                  deNd!eNde*d"   fd#„«       ZXd$eEddfd%„ZYd$eEddfd&„ZZdnd'e'd(e'd)e[de[fd*„Z\d+eEd,eEdeEfd-„Z]e j                  dk(  rd$eEdeEfd.„Z^d$eEdeNfd/„Z_e^Z`n
d$eEdeNfd0„Z_e_Z`d+eEd,eEdeEfd1„Zadod$eEd3eOdeOfd4„Zbde0eN   fd5„Zcdpd6eNd$e.eE   de-eN   fd7„Zdd8e.eN   d$eNdeNfd9„Ze ejÌ                  d:«      d;„ d2f ejÌ                  d<«      eed2f ejÌ                  d=«      eed2f ejÌ                  d>ejÎ                  «      d?„ df ejÌ                  d@«      dA„ d2ffZhe1e1e/eN   e(eOf   df   eidB<   d$eNdeNfdC„Zj ejÌ                  dD«      Zkd$eEdeNfdE„Zli Zme)eNe.eO   f   eidF<   dGeNdeOfdH„Zne6dGddeDd2   fdI„«       Zoe6dGeEdeOfdJ„«       ZodGe4deEf   deOfdK„ZodeNfdL„ZpdMe4ejâ                  dNf   dOe%ddfdP„Zre6dqd,ddQeOddfdR„«       Zse6dqd,eEdQeOdeNfdS„«       Zsdrd,e4deEf   dQeOde.eE   fdT„ZsdUe0eN   de-eN   fdV„Zt G dW„ dX«      Zu G dY„ dZeu«      Zv G d[„ d\«      Zw G d]„ d^«      Zx G d_„ d`«      Zy G da„ db«      Zz G dc„ ddez«      Z{ G de„ dfe-eJ   «      Z|eI G dg„ dheF«      «       Z} G di„ dje~«      Z G dk„ dle¬m«      Z€y)sé    N)Ústream_copyÚ	join_pathÚto_native_path_linuxÚjoin_path_nativeÚStatsÚIndexFileSHA1WriterÚIterableObjÚIterableListÚBlockingLockFileÚLockFileÚActorÚget_user_idÚassure_directory_existsÚRemoteProgressÚCallableRemoteProgressÚrmtreeÚunbare_repoÚHIDE_WINDOWS_KNOWN_ERRORSÚwin32Úto_native_path_windows)Úabstractmethod)Úwraps)ÚPath)ÚurlsplitÚ
urlunsplit)	Ú	LazyMixinÚLockedFDÚ
bin_to_hexÚfile_contents_roÚfile_contents_ro_filepathÚ
hex_to_binÚmake_shaÚ
to_bin_shaÚ
to_hex_sha)ÚAnyÚAnyStrÚBinaryIOÚCallableÚDictÚ	GeneratorÚIOÚIteratorÚListÚOptionalÚPatternÚSequenceÚTupleÚTYPE_CHECKINGÚTypeVarÚUnionÚcastÚoverload)ÚGit)ÚGitConfigParserÚSectionConstraint)ÚRemote)ÚRepo)	ÚFiles_TDÚHas_id_attributeÚHSH_TDÚLiteralÚPathLikeÚProtocolÚSupportsIndexÚTotal_TDÚruntime_checkableÚT_IterableObj)r	   r=   T)ÚboundÚ	covariantÚnameÚdefaultÚreturnc                 óü   — 	 t         j                  |    }t        j	                  d| «       |j                  «       j                  «       }|dv ry|dv ryt        j	                  d| ||«       |S # t        $ r |cY S w xY w)z…Read a boolean flag from an environment variable.

    :return:
        The flag, or the `default` value if absent or ambiguous.
    zlThe %s environment variable is deprecated. Its effect has never been documented and changes without warning.>   Ú Ú0ÚnoÚfalseF>   Ú1ÚyesÚtrueTz-%s has unrecognized value %r, treating as %r.)ÚosÚenvironÚKeyErrorÚ_loggerÚwarningÚstripÚlower)rH   rI   ÚvalueÚadjusted_values       ú?/home/htdocs/ttos/venv/lib/python3.12/site-packages/git/util.pyÚ_read_env_flagr]   s   s†   € ðÜ—
‘
˜4Ñ ˆô ‡O�OØvØôð
 —[‘[“]×(Ñ(Ó*€NàÐ1Ñ1ØØÐ-Ñ-ØÜ‡O�OÐCÀTÈ5ÐRYÔZØ€Nøô ò ØŠðús   ‚A- Á-A;Á:A;c                 óD   — t         j                  dk(  xr t        | |«      S )a  Read a boolean flag from an environment variable on Windows.

    :return:
        On Windows, the flag, or the `default` value if absent or ambiguous.
        On all other operating systems, ``False``.

    :note:
        This only accesses the environment on Windows.
    r   )ÚsysÚplatformr]   )rH   rI   s     r\   Ú_read_win_env_flagra   �   s   € ô �<‰<˜7Ñ"ÒD¤~°d¸GÓ'DÐDó    r   ÚHIDE_WINDOWS_FREEZE_ERRORSÚTÚfunc.c           	      óh   ‡ ‡— ddl mŠ t        ‰ «      dddt        dt        dt        fˆˆ fd„«       }|S )	ztMethods with this decorator raise :exc:`~git.exc.InvalidGitRepositoryError` if
    they encounter a bare repository.é   )ÚInvalidGitRepositoryErrorÚselfr:   ÚargsÚkwargsrJ   c                 ór   •— | j                   j                  r ‰d‰j                  z  «      ‚ ‰| g|¢­i |¤ŽS )Nz/Method '%s' cannot operate on bare repositories)ÚrepoÚbareÚ__name__)ri   rj   rk   rh   re   s      €€r\   Úwrapperzunbare_repo.<locals>.wrapper«   s;   ø€ à�9‰9�>Š>Ù+Ð,]Ð`d×`mÑ`mÑ,mÓnÐná�DÐ*˜4Ò* 6Ñ*Ð*rb   )Úexcrh   r   r%   rd   )re   rp   rh   s   ` @r\   r   r   ¥   sA   ù€ õ /ä
ˆ4ƒ[ð+�hð +¤sð +´cð +¼aõ +ó ð+ð €Nrb   Únew_dirc              #   óÆ   K  — t        j                  «       }t        j                  | «       	 | –— t        j                  |«       y# t        j                  |«       w xY w­w)záContext manager to temporarily change directory.

    This is similar to :func:`contextlib.chdir` introduced in Python 3.11, but the
    context manager object returned by a single call to this function is not reentrant.
    N)rS   ÚgetcwdÚchdir)rr   Úold_dirs     r\   Úcwdrw   ·   sA   è ø€ ô �i‰i‹k€GÜ‡H�HˆWÔðØŠä
�‰�ÕøŒ�‰�Õüs   ‚*A!­A ±A!ÁAÁA!rZ   )NNNc              #   ó  K  — t        j                  | «      }|t         j                  | <   	 d–— |€t         j                  | = y|t         j                  | <   y# |€t         j                  | = w |t         j                  | <   w xY w­w)z=Context manager to temporarily patch an environment variable.N)rS   ÚgetenvrT   )rH   rZ   Ú	old_values      r\   Ú	patch_envr{   Æ   sn   è ø€ ô —	‘	˜$“€IØ„B‡J�JˆtÑð)ÛàÐÜ—
‘
˜4Ñ à(ŒB�J‰J�tÒøð ÐÜ—
‘
˜4Ñ à(ŒB�J‰J�tÒüs   ‚)B¬A °(BÁ)BÂBÚpathc                 ó
  — dt         dt        dt        ddfd„}t        j                  dk7  rt        j                  | «       yt        j                  dk\  rt        j                  | |¬	«       yt        j                  | |¬
«       y)zëRemove the given directory tree recursively.

    :note:
        We use :func:`shutil.rmtree` but adjust its behaviour to see whether files that
        couldn't be deleted are read-only. Windows will not remove them in that case.
    Úfunctionr|   Ú_excinforJ   Nc                 ó²   — t        j                  |t        j                  «       	  | |«       y# t        $ r}t
        rddlm}  |d|› �«      |‚‚ d}~ww xY w)zuCallback for :func:`shutil.rmtree`.

        This works as either a ``onexc`` or ``onerror`` style callback.
        r   )ÚSkipTestz%FIXME: fails with: PermissionError
  N)rS   ÚchmodÚstatÚS_IWUSRÚPermissionErrorr   Úunittestr�   )r~   r|   r   Úexr�   s        r\   Úhandlerzrmtree.<locals>.handlerÜ   sQ   € ô 	�‰�”t—|‘|Ô$ð	Ù�T�NøÜò 	Ý(Ý-áÐ!GÈÀtÐLÓMÐSUÐUØûð	ús   ¦/ ¯	A¸AÁAr   )é   é   )Úonexc)Úonerror)r(   r@   r%   r_   r`   Úshutilr   Úversion_info)r|   rˆ   s     r\   r   r   Ô   sg   € ðœ(ð ¬(ð ¼cð Àdó ô" ‡|�|�wÒÜ�‰�dÕÜ	×	Ñ	˜WÒ	$Ü�‰�d 'Ö*ä�‰�d GÖ,rb   c                 ó¬   — t        j                  | «      r?t        j                  dk(  rt	        j
                  | d«       t	        j                  | «       yy)zWEnsure file deleted also on *Windows* where read-only files need special
    treatment.r   iÿ  N)ÚospÚisfiler_   r`   rS   r‚   Úremove©r|   s    r\   Úrmfiler”   õ   s:   € ô ‡z�z�$ÔÜ�<‰<˜7Ò"Ü�H‰H�T˜5Ô!Ü
�	‰	�$�ð rb   ÚsourceÚdestinationÚ
chunk_sizec                 óŒ   — d}	 | j                  |«      }|j                  |«       |t        |«      z  }t        |«      |k  r	 |S ŒB)z›Copy all data from the `source` stream into the `destination` stream in chunks
    of size `chunk_size`.

    :return:
        Number of bytes written
    r   )ÚreadÚwriteÚlen)r•   r–   r—   ÚbrÚchunks        r\   r   r   þ   sO   € ð 
€BØ
Ø—‘˜JÓ'ˆØ×Ñ˜%Ô Ø
Œc�%‹jÑˆÜˆu‹:˜
Ò"Øà€Ið rb   ÚaÚpc                 óê   — t        j                  | «      }|D ]X  }t        j                  |«      }|sŒ|j                  d«      r	||dd z  }Œ5|dk(  s|j                  d«      r||z  }ŒQ|d|z   z  }ŒZ |S )zmJoin path tokens together similar to osp.join, but always use ``/`` instead of
    possibly ``\`` on Windows.ú/rg   NrL   )rS   ÚfspathÚ
startswithÚendswith)rž   rŸ   r|   Úbs       r\   r   r     s}   € ô �9‰9�Q‹<€DØò 	ˆÜ�I‰I�a‹LˆÙØØ�<‰<˜ÔØ�A�a�b�E‰M‰DØ�RŠZ˜4Ÿ=™=¨Ô-Ø�A‰I‰Dà�C˜!‘G‰O‰Dð	ð €Krb   c                 óP   — t        j                  | «      } | j                  dd«      S )Nr¡   ú\©rS   r¢   Úreplacer“   s    r\   r   r   $  s    € Ü�y‰y˜‹ˆØ�|‰|˜C Ó&Ð&rb   c                 óP   — t        j                  | «      } | j                  dd«      S )Nr§   r¡   r¨   r“   s    r\   r   r   (  s    € Ü�y‰y˜‹ˆØ�|‰|˜D #Ó&Ð&rb   c                 ó,   — t        j                  | «      S ©N)rS   r¢   r“   s    r\   r   r   /  s   € Ü�y‰y˜‹Ðrb   c                 ó,   — t        t        | g|¢­Ž «      S )z°Like :func:`join_path`, but makes sure an OS native path is returned.

    This is only needed to play it safe on Windows and to ensure nice paths that only
    use ``\``.
    )Úto_native_pathr   )rž   rŸ   s     r\   r   r   5  s   € ô œ) AÐ*¨Ò*Ó+Ð+rb   FÚis_filec                 óŒ   — |rt        j                  | «      } t        j                  | «      st        j                  | d¬«       yy)a$  Make sure that the directory pointed to by path exists.

    :param is_file:
        If ``True``, `path` is assumed to be a file and handled correctly.
        Otherwise it must be a directory.

    :return:
        ``True`` if the directory was created, ``False`` if it already existed.
    T)Úexist_okF)r�   ÚdirnameÚisdirrS   Úmakedirs)r|   r¯   s     r\   r   r   >  s4   € ñ Ü�{‰{˜4Ó ˆä�9‰9�TŒ?Ü
�‰�D 4Õ(ØØrb   c                  óÎ   — t         j                  j                  dd «      } | r/t        d„ | j	                  t         j
                  «      D «       «      S t        j                  dk(  ryy)NÚPATHEXTc              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr¬   )Úupper)Ú.0rŸ   s     r\   ú	<genexpr>z&_get_exe_extensions.<locals>.<genexpr>T  s   è ø€ ÒB 1�Q—W‘W—YÑBùs   ‚r   )z.BATz.COMz.EXE© )rS   rT   ÚgetÚtupleÚsplitÚpathsepr_   r`   )r¶   s    r\   Ú_get_exe_extensionsrÀ   Q  sI   € Ü�j‰j�n‰n˜Y¨Ó-€GÙÜÑB¨¯©´b·j±jÓ(AÔBÓBÐBÜ	�‰˜Ò	 Ø'àrb   Úprogramc                 ó¨  ‡— t        «       Šdt        dt        fˆfd„}g }|st        j                  d   }t        j
                  |«      j                  t        j                  «      D ]c  }|j                  d«      }|sŒt        j                  || «      }|g‰D �cg c]  }|›|›�‘Œ
 c}z   D ]  } ||«      sŒ|j                  |«       Œ Œe |S c c}w )a6  Perform a path search to assist :func:`is_cygwin_git`.

    This is not robust for general use. It is an implementation detail of
    :func:`is_cygwin_git`. When a search following all shell rules is needed,
    :func:`shutil.which` can be used instead.

    :note:
        Neither this function nor :func:`shutil.which` will predict the effect of an
        executable search on a native Windows system due to a :class:`subprocess.Popen`
        call without ``shell=True``, because shell and non-shell executable search on
        Windows differ considerably.
    ÚfpathrJ   c                 óÜ   •‡ — t        j                  ‰ «      xrT t        j                  ‰ t        j                  «      xr. t
        j                  dk7  xs ‰ xs t        ˆ fd„‰D «       «      S )Nr   c              3   ó\   •K  — | ]#  }‰j                  «       j                  |«      –— Œ% y ­wr¬   )r¸   r¤   )r¹   ÚextrÃ   s     €r\   rº   z,py_where.<locals>.is_exec.<locals>.<genexpr>p  s$   øè ø€ ÒBwÐcfÀ5Ç;Á;Ã=×CYÑCYÐZ]×C^ÑBwùs   ƒ),)r�   r‘   rS   ÚaccessÚX_OKr_   r`   Úany)rÃ   Úwinprog_extss   `€r\   Úis_execzpy_where.<locals>.is_execk  sW   ù€ ä�J‰J�uÓò Ü—	‘	˜%¤§¡Ó)òô —‘ Ñ'Òw¨|Ð+;Òw¼sÓBwÐjvÔBwÓ?wð		
rb   ÚPATHú")rÀ   ÚstrÚboolrS   rT   r¢   r¾   r¿   rX   r�   ÚjoinÚappend)	rÁ   r|   rË   ÚprogsÚfolderÚexe_pathÚeÚfrÊ   s	           @r\   Úpy_wherer×   [  sÄ   ø€ ô 'Ó(€Lð
”sð 
œtõ 
ð €EÙÜ�z‰z˜&Ñ!ˆÜ—)‘)˜D“/×'Ñ'¬¯
©
Ó3ò $ˆØ—‘˜cÓ"ˆÚÜ—x‘x ¨Ó0ˆHØ�ZÀ<Ö"P¸a©X±qÒ#9Ò"PÑPò $�Ù˜1•:Ø—L‘L •Oñ$ð	$ð €Lùò #Qs   ÂCÚdrivec                 ó~  — t        j                  |«      r| s|}n}|xr; t        j                  t        j                  t        j                  |«      «      «      }t        j                  |«      r| r|}n$t        |«      }n| rd| j                  «       ›d|›�}t        j                  |«      }|j                  dd«      S )Nz/proc/cygdrive/r¡   r§   )
r�   ÚisabsÚnormpathÚ
expandvarsÚ
expanduserÚcygpathrY   rS   r¢   r©   )rØ   r|   rŸ   Úp_strs       r\   Ú
_cygexpathrà   �  sˆ   € Ü
‡y�y�„™uð ‰àÒG”S—\‘\¤#§.¡.´·±ÀÓ1EÓ"FÓGˆÜ�9‰9�QŒ<Ùà‘ä˜A“J‘ÚØ*/¯+©+­-¹Ð;ˆAÜ�I‰I�a‹L€EØ�=‰=˜˜sÓ#Ð#rb   z*\\\\\?\\UNC\\([^\\]+)\\([^\\]+)(?:\\(.*))?c           	      ó8   — d| ›d|›d|j                  dd«      ›�S )Nú//r¡   r§   )r©   )ÚserverÚshareÚ	rest_paths      r\   ú<lambda>ræ   ™  s   � º&Â%È×IZÑIZÐ[_ÐadÔIeÐ*f€ rb   z\\\\\?\\(\w):[/\\](.*)z(\w):[/\\](.*)z	file:(.*)c                 ó   — | S r¬   r»   )rå   s    r\   ræ   ræ   ž  s   € ¸	€ rb   z(\w{2,}:.*)c                 ó   — | S r¬   r»   )Úurls    r\   ræ   ræ   Ÿ  s   € ¨c€ rb   Ú_cygpath_parsersc                 óô   — t        j                  | «      } | j                  d«      sQt        D ]<  \  }}}|j	                  | «      }|sŒ ||j                  «       Ž } |rt        | «      }  | S  t        d| «      } | S )zJUse :meth:`git.cmd.Git.polish_url` instead, that works on any environment.)z	/cygdriverâ   z/proc/cygdriveN)rS   r¢   r£   rê   ÚmatchÚgroupsrÞ   rà   )r|   ÚregexÚparserÚrecurserì   s        r\   rÞ   rÞ   £  s|   € ä�9‰9�T‹?€Dà�?‰?Ð@ÔAÜ&6ò 	*Ñ"ˆE�6˜7Ø—K‘K Ó%ˆEÚÙ˜uŸ|™|›~Ð.�ÙÜ" 4›=�DØð €Kð	*ô ˜d DÓ)ˆDà€Krb   z(?:/proc)?/cygdrive/(\w)(/.*)?c                 óÖ   — t        j                  | «      } t        j                  | «      }|r,|j	                  «       \  }}|j                  «       ›d|xs d›�} | j                  dd«      S )Nú:rL   r¡   r§   )rS   r¢   Ú_decygpath_regexrì   rí   r¸   r©   )r|   ÚmrØ   rå   s       r\   Ú	decygpathrõ   ¸  sY   € Ü�9‰9�T‹?€DÜ×Ñ˜tÓ$€AÙØŸ8™8›:ÑˆˆyØŸ+™+�-¨ª°b¨Ð9ˆà�<‰<˜˜TÓ"Ð"rb   Ú_is_cygwin_cacheÚgit_executablec                 óŠ  — t         j                  | «      }|€ÿd}	 t        j                  | «      }|s't	        | «      }|rt        j                  |d   «      nd}t        j
                  |d«      }t        |«      j                  «       r$t        j                  |t        j                  «      s$t        j                  d|› d�«       |t         | <   |S t        j                  |gt        j                  d¬«      }|j!                  «       \  }}d	|v }|t         | <   |S # t"        $ r }t        j                  d
|«       Y d }~Œ/d }~ww xY w)NFr   rL   Úunamez&Failed checking if running in CYGWIN: z is not an executableT)ÚstdoutÚuniversal_newlinesÚCYGWINz/Failed checking if running in CYGWIN due to: %r)rö   r¼   r�   r²   r×   rÐ   r   r¯   rS   rÇ   rÈ   rV   ÚdebugÚ
subprocessÚPopenÚPIPEÚcommunicateÚ	Exception)	r÷   Ú	is_cygwinÚgit_dirÚresÚ	uname_cmdÚprocessÚ	uname_outÚ_r‡   s	            r\   Ú_is_cygwin_gitr
  Ç  s  € Ü ×$Ñ$ ^Ó4€IØÐØˆ	ð	QÜ—k‘k .Ó1ˆGÙÜ˜~Ó.�Ù14œ#Ÿ+™+ c¨!¡fÔ-¸"�ô Ÿ™ ¨'Ó2ˆIä˜“O×+Ñ+Ô-´"·)±)¸IÄrÇwÁwÔ2OÜ—‘Ð FÀyÀkÐQfÐgÔhØ3<Ô  Ñ0Ø Ð ä ×&Ñ&¨	 {¼:¿?¹?Ð_cÔdˆGØ"×.Ñ.Ó0‰LˆI�qà  IÐ-ˆIð ,5Ô˜Ñ(àÐøô	 ò 	QÜ�M‰MÐKÈR×PÑPûð	Qús   ›B4D Ã>D Ä	EÄ"D=Ä=Ec                  ó   — y r¬   r»   ©r÷   s    r\   Úis_cygwin_gitr  ä  ó   € Ø;>rb   c                  ó   — y r¬   r»   r  s    r\   r  r  è  s   € Ø58rb   c                 óª   — t         j                  dt        j                  ›d| ›�«       t        j                  dk7  ry| €yt	        t        | «      «      S )Nzsys.platform=z, git_executable=ÚcygwinF)rV   rý   r_   r`   r
  rÎ   r  s    r\   r  r  ì  sJ   € ä‡M�M�M¤#§,¡,Ð!1Ð1BÀ>ÐBTÐUÔVÜ
‡|�|�xÒØØ	Ð	Øäœc .Ó1Ó2Ð2rb   c                  óX   — t        j                  «       ›dt        j                  «       ›�S )zM:return: String identifying the currently active system user as ``name@node``ú@)ÚgetpassÚgetuserr`   Únoder»   rb   r\   r   r   ÷  s   € ä—o‘oÕ'¬¯©¬Ð9Ð9rb   ÚproczGit.AutoInterruptrk   c                 ó(   —  | j                   di |¤Ž y)zXWait for the process (clone, fetch, pull or push) and handle its errors
    accordingly.Nr»   )Úwait)r  rk   s     r\   Úfinalize_processr  ü  s   € ð €D‡I�IÑ�Órb   Úexpand_varsc                  ó   — y r¬   r»   ©rŸ   r  s     r\   Úexpand_pathr    r  rb   c                  ó   — y r¬   r»   r  s     r\   r  r    s   € ð rb   c                 ó
  — t        | t        «      r| j                  «       S 	 t        j                  | «      } |rt        j
                  | «      } t        j                  t        j                  | «      «      S # t        $ r Y y w xY wr¬   )	Ú
isinstancer   Úresolver�   rÝ   rÜ   rÛ   Úabspathr  r  s     r\   r  r    se   € Ü�!”TÔØ�y‰y‹{ÐðÜ�N‰N˜1ÓˆÙÜ—‘˜qÓ!ˆAÜ�|‰|œCŸK™K¨›NÓ+Ð+øÜò Ùðús   ¢AA6 Á6	BÂBÚcmdlinec                 óÞ  — g }t        | «      D ]Í  \  }}|j                  |«       	 t        |«      }|j                  €|j                  €Œ<|j                  �6|j                  |j                  j                  |j                  d«      ¬«      }|j                  �6|j                  |j                  j                  |j                  d«      ¬«      }t        |«      ||<   ŒÏ |S # t        $ r Y ŒÝw xY w)a>  Parse any command line argument and if one of the elements is an URL with a
    username and/or password, replace them by stars (in-place).

    If nothing is found, this just returns the command line as-is.

    This should be used for every log line that print a command line, as well as
    exception messages.
    z*****)Únetloc)
Ú	enumeraterÑ   r   ÚpasswordÚusernameÚ_replacer&  r©   r   Ú
ValueError)r$  Únew_cmdlineÚindexÚto_parseré   s        r\   Úremove_password_if_presentr/    sÜ   € ð €KÜ$ WÓ-ò ‰ˆˆxØ×Ñ˜8Ô$ð	Ü˜8Ó$ˆCà�|‰|Ð#¨¯©Ð(<Øà�|‰|Ð'Ø—l‘l¨#¯*©*×*<Ñ*<¸S¿\¹\È7Ó*S�lÓT�Ø�|‰|Ð'Ø—l‘l¨#¯*©*×*<Ñ*<¸S¿\¹\È7Ó*S�lÓT�Ü!+¨C£ˆK˜Òðð  Ðøô ò 	áð	ús   ¦#C Á
BC Ã 	C,Ã+C,c                   óR  — e Zd ZU dZdZeed<    ee«      D � �cg c]  }d|z  ‘Œ	 c}} \	  ZZ	Z
ZZZZZZee	z  Ze ZdZdZdZ ej.                  d«      Z ej.                  d	«      Zdd„Zded
dfd„Zd
eegdf   fd„Zded
dfd„Z 	 	 ddede!ee"f   de!ee"df   ded
df
d„Z#yc c}} w )r   zÊHandler providing an interface to parse progress information emitted by
    :manpage:`git-push(1)` and :manpage:`git-fetch(1)` and to dispatch callbacks
    allowing subclasses to react to the progress.é	   Ú_num_op_codesrg   zdone.z, )Ú	_cur_lineÚ	_seen_opsÚerror_linesÚother_linesz%(remote: )?([\w\s]+):\s+()(\d+)()(.*)z2(remote: )?([\w\s]+):\s+(\d+)% \((\d+)/(\d+)\)(.*)rJ   Nc                 ó<   — g | _         d | _        g | _        g | _        y r¬   )r4  r3  r5  r6  ©ri   s    r\   Ú__init__zRemoteProgress.__init__[  s    € Ø$&ˆŒØ(,ˆŒØ&(ˆÔØ&(ˆÕrb   Úlinec                 óà  — t        |t        «      r|j                  d«      }n|}|| _        | j                  j	                  d«      r&| j
                  j                  | j                  «       yd\  }}| j                  j                  |«      }|€| j                  j                  |«      }|s-| j                  |«       | j                  j                  |«       yd}|j                  «       \  }}}	}}}
|dk(  r|| j                  z  }n�|dk(  r|| j                  z  }n{|dk(  r|| j                  z  }nf|d	k(  r|| j                   z  }nQ|d
k(  r|| j"                  z  }n<|dk(  r|| j$                  z  }n'|dk(  r|| j&                  z  }n| j                  |«       y|| j(                  vr*| j(                  j                  |«       || j*                  z  }|
€d}
|
j-                  «       }
|
j/                  | j0                  «      r(|| j2                  z  }|
dt5        | j0                  «        }
|
j-                  | j6                  «      }
| j9                  ||xr t;        |«      |xr t;        |«      |
«       y)a^  Parse progress information from the given line as retrieved by
        :manpage:`git-push(1)` or :manpage:`git-fetch(1)`.

        - Lines that do not contain progress info are stored in :attr:`other_lines`.
        - Lines that seem to contain an error (i.e. start with ``error:`` or ``fatal:``)
          are stored in :attr:`error_lines`.
        zutf-8)zerror:zfatal:N)NNr   zCounting objectszCompressing objectszWriting objectszReceiving objectszResolving deltaszFinding sourceszChecking out filesrL   )r!  ÚbytesÚdecoder3  r£   r5  rÑ   Úre_op_relativerì   Úre_op_absoluteÚline_droppedr6  rí   ÚCOUNTINGÚCOMPRESSINGÚWRITINGÚ	RECEIVINGÚ	RESOLVINGÚFINDING_SOURCESÚCHECKING_OUTr4  ÚBEGINrX   r¤   Ú
DONE_TOKENÚENDr›   ÚTOKEN_SEPARATORÚupdateÚfloat)ri   r:  Úline_strÚ	cur_countÚ	max_countrì   Úop_codeÚ_remoteÚop_nameÚ_percentÚmessages              r\   Ú_parse_progress_linez#RemoteProgress._parse_progress_linea  sV  € ô �dœEÔ"Ø—{‘{ 7Ó+‰HàˆHØ!ˆŒà�>‰>×$Ñ$Ð%9Ô:Ø×Ñ×#Ñ# D§N¡NÔ3Øà)Ñˆ	�9Ø×#Ñ#×)Ñ)¨(Ó3ˆØˆ=Ø×'Ñ'×-Ñ-¨hÓ7ˆEáØ×Ñ˜hÔ'Ø×Ñ×#Ñ# HÔ-Øð ˆØDIÇLÁLÃNÑAˆ�˜( I¨y¸'ð Ð(Ò(Ø�t—}‘}Ñ$‰GØÐ-Ò-Ø�t×'Ñ'Ñ'‰GØÐ)Ò)Ø�t—|‘|Ñ#‰GØÐ+Ò+Ø�t—~‘~Ñ%‰GØÐ*Ò*Ø�t—~‘~Ñ%‰GØÐ)Ò)Ø�t×+Ñ+Ñ+‰GØÐ,Ò,Ø�t×(Ñ(Ñ(‰Gð ×Ñ˜hÔ'ð ð ˜$Ÿ.™.Ñ(Ø�N‰N×!Ñ! 'Ô*Ø�t—z‘zÑ!ˆGð ˆ?ØˆGð —-‘-“/ˆØ×Ñ˜DŸO™OÔ,Ø�t—x‘xÑˆGØÐ5¤ T§_¡_Ó!5Ð 5Ð6ˆGà—-‘- × 4Ñ 4Ó5ˆà�‰ØØÒ*œ% 	Ó*ØÒ*œ% 	Ó*Øõ		
rb   c                 ó$   ‡ — dt         ddfˆ fd„}|S )zº
        :return:
            A progress handler suitable for :func:`~git.cmd.handle_process_output`,
            passing lines on to this progress handler in a suitable format.
        r:  rJ   Nc                 óB   •— ‰j                  | j                  «       «      S r¬   )rV  Úrstrip)r:  ri   s    €r\   rˆ   z3RemoteProgress.new_message_handler.<locals>.handlerÁ  s   ø€ Ø×,Ñ,¨T¯[©[«]Ó;Ð;rb   )r&   )ri   rˆ   s   ` r\   Únew_message_handlerz"RemoteProgress.new_message_handlerº  s   ø€ ð	<œ&ð 	< Tõ 	<ð
 ˆrb   c                  ó   — y)zICalled whenever a line could not be understood and was therefore dropped.Nr»   )ri   r:  s     r\   r@  zRemoteProgress.line_droppedÈ  s   € àrb   rQ  rO  rP  rU  c                  ó   — y)aç  Called whenever the progress changes.

        :param op_code:
            Integer allowing to be compared against Operation IDs and stage IDs.

            Stage IDs are :const:`BEGIN` and :const:`END`. :const:`BEGIN` will only be
            set once for each Operation ID as well as :const:`END`. It may be that
            :const:`BEGIN` and :const:`END` are set at once in case only one progress
            message was emitted due to the speed of the operation. Between
            :const:`BEGIN` and :const:`END`, none of these flags will be set.

            Operation IDs are all held within the :const:`OP_MASK`. Only one Operation
            ID will be active per call.

        :param cur_count:
            Current absolute count of items.

        :param max_count:
            The maximum count of items we expect. It may be ``None`` in case there is no
            maximum number of items or if it is (yet) unknown.

        :param message:
            In case of the :const:`WRITING` operation, it contains the amount of bytes
            transferred. It may possibly be used for other purposes as well.

        :note:
            You may read the contents of the current line in
            :attr:`self._cur_line <_cur_line>`.
        Nr»   )ri   rQ  rO  rP  rU  s        r\   rL  zRemoteProgress.updateÌ  s   € ðH 	rb   ©rJ   N©NrL   )$ro   Ú
__module__Ú__qualname__Ú__doc__r2  ÚintÚ__annotations__ÚrangerH  rJ  rA  rB  rC  rD  rE  rF  rG  Ú
STAGE_MASKÚOP_MASKrI  rK  Ú	__slots__ÚreÚcompiler?  r>  r9  r&   rV  r(   rÎ   rZ  r@  r4   rM  rL  )r¹   Úxs   00r\   r   r   ;  s/  … ñ5ð €M�3Óñ ˜}Ó-×.�Aˆˆa‹Ó.ñ
ØØØØØØØØØà˜‘€JØˆk€Gà€JØ€Oð€Ið  �R—Z‘ZÐ HÓI€NØ�R—Z‘ZÐ UÓV€Nó)ðW
¨ð W
°Dó W
ðr X¨s¨e°T¨kÑ%:ó ð ð ¨ó ð .2Øñ$àð$ð ˜˜e˜Ñ$ð$ð ˜˜e TÐ)Ñ*ð	$ð
 ð$ð 
ô$ùóC 	/s   šB#r   c                   óD   ‡ — e Zd ZdZdZdeddfˆ fd„Zdededdfd	„Zˆ xZ	S )
r   a   A :class:`RemoteProgress` implementation forwarding updates to any callable.

    :note:
        Like direct instances of :class:`RemoteProgress`, instances of this
        :class:`CallableRemoteProgress` class are not themselves directly callable.
        Rather, instances of this class wrap a callable and forward to it. This should
        therefore not be confused with :class:`git.types.CallableProgress`.
    ©Ú	_callableÚfnrJ   Nc                 ó0   •— || _         t        ‰| �	  «        y r¬   )rm  Úsuperr9  )ri   rn  Ú	__class__s     €r\   r9  zCallableRemoteProgress.__init__ÿ  s   ø€ ØˆŒÜ‰ÑÕrb   rj   rk   c                 ó(   —  | j                   |i |¤Ž y r¬   rl  )ri   rj   rk   s      r\   rL  zCallableRemoteProgress.update  s   € Øˆ�‰˜Ð' Ó'rb   )
ro   r_  r`  ra  rg  r(   r9  r%   rL  Ú__classcell__©rq  s   @r\   r   r   ó  s<   ø„ ñð €Ið˜8ð ¨õ ð(˜Cð (¨3ð (°4÷ (rb   r   c            
       ób  — e Zd ZdZ ej
                  d«      Z ej
                  d«      ZdZdZ	dZ
dZdZd	Zd
Zdee   d	ee   ddfd„Zdedefd„Zdedefd„Zdefd„Zdefd„Zdefd„Zededd fd„«       Ze	 ddededed   dd fd„«       Zedded   dd fd„«       Zedded   dd fd„«       Zy)r   zµActors hold information about a person acting on the repository. They can be
    committers and authors or anything with a name and an email as mentioned in the git
    log entries.z<(.*)>z(.*) <(.*?)>ÚGIT_AUTHOR_NAMEÚGIT_AUTHOR_EMAILÚGIT_COMMITTER_NAMEÚGIT_COMMITTER_EMAILrH   Úemail©rH   rz  rJ   Nc                 ó    — || _         || _        y r¬   r{  )ri   rH   rz  s      r\   r9  zActor.__init__  s   € ØˆŒ	Øˆ�
rb   Úotherc                 ój   — | j                   |j                   k(  xr | j                  |j                  k(  S r¬   r{  ©ri   r}  s     r\   Ú__eq__zActor.__eq__!  s'   € Ø�y‰y˜EŸJ™JÑ&ÒD¨4¯:©:¸¿¹Ñ+DÐDrb   c                 ó   — | |k(   S r¬   r»   r  s     r\   Ú__ne__zActor.__ne__$  s   € Ø˜E‘MÐ"Ð"rb   c                 óD   — t        | j                  | j                  f«      S r¬   )ÚhashrH   rz  r8  s    r\   Ú__hash__zActor.__hash__'  s   € Ü�T—Y‘Y §
¡
Ð+Ó,Ð,rb   c                 ó6   — | j                   r| j                   S dS r^  )rH   r8  s    r\   Ú__str__zActor.__str__*  s   € Ø ŸIšIˆt�y‰yÐ-¨2Ð-rb   c                 ó<   — d| j                   ›d| j                  ›d�S )Nz<git.Actor "z <z>">r{  r8  s    r\   Ú__repr__zActor.__repr__-  s   � Ø*.¯)«)°T·Z³ZÐ@Ð@rb   Ústringc                 ó  — | j                   j                  |«      }|r|j                  «       \  }}t        ||«      S | j                  j                  |«      }|rt        |j                  d«      d«      S t        |d«      S )zêCreate an :class:`Actor` from a string.

        :param string:
            The string, which is expected to be in regular git format::

                John Doe <jdoe@example.com>

        :return:
            :class:`Actor`
        rg   N)Úname_email_regexÚsearchrí   r   Úname_only_regexÚgroup)ÚclsrŠ  rô   rH   rz  s        r\   Ú_from_stringzActor._from_string0  st   € ð × Ñ ×'Ñ'¨Ó/ˆÙØŸ(™(›*‰KˆD�%Ü˜˜uÓ%Ð%à×#Ñ#×*Ñ*¨6Ó2ˆAÙÜ˜QŸW™W Q›Z¨Ó.Ð.ä˜ Ó&Ð&rb   Úenv_nameÚ	env_emailÚconfig_reader)Nr8   r9   c                 ó¸  ‡‡— t        dd«      }d Šdt        fˆfd„Šdt        fˆfd„}d|| j                  |fd|| j                  ‰ffD ](  \  }}}}		 t        j
                  |   }
t        |||
«       Œ* |S # t        $ rZ |�7	 |j                  d|«      }
n# t        $ r
  |	«       }
Y nw xY wt        |||
«       t        ||«      st        || |	«       «       Y Œ�w xY w)NrL   rJ   c                  ó    •— ‰ s
t        «       Š ‰ S r¬   )r   )Úuser_ids   €r\   Údefault_emailz(Actor._main_actor.<locals>.default_emailS  s   ø€ áÜ%›-�ØˆNrb   c                  ó6   •—  ‰ «       j                  d«      d   S )Nr  r   )r¾   )r˜  s   €r\   Údefault_namez'Actor._main_actor.<locals>.default_nameY  s   ø€ Ù “?×(Ñ(¨Ó-¨aÑ0Ð0rb   rH   rz  Úuser)r   rÎ   Ú	conf_nameÚ
conf_emailrS   rT   ÚsetattrrU   r¼   r  Úgetattr)r�  r’  r“  r”  Úactorrš  ÚattrÚevarÚcvarrI   Úvalr˜  r—  s              @@r\   Ú_main_actorzActor._main_actorI  sø   ù€ ô �b˜"“ˆØˆð	œsõ 	ð	1œcõ 	1ð �X˜sŸ}™}¨lÐ;Ø�i §¡°Ð?ð*
ò 	4Ñ%ˆD�$˜˜gð4Ü—j‘j Ñ&�Ü˜˜t SÕ)ð	4ð& ˆøô ò 	4Ø Ð,ð(Ø+×/Ñ/°¸Ó=™øÜ$ò (Ù%›išð(úä˜E 4¨Ô-ä˜u dÔ+Ü˜E 4©«Ô3ùð	4ús6   Á A6Á6CÂBÂCÂB(Â%CÂ'B(Â(.CÃCc                 óP   — | j                  | j                  | j                  |«      S )aÑ  
        :return:
            :class:`Actor` instance corresponding to the configured committer. It
            behaves similar to the git implementation, such that the environment will
            override configuration values of `config_reader`. If no value is set at all,
            it will be generated.

        :param config_reader:
            ConfigReader to use to retrieve the values from in case they are not set in
            the environment.
        )r¥  Úenv_committer_nameÚenv_committer_email©r�  r”  s     r\   Ú	committerzActor.committerq  s$   € ð �‰˜s×5Ñ5°s×7NÑ7NÐP]Ó^Ð^rb   c                 óP   — | j                  | j                  | j                  |«      S )z†Same as :meth:`committer`, but defines the main author. It may be specified
        in the environment, but defaults to the committer.)r¥  Úenv_author_nameÚenv_author_emailr©  s     r\   ÚauthorzActor.author€  s#   € ð �‰˜s×2Ñ2°C×4HÑ4HÈ-ÓXÐXrb   r¬   ) ro   r_  r`  ra  rh  ri  rŽ  rŒ  r¬  r­  r§  r¨  rœ  r�  rg  r.   rÎ   r9  r%   rÏ   r€  r‚  rb  r…  r‡  r‰  Úclassmethodr‘  r4   r¥  rª  r®  r»   rb   r\   r   r     s‰  „ ñð
 !�b—j‘j Ó+€OØ!�r—z‘z /Ó2Ðð (€OØ)ÐØ-ÐØ/Ðð €IØ€Jà!€Ið˜X c™]ð °8¸C±=ð ÀTó ðE˜Cð E Dó Eð#˜Cð # Dó #ð-˜#ó -ð.˜ó .ðA˜#ó Að ð' #ð '¨'ò 'ó ð'ð0 ð
 NRñ	%àð%ð ð%ð ÐIÑJð	%ð
 
ò%ó ð%ðN ñ_ eÐ,XÑ&Yð _Ðelò _ó ð_ð ñY 5Ð)UÑ#Vð YÐbiò Yó ñYrb   r   c                   óP   — e Zd ZdZdZdedeeef   ddfd„Z	e
dd	d
edd fd„«       Zy)r   aé  Represents stat information as presented by git at the end of a merge. It is
    created from the output of a diff operation.

    Example::

     c = Commit( sha1 )
     s = c.stats
     s.total         # full-stat-dict
     s.files         # dict( filepath : stat-dict )

    ``stat-dict``

    A dictionary with the following keys and values::

      deletions = number of deleted lines as int
      insertions = number of inserted lines as int
      lines = total number of lines changed as int, or deletions + insertions
      change_type = type of change as str, A|C|D|M|R|T|U|X|B

    ``full-stat-dict``

    In addition to the items in the stat-dict, it features additional information::

     files = number of changed files as int
    ©ÚtotalÚfilesr²  r³  rJ   Nc                 ó    — || _         || _        y r¬   r±  )ri   r²  r³  s      r\   r9  zStats.__init__¤  s   € ØˆŒ
Øˆ�
rb   rm   r;   Útextc                 ó®  — dddddœi dœ}|j                  «       D ]§  }|j                  d«      \  }}}}|dk7  xr t        |«      xs d}	|dk7  xr t        |«      xs d}
|d   dxx   |	z  cc<   |d   dxx   |
z  cc<   |d   d	xx   |	|
z   z  cc<   |d   d
xx   dz  cc<   |	|
|	|
z   |dœ}||d
   |j                  «       <   Œ© t	        |d   |d
   «      S )z‘Create a :class:`Stats` object from output retrieved by
        :manpage:`git-diff(1)`.

        :return:
            :class:`git.Stats`
        r   )Ú
insertionsÚ	deletionsÚlinesr³  r±  ú	ú-r²  r·  r¸  r¹  r³  rg   )r·  r¸  r¹  Úchange_type)Ú
splitlinesr¾   rb  rX   r   )r�  rm   rµ  Úhshr:  r¼  Úraw_insertionsÚraw_deletionsÚfilenamer·  r¸  Ú
files_dicts               r\   Ú_list_from_stringzStats._list_from_string¨  s  € ð %&°AÀÈAÑNØñ
ˆð —O‘OÓ%ò 	8ˆDØEIÇZÁZÐPTÓEUÑBˆ[˜.¨-¸Ø'¨3Ñ.ÒF´3°~Ó3FÒKÈ!ˆJØ%¨Ñ,ÒC´°]Ó1CÒHÀqˆIØ�‰L˜Ó&¨*Ñ4Ó&Ø�‰L˜Ó%¨Ñ2Ó%Ø�‰L˜Ó! Z°)Ñ%;Ñ;Ó!Ø�‰L˜Ó! QÑ&Ó!à(Ø&Ø# iÑ/Ø*ñ	$ˆJð .8ˆC�‰L˜Ÿ™Ó)Ò*ð	8ô �S˜‘\ 3 w¡<Ó0Ð0rb   )ro   r_  r`  ra  rg  rC   r)   r@   r<   r9  r¯  rÎ   rÃ  r»   rb   r\   r   r   ‡  s[   „ ñð4 #€Ið˜hð ¨t°H¸hÐ4FÑ/Gð ÈDó ð ð1 Vð 1°3ð 1¸7ò 1ó ñ1rb   r   c                   óX   — e Zd ZdZdZdeddfd„Zdedefd„Z	de
fd	„Zde
fd
„Zdefd„Zy)r   a  Wrapper around a file-like object that remembers the SHA1 of the data written to
    it. It will write a sha when the stream is closed or if asked for explicitly using
    :meth:`write_sha`.

    Only useful to the index file.

    :note:
        Based on the dulwich project.
    )rÖ   Úsha1rÖ   rJ   Nc                 ó2   — || _         t        d«      | _        y )Nrb   )rÖ   r"   rÅ  )ri   rÖ   s     r\   r9  zIndexFileSHA1Writer.__init__Ô  s   € ØˆŒÜ˜S“Mˆ�	rb   Údatac                 ón   — | j                   j                  |«       | j                  j                  |«      S r¬   )rÅ  rL  rÖ   rš   )ri   rÇ  s     r\   rš   zIndexFileSHA1Writer.writeØ  s'   € Ø�	‰	×Ñ˜ÔØ�v‰v�|‰|˜DÓ!Ð!rb   c                 óp   — | j                   j                  «       }| j                  j                  |«       |S r¬   )rÅ  ÚdigestrÖ   rš   ©ri   Úshas     r\   Ú	write_shazIndexFileSHA1Writer.write_shaÜ  s)   € Ø�i‰i×ÑÓ ˆØ�‰�‰�SÔØˆ
rb   c                 óZ   — | j                  «       }| j                  j                  «        |S r¬   )rÍ  rÖ   ÚcloserË  s     r\   rÏ  zIndexFileSHA1Writer.closeá  s    € Ø�n‰nÓˆØ�‰�‰ŒØˆ
rb   c                 ó6   — | j                   j                  «       S r¬   )rÖ   Útellr8  s    r\   rÑ  zIndexFileSHA1Writer.tellæ  s   € Ø�v‰v�{‰{‹}Ðrb   )ro   r_  r`  ra  rg  r+   r9  r&   rb  rš   r<  rÍ  rÏ  rÑ  r»   rb   r\   r   r   Ç  sX   „ ñð €Ið"˜"ð " ó "ð"˜&ð " Só "ð˜5ó ð
�uó ð
�cô rb   r   c                   ó\   — e Zd ZdZdZdeddfd„Zdd„Zdefd„Z	de
fd	„Zdd
„Zdd„Zdd„Zy)r   a  Provides methods to obtain, check for, and release a file based lock which
    should be used to handle concurrent access to the same file.

    As we are a utility class to be derived from, we only use protected methods.

    Locks will automatically be released on destruction.
    ©Ú
_file_pathÚ
_owns_lockÚ	file_pathrJ   Nc                 ó    — || _         d| _        y )NFrÓ  )ri   rÖ  s     r\   r9  zLockFile.__init__õ  s   € Ø#ˆŒØˆ�rb   c                 ó$   — | j                  «        y r¬   )Ú_release_lockr8  s    r\   Ú__del__zLockFile.__del__ù  s   € Ø×ÑÕrb   c                 ó    — d| j                   z  S )z:return: Path to lockfilez%s.lock)rÔ  r8  s    r\   Ú_lock_file_pathzLockFile._lock_file_pathü  s   € à˜DŸO™OÑ,Ð,rb   c                 ó   — | j                   S )z«
        :return:
            True if we have a lock and if the lockfile still exists

        :raise AssertionError:
            If our lock-file does not exist.
        )rÕ  r8  s    r\   Ú	_has_lockzLockFile._has_lock   s   € ð �‰Ðrb   c                 óJ  — | j                  «       ry| j                  «       }t        j                  |«      rt	        d| j
                  ›d|›d�«      ‚	 t        |d¬«      5  	 ddd«       d| _	        y# 1 sw Y   ŒxY w# t        $ r}t	        t        |«      «      |‚d}~ww xY w)zÊCreate a lock file as flag for other instances, mark our instance as
        lock-holder.

        :raise IOError:
            If a lock was already present or a lock file could not be written.
        NzLock for file z did already exist, delete z in case the lock is illegalÚw)ÚmodeT)
rÞ  rÜ  r�   r‘   ÚIOErrorrÔ  ÚopenÚOSErrorrÎ   rÕ  )ri   Ú	lock_filerÕ   s      r\   Ú_obtain_lock_or_raisezLockFile._obtain_lock_or_raise
  s•   € ð �>‰>ÔØØ×(Ñ(Ó*ˆ	Ü�:‰:�iÔ Ýà—?“?¢Ið/óð ð
	)Ü�i cÔ*ñ Ø÷ð
 ˆ�÷ð ûäò 	)Üœ#˜a›&“/ qÐ(ûð	)ús0   ÁA? Á!A3Á#A? Á3A<Á8A? Á?	B"ÂBÂB"c                 ó"   — | j                  «       S )z The default implementation will raise if a lock cannot be obtained.

        Subclasses may override this method to provide a different implementation.
        )ræ  r8  s    r\   Ú_obtain_lockzLockFile._obtain_lock"  s   € ð
 ×)Ñ)Ó+Ð+rb   c                 ó˜   — | j                  «       sy| j                  «       }	 t        |«       d| _        y# t        $ r
 Y d| _        yw xY w)z Release our lock if we have one.NF)rÞ  rÜ  r”   rä  rÕ  )ri   Úlfps     r\   rÙ  zLockFile._release_lock)  sO   € à�~‰~ÔØð ×"Ñ"Ó$ˆð	Ü�3ŒKð  ˆ�øô ò 	ØØˆ�ð	ús   £6 ¶	A	ÁA	r]  )ro   r_  r`  ra  rg  r@   r9  rÚ  rÎ   rÜ  rÏ   rÞ  ræ  rè  rÙ  r»   rb   r\   r   r   ê  sM   „ ñð -€Ið  (ð  ¨tó  óð- ó -ð˜4ó óó0,ô rb   r   c            	       ó^   ‡ — e Zd ZdZdZdej                  fdedede	ddfˆ fd	„Z
dˆ fd
„Zˆ xZS )r   a  The lock file will block until a lock could be obtained, or fail after a
    specified timeout.

    :note:
        If the directory containing the lock was removed, an exception will be raised
        during the blocking period, preventing hangs as the lock can never be obtained.
    )Ú_check_intervalÚ_max_block_timeg333333Ó?rÖ  Úcheck_interval_sÚmax_block_time_srJ   Nc                 ó@   •— t         ‰| �  |«       || _        || _        y)a  Configure the instance.

        :param check_interval_s:
            Period of time to sleep until the lock is checked the next time.
            By default, it waits a nearly unlimited time.

        :param max_block_time_s:
            Maximum amount of seconds we may lock.
        N)rp  r9  rì  rí  )ri   rÖ  rî  rï  rq  s       €r\   r9  zBlockingLockFile.__init__C  s"   ø€ ô 	‰Ñ˜Ô#Ø/ˆÔØ/ˆÕrb   c                 ó  •— t        j                   «       }|t        | j                  «      z   }	 	 t        ‰| �  «        y# t
        $ rÀ}t        j                   «       }t        j                  t        j                  | j                  «       «      «      s$d| j                  «       ||z
  fz  }t        |«      |‚||k\  r$d||z
  | j                  «       fz  }t        |«      |‚t        j                  | j                  «       Y d}~nd}~ww xY wŒÝ)zéThis method blocks until it obtained the lock, or raises :exc:`IOError` if it
        ran out of time or if the parent directory was not available anymore.

        If this method returns, you are guaranteed to own the lock.
        zVDirectory containing the lockfile %r was not readable anymore after waiting %g secondsz Waited %g seconds for lock at %rN)ÚtimerM  rí  rp  rè  râ  r�   r³   r²   rÜ  Úsleeprì  )ri   Ú	starttimeÚmaxtimerÕ   ÚcurtimeÚmsgrq  s         €r\   rè  zBlockingLockFile._obtain_lockV  s  ø€ ô —I‘I“Kˆ	Øœe D×$8Ñ$8Ó9Ñ9ˆØðÜ‘Ñ$Ô&ð, øô+ ò 1ô Ÿ)™)›+�Ü—y‘y¤§¡¨T×-AÑ-AÓ-CÓ!DÔEØrØ×,Ñ,Ó.Ø )Ñ+ðvñ �Cô " #›,¨AÐ-ð ˜gÒ%Ø<Ø )Ñ+Ø×,Ñ,Ó.ð@ñ �Cô " #›,¨AÐ-ä—
‘
˜4×/Ñ/×0Ñ0ûð'1úð s   °? ¿	DÁB6DÄDr]  )ro   r_  r`  ra  rg  r_   Úmaxsizer@   rM  rb  r9  rè  rs  rt  s   @r\   r   r   8  sP   ø„ ñð 7€Ið
 #&Ø #§¡ñ	0àð0ð  ð0ð ð	0ð
 
õ0÷& ñ  rb   r   c                   ó¨   ‡ — e Zd ZdZdZddededdfˆ fd„Zddededdfd	„Zd
ede	fd„Z
d
edefd„Zdeeeeef   defd„Zdeeeeef   ddfd„Zˆ xZS )r
   aº  List of iterable objects allowing to query an object by id or by named index::

     heads = repo.heads
     heads.master
     heads['master']
     heads[0]

    Iterable parent objects:

    * :class:`Commit <git.objects.Commit>`
    * :class:`Submodule <git.objects.submodule.base.Submodule>`
    * :class:`Reference <git.refs.reference.Reference>`
    * :class:`FetchInfo <git.remote.FetchInfo>`
    * :class:`PushInfo <git.remote.PushInfo>`

    Iterable via inheritance:

    * :class:`Head <git.refs.head.Head>`
    * :class:`TagReference <git.refs.tag.TagReference>`
    * :class:`RemoteReference <git.refs.remote.RemoteReference>`

    This requires an ``id_attribute`` name to be set which will be queried from its
    contained items to have a means for comparison.

    A prefix can be specified which is to be used in case the id returned by the items
    always contains a prefix that does not matter to the user, so it can be left out.
    ©Ú_id_attrÚ_prefixÚid_attrÚprefixrJ   zIterableList[T_IterableObj]c                 ó"   •— t         ‰| �  | «      S r¬   )rp  Ú__new__)r�  rý  rþ  rq  s      €r\   r   zIterableList.__new__™  s   ø€ Ü‰w‰˜sÓ#Ð#rb   Nc                 ó    — || _         || _        y r¬   rú  )ri   rý  rþ  s      r\   r9  zIterableList.__init__œ  s   € ØˆŒØˆ�rb   r¡  c                 óÆ   — 	 t         j                  | |«      }|r|S 	 	 t	        | t        t        |«      «       y# t        t        f$ r Y Œ-w xY w# t        t        f$ r Y yw xY w)NTF)ÚlistÚ__contains__ÚAttributeErrorÚ	TypeErrorrŸ  r5   rÎ   )ri   r¡  Úrvals      r\   r  zIterableList.__contains__   so   € ð	Ü×$Ñ$ T¨4Ó0ˆDÙØ�ð ð	Ü�Dœ$œs D›/Ô*Øøô ¤	Ð*ò 	Ùð	ûô ¤	Ð*ò 	Ùð	ús    ‚9 žA ¹AÁ
AÁA ÁA c                 ó”   — | j                   |z   }| D ]  }t        || j                  «      |k(  sŒ|c S  t        j	                  | |«      S r¬   )rü  rŸ  rû  r  Ú__getattribute__)ri   r¡  Úitems      r\   Ú__getattr__zIterableList.__getattr__²  sL   € Ø�|‰|˜dÑ"ˆØò 	ˆDÜ�t˜TŸ]™]Ó+¨tÓ3Ø’ð	ô ×$Ñ$ T¨4Ó0Ð0rb   r-  c                 ó  — t        |t        «      rt        j                  | |«      S t        |t        «      rt        d«      ‚	 t        | t        t        |«      «      S # t        $ r }t        d| j                  › |› �«      |‚d }~ww xY w)NzIndex should be an int or strzNo item found with id )r!  rb  r  Ú__getitem__Úslicer+  rŸ  r5   rÎ   r  Ú
IndexErrorrü  )ri   r-  rÕ   s      r\   r  zIterableList.__getitem__º  s   € Ü�eœSÔ!Ü×#Ñ# D¨%Ó0Ð0Ü˜œuÔ%ÜÐ<Ó=Ð=ðXÜ˜t¤T¬#¨uÓ%5Ó6Ð6øÜ!ò XÜ Ð#9¸$¿,¹,¸ÈÀwÐ!OÓPÐVWÐWûðXús   ÁA Á	BÁ&BÂBc                 ó  — t        t        |«      }t        |t        «      rTd}| j                  |z   }t        | «      D ]"  \  }}t        || j                  «      |k(  sŒ |} n |dk(  rt        d|z  «      ‚t        j                  | |«       y )NéÿÿÿÿzItem with name %s not found)r5   rb  r!  rÎ   rü  r'  rŸ  rû  r  r  Ú__delitem__)ri   r-  ÚdelindexrH   Úir
  s         r\   r  zIterableList.__delitem__Æ  s‰   € Üœ˜UÓ#ˆÜ�eœSÔ!ØˆHØ—<‘< %Ñ'ˆDÜ$ T›?ò ‘��4Ü˜4 §¡Ó/°4Ó7Ø �HÙðð ˜2Š~Ü Ð!>ÀÑ!EÓFÐFô 	×Ñ˜˜xÕ(rb   )rL   )ro   r_  r`  ra  rg  rÎ   r   r9  ÚobjectrÏ   r  rE   r  r4   rB   rb  r  r  r  rs  rt  s   @r\   r
   r
   z  s¯   ø„ ñð8 (€Iñ$˜cð $¨3ð $Ð8Uõ $ñ ð ¨Sð ¸$ó ð ð ¨Dó ð$1 ð 1¨ó 1ð	X  }°c¸5À#Ð'EÑ!Fð 	XÈ=ó 	Xð)  }°c¸5À#Ð'EÑ!Fð )È4÷ )rb   r
   c                   óz   — e Zd ZU dZdZeed<   eeddde	de	de
e   fd	„«       «       Zeddde	de	dee   fd
„«       Zy)r	   aÁ  Defines an interface for iterable items, so there is a uniform way to retrieve
    and iterate items within the git repository.

    Subclasses:

    * :class:`Submodule <git.objects.submodule.base.Submodule>`
    * :class:`Commit <git.objects.Commit>`
    * :class:`Reference <git.refs.reference.Reference>`
    * :class:`PushInfo <git.remote.PushInfo>`
    * :class:`FetchInfo <git.remote.FetchInfo>`
    * :class:`Remote <git.remote.Remote>`
    r»   Ú_id_attribute_rm   r;   rj   rk   rJ   c                 ó   — t        d«      ‚)aS  Find (all) items of this type.

        Subclasses can specify `args` and `kwargs` differently, and may use them for
        filtering. However, when the method is called with no additional positional or
        keyword arguments, subclasses are obliged to to yield all items.

        :return:
            Iterator yielding Items
        úTo be implemented by Subclass©ÚNotImplementedError©r�  rm   rj   rk   s       r\   Ú
iter_itemszIterableObj.iter_itemsë  s   € ô "Ð"AÓBÐBrb   c                 óz   — t        | j                  «      }|j                   | j                  |g|¢­i |¤Ž«       |S )aª  Find (all) items of this type and collect them into a list.

        For more information about the arguments, see :meth:`iter_items`.

        :note:
            Favor the :meth:`iter_items` method as it will avoid eagerly collecting all
            items. When there are many items, that can slow performance and increase
            memory usage.

        :return:
            list(Item,...) list of item instances
        ©r
   r  Úextendr  ©r�  rm   rj   rk   Úout_lists        r\   Ú
list_itemszIterableObj.list_itemsú  s:   € ô ".¨c×.@Ñ.@Ó!AˆØ�‰˜˜Ÿ™ tÐ=¨dÒ=°fÑ=Ô>Øˆrb   N)ro   r_  r`  ra  rg  rÎ   rc  r¯  r   r%   r,   rE   r  r
   r#  r»   rb   r\   r	   r	   Ø  s‹   … ñð €IàÓàØðC˜fð C¨Sð C¸Cð CÀHÈ]ÑD[ò Có ó ðCð ð˜fð ¨Sð ¸Cð ÀLÐQ^ÑD_ò ó ñrb   r	   c                   ó(   — e Zd ZdZdedededdfd„Zy)ÚIterableClassWatcherzbMetaclass that issues :exc:`DeprecationWarning` when :class:`git.util.Iterable`
    is subclassed.rH   ÚbasesÚclsdictrJ   Nc                 óv   — |D ]4  }t        |«      t        u sŒt        j                  d|› d�t        d¬«       Œ6 y )Nz!GitPython Iterable subclassed by zq. Iterable is deprecated due to naming clash since v3.1.18 and will be removed in 4.0.0. Use IterableObj instead.é   )Ú
stacklevel)Útyper%  ÚwarningsÚwarnÚDeprecationWarning)r�  rH   r&  r'  Úbases        r\   r9  zIterableClassWatcher.__init__  sC   € Øò 		ˆDÜ�D‹zÔ1Ò1Ü—‘Ø7¸°vð >0ð 0ô 'Ø öñ		rb   )ro   r_  r`  ra  rÎ   r1   r)   r9  r»   rb   r\   r%  r%    s(   „ ñð
˜Cð 
¨ð 
¸ð 
Àô 
rb   r%  c            	       ó\   — e Zd ZdZdZdZedddededefd	„«       Zedddededefd
„«       Z	y)ÚIterablez·Deprecated, use :class:`IterableObj` instead.

    Defines an interface for iterable items, so there is a uniform way to retrieve
    and iterate items within the git repository.
    r»   z5attribute that most suitably identifies your instancerm   r;   rj   rk   rJ   c                 ó   — t        d«      ‚)zÖDeprecated, use :class:`IterableObj` instead.

        Find (all) items of this type.

        See :meth:`IterableObj.iter_items` for details on usage.

        :return:
            Iterator yielding Items
        r  r  r  s       r\   r  zIterable.iter_items)  s   € ô "Ð"AÓBÐBrb   c                 óz   — t        | j                  «      }|j                   | j                  |g|¢­i |¤Ž«       |S )a  Deprecated, use :class:`IterableObj` instead.

        Find (all) items of this type and collect them into a list.

        See :meth:`IterableObj.list_items` for details on usage.

        :return:
            list(Item,...) list of item instances
        r  r!  s        r\   r#  zIterable.list_items6  s:   € ô % S×%7Ñ%7Ó8ˆØ�‰˜˜Ÿ™ tÐ=¨dÒ=°fÑ=Ô>Øˆrb   N)
ro   r_  r`  ra  rg  r  r¯  r%   r  r#  r»   rb   r\   r1  r1    sw   „ ñð €IàL€Nàð
C˜fð 
C¨Sð 
C¸Cð 
CÀCò 
Có ð
Cð ð˜fð ¨Sð ¸Cð ÀCò ó ñrb   r1  )Ú	metaclass)i   )Fr¬   ).)T)�r_   Ú__all__r`   rÑ   Úabcr   Ú
contextlibÚ	functoolsr   r  ÚloggingrS   Úos.pathr|   r�   Úpathlibr   rh  r�   rƒ   rþ   rò  Úurllib.parser   r   r,  Ú
gitdb.utilr   r   r   r   r    r!   r"   r#   r$   Útypingr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   Úgit.cmdr7   Ú
git.configr8   r9   Ú
git.remoter:   Úgit.repo.baser;   Ú	git.typesr<   r=   r>   r?   r@   rA   rB   rC   rD   rE   Ú	getLoggerro   rV   rÎ   rÏ   r]   ra   r   rc   rd   r   Úcontextmanagerrw   r{   r   r”   rb  r   r   r   r   r®   r   r   rÀ   r×   rà   ri  ÚIrê   rc  rÞ   ró   rõ   rö   r
  r  r   rÿ   r  r  r/  r   r   r   r   r   r   r   r
   r	   r+  r%  r1  r»   rb   r\   ú<module>rG     sÄ  ðô ò€ð* ‡<�<�7ÒØ‡N�NÐ+Ô,å Û Ý Û Û Û 	Ý Ý Û Û 	Û Û Û Û ß -Û ÷
÷ 
õ 
÷÷ ÷ ÷ ÷ ñ* Ýß=Ý!Ý"÷
÷ 
õ 
ñ ˜¨uÐ5VÑ/WÐcgÔh€ð ˆ'×
Ñ
˜HÓ
%€ð˜ð  tð °ó ð4
E˜Sð 
E¨4ð 
E°Dó 
Eñ  /Ð/JÈDÓQÐ Ù/Ð0LÈdÓSÐ ñ ˆCƒL€ð�h˜s A˜vÑ&ð ¨8°C¸°FÑ+;ó ð$ ×Ñð�ð ˜i¨°$¸Ð(<Ñ=ò ó ðð ×Ñð
)�Cð 
) ð 
)¨	Ð2BÑ(Cò 
)ó ð
)ð-�ð -˜dó -ðB�ð ˜dó ñ˜ð ¨xð ÀSð ÐZ]ó ð$�ð ˜xð ¨Hó ð$ ‡<�<�7Òð' Xð '°(ó 'ð' 8ð '°ó 'ð ,�Nð 8ð °ó ð *€Nð,˜ð , hð ,°8ó ,ñ (ð °Tð Àdó ð&˜X c™]ó ñ#�cð # ¨(Ñ!3ð #¸tÀC¹yó #ðL$�h˜s‘mð $¨3ð $°3ó $ð. 	ˆ�
‰
Ð@ÓAÙ	fØðð
 €R‡Z�ZÐ)Ó*¨Z¸%Ð@Ø€R‡Z�ZÐ!Ó" Z°%Ð8Ø€R‡Z�Z�˜bŸd™dÓ#Ñ&AÀDÐIØ€R‡Z�Z�Ó¡/°EÐ:ðEÐ �%˜˜g c™l¨H°dÐ:Ñ;¸SÐ@ÑAó ð�#ð ˜#ó ð$ �2—:‘:Ð?Ó@Ð ð#�Hð # ó #ð /1Ð �$�s˜H T™NÐ*Ñ+Ó 0ð 3ð ¨4ó ð: 
Ø > $Ð >¨7°5©>Ò >ó 
Ø >ð 
Ø 8 (Ð 8¨tÒ 8ó 
Ø 8ð3 %¨¨h¨Ñ"7ð 3¸Dó 3ð:�Só :ð
˜5 ×!1Ñ!1Ð3FÐ!FÑGð ÐSVð Ð[_ó ð 
Ù >�4Ð > dÐ >°TÒ >ó 
Ø >ð 
ñ�8ð ¨$ð ¸ò ó 
ðñ
	�5˜˜x˜Ñ(ð 	°tð 	ÀxÐPXÑGYó 	ð¨°©ð ¸$¸s¹)ó ÷Duñ uôp(˜^ô (÷(}Yñ }Y÷@=1ñ =1÷@ ñ  ÷FK ñ K ô\>�xô >ôD[)�4˜Ñ&ô [)ð| ô1�(ó 1ó ð1ôh˜4ô ô"%Ð-ö %rb   