https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/largefiles/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/largefiles/__pycache__/reposetup.cpython-310.pyc
o

�]Lb�H�@sldZddlmZddlZddlmZddlmZmZm	Z	m
ZmZm
Z
ddlmZddlmZmZd	d
�ZdS)z,setup for largefiles repositories: reposetup�)�absolute_importN)�_)�error�
extensions�	localrepo�match�scmutil�util)�	timestamp�)�
lfcommands�lfutilcs����sdSG���fdd�d�j����_tjg�_�jg�_�fdd�}�j�d|�dd�}��	dd	|d���	dd
|d�dS)Ncs�eZdZdZdZ��fdd�Zej							d����fdd�	�Z��fd	d
�Z								d��fdd
�	Z
dd�Z�ZS)zreposetup.<locals>.lfilesrepoTFcs^t�|��|�}|jr-dd�}t�|d|�dd�}t�|d|�d
dd�}t�|d	|�|S)NcSs|�}dd�|D�S)NcS�g|]	}t�|�p
|�qS��r
�splitstandin��.0�frr�</usr/lib/python3/dist-packages/hgext/largefiles/reposetup.py�
<listcomp>7�zLreposetup.<locals>.lfilesrepo.__getitem__.<locals>.files.<locals>.<listcomp>r)�orig�	filenamesrrr�files5sz8reposetup.<locals>.lfilesrepo.__getitem__.<locals>.filesrcs&|�}G�fdd�d|j���|_|S)Nc�eZdZ��fdd�Z�ZS)zSreposetup.<locals>.lfilesrepo.__getitem__.<locals>.manifest.<locals>.lfilesmanifestcs"t�|�j}||�p|t�|��S�N)�super�__contains__r
�standin)�self�filenamer)�	__class__�lfilesmanifestrrr?s
�z`reposetup.<locals>.lfilesrepo.__getitem__.<locals>.manifest.<locals>.lfilesmanifest.__contains__)�__name__�
__module__�__qualname__r�
__classcell__r�r#�r"rr#>�r#r))r�man1rr(r�manifest;sz;reposetup.<locals>.lfilesrepo.__getitem__.<locals>.manifestr,cs�z|dur||||�}W|S|||�}W|Stjy@|dur+|t�|�||�}n|t�|�|�}|j��fdd�|_Y|Sw)Ncs
��dS)N�rr��olddatarr�<lambda>X�
zLreposetup.<locals>.lfilesrepo.__getitem__.<locals>.filectx.<locals>.<lambda>)r�LookupErrorr
r�data)r�path�fileid�filelog�resultrr.r�filectxJs�
��z:reposetup.<locals>.lfilesrepo.__getitem__.<locals>.filectxr8)NN)r�__getitem__�lfstatusr�wrapfunction)r �changeid�ctxrr,r8�r"�
lfilesreporrr91s
z)reposetup.<locals>.lfilesrepo.__getitem__�.Nc(	sd|||}}	}
t���j}�js||||||	|
|�Sd�_�|��|}|��du��o3��dk}
|dur<t��}z	��d�}d}WntjyUt	�
�}d}Ynw|���t�����|��s��D]}||�rnnqf||||||	|
|�Wd�S��fdd�}t
�
|�}||j�|_||||||||�}��r	�fdd���fdd	�|jD�|_�j|gd|	dd
�\}}}|j|j|j|j|jf\}}}}}|
�r)�d}|D]P}t�|�}|�vr�|�|�q�t��|�t���|��kr�|�|�q�|	�r|�|�||��}|j}|j}t�||�} | du�r'||| f}!��||!�q�ng||||}"ggg}}}�jj }#|"D]G}t�|�}|�v�r���|�}$t��|�t�|$�k�so|#�rvd��!|�vt"t�#|$��k�rv|�|��q?|	�r~|�|��q?|�|��q?�fdd	�|D�}��$t�%���D]!}t�&|�}||��s��q�|�v�r�|�|��j'j(|dd
��q�t)|�}�fdd	�|D�}�fdd	�|dD�|d<t*��}%t*|d��+|%�|d<t*|d��+|%�|d<dd	�|D�}&||||gg|f}'dd	�t,|&|'�D�}ndd	�|D�}|�r��-��.��Wd�n	1�s%wYd�_t/j|�S)NFr@Tcsb�s|Sg}�j}|D]#}t�|�}||vr|�|�q|�|�r)|�||f�q|�|�q|Sr)�dirstater
r�append�hasdir�extend)r�newfilesrAr�sf)r �workingrr�
tostandins�s

z8reposetup.<locals>.lfilesrepo.status.<locals>.tostandinscs"t�|�}�j}||vp|�|�Sr)r
rrArC)rrFrA�r rr�sfindirstate�s
z:reposetup.<locals>.lfilesrepo.status.<locals>.sfindirstatecsg|]}�|�r|�qSrrr)rJrrr��z8reposetup.<locals>.lfilesrepo.status.<locals>.<listcomp>)�subrepos�ignored�clean�unknown�xcsg|]}t�|��vr|�qSr)r
r)r�lfile)�ctx1rrrs
�)�
ignoremissingcsg|]	}|�jvr|�qSr)rArrIrrr#rcsg|]}|�vr|�qSrrr)�
lfdirstaterrr$rK���cS�g|]	}dd�|D��qS)cSsg|]	}t�|�s|�qSr)r
�	isstandin)r�fnrrrr-r�Creposetup.<locals>.lfilesrepo.status.<locals>.<listcomp>.<listcomp>r)r�filelistrrrr,���cSsg|]
\}}t||��qSr)�sorted)r�list1�list2rrrr9s
��cSrX)cSrrrrrrrr?rr[r)r�itemsrrrr>r])0r�statusr:�rev�matchmod�always�wlockr�	LockErrorr	�nullcontextmanagerr
�openlfdirstate�copy�_files�modified�added�removed�deletedrNrrB�
readasstandin�hashfile�wjoin�lstat�st_mode�st_sizer
�reliable_mtime_of�	set_cleanrA�
_checkexec�flags�bool�
getexecutable�walk�getstandinmatcherr�wvfs�
unlinkpath�list�set�
difference�zip�write�currenttransactionr)(r �node1�node2rrMrNrO�listsubrepos�listignored�	listclean�listunknownr�ctx2�
parentworkingrf�gotlockrrH�mr7�unsure�s�mtime_boundaryrlrmrnro�wctxrQr�mode�size�mtime�
cache_data�tocheck�	checkexec�abslfile�lfiles�normalsr:)r"r?�repo�ui)rRrTr rJrGrrbes0�
����
���
��
�

��


���
�
�



���	�����8
z$reposetup.<locals>.lfilesrepo.statuscs>t�|�j|g|�Ri|��}G�fdd�d|j���|_|S)Ncr)z:reposetup.<locals>.lfilesrepo.commitctx.<locals>.lfilesctxcst�|�j}t�|||�Sr)r�
markcommittedr
)r �noder)r"�	lfilesctxrrr�MszHreposetup.<locals>.lfilesrepo.commitctx.<locals>.lfilesctx.markcommitted)r$r%r&r�r'r�r�r)rr�Lr*r�)r�	commitctxr")r r=�args�kwargsr�r>r�rr�Isz'reposetup.<locals>.lfilesrepo.commitctx�c
sr|duri}t�|�j}|���|jd}	|	||�}||||||||d�}
|
Wd�S1s2wYdS)N���)�text�user�dater�force�editor�extra)r�commitrf�_lfcommithooks)r r�r�r�rr�r�r�r�lfcommithookr7r>rrr�Ws"



�	$�z$reposetup.<locals>.lfilesrepo.commitcSs�g}g}g}|D]%}t�|d�rtjtd�|dd��|j�|�r(|�|�q|�|�q|D]H}d}|j�	|�d}|D]}	|j�	|	��
|�rR|�|�d}nq>|sq|D]}
|j�	|
��
|�rp|�|
�|sp|�d�d}qW|sx|�|�q0||7}|S)a�
            Adjust matched file list
            If we pass a directory to commit whose only committable files
            are largefiles, the core commit code aborts before finding
            the largefiles.
            So we do the following:
            For directories that only have largefiles as matches,
            we explicitly add the largefiles to the match list and remove
            the directory.
            In other cases, we leave the match list unmodified.
            �/s file "%s" is a largefile standins#commit the largefile itself instead)�hintFTr@)r
rYr�Abortrr~�isdirrBrA�	normalize�
startswith)r rr��actualfiles�dirs�regularsr�
matcheddir�d�mf�lfrrr�
_subdirlfsusD
�
�

�
�z(reposetup.<locals>.lfilesrepo._subdirlfs)r@NNFFFF)r�NNNFFN)
r$r%r&�_largefilesenabledr:r9r�unfilteredmethodrbr�r�r�r'r�r?r�r�r)rr?'s04�d�r?csX|j}|dur|jj}|r*t���fdd�}t�|j||�t��|j|j	��dSdS)z4Push largefiles for pushop before pushing revisions.Ncs
��|�Sr)�add)rZ�lfhash��touploadrrr0�r1z8reposetup.<locals>.prepushoutgoinghook.<locals>.<lambda>)
�lfrevs�outgoing�missingr�r
�getlfilestouploadr�r�uploadlfiles�remote)�pushopr��addfunc)r�r�r�prepushoutgoinghook�s�z&reposetup.<locals>.prepushoutgoinghook�
largefilesc[s�|���5d|jvr)tdd�|j��D��r1|j�d�t�|�Wd�dSWd�dSWd�dS1s<wYdS)Nr�css"�|]}tjd|dvVqdS)r�rN)r
�	shortnamerrrr�	<genexpr>�s�
�z9reposetup.<locals>.checkrequireslfiles.<locals>.<genexpr>)�lock�requirements�any�store�	datafilesr�r�writereporequirements)r�r�r�rrr�checkrequireslfiles�s
���"�z&reposetup.<locals>.checkrequireslfilesshooksschangegroup.lfiless
commit.lfiles)
�localr"r
�updatestandinsbymatchr�rb�_lfstatuswriters�prepushoutgoinghooksr��	setconfig)r�r�r�r�rr�r�	reposetup!s 

�r�)�__doc__�
__future__rrj�mercurial.i18nr�	mercurialrrrrrdrr	�mercurial.dirstateutilsr
�rr
r�rrrr�<module>s 	

https://t.me/RX1948 - 2025