403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/mercurial/revlogutils/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/revlogutils/__pycache__/docket.cpython-39.pyc
a

�+�b�9�@s�ddlmZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlmZddd	�Z
ej�d
�Zerxddd	�Z
e�ejd�Ze�d
�ZGdd�de�Zdd�Zdd�Zddd�ZdS)�)�absolute_importN�)�encoding�error�node�pycompat�util�)�	constants�cCst�t�|d��S)z_return a new unique identifier.

    The identifier is random and composed of ascii characters.r)r�hex�os�urandom)�id_size�r�B/usr/lib64/python3.9/site-packages/mercurial/revlogutils/docket.py�make_uid&srsHGTEST_UUIDFILEc
Cs^z<ttdd��}|����}Wd�n1s00YWn6tyr}z|jtjkrZ�d}WYd}~n
d}~00tjr�t	|�}ndd�|D�}d}t
dd�}|D]$}|d	?}||@d
>}	||	|}q�t��}
tjr�|
j
|dd�n
|
�
|�|
�|d
�}|dk�sJ�t�d|�}t�|�}
ttd��}|�|
�Wd�n1�sP0Y|
S)N�rb)�modes04css|]}t|�VqdS�N)�ord)�.0�crrr�	<genexpr>@�zmake_uid.<locals>.<genexpr>rZ#11111111111111111111111111111111111r�#�r	)�version�rz>L�wb)�open�stable_docket_file�read�strip�IOError�errno�ENOENTrZispy3�iter�int�randomZRandom�seedZgetrandbits�struct�packrr�write)r�fr*�instZ	iter_seedZint_seedZlow_mask�iZ	high_partZlow_part�r�raw�p�newrrrr4s6.



*s
BBBBBBLLLLLLcz>BLc@s�eZdZdZd(dd�Zdd	�Zd
d�Zd)d
d�Zdd�Zdd�Z	d*dd�Z
dd�Zdd�Zd+dd�Z
edd��Zejdd��Zedd��Zejd d��Zed!d"��Zejd#d"��Zd,d$d%�Zd-d&d'�ZdS).�RevlogDocketzmetadata associated with revlogFNrrcCs||_t|�|_d|_|j|_|j|_|j|_	||_
||_||_||_
||_|	|_t|�t|�@rfJ�t|�t|	�@rzJ�t|�t|	�@r�J�|
|ks�J�||
ks�J�||ks�J�|
|_||_||_|
|_||_||_|r�|j|_|j|_|j|_n|j|_|j|_|j|_||_dS)NF)�_version_header�bool�
_read_only�_dirty�radix�_radixZ_docket_file�_path�opener�_opener�_index_uuid�_older_index_uuids�
_data_uuid�_older_data_uuids�_sidedata_uuid�_older_sidedata_uuids�set�_initial_index_endZ_pending_index_end�_initial_data_endZ_pending_data_end�_initial_sidedata_endZ_pending_sidedata_end�
_index_end�	_data_end�
_sidedata_end�default_compression_header)�self�revlog�use_pending�version_header�
index_uuid�older_index_uuids�	data_uuid�older_data_uuids�
sidedata_uuid�older_sidedata_uuids�	index_end�pending_index_end�data_end�pending_data_end�sidedata_end�pending_sidedata_endrLrrr�__init__ss@

zRevlogDocket.__init__cCs"|jdurt�|_d|j|jfS)z=file path to the current index file associated to this docketN�	%s-%s.idx)r?rr;�rMrrr�index_filepath�s
zRevlogDocket.index_filepathcCs*|j|jf}|j�d|�t�|_|��S)z\switch index file to a new UID

        The previous index UID is moved to the "older" list.r)r?rIr@�insertrr`�rM�oldrrr�new_index_file�szRevlogDocket.new_index_fileTccs0|jD]$\}}|s|dkrd|j|fVqdS)z>yield file path to older index files associated to this docketrr^N)r@r;�rMZ
include_emptyZuuid�sizerrr�old_index_filepaths�sz RevlogDocket.old_index_filepathscCs"|jdurt�|_d|j|jfS)z<file path to the current data file associated to this docketN�	%s-%s.dat)rArr;r_rrr�
data_filepath�s
zRevlogDocket.data_filepathcCs*|j|jf}|j�d|�t�|_|��S)zZswitch data file to a new UID

        The previous data UID is moved to the "older" list.r)rArJrBrarrirbrrr�
new_data_file�szRevlogDocket.new_data_fileccs0|jD]$\}}|s|dkrd|j|fVqdS)z=yield file path to older data files associated to this docketrrhN)rBr;rerrr�old_data_filepaths�szRevlogDocket.old_data_filepathscCs"|jdurt�|_d|j|jfS)z@file path to the current sidedata file associated to this docketN�	%s-%s.sda)rCrr;r_rrr�sidedata_filepath�s
zRevlogDocket.sidedata_filepathcCs*|j|jf}|j�d|�t�|_|��S)zbswitch sidedata file to a new UID

        The previous sidedata UID is moved to the "older" list.r)rCrKrDrarrmrbrrr�new_sidedata_file�szRevlogDocket.new_sidedata_fileccs0|jD]$\}}|s|dkrd|j|fVqdS)zAyield file path to older sidedata files associated to this docketrrlN)rDr;rerrr�old_sidedata_filepaths�sz#RevlogDocket.old_sidedata_filepathscCs|jSr)rIr_rrrrW�szRevlogDocket.index_endcCs||jkr||_d|_dS�NT)rIr9�rMZnew_sizerrrrW�s
cCs|jSr)rJr_rrrrY�szRevlogDocket.data_endcCs||jkr||_d|_dSrp)rJr9rqrrrrY�s
cCs|jSr)rKr_rrrr[szRevlogDocket.sidedata_endcCs||jkr||_d|_dSrp)rKr9rqrrrr[s
cCs�|js
dS|jr(d}||j;}t�|��|s<|j|jdd�|j|jddd��"}|�|j|d��Wd	�n1sv0Y||_dSd	S)
z_write the modification of disk if any

        This make the new content visible to all processFswriting read-only docket: %ssstore)�location�wT)rZ
atomictemp)�pendingN)	r9r8r<rZProgrammingErrorZ	addbackupr>r-�
_serialize)rMZtransactionrtZ	stripping�msgr.rrrr-s

0zRevlogDocket.writec	Cs�|r|j}|j}|j}n|j}|j}|j}||jks8J�||jksFJ�|jt|j�t|j	�t|j
�t|j�t|j�t|j
�||j||j||j|jf}g}|�tj|��|�|j�|j	D]\}}|�t�t|�|��q�|j	D]\}}|�|�q�|�|j
�|jD] \}}|�t�t|�|���q|jD]\}}|�|��q.|�|j�|j
D] \}}|�t�t|�|���qV|j
D]\}}|�|��q~d�|�S)Nr)rFrGrHrIrJrKr6�lenr?r@rArBrCrDrL�append�S_HEADERr,�	S_OLD_UID�join)	rMrtZofficial_index_endZofficial_data_endZofficial_sidedata_end�data�s�urfrrrru!sT�zRevlogDocket._serialize)FNNrNrNrrrrrrrN)T)T)T)FF)F)�__name__�
__module__�__qualname__�__doc__r]r`rdrgrirjrkrmrnro�propertyrW�setterrYr[r-rurrrrr5psP�
6	
	
	







r5cCsD|d@}|tjtjfvrdStj|j��}t|||d�}d|_|S)z?given a revlog version a new docket object for the given revlogi��N)rPrLT)	r
ZREVLOGV2ZCHANGELOGV2rZcompenginesZ_compengineZrevlogheaderr5r9)rNrPZ
rl_version�comp�docketrrr�default_docketUs�r�c	CsZg}g}td|�D]}|tj�}|�t�|��q|D]\}}||�}|�||f�q6|S)Nr)�rangerzrfrx�unpack)	�get_data�countZ	all_sizesZall_uidsr0r2Zuid_size�	file_size�uidrrr�_parse_old_uidsds
r�Fcst��dtj��}tjg���fdd�}t|�}t|�}t|�}||�}t|�}	t||	�}
t|�}||�}t|�}
t||
�}t|�}||�}t|�}t||�}t|�}t|�}t|�}t|�}t|�}t|�}t|�}t|||||
|||||||||||d�}|S)zBgiven some docket data return a docket object for the given revlogNcsf�d|t��kr:d}|�d|t��f;}t�|����d�d|�}�d|7<|S)z/utility closure to access the `size` next bytesrs'docket is too short, expected %d got %d)rwrZAbort)rfrvr2�r|�offsetrrr�xs
zparse_docket.<locals>.get_data)rOrPrQrRrSrTrUrVrWrXrYrZr[r\rL)ryr�rfr'�nextr�r5)rNr|rO�headerr�ZiheaderrPZindex_uuid_sizerQZolder_index_uuid_countrRZdata_uuid_sizerSZolder_data_uuid_countrTZsidedata_uuid_sizerUZolder_sidedata_uuid_countrVZ
index_sizeZpending_index_size�	data_sizeZpending_data_sizeZ
sidedata_sizeZpending_sidedata_sizerLr�rr�r�parse_docketqsV


�r�)r)r)F)Z
__future__rr%r
r)r+�rrrrrr
r�environ�getr!�StructZINDEX_HEADER_FMTryrz�objectr5r�r�r�rrrr�<module>s"


6
f

Youez - 2016 - github.com/yon3zu
LinuXploit