File: //usr/lib/python3/dist-packages/mercurial/interfaces/__pycache__/repository.cpython-310.pyc
o
�]Lb� � @ s� d dl mZ ddlmZ ddlmZ ddlmZ dZdZ d Z
d
ZdZdZ
d
ZdZdZdZeeB eB eB ZdZdZdZdZdZdZdZdZdZdZdZdZdZehZ eeeeeeeehZ!e!�"� Z#e#�$e� G dd� dej%�Z&G d d!� d!ej%�Z'G d"d#� d#ej%�Z(G d$d%� d%ej%�Z)G d&d'� d'ej%�Z*G d(d)� d)ej%�Z+G d*d+� d+e&e'e+�Z,G d,d-� d-e&e'e+�Z-e�.e,�G d.d/� d/e/��Z0G d0d1� d1ej%�Z1G d2d3� d3ej%�Z2G d4d5� d5ej%�Z3G d6d7� d7ej%�Z4G d8d9� d9ej%�Z5G d:d;� d;ej%�Z6G d<d=� d=e4e5e6�Z7G d>d?� d?ej%�Z8G d@dA� dAej%�Z9G dBdC� dCej%�Z:G dDdE� dEe:�Z;G dFdG� dGe:�Z<G dHdI� dIej%�Z=G dJdK� dKej%�Z>G dLdM� dMej%�Z?G dNdO� dOej%�Z@G dPdQ� dQe@e?�ZAG dRdS� dSej%�ZBdTS )U� )�absolute_import� )�_)�error� )�utils revlogfilestorages sharedstores lfss streamclones side-datas shallowfilestoragei � i @ i i s defaults previouss fulltexts p1s
branchmap-alls branchmap-serveds changelog-caches
full-manifests file-node-tagss manifestlog-caches rev-branch-caches tags-defaults tags-servedc @ sB e Zd ZdZe�d�Zdd� Zdd� Zdd� Z d d
� Z
dd� Zd
S )�ipeerconnectiona* Represents a "connection" to a repository.
This is the base interface for representing a connection to a repository.
It holds basic properties and methods applicable to all peer types.
This is not a complete interface definition and should not be used
outside of this module.
zui.ui instancec C � dS )a� Returns a URL string representing this peer.
Currently, implementations expose the raw URL used to construct the
instance. It may contain credentials as part of the URL. The
expectations of the value aren't well-defined and this could lead to
data leakage.
TODO audit/clean consumers and more clearly define the contents of this
value.
N� r
r
r
�A/usr/lib/python3/dist-packages/mercurial/interfaces/repository.py�urll � zipeerconnection.urlc C r )z�Returns a local repository instance.
If the peer represents a local repository, returns an object that
can be used to interface with it. Otherwise returns ``None``.
Nr
r
r
r
r �localx r
zipeerconnection.localc C r )zlReturns an object conforming to this interface.
Most implementations will ``return self``.
Nr
r
r
r
r �peer r
zipeerconnection.peerc C r )z;Returns a boolean indicating if this peer can be pushed to.Nr
r
r
r
r �canpush� r
zipeerconnection.canpushc C r )z�Close the connection to this peer.
This is called when the peer will no longer be used. Resources
associated with the peer should be cleaned up.
Nr
r
r
r
r �close� r
zipeerconnection.closeN)�__name__�
__module__�__qualname__�__doc__�
interfaceutil� Attribute�uir r r r r r
r
r
r r ` s
r c @ � e Zd ZdZdd� Zdd� ZdS )�ipeercapabilitiesz+Peer sub-interface related to capabilities.c C r )a5 Determine support for a named capability.
Returns ``False`` if capability not supported.
Returns ``True`` if boolean capability is supported. Returns a string
if capability support is non-boolean.
Capability strings may or may not map to wire protocol capabilities.
Nr
)�namer
r
r �capable� r
zipeercapabilities.capablec C r )zsRequire a capability to be present.
Raises a ``CapabilityError`` if the capability isn't present.
Nr
)r �purposer
r
r �
requirecap� r
zipeercapabilities.requirecapN)r r r r r r r
r
r
r r � s r c @ sr e Zd ZdZdd� Zdd� Zdd� Zdd d
�Zdd� Zd
d� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� ZdS )�
ipeercommandsz�Client-side interface for communicating over the wire protocol.
This interface is used as a gateway to the Mercurial wire protocol.
methods commonly call wire protocol commands of the same name.
c C r )z�Obtain heads in named branches.
Returns a dict mapping branch name to an iterable of nodes that are
heads on that branch.
Nr
r
r
r
r � branchmap� r
zipeercommands.branchmapc C r )zXObtain capabilities of the peer.
Returns a set of string capabilities.
Nr
r
r
r
r �capabilities� r
zipeercommands.capabilitiesc C r )zjObtains the clone bundles manifest for the repo.
Returns the manifest as unparsed bytes.
Nr
r
r
r
r �clonebundles� r
zipeercommands.clonebundlesNc C r )z?Used to facilitate debugging of arguments passed over the wire.Nr
��one�two�three�four�fiver
r
r �
debugwireargs� r
zipeercommands.debugwireargsc K r )z�Obtain remote repository data as a bundle.
This command is how the bulk of repository data is transferred from
the peer to the local repository
Returns a generator of bundle data.
Nr
)�source�kwargsr
r
r � getbundle� r
zipeercommands.getbundlec C r )zfDetermine all known head revisions in the peer.
Returns an iterable of binary nodes.
Nr
r
r
r
r �heads� r
zipeercommands.headsc C r )z�Determine whether multiple nodes are known.
Accepts an iterable of nodes whose presence to check for.
Returns an iterable of booleans indicating of the corresponding node
at that index is known to the peer.
Nr
��nodesr
r
r �known� r
zipeercommands.knownc C r )z[Obtain all keys in a pushkey namespace.
Returns an iterable of key names.
Nr
�� namespacer
r
r �listkeys� r
zipeercommands.listkeysc C r )zqResolve a value to a known revision.
Returns a binary node of the resolved revision on success.
Nr
��keyr
r
r �lookup� r
zipeercommands.lookupc C r )a Set a value using the ``pushkey`` protocol.
Arguments correspond to the pushkey namespace and key to operate on and
the old and new values for that key.
Returns a string with the peer result. The value inside varies by the
namespace.
Nr
�r2 r5 �old�newr
r
r �pushkey� r
zipeercommands.pushkeyc C r )zfObtain streaming clone data.
Successful result should be a generator of data chunks.
Nr
r
r
r
r �
stream_out� r
zipeercommands.stream_outc C r )z�Transfer repository data to the peer.
This is how the bulk of data during a push is transferred.
Returns the integer number of heads added to the peer.
Nr
)�bundler- r r
r
r �unbundle� r
zipeercommands.unbundle�NNN)r r r r r r! r"