File: //usr/lib/python3/dist-packages/hgext/__pycache__/automv.cpython-310.pyc
o
�]Lb� � @ s� d Z ddlmZ ddlmZ ddlmZmZmZm Z m
Z
mZmZm
Z
i Ze�e�Zedddd� d d
� Zdd� Zd
d� Zdd� ZdS )ax check 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.
� )�absolute_import)�_)�commands�copies�error�
extensions�pycompat� registrar�scmutil�similar� automv�
similarity�_ )�defaultc C s. t �tjdt�}|d �ddd td�f� d S )Ns commit� � s no-automvs% disable automatic file move detection)r �wrapcommandr �table�mvcheck�appendr )�ui�entry� r �./usr/lib/python3/dist-packages/hgext/automv.py�extsetup3 s �r c O s� t �|�}d}|�dd�}|sL|�dd�}d| krdks'n t�td���|dkrLt�|d ||�}t ||�\} }
tj
|d d
�}t||| |
|d �}|�� �# |dur]t�
|dd|� | ||g|�R i t �|���W d � S 1 svw Y dS )
z&Hook to check for moves at commit timeNs no_automvFr r
r �d s+ automv.similarity must be between 0 and 100T)�legacyrelativevalueg Y@r )r �byteskwargs�pop� configintr �Abortr r
�match�_interestingfiles�getuipathfn�_findrenames�wlock�_markchanges� strkwargs)�origr �repo�pats�opts�renames�disabled� thresholdr! �added�removed�uipathfnr r r r : s&