403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/__pycache__/statichttprepo.cpython-39.opt-1.pyc
a

�+�b��@s�ddlmZddlZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZejZejZGdd	�d	e�ZGd
d�de�ZGdd
�d
ej�Zdd�Z Gdd�dej!�Z"Gdd�dej#ej$�Z%ddd�Z&dS)�)�absolute_importN�)�_)�sha1nodeconstants)�	branchmap�	changelog�error�	localrepo�manifest�
namespaces�pathutil�pycompat�requirements�url�util�vfs)�urlutilc@sNeZdZdd�Zdd�Zdd�Zdd�Zdd
d�Zdd
�Zdd�Z	dd�Z
d	S)�httprangereadercCs||_d|_||_||_dS)Nr)r�pos�opener�name)�selfrr�r�>/usr/lib64/python3.9/site-packages/mercurial/statichttprepo.py�__init__'szhttprangereader.__init__cCs|S�Nr�rrrr�	__enter__.szhttprangereader.__enter__cCs|��dSr)�close)r�exc_type�	exc_value�	tracebackrrr�__exit__1szhttprangereader.__exit__cCs
||_dSr)r)rrrrr�seek4szhttprangereader.seekNc	
Cs>t�t�|j��}d}|r(|j|d}|js2|rH|�dd|j|f�z|j�|�}|�	�}|j
}Wnxtjy�}z.|j
dkr�t
jp�d}t|t|���WYd}~n:d}~0tjy�}ztd|j��WYd}~n
d}~00|dk�r|�r||j|j|�}n||jd�}n|�r(|d|�}|jt|�7_|S)N�rZRangezbytes=%d-%si���)�urlreqZrequestr
ZstrurlrrZ
add_headerr�open�read�code�urlerrZ	httperror�errno�ENOENT�IOError�strZurlerror�reason�len)	r�bytes�req�end�f�datar)�instZnumrrrr(7s.

""
zhttprangereader.readcCs|���d�S)NT)r(�
splitlinesrrrr�	readlinesXszhttprangereader.readlinescCst|���Sr)�iterr8rrrr�__iter__[szhttprangereader.__iter__cCsdSrrrrrrr^szhttprangereader.close)N)�__name__�
__module__�__qualname__rrr"r#r(r8r:rrrrrr&s
!rc@seZdZdZdS)�_RangeErrorz6Error raised when an unsatisfiable range is requested.N)r;r<r=�__doc__rrrrr>esr>c@s eZdZdZdd�Zdd�ZdS)�_HTTPRangeHandleraHandler that enables HTTP Range headers.

    This was extremely simple. The Range header is a HTTP feature to
    begin with so all this class does is tell urllib2 that the
    "206 Partial Content" response from the HTTP server is what we
    expected.
    cCs"t�|||���}||_||_|Sr)r&Z
addinfourlZget_full_urlr)�msg)rr2�fpr)rA�hdrs�rrrr�http_error_206rsz _HTTPRangeHandler.http_error_206cCstd��dS)NsRequested Range Not Satisfiable)r>)rr2rBr)rArCrrr�http_error_416ysz _HTTPRangeHandler.http_error_416N)r;r<r=r?rErFrrrrr@isr@cs2t�||����t��G�fdd�dtj�}|S)Ncs*eZdZdd�Zd	�fdd�	Zdd�ZdS)
z#build_opener.<locals>.statichttpvfscSs||_i|_dSr)�base�options)rrGrrrr�sz,build_opener.<locals>.statichttpvfs.__init__�rcs0|dvrtd��d�|jt�|�f�}t|��S)N)rIsrbsPermission denied�/)r-�joinrGr&�quoter)r�path�mode�args�kwr4�Z	urlopenerrr�__call__�sz,build_opener.<locals>.statichttpvfs.__call__cSs|rt�|j|�S|jSdSr)rrKrG)rrMrrrrK�sz(build_opener.<locals>.statichttpvfs.joinN)rI)r;r<r=rrRrKrrQrr�
statichttpvfs�srS)rrZadd_handlerr@�vfsmodZabstractvfs)�ui�authinforSrrQr�build_opener~srWc@seZdZdd�Zdd�ZdS)�statichttppeercCsdSrrrrrr�local�szstatichttppeer.localcCsdS�NFrrrrr�canpush�szstatichttppeer.canpushN)r;r<r=rYr[rrrrrX�srXcs`eZdZejjZdd�Z�fdd�Zdd�Z	dd�Z
d	d
�Zddd
�Zddd�Z
dd�Z�ZS)�statichttprepositoryc

CsR||_||_||_t�|�d�d�}|��\|_}t||�}||j�|_	||j	�
d��|_g|_t
�
�|_d|_d|_t�|_t�|_zt|j	�d����}Wn�t�yH}z�|jtjkr��t�}z |�	d�}|�d�|��WnLt�y2}z2|jtjk�r�td�|}	t�|	��WYd}~n
d}~00WYd}~n
d}~00tj|v�r|||j	�
d��}
|t|
�d����O}t� |�}t�!||�t�"||�t#|_$|j$j%|_%t�&||j|�|_'|j'j|_(|j'j)|_*|j'j
|_+i|_,||_-t.�/|j$|j*�}t.�0|j*|||�1��|_0t2�2|j*�|_2d|_3d|_4t5�6�|_7d|_8d|_9d|_:d|_;dS)	NrJs/.hgscachesrequiress
00changelog.irs+'%s' does not appear to be an hg repositorysstore)<�_urlrU�rootrr�rstriprVrMrWrrKZcachevfsZ_phasedefaultsr�namesZ
filternameZ_extrafilterid�setZ_wanted_sidedataZfeaturesr(r7r-r+r,rrrZ	RepoError�requirementsmodZSHARESAFE_REQUIREMENTr	ZgathersupportedrequirementsZensurerequirementsrecognizedZensurerequirementscompatiblerZ
nodeconstantsZnullidZ	makestore�storeZspathrZsvfsZsjoinZ
_filecacherr
ZmanifestrevlogZmanifestlogZnarrowmatchrZ_tagsZ
nodetagscacherZBranchMapCacheZ
_branchcachesZ_revbranchcacheZ
encodepatsZ
decodepatsZ	_transref)
rrUrM�urVZvfsclassrr6rBrAZstorevfsZsupportedrequirementsZrootmanifestrrrr�sr



6
�



�
zstatichttprepository.__init__cstt|��|�}|�dg�S)Nspushkey)�superr\�_restrictcapabilities�
difference)rZcaps��	__class__rrrf�sz*statichttprepository._restrictcapabilitiescCs|jSr)r]rrrrr�szstatichttprepository.urlcCsdSrZrrrrrrY�szstatichttprepository.localcCst|�Sr)rXrrrr�peer�szstatichttprepository.peerTcCst�dtd�dtd���dS�Nrslock not availableslocks"cannot lock static-http repository�rZLockUnavailabler�r�waitrrr�wlock�s�zstatichttprepository.wlockcCst�dtd�dtd���dSrkrlrmrrr�lock�s�zstatichttprepository.lockcCsdSrrrrrr�_writecachessz!statichttprepository._writecaches)T)T)r;r<r=r	�localrepositoryZ_basesupportedZ	supportedrrfrrYrjrorprq�
__classcell__rrrhrr\�sF

r\cCs$|rt�td���t||dd��S)Ns(cannot create new static-http repository�)rZAbortrr\)rUrMZcreateZintentsZ
createoptsrrr�instancesru)NN)'Z
__future__rr+Zi18nrZnoder�rrrr	r
rrr
rrbrrrrTZutilsrr*r&�objectrr-r>Zbasehandlerr@rWZ	localpeerrXrrZrevlogfilestorager\rurrrr�<module>
s 8?
�l

Youez - 2016 - github.com/yon3zu
LinuXploit