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 : |
a �+�b� � @ s� d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl m Z mZmZm Z ddlmZmZ i Ze�e�ZdZed g ed �ejd�ddd ��Zdd� Zdd� Zdd� ZdS )z-recreates hardlinks between repository clones� )�absolute_importN)�_)�open)�error�hg� registrar�util)� stringutil�urlutils ships-with-hg-core� relinks [ORIGIN])Zhelpcategoryc K sN t �t d�rt �t d�s&t�td���|du r<d| jv r<d}t�d|| |�\}}t� |j |�}| �td�|jj |jj f � |j|jkr�| �td�� dS t �|jj |jj �s�t�td ���|�� �t |�� �J tt|| ��}t||jj |jj | �}t|jj |jj || � W d � n1 �s 0 Y W d � n1 �s@0 Y dS ) 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.) s samefiles samedevices* hardlinks are not supported on this systemNs default-relinkr s relinking %s to %s s there is nothing to relink �/ source and destination are on different devices)r Zsafehasattrr �Abortr �pathsr Zget_unique_pull_pathr Z 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! c C s* t tjj�}g }t | d �� �}|d d }| 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 )Ns tip� � s collecting� files�Zunit�totalr s6 tip has %d files, estimated total number of files: %d ���)s .ds .i� ��items% collected %d candidate storage files )�len�osr �sepZmanifestr �makeprogressr r �walk�sortr �stat�join�S_ISREG�st_mode�append�update�complete)r r Zseplenr Zliver&