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 :  /usr/lib64/python3.9/site-packages/hgext/convert/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/hgext/convert/__pycache__/gnuarch.cpython-39.pyc
a

�+�b�3�@s�ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZmZddlmZGdd	�d	ejej�ZdS)
�)�absolute_importN)�_)�encoding�error�mail�pycompat�util)�dateutil�procutil�)�commoncs�eZdZGdd�de�Zd(�fdd�	Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Z�ZS))�gnuarch_sourcec@seZdZdd�ZdS)zgnuarch_source.gnuarch_revcCs@||_d|_d|_d|_d|_g|_g|_g|_i|_i|_	dS)N�)
�rev�summary�date�author�continuationof�	add_files�	mod_files�	del_files�	ren_files�ren_dirs)�selfr�r�;/usr/lib64/python3.9/site-packages/hgext/convert/gnuarch.py�__init__ sz#gnuarch_source.gnuarch_rev.__init__N)�__name__�
__module__�__qualname__rrrrr�gnuarch_revsr Ncs�tt|�j||||d�tj�tj�|d��s@t�t	d�|��d|_
t�d�rXd|_
n t�d�rjd|_
nt
�t	d���tj�|||j
�tj�|�|_d|_d|_d|_i|_i|_i|_tj|_g|_dS)N)�revs�{arch}s+%s does not look like a GNU Arch repositorysbaz�tlascannot find a GNU Arch tool)�superr
r�os�path�exists�joinrZNoRepor�execmdr
Zfindexer�Abort�commandline�realpath�tmppath�treeversion�lastrev�changes�parents�tagsr�archives)r�uiZrepotyper&r!��	__class__rrr,s*
�

zgnuarch_source.__init__c
Cs�dd�|�dd�D�|_|jdkr2|�d|j�}n|�dd|j�}|��|_|j�d�}tj�	t
�t�
��d	|d
�|_g|jd<|j}d}|�r�|j�td�|�|�d�d}||jvr�|j�td
�|��q�|�ddd|�\}}|�|d|�d}|D]�}|��}|�|�|j|<g|j|<|�dd|j|�\}	}|�rR|�d|�}	|�|	|�|j|�|�|}|j|j�r�d�	|j|j�d�dd��}q�|dd�dk�rq��qq�dS)NcSsg|]}|�d��qS)�
)�rstrip)�.0�irrr�
<listcomp>Msz)gnuarch_source.before.<locals>.<listcomp>sarchivess-nr#stree-version�-d�/shg-%srsanalyzing tree version %s...
rsItree analysis stopped because it points to an unregistered archive %s...
s	revisionss-rs-fs"failed retrieving revisions for %sscat-logscat-archive-logs--���i����sbase-0)Z	runlines0r3r)Zrun0r&�stripr.�splitr%r(r�fsencode�tempfileZ
gettempdirr-r1r4�statusr�runlines�	checkexitr r0�run�_parsecatlog�appendr)
r�output�versionr.�child�archiverC�lr�catlogrrr�beforeKsd
�

�

�����
�zgnuarch_source.beforecCs&|j�d|j�tj|jdd�dS)Nscleaning up %s
T��
ignore_errors)r4�debugr-�shutil�rmtree�rrrr�after�szgnuarch_source.aftercCs
|jdS�N)r1rUrrr�getheads�szgnuarch_source.getheadscCs@||jkrt�td���tj�tj�|j|��s4dS|�	||�S)Nsinternal calling inconsistency)NN)
r/rr*rr%r&�lexistsr(r-�_getfile)r�namerrrr�getfile�s

zgnuarch_source.getfilec
s6|rt�td���|���g}i}|j�jD]}|�|�f�q0|j�jD]}|�|�f�qP|j�jD]}|�|�f�qp|j�j	D]8}|j�j	|}|�|�f�|�|�f�|||<q�|j�j
D]D}|j�j
|}|�||�\}}	|�fdd�|D�7}|�|	�qֈ|_
tt|��|t�fS)Ns)convert from arch does not support --fullcsg|]}|�f�qSrr�r9�f�rrrr;�rz-gnuarch_source.getchanges.<locals>.<listcomp>)rr*r�_updater0rrHrrrr�_rendirchanges�updater/�sorted�set)
rrZfullr0�copiesr^�src�toZchgsZcpsrr_r�
getchanges�s.

zgnuarch_source.getchangescCs*|j|}tj|j|j|j|j||d�S)N)rrZdescr1r)r0rZcommitrrrr1)rrr0rrr�	getcommit�s
�zgnuarch_source.getcommitcCs|jSrW)r2rUrrr�gettags�szgnuarch_source.gettagscOsh|j|g}||7}dd�|D�}t�tj�}|d|d|g7}d�|�}|j�|d�t�t�	t
j|��S)NcSsg|]}t�|��qSr)r
Z
shellquote)r9�argrrrr;�rz+gnuarch_source._execute.<locals>.<listcomp>�>s2>� r7)r)rZbytestrr%�devnullr(r4rR�systemZrapplyr
Ztonativestr)r�cmd�args�kwargsZcmdlineZbdevnullrrr�_execute�s

zgnuarch_source._executecCsx|j�d|�|�dd|j|�\}}|rFtj|jdd�|�|�n.|j|d}|j�d||f�|�||�dS)Nsapplying revision %s...
sreplayr<TrPrs)computing changeset between %s and %s...
)	r4rRrDr-rSrT�_obtainrevisionr1�_parsechangeset)rrZ	changesetrCZold_revrrrr`�s
�zgnuarch_source._updatecCsvt�tj�|j|��j}t�|�rHt�	tj�|j|��}|rBd}qnd}n&t�
tj�|j|��}|d@rjdpld}||fS)N�lr�I�x)r%�lstatr&r(r-�st_mode�stat�S_ISLNKr�readlinkZreadfile)rr[r�mode�datarrrrZ�s
zgnuarch_source._getfilecCs*gd�}|D]}|�|�dkrdSqdS)N)r"s	.arch-idss.arch-inventoryr>TF)�find)rr[Zexclude�excrrr�_exclude�s
zgnuarch_source._excludecstg}t�|�}t|�dkrp|���tj�|��}|�|�stj�|�rd|�fdd�t�|�D�7}q|���q|S)Nrcsg|]}tj��|��qSr)r%r&r(r]��crrr;
rz0gnuarch_source._readcontents.<locals>.<listcomp>)	r%�listdir�len�popr&r(r��isdirrH)rr&�files�contents�prr�r�
_readcontentss

zgnuarch_source._readcontentsc	Cshg}i}|�tj�|j|��}|D]<}tj�||�}tj�||�}|�|�|�|�|||<q"||fSrW)r�r%r&r(r-rH)	rrf�destr0rer�r^�s�drrrras


zgnuarch_source._rendirchangescCs^|j�d|�|�d||j�}|�|�|j�d|�|�|j�}|j|j|7_dS)Nsobtaining revision %s...
sgetsanalyzing revision %s...
)r4rRrsr-rEr�r0r)rrrIr�rrrrts
zgnuarch_source._obtainrevisioncCs|�d�r|dd�S|S)Ns./�)�
startswith)rr&rrr�_stripbasepath&s
zgnuarch_source._stripbasepathcCs�z�t�|�}t�t�|dd��|j|_|�|d�|j|_d�	|�|d�|�|�
��f�|j|_|�|j|j�|j|_d|vr�|�|d�|j|_Wn$t
y�t�td�|��Yn0dS)Nz
Standard-dates%Y-%m-%d %H:%M:%SZCreators

ZSummaryzContinuation-ofscould not parse cat-log of %s)rZ
parsebytesr	ZdatestrZstrdater0rZrecoderr(Zget_payloadrr�	Exceptionrr*r)rrrrNrrrrG+s$
����zgnuarch_source._parsecatlogc	Cs�|D�]�}|��}|�d�rZ|�d�sZ|�|dd����}|�|�sX|j|j�|�q|�d�r�|�d�s�|�|dd����}|�|�s�|j|j�|�q|�d�r�|�|dd����}|�|�s�|j|j�|�q|�d��r"|�|d	d����}|�|��s�|j|j�|�q|�d
��rd|�|dd����}|�|��s�|j|j�|�q|�d��r�|dd����	d�}t
|�dk�r�|dd����	d
�}|�|d�}|�|d�}|�|��s�|�|��s�||j|j|<q|�d��r2|�|dd����}|�|��s�|j|j�|�q|�d�r|dd����	d�}t
|�dk�rv|dd����	d
�}|�|d�}|�|d�}|�|�s|�|�s||j|j|<qdS)N�AsA/r�DsD/sMbr�sM->��Ms=>rm�	rschs/>)
r?r�r�r�r0rrHrrr@r�rr)	rrrrM�filer�rf�dst�dirsrrrruHsT





zgnuarch_source._parsechangeset)N)rrr�objectr rrOrVrXr\rhrirjrsr`rZr�r�rartr�rGru�
__classcell__rrr5rr
s&
O	


r
)Z
__future__rr%rSr{rBZmercurial.i18nrZ	mercurialrrrrrZmercurial.utilsr	r
�rZconverter_sourcer+r
rrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit