ROOTPLOIT
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67150586 (67150586)
PHP: 8.3.36
Disabled: NONE
Upload Files
File: //kunden/kunden/kunden/lib/python3/dist-packages/mercurial/__pycache__/ancestor.cpython-313.pyc
�

6�h�1���SSKJr SSKrSSKJr SSKJrJr \R"S5r	Sr
Sr"S	S
5rSr
"SS
5rg)�)�annotationsN�)�nullrev)�dagop�policy�parsersc��[U[5(d[U5n[U;a
[5$[U5S::aU$S[U5-S-
nS/[	U5S--n[U5HupESU-X5'M SWS--n[5n[U5n[U5S-
n	U	S:�a�U(a�U	n
U	S-n	X:(dMX:nX�:a'US-nX�:XaUR
U
5 X�-nX�;aU
1$X�:aDU"U
5H7nX<n
U[:XaMU
S:XaX�U'US-
nM$X�:wdM+X<==U-ss'M9 O4U"U
5H(nU[:XaMX<n
U
(a
X�:aUS-nX�U'M* U	S:�a	U(aM�U$)z�Returns a set with the heads of all common ancestors of all nodes,
heads(::nodes[0] and ::nodes[1] and ...) .

pfunc must return a list of parent vertices for a given vertex.
rr)�
isinstance�setr�len�max�	enumerate�add)�pfunc�nodes�allseen�seen�i�n�poison�gca�interesting�nv�v�sv�p�sps              �4/usr/lib/python3/dist-packages/mercurial/ancestor.py�commonancestorsheadsrs����e�S�!�!��E�
���%���u��
�5�z�Q�����C��J��!�#�G�
�3�#�e�*�q�.�!�D��%� ����q�&���!�
�1�q�5�\�F�

�%�C��e�*�K�	�T��Q��B�
��'�k���
�a����w��
�W��
�;��1��K��}�����
�����:��3�J�
�;��1�X���W����<����7� ��G��1�$�K��X��G�r�M�G���1�X����<���W���"�+��1�$�K��Q��
�3
��'�k�k�@�J�c�Z^�U4Sjn[T/UQ76n[U5S::aU$U"U5$)z�
Returns the common ancestors of a and b that are furthest from a
root (as measured by longest path).

pfunc must return a list of parent vertices for a given vertex.
c�>�0n[U5S-nS/U-nS/U-n/n[[U55H(upgSX7'SU-nX�U'SX'URX�45 M* US-
n	U	S:�Ga
[	U5S:�a�U	n
U	S-n	X:nUS:XaM)XJnT"U
5H�n
U
[
:XaMX=nXMnX�::aAUS-X='X�:wa3X==S-
ss'X�U
'U(aX==S-ss'XS:XaX	MWMYM[M]X�S-
:XdMgX�-nUU:XaMsUXM'UR
US5 UU==S-
ss'X==S-ss'XS:XdM�X	M� X==S-ss'XS:XaX	U	S:�a[	U5S:�aM�[	U5S:wa/$SnUHnUU-nM
 UVVs1sHupgUU-(dMUiM snn$s snnf)Nrr)r
r�sorted�appendrr�
setdefault)rr�count�depthr�mappingrr�brr�dvrr�dpr�nsp�krs                  �r�deepest�ancestors.<locals>.deepestVs������E�
�Q�����e����s�U�{�����f�U�m�,�D�A��E�H��Q��A���G��K�N��N�N�A�6�"�-��Q�Y���A�g�#�k�*�Q�.��A��!�G�B���B��Q�w����B��1�X����<���X���W���8�!�A�v�E�H��x�#��1�,��"$�Q���'�O�q�0�O�*��!�3�$/�O� 4�� ���6�\��'�C��b�y� �!�D�G��*�*�3��2���$��)�$��O�q�(�O�"��!�+�'�O�/�0
�O�q� �O���!�#��O�C�A�g�#�k�*�Q�.�F�{��q� ��I�
���A�
��F�A�� '�1��f�q�1�q�5���1�1��1s�F=�3F=r)rr)r�	orignodesr.rs`   r�	ancestorsr1Ns4���62�p�u�
1�y�
1�C�
�3�x�1�}��
��3�<�r c�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�incrementalmissingancestors�apersistent state used to calculate missing ancestors incrementally

Although similar in spirit to lazyancestors below, this is a separate class
because trying to support contains and missingancestors operations with the
same internal data structures adds needless complexity.c��[U5UlUR(dURR[5 Xlg�N)r�basesrrr)�selfrr7s   r�__init__�$incrementalmissingancestors.__init__�s)����Z��
��z�z��J�J�N�N�7�#��
r c�P�UR=(a UR[1:g$)z0whether the common set has any non-trivial bases)r7r�r8s r�hasbases�$incrementalmissingancestors.hasbases�s���z�z�5�d�j�j�W�I�5�5r c�:�URRU5 g)z)grow the ancestor set by adding new basesN)r7�update)r8�newbasess  r�addbases�$incrementalmissingancestors.addbases�s���
�
���(�#r c�X�[R"URUR5$r6)r�headrevsr7rr<s r�
basesheads�&incrementalmissingancestors.basesheads�s���~�~�d�j�j�$�*�*�5�5r c�^�URnURnURU5 UR[5 U(dg[U5m[
U4SjU55n[U5U:Xag[T[U5S-
S5HCnXR;aM
URU5 URU"U55 [U5U:XdMC g g)z:remove all ancestors of bases from the set revs (in place)Nc3�6># �UHoT:�dM
Sv� M g7f)rN�)�.0�r�starts  �r�	<genexpr>�Bincrementalmissingancestors.removeancestorsfrom.<locals>.<genexpr>�s����5�4�a�u�9���4�s�	�	r���)r7r�difference_update�discardrr
�sumr�range�minr@)r8�revsr7r�	keepcount�currrMs      @r�removeancestorsfrom�/incrementalmissingancestors.removeancestorsfrom�s�����
�
���
�
�����u�%����W�����E�
���5�4�5�5�	��t�9�	�!���%��T��Q���3�D�� ���L�L����L�L��t��%��4�y�I�%��4r c�D�[U5nURnURnURU5nUR	U5 U(d/$[[U5[U55n/n[
U[S5GHnU(d GOX�;aUURU5 U"U5H6n	URU	5 URU	5 URU	5 M8 MhX�;a'URU5 URU5 Un
UnOX�;aUn
UnOM�U"U5H_n	U	[:XaMX�;dX�;a5URU	5 URU	5 URU	5 MNU
RU	5 Ma GM UR5 U$)z�return all the ancestors of revs that are not ancestors of self.bases

This may include elements from revs.

Equivalent to the revset (::revs - ::self.bases). Revs are returned in
revision number order, which is a topological order.rP)
rr7r�intersectionrQr
rTr�removerRrr$�reverse)r8rV�	revsvisit�
basesvisitr�	bothvisitrM�missingrXr�	thisvisit�
othervisits            r�missingancestors�,incrementalmissingancestors.missingancestors�sp����I�	��Z�Z�
��
�
���*�*�:�6�	��#�#�I�.���I��C�	�N�C�
�O�4�� ���%��"�-�D���� �� � ��&��t��A��%�%�a�(��N�N�1�%��M�M�!�$�%��� ����t�$�� � ��&�%�	�'�
��#�&�	�&�
���4�[����<���_����%�%�a�(��N�N�1�%��M�M�!�$��M�M�!�$�!�5.�N	�����r )r7rN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r9r=rBrFrYre�__static_attributes__rJr rr3r3�s&��?��6�$�6��4Hr r3c#�# �[1n[Rn[Rn[RnUR
nU(a:UV	s/sHo�*PM n
n	UR
U5 [R"U
5 OY/n
[R"U
5 UH;n	U"U	5up�X�;aU"X�*5 U"U5 X�;dM*U"X�*5 U"U5 M= U
(ahU
S*n
X�:agU
v� U"U
5up�X�;a!X�-
S:XaU*U
S'O	U"X�*5 U"U5 OU"U
5 X�;aU"X�*5 U"U5 U
(aMgggs sn	f7f)Nrr)r�heapq�heappush�heappop�heapreplacerr@�heapify)�
parentrevs�initrevs�stoprev�	inclusiverrorprq�seerL�visit�p1�p2�currents              r�_lazyancestorsiterr|s3����9�D��~�~�H��m�m�G��#�#�K�
�(�(�C��%�&�X���X��&����H��
�
�
�e����
�
�
�e���A���]�F�B��~����$��B���~����$��B������8�)������
��G�$���
�>��|�q� ��3��a���E�3�'���G��E�N�
�>��U�C� ���G�%�%��'�s �AE�E�A*E�BE�Ec�4�\rSrSrSSjrSr\rSrSrSr	g)	�
lazyancestorsi?c��XlUVs/sHoUU:�dM
UPM snUlX0lX@l[	5Ul[
URURURUR5Ulgs snf)a�Create a new object generating ancestors for the given revs. Does
not generate revs lower than stoprev.

This is computed lazily starting from revs. The object supports
iteration and membership.

cl should be a changelog and revs should be an iterable. inclusive is
a boolean that indicates whether revs should be included. Revs lower
than stoprev will not be generated.

Result does not include the null revision.N)�_parentrevs�	_initrevs�_stoprev�
_inclusiver�
_containsseenr|�
_containsiter)r8rrVrurvrLs      rr9�lazyancestors.__init__@se��!��%)�:�T��'�\�!�T�:����
�#�� �U���/����d�n�n�d�m�m�T�_�_�
����;s
�	A=�A=c�N�[[U55 g![a gf=f)z*False if the set is empty, True otherwise.TF)�next�iter�
StopIterationr<s r�__nonzero__�lazyancestors.__nonzero__Vs(��	���d������	��	�s��
$�$c�n�[URURURUR5$)a�Generate the ancestors of _initrevs in reverse topological order.

If inclusive is False, yield a sequence of revision numbers starting
with the parents of each revision in revs, i.e., each revision is
*not* considered an ancestor of itself. Results are emitted in reverse
revision number order. That order is also topological: a child is
always emitted before its parent.

If inclusive is True, the source revisions are also yielded. The
reverse revision number order is still enforced.)r|r�r�r�r�r<s r�__iter__�lazyancestors.__iter__`s,��"����d�n�n�d�m�m�T�_�_�
�	
r c���URnX;agURnUcgUcgURn[U5nU"U5 XQ:XagXQ:agM!![a
 SUlgf=f)z5Test whether target is an ancestor of self._initrevs.TNF)r�r�rr�r�)r8�targetrr�rw�revs      r�__contains__�lazyancestors.__contains__os����!�!���>���!�!���<���>���h�h��	���4�j���C���=���<� �
���	�"&�D���		�s�A�A�A�A*�)A*)r�r�r�r�r�r�N)rF)
rgrhrirjr9r��__bool__r�r�rlrJr rr~r~?s��
�,��H�

�r r~)�
__future__rrn�noder�rr�	importmodrrr1r3r|r~rJr r�<module>r�sS��#����
�
�
�9�
%��6�rD�Nz�z�|)�XK�Kr