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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

�+�b�I�@sddlmZddlZddlmZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZddlmZmZmZd)d	d
�Zdd�Zd
d�Zdd�Zd*dd�Zd+dd�Zdd�Z dd�Z!dd�Z"Gdd�de#�Z$d,dd�Z%d d!�Z&d"d#�Z'd-d%d&�Z(d'd(�Z)dS).�)�absolute_importN�)�_)�hex�short)
�bundle2�changegroup�	discovery�error�exchange�obsolete�obsutil�pathutil�phases�pycompat�requirements�scmutil�util)�hashutil�
stringutil�urlutilTcCs�d}|j}|�|�s|�|�|�d||�}	tdd�|	D��}
t�d�|
����}d|t	|�t
|dd��|f}t�|�}
d}|
d	kr�d
}|r�d}n|r�d}nd
}t
j|||d�}|
|dd�}tj|j|d||||||d�	S)z8create a bundle with the specified revisions as a backupsstrip-backups%ln::%lncss|]}|��VqdS�N)r��.0�c�r�6/usr/lib64/python3.9/site-packages/mercurial/repair.py�	<genexpr>4�zbackupbundle.<locals>.<genexpr>rs%s/%s-%s-%s.hgN�s01sHG20sBZsHG10BZsHG10UN)ZmissingrootsZancestorsofT)s
cg.versionsobsolescencesphases�strip)�compression)�vfs�isdir�mkdir�set�sortedrZsha1�join�digestrrrZlocalversionr	�outgoingrZwritenewbundle�ui)�repo�bases�heads�node�suffix�compress�obsolescenceZ	backupdirr"Z
allcommitsZ	allhashesZ	totalhash�nameZ	cgversion�compZ
bundletyper)Zcontentoptsrrr�backupbundle(sL

�
��r4cCs6t�}t�|t|��D]}|�||���qt|�S)z+find out the filelogs affected by the strip)r%rZxrange�len�update�filesr&)r+�striprevr7�xrrr�
_collectfiles[sr:cs ��|�\}}�fdd�|D�S)Ncsg|]}��|��qSr)Zlinkrev�r�r��revlogrr�
<listcomp>grz"_collectrevlog.<locals>.<listcomp>)Z
getstrippoint)r>r8rZ	brokensetrr=r�_collectrevlogesr@cCsHt�}t|�D]}|�t||��q|D]}|�t|�|�|��q(|S)z<return the changesets which will be broken by the truncation)r%�manifestrevlogsr6r@�file)r+r7r8�sr>�fnamerrr�_collectbrokencsetsjsrE�backupc$sp���durt�d��|dvr"d}��������j}�j�j�t|t	�rT|g}�fdd�|D�}t
|�}t�|�}t�||�}	t
|��t
|	�}
�j|dd�D]V}t�fdd	���|�D��rΈ�|�|�vr�|	�|�|
���|��|
�|�q��fd
d�|
D�}
|	�r,t
��|	��}|	�|��fdd�|	D�}
�fdd��D�}d
}��j�dd��rtt��|����r��fdd�t�j�D�}t���\�}d}|d}|�r�t�|||�}d}|
�r�t�|
|
|dddd�}|����h�z��d���}t
|j� ��}|�!|j"�|�#���$||�t%�|||�|D]}��&|��$||��q>|�'�|�(�}|D]j\}}||v�r��ql�j)|ddd��}|�*|�Wd�n1�s�0Y|dk�rl�j+�,|��qlt-�j|��`��.��j/�0��Wd�n1�s0Y|�r|�1t2d��|�3|d�}t4�5||||�}�jj6�s`�j�7�nt8�9�}|�~d|�:|�}d}t|t;j<��s�dt=�>|�}��|��$}t;j?�||d|d�Wd�n1�s�0YWd�n1�s�0Y|�@���d��4}��fdd�|D�} �j�A�|| �Wd�n1�sJ0Y��B�D]p\}!}"z|!�C|"�WnVtD�y�}#z<|#jEtEjFk�r�|�Gt2d �|!�:|"�tH�I|#�f�WYd}#~#n
d}#~#00�q\Wnb|�r�|�Gt2d!�|�:|��|�r,|�Gt2d"�|�:|��|�Gt2d#�|�:|���Yn0|�rD|�C|�Wd�n1�sZ0Y��J�|S)$Ns&cannot strip from inside a transaction)snoner Fcsg|]}��|��qSr)�rev)rr.��clrrr?�rzstrip.<locals>.<listcomp>r)�startc3s|]}|�vVqdSrr)r�p)�tostriprrr�rzstrip.<locals>.<genexpr>csg|]}��|��qSr�r.r;rHrrr?�rcsg|]}��|��qSrrMr;rHrrr?�rcsg|]}��|��qSrrMr;rHrrr?�rrsdevelsstrip-obsmarkerscsg|]\}}|�vr|�qSrr)r�i�m)�
obsmarkersrrr?�s���stemp)r0r1r �aT)Z
checkambigrsadding branch
srbsbundle:sstrip
%s)�source�urlsrepaircsg|]}|����f�qSrrM�rrO��newbmtargetr+rrr?rserror removing %s: %s
s+strip failed, backup bundle stored in '%s'
s1strip failed, unrecovered changes stored in '%s'
sG(fix the problem, then recover the changesets with "hg unbundle '%s'")
)K�currenttransactionr
ZProgrammingError�
unfilteredZ
destroyingr"�
_bookmarks�	changelog�
isinstance�bytes�minr:rEr%�revs�anyZ
parentrevs�add�difference_update�descendantsr*Z
configboolr
Zexclusivemarkers�	enumerate�obsstore�_bookmarkmovements�_createstripbackupr4Zuninterruptible�transactionZ
_offsetmap�keysr6Z	_newfilesZ
startgroup�strip�
stripmanifestrBZendgroupZreadjournal�svfs�truncate�storeZmarkremoved�deleteobsmarkersZinvalidatevolatilesetsZ_phasecacheZ
filterunknownZnoter�openrZ
readbundle�verboseZsilentrZnullcontextmanagerr'rZ
unbundle20rZhidepasswordZapplybundle�close�applychangesZ	undofiles�unlink�OSError�errno�ENOENT�warnrZforcebytestrZ	destroyed)$r*r+�nodelist�backup�topicr"Z	striplistr8r7ZsaverevsZ	saveheadsr<rcZ	savebases�
stripbasesZstripobsidx�updatebm�
backupfiler.Z
tmpbundlefile�trZoldfiles�fn�entriesrBZtroffset�fp�f�genZmaybe_silentZtmpbundleurlZtxnname�	bmchangesZundovfsZundofile�er)rIrWrPr+rLrrjvs


	



��

*
,���
�F0���"�������*rjcs�dd���d|�D�}|sdSd}|r<|d}t�|||�}t�|�\�}��d��F}	t��|	tj|���fdd�|D�}
�j��|	|
�Wd�n1s�0Y|S)z/perform a "soft" strip using the archived phasecSsg|]}|���qSrrMrrrrr?8rzsoftstrip.<locals>.<listcomp>ssort(%ln::)Nrr csg|]}|����f�qSrrMrUrVrrr?Dr)	r%rgrfrhrZretractboundaryZarchivedrZrs)r*r+ryrzr{rLr~r.r}rr�rrVr�	softstrip6s.r�cCsn|j}g}|D]&}|||��}||vr|�|�qd}|rf|�d||�}|rb||����}nd}||fS)Nsmax(parents(%ld) - (%ld))�.)rZrG�appendr_�firstr.)r+rLZbmr}rOrGrWrrrrfIsrfcCsT|j}|j}t|||��||�}|j�td�|�|��|j�dd|�|��|S)Nssaved backup bundle to %s
sbackupbundle)	r"r[r4r-r*�statusrr'�log)r+r|r.r{r"rIr~rrrrg_s�rgcs����jj��fdd�|D�}d}t��|||tj|��}||}|rtd�t�fdd�|D���}|�	t
d�|�dd	���d
|�D�S)zDreturn list of roots of nodes where descendants are covered by nodescsh|]}�|��qSrr�r�n)�torevrr�	<setcomp>nrz!safestriproots.<locals>.<setcomp>s5%ld - ( ::( (roots(%ld):: and not _phase(%s)) -%ld) )s, c3s|]}t�|���VqdSr)rr.r�)r+rrrwrz!safestriproots.<locals>.<genexpr>s9warning: orphaned descendants detected, not stripping %s
cSsg|]}|���qSrrMrrrrr?|rz"safestriproots.<locals>.<listcomp>s
roots(%ld))rYr[rGr%r_rZinternalr'r&rxr)r*r+�nodesr_ZrevsetrLZnotstripZnodestrr)r+r�r�safestriprootsks��r�c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�
stripcallbackz(used as a transaction postclose callbackcCs&||_||_||_|pd|_g|_dS)NrF)r*r+rzr{ry)�selfr*r+rzr{rrr�__init__�s

zstripcallback.__init__cCs|j�|�dSr)ry�extend)r�r�rrr�addnodes�szstripcallback.addnodescCs2t|j|j|j�}|r.t|j|j||j|j�dSr)r�r*r+ryrjrzr{)r�r�rootsrrr�__call__�szstripcallback.__call__N)�__name__�
__module__�__qualname__�__doc__r�r�r�rrrrr�sr�cCsp|��}|s*t|||�}t|||||d�S|�d�}|durXt||||d�}|�d|�|rb||_|�|�dS)ailike strip, but works inside transaction and won't strip irreverent revs

    nodelist must explicitly contain all descendants. Otherwise a warning will
    be printed that some nodes are not stripped.

    Will do a backup if `backup` is True. The last non-None "topic" will be
    used as the backup topic name. The default backup topic name is "backup".
    )rzr{s�stripN)rXr�rjZgetpostcloser�Zaddpostcloser{r�)r*r+ryr{rzrr��callbackrrr�delayedstrip�s	
r�cCst|�D]}|�||�qdSr)rArj)r+r8rr7r>rrrrk�srkccs`|j�d�Vt�|�r\|j��D]8\}}}|�d�r"|�d�r"|dd�}|j�|�Vq"dS)Nrsmeta/s00manifest.i�i�)ZmanifestlogZ
getstoragerZistreemanifestrnZ	datafiles�
startswith�endswith)r+�tZ	unencoded�size�dirrrrrA�s
�rAFc	Cs�|��}tj|jvr&|�td��dS|�����|jj}|j|jd�t	|j
�}t	�}t	�}|r�|D]f}|dd�dkrf|dd�dkrf|�|dd��|�|�|dd�d}|j�|�rf|�|�qfn�|j
td	�td
�t|�d�}	|D]~}
|	�|
�||
}|��D]^}||v�r �q|�|�d|}d
|}
|j�|��rR|�|�|j�|
��r|�|
��qq�|	��tj|jv�r�t�|�D]F}d|}d|}
|j�|��r�|�|�|j�|
��r�|�|
��q�t||�}t||�}t||�D]}|�td�|��q�t||�D]}|�td�|��q"|�sH|�r�|�td�||f�||_
d|_|�d��}|�|�Wd�n1�s�0Yn|�td��Wd�n1�s�0YdS)ztRebuilds the fncache file from repo history.

    Missing entries will be added. Extra entries will be removed.
    sE(not rebuilding fncache because repository does not support fncache)
N)rxr�sdata/���s.is.ds
rebuildings
changesets)Zunit�totals	data/%s.is	data/%s.dsmeta/%s/00manifest.ismeta/%s/00manifest.dsremoving %s
s
adding %s
s(%d items added, %d removed from fncache
Tsfncachesfncache already up to date
)rYrZFNCACHE_REQUIREMENTrxr�lockrnZfncacheZensureloadedr%r�ra�_existsZmakeprogressr5r6r7ZcompleteZTREEMANIFEST_REQUIREMENTr�dirsr&�write�_dirtyrh)r*r+Z	only_dataZfncZ
oldentriesZ
newentriesZ	seenfilesr�ZdatafZprogressrG�ctxrN�dr�ZaddcountZremovecountrKrrrr�rebuildfncache�s���
 
�




��,r�c	Cs�|sdSg}|j}d}t|�D]$\}}||vr8|d7}q|�|�q|jdddd�}t�|d|j�D]}|�|�qd|��|S)a�Delete some obsmarkers from obsstore and return how many were deleted

    'indices' is a list of ints which are the indices
    of the markers to be deleted.

    Every invocation of this function completely rewrites the obsstore file,
    skipping the markers we want to be removed. The new temporary file is
    created, remaining markers are written there and on .close() this file
    gets atomically renamed to obsstore, thus guaranteeing consistency.Nrrsobsstore�wT)Z
atomictemp)	Z_allrdr�rlrZ
encodemarkersZ_versionr�rr)	re�indices�left�currentr�rNrOZnewobsstorefiler]rrrros
ro)TT)TrF)TrF)NT)F)*Z
__future__rrvZi18nrr.rr�rrr	r
rrr
rrrrrrZutilsrrrr4r:r@rErjr�rfrgr��objectr�r�rkrAr�rorrrr�<module>	s,<�
3

A


\

Youez - 2016 - github.com/yon3zu
LinuXploit