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

�+�bl!�@s�ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZejZz4ddlmmmZddlmmmZWn�e�yxz4ddlmmmZddlmmmZWn�e�yrz(ddlmmZddlmmZWnRe�ylz(ddlmmZddlmmZWne�yfYn0Yn0Yn0Yn0Gdd	�d	ejej�Z dS)
�)�absolute_importN)�_)�error�pycompat�util)�dateutil�)�commoncs�eZdZddd�Zdd�Zdd�Zd�fdd	�	Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Z�ZS)�darcs_sourceNcCs�tjj|||||d�tj�||d�tj�tj�|d��sLtt	d�|��t�
d�|�d���d�
�}|dkr�t�t	d�|��d	t�vr�t�t	d
���tj�|�|_d|_i|_i|_i|_|��}|r�|dvr�tt	d�|��n|j�t	d
��dS)N)�revssdarcss_darcss(%s does not look like a darcs repositorys	--versionrs2.1s,darcs version 2.1 or newer needed (found %r)sElementTrees*Python ElementTree module is not available)s	darcs-1.0shasheds3%s repository format is unsupported, please upgrades#failed to detect repository format!)r	�converter_source�__init__�commandline�os�path�exists�join�NoReporZ	checktoolZrun0�
splitlines�stripr�Abort�globals�realpath�lastrev�changes�parents�tags�format�ui�warn)�selfrZrepotyperr�versionr�r"�9/usr/lib64/python3.9/site-packages/hgext/convert/darcs.pyr
/s8

�
���zdarcs_source.__init__c	Cs�tjdtj�|j�dd�|_|jd|jd�\}}|�|�|jddd|jd�}d}d}|�	d	�D]f}|�
d
�}|�dd�}|�d
�r�|dd��
�}n|dur�||j|<d}||j|<|g|j|<|}qdg|j|<dS)Nsconvert-�-)�prefixsinit��repodirschangesT)Z
xml_outputZsummaryr'spatchshash�name�sTAG �)rZmkdtemprr�basename�tmppath�run�	checkexit�xml�findall�get�findtext�
startswithrrrr)	r �output�statusZtreeZtagname�child�eltZnode�namer"r"r#�beforeWs,�

�



zdarcs_source.beforecCs&|j�d|j�tj|jdd�dS)Nscleaning up %s
T)�
ignore_errors)r�debugr,�shutil�rmtree�r r"r"r#�afterpszdarcs_source.aftercs(t|tj�r|�d�}tt|��||�S)Nzlatin-1)�
isinstancerZunicode�encode�superr
�recode)r �s�encoding��	__class__r"r#rCts
zdarcs_source.recodecKsNt�}tdd�}|j|fi|��}|j|j|d�|��|�|j�|��S)Nslatin-1)rE)�parser)	�ElementTree�	XMLParserZ_run�parse�stdout�waitr.�
returncodeZgetroot)r �cmd�kwargs�etreerH�pr"r"r#r/|s
zdarcs_source.xmlcCs\|jdd|jd�\}}|�|�t�d|tj�}|s8dSd�tdd�|�d��	d�D���S)	N�showsrepor&z^\s*Format:\s*(.*)$�,css|]}|��VqdS�N)r)�.0�fr"r"r#�	<genexpr>�r)z&darcs_source.format.<locals>.<genexpr>r)
r-rr.�re�search�	MULTILINEr�sorted�group�split)r r4r5�mr"r"r#r�s
zdarcs_source.formatcCsTg}|jddd|jd�\}}|�|�|�d�D]}|dd�}|r0|�|�q0|S)NrSsfilesT)Zno_directoriesr'�
�)r-r,r.r^�append)r �manr4r5�linerr"r"r#�manifest�s
�

zdarcs_source.manifestcCs
|jdSrU)rr>r"r"r#�getheads�szdarcs_source.getheadscCst|j|}d}t�|�d�|�}|�d�d|�dd�}d}tj|�|�d��t�||�|�|��	�|j
|d	�S)
Ns%a %b %d %H:%M:%S %Z %Ys
local_dater(r`scommentr)s%Y-%m-%d %H:%M:%S %1%2sauthor)Zauthor�date�descr)rrZstrdater1r2r	ZcommitrCZdatestrrr)r �revr7Z
dateformatrgrhZ
newdateformatr"r"r#�	getcommit�s

�zdarcs_source.getcommitc
Csj|jd|jdd|ddd|jd�\}}|rf|�d�dkrD|�||�|jdd|jd	�\}}|�||�dS)
NspullTshash %ss
/bin/false)�all�matchZno_testZno_posthookZexternal_merger'sWe have conflicts in���srevert)rkr')r-rr,�findr.)r rir4r5r"r"r#�pull�s�

zdarcs_source.pullcCs2|rt�td���i}g}d}|j|�d���D]�}|jdvrBq2|jdkr�|dur\|��}|�d�|�d�}}||vr�|�	||f�|�	||f�|||<nZ|d}|D]L}	|	�
|�s�q�|d|	t|�d�}
|�	|	|f�|�	|
|f�|	||
<q�q2|�	|j�
�|f�q2|�|�||_t|�|t�fS)Ns*convert from darcs does not support --fullssummary)s
add_directorysremove_directorysmovesfromsto�/)rrrrrnZgetchildren�tagrer1rbr3�len�textrrorr\�set)r riZfullZcopiesrrcr7�source�destrWZfdestr"r"r#�
getchanges�s8




zdarcs_source.getchangesc
Cs�||jkrt�td���tj�|j|�}zt�	|�}t�
|�j}Wn@ty�}z(|j
t
jkrlWYd}~dS�WYd}~n
d}~00|d@r�dp�d}||fS)Nsinternal calling inconsistency)NN�I�xr))rrrrrrrr,rZreadfile�lstat�st_mode�IOError�errno�ENOENT)r r8rir�data�mode�instr"r"r#�getfile�s

zdarcs_source.getfilecCs|jSrU)rr>r"r"r#�gettags�szdarcs_source.gettags)N)N)�__name__�
__module__�__qualname__r
r9r?rCr/rrerfrjrorwr�r��
__classcell__r"r"rFr#r
.s
("r
)!Z
__future__rr}rrYr<Zmercurial.i18nrZ	mercurialrrrZmercurial.utilsr�r	rZ"xml.etree.cElementTree.ElementTreerQZcElementTreerIZ xml.etree.cElementTree.XMLParserrJ�ImportErrorZ!xml.etree.ElementTree.ElementTreeZxml.etree.ElementTree.XMLParserZ$elementtree.cElementTree.ElementTreeZ"elementtree.cElementTree.XMLParserZ#elementtree.ElementTree.ElementTreeZ!elementtree.ElementTree.XMLParserrrr
r"r"r"r#�<module>s6

Youez - 2016 - github.com/yon3zu
LinuXploit