Ë
    ùmxiO  ã                   ó\  — d dg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 erdd
lmZ ddlmZ  ej&                  e«      Z G d„ de«      Zej.                  Zej0                  Zej2                  Zej4                  Zej6                  Zej8                  Z G d„ d e«      Zy)Ú
RootModuleÚRootUpdateProgressé    N)ÚInvalidGitRepositoryErroré   )Ú	SubmoduleÚUpdateProgress)Úfind_first_remote_branch)ÚTYPE_CHECKINGÚUnion)Ú
Commit_ish)ÚRepo)ÚIterableListc                   ó®   — e Zd ZdZ eej                  ej                  dz   «      D � �cg c]  }d|z  ‘Œ	 c}} \  ZZZ	Z
ej                  dz   ZdZyc c}} w )r   zaUtility class which adds more opcodes to
    :class:`~git.objects.submodule.base.UpdateProgress`.é   r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úranger   Ú_num_op_codesÚREMOVEÚ
PATHCHANGEÚBRANCHCHANGEÚ	URLCHANGEÚ	__slots__)Ú.0Úxs   00úQ/home/htdocs/ttos/venv/lib/python3.12/site-packages/git/objects/submodule/root.pyr   r      s`   „ ñ<ñ ˜n×:Ñ:¸N×<XÑ<XÐ[\Ñ<\Ó]÷3ØˆˆQ‹ó3Ñ/€FˆJ˜ ið #×0Ñ0°1Ñ4€Mà�Iùó3s   ªAc                   ó’   ‡ — e Zd ZdZdZdZdˆ fd„Zdd„Z	 	 	 	 	 	 	 	 	 ddee	e
df   d	ed
edededed   dedededd fd„Zdd„Zˆ xZS )r   zªA (virtual) root of all submodules in the given repository.

    This can be used to more easily traverse all submodules of the
    superproject (master repository).
    r   Ú__ROOT__ÚreturnNc                 óæ   •— t         ‰| �  || j                  | j                  d| j                  |j
                  j                  dt        j                  j                  | j                  «      ¬«       y )NÚ )ÚbinshaÚmodeÚpathÚnameÚparent_commitÚurlÚbranch_path)ÚsuperÚ__init__ÚNULL_BIN_SHAÚk_default_modeÚk_root_nameÚheadÚcommitÚgitÚHeadÚto_full_pathÚk_head_default)ÚselfÚrepoÚ	__class__s     €r   r-   zRootModule.__init__<   s^   ø€ ä‰ÑØØ×$Ñ$Ø×$Ñ$ØØ×!Ñ!ØŸ)™)×*Ñ*ØÜŸ™×-Ñ-¨d×.AÑ.AÓBð 	õ 		
ó    c                  ó   — y)zMay not do anything.Nr   ©r7   s    r   Ú_clear_cachezRootModule._clear_cacheI   s   € àr:   Úprevious_commitÚ	recursiveÚforce_removeÚinitÚto_latest_revisionÚprogress)Nr   Údry_runÚforce_resetÚ
keep_goingc
                 ó^  — | j                   j                  rt        d«      ‚|€
t        «       }d}
|rd}
| j                   }	 |j                  j
                  }|€U	 |j                  |j                  j                  d«      j                  «      }|j                  |j                  k(  rt        ‚n|j                  |«      }| j                  ||¬«      }| j                  |«      }t        |«      }t        |«      }||z
  }t        |«      }t        |«      D ]¯  \  }}t        }|dk(  r	|t         z  }|j#                  ||||
d|j$                  ›d	|j&                  ›�z   «       |j                  j
                  |_        |j+                  d
d||¬«       ||dz
  k(  r	|t,        z  }|j#                  ||||
d|j$                  z  z   «       Œ± ||z  }t        |«      }t        |«      D �]Ö  \  }}||j$                     }||j$                     }|j.                  |j.                  k7  r¨|j1                  «       r˜|j#                  t         t2        z  |||
d|j$                  ›d|j&                  ›d|j&                  ›�z   «       |s|j5                  |j.                  dd
¬«       |j#                  t,        t2        z  |||
d|j$                  z  z   «       |j1                  «       sŒ÷|j6                  |j6                  k7  �r™d}|j9                  «       }|j:                  }t        |D �cg c]  }|j6                  |j6                  k(  sŒ|‘Œ  c}«      dk(  �rD|j#                  t         t<        z  |||
d|j$                  ›d|j6                  ›d|j6                  ›�z   «       |�sÉ||D �cg c]  }|j$                  ‘Œ c}vsJ ‚|j?                  ||j6                  «      }|jA                  |¬«       t        |jB                  D �cg c]  }|jD                  |jF                  k(  sŒ|‘Œ  c}«      dk(  r%tI        d|jF                  ›d|j6                  ›�«      ‚d} |D ]  }!|!j6                  |j6                  k(  sŒ|!}  n | €,t        |«      dk(  r|d   } nt        d|j6                  z  «      ‚| j$                  }"|jK                  | «       |jM                  |"«       |j                  }#d
}$|jB                  | jF                     }%|%j
                  jO                  «       D ]  }&|&j                  |#k(  sŒd}$ n |$s;tP        jS                  d|jT                  «       |%j
                  j                  |_        |j#                  t,        t<        z  |||
d|j$                  z  z   «       |jV                  |jV                  k7  s�ŒÅ|j#                  t         tX        z  |||
d|j$                  ›d|jV                  ›d|jV                  ›�z   «       |s˜|j9                  «       }|j:                  }'|'D ]  }!|!jA                  |¬«       Œ 	 tZ        j\                  j_                  ||jF                  d¬«      }(|(jc                  te        |'|jF                  «      «       |(|j                  _3        |j#                  t,        tX        z  |||
d|j$                  z  z   «       �ŒÙ 	 D ]d  }|j#                  d
||||||	¬ «       |sŒ|j1                  «       sŒ/ to        | «      |j9                  «       «      j#                  d|||||||	¬!«       Œf | S # t        $ r |}Y �Œvw xY wc c}w c c}w c c}w # t`        $ r$ t[        j\                  ||jV                  «      }(Y �Œ!w xY w# th        $ r+})|	s‚ tP        jk                  tm        |)«      «       Y d})~)Œëd})~)ww xY w)"a+  Update the submodules of this repository to the current HEAD commit.

        This method behaves smartly by determining changes of the path of a submodule's
        repository, next to changes to the to-be-checked-out commit or the branch to be
        checked out. This works if the submodule's ID does not change.

        Additionally it will detect addition and removal of submodules, which will be
        handled gracefully.

        :param previous_commit:
            If set to a commit-ish, the commit we should use as the previous commit the
            HEAD pointed to before it was set to the commit it points to now.
            If ``None``, it defaults to ``HEAD@{1}`` otherwise.

        :param recursive:
            If ``True``, the children of submodules will be updated as well using the
            same technique.

        :param force_remove:
            If submodules have been deleted, they will be forcibly removed. Otherwise
            the update may fail if a submodule's repository cannot be deleted as changes
            have been made to it.
            (See :meth:`Submodule.update <git.objects.submodule.base.Submodule.update>`
            for more information.)

        :param init:
            If we encounter a new module which would need to be initialized, then do it.

        :param to_latest_revision:
            If ``True``, instead of checking out the revision pointed to by this
            submodule's sha, the checked out tracking branch will be merged with the
            latest remote branch fetched from the repository's origin.

            Unless `force_reset` is specified, a local tracking branch will never be
            reset into its past, therefore the remote branch must be in the future for
            this to have an effect.

        :param force_reset:
            If ``True``, submodules may checkout or reset their branch even if the
            repository has pending changes that would be overwritten, or if the local
            tracking branch is in the future of the remote tracking branch and would be
            reset into its past.

        :param progress:
            :class:`RootUpdateProgress` instance, or ``None`` if no progress should be
            sent.

        :param dry_run:
            If ``True``, operations will not actually be performed. Progress messages
            will change accordingly to indicate the WOULD DO state of the operation.

        :param keep_going:
            If ``True``, we will ignore but log all errors, and keep going recursively.
            Unless `dry_run` is set as well, `keep_going` could cause
            subsequent/inherited errors you wouldn't see otherwise.
            In conjunction with `dry_run`, this can be useful to anticipate all errors
            when updating submodules.

        :return:
            self
        z-Cannot update submodules in bare repositoriesNr$   z	DRY-RUN: éÿÿÿÿ)r)   r   zRemoving submodule z at FT)ÚconfigurationÚmoduleÚforcerD   r   zDone removing submodule %rzMoving repository of submodule z from z to )rJ   rI   z&Done moving repository of submodule %rÚ__new_origin__zChanging url of submodule )rC   zSubmodule branch named z. was not available in new submodule remote at z,Couldn't find original remote-repo at url %rz‚Current sha %s was not contained in the tracking             branch at the new remote, setting it the the remote's tracking branchz"Done adjusting url of submodule %rzChanging branch of submodule zbranch: Created from HEAD)Úlogmsgz$Done changing branch of submodule %r)r?   rA   rB   rC   rD   rK   rF   )r?   r@   rA   rB   rC   rD   rE   rF   )8r8   Úbarer   r   r1   r2   Ú	log_entryÚ	oldhexshar%   r.   Ú
IndexErrorÚ
list_itemsÚsetÚlenÚ	enumerater   ÚBEGINÚupdater(   ÚabspathÚ_parent_commitÚremoveÚENDr'   Úmodule_existsr   Úmover*   rJ   Úremotesr   Úcreate_remoteÚfetchÚrefsÚremote_headÚbranch_nameÚ
ValueErrorÚdelete_remoteÚrenameÚtraverseÚ_loggerÚwarningÚhexshar+   r   r3   r4   ÚcreateÚOSErrorÚset_tracking_branchr	   Ú	referenceÚ	ExceptionÚerrorÚstrÚtype)*r7   r>   r?   r@   rA   rB   rC   rD   rE   rF   Úprefixr8   Ú
cur_commitÚpsmsÚsmsÚspsmsÚssmsÚrrsmÚlen_rrsmÚiÚrsmÚopÚcsmsÚlen_csmsÚcsmÚpsmÚsmÚnnÚsmmÚrmtsÚrÚsmrÚrmt_for_deletionÚremoteÚ	orig_nameÚsmshaÚfoundÚrrefÚcÚsmmrÚtbrÚerrs*                                             r   rW   zRootModule.updateO   sN  € ðR �9‰9�>Š>Ü+Ð,[Ó\Ð\ð ÐÜ)Ó+ˆHð ˆÙØ ˆFà�y‰yˆð~	$ð Ÿ™×)Ñ)ˆJØÐ&ð1Ø&*§k¡k°$·)±)×2EÑ2EÀbÓ2I×2SÑ2SÓ&T�OØ&×-Ñ-°×1MÑ1MÒMÜ(Ð(ð Nð #'§+¡+¨oÓ">�ð /3¯o©o¸dÐRa¨oÓ.bˆDØ-1¯_©_¸TÓ-BˆCÜ˜“IˆEÜ�s“8ˆDð ˜4‘<ˆDÜ˜4“yˆHä# D›/ò c‘��3Ü�Ø˜’6Øœ%‘K�Bð
 —‘ØØØÙ¸c¿h»hÈÏÊÐTÑTô	ð &*§Y¡Y×%5Ñ%5�Ô"Ø—
‘
Ø"'ØØ&Ø#ð	 ô ð ˜ 1™Ò$Øœ#‘I�Bà—‘  A x°Ð:VÐY\×YaÑYaÑ:aÑ1aÕbð3cð> ˜4‘<ˆDÜ˜4“yˆHÜ# D›/ó z‘��3Ø#'¨¯©¡>�Ø"% c§h¡h¡-�ð —7‘7˜cŸh™hÒ&¨3×+<Ñ+<Ô+>Ø—O‘OÜ¤
Ñ*ØØ ÙÐVX×V]ÓV]Ð_b×_jÓ_jÐln×lvÒlvÐ!wÑwô	ñ #ØŸ™ §¡°ÀU˜ÔKà—O‘OÜœjÑ(ØØ ØÐ!IÈBÏGÉGÑ!SÑSô	ð ×#Ñ#Õ%ð —v‘v §¡Ó(ð .˜Ø Ÿi™i›k˜Ø"Ÿ{™{˜ô ¨4ÖC a°1·5±5¸B¿F¹F³?¢ÒCÓDÈÓIØ$ŸO™OÜ %¬	Ñ 1Ø !Ø (Ù &ÐY[×Y`ÓY`Ðbe×biÓbiÐkm×kqÒkqÐ)rÑ rô	ò $+Ø')À$Ö1G¸Q°!·&³&Ò1GÑ'GÐ GÐ'GØ&)×&7Ñ&7¸¸B¿F¹FÓ&C Ø #§	¡	°8 	Ô <ô $'°3·8±8Ö'_¨a¸q¿}¹}ÐPR×P^ÑP^Ó?^ªÒ'_Ó#`ÐdeÒ#eÝ*4à+-¯>«>¸2¿6º6ð)Có+&ð %&ð 48Ð 0Ø.2ò !. FØ'-§z¡z°S·W±WÓ'<Ø;AÐ(8Ù(-ð!.ð $4Ð#;Ü'*¨4£y°A¢~Ø;?À¹7Ñ(8ô /HØ,ZÐ]`×]dÑ]dÑ,dó/*ð )*ð -=×,AÑ,A 	Ø #× 1Ñ 1Ð2BÔ Cð !$§
¡
¨9Ô 5ð )+¯	©	 Ø(- Ø'*§x¡x°×0@Ñ0@Ñ'A Ø)-¯©×)=Ñ)=Ó)?ò !. AØ'(§x¡x°5Ó'8Ø04¨Ù(-ð!.ñ (-ô %,§O¡Oð)Tà(*¯	©	ô%&ð
 15·±×0BÑ0B B¤Ið %ŸO™OÜ #¤i¡Ø !Ø (Ø &Ð)MÐQS×QXÑQXÑ)YÑ Yô	ð —~‘~¨¯©Ô8ð !Ÿ™Ü!¤LÑ0ØØ$Ù"à!Ÿw›w¨¯«¸¿ºðIñIô	ñ  'Ø"$§)¡)£+˜CØ#&§;¡;˜Dð +/ò @ Ø &§¡°h Õ ?ð@ðDÜ&)§h¡h§o¡oØ$'Ø$&§N¡NØ+Fð '6ó '" ð  ×3Ñ3Ô4LÈTÐSU×SaÑSaÓ4bÔcð 25˜CŸH™HÔ.ð !Ÿ™Ü¤,Ñ.ØØ$Ø"Ð%KÈbÏgÉgÑ%UÑUö	ñkzðL ò 	ˆBà�I‰IØØØ#5Ø!ØØ!Ø%ð ô ò à×#Ñ#Õ%Ø”D˜“J˜rŸy™y›{Ó+×2Ñ2Ø"&Ø%1Ø!Ø+=Ø!)Ø 'Ø$/Ø#-ð 3õ 	ð'	ðB ˆøôu "ò 1à&0“Oð1üòr  Dùò 2Hùò (`øôb $+ò Dä&)§h¡h¨s°B·N±NÓ&C£ðDûô0 ò 	$ÙØÜ�M‰Mœ#˜c›(×#Ñ#ûð	$ús²   Á]8 ÁA\' Â-H*]8 ËA]8 Ì\9
Ì8\9
Ì<A]8 Î\>Î+A]8 Ï2]
Ð]
ÐA]8 Ñ%B4]8 ÔB
]8 Ö&B ]8 Ø',]ÙA(]8 Ü'\6Ü2]8 Ü5\6Ü6]8 Ý)]5Ý1]8 Ý4]5Ý5]8 Ý8	^,Þ!^'Þ'^,c                 ó   — | j                   S )z8:return: The actual repository containing the submodules)r8   r<   s    r   rJ   zRootModule.moduleÌ  s   € à�y‰yÐr:   )r8   r   r"   N)r"   N)	NTFTFNFFF)r"   r   )r   r   r   r   r   r0   r-   r=   r   r   rq   ÚboolrW   rJ   Ú__classcell__)r9   s   @r   r   r   1   sÅ   ø„ ñð €Ià€Kõ
óð 9=ØØ"ØØ#(Ø6:ØØ!Ø ñ{à˜z¨3°Ð4Ñ5ð{ð ð{ð ð	{ð
 ð{ð !ð{ð Ð2Ñ3ð{ð ð{ð ð{ð ð{ð 
ó{÷zr:   )Ú__all__Úloggingr3   Úgit.excr   Úbaser   r   Úutilr	   Útypingr
   r   Ú	git.typesr   Úgit.repor   Úgit.utilr   Ú	getLoggerr   rh   r   rV   r[   r   r   r   r   r   r   r:   r   ú<module>rŸ      s¤   ðð Ð-Ð
.€ã ã 
Ý -ç +Ý *÷ (å  áÝÝ%ð ˆ'×
Ñ
˜HÓ
%€ô	˜ô 	ð 	× Ñ €Ø×Ñ€Ø	×	"Ñ	"€Ø!×.Ñ.€Ø×(Ñ(€	Ø×*Ñ*€
ô]�õ ]r:   