403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
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/usr/lib/python3/dist-packages/hgext/remotefilelog/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/usr/lib/python3/dist-packages/hgext/remotefilelog/__pycache__/basestore.cpython-313.pyc
�

6�h�=���SSKJr SSKrSSKrSSKrSSKrSSKJr SSKJ	r	J
r
 SSKJrJ
r
Jr SSKJr SSKJrJr "S	S
5r"SS5rg)
�)�annotationsN)�_)�bin�hex)�error�pycompat�util)�hashutil�)�	constants�shallowutilc�|�\rSrSrSSjrSrSSjrSrSrSr	S	r
S
rSrSr
S
rSrSrSrSrSrSrg)�	basestore�c���XlURUlX lX0lX@l[
R(d[R"5OSUl	URRSS5UlURRSSS5UlURS;aSUlURS:XaSUlU(a"[R"URU5 gg)	auCreates a remotefilelog store object for the given repo name.

`path` - The file path where this store keeps its data
`reponame` - The name of the repo. This is used to partition data from
many repos.
`shared` - True if this store is a shared cache of data from the central
server, for many repos on this machine. False means this store is for
the local data for one repo.
N�
remotefilelogsvalidatecachelogs
validatecache�on)r�strict�offrF)�repo�ui�_path�	_reponame�_sharedr�	iswindows�os�getuid�_uid�config�_validatecachelog�_validatecacher
�mkstickygroupdir)�selfr�path�reponame�shareds     �?/usr/lib/python3/dist-packages/hgext/remotefilelog/basestore.py�__init__�basestore.__init__s����	��'�'����
�!����'/�'9�'9�B�I�I�K�t��	�!%������1�"
���#�g�g�n�n��.��
������&@�@�"'�D�����&�(�"'�D����(�(����$�7��c��/nUH�up4URX45n[RRU5nU(a)URS:XaURUS5(dSnU(aMnUR
X445 M� U$)NrscontainsF)�_getfilepathrr$�existsr!�_validatekey�append)r#�keys�missing�name�node�filepathr-s       r'�
getmissing�basestore.getmissing6sx�����J�D��(�(��4�H��W�W�^�^�H�-�F���'�'�9�4��)�)�(�K�@�@����6�����|�,���r*Nc��U(a%UR[R5(agUR(aGUR	5H2up4UH'nURXU5 UR
XU5 M) M4 gg�N)�getr�OPTION_PACKSONLYr�	_getfiles�
markdataentry�markhistoryentry)r#�ledger�options�filename�nodesr3s      r'�
markledger�basestore.markledgerHse���w�{�{�9�#=�#=�>�>���<�<�#'�>�>�#3���!�D��(�(���>��+�+�D�D�A�"�$4�r*c��URnURRU/5nSnUR[	S5S[U5S9nUH�nUR(d"UR(a^UR(aMURU5 URURUR5n[R"U5 US-
nM� UR5 UR!UR#55 g)Nrscleaning up�files��unit�totalr)r�sourcesr9�makeprogressr�len�gced�datarepacked�historyrepacked�updater,r@r3r	�	tryunlink�complete�_cleanupdirectory�_getrepocachepath)r#r>r�entries�count�progress�entryr$s        r'�cleanup�basestore.cleanupQs���
�W�W���.�.�$�$�T�2�.�����?�?�
�n��H�C��L�#�
���E��z�z�e�0�0�U�5J�5J�����&��(�(�������D�����t�$��Q�J�E��	����	
���t�5�5�7�8r*c��[5n[5n[RRU5H�upE[R
"U5(aI[RRX5nURU5 [R"U5 Mi[R"U5(dM�URS5(aURUSS5 M�URU5 M� X#-
H;n[RRXS-5n[R"U5 M= g![a GMf=f)z�Removes the empty directories and unnecessary files within the root
directory recursively. Note that this method does not remove the root
directory itself.�_oldN���)�setr	�osutil�listdir�stat�S_ISDIRrr$�joinrR�rmdir�OSError�S_ISREG�endswith�addrP)	r#�rootdir�oldfiles�
otherfilesr2�mode�dirpathr@r4s	         r'rR�basestore._cleanupdirectoryes���
�5���U�
��+�+�-�-�g�6�J�D��|�|�D�!�!��'�'�,�,�w�5���&�&�w�/���H�H�W�%����d�#�#��=�=��)�)��L�L��c�r��+��N�N�4�(�!7�*!�-�H��w�w�|�|�G��-?�@�H��N�N�8�$�.������s�D?�?
E�
Ec#�# �0nUR5H&up#URU/5RU5 M( URUR	55nUR5H
upVXQU4v� M g7f)aReturn a list of (filename, [node,...]) for all the revisions that
exist in the store.

This is useful for obtaining a list of all the contents of the store
when performing a repack to another store, since the store API requires
name+node keys and not namehash+node keys.
N)�	_listkeys�
setdefaultr/�_resolvefilenamesr0�items)r#�existing�filenamehashr3�filenamemapr@�shas       r'r;�basestore._getfiles�su�����"&�.�.�"2��L�����b�1�8�8��>�#3��,�,�X�]�]�_�=��(�.�.�0�M�H��c�]�+�+�1�s�A>Bc�h�U(d0$0n[U5nURSR5HCn[R"U5R5nXS;dM.XRU'UR
U5 ME URR5Rn[[U5S-
SS5HvnU(d U$URURU55nUHCn[R"U5R5nXS;dM.XRU'UR
U5 ME Mx U$)z�Given a list of filename hashes that are present in the
remotefilelog store, return a mapping from filename->hash.

This is useful when converting remotefilelog blobs into other storage
formats.
stipr���)
r]r�manifestr
�sha1�digest�discard�
unfiltered�	changelog�rangerK�	readfilesr3)	r#�hashes�	filenames�missingfilenamer@rv�cl�rev�filess	         r'rq�basestore._resolvefilenames�s����I��	��f�+���	�	�&�)�2�2�4�H��-�-��)�0�0�2�C��%�&)�(�#��'�'��,�	5��Y�Y�
!�
!�
#�
-�
-����R��1��b�"�-�C�"�����L�L������.�E�!���m�m�H�-�4�4�6���)�*-�h�'�#�+�+�C�0�	"�	.��r*c��UR(a4[RRURUR
5$UR$r8)rrr$rbrr)r#s r'rS�basestore._getrepocachepath�s:���|�|�
�G�G�L�L����T�^�^�4�	
����	
r*c#�# �[R"UR55H\upnUHPn[U5S:waMUnUR(aUSSUSS-nOUSSn[U5[U54v� MR M^ g7f)zzList all the remotefilelog keys that exist in the store.

Returns a iterator of (filename hash, filecontent hash) tuples.
�(i���i���i���Ni���)r�walkrSrKrr)r#�root�dirsr�r@r3rts       r'ro�basestore._listkeys�s����"$����)?�)?�)A�!B��D��!���x�=�B�&�����<�<�#'��C�=�4���:�#=�L�#'���:�L��<�(�#�d�)�4�4�"�"C�s�BBc��[U5nUR(a"[R"URX5nO[R
"X5n[RRURU5$r8)
rrr
�getcachekeyr�getlocalkeyrr$rbr)r#r2r3�keys    r'r,�basestore._getfilepath�sQ���4�y���<�<��)�)�$�.�.�$�E�C��)�)�$�5�C��w�w�|�|�D�J�J��,�,r*c	���URX5n[R"U5nUR(a�UR	XC5(dkUR
(a3[
UR
S5nURSU-5 SSS5 [R"X3S-5 [SU-5eU$!,(df   N7=f![a [SX1[U54-5ef=f)N�ab+scorrupt %s during read
�.corruptscorrupt local cache file %ssno file found at %s for %s:%s)
r,r
�readfiler!�
_validatedatar �open�writer�rename�KeyErrorrdr)r#r2r3r4�data�fs      r'�_getdata�basestore._getdata�s����$�$�T�0��	��'�'��1�D��"�"�4�+=�+=�d�+M�+M��)�)��d�4�4�e�<����� ;�h� F�G�=��	�	�(�{�$:�;��=��H�I�I���=�<���	��0�H�C��I�3N�N��
�	�s$�A$C�7B=�/C�=
C�C�$C2c���URX5n[R"S5n[RR	U5(aUUS-n[RR	U5(a[
R"U5 [R"XF5 [
R"UR[RRU55 [
R"XCSS9 UR(a9URUS5(d"[R "[#S5U-5e[R"U5 g![R"U5 f=f)N�r[T)�readonlyswrites"local cache write was corrupted %s)r,r�umaskr$r-r
�
unlinkfile�shutil�copyr"r�dirname�	writefiler!r.r�Abortr)r#r2r3r�r4�oldumask�newfilenames       r'�addremotefilelognode�basestore.addremotefilelognode�s����$�$�T�0���8�8�E�?��	��w�w�~�~�h�'�'�&��0���7�7�>�>�+�.�.��*�*�;�7����H�2��(�(����"�'�'�/�/�(�2K�L��!�!�(�4�@��"�"��(�(��8�<�<��+�+��?�@�8�K���
�H�H�X���B�H�H�X��s�DE�E.c��[RRURS5n[	US5nUR[RR
U5S-5 SSS5 [R"U5nURUR:Xa[R"US5 gg!,(df   NW=f)z�Call this to add the given repo path to the store's list of
repositories that are using it. This is useful later when doing garbage
collection, since it allows us to insecpt the repos to see what nodes
they want to be kept alive in the store.
�repos�ab�
Ni�)rr$rbrr�r�r�r`�st_uidr�chmod)r#r$�	repospath�	reposfile�
repospathstats     r'�markrepo�basestore.markrepos����G�G�L�L����X�6�	�
�)�T�
"�i��O�O�B�G�G�O�O�D�1�E�9�:�#����	�*�
����4�9�9�,��H�H�Y��'�-�	#�
"�s�2B:�:
Cc�~�[US5nUR5nSSS5 URWU5(agUR(a4[URS5nUR	SX4-5 SSS5 [
R"XS-5 g!,(df   N�=f!,(df   N9=f)N�rbTr�scorrupt %s during %s
r�F)r��readr�r r�rr�)r#r$�actionr�r�s     r'r.�basestore._validatekeys���
�$��
���6�6�8�D�����d�D�)�)���!�!��d�,�,�e�4�����1�T�N�B�C�5�	�	�	�$�{�*�+���
��5�4�s�B�%B.�
B+�.
B<c�*�[U5S:�ab[R"U5up4n[U5U::agX4-
nXUS-n[RRU5[
U5:Xaggg![[R4a gf=f)NrF�T)	rKr
�parsesizeflagsrr$�basenamer�
ValueError�BadRemotefilelogHeader)r#r�r$�offset�size�flags�datanodes       r'r��basestore._validatedata#s���	��4�y�1�}�&1�&@�&@��&F�#��e��t�9��$� ������"��5���7�7�#�#�D�)�S��]�:����&���K�>�>�?�	���	�s�7A5�7A5�5B�Bc	��URnURn[RR	5nSnSnSnSn[
R
"5S-
n	UR
[S5SS9n
U
RS5 [R"U5H�up�n
U
H�nUS:XaMSU;aMU
RU5 [RRX�5n[RRX�5nUS-
n[R"U5nUUR"-
nUU;dUR$U	:�a/UR'UR$UU45 UUR"-
nM�[(R*"U5 US-
nM� M� U
R-5 UR/S
S5n	Xi:�a�Xi-
nUR
[S5S
US9n
SnU(a~Xi:�ayUS:�asU
RU5 UR15unnn[(R*"U5 UUR"-nUS-
nUUR"-
nU(a
Xi:�aUS:�aMsU
R-5 UR3[S5UU[5U5S-S-S-[5U5S-S-S-4-5 g![a$ [S	5nUR!UU-5 GMEf=f![a$ [S	5nUR!UU-5 GMvf=f![a# [S	5nUR!UU-5 GNf=f)Nri�Qsremoving unnecessary filesrE)rGr�s/packs/rs0warning: file %s was removed by another process
rs
cachelimitsenforcing cache limitsbytesrFs8finished: removed %d of %d files (%0.2f GB to %0.2f GB)
g�@)rrr�queue�
PriorityQueue�timerJrrOrr�r$rb�relpathr`�FileNotFoundError�warn�st_size�st_atime�putr
r�rQ�configbytesr9�status�float)r#�keepkeysr�	cachepathr��originalsizer�rU�removed�limitrVr�r�r��filer$r��pathstat�msg�excess�
removedexcess�atime�oldpath�oldpathstats                        r'�gc�basestore.gc:s1��
�W�W���J�J�	����,�,�.�����������	�	��|�,���?�?�
�+�,�8�#�
��	�����!#����!3��D�����8�#����%������&��w�w�|�|�D�/���g�g�o�o�d�6����
���!�w�w�t�}�H��� 0� 0�0���(�?�h�&7�&7�%�&?��I�I�x�0�0�$��A�B��H�,�,�,�D�!�#�.�.�t�4��q�L�G�I�"4�L	�������/��?���<��\�F�����*�+�(�&�'��H��M��D�L�T�A�X����
�.�.3�i�i�k�+��w��+��*�*�7�3���+�+�+���1�����!4�!4�4�
��D�L�T�A�X�
����
�	�	�
�J�K����l�#�f�,�v�5��>��d��f�$�v�-��6�	�
�	
��a)���L��C��G�G�C�$�J�'����-�!��)�������d�
�+� �
!��.)�+��L��C��G�G�C�'�M�*�	+�s6�J7�2K(�L�7)K%�$K%�()L�L�)M�M)rrrrr!r rr)Fr8)�__name__�
__module__�__qualname__�__firstlineno__r(r5rBrXrRr;rqrSror,r�r�r�r.r�r��__static_attributes__�r*r'rrsV��8�>�$B�9�( %�D,�" �D
�5�$-��"�4(���.Y
r*rc�0�\rSrSrSrSr\S5rSrg)�baseunionstorei�c�f�URSS5S-UlURSS5Ulg)N�
numretriesrr�retrylog)r9�numattemptsr�)r#�args�kwargss   r'r(�baseunionstore.__init__�s0��
"�:�:�l�A�6��:����
�
�:�t�4��
r*c�p�URH&n[US5(dMUR5 M( g)N�markforrefresh)�stores�hasattrr�)r#�stores  r'r��baseunionstore.markforrefresh�s*���[�[�E��u�.�/�/��$�$�&�!r*c�^^�SmUU4SjnU$)Nc��gr8r�)r�s r'�noop�&baseunionstore.retriable.<locals>.noop�s��r*c�>�UR=(d TnTRnSnXPR:aIUS:�a1U"SU[R"U54-5 UR5 US-
nT"U/UQ70UD6$g![a2 XPR:Xa U"S[R"U5-5 eOf=fXPR:aM�g)Nrsre-attempting (n=%d) %s
rs*retries exhausted in %s, raising KeyError
)r�r�r�r�sysbytesr�r�)r#r�r�r��funcname�i�fnr�s      ��r'�wrapped�)baseunionstore.retriable.<locals>.wrapped�s�����}�}�,��H��{�{�H��A��&�&�&��q�5��4��h�/�/��9�:�;���'�'�)��Q���	��d�4�T�4�V�4�4�'�� ���,�,�,� �J�&�/�/��9�:���
-����&�&�&s�1A>�>9B:�9B:r�)rrr�s` @r'�	retriable�baseunionstore.retriable�s���	�	�.�r*)r�r�N)	r�r�r�r�r(r��staticmethodrr�r�r*r'r�r��s ��5�'�
���r*r�)�
__future__rrr�r`r��mercurial.i18nr�mercurial.noderr�	mercurialrrr	�mercurial.utilsr
�rr
rr�r�r*r'�<module>rsE��"�	�
����#���
%��}
�}
�@,�,r*

Youez - 2016 - github.com/yon3zu
LinuXploit