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.opt-1.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
CsPz<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
�}t�d|�}t�|�}
ttd��}|�|
�Wd�n1�sB0Y|
S)N�rb)�modes04css|]}t|�VqdS�N)�ord)�.0�crrr�	<genexpr>@�zmake_uid.<locals>.<genexpr>rZ#11111111111111111111111111111111111r�#�r	)�version�z>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�newrrrr4s4.



*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|_	||_
||_||_||_
||_|	|_|
|_||_||_|
|_||_||_|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�_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_endrKrrr�__init__ss4

zRevlogDocket.__init__cCs"|jdurt�|_d|j|jfS)z=file path to the current index file associated to this docketN�	%s-%s.idx)r?rr;�rLrrr�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?rHr@�insertrr_�rL�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;�rLZ
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)rArIrBr`rrhrarrr�
new_data_file�szRevlogDocket.new_data_fileccs0|jD]$\}}|s|dkrd|j|fVqdS)z=yield file path to older data files associated to this docketrrgN)rBr;rdrrr�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)rCrJrDr`rrlrarrr�new_sidedata_file�szRevlogDocket.new_sidedata_fileccs0|jD]$\}}|s|dkrd|j|fVqdS)zAyield file path to older sidedata files associated to this docketrrkN)rDr;rdrrr�old_sidedata_filepaths�sz#RevlogDocket.old_sidedata_filepathscCs|jSr)rHr^rrrrV�szRevlogDocket.index_endcCs||jkr||_d|_dS�NT)rHr9�rLZnew_sizerrrrV�s
cCs|jSr)rIr^rrrrX�szRevlogDocket.data_endcCs||jkr||_d|_dSro)rIr9rprrrrX�s
cCs|jSr)rJr^rrrrZszRevlogDocket.sidedata_endcCs||jkr||_d|_dSro)rJr9rprrrrZs
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)rLZtransactionrsZ	stripping�msgr.rrrr-s

0zRevlogDocket.writec	Cs�|r|j}|j}|j}n|j}|j}|j}|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|�|���q8|j
D]\}}|�|��q`d�|�S)Nr)rErFrGrHrIrJr6�lenr?r@rArBrCrDrK�append�S_HEADERr,�	S_OLD_UID�join)	rLrsZofficial_index_endZofficial_data_endZofficial_sidedata_end�data�s�urerrrrt!sP�zRevlogDocket._serialize)FNNrNrNrrrrrrrN)T)T)T)FF)F)�__name__�
__module__�__qualname__�__doc__r\r_rcrfrhrirjrlrmrn�propertyrV�setterrXrZr-rtrrrrr5psP�
6	
	
	







r5cCsD|d@}|tjtjfvrdStj|j��}t|||d�}d|_|S)z?given a revlog version a new docket object for the given revlogi��N)rOrKT)	r
ZREVLOGV2ZCHANGELOGV2rZcompenginesZ_compengineZrevlogheaderr5r9)rMrOZ
rl_version�comp�docketrrr�default_docketUs�r�c	CsZg}g}td|�D]}|tj�}|�t�|��q|D]\}}||�}|�||f�q6|S)Nr)�rangeryrerw�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)rvrZAbort)rerur2�r{�offsetrrr�xs
zparse_docket.<locals>.get_data)rNrOrPrQrRrSrTrUrVrWrXrYrZr[rK)rxr�rer'�nextr�r5)rMr{rN�headerr�ZiheaderrOZindex_uuid_sizerPZolder_index_uuid_countrQZdata_uuid_sizerRZolder_data_uuid_countrSZsidedata_uuid_sizerTZolder_sidedata_uuid_countrUZ
index_sizeZpending_index_size�	data_sizeZpending_data_sizeZ
sidedata_sizeZpending_sidedata_sizerKr�rr�r�parse_docketqsV


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


6
f

Youez - 2016 - github.com/yon3zu
LinuXploit