📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/umvavtmy/public_html/website_b18404e2/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib64
›
python3.9
›
site-packages
›
hgext
›
remotefilelog
›
📁 __pycache__
📍
Lokasi:
/usr/lib64/python3.9/site-packages/hgext/remotefilelog/__pycache__
💾
Free:
48.2 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: basestore.cpython-39.opt-1.pyc
a �+�b�? � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl m Z mZ d dlm Z d dlmZmZmZ d dlmZ dd lmZmZ G d d� de�ZG dd � d e�ZdS )� )�absolute_importN)�_)�bin�hex)�open)�error�pycompat�util)�hashutil� )� constants�shallowutilc @ s� e Zd Zd#dd�Zdd� Zd$dd�Zd d � Zdd� Zd d� Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd � Zd!d"� ZdS )%� basestoreFc C s� || _ |j| _|| _|| _|| _tjs.t�� nd| _ | j� dd�| _| j� ddd�| _| jdvrfd| _| jdkrvd| _|r�t �| j|� dS ) a� Creates a remotefilelog store object for the given repo name. `path` - The file path where this store keeps its data `reponame` - The name of the repo. This is used to partition data from many repos. `shared` - True if this store is a shared cache of data from the central server, for many repos on this machine. False means this store is for the local data for one repo. N� remotefilelogs validatecachelogs validatecache� on)r � strict� offr F)�repo�ui�_path� _reponame�_sharedr Z iswindows�os�getuid�_uidZconfig�_validatecachelog�_validatecacher �mkstickygroupdir)�selfr �pathZreponameZshared� r �C/usr/lib64/python3.9/site-packages/hgext/remotefilelog/basestore.py�__init__ s$ �� zbasestore.__init__c C s^ g }|D ]P\}}| � ||�}tj�|�}|rF| jdkrF| �|d�sFd}|s|�||f� q|S )Nr s containsF)�_getfilepathr r �existsr �_validatekey�append)r �keys�missing�name�node�filepathr$ r r r! � getmissing8 s �� �zbasestore.getmissingNc C sV |r|� tj�rd S | jrR| �� D ].\}}|D ] }|�| ||� |�| ||� q.q"d S �N)�getr ZOPTION_PACKSONLYr � _getfilesZ markdataentryZmarkhistoryentry)r �ledger�options�filenameZnodesr* r r r! � markledgerJ s zbasestore.markledgerc C s� | j }|j�| g �}d}|jtd�dt|�d�}|D ]B}|jsJ|jrn|jrn|� |� | � |j|j�}t �|� |d7 }q4|�� | �| �� � d S )Nr s cleaning up� files��unit�totalr )r Zsourcesr. �makeprogressr �lenZgcedZdatarepackedZhistoryrepacked�updater# r2 r* r � tryunlink�complete�_cleanupdirectory�_getrepocachepath)r r0 r �entries�count�progress�entryr r r r! �cleanupS s � zbasestore.cleanupc C s� t � }t � }tj�|�D ]�\}}t�|�rftj�||�}| � |� zt� |� W q� tyb Y q�0 qt�|�r|� d�r�|�|dd� � q|�|� q|| D ] }tj�||d �}t�|� q�dS )z�Removes the empty directories and unnecessary files within the root directory recursively. Note that this method does not remove the root directory itself.� _oldN���)�setr Zosutil�listdir�stat�S_ISDIRr r �joinr= �rmdir�OSError�S_ISREG�endswith�addr; ) r ZrootdirZoldfilesZ otherfilesr) �mode�dirpathr2 r+ r r r! r= g s"