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/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/mercurial/__pycache__/filelog.cpython-310.pyc
o

�]LbU"�@s�ddlmZddlmZddlmZddlmZmZddl	m
Z
mZddl
mZddlmZmZe�e
j�Gd	d
�d
e��ZGdd�de�Zd
S)�)�absolute_import�)�_)�nullrev)�error�revlog)�
repository�util)�storageutil)�	constants�rewritec@sLeZdZdd�Zdd�Zdd�Zdd�ZdGdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdHdd�Zdd �Zd!d"�ZdId#d$�ZdId%d&�Zd
d'd'ejd
fd(d)�Zd
ejd
fd*d+�Z	
	
	'dJd,d-�Zd.d/�Zd0d1�ZdKd3d4�Zd5d6�Zd7d8�Z dHd9d:�Z!d;d<�Z"d=d>�Z#d?d@�Z$dAdB�Z%	'	'	'	'	'dLdCdD�Z&dEdF�Z'd
S)M�filelogcCsNtj|tj|fd�d|f�dd�|_||j_|jj|_|j}|�dd�|_	dS)N�/sdataT)�target�radix�
censorablesissue6528.fix-incoming)
r�revlog_constants�KIND_FILELOG�join�_revlog�filename�nullid�options�get�_fix_issue6528)�self�opener�path�opts�r�3/usr/lib/python3/dist-packages/mercurial/filelog.py�__init__s�	
zfilelog.__init__cCs
t|j�S�N)�lenr�rrrr �__len__,�
zfilelog.__len__cC�
|j��Sr")r�__iter__r$rrr r(/r&zfilelog.__iter__cCsD||jtfvr	dSz	|j�|�WdSttttjfy!YdSw)NFT)	rrr�rev�	TypeError�
ValueError�
IndexErrorr�LookupError�r�noderrr �hasnode2s�zfilelog.hasnoderNcC�|jj||d�S)N)�start�stop)r�revs�rr2r3rrr r4<�zfilelog.revscC�|j�|�Sr")r�parentsr.rrr r8?�zfilelog.parentscCr7r")r�
parentrevs�rr)rrr r:Br9zfilelog.parentrevscCr7r")rr)r.rrr r)Er9zfilelog.revcCr7r")rr/r;rrr r/Hr9zfilelog.nodecCst�|j||jj�Sr")r
�fileidlookupr�
display_idr.rrr �lookupKs�zfilelog.lookupcCr7r")r�linkrevr;rrr r?Pr9zfilelog.linkrevcC�|j�||�Sr")r�commonancestorsheads)r�node1�node2rrr rAS�zfilelog.commonancestorsheadscCr7r")r�descendants)rr4rrr rEWr9zfilelog.descendantscCr@r")r�headsr5rrr rFZrDz
filelog.headscCr7r")r�childrenr.rrr rG^r9zfilelog.childrencCr7r")r�
iscensoredr;rrr rHar9zfilelog.iscensoredcCr1�N)�_df)r�revision�rr/rJrrr rKdr6zfilelog.revisioncCr1rI)r�rawdatarLrrr rMgr6zfilelog.rawdataFcCs|jj||||||d�S)N)�
nodesorder�revisiondata�assumehaveparentrevisions�	deltamode�sidedata_helpers)r�
emitrevisions)r�nodesrNrOrPrQrRrrr rSjs	�zfilelog.emitrevisionsc		
Cs|jj||||||||d�S)N)r/�flags�
cachedelta)r�addrevision)	rrO�transactionr?�p1�p2r/rUrVrrr rW|s�zfilelog.addrevisioncCsl|r	t�td���|j�|��|jrt�|j|�}|jj|||||d�Wd�S1s/wYdS)Ns:revlog storage does not support missing parents write mode)�
addrevisioncb�duplicaterevisioncb)	r�Abortrr�_writingrr�filter_delta_issue6528�addgroup)r�deltas�
linkmapperrXr[r\�maybemissingparentsrrr r`�s"	���$�zfilelog.addgroupcCr7r")r�
getstrippoint)r�minlinkrrr rd�r9zfilelog.getstrippointcCr@r")r�strip)rrerXrrr rf�rDz
filelog.strip�cCs|jj|||d�S)N)�	tombstone)r�censorrevision)r�trr/rhrrr ri�szfilelog.censorrevisioncCr'r")r�filesr$rrr rk�r&z
filelog.filescCst�|�|��Sr")r
�filtermetadatarKr.rrr �read�r6zfilelog.readcCs6|s|�d�r
t�||�}|�|||||�}|�|�S)Ns
)�
startswithr
�packmetarWr/)r�text�metarX�linkrYrZr)rrr �add�s
zfilelog.addcCst�||�Sr")r
�filerevisioncopiedr.rrr �renamed�r9zfilelog.renamedcCs<|�|�}|�|�rt|�|��S|�|�rdS|j�|�S)z#return the size of a given revisionr)r/rur#rmrHr�size�rr)r/rrr rv�s


zfilelog.sizecCst�|||�S)zpcompare text with a given file revision

        returns True if text is different than what is stored.
        )r
�filedataequivalent�rr/rprrr �cmp�szfilelog.cmpcCr7r")r�verifyintegrity)r�staterrr r{�r9zfilelog.verifyintegritycCs|jj|||||d�S)N)�exclusivefiles�sharedfiles�revisionscount�trackedsize�
storedsize)r�storageinfo)rr}r~rr�r�rrr r��s�zfilelog.storageinfocKs,t|t�s
t�d��|jj||jfi|��S)Nsexpected filelog to clone())�
isinstancer
r�ProgrammingErrorr�clone)rrj�
destrevlog�kwargsrrr r��s

z
filelog.clone)rN)NNr")NNF)rg)FFFFF)(�__name__�
__module__�__qualname__r!r%r(r0r4r8r:r)r/r>r?rArErFrGrHrKrMr�CG_DELTAMODE_STDrSr�REVIDX_DEFAULT_FLAGSrWr`rdrfrirkrmrsrurvrzr{r�r�rrrr r
sd





�
�
�



�r
cs@eZdZdZ�fdd�Z�fdd�Z�fdd�Zdd	�Z�ZS)
�
narrowfilelogz0Filelog variation to be used with narrow stores.cstt|��||�||_dSr")�superr�r!�_narrowmatch)rrr�narrowmatch��	__class__rr r!�s
znarrowfilelog.__init__cs*tt|��|�}|r|�|d�sdS|S)Nr)r�r�rur�)rr/�resr�rr ru�sznarrowfilelog.renamedcs8|�|�}tt|��|�rt|�|��Stt|��|�Sr")r/r�r�rur#rmrvrwr�rr rvs
znarrowfilelog.sizecCs&|�|�|��r|dkS|�|�|kS)Nrg)rHr)rmryrrr rzsznarrowfilelog.cmp)	r�r�r��__doc__r!rurvrz�
__classcell__rrr�r r��s	r�N)�
__future__r�i18nrr/r�rr�
interfacesrr	�
interfaceutil�utilsr
�revlogutilsrrr�implementer�ifilestorage�objectr
r�rrrr �<module>s
\

https://t.me/RX1948 - 2025