| Server IP : 108.167.183.253 / Your IP : 216.73.216.79 Web Server : Apache System : Linux gator4209.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : raghunath ( 2558) PHP Version : 8.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/hgext/infinitepush/__pycache__/ |
Upload File : |
a
�+�b� � @ s� d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dl m
Z
d dlmZm
Z
G dd� de�ZG d d
� d
e�ZG dd� de�ZG d
d� de�Zddd�ZG dd� de�ZdS )� )�absolute_importN)�hex)�open)�pycompat)�hashutil�procutilc @ s e Zd ZdS )�BundleWriteExceptionN��__name__�
__module__�__qualname__� r
r
�>/usr/lib64/python3.9/site-packages/hgext/infinitepush/store.pyr s r c @ s e Zd ZdS )�BundleReadExceptionNr r
r
r
r r s r c @ s2 e Zd ZdZejZejdd� �Zejdd� �Z dS )�abstractbundlestorea6 Defines the interface for bundle stores.
A bundle store is an entity that stores raw bundle data. It is a simple
key-value store. However, the keys are chosen by the store. The keys can
be any Python object understood by the corresponding bundle index (see
``abstractbundleindex`` below).
c C s dS )z�Write bundle data to the store.
This function receives the raw data to be written as a str.
Throws BundleWriteException
The key of the written data MUST be returned.
Nr
)�self�datar
r
r �write( s zabstractbundlestore.writec C s dS )z�Obtain bundle data for a key.
Returns None if the bundle isn't known.
Throws BundleReadException
The returned object should be a file object supporting read()
and close().
Nr
)r �keyr
r
r �read1 s zabstractbundlestore.readN)
r
r r �__doc__�abc�ABCMetaZ
__metaclass__�abstractmethodr r r
r
r
r r s
r c @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� ZdS )
�filebundlestorezkbundle store in filesystem
meant for storing bundles somewhere on disk and on network filesystems
c C sP || _ || _|�dd�| _| js2| jj�dd�| _tj�| j�sLt� | j� d S )Ns
scratchbranchs storepaths scratchbranchess filebundlestore)
�ui�repoZ
configpath� storepathZvfs�join�os�path�exists�makedirs)r r r r
r
r �__init__B s �zfilebundlestore.__init__c C s"