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__/shallowutil.cpython-313.pyc
�

6�hp;���SSKJr SSKrSSKrSSKrSSKrSSKrSSKJr SSK	J
r
 SSKJrJ
r
JrJr SSKJrJrJr SSKJr \
R,(dSSKrS	rS
rSrS.SjrS
rSrS/SjrSrSr Sr!Sr"Sr#Sr$\RJ\&\&4\RN\&\&40r(Sr)Sr*Sr+Sr,"SS\RZ5r.Sr/S0Sjr0Sr1Sr2S r3S!r4S.S"jr5S#r6S$r7S%r8S&r9S'r:S(r;S)r<S0S*jr=S+r>S,r?S-r@g)1�)�annotationsN)�_)�hex)�error�pycompat�revlog�util)�hashutil�storageutil�
stringutil�)�	constantsc�<�[RUR;$)z>returns whether the repository is remotefilelog enabled or not)r�SHALLOWREPO_REQUIREMENT�requirements)�repos �A/usr/lib/python3/dist-packages/hgext/remotefilelog/shallowutil.py�	isenabledr#s���,�,��0A�0A�A�A�c��[[R"U5R55n[R
R
XSSUSSU5$)N��rr
�sha1�digest�os�path�join)�reponame�file�id�pathhashs    r�getcachekeyr"(sA���8�=�=��&�-�-�/�0�H�
�7�7�<�<��2�A�,�����b�A�Arc��[[R"U5R55n[R
R
X!5$�Nr)rr r!s   r�getlocalkeyr%-s1���8�=�=��&�-�-�/�0�H�
�7�7�<�<��%�%rc��URSS5nU(d'U(ag[R"[S55e[R
"U5$)N�
remotefilelogs	cachepaths4could not find config option remotefilelog.cachepath)�configr�Abortrr	�
expandpath)�ui�
allowempty�	cachepaths   r�getcachepathr.2sG���	�	�*�L�9�I�����+�+��I�J��
��?�?�9�%�%rc��[UR5nU[R:wa+[R
R
X RSU5$[R
R
X RS5$�Nspacks)r.r+r�FILEPACK_CATEGORYrrr�name)r�categoryr-s   r�getcachepackpathr4>sR���T�W�W�%�I��9�.�.�.��w�w�|�|�I�y�y�(�H�E�E��w�w�|�|�I�y�y�(�;�;rc�D�[RRUSU5$r0)rrr)�baser3s  r�getlocalpackpathr7Fs��
�7�7�<�<��h��1�1rc��0nU(dURS5(a%U(aXS'X#S'[R"X05nU$)zJreturns a string that matches the revlog contents in a
traditional revlog
�
scopyscopyrev)�
startswithr�packmeta)�text�copyfrom�copyrev�metas    r�createrevlogtextr@JsA���D��4�?�?�7�+�+��$��M�&����#�#�D�/���Krc��[R"U5upURS5(aURSS5nXS-SnU=(d 0U4$)z parse mercurial filelog metadatar9rN)r�	parsemetar:�index)r<r?�size�ss    rrBrBXsO���&�&�t�,�J�D����w����J�J�w��"����E�G�}���:�2�t��rc��[R"[5nUH(nUR5Hup4X==U-
ss'M M* U$)z�Adds all the values of *dicts together into one dictionary. This assumes
the values in *dicts are all summable.

e.g. [{'a': 4', 'b': 2}, {'b': 3, 'c': 1}] -> {'a': 4, 'b': 5, 'c': 1}
)�collections�defaultdict�int�items)�dicts�result�dict�k�vs     r�sumdictsrPasB���
$�
$�S�
)�F����J�J�L�D�A��I��N�I�!���Mrc�H�0nUR5Hup4XBX-'M
 U$)z;Returns ``dict`` with ``prefix`` prepended to all its keys.)rJ)rM�prefixrLrNrOs     r�
prefixkeysrSns(��
�F��
�
�����v�z����Mrc���UVs/sHo3R5PM nn[[U6US-5nUR"US-S40[R
"U5D6 gs snf)N�_s
_packsizes�
)�
getmetricsrSrP�logr�	strkwargs)r+rR�storesrErKrMs      r�reportpackmetricsr[vsW��%+�,�V��\�\�^�V�E�,��h��&���
�6�D��F�F�6�M�!�5�E�H�,>�,>�t�,D�E��
-s�A!c��0nSn[U5nX2-
S:�aVXUS-nUS-
n[R"SX5SnUS-
nX%-U:�a[S5eXX%-nXaU'X%-
nX2-
S:�aMVX#:wa[S5eU$)aparse datapack meta, bytes (<metadata-list>) -> dict

The dict contains raw content - both keys and values are strings.
Upper-level business may want to convert some of them to other types like
integers, on their own.

raise ValueError if the data is corrupted
r�r
�!Hrs%corrupted metadata: incomplete buffers"corrupted metadata: redundant data)�len�struct�unpack_from�
ValueError)�metabuf�metadict�offset�buflen�key�metalen�values       r�_parsepackmetarj|s����H�
�F�
��\�F�
�/�Q�
��v��z�*���!����$�$�U�G�<�Q�?���!�����f�$��E�F�F���!1�2����
�����/�Q�
����>�?�?��Orc�R�Sn[U=(d 0R55H~up#[U5S:wa[R"SU-5e[U5S:�a[S[U5-5eX-
nU[R"S[U55-
nX-
nM� U$)aVreverse of _parsepackmeta, dict -> bytes (<metadata-list>)

The dict contains raw content - both keys and values are strings.
Upper-level business may want to serialize some of other types (like
integers) to strings before calling this function.

raise ProgrammingError when metadata key is illegal, or ValueError if
length limit is exceeded
rr
spackmeta: illegal key: %si��s)metadata value is too long: 0x%x > 0xfffer^)�sortedrJr_r�ProgrammingErrorrbr`�pack)rdrcrNrOs    r�_buildpackmetaro�s����G����B�-�-�/�0����q�6�Q�;��(�(�)E��)I�J�J��q�6�F�?��<�s�1�v�E��
�	����6�;�;�u�c�!�f�-�-�����1��Nrc�R�0nU=(d 0R5H~up#[RU[45n[	X45(d[
R"SU-5e[U;a'U[R:XaUS:XaMo[U5nX1U'M� [U5$)z�like _buildpackmeta, but typechecks metadict and normalize it.

This means, METAKEYSIZE and METAKEYSIZE should have integers as values,
and METAKEYFLAG will be dropped if its value is 0.
spackmeta: wrong type of key %sr)rJ�_metaitemtypes�get�bytes�
isinstancerrmrIr�METAKEYFLAG�int2binro)rd�newmetarNrO�expectedtypes     r�
buildpackmetary�s����G���R�&�&�(���%�)�)�!�e�X�6���!�*�*��(�(�)J�Q�)N�O�O��,���I�)�)�)�a�1�f����
�A���
�)��'�"�"rc��[U5nUR5H1up#U[;dM[[U;dM$[	U5X'M3 U$)z�like _parsepackmeta, but convert fields to desired types automatically.

This means, METAKEYFLAG and METAKEYSIZE fields will be converted to
integers.
)rjrJrqrI�bin2int)rcrdrNrOs    r�
parsepackmetar|�sG���g�&�H���� ������3�.��*;�#;�!�!�*�H�K�!��Orc�|�[5nUS:�a"URSUS-5 US-nUS:�aM"[U5$)z3convert a non-negative integer to raw binary bufferr��)�	bytearray�insertrs)�n�bufs  rrvrv�s@��
�+�C�
�a�%��
�
�1�a�$�h��	�a����a�%���:�rc�@�Sn[U5HnUS-nX-nM U$)z=the reverse of int2bin, convert a binary buffer to an integerrr)r�)r��x�bs   rr{r{�s,��	�A�
�s�^��	�a���	����
�Hrc��\rSrSrSrSrg)�BadRemotefilelogHeader��z@Exception raised when parsing a remotefilelog blob header fails.�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r�rrr�r��s��Jrr�c��[RnSnURS5nUSUnURS5(a�URS5(a�UR
S5H�nUR[R5(a'[U[[R5S5nMNUR[R5(dMt[U[[R5S5nM� O[	SU-5e[U5nUc[	S5eUS	-X!4$![a [	S5ef=f)
z�given a remotefilelog blob, return (headersize, rawtextsize, flags)

see remotefilelogserver.createfileblob for the format.
raise RuntimeError if the content is illformed.
N�s/unexpected remotefilelog header: illegal format�vsv1
rVs$unsupported remotefilelog header: %ss.unexpected remotefilelog header: no size foundr
)r�REVIDX_DEFAULT_FLAGSrCrbr�r:�splitr�METAKEYSIZErIr_ru)�raw�flagsrDrC�headerrEs      r�parsesizeflagsr��s6��
�'�'�E��D�
��	�	�%� ��
��%�[�F�
���������W�%�%��\�\�%�(���<�<�	� 5� 5�6�6��q��Y�%:�%:�!;�!=�>�?�D��\�\�)�"7�"7�8�8���#�i�&;�&;�"<�">� ?�@�E�	)�)�7�&�@��
�
�6�{���|�$�=�
�	
��1�9�d�!�!��1�
�$�>�
�	
�
�s�D3�3E	c��Uc[[U55nUS:Xa'S[RU[RU4-nU$US:Xa$U(a[
R"S5eSU-nU$[
R"SU-5e)z�return the header of a remotefilelog blob.

see remotefilelogserver.createfileblob for the format.
approximately the reverse of parsesizeflags.

version could be 0 or 1, or None (auto decide).
r
sv1
%s%d
%s%drs!fileblob v0 does not support flags%dsunknown fileblob version %d)rI�boolrr�rurrm)rDr��versionr�s    r�buildfileblobheaderr�s������d�5�k�"���!�|�"��!�!���!�!��	&
�
���M�

�A����(�(�)M�N�N������M��$�$�%C�g�%M�N�Nrc��[U5upnX-n0nU[U5:a]URSUS-5nXUS-nXS-US-nXS-US-n	XS-US-n
XS-UnX�X�4XW'US-nU[U5:aM]U$)Nr��P��(�<r
)r�r_rC)r�rerDr��start�mapping�divider�currentnode�p1�p2�linknoder=s            r�ancestormapr�/s���(��-��F�%��M�E��G�
�#�c�(�
��)�)�E�5�2�:�.���5�2�:�/��
�"�*����
-��
�"�*����
-����
�u�r�z�3����
�g�.�� "��;����!����#�c�(�
��Nrc��[R"U5nU(d$[R"U5 [	SU-5eU$)Nsempty file: %s)r	�readfiler�remove�OSError)rrLs  rr�r�Cs6��
�]�]�4�
 �F��
�	�	�$���'�$�.�/�/��Mrc��[R(a%[R"U[R
5 [R"U5 gr$)r�	iswindowsr�chmod�stat�S_IWUSR�unlink)�filepaths r�
unlinkfiler�Ns)�����
����4�<�<�(��I�I�h�rc�b�[R(a�[R"U[R
5 [RRU5(a;[R"U[R
5 [R"U5 [R"X5 gr$)
rr�rr�r�r�r�isfiler��rename)�source�destinations  r�
renamefiler�Us\�����	�������&�
�7�7�>�>�+�&�&��H�H�[�$�,�,�/��I�I�k�"��I�I�f�"rc��[RRU5up4[RRU5(d[R"U5 [R"SU-US9upV[R"U5 [R"US5nURU5 UR5 U(aSnO/[R"S5n	[R"U	5 U	)n[X`5 [R"X5 g![
a N�f=f![a [!U5 e!["a ef=ff=f)Ns.%s-)rR�dirswbi$r)rrr��exists�makedirs�FileExistsError�tempfile�mkstemp�closer	�	posixfile�write�umaskr�r��	Exceptionr�r�)
r�content�readonly�dirname�filename�fd�temp�f�mode�oldumasks
          r�	writefiler�as�����
�
�d�+��G�
�7�7�>�>�'�"�"�	��K�K�� ����w��'9�w�G�H�B��H�H�R�L���N�N�4��'��	�����	���	���D��x�x��{�H�
�H�H�X���9�D��4��
������/�	��	��0��	��t��	���	��
�	���sC�D!�BD1�!
D.�-D.�1
E�<E�E�
E�E�E�Ec�P�[U5n0n0n/nUH{nU"U5Vs/sHofU;dM
UPM nn[U5X5'UH,nURU[55RU5 M. U(aMjURU5 M} UR	5 /nU(auURS5nURU5 XR;aEX%n	U	H;n
X:nUR
U5 [U5S:XdM)URSU
5 M= U(aMuU$s snf)zQTopologically sorts the nodes, using the parentfunc to find
the parents of nodes.r)	�set�
setdefault�add�append�sort�popr�r_r�)�nodes�
parentfunc�childmap�	parentmap�rootsr��p�parents�results�children�c�childparentss            r�	sortnodesr��s
��
��J�E��H��I��E���(��m�:�m��E�z�1�m��:��7�|�	���A�����3�5�)�-�-�a�0���w��L�L��O�
�
�J�J�L��G�
��I�I�a�L�����q���=��{�H���(�|���#�#�A�&��|�$��)��L�L��A�&���%��N��1;s
�	D#�D#c��URU5n[U5U:a-[R"[	S5[U5U4-5eU$)z=read n bytes from stream.read and abort if less was availables5stream ended unexpectedly (got %d bytes, expected %d))�readr_rr)r)�streamr�rEs   r�readexactlyr��sK�����A��A�
�1�v��z��k�k�
�F�G��1�v�q�k�
�
�	
�
�Hrc�n�[U[R"U55n[R"X5$r$)r�r`�calcsize�unpack)r��fmt�datas   r�
readunpackr��s&���v�v���s�3�4�D��=�=��#�#rc��[U[R5n[R"[R
U5Sn[X5$�Nr)r�r�FILENAMESIZEr`r��FILENAMESTRUCT)r��rawlen�pathlens   r�readpathr��s:��
���!7�!7�
8�F��m�m�I�4�4�f�=�a�@�G��v�'�'rc#��# �[U[R5n[R"[R
U5Sn[
U5Hn[U[R5v� M! g7fr�)r�r�
NODECOUNTSIZEr`r��NODECOUNTSTRUCT�range�NODESIZE)r�r��	nodecount�is    r�readnodelistr��sT���
���!8�!8�
9�F��
�
�i�7�7��@��C�I�
�9�
���&�)�"4�"4�5�5��s�A2A4c#��# �[U[R5n[R"[R
U5Sn[
U5Hn[U5v� M g7fr�)r�r�
PATHCOUNTSIZEr`r��PATHCOUNTSTRUCTr�r�)r�r��	pathcountr�s    r�readpathlistr�sL���
���!8�!8�
9�F��
�
�i�7�7��@��C�I�
�9�
���v����s�A#A%c��[R"[R"U55RnU$![
a gf=fr$)�grp�getgrnamr�fsdecode�gr_gid�KeyError)�	groupname�gids  r�getgidr
�s=����l�l�8�,�,�Y�7�8�?�?���
������s�58�
A�Ac���Ucg[R"USU5 [R"US5 g![a+nU(aU"[	S5X4-5 SnAgSnAgSnAff=f)N����s unable to chown/chmod on %s: %s
)r�chownr�r�r)rr�warn�exs    r�setstickygroupdirr�s`��
�{��G�
����r�3��
����v����G����7�8�D�:�E�F�F���G�s�/6�
A+�A&�&A+c��SnURSS5nU(a+[U5nUcUR[S5U-5 Sn[R
"U5nU(a:URS-S:wdURU:wa[XUR5 g[R"S5nU/n[RRU5nU(a�[RRU5(d]URU5 [RRU5nU(a&[RRU5(dM][U5Hn[R "U5 M UHn[XUR5 M [R"U5 g![a GNnf=f!["a Mrf=f![R"U5 f=f)zeCreates the given directory (if it doesn't exist) and give it a
particular group with setgid enabled.Nr's
cachegroups!unable to resolve group name: %s
rr)r(r
rrrr�r��st_mode�st_gidrr�rr�r�r��reversed�mkdirr�)r+rrr�str��missingdirss       r�mkstickygroupdirr�s����C��	�	�*�M�:�I���Y����;��G�G�A�;�<�y�H�I�
�B�
�
�W�W�T�]��
��J�J���F�*�b�i�i�3�.>��d����1���x�x���H���f���w�w���t�$���2�7�7�>�>�$�/�/����t�$��7�7�?�?�4�(�D��2�7�7�>�>�$�/�/��[�)�D�
������*� �D��d����1� �	������7�
��
��*#�
��
��	�����sI�
G�8B(G#�"G#�1G�#G#�
G�G�
G �G#�G � G#�#G;c�l�[R"UR55$![a gf=f)N�unknown)r�	shortuser�usernamer�)r+s r�getusernamer!s0����#�#�B�K�K�M�2�2������s�#&�
3�3c�t�URSS5nU(a[RRU5$g)Nspathssdefaultr)r(rr�basename)r+rs  r�getreponamer$s-���y�y��:�.�H���w�w����)�)�r)F)NNr$)A�
__future__rrGrr�r`r��mercurial.i18nr�mercurial.noder�	mercurialrrrr	�mercurial.utilsr
rr�rr�rrr"r%r.r4r7r@rBrPrSr[rjrorurIr�rqryr|rvr{�StorageErrorr�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrr!r$r�rr�<module>r,s6��#��	��
��������
�����B�
B�
&�
	&�<�2���
��F��6�6���C��:�
���C��:���#�*
��
�K�U�/�/�K�""�J�6�(��	#�"�J"�J
�$�
(�6���G�)�X�r

Youez - 2016 - github.com/yon3zu
LinuXploit