https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/mercurial/__pycache__/error.cpython-310.pyc
o

�]Lb�G�@s�dZddlmZddlZddlmZejr'ddlmZm	Z	m
Z
mZmZm
Z
mZdd�ZGd	d
�d
e�ZGdd�dee�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�dee�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�Z Gd#d$�d$e�Z!Gd%d&�d&e�Z"Gd'd(�d(e�Z#Gd)d*�d*e#�Z$Gd+d,�d,e�Z%Gd-d.�d.e�Z&Gd/d0�d0e�Z'Gd1d2�d2e�Z(Gd3d4�d4e�Z)Gd5d6�d6e�Z*Gd7d8�d8e�Z+Gd9d:�d:e�Z,Gd;d<�d<e�Z-Gd=d>�d>e-�Z.Gd?d@�d@e-�Z/GdAdB�dBe�Z0GdCdD�dDe�Z1GdEdF�dFe1�Z2GdGdH�dHe�Z3GdIdJ�dJe�Z4GdKdL�dLe4�Z5GdMdN�dNe4�Z6dOdP�Z7dQdR�Z8GdSdT�dTe3�Z9GdUdV�dVee�Z:GdWdX�dXe:�Z;GdYdZ�dZe;�Z<Gd[d\�d\e:�Z=Gd]d^�d^e:�Z>Gd_d`�d`e?�Z@Gdadb�dbe�ZAGdcdd�dde�ZBGdedf�dfe?�ZCGdgdh�dheC�ZDGdidj�djeC�ZEGdkdl�dleF�ZGGdmdn�dne�ZHGdodp�dpeI�ZJGdqdr�dre�ZKGdsdt�dteF�ZLGdudv�dveeF�ZMGdwdx�dxe�ZNGdydz�dzeO�ZPGd{d|�d|eP�ZQGd}d~�d~eF�ZRGdd��d�e�ZSGd�d��d�e�ZTGd�d��d�e�ZUGd�d��d�e�ZVGd�d��d�e�ZWGd�d��d�e�ZXGd�d��d�e�ZYGd�d��d�e�ZZGd�d��d�e�Z[dS)�zdMercurial exceptions.

This allows us to catch exceptions at higher levels without forcing
imports.
�)�absolute_importN�)�pycompat)�Any�AnyStr�Iterable�List�Optional�Sequence�UnioncCsB|jsdSt|j�dkrt�|jd�Sdd�dd�|jD��S)z?Byte-stringify exception in the same way as BaseException_str()�rrs(%s)�, css�|]
}dt�|�VqdS)s'%s'N)r�bytestr)�.0�a�r�1/usr/lib/python3/dist-packages/mercurial/error.py�	<genexpr>(s�z_tobytes.<locals>.<genexpr>)�args�lenrr�join)�excrrr�_tobytes!s
rcs eZdZdZ�fdd�Z�ZS)�Hintz�Mix-in to provide a hint of an error

    This should come first in the inheritance list to consume a hint and
    pass remaining arguments to the exception class.
    cs(|�dd�|_tt|�j|i|��dS)N�hint)�popr�superr�__init__)�selfr�kw��	__class__rrr2sz
Hint.__init__��__name__�
__module__�__qualname__�__doc__r�
__classcell__rrr rr+src@s@eZdZdZdZdZddd�Zdd�Zej	rdd�Z
d	d
�ZdS)�Errorz Base class for Mercurial errors.NcCs||_||_t�||�dS�N)�messager�	Exceptionr)rr*rrrrr=szError.__init__cCs|jSr))r*�rrrr�	__bytes__EszError.__bytes__cCst�|���Sr))r�sysstrr-r,rrr�__str__Jsz
Error.__str__cC�6ddlm}|d�|j}|jr||d�|j7}|S)Nr��_s
abort: %s
�(%s)
��i18nr2r*r�rr2r*rrr�formatQ�
zError.formatr))r#r$r%r&�coarse_exit_code�detailed_exit_coderr-r�ispy3r/r7rrrrr(7s
r(c@�eZdZdZdS)�Abortz5Raised if a command needs to print an error and exit.N�r#r$r%r&rrrrr=[�r=c@�eZdZdZdZdS)�StorageErrorzmRaised when an error occurs in a storage layer.

    Usually subclassed by a storage-specific exception.
    �2N�r#r$r%r&r:rrrrrA_�rAc@�eZdZdS)�RevlogErrorN�r#r$r%rrrrrFh�rFc@�eZdZdd�ZdS)�SidedataHashErrorcCsd|_||_||_||_dSr))r�sidedatakey�expecteddigest�actualdigest)r�key�expected�gotrrrrms
zSidedataHashError.__init__N�r#r$r%rrrrrrJl�rJc@�eZdZeZdS)�FilteredIndexErrorN�r#r$r%rr-rrrrrTur?rTc@s$eZdZdd�Zdd�Zdd�ZdS)�LookupErrorcCs\||_||_||_t|t�rt|�dkrddlm}||�}t�	|d|t
�|�|f�dS)N�r)�hexs	%s@%s: %s)�name�index�
lookupmessage�
isinstance�bytesr�noderXrFrrr)rrYrZr*rXrrrrzs�zLookupError.__init__cC�
t�|�Sr))rFr-r,rrrr-��
zLookupError.__bytes__cCr_r))rFr/r,rrrr/�r`zLookupError.__str__N)r#r$r%rr-r/rrrrrVysrVc@rE)�AmbiguousPrefixLookupErrorNrGrrrrra�rHrac@rE)�FilteredLookupErrorNrGrrrrrb�rHrbc@rE)�ManifestLookupErrorNrGrrrrrc�rHrcc�$eZdZdZ�fdd�ZeZ�ZS)�CommandErrorz7Exception raised on errors in parsing the command line.c�||_||_tt|���dSr))�commandr*rrer)rrgr*r rrr��zCommandError.__init__�r#r$r%r&rrr-r'rrr rre��recs&eZdZdZd�fdd�	ZeZ�ZS)�UnknownCommandz8Exception raised if command is not in the command table.Ncrfr))rg�all_commandsrrkr)rrgrlr rrr�rhzUnknownCommand.__init__r)rirrr rrk�srkcrd)�AmbiguousCommandzCException raised if command shortcut matches more than one command.crfr))�prefix�matchesrrmr)rrnror rrr�rhzAmbiguousCommand.__init__rirrr rrm�rjrmcrd)�WorkerErrorz,Exception raised when a worker process dies.cs||_tt|��|�dSr))�status_coderrpr)rrqr rrr�szWorkerError.__init__rirrr rrp�rjrpc@s eZdZdZdZdZdd�ZdS)�InterventionRequiredz<Exception raised when a command requires human intervention.r��cCr0)Nrr1s%s
r3r4r6rrrr7�r8zInterventionRequired.formatN)r#r$r%r&r9r:r7rrrrrr�s
rrc@�eZdZdZdd�ZdS)�ConflictResolutionRequiredzOException raised when a continuable command required merge conflict resolution.cCs*ddlm}||_t�||d�|�dS)Nrr1s@unresolved conflicts (see 'hg resolve', then 'hg %s --continue'))r5r2�opnamerrr)rrvr2rrrr�s���z#ConflictResolutionRequired.__init__N�r#r$r%r&rrrrrru��ruc@r@)�
InputErrorz{Indicates that the user made an error in their input.

    Examples: Invalid command, invalid flags, invalid revision.
    �
NrCrrrrry�rDryc@r@)�
StateErrorz�Indicates that the operation might work if retried in a different state.

    Examples: Unresolved merge conflicts, unfinished operations.
    rWNrCrrrrr{�rDr{c@r@)�
CanceledErrorzzIndicates that the user canceled the operation.

    Examples: Close commit editor with error status, quit chistedit.
    �NrCrrrrr|rDr|c@r@)�
SecurityErrorz�Indicates that some aspect of security failed.

    Examples: Bad server credentials, expired local credentials for network
    filesystem, mismatched GPG signature, DoS protection.
    �NrCrrrrr~	sr~c@r<)�
HookLoadErrorzgraised when loading a hook fails, aborting an operation

    Exists to allow more specialized catching.Nr>rrrrr�r?r�c@r@)�	HookAbortzjraised when a validation hook fails, aborting an operation

    Exists to allow more specialized catching.�(NrCrrrrr�sr�c�.eZdZdZdZd�fdd�	Zdd�Z�ZS)	�ConfigErrorz*Exception raised when parsing config files�Nc�tt|�j||d�||_dS�N�r)rr�r�location�rr*r�rr rrr&�
zConfigError.__init__cC�\ddlm}|jdur|d�t�|j�|jf}n|d�|j}|jr,||d�|j7}|S)Nrr1sconfig error at %s: %s
sconfig error: %s
r3�r5r2r�rrr*rr6rrrr7+�

�zConfigError.format�NN�r#r$r%r&r:rr7r'rrr rr�!�
r�c@r<)�UpdateAbortz6Raised when an update is aborted for destination issueNr>rrrrr�;r?r�c@r<)�MergeDestAbortz7Raised when an update is aborted for destination issuesNr>rrrrr�?r?r�c@r<)�NoMergeDestAbortzBRaised when an update is aborted because there is nothing to mergeNr>rrrrr�Cr?r�c@r<)�ManyMergeDestAbortzARaised when an update is aborted because destination is ambiguousNr>rrrrr�Gr?r�c@rt)�ResponseExpectedz+Raised when an EOF is received for a promptcCs ddlm}t�||d��dS)Nrr1sresponse expected)r5r2r=r)rr2rrrrNszResponseExpected.__init__Nrwrrrrr�Krxr�c@r@)�RemoteErrorz:Exception raised when interacting with a remote repo fails�dNrCrrrrr�T�r�c�"eZdZdZd�fdd�	Z�ZS)�OutOfBandErrorz3Exception raised when a remote repo reports failureNcsDddlm}|r|d�|�d�}n|d�}tt|�j||d�dS)Nrr1sremote error:
%s�
sremote errorr�)r5r2�rstriprr�r)rr*rr2r rrr]s
zOutOfBandError.__init__r�r"rrr rr�Z�r�cr�)	�
ParseErrorz@Raised when parsing config files and {rev,file}sets (msg[, pos])rzNcr�r�)rr�rr�r�r rrrnr�zParseError.__init__cCr�)Nrr1shg: parse error at %s: %s
shg: parse error: %s
r3r�r6rrrr7sr�zParseError.formatr�r�rrr rr�ir�r�c@rS)�
PatchErrorNrUrrrrr��r?r�c@rS)�PatchParseErrorNrUrrrrr��r?r�c@rS)�PatchApplicationErrorNrUrrrrr��r?r�cs�fdd���fdd�|D�S)Ncst�d�|���Sr))�difflib�SequenceMatcher�ratio)�x)�valuerr�<lambda>�szgetsimilar.<locals>.<lambda>csg|]
}�|�dkr|�qS)g333333�?r)r�s)�simrr�
<listcomp>�szgetsimilar.<locals>.<listcomp>r)�symbolsr�r)r�r�r�
getsimilar�sr�cCsJddlm}t|�dkr|d�|dS|r#d�t|��}|d�|SdS)Nrr1sdid you mean %s?rr
sdid you mean one of %s?)r5r2rr�sorted)�similarr2�ssrrr�similarity_hint�sr�c@rt)�UnknownIdentifierzFException raised when a {rev,file}set references an unknown identifiercCs:ddlm}t||�}t|�}tj||d�||d�dS)Nrr1sunknown identifier: %sr�)r5r2r�r�r�r)r�functionr�r2r�rrrrr�s

�zUnknownIdentifier.__init__Nrwrrrrr��rxr�c@rS)�	RepoErrorNrUrrrrr��r?r�c@rE)�RepoLookupErrorNrGrrrrr��rHr�c@rE)�FilteredRepoLookupErrorNrGrrrrr��rHr�c@rE)�CapabilityErrorNrGrrrrr��rHr�c@r<)�RequirementErrorz6Exception raised if .hg/requires has an unknown entry.Nr>rrrrr��r?r�c@rt)�
StdioErrorz'Raised if I/O to stdout or stderr failscCst�||j|j�dSr))�IOErrorr�errno�strerror)r�errrrrr�szStdioError.__init__Nrwrrrrr��rxr�c@rI)�UnsupportedMergeRecordscCsBddlm}t|�|_d�|j�}tj||d�||d�d�dS)Nrr1� s#unsupported merge state records: %ssIsee https://mercurial-scm.org/wiki/MergeStateRecords for more informationr�)r5r2r��recordtypesrr=r)rr�r2r�rrrr�s

�
�z UnsupportedMergeRecords.__init__NrQrrrrr��rRr�cr�)�UnknownVersionzHgeneric exception for aborting from an encounter with an unknown versionNcs||_tt|�j||d�dSr�)�versionrr�r)r�msgrr�r rrr�szUnknownVersion.__init__r�r"rrr rr��r�r�c@rI)�	LockErrorcCst�||||�||_dSr))r�r�desc)rr�r��filenamer�rrrr�s
zLockError.__init__NrQrrrrr��rRr�c@rI)�LockHeldcCst�||d||�||_dS)Ns	Lock held)r�r�locker)rr�r�r�r�rrrr�s
zLockHeld.__init__NrQrrrrr��rRr�c@rE)�LockUnavailableNrGrrrrr��rHr�c@rS)� LockInheritanceContractViolationNrUrrrrr�r?r�c@�eZdZdZeZdS)�
ResponseErrorz6Raised to print an error with part of output and exit.N�r#r$r%r&rr-rrrrr�r�r�c@r<)�SignalInterruptz'Exception raised on SIGTERM and SIGHUP.Nr>rrrrr�r?r�c@rS)�SignatureErrorNrUrrrrr�r?r�c@r�)�	PushRacedz?An exception raised during unbundling that indicate a push raceNr�rrrrr�r�r�crd)�ProgrammingErrorzBRaised if a mercurial (core or extension) developer made a mistakecs,t�|�}tt|�j|g|�Ri|��dSr))rr.rr�r)rr�r�kwargsr rrrs
"zProgrammingError.__init__rirrr rr�sr�c@r�)�WdirUnsupportedz;An exception which is raised when 'wdir()' is not supportedNr�rrrrr�'r�r�c@r�)�BundleValueErrorz-error raised when bundle2 cannot be processedNr�rrrrr�.r�r�c@seZdZddd�ZdS)�BundleUnknownFeatureErrorNrc	Cs�||_||_||_|jdurd}n|}|j}|jrO|jrOt|j�t|j�ks(J�g}t|j�D]\}}|j|}|durB|�|�q/|�d|t�|�f�q/|rZd|d�|�f}t	�
||�dS)NsStream Parameters%s=%rs%s - %sr
)�parttype�params�valuesr�	enumerate�appendr�maybebytestrr�
ValueErrorr)	rr�r�r�r��entries�idx�par�valrrrr5s$

z"BundleUnknownFeatureError.__init__)NrrrQrrrrr�4sr�c@r�)�ReadOnlyPartErrorz<error raised when code tries to alter a part being generatedNr�rrrrr�Lr�r�c@seZdZdZ	ddd�ZdS)�
PushkeyFailedz9error raised when a pushkey part failed to update a valueNcCs<||_||_||_||_||_||_t�|d||f�dS)Ns"failed to update value for "%s/%s")�partid�	namespacerN�new�old�retr=r)rr�r�rNr�r�r�rrrrUs�zPushkeyFailed.__init__)NNNNNrwrrrrr�Rs�r�c@rt)�CensoredNodeErrorz�error raised when content verification fails on a censored node

    Also contains the tombstone data substituted for the uncensored data.
    cCs.ddlm}t�|d|||�f�||_dS)Nr)�shorts%s:%s)r^r�rAr�	tombstone)rr�r^r�r�rrrrjs
zCensoredNodeError.__init__Nrwrrrrr�dsr�c@r<)�CensoredBaseErrora%error raised when a delta is rejected because its base is censored

    A delta based on a censored revision must be formed as single patch
    operation which replaces the entire base with new content. This ensures
    the delta may be applied by clones which have not censored the base.
    Nr>rrrrr�rr?r�c@r�)�InvalidBundleSpecificationz{error raised when a bundle specification is invalid.

    This is used for syntax errors as opposed to support errors.
    Nr�rrrrr�{rDr�c@r�)�UnsupportedBundleSpecificationz:error raised when a bundle specification is not supported.Nr�rrrrr��r�r�c@r�)�CorruptedStatezCerror raised when a command is not able to read its state from fileNr�rrrrr��r�r�c@r<)�PeerTransportErrorz>Transport-level I/O error when communicating with a peer repo.Nr>rrrrr��r?r�c@r�)�InMemoryMergeConflictsErrorzFException raised when merge conflicts arose during an in-memory merge.Nr�rrrrr��r�r�c@seZdZdZddd�ZdS)�WireprotoCommandErrorz�Represents an error during execution of a wire protocol command.

    Should only be thrown by wire protocol version 2 commands.

    The error is a formatter string and an optional iterable of arguments.
    NcCs||_||_dSr))r*�messageargs)rr*rrrrr�s
zWireprotoCommandError.__init__r)rwrrrrr��sr�)\r&�
__future__rr��r�
TYPE_CHECKING�typingrrrrr	r
rr�objectrr+r(r=rArFrJ�
IndexErrorrT�KeyErrorrVrarbrcrerkrmrprrruryr{r|r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��RuntimeErrorr�r��KeyboardInterruptr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr�<module>s�$
$					
	

	
		

https://t.me/RX1948 - 2025