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__/dirstateguard.cpython-310.pyc
o

�]LbY�@sNddlmZddlZddlmZddlmZmZmZm	Z	Gdd�de	j
�ZdS)�)�absolute_importN�)�_)�error�
narrowspec�requirements�utilc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�
dirstateguardanRestore dirstate at unexpected failure.

    At the construction, this class does:

    - write current ``repo.dirstate`` out, and
    - save ``.hg/dirstate`` into the backup file

    This restores ``.hg/dirstate`` from backup file, if ``release()``
    is invoked before ``close()``.

    This just removes the backup file at ``close()`` before ``release()``.
    csx�|_d|_d|_�fdd�}|d|�|_�j����|j�d|_tj	�jvr7|d|�|_t
��|j�d|_dS)NFcs �jj|d�\}}t�|�|S)N)�prefix)�vfs�mkstemp�os�close)r
�fd�fname��repo��9/usr/lib/python3/dist-packages/mercurial/dirstateguard.py�getname(s
z'dirstateguard.__init__.<locals>.getnamesdirstate.backup.%s.snarrowspec.backup.%s.T)�_repo�_active�_closed�_backupname�dirstate�
savebackup�currenttransaction�_narrowspecbackupnamer�NARROW_REQUIREMENTr�savewcbackup)�selfr�namerrrr�__init__#s�
zdirstateguard.__init__cCs|jr	|��dSdS)N)r�_abort�r rrr�__del__9s�zdirstateguard.__del__cCs\|jstd�|j}t�|��|jj�|j��|j�|j	r&t
�|j|j	�d|_d|_dS)Ns*can't close already inactivated backup: %sFT)
rrrr�Abortrr�clearbackuprrr�
clearwcbackupr�r �msgrrrrAs��
�
zdirstateguard.closecCs8|jrt�|j|j�|jj�|j��|j�d|_dS)NF)	rr�restorewcbackuprr�
restorebackuprrrr$rrrr#Qs�
zdirstateguard._abortcCs4|js|jstd�|j}t�|��|��dSdS)Ns,can't release already inactivated backup: %s)rrrrrr&r#r)rrr�releaseYs��
�zdirstateguard.releaseN)	�__name__�
__module__�__qualname__�__doc__r"r%rr#r-rrrrr	s
r	)�
__future__rr
�i18nr�rrrr�
transactionalr	rrrr�<module>s


https://t.me/RX1948 - 2025