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: //lib64/python2.7/site-packages/hgext/automv.pyc
�
1�3\c@@s�dZddlmZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
iZeje�Zedddd�d	�Zd
�Zd�Zd�Zd
S(sxcheck for unrecorded moves at commit time (EXPERIMENTAL)

This extension checks at commit/amend time if any of the committed files
comes from an unrecorded mv.

The threshold at which a file is considered a move can be set with the
``automv.similarity`` config option. This option takes a percentage between 0
(disabled) and 100 (files must be identical), the default is 95.

i(tabsolute_import(t_(tcommandstcopiesterrort
extensionstpycompatt	registrartscmutiltsimilartautomvt
similaritytdefaulti_cC@s?tjtjdt�}|djdddtd�f�dS(Ntcommitits	no-automvs%disable automatic file move detection(RtwrapcommandRttabletmvchecktappendtNoneR(tuitentry((s2/usr/lib64/python2.7/site-packages/hgext/automv.pytextsetup0s

	c
O@s'tj|�}d}|jdt�}|s�|jdd�}d|koVdknsstjtd���n|dkr�t	j
|d||�}t||�\}	}
t|||	|
|d�}q�n|j
��F|dk	rt	j|d	d
|�n||||tj|��SWdQXdS(s&Hook to check for moves at commit timet	no_automvR
Riids+automv.similarity must be between 0 and 100gY@N(((RtbyteskwargsRtpoptFalset	configintRtAbortRRtmatcht_interestingfilest_findrenamestwlockt_markchangest	strkwargs(torigRtrepotpatstoptstrenamestdisabledt	thresholdRtaddedtremoved((s2/usr/lib64/python2.7/site-packages/hgext/automv.pyR7s 
cC@sr|jd|�}|d}|d}tj|d|d|�}g|D]}||krJ|^qJ}||fS(s�Find what files were added or removed in this commit.

    Returns a tuple of two lists: (added, removed). Only files not *already*
    marked as moved are included in the added list.

    Riit.N(tstatusRt_forwardcopiesR(R$tmatchertstatR*R+tcopytf((s2/usr/lib64/python2.7/site-packages/hgext/automv.pyRKs

%c	C@s�i}|dkr�x~tj||||�D]a\}}}|jjr�|jjtd�|j|�|j|�|df�n|||<q+Wn|r�|jjtd�t|��n|S(s�Find what files in added are really moved files.

    Any file named in removed that is at least similarity% similar to a file
    in added is seen as a rename.

    is)detected move of %s as %s (%d%% similar)
idsdetected move of %d files
(R	tfindrenamesRtverboseR-Rtreltlen(	R$R/R*R+RR'tsrctdsttscore((s2/usr/lib64/python2.7/site-packages/hgext/automv.pyR\s			*#N(t__doc__t
__future__Rtmercurial.i18nRt	mercurialRRRRRRRR	tconfigtablet
configitemRRRR(((s2/usr/lib64/python2.7/site-packages/hgext/automv.pyt<module>s: