403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/lockable_files.cpython-313.pyc
�

p��g�*��l�SSKJr SSKJrJrJrJrJr SSKJ	r	 SSK
Jr "SS5r"SS	5r
g
)�)�Optional�)�counted_lock�errors�lock�transactions�urlutils)�only_raises)�	Transportc���\rSrSr%Sr\\S'\\\S'\\	R\S'\\R\S'S\
S\S	\\	RS
S4SjrS"S
jrSrSrS"SjrS\S
\4SjrS"SjrS"SjrS"SjrS#S\\	RS
\\	R4SjjrS"SjrSrSr\"\R>\R@5S5r!S
\"4Sjr#S
\"4Sjr$S
\R4Sjr%Sr&S r'S!r(g)$�
LockableFiles�aObject representing a set of related files locked within the same scope.

This coordinates access to the lock along with providing a transaction.

LockableFiles manage a lock count and can be locked repeatedly by
a single caller.  (The underlying lock implementation generally does not
support this.)

Instances of this class are often called control_files.

This class is now deprecated; code should move to using the Transport
directly for file operations and using the lock or CountedLock for
locking.

:ivar _lock: The real underlying lock (e.g. a LockDir)
:ivar _lock_count: If _lock_mode is true, a positive count of the number
    of times the lock has been taken (and not yet released) *by this
    process*, through this particular object instance.
:ivar _lock_mode: None, or 'r' or 'w'
�_lock_count�
_lock_mode�_token_from_lock�_transaction�	transport�	lock_name�
lock_class�returnNc��XlX lSUlSUlSUlUR5 UR
U5nU"UUURURS9Ul	[R"UR5Ulg)aCreate a LockableFiles group.

:param transport: Transport pointing to the directory holding the
    control files and lock.
:param lock_name: Name of the lock guarding these files.
:param lock_class: Class of lock strategy to use: typically
    either LockDir or TransportLock.
Nr)�
file_modebits�dir_modebits)
�
_transportrrrr�_find_modes�_escape�
_file_mode�	_dir_mode�_lockr�CountedLock�
_counted_lock)�selfrrr�esc_names     �7/usr/lib/python3/dist-packages/breezy/lockable_files.py�__init__�LockableFiles.__init__4sx��$��"�� ��������������<�<�	�*������/�/����	
��
�*�5�5�d�j�j�A���c�J�URRURS9 g)zqCreate the lock.

This should normally be called only when the LockableFiles directory
is first created on disk.
��modeN)r�creater�r"s r$�create_lock�LockableFiles.create_lockNs��	
�
�
���t�~�~��.r'c�b�SRURRUR5$)Nz{}({!r}))�format�	__class__�__name__rr,s r$�__repr__�LockableFiles.__repr__Vs#��� � ����!8�!8�$�/�/�J�Jr'c�b�SRURURR5$)NzLockableFiles({}, {}))r0rr�baser,s r$�__str__�LockableFiles.__str__Ys#��&�-�-�d�n�n�d�o�o�>R�>R�S�Sr'c�8�URR5 g)z�Break the lock of this lockable files group if it is held.

The current ui factory will be used to prompt for user conformation.
N)r�
break_lockr,s r$r:�LockableFiles.break_lock\s��
	
�
�
���r'�file_or_pathc�<�US:Xag[R"U5$)z*DEPRECATED: Do not use outside this class.�)r	�escape)r"r<s  r$r�LockableFiles._escapecs���2������|�,�,r'c���URRS5nURS-S-UlURS-Ulg![
Ra SUlSUlgf=f)zrDetermine the appropriate modes for files and directories.

:deprecated: Replaced by BzrDir._find_creation_modes.
�.i�i�i��i�i�N)r�stat�st_moderrr�TransportNotPossible)r"�sts  r$r�LockableFiles._find_modesisg��	7����%�%�c�*�B�!�j�j�6�1�V�;�D�N�"�n�n�w�6�D�O���*�*�	$�"�D�N�#�D�O�	$�s�A	�	"A.�-A.c�8�URR5 g)z@Set this LockableFiles to not clear the physical lock on unlock.N)r�leave_in_placer,s r$rI�LockableFiles.leave_in_places���
�
�!�!�#r'c�8�URR5 g)z<Set this LockableFiles to clear the physical lock on unlock.N)r�dont_leave_in_placer,s r$rL�!LockableFiles.dont_leave_in_place�s���
�
�&�&�(r'�tokenc��UR(a�URS:wd#UR5R5(d[R"U5eUR
R
U5 U=RS-
slUR$UR
RUS9nSUlSUlUR5 X lU$)aFLock this group of files for writing.

:param token: if this is already locked, then lock_write will fail
    unless the token matches the existing lock.
:returns: a token if this instance supports tokens, otherwise None.
:raises TokenLockingNotSupported: when a token is given but this
    instance doesn't support using token locks.
:raises MismatchedToken: if the specified token doesn't match the token
    of the existing lock.

A token should be passed in if you know that you have locked the object
some other way, and need to synchronise this object's state with that
fact.
�wr)rN)r�get_transaction�	writeabler�
ReadOnlyErrorr�validate_tokenrr�
lock_write�_set_write_transaction)r"rN�token_from_locks   r$rU�LockableFiles.lock_write�s���"�?�?����#�%�T�-A�-A�-C�-M�-M�-O�-O��*�*�4�0�0��J�J�%�%�e�,�����!���(�(�(�"�j�j�3�3�%�3�@�O�!�D�O� �D���'�'�)�$3�!�"�"r'c�*�UR(aJURS;a$[SRUR55eU=RS-
slgURR5 SUlSUlUR
5 g)N)�rrPzinvalid lock mode {!r}rrZ)r�
ValueErrorr0rr�	lock_read�_set_read_transactionr,s r$r\�LockableFiles.lock_read�sl���?�?����j�0� �!9�!@�!@����!Q�R�R�����!���J�J� � �"�!�D�O� �D���&�&�(r'c��UR[R"55 UR5R	S5 g)zSetup a read transaction.i�N)�_set_transactionr�ReadOnlyTransactionrQ�set_cache_sizer,s r$r]�#LockableFiles._set_read_transaction�s0�����l�>�>�@�A�����-�-�d�3r'c�L�UR[R"55 g)zSetup a write transaction.N)r`r�WriteTransactionr,s r$rV�$LockableFiles._set_write_transaction�s�����l�;�;�=�>r'c�6�UR(d[R"U5$URS:�aU=RS-slgUR	5 UR
R
5 SUlSUlg!SUlSUlf=f)Nrr)rr�cant_unlock_not_heldr�_finish_transactionr�unlockr,s r$rj�LockableFiles.unlock�s~������,�,�T�2�2����a������!��
�$�$�&�
'��
�
�!�!�#�#$�� �"&����$%�� �"&���s�B�Bc� �URS:�$)z2Return true if this LockableFiles group is locked.r)rr,s r$�	is_locked�LockableFiles.is_locked�s�����1�$�$r'c�\�URR5SL$![a gf=f)z�Return physical lock status.

Returns true if a lock is held on the transport. If no lock is held, or
the underlying locking mechanism does not support querying lock
status, false is returned.
NF)r�peek�NotImplementedErrorr,s r$�get_physical_lock_status�&LockableFiles.get_physical_lock_status�s/��	��:�:�?�?�$�D�0�0��"�	��	�s��
+�+c�^�URc[R"5$UR$)z�Return the current active transaction.

If no transaction is active, this returns a passthrough object
for which all data is immediately flushed and no caching happens.
)rr�PassThroughTransactionr,s r$rQ�LockableFiles.get_transaction�s+�����$��6�6�8�8��$�$�$r'c�t�URb%[R"SRU55eXlg)zSet a new active transaction.Nz&Branch {} is in a transaction already.)rr�	LockErrorr0)r"�new_transactions  r$r`�LockableFiles._set_transaction�s7�����(��"�"�8�?�?��E��
�,�r'c��URc%[R"SRU55eURnSUlUR	5 g)zExit the current transaction.Nz!Branch {} is not in a transaction)rrrxr0�finish)r"�transactions  r$ri�!LockableFiles._finish_transaction�sJ�����$��"�"�#F�#M�#M�d�#S�T�T��'�'�� ������r')
r!rrrrrrrrr)rN�N))r2�
__module__�__qualname__�__firstlineno__�__doc__�int�__annotations__r�strr�	LockTokenr�Transactionr�type�Lockr%r-r3r7r:rrrIrLrUr\r]rVr
r�LockNotHeld�
LockBrokenrj�boolrmrrrQr`ri�__static_attributes__�r'r$r
r
s:���*����
���t�~�~�.�.��<�3�3�4�4�B�"�B�/2�B�@D�T�Y�Y��B�	
�B�4/�K�T� �-�C�-�C�-�7�,$�)�
15�#��d�n�n�-�#�	�$�.�.�	!�#�@
)�4�?���#�#�V�%6�%6�7�'�8�'�%�4�%�
�$�
�	%��!9�!9�	%�,�r'r
c�h�\rSrSrSrS\S\4SjrSrSr	Sr
SS
jrSrSr
S
rSSjrSrSrg	)�
TransportLock�aLocking method which uses transport-dependent locks.

On the local filesystem these transform into OS-managed locks.

These do not guard against concurrent access via different
transports.

This is suitable for use only in WorkingTrees (which are at present
always local).
r�escaped_namec�4�XlX lX0lX@lgr)r�
_escaped_name�_file_modebits�
_dir_modebits)r"rr�rrs     r$r%�TransportLock.__init__s��$��)��+��)�r'c�,�[UR5er)rqr:r,s r$r:�TransportLock.break_locks��!�$�/�/�2�2r'c�,�[UR5er)rqrIr,s r$rI�TransportLock.leave_in_places��!�$�"5�"5�6�6r'c�,�[UR5er)rqrLr,s r$rL�!TransportLock.dont_leave_in_places��!�$�":�":�;�;r'Nc��Ub[R"U5eURRUR5Ulgr)r�TokenLockingNotSupportedrrUr�r�r"rNs  r$rU�TransportLock.lock_writes5�����1�1�$�7�7��_�_�/�/��0B�0B�C��
r'c�X�URRUR5Ulgr)rr\r�rr,s r$r\�TransportLock.lock_reads���_�_�.�.�t�/A�/A�B��
r'c�F�URR5 SUlgr)rrjr,s r$rj�TransportLock.unlocks���
�
������
r'c��[5er)rqr,s r$rp�TransportLock.peek!s��!�#�#r'c�b�URRURSURS9 g)zCreate lock mechanism.r'r)N)r�	put_bytesr�r�)r"r*s  r$r+�TransportLock.create$s)��	
���!�!�$�"4�"4�c��@S�@S�!�Tr'c�6�Ub[R"U5egr)rr�r�s  r$rT�TransportLock.validate_token)s�����1�1�$�7�7�r')r�r�r�rrr)r2r�r�r�r�rr�r%r:rIrLrUr\rjrpr+rTr�r�r'r$r�r��sL��	�*�"�*�25�*�3�7�<�D�
C��$�U�
8r'r�N)�typingrr>rrrrr	�
decoratorsr
rrr
r�r�r'r$�<module>r�s-��"�@�@�#� �]�]�@38�38r'

Youez - 2016 - github.com/yon3zu
LinuXploit