403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.217.15
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/setdiscovery.cpython-313.pyc
�

6�h�H���SrSSKJr SSKrSSKrSSKJr SSKJr SSK	J
r
JrJr SSjr
SS
jr"SS5r\r\R""S
S\S	S9rSSjrg)a;
Algorithm works in the following way. You have two repository: local and
remote. They both contains a DAG of changelists.

The goal of the discovery protocol is to find one set of node *common*,
the set of nodes shared by local and remote.

One of the issue with the original protocol was latency, it could
potentially require lots of roundtrips to discover that the local repo was a
subset of remote (which is a very common case, you usually have few changes
compared to upstream, while upstream probably had lots of development).

The new protocol only requires one interface for the remote repo: `known()`,
which given a set of changelists tells you if they are present in the DAG.

The algorithm then works as follow:

 - We will be using three sets, `common`, `missing`, `unknown`. Originally
 all nodes are in `unknown`.
 - Take a sample from `unknown`, call `remote.known(sample)`
   - For each node that remote knows, move it and all its ancestors to `common`
   - For each node that remote doesn't know, move it and all its descendants
   to `missing`
 - Iterate until `unknown` is empty

There are a couple optimizations, first is instead of starting with a random
sample of missing, start by sending all heads, in the case where the local
repo is a subset, you computed the answer in one round trip.

Then you can do something similar to the bisecting strategy used when
finding faulty changesets. Instead of random samples, you can try picking
nodes that will maximize the number of nodes that will be
classified with it (since all ancestors or descendants will be marked as well).
�)�annotationsN�)�_)�nullrev)�error�policy�utilc���0n[R"U5n[5nSnU(a�UR5n	X�;aMUR	U	S5n
X�:�aUS-nX�:Xa(URU	5 U(a[
U5U:�agURU	5 U"U	5HBnU[:wdMU(aX�;dMUR	X�S-5 URU5 MD U(aM�gg)a3update an existing sample to match the expected size

The sample is updated with revs exponentially distant from each head of the
<revs> set. (H~1, H~2, H~4, H~8, etc).

If a target size is specified, the sampling will stop once this size is
reached. Otherwise sampling will happen until roots of the <revs> set are
reached.

:revs:  set of revs we want to discover (if None, assume the whole dag)
:heads: set of DAG head revs
:sample: a sample to update
:parentfn: a callable to resolve parents for a revision
:quicksamplesize: optional target size of the sampler�N)	�collections�deque�set�popleft�
setdefault�add�lenr�append)�revs�heads�sample�parentfn�quicksamplesize�dist�visit�seen�factor�curr�d�ps            �8/usr/lib/python3/dist-packages/mercurial/setdiscovery.py�
_updatesampler!9s����D����e�$�E��5�D�
�F�
��}�}����<���O�O�D�!�$���:��a�K�F��;��J�J�t���C��K�?�$B��������$��A��G�|�T�Q�Y�����q�5�)����Q�� ��%�Tc���[U5U::aU$[U5nU(a[[R"X55$UR5 [USU5$)z�return a random subset of sample of at most desiredlen item.

If randomize is False, though, a deterministic subset is returned.
This is meant for integration tests.
N)r�listr�randomr�sort)r�
desiredlen�	randomizes   r �_limitsampler)_sP���6�{�j� ��
�
�&�\�F���6�=�=��4�5�5�
�K�K�M��v�k�z�"�#�#r"c�t�\rSrSrSrSSjrSrSrSrSr	Sr
\S	5rS
r
SrSrS
rSrSrSrg)�partialdiscovery�naFan object representing ongoing discovery

Feed with data from the remote repository, this object keep track of the
current set of changeset in various states:

- common:    revs also known remotely
- undecided: revs we don't have information on yet
- missing:   revs missing remotely
(all tracked revisions are known locally)
c��XlX lURR5UlSUl[
5UlSUlX0l	X@l
g�N)�_repo�_targetheads�	changelog�incrementalmissingrevs�_common�
_undecidedr�missing�_childrenmap�_respectsizer()�self�repo�targetheads�respectsizer(s     r �__init__�partialdiscovery.__init__zsD���
�'���~�~�<�<�>�������u��� ���'��"�r"c��URRU5 URb&URRUR5 gg)zregister nodes known as commonN)r3�addbasesr4�removeancestorsfrom)r8�commonss  r �
addcommons�partialdiscovery.addcommons�s9�������g�&��?�?�&��L�L�,�,�T�_�_�=�'r"c���URRSXR5nU(a7URR	U5 URRU5 gg)zregister some nodes as missings%ld::%ldN)r/r�	undecidedr5�update�difference_update)r8�missings�
newmissings   r �addmissings�partialdiscovery.addmissings�sF���Z�Z�_�_�[�(�N�N�K�
���L�L���
�+��N�N�,�,�Z�8�r"c��[5n[5nUH0upEU(aURU5 MURU5 M2 U(aURU5 U(aURU5 gg)z*consume an iterable of (rev, known) tuplesN)rrrBrJ)r8r�commonr5�rev�knowns      r �addinfo�partialdiscovery.addinfo�s]������%�� �J�C���
�
�3�����C� �	!�
��O�O�F�#�����W�%�r"c�6�URR5$)z6return True is we have any clue about the remote state)r3�hasbases�r8s r �hasinfo�partialdiscovery.hasinfo�s���|�|�$�$�&�&r"c�N�URSL=(a UR(+$)z1True if all the necessary data have been gatheredN)r4rTs r �
iscomplete�partialdiscovery.iscomplete�s�����d�*�B�4�?�?�/B�Br"c��URbUR$[URRUR55UlUR$r.)r4rr3�missingancestorsr0rTs r rE�partialdiscovery.undecided�sA���?�?�&��?�?�"��d�l�l�;�;�D�<M�<M�N�O������r"c�0�S[UR50$)NrE)rrErTs r �stats�partialdiscovery.stats�s����T�^�^�,�
�	
r"c�6�URR5$)z!the heads of the known common set)r3�
basesheadsrTs r �commonheads�partialdiscovery.commonheads�s���|�|�&�&�(�(r"c�h^�URRRRmU4SjnU$)Nc�>�T"U5SS$)N���)�r�getrevs �r �
getparents�3partialdiscovery._parentsgetter.<locals>.getparents�s����!�9�Q�q�>�!r")r/r1�index�__getitem__)r8rkrjs  @r �_parentsgetter�partialdiscovery._parentsgetter�s+������%�%�+�+�7�7��	"��r"c�Z�URbURR$0=UlnUR5nURn[	U5HIn/X'U"U5H6nU[
:XaMUR
U5nUcM%URU5 M8 MK UR$r.)r6rnrorE�sortedr�getr)r8�children�
parentrevsrrN�prev�cs       r �_childrengetter� partialdiscovery._childrengetter�s������(�
�$�$�0�0�0�(*�)���H��(�(�*�
��~�~���$�<�C��H�M�"�3����7�?���L�L��&���=��H�H�S�M�(�	 ��#�#�#r"c��URn[U5U::a[U5$[URRSU55n[U5U:�a[
XBURS9$[SXUR5US9 U$)z�takes a quick sample of size <size>

It is meant for initial sampling and focuses on querying heads and close
ancestors of heads.

:headrevs: set of head revisions in local DAG to consider
:size: the maximum size of the sample�
heads(%ld)�r(N)r)
rErr$rr/rr)r(r!ro)r8�headrevs�sizerrs     r �takequicksample� partialdiscovery.takequicksample�sz���~�~���t�9�����:���T�Z�Z�_�_�]�D�9�:���v�;�$�������G�G���(�D�$7�$7�$9�4�	
��
r"c	��URn[U5U::a[U5$URn[	URSU55nUR
5nUR5n[X7XV5 [	URSU55nUR5n	[X8XY5 U(deUR(d([U[[U5[U555n[XRURS9n[U5U:awU[U5-
n
[X5-
5nUR(a'UR[ R""X�55 U$UR%5 URUSU
5 U$)Nr{s
roots(%ld)r|)rErr$r/rrro�copyr!rxr7�max�minr)r(rFr%rr&)r8r}r~rr9rru�	revsheads�	revsroots�childrenrevs�more�takefroms            r �takefullsample�partialdiscovery.takefullsample�s9���~�~���t�9�����:���z�z���T�Y�Y�}�d�3�4���(�(�*�
��K�K�M�	��d�v�:���	�	�-��6�7�	��+�+�-���d�v�<��
�v�� � ��t�S��Y���Y��@�A�D��f�d�n�n�E���v�;����#�f�+�%�D��D�M�*�H��~�~��
�
�f�m�m�H�;�<��
��
�
���
�
�h�u��o�.��
r")r6r3r/r7r0r4r5r(N�T)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r<rBrJrPrUrX�propertyrEr^rbrorxrr��__static_attributes__rhr"r r+r+nsX��	�#�>�9�&�'�C�����
�
)��$�:�*r"r+�	discovery�PartialDiscovery)�member�default�pyo3c��[URSS55nUbSUS'[R"5nSnURn	U	R
n
U	RnUbUVs/sH
o�"U5PM n
nO+U	R5Vs/sHo�[:wdMUPM n
nURSS5nURSS5nURSS5nU(Ga"UR(a[U
U5n[U5nOU
nURS	5 US
-
nUR5nUR!S05nUbUS==[#U5-
ss'UR!SS
UVs/sHnU
"U5PM
 sn05nSSS5 WR%5WR%5nnUbS
US'U	R'5[:Xa1UU	R(/:waU	R(/SU4$U	R(/S/4$O;UR5nUR!S05nSSS5 WR%5nUR+[-S55 /nUH-nUU	R(:XaMUR/U"U55 M/ U(a�[#U5[#U5:XaURS5 USU4$[#W5[#U
5:XaG[5W5(a7UR7[-S55 U
Vs/sHnU
"U5PM
 nnUSU4$UR8RnU"SS5nU=(a UR(+nU"SS5nU=(d UR(+nURSS5n U	R:R<(a[>n!O[@n!U!"XUU S9n"U(a,U"RCU5 U"RE[GWW55 U(+n#URI[-S5[-S5S9n$U"RK5(Gd�U#(dU"RM5(aWU#(aUR7[-S55 OURS5 U"RNn%Un&U(a[QUU-5nOURS5 U"RRn%Un&U%"U
U&5nUS
-
nU$RUU5 U"RW5n'URSUU'S[#U54-5 [U5nUR5nUbUS==[#U5-
ss'UR!SS
UVs/sHnU
"U5PM
 sn05R%5nSSS5 Sn#U"RE[GUW55 U"RK5(dGM�U"RY5n([R"5U-
n)U$R[5 URS UU)4-5 S!n*[]U(5[]U5-
n+UR_S"U*[#U(5[#U+5UU)5 UbX�S'U((daUU	R(/:waPU(a[0R`"[-S#55eURc[-S$55 U	R(1SU4$UU	R(/:gn,U(Vs1sHnU
"U5iM
 n(nU(U,U4$s snfs snfs snf!,(df   GNx=f!,(df   GN�=f![0R2a GM�f=fs snfs snf!,(df   GN�=fs snf)%z�Return a tuple (common, anyincoming, remoteheads) used to identify
missing nodes from or in remote.

The audit argument is an optional dictionnary that a caller can pass. it
will be updated with extra data about the discovery, this is useful for
debug.
sdevelsdiscovery.grow-sample.rateNrs
total-queriessdiscovery.exchange-headssdiscovery.sample-size.initialsdiscovery.sample-sizesquery 1; heads
rsheadssknownsnodesstotal-roundtripsTFssearching for changes
sall remote heads known locally
s$all local changesets known remotely
sdiscovery.grow-samplesdiscovery.grow-sample.dynamicsdiscovery.randomizer|s	searchingsqueries)�unitssampling from both directions
staking initial sample
staking quick initial sample
s2query %i; still undecided: %i, sample size is: %i
rEs%d total queries in %.4fs
sDfound %d common and %d unknown server heads, %d roundtrips in %.4fs
s	discoverysrepository is unrelateds!warning: repository is unrelated
)2�float�configr	�timerr1�noderNr}r�
configbool�	configint�limitedargumentsr)r$�debug�commandexecutor�callcommandr�result�tiprev�nullid�statusrrr�LookupError�all�note�uirm�rust_ext_compatr+�pure_partialdiscoveryrBrP�zip�makeprogressrXrUr��intrrFr^rb�completer�log�Abort�warn)-r��local�remote�abortwhenunrelated�ancestorsof�audit�samplegrowth�start�
roundtrips�cl�clnode�clrev�n�ownheadsrN�initial_head_exchange�initialsamplesize�fullsamplesizer�e�fheadsri�fknown�
srvheadhashes�yesno�
knownsrvheadsr��
ownheadhashesr��grow_sample�dynamic_sample�hard_limit_sampler(�pd�disco�full�progress�
samplefunc�
targetsizer^r��elapsed�msgr5�anyincomings-                                             r �findcommonheadsr�s��� ����8�-J�K�L�L���"#�����J�J�L�E��J�	���B�
�W�W�F��F�F�E���&1�2�k��E�!�H�k��2��#%�;�;�=�C�=�C�7�N�C�=��C��M�M�(�4O�P�����X�/O�P���\�\�(�,D�E�N�h��"�"�!�(�,=�>�F��&�\�F��F�
���$�%��a��
�
�
#�
#�
%���]�]�8�R�0�F�� ��&�'�3�v�;�6�'��]�]���&�9�&�Q�v�a�y�&�9���F�	&� &�}�}���
�
��u�
���)*�E�%�&�
�9�9�;�'�!������+��	�	�{�D�-�7�7��I�I�;��r�)�)�"��
#�
#�
%���]�]�8�R�0�F�&��
�
��
��I�I�a�*�+�,��M����2�9�9���	�� � ��t��-����}���]�!3�3��H�H�8�9� �%��6�6��v�;�#�h�-�'�C��J�J��G�G�A�>�?�@�08�9��1�V�A�Y��M�9� �$�
�5�5�
���$�$�J��X�'?�@�K��=�f�&=�&=�"=�K���*J�K�N�+�F�v�/F�/F�G���
�
�h�(>�?�I�	�x�x���
��
"���u� 1�Y�G�E��	����'�
�
�
�c�&�%�(�)�$�$�D����q���Q�z�]��C�H���� � ��5�=�=�?�?������<�=�>����3�4��-�-�J�'�J��!$�^�l�%B�!C���
�H�H�5�6��.�.�J�*�J��H�j�1���a��
����
�#����
��
���B��5��-�s�6�{�;�
<�	
��f���
�
#�
#�
%��� ��&�'�3�v�;�6�'��M�M���&�9�&�Q�v�a�y�&�9���
�f�h�
�&���
�
�
�c�&�%�(�)�Q��� � �T�
�
�
 �F��j�j�l�U�"�G������H�H�
+�z�7�.C�
C�D�	%���&�k�C�
�.�.�G��F�F�<��c�&�k�3�w�<��W�M���%/�!�"��m��	�	�{�2���+�+�a� :�;�<�<��G�G�A�;�<�=�
�Y�Y�K���
�	
� �B�I�I�;�.�K�!'�
(��A�f�Q�i��F�
(��;�
�-�-��k3��C��R:�&�
%��,&�
%�� � � �	��	��:��z:�
&�
%��P)sx�&[-�
[2�[2�4=[<�1[7�[<�\�4\ �
\<�2+]�]�/]�]�7[<�<
\�
\� \9�8\9�]�
])rr�)TNN)r��
__future__rrr%�i18nrr�r�rrr	r!r)r+r��
importrustr�rhr"r �<module>r�ss��!�F#��
�����# �L$�c�c�L)���$�$��*�4D�4�����
�
r.r"

Youez - 2016 - github.com/yon3zu
LinuXploit