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__/verify.cpython-39.opt-1.pyc
a

�+�b7W�@s�ddlmZddlZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
dZdZddd	�Zd
d�Zed�Zed
�Zed�Zed�ZGdd�de�ZdS)�)�absolute_importN�)�_)�short)�
stringutil)�error�pycompat�revlog�utilcCs>|���"t||�}|��Wd�S1s00YdS)N)�lock�verifier�verify)�repo�level�v�r�6/usr/lib64/python3.9/site-packages/mercurial/verify.pyr
s

r
cCsd|vr|�dd�}q|S)Ns//�/)�replace)�frrr�	_normpath!srsChint: run "hg debugrebuildfncache" to recover from corrupt fncache
s7parent-directory manifest refers to unknown revision %ss1warning: copy source of '%s' not in parents of %ss5warning: %s@%s: copy source revision is nullid %s:%s
c@sleZdZddd�Zdd�Zddd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
ddd�Zdd�Zdd�Z
dS)rNcCs�|��|_|j|_|��|_|dur(t}||_t�|_d|_	d|_
t|j�dk|_
t|j�d��dk|_|jjtjk|_t�|��j�|_d|_d|_|j�dd�|_d|_dS)Nr�Fsverify�	skipflagsT)Z
unfilteredr�uiZnarrowmatch�match�VERIFY_DEFAULT�_level�set�badrevs�errors�warnings�len�	changelog�havecl�manifestlog�
getstorage�havemf�_format_versionr	�REVLOGV0�revlogv1r
Zlrucachefunc�__getitem__�	lrugetctx�refersmf�
fncachewarnedZ	configint�	skipflags�warnorphanstorefiles)�selfrrrrr�__init__;s"

zverifier.__init__cCs"|j�|d�|jd7_dS)zrecord a "warning" level issue�
rN)r�warnr )r0�msgrrr�_warnOszverifier._warncCsd|dur|j�|�d|}nd}d||f}|r>d||f}|j�d|d�|jd7_dS)	zrecord a "error" level issueNs%d�?�%s: %ss%s@%s� r2r)r�addrr3r)r0�linkrevr4�filenamerrr�_errTs
z
verifier._errcCs2t�|�}|st�|�}|�|d||f|�dS)z1record exception raised during the verify processr7N)rZforcebytestrrZbytereprr<)r0r:r4�instr;Zfmsgrrr�_excas

z
verifier._exccCs�t|�s,|js|jr,|�|td�|�dS|��}|drV|�dtd�|d|�|drx|�dtd�|d|�|jtjkr�|j	s�|�
td�|�n|j	r�|�
td�|�dS)	z�verify high level property of a revlog

        - revlog is present,
        - revlog is non-empty,
        - sizes (index and data) are correct,
        - revlog's format version is correct.
        �empty or missing %sNrsdata length off by %d bytesrsindex contains %d extra bytess"warning: `%s' uses revlog format 1s"warning: `%s' uses revlog format 0)r!r#r&r<rZ	checksizer'r	r(r)r5)r0�obj�namer:�drrr�_checkrevloghszverifier._checkrevlogc
Cs�|�|�|��}|dks&|jr�||vr�|dks>|t|jj�krHtd�}ntd�}|�d|||f|�|r�|r�t|�dkr�z2g}|D]$}|�|�|�	�|kr�|�
|�q�Wnty�Yn0td�}|d�t
tj|��;}|�|�d}z�|�|�\}	}
|	|v�r:|	|jjk�r:td�t|	�t|�f}|�|||�|
|v�rx|
|jjk�rxtd	�t|
�t|�f}|�|||�WnBt�y�}z(|�|td
�t|�||�WYd}~n
d}~00||v�r�|�|td�|||f|�|||<|S)a
verify a single revlog entry

        arguments are:
        - obj:      the source revlog
        - i:        the revision number
        - node:     the revision node id
        - seen:     nodes previously seen for this revlog
        - linkrevs: [changelog-revisions] introducing "node"
        - f:        string label ("changelog", "manifest", or filename)

        Performs the following checks:
        - linkrev points to an existing changelog revision,
        - linkrev points to a changelog revision that introduces this revision,
        - linkrev points to the lowest of these changesets,
        - both parents exist in the revlog,
        - the revision is not duplicated.

        Return the linkrev of the revision (or None for changelog's revisions).
        rs)rev %d points to nonexistent changeset %ds(rev %d points to unexpected changeset %dNrs (expected %s)r8sunknown parent 1 %s of %ssunknown parent 2 %s of %sschecking parents of %ssduplicate revision %d (%d))r:�revr#r!rr"rr<r+Zfilenode�append�	Exception�join�maprZbytestrr5�parents�nullidrr>)r0r@�i�node�seen�linkrevsr�lrr4Zp1Zp2r=rrr�_checkentry�sB

2
zverifier._checkentryc	Cs8|j}|j}|���d�s(t�td���tj�	|�
d��rH|�td��|jsT|j
sp|�td�|j
rhdpjd�|��\}}|�|�}~|�||�|�||�\}}|�td�t|j�||f�|jr�|�td	�|j�|jr�|�t�|j�r4|�td
�|j�|j�r0td�}|t|j�;}|�|�dSdS)z�verify the content of the Mercurial repository

        This method run all verifications, displaying issues as they are found.

        return 1 if any error have been encountered, 0 otherwise.sfile:s$cannot verify bundle or remote repossjournals-abandoned transaction found - run hg recover
s!repository uses revlog format %d
rrs2checked %d changesets with %d changes to %d files
s%d warnings encountered!
s!%d integrity errors encountered!
s+(first damaged changeset appears to be %d)
)rr�url�
startswithrZAbortr�os�path�existsZsjoinr3�verboser)�status�_verifychangelog�_verifymanifest�_crosscheckfiles�_verifyfilesr!r"r r-�HINT_FNCACHErr�min)	r0rr�
mflinkrevs�filelinkrevs�	filenodesZ
totalfilesZ
filerevisionsr4rrrr
�sD��
��

zverifier.verifycCsN|j}|j}|j}|j}|�td��i}i}i}|�|dd�|jtd�td�t|�d�}|D]�}	|�	|	�|�
|	�}
|�||	|
||	gd�zf|�|
�}|d|jj
kr�|�|dg��|	�d|_|dD]"}||�r�|�t|�g��|	�q�Wq`t�y:}
z,d|_|�|	td	�t|
�|
�WYd
}
~
q`d
}
~
00q`|��||fS)aIverify the changelog of a repository

        The following checks are performed:
        - all of `_checkrevlog` checks,
        - all of `_checkentry` checks (for each revisions),
        - each revision can be read.

        The function returns some of the data observed in the changesets as a
        (mflinkrevs, filelinkrevs) tuples:
        - mflinkrevs:   is a { manifest-node -> [changelog-rev] } mapping
        - filelinkrevs: is a { file-path -> [changelog-rev] } mapping

        If a matcher was specified, filelinkrevs will only contains matched
        files.
        schecking changesets
s	changelogr�checkings
changesets�Zunit�totalT�sunpacking changeset %sN)rrrr"rWrrC�makeprogressr!�updaterLrP�readrJ�
setdefaultrEr,rrFr>r�complete)r0rrrZclr^r_rM�progressrK�nZchangesrr=rrrrX�s:�


2zverifier._verifychangelogrc'sl|j}|j}|j}|jj}|�|�}	|s8|j�td��i}
i}i}d}
|rn|}
|	��}|�|�|rn|�	�|j
r�|�|	j|
d�|j
td�td�t|	�d�}|	D�]�}|s�|�|�|	�|�}|�|	|||��|g�|
�}|�vr�|=n@|�rtd�t|�}|�|||
�n|�|td�t|�|
�z�|�||�jd	d
�}|��D]�\}}}|�sn|�|td��n|dk�r|�qL|t|�}|d
k�r�|�|��s��qL|�|di�}|�|g��|�n"||��sԐqL|
�|i��||��qLWnBt�y0}z(|�|td�t|�||
�WYd}~n
d}~00|jtkr�z|�||���}Wq�t�y�}z,td�t|�}|�||||
�WYd}~q�d}~00q�|�s�|� �|j!�r�fdd��D�}t"|�D]J\}}|�r�|�|t#t|�|
�n"td�}|t|�;}|�|||
��q�|�s�|�r�|j�td��t$�}t$�}|j%}g} |j&j'| d�D]H\}!}}"|"dk�sp|�sV|�(d��rV|�)t|��|�)t*j+�,|���qV| D]}|�dtd�|��q�|j
td�td�t|�d�}t-�.|�D]B\}#}$|�/|$|#||�}%t-�.|%�D]\}}&|
�|i��|&��q�q�|�sh|�rh|� �|j0�rht"|�D]}|�1td�|��qN|
S)a�verify the manifestlog content

        Inputs:
        - mflinkrevs:     a {manifest-node -> [changelog-revisions]} mapping
        - dir:            a subdirectory to check (for tree manifest repo)
        - storefiles:     set of currently "orphan" files.
        - subdirprogress: a progress object

        This function checks:
        * all of `_checkrevlog` checks (for all manifest related revlogs)
        * all of `_checkentry` checks (for all manifest related revisions)
        * nodes for subdirectory exists in the sub-directory manifest
        * each manifest entries have a file path
        * each manifest node refered in mflinkrevs exist in the manifest log

        If tree manifest is in use and a matchers is specified, only the
        sub-directories matching it will be verified.

        return a two level mapping:
            {"path" -> { filenode -> changelog-revision}}

        This mapping primarily contains entries for every files in the
        repository. In addition, when tree-manifest is used, it also contains
        sub-directory entries.

        If a matcher is provided, only matching paths will be included.
        schecking manifests
smanifestrras	manifestsrbs#%s not in parent-directory manifests%s not in changesetsT)�shallowsentry without name in manifests	/dev/null�trsreading delta %sNsreading full manifest %scs"g|]}�|D]}||f�qqSrr)�.0�m�c�r^rr�
<listcomp>�rz,verifier._verifymanifest.<locals>.<listcomp>s'changeset refers to unknown revision %sschecking directory manifests
��undecodablesmeta/�cannot decode filename '%s'�warning: orphan data file '%s')2rrrr$r%rWr�files�difference_update�	incrementr,rCZ_revlogrer!rfrLrP�getrr<Z	readdeltaZiterentriesrZvisitdirrhrErFr>r�VERIFY_FULLrgrir&�sorted�WARN_PARENT_DIR_UNKNOWN_REVrr)�store�	datafilesrRr9rSrT�dirnamer�	iteritemsrYr/r5)'r0r^�dir�
storefilesZsubdirprogressrrrZmflZmfr`ZsubdirnodesrMZlabelZrevlogfilesrjrKrkrOr4Zmfdeltar�fn�fl�fullpathZsdnr=Zchangesetpairsrpro�subdirsr)rt�t�sizeZsubdirrNZsubdirfilenodesZonefilenodesrrqrrYs�

�





2
(��zverifier._verifymanifestc		s|j}|j}|�td��t|�t|�}|jtd�td�|d�}|jr�t|�D]2}|��||vrP||d}|�	|td�|�qP|j
r�t|�D]f}|��||vr�z(|�|��t�fdd�||D��}Wnt
y�d}Yn0|�	|td	�|�q�|��dS)
Ns0crosschecking files in changesets and manifests
s
crosschecking�filesrbrs in changeset but not in manifestcsg|]}����|���qSr)r:rD)rnrk�r�rrrr�rz-verifier._crosscheckfiles.<locals>.<listcomp>s in manifest but not in changeset)rrrWrr!rer&r|ryr<r#�filer]rFri)	r0r_r`rrrcrjrrOrr�rrZ�s0�

zverifier._crosscheckfilesc#s|j}|j}|j}|j}|j}|�td��t�}g}	|jj	|	d�D].\}
}}|dksZ|sD|�
d�rD|�t|��qD|	D]}|�
dtd�|�qx|jjj|j|�dd�dkd	�}
tt|�t|�B�}d}|jtd
�td�t|�d�}t|�D�]�\}}|j||d
�z||}Wnt�y*g}Yn0|�r<|d}nd}z|�|�}WnJtj�y�}z.|�
|td�||�WYd}~q�WYd}~n
d}~00|��D]N}z|�|�Wn8t�y�|j�r�td�}|�||�d|_Yn0�q�t|��s"|j �s|j�r"|�
|td�|�n�t�|
d<t�|
d<|�!|
�D]|}|j"du�rd|�#|�$|j"��}nd}|j%�r~|�|j%�n<|j�r�|du�r�|n|}|�
||j|�nt�&d|j'���q@i}|D�]�}|d7}|�"|�}|�(||||||�}||v�r6|�r,|||v�r,|�
|td�t)|�|�n
|||=||
dv�rV||
dv�rV�q�z�|�*|����r@|du�r�|j+�r�||�}t,�fdd�|�-�D���s�|�t.||f�|��d�}t|��s�td�}|�
||�dt)�d�f|�nL�d|jj/k�r2t0}|||�dt)�d�f;}|�1|�n|�$�d�WnBt2�y�} z(|�3|td�t)|�| |�WYd} ~ n
d} ~ 00�q�||vr�dd�t4�5||�D�}!t|!�D](\}}"td�}|�
||t)|"�|��q�q�|�6�|j�rt|�D]}|�td�|��q�t|�|fS)Nschecking files
rsrsdata/ruscensorspolicysabort)sexpectedversionrserroroncensoredrar�rb)�itemsbroken revlog! (%s)s% warning: revlog '%s' not in fncache!Tr?sskipreadssafe_renameds<problem instance does not set warning or error attribute: %srs%s not in manifestsc3s|]}�d|vVqdS)rNr)rnZpctx�Zrprr�	<genexpr>/rz(verifier._verifyfiles.<locals>.<genexpr>s)empty or missing copy source revlog %s:%sschecking rename of %scSsg|]\}}||f�qSrr)rn�krrrrrrBrz)verifier._verifyfiles.<locals>.<listcomp>s&manifest refers to unknown revision %srv)7rrr+r)r&rWrrr~rrRr9rr<r"r'r.Zconfigr|rer!�	enumeraterf�KeyErrorr�rZStorageErrorrw�remover/r5r-r#ZverifyintegrityrLr:rDZwarningZProgrammingErrorr4rPrZrenamedrV�anyrI�WARN_UNKNOWN_COPY_SOURCErJ�WARN_NULLID_COPY_SOURCEZnoterFr>rr�ri)#r0r`r_rrr+r)r&r�rtr�rr��staterwZ	revisionsrjrKrNrOr��eZffr4Zproblemr:Zlinkrev_msgrMrk�ctxZfl2ror=ZfnsrLrr�rr[�s���

"

��





$�zverifier._verifyfiles)N)N)N)rNN)�__name__�
__module__�__qualname__r1r5r<r>rCrPr
rXrYrZr[rrrrr:s


:.1�
r)N)Z
__future__rrSZi18nrrLrZutilsr�rrr	r
rr{r
rr\r}r�r��objectrrrrr�<module>s,
����

Youez - 2016 - github.com/yon3zu
LinuXploit