HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyc
�
1�3\c@@s�ddlmZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZdej
ejfd	��YZdS(
i(tabsolute_importN(t_(terrortpycompat(tdateutili(tcommontmonotone_sourcecB@s�eZddd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�ZRS(cC@s�tjj|||||�|rLt|�dkrLtjtd���ntjj||d�||_||_	t
|_||_tj
td�|�}tj	jtj	j|d��sy,t|d�}|jd�}|j�Wntk
rd}nX|d	kr|�qnd
}d}	|	}
d}d
}tj|d|	�|_tj|d|	d|�|_tj|d|	d|�|_tj|d|	d|d|�|_tj|d|	d|	�|_tj|d|	�|_tj|d|	d|�|_tj||d|	d|
�|_|d||d|}
tj|
d|d�|_d|_!d|_"d|_#d|_$tj%ddt
�dS(Nis9monotone source does not support specifying multiple revstmtns+%s does not look like a monotone repositoryt_MTNtrbitsSQLite format 3s\s*s\s+"((?:\\"|[^"])*)"\s*s\s+\[(\w+)\]\s*s	(?:.|\n)+tdirtfiletcontenttadd_filetpatchtfromttotrenametdeletettagtrevisiontnametvaluetattrs
"mtn:execute"s"true"tabort(&Rtconverter_sourcet__init__tlenRtAbortRtcommandlinetuitpathtFalset
automatestdiotrevstNoRepotostexiststjointopentreadtclosetIOErrortretcompiletdir_retfile_retadd_file_retpatch_ret	rename_ret	delete_rettag_retcert_retattr_execute_retNonetmanifest_revtmanifesttfilestdirst	checktool(tselfRtrepotypeR R#tnorepotftheadertspaceRRRtlinesR((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyRsZ				
!

$"
 				cO@s-|jr|j||�S|j||�SdS(N(R"tmtnrunstdiotmtnrunsingle(R=targstkwargs((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytmtnrunQs	cO@s |j|d<|jd||�S(Ntdtautomate(R trun0(R=RFRG((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyREWs
cO@s-tj|�}g}x]|j�D]O\}}|jdt|�|f�|r"|jdt|�|f�q"q"W|r�|jdd�|jd�n|jd�x(|D] }|dt|�|f7}q�W|jd�dj|�}|jjd|�|j	j
|�|j	j�|j|�S(	Ns%s:%sitotetls%d:%sR
smtn: sending '%s'
(
Rtbyteskwargst	iteritemstappendRtinsertR'Rtdebugt
mtnwritefptwritetflushtmtnstdioreadcommandoutput(R=RFRGtcommandtktvtarg((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyRD[s$$



cC@s�d}d}xJ|dkrX|jjd�}|sKtjtd���n||7}qW|d }|jjd�}|dkr�tjtd�|��n|jjd�}|dkr�tjtd���nd}d}xJ|dkr+|jjd�}|stjtd	���n||7}q�Wyt|d �}Wn*tk
rltjtd
�|��nX|jj|�}t|�|kr�tjtd�t|�|f��n||||fS(NR
t:is%bad mtn packet - no end of commandnbri����tmewptls#bad mtn packet - bad stream type %ss'bad mtn packet - no divider before sizes&bad mtn packet - no end of packet sizes#bad mtn packet - bad packet size %ss9bad mtn packet - unable to read full packet read %s of %s(	R7t	mtnreadfpR)RRRtlongt	TypeErrorR(R=R)t
commandnbrtstreamt	lengthstrtlength((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytmtnstdioreadpacketss>

cC@sg}x�tr|j�\}}}}|jjd|||f�|dkr�|dkr~tjtd�||f��nPq	|dkr�|jjtd�|j�|jj|�q	|dkr�|jjd|�q	|d	kr	|j	|�q	q	Wd
j
|�S(Nsmtn: read packet %s:%s:%s
RNt0smtn command '%s' returned %stews
%s error:
tpsmtn: tmR
(tTrueReRRSRRRtwarnRXRQR'(R=RXtretvalRaRbRdtoutput((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyRW�s$	cC@s|j|krdS|jd|�jd�|_||_i|_i|_x�|jD]�}|jj|�}|r�d}|jd�}|jd�}|j	j|�r�|d7}n||f|j|<n|j
j|�}|rVt|j|jd�<qVqVWdS(Ntget_manifest_ofs

R
iitx(R8RHtsplitR9R:R;R/tmatchtgroupR6R.Rj(R=trevRMRiRRtnode((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytmtnloadmanifest�s$			
cC@s|j|�||jkS(N(RuR:(R=RRs((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyt	mtnisfile�s
cC@s|j|�||jkS(N(RuR;(R=RRs((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytmtnisdir�s
cC@s�idd6dd6dd6dd6}|jd|�}tjd|�}xi|D]a}|jj|�}|rM|j�\}}|jdd	�}|jd
d�}|||<qMqMW|djd�d
d|d<|S(Ns	<missing>tauthortdatet	changelogtbranchtcertss

      key ["\[]s\"t"s\\s\t.is UTC(RHR,RpR5Rqtgroupstreplace(R=RsR|tcertlistRMRiRR((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytmtngetcerts�s
cC@s'|js|jd�j�S|jSdS(Ntleaves(R#RHt
splitlines(R=((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytgetheads�s	cC@s�|rtjtd���n|jd|�jd�}i}i}g}i}xI|D]A}|jj|�}	|	r�|||	jd�<|||	jd�<n|jj|�}	|	r�|||	jd�<n|j	j|�}	|	r�|||	jd�<n|j
j|�}	|	rX|	jd�}
|	jd�}|j|
|�rnd||
<|||
<|||
<|||<q�|j|
|�r�|j
||
f�q�qXqXWx�|D]�\}}
i}x[|jD]P}||kr�q�n|j|
d�r�||t|
�||<d||<q�q�WxQ|j�D]C\}}|jjtd�||fd�|||<|||<q!Wx|j�D]}|||<quWq�W|j�|t�fS(	Ns-convert from monotone does not support --fulltget_revisions

iit/s3copying file in renamed directory from '%s' to '%s's
(RRRRHRpR0RqRrR1R3R2RvRwRQR:t
startswithRtitemsRRStvaluestset(R=RstfullRR:t
ignoremovetrenameddirstcopiesRMRittonametfromnametfromdirttodirtrenamedttofiletfromfile((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyt
getchanges�sZ





cC@sy|j||�sdSy|jd|d|�}Wntk
rFdSX|j|�|jj|d�\}}||fS(Ntget_file_oftrR
(NN(NN(NR
(RvR7RHt	ExceptionRuR:tget(R=RRstdataRtR((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytgetfile)s

cC@s�i}|j|�}|jd�|dkr;d|d<nd}tjd|ddtjtj|d|��d|d	d
|d|jd|�j�d|dd|�S(
NtsuspendR{iR*s%Y-%m-%dT%H:%M:%SRxRytdescRzRstparentstextra(	R�R�RtcommitRtdatestrtstrdateRHR�(R=RsR�R|t
dateformat((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyt	getcommit4s
	


cC@sdi}xW|jd�jd�D]=}|jj|�}|r|jd�||jd�<qqW|S(Nttagss

ii(RHRpR4RqRr(R=R�RMRi((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytgettagsCs#cC@s
t�dS(N(tNotImplementedError(R=Rsti((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytgetchangedfilesKscC@s0d}y|jd�}t|�}Wn&tk
rMtjtd���nX|dkrt|_|jj	d|�|j
ddd|j�\|_|_
|j
j�}|d	kr�tjtd
�|��nxT|dkr|j
j�}|s�tjtd���q�q�Wn|jj	d
|�dS(Ngtinterface_versions2unable to determine mtn automate interface versiong(@s/mtn automate version %f - using automate stdio
RJtstdios-dsformat-version: 2
s(mtn automate stdio header unexpected: %ss
s1failed to reach end of mtn automate stdio headerss^mtn automate version %s - not using automate stdio (automate >= 12.0 - mtn >= 0.46 is needed)
(REtfloatR�RRRRjR"RRSt_run2R RTR^treadline(R=tversiont
versionstrR)((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytbeforePs,
	
cC@s<|jr8|jj�d|_|jj�d|_ndS(N(R"RTR*R7R^(R=((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pytafterps
	
	
N(t__name__t
__module__R7RRHRERDReRWRuRvRwR�R�R�R�R�R�R�R�R�(((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyRs$:				&							;					 (t
__future__RR%R,tmercurial.i18nRt	mercurialRRtmercurial.utilsRR
RRRR(((s</usr/lib64/python2.7/site-packages/hgext/convert/monotone.pyt<module>s