HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/thread-self/root/lib64/python2.7/site-packages/mercurial/similar.pyo
�
1�3\c@@ssddlmZddlmZddlmZd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�ZdS(
i(tabsolute_importi(t_(tmdiffc	c@si}|jjtd�dt|�t|�dtd��}xW|D]O}|j�t|j��}||kr�|g||<qG||j|�qGWxn|D]f}|j�|j�}t|�}x;|j|g�D]'}||j�kr�||fVPq�q�Wq�W|j	�dS(s�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 renamesttotaltunittfilesN(
tuitmakeprogressRtlent	incrementthashtdatatappendtgettcomplete(	trepotaddedtremovedthashestprogresstfctxthtadatatrfctx((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt_findexactmatchess&



cC@s|j�}|tj|�fS(N(RRt
splitnewlines(Rtorig((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt_ctxdata1sc
C@s�|\}}|j�}d}tj||�}xB|D]:\}}}	}
x%||	|
!D]}|t|�7}qWWq7Wt|�t|�}|d|S(Nig@(RRtblocksR(
Rt	otherdataRtlinesttexttequaltmatchestx1tx2ty1ty2tlinetlengths((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt_score6scC@st|t|��S(N(R(R(tfctx1tfctx2((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pytscoreDscc@si}|jjtd�dtd�dt|��}x�|D]�}|j�d}xs|D]k}|j|d|f�d}	|dkr�t|�}nt||�}
|
|	krZ||
f||<qZqZWq=W|j	�x4|j
�D]&\}}|\}
}|
||fVq�WdS(s�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 filesRRRiN(RRRRR	tNoneR
RR(Rt	iteritems(RRRt	thresholdtcopiesRtrRtat	bestscoretmyscoretdesttvtsourcetbscore((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt_findsimilarmatchesGs"



cC@s)g|D]}|j�dkr|^qS(Ni(tsize(tfctxstx((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt
_dropempty`sc#@s(|d��j��t�fd�t|�D��}t�fd�t|�D��}t�}xGt|||�D]3\}}|j|�|j�|j�dfVqvW|dkr$g|D]}	|	|kr�|	^q�}xCt||||�D])\}}}
|j�|j�|
fVq�WndS(s:find renamed files -- yields (before, after, score) tuplesc3@s|]}�|VqdS(N((t.0tfp(twctx(s7/usr/lib64/python2.7/site-packages/mercurial/similar.pys	<genexpr>ksc3@s%|]}|�kr�|VqdS(N((R=R>(tpctx(s7/usr/lib64/python2.7/site-packages/mercurial/similar.pys	<genexpr>lsg�?N(	R,tp1R<tsortedtsetRtaddtpathR8(RRRR.t
addedfilestremovedfilestmatchedfilesR1tbR;R+((R@R?s7/usr/lib64/python2.7/site-packages/mercurial/similar.pytfindrenamescs
""	
%N(
t
__future__Rti18nRtRRRR(R+R8R<RJ(((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt<module>s	"