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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

�+�b��@s�dZddlmZddlZddlZddlmZddlmZddl	m
Z
mZmZm
Z
ddlmZmZiZe�e�ZdZed	ged
�ejd�ddd
��Zdd�Zdd�Zdd�ZdS)z-recreates hardlinks between repository clones�)�absolute_importN)�_)�open)�error�hg�	registrar�util)�
stringutil�urlutilsships-with-hg-core�relinks[ORIGIN])Zhelpcategoryc		KsNt�td�rt�td�s&t�td���|dur<d|jvr<d}t�d|||�\}}t�	|j
|�}|�td�|jj
|jj
f�|j|jkr�|�td��dSt�|jj
|jj
�s�t�td	���|���t|���Jtt||��}t||jj
|jj
|�}t|jj
|jj
||�Wd�n1�s 0YWd�n1�s@0YdS)
a�recreate hardlinks between two repositories

    When repositories are cloned locally, their data files will be
    hardlinked so that they only use the space of a single repository.

    Unfortunately, subsequent pulls into either repository will break
    hardlinks for any files touched by the new changesets, even if
    both repositories end up pulling the same changes.

    Similarly, passing --rev to "hg clone" will fail to use any
    hardlinks, falling back to a complete copy of the source
    repository.

    This command lets you recreate those hardlinks and reclaim that
    wasted space.

    This repository will be relinked to share space with ORIGIN, which
    must be on the same local disk. If ORIGIN is omitted, looks for
    "default-relink", then "default", in [paths].

    Do not attempt any read operations on this repository while the
    command is running. (Both repositories will be locked against
    writes.)
    ssamefiles
samedevices*hardlinks are not supported on this systemNsdefault-relinkrsrelinking %s to %s
sthere is nothing to relink
�/source and destination are on different devices)rZsafehasattrr�Abortr�pathsr
Zget_unique_pull_pathrZ
repositoryZbaseui�status�store�path�root�
samedevice�lock�sorted�collect�prune�	do_relink)	�uiZrepo�originZoptsr�__�src�
candidates�targets�r�2/usr/lib64/python3.9/site-packages/hgext/relink.py�relink$s$�r!cCs*ttjj�}g}t|d���}|dd}|jj}|jtd�td�|d�}d}|�td�||f�t�	|�D]�\}}	}
|	�
�|t|�|d�}t|
�D]f}|d	d�d
vr�q�t�tj�
||��}
t�|
j�s�q�|d7}|�tj�
||�|
f�|j||d�q�qp|��|�td
�t|��|S)Nstip��s
collecting�files�Zunit�totalrs6tip has %d files, estimated total number of files: %d
���)s.ds.i���items%collected %d candidate storage files
)�len�osr�sepZmanifestr�makeprogressrr�walk�sortr�stat�join�S_ISREG�st_mode�append�update�complete)rrZseplenrZliver&�progress�pos�dirpath�dirnames�	filenames�relpath�filename�strrr rXs6��rc
Cs�dd�}g}|jtd�td�t|�d�}d}|D]j\}}	|d7}tj�||�}
tj�||�}||
||	�}|s||�d|�q0|�||jf�|j	||d	�q0|�
�|�td
�t|��|S)NcSsbzt�|�}Wnty"YdS0t�||�r4dSt�||�sNt�td���|j	|j	kr^dS|S)NFr)
r,r1�OSErrorr�samefilerrr
r�st_size)r�dstr?�tsrrr �
linkfilter}s�zprune.<locals>.linkfilterspruningr$r%rr(�not linkable: %s
r)s,pruned down to %d probably relinkable files
)r.rr+r,rr2�debugr5rBr6r7r)
rrrCrrErr8r9�fnr?Zsrcpath�tgtrDrrr r|s*��rcCs`dd�}d}d}d}|jtd�td�t|�d�}d}	|D]�\}
}|	d7}	tj�||
�}tj�||
�}
t|d	�}t|
d	�}|�|�}|r�|�|�}||kr�q�|�|�}q�|��|��|r�|�	d
|
�q8z,|||
�|j
|	|
d�|d7}||7}Wq8t�y4}z$|�d|
t
�|�f�WYd}~q8d}~00q8|��|�td
�|t�|�f�dS)NcSsT|d}t�||�zt�||�Wn tyDt�||��Yn0t�|�dS)Ns.bak)r,�renamerZoslinkr@�remove)rrCZbakrrr �
relinkfile�szdo_relink.<locals>.relinkfileirs	relinkingr$r%r(srbrFr)s%s: %s
s!relinked %d files (%s reclaimed)
)r.rr+r,rr2r�read�closerGr6r@�warnr	Zforcebytestrr7rrZ	bytecount)rrC�filesrrLZCHUNKLENZrelinkedZ
savedbytesr8r9�fZsz�sourcerIZsfpZdfpZsinZdin�instrrr r�sL
�




0��r)N)�__doc__Z
__future__rr,r1Zmercurial.i18nrZmercurial.pycompatrZ	mercurialrrrrZmercurial.utilsr	r
ZcmdtableZcommandZ
testedwithZCATEGORY_MAINTENANCEr!rrrrrrr �<module>s"
�1$)

Youez - 2016 - github.com/yon3zu
LinuXploit