403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/similar.cpython-39.opt-1.pyc
a

�+�b��@sdddlmZddlmZddlmZmZdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dS)�)�absolute_import�)�_)�mdiff�pycompatc	cs�i}|jjtd�t|�t|�td�d�}|D]:}|��t|���}||vrZ|g||<q.||�|�q.|D]H}|��|��}t|�}|�|g�D]}||��kr�||fVqnq�qn|�	�dS)z�find renamed files that have no changes

    Takes a list of new filectxs and a list of removed filectxs, and yields
    (before, after) tuples of exact matches.
    ssearching for exact renames�files)�total�unitN)
�ui�makeprogressr�len�	increment�hash�data�append�get�complete)	�repo�added�removedZhashes�progress�fctx�hZadataZrfctx�r�7/usr/lib64/python3.9/site-packages/mercurial/similar.py�_findexactmatchess*�
rcCs|��}|t�|�fS�N)rrZ
splitnewlines)r�origrrr�_ctxdata6src
Csl|\}}|��}d}t�||�}|D]*\}}}	}
||	|
�D]}|t|�7}q<q$t|�t|�}|d|S)Nrg@)rrZblocksr)
rZ	otherdatar�lines�textZequal�matchesZx1Zx2Zy1Zy2�lineZlengthsrrr�_score<sr#cCst|t|��Sr)r#r)Zfctx1Zfctx2rrr�scoreKsr$ccs�i}|jjtd�td�t|�d�}|D]\}|��d}|D]F}|�|d|f�d}	|durbt|�}t||�}
|
|	kr:||
f||<q:q&|��t	�
|�D]\}}|\}
}|
||fVq�dS)z�find potentially renamed files based on similar file content

    Takes a list of new filectxs and a list of removed filectxs, and yields
    (before, after, score) tuples of partial matches.
    ssearching for similar filesr)r	rNr)r
rrrr
rrr#rrZ	iteritems)rrr�	thresholdZcopiesr�rr�aZ	bestscoreZmyscore�dest�v�sourceZbscorerrr�_findsimilarmatchesOs$�
r+cCsdd�|D�S)NcSsg|]}|��dkr|�qS)r)�size��.0�xrrr�
<listcomp>k�z_dropempty.<locals>.<listcomp>r)Zfctxsrrr�
_dropemptyjsr2c	#s�|d�����t�fdd�t|�D��}t�fdd�t|�D��}t��t|||�D]&\}}��|�|��|��dfVqV|dkrƇfdd�|D�}t||||�D]\}}}|��|��|fVq�dS)z:find renamed files -- yields (before, after, score) tuplesNc3s|]}�|VqdSrr�r.�fp)�wctxrr�	<genexpr>vr1zfindrenames.<locals>.<genexpr>c3s|]}|�vr�|VqdSrrr3)�pctxrrr6wr1g�?csg|]}|�vr|�qSrrr-)�matchedfilesrrr0�r1zfindrenames.<locals>.<listcomp>)Zp1r2�sorted�setr�add�pathr+)	rrrr%Z
addedfilesZremovedfilesr'�br$r)r8r7r5r�findrenamesns
�r>N)Z
__future__rZi18nr�rrrrr#r$r+r2r>rrrr�<module>s%

Youez - 2016 - github.com/yon3zu
LinuXploit