403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/breezy/bzr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g1+��d�SrSSKrSSKrSSKrSSKJrJrJrJr SSKJ	r
 SrSrSr
"SS	5rg)
s### bzr hashcache v5
�N�)�
atomicfile�errors�osutils�trace)�filters��c�f�\rSrSrSrSrSSjrSrSrSr	SS	jr
S
rSrSr
S
rSSjrSrg)�	HashCache�+aCache for looking up file SHA-1.

Files are considered to match the cached value if the fingerprint
of the file has not changed.  This includes its mtime, ctime,
device number, inode number, and size.  This should catch
modifications or replacement of the file by a new one.

This may not catch modifications that do not change the file's
size and that occur within the resolution window of the
timestamps.  To handle this we specifically do not cache files
which have changed since the start of the present second, since
they could undetectably change again.

This scheme may fail if the machine's clock steps backwards.
Don't do that.

This does not canonicalize the paths passed in; that should be
done by the caller.

_cache
    Indexed by path, points to a two-tuple of the SHA-1 of the file.
    and its fingerprint.

stat_count
    number of times files have been statted

hit_count
    number of times files have been retrieved from the cache, avoiding a
    re-read

miss_count
    number of misses (times files have been completely re-read)
FNc���[U[5(d[S5eXlSUlSUlSUlSUlSUlSUl	0Ul
X0lX lX@l
g)a!Create a hash cache in base dir, and set the file mode to mode.

:param content_filter_stack_provider: a function that takes a
    path (relative to the top of the tree) and a file-id as
    parameters and returns a stack of ContentFilters.
    If None, no content filtering is performed.
z#Base dir for hashcache must be textrN)�
isinstance�str�
ValueError�root�	hit_count�
miss_count�
stat_count�danger_count�
removed_count�update_count�_cache�_mode�_cache_file_name�_filter_provider)�selfr�cache_file_name�mode�content_filter_stack_providers     �6/usr/lib/python3/dist-packages/breezy/bzr/hashcache.py�__init__�HashCache.__init__Psg���$��$�$��B�C�C��	�����������������������
� /�� =��c��UR$�N)r�rs r!r�HashCache.cache_file_namehs���$�$�$r$c�D�UR(aSUl0Ulgg)zCDiscard all cached information.

This does not reset the counters.
TN)r�needs_writer's r!�clear�HashCache.clearks��
�;�;�#�D���D�K�r$c�d�Sn[URR5US9H�up#[R"UR
U5nUR
U5nU=RS-
slU(aUSU:wdM^U=RS-
slSUl	URU	M� g)z�Scan all files and remove entries where the cache entry is obsolete.

Obsolete entries are those where the file has been modified or deleted
since the entry was inserted.
c��USSS$)Nr	��)�path_and_caches r!�inode_order�#HashCache.scan.<locals>.inode_order|s��!�!�$�Q�'��*�*r$)�keyr	TN)
�sortedr�itemsr�pathjoinr�_fingerprintrrr*)rr2�path�	cache_val�abspath�fps      r!�scan�HashCache.scants���	+� &�d�k�k�&7�&7�&9�{�K�O�D��&�&�t�y�y�$�7�G��"�"�7�+�B��O�O�q� �O���1���+��"�"�a�'�"�#'�� ��K�K��%� Lr$c��[R"URU5nU=RS-
slUR	X25nU(d9XR
;a)U=RS-
slSUlUR
U	gXR
;aUR
UupVOSupVXd:XaU=RS-
slU$U=RS-
sl	U[n[R"U5(a1URc/nOURUS9nURX85n	O|[R"U5(a<[R "U5n
[R""U
R%S55n	O%[&R("SR+X755eUR-5nU[.U:�d
U[0U:�aGU=R2S-
slU(a)U=RS-
slSUlUR
U	U	$U=R4S-
slSUlX�4UR
U'U	$)zReturn the sha1 of a file.r	TN�NN)r9zUTF-8z'file {!r}: unknown file stat mode: {:o})rr7rrr8rrr*rr�FP_MODE_COLUMN�stat�S_ISREGr�_really_sha1_file�S_ISLNK�readlink�
sha_string�encoder�BzrError�format�_cutoff_time�FP_MTIME_COLUMN�FP_CTIME_COLUMNrr)rr9�
stat_valuer;�file_fp�
cache_sha1�cache_fprr�digest�target�cutoffs            r!�get_sha1�HashCache.get_sha1�s����"�"�4�9�9�d�3�����1����#�#�G�8����{�{�"��"�"�a�'�"�#'�� ��K�K��%���;�;��#'�;�;�t�#4� �J��#-� �J����N�N�a��N������1����~�&���<�<�����$�$�,����/�/�T�/�:���+�+�G�=�F�
�\�\�$�
�
��%�%�g�.�F��'�'��
�
�g�(>�?�F��/�/�9�@�@��O��
��"�"�$���?�#�v�-���1I�V�1S�
����"����"�"�a�'�"�#'�� ��K�K��%��
�
����"��#�D��!'� 1�D�K�K����
r$c�4�[R"X5S$)z6Calculate the SHA1 of a file by reading the full text.r	)�_mod_filters�internal_size_sha_file_byname)rr;rs   r!rD�HashCache._really_sha1_file�s���9�9�'�K�A�N�Nr$c���[R"UR5SURS9nUR	[
5 URR5Heup#URS5SUSS/nURSUS-5 URS	5 UR	S
RU55 Mg SUlSSS5 g!,(df   g=f)
z Write contents of cache to file.�wb)�new_mode�utf-8�// r� s%d %d %d %d %d %dr	�
r$FN)r�
AtomicFilerr�write�CACHE_HEADERrr6rH�append�joinr*)r�outfr9�c�	line_infos     r!rc�HashCache.write�s���
�
"�
"�� � �"�D�4�:�:�
�
��J�J�|�$��;�;�,�,�.���!�[�[��1�6�1�Q�4��F�	�� � �!5��!��!<�=�� � ��'��
�
�3�8�8�I�.�/�	/�
 %�D��
�
�
�s�B C�
C&c
���0UlUR5n[USSS9nU UR5nU[:wa([R
"SU5 SUlSSS5 gUGHnURS5nUSURS	5nXpR;a'[R"S
RU55 M_US-
nXVSRS5n[U5S
:wa'[R"SRU55 M�USn	[U	5S:wa'[R"SRU	55 M�[![#[$USS55n
X�4URU'GM SSS5 SUlg![a2n[R
"SU[
U55 SUlSnAgSnAff=f!,(df   NU=f)z�Reinstate cache from file.

Overwrites existing cache.

If the cache file has the wrong version marker, this just clears
the cache.
�rbi�)�	bufferingzfailed to open %s: %sTNz<cache header marker not found at top of %s; discarding cacher_r^zduplicated path {!r} in cacher/r`�zbad line in hashcache: {!r}r�(zbad sha1 in hashcache: {!r}r	F)rr�open�OSErrorr�mutterrr*�readlinerd�index�decode�warningrJ�split�len�tuple�map�int)r�fn�inf�e�hdr�l�posr9�fields�sha1r<s           r!�read�HashCache.read�s������
�
!�
!�
#��	��r�4�5�1�C���,�,�.�C��l�"����R���$(�� ���S����g�g�f�o����#�w�~�~�g�.���;�;�&��M�M�"A�"H�"H��"N�O���q����4����t�,���v�;�!�#��M�M�"?�"F�"F�q�"I�J���a�y���t�9��?��M�M�"?�"F�"F�t�"L�M���3�s�F�1�2�J�/�0��%)�J����D�!�)��@!����M�	��L�L�0�"�c�!�f�=�#�D����		���S�s)�F�:G�)DG�
G�(G�G�
G!c�D�[[R"55S-
$)z�Return cutoff time.

Files modified more recently than this time are at risk of being
undetectably modified and so can't be cached.
r/)r{�timer's r!rK�HashCache._cutoff_times���4�9�9�;��!�#�#r$c�N�Uc[R"U5n[R"UR
5(agUR[UR5[UR5URURUR
4$![a gf=fr&)�os�lstatrqrB�S_ISDIR�st_mode�st_sizer{�st_mtime�st_ctime�st_ino�st_dev)rr;rNs   r!r8�HashCache._fingerprint#s�����
��X�X�g�.�
��<�<�
�*�*�+�+��
����
�#�#�$��
�#�#�$����������

�	
���
��
�s�B�
B$�#B$)rrrrrrrr*rrrrr@r&)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r*r"rr+r=rUrDrcr�rKr8�__static_attributes__r0r$r!rr+sL�� �D�K�OS�>�0%��&�,D�LO�%�$3!�j$�
r$r)rdr�rBr��rrrrrrXrLrMrArr0r$r!�<module>r�s9��:)��	���1�1�&�������J
�J
r$

Youez - 2016 - github.com/yon3zu
LinuXploit