https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/mercurial/__pycache__/hbisect.cpython-310.pyc
o

�]Lb�+�@s�ddlmZddlZddlZddlmZddlmZmZddl	m
Z
dd�Zd	d
�Zdd�Z
d
d�Zdd�Zdd�Zejdd��Zdd�Zdd�Zdd�ZdS)�)�absolute_importN�)�_)�hex�short)�errorcs������j��j}�fdd�|dD����fdd�}d}||d|d�\�}|s8d	}||d|d�\�}����}|skt|d�d
kr^t|d�d
kr^|d|dkr^t�td���t�td��t|�f��i}t	�
�g�}g}	|r�|��}
||
gkr�|	�|
�||
�D]}|d
kr�||vr�||�|
�q�|
g||<|�|�q�|sw|	�
�t|	�}��fdd�|	D�}
|d
ks�|
s͇fdd�|	D�d|fS|d}d}d
}t�}|	D]u}
|
|vr�|�|�|
g��q�||
p�|
g}d||
<t|�}||}t||�}||k�r|
�v�r|}|
}||k�rn9||k�r+|
�v�r+|�|�|
g��q�|�|
g�D]}||�rFtt|||��||<�q1||g||<�q1q�|du�sWJ���|�}|g||fS)a�find the next node (if any) for testing during a bisect search.
    returns a (nodes, number, good) tuple.

    'nodes' is the final result of the bisect if 'number' is 0.
    Otherwise 'number' indicates the remaining possible candidates for
    the search and 'nodes' contains the next bisect target.
    'good' is True if bisect is searching for a first good changeset, False
    if searching for a first bad one.
    csh|]}��|��qS���rev��.0�n��	changelogr�3/usr/lib/python3/dist-packages/mercurial/hbisect.py�	<setcomp>&�zbisect.<locals>.<setcomp>�skipcs\t�fdd�|D��}t�dd��}��d||�D]}g||<q||dur*|dfS||fS)Nc�g|]}��|��qSrr	rrrr�
<listcomp>)rz2bisect.<locals>.buildancestors.<locals>.<listcomp>cSsdS)Nrrrrr�<lambda>*sz0bisect.<locals>.buildancestors.<locals>.<lambda>s!descendants(%ln) - ancestors(%ln))�min�collections�defaultdict�revs)�bad�good�badrev�	ancestorsr
)r�reporr�buildancestors(s
zbisect.<locals>.buildancestorsF�bad�goodTrs+starting revisions are not directly relateds)inconsistent state, %d:%s is good and bad���cs g|]}|�vr|�kr|�qSrr�r�c)r�skiprrrWs zbisect.<locals>.<listcomp>crr��noder$rrrrYrr�N)�
unfilteredr�
parentrevsr(�lenr�Abortrrr�deque�popleft�append�sort�set�update�getr�list)r�state�	clparentsr rrr�children�visit�
candidatesr
�prev�tot�	unskipped�perfect�best_rev�best_len�poison�a�x�y�valuer%�	best_noder)rrrr&r�bisects�	

��


��


�
rGcCsj||d��}t|�dkr3|r|d}n|d}tdd�|D�t|�@�}|dkr3|d�|d�SdS)Nrrr!r"cSsh|]}|���qSrr')r�irrrr�szextendrange.<locals>.<setcomp>)�parentsr,r2�ancestor)rr6�nodesrrI�side�numrrr�extendrange�s
rNcCsnggggd�}|j�d�D]'}|dd���\}}|���|�}||vr-t�td�|��||�|�q
|S)N)�currentr"r!r�bisect.stater#sunknown bisect kind %s)	�vfs�tryreadlines�splitr*�lookuprr-rr0)rr6�l�kindr(rrr�
load_state�srWc	Csx|jdddd�}|���&t|�D]}||D]
}|�d|t|�f�qq|��Wd�dS1s5wYdS)NrP�wT)�
atomictemps%s %s
)rQ�wlock�sorted�writer�close)rr6�frVr(rrr�
save_state�s
�
"�r_cCs |j�d�r|j�d�dSdS)z+remove any bisect state from the repositoryrPN)rQ�exists�unlink)rrrr�
resetstate�s�rbcCs8|dr
|dr
dS|dst�td���t�td���)z`check we have both 'good' and 'bad' to define a range

    Raise StateError exception otherwise.r"r!Ts'cannot bisect (no known good revisions)s&cannot bisect (no known bad revisions))r�
StateErrorr)r6rrr�
checkstate�s
rdc	cs:�zdVW|g|d<t||�dS|g|d<t||�w)NrO)r_)rr6r(rrr�
restore_state�s�

�rec
Cst|�}|dvrt|��jj||�Sd}|�d�}t|�dkr%d}d}nd}d}d	}d
|||f}d||f}	d}
d
}d|
||f}|dkrL|�|�S|dkrU|�|�S|dkr^|�|	�S|dkrg|�|�S|dkrp|�|�S|dkry|�|�St�t	d���)a
    Return a list of revision(s) that match the given status:

    - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip
    - ``goods``, ``bads``      : csets topologically good/bad
    - ``range``              : csets taking part in the bisection
    - ``pruned``             : csets that are goods, bads or skipped
    - ``untested``           : csets whose fate is yet unknown
    - ``ignored``            : csets ignored due to DAG topology
    - ``current``            : the cset currently being bisected
    )r"r!rrOs9( bisect(bad)::bisect(good) | bisect(good)::bisect(bad) )sbisect(good)::bisect(bad)rsbisect(good)::s
::bisect(bad)s::bisect(good)s
bisect(bad)::sbisect(skip)s( (%s) | (%s) | (%s) )s( (%s) - (%s) )s::bisect(bad) - ::bisect(good)s::bisect(good) - ::bisect(bad)s( ( (%s) | (%s) ) - (%s) )srangespruned�untested�ignored�goods�badssinvalid bisect state)
rW�mapr*rr
rr,r�
ParseErrorr)
r�statusr6�range�_t�goods�bads�skips�pruned�untested�iba�iga�ignoredrrrr4�s:







r4cCs�|j�|�}|t|d�vrtd�S|t|d�vrtd�S|t|d�vr'td�S|t|d�vs5|t|d�vr9td�S|t|d�vrDtd�S|t|d�vrOtd	�S|t|d
�vrZtd�SdS)Nr"r!rsskippedrfrOrgrhsgood (implicit)risbad (implicit))rr
r4r)rr(r
rrr�labels rwcCs�|��}t|�dkr9|r|�td��n|�td��|�||d�t||||�}|dur8|�td�|�n|rC|�td��n|�td��|D]	}|�||�qL|��dS)NrsThe first good revision is:
sThe first bad revision is:
rs�Not all ancestors of this changeset have been checked.
Use bisect --extend to continue the bisection from
the common ancestor, %s.
sCDue to skipped revisions, the first good revision could be any of:
sBDue to skipped revisions, the first bad revision could be any of:
)r*r,r\r�showrNr])�uirr6�	displayerrKr�
extendnoder
rrr�printresult$s<����
����r|)�
__future__rr�
contextlib�i18nrr(rr�rrGrNrWr_rbrd�contextmanagerrer4rwr|rrrr�<module>s"
k	
D

https://t.me/RX1948 - 2025