MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.126
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib64/python2.7/site-packages/mercurial/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib64/python2.7/site-packages/mercurial/similar.pyo
�
Hq�Qc@sSddlmZddlZddlZddlZd�Zd�Zd�ZdS(i����(t_Nccst|�t|�}i}x^t|�D]P\}}|jjtd�|d|�tj|j��j�}|||<q)Wx|t|�D]n\}}|jjtd�|t|�d|�tj|j��j�}||kr�|||fVq�q�W|jjtd�d�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 renamesttotalN(
tlent	enumeratetuitprogressRtutiltsha1tdatatdigesttNone(trepotaddedtremovedtnumfilesthashestitfctxth((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt_findexactmatches
s"c
#s!i}x�t|�D]�\}�|jjtd�|dt|��tj�fd����fd�}x[|D]S}|j|d|f�d}||j	��}	|	|krr�|	f||<qrqrWqW|jjtd�d�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 filesRcs�j�}|tj|�fS(N(Rtmdifft
splitnewlines(torig(tr(s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyR3scs���\}}d}tj||�}xB|D]:\}}}}x%|||!D]}	|t|	�7}qNWq.Wt|�t|�}
|d|
S(Nig@(tbdifftblocksR(ttextRtlinestequaltmatchestx1tx2ty1ty2tlinetlengths(R(s7/usr/lib64/python2.7/site-packages/mercurial/similar.pytscore8sit	searchingN(RRRRRRt	cachefunctgetR
Rt	iteritems(
RRR
t	thresholdtcopiesRR$tat	bestscoretmyscoretdesttvtsource((RRs7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt_findsimilarmatches's


ccsJ|d}|d}tg|D]&}||j�dkr||^q�}tg|D]2}||krW||j�dkrW||^qW�}xSt|t|�t|��D]3\}	}
|j|
�|	j�|
j�dfVq�W|dkrFxOt|t|�t|�|�D])\}	}
}|	j�|
j�|fVqWndS(s:find renamed files -- yields (before, after, score) tuplest.ig�?N(R
tsettsizeRtsortedtremovetpathR1(RRR
R)t	parentctxt
workingctxtfpt
addedfilestremovedfilesR+tbR$((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pytfindrenamesPs

)5	"
	((ti18nRRRRRR1R>(((s7/usr/lib64/python2.7/site-packages/mercurial/similar.pyt<module>s		)

MMCT - 2023