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: //proc/thread-self/root/lib64/python2.7/site-packages/mercurial/archival.pyc
�
1�3\c@@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZmZmZmZmZmZmZejZdZdZd	�Zid
gd6dd
gd6ddgd6dgd6Zd�Zd�ZddZd�Zde fd��YZ!de fd��YZ"de fd��YZ#ie#d6e!d6d�d6d �d6d!�d"6e"d6Z$e%dd#de'd$�Z(dS(%i(tabsolute_importNi(t_(tnullrev(terrort	formattertmatchtpycompattscmutiltutiltvfsi�i�cC@s@|rtj|�}n}t|t�s6td��ntjj|�}|j�}x>t	j
|g�D]*}|j|�rg|t|� }PqgqgWtjjtj
|��}tj|�}|jd�s�|d7}n|jd�r�|d}n|jd�s$tjj|�s$d|kr<tjtd���n|S(sWchoose prefix to use for names in archive.  make sure prefix is
    safe for consumers.s dest must be string if no prefixt/s./is../s/../s*archive prefix contains illegal components(Rtnormpatht
isinstancetbytest
ValueErrortostpathtbasenametlowertextstgettendswithtlent	localpathtpconvertt
startswithtisabsRtAbortR(tdesttkindtprefixRtsfxtlpfx((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt
tidyprefix&s&

-s.tarttars.tbz2s.tar.bz2ttbz2s.tgzs.tar.gzttgzs.ziptzipc@sAx:tj�D],\}}t�fd�|D��r
|Sq
WdS(Nc3@s|]}�j|�VqdS(N(R(t.0text(R(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pys	<genexpr>Js(Rt	iteritemstanytNone(RRt
extensions((Rs8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt	guesskindHscC@sx|D]}||SW|tS(N(R(trepotrev((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt_rootctxNs
	sy
repo: {root}
node: {ifcontains(rev, revset("wdir()"), "{p1node}{dirty}", "{node}")}
branch: {branch|utf8}
{ifeq(latesttagdistance, 0, join(latesttag % "tag: {tag}", "\n"),
      separate("\n",
               join(latesttag % "latesttag: {tag}", "\n"),
               "latesttagdistance: {latesttagdistance}",
               "changessincelatesttag: {changessincelatesttag}"))}
cC@s�|j�}i|jjddt�d6}tj�}tj|j|d|�}|j�|jd|�|j	dt
|�j��|j�dkr�d}|jdt�r�d	}n|j	d
|�n|j�|j�S(s!build content of .hg_archival.txttexperimentaltarchivemetatemplatettemplatetarchivetctxtrootttmissingt+tdirtyN(R-tuitconfigt_defaultmetatemplateRtstringioRt	startitemtcontexttdataR/thexR.R*R9tTruetendtgetvalue(R4R-toptstouttfmR9((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt
buildmetadatabs 

	
ttaritcB@sEeZdZdejfd��YZdd�Zd�Zd�ZRS(sawrite archive to tar file or stream.  can write uncompressed,
    or compress with gzip or bzip2.tGzipFileWithTimecB@seZd�Zd�ZRS(cO@sed}d|kr$|jd�}n|dkrBtj�|_n	||_tjj|||�dS(Nt	timestamp(R*tpopttimeRKtgziptGzipFilet__init__(tselftargstkwRK((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRP�s	cC@s�|jjd�|jjd�|j}|rK|jd�rK|d }nd}|rctj}n|jjtj|��tj|jt	|j
��|jjd�|jjd�|r�|jj|d�ndS(	Ns�ss.gzi����iss�s(tfileobjtwritetnameRRNtFNAMERtbytechrtwrite32utintRK(RQtfnametflags((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt_write_gzip_header�s	
(t__name__t
__module__RPR](((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRJs	
R6c@sm��_d�_dd���fd�}t|t�rT|dd|��_n|dd|��_dS(NR6c@s��dkr�|dd!}|s5t||d�}n�j|tj|d�tj|d��}|�_tjj	|tj|�|�Stj|tj|��|�SdS(NtgziitbRK(
topenRJRtsysstrtzlibtZ_BEST_COMPRESSIONRTttarfiletTarFilettaropen(tmodeRVRTt	gzfileobj(RtmtimeRQ(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRh�s
			sw:RVsw|RT(RkR*RTRR
tz(RQRRkRRh((RRkRQs8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRP�s		cC@s�tj|�}tj|�}|j|_t|�|_|rxtj|_d|_	tj|�|_
d}d|_n||_	t|�}|j
j||�dS(Ni�i(RtfsdecodeRftTarInfoRkRtsizetSYMTYPEttypeRitlinknameR*R=Rltaddfile(RQRVRitislinkR@ti((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRs�s		cC@s*|jj�|jr&|jj�ndS(N(RltcloseRT(RQ((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pytdone�s
	(	R^R_t__doc__RNRORJRPRsRw(((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRI{s
	tzipitcB@s,eZdZed�Zd�Zd�ZRS(s]write archive to zip file or stream.  can write uncompressed,
    or compressed with deflate.cC@s�t|t�r!tj|�}ntj|d|r<tjpBtj�|_d}||krf|}n||_	t
j|�d |_dS(Ntwi��i(
RR
RRmtzipfiletZipFiletZIP_DEFLATEDt
ZIP_STOREDRlRkRMtgmtimet	date_time(RQRRktcompresstepoch((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRP�s		c	C@s�tjtj|�|j�}|jj|_d|_t	}|rQd}t
}n||Bd>|_|jt
jddddt|j��7_|jj||�dS(	Nii�is<hhBliUTiii(R{tZipInfoRRmR�Rltcompressiont
compress_typet
create_systemt
_UNX_IFREGt
_UNX_IFLNKt
external_attrtextratstructtpackRZRktwritestr(RQRVRiRtR@Rutftype((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRs�s		cC@s|jj�dS(N(RlRv(RQ((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRw�s(R^R_RxRBRPRsRw(((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRy�s	tfileitcB@s)eZdZd�Zd�Zd�ZRS(s$write archive as files in directory.cC@s+||_tj|j�|_||_dS(N(tbasedirtvfsmodR	topenerRk(RQRVRk((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRP�s	cC@s�|r|jj||�dS|j|ddt�}|j|�|j�tjj|j|�}tj	||�|j
dk	r�tj||j
|j
f�ndS(NRzt
atomictemp(
R�tsymlinktFalseRURvRRtjoinR�tchmodRkR*tutime(RQRVRiRtR@tftdestfile((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRs�s

cC@sdS(N((RQ((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRw	s(R^R_RxRPRsRw(((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR��s		tfilescC@st||d�S(Ntbz2(RI(RVRk((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt<lambda>R6cC@st||d�S(NR`(RI(RVRk((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR�R6cC@st||t�S(N(RyR�(RVRk((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR�R6tuzipR6c	@s�|dkr-�r?tjtd���q?nt||�������fd�}	|tkrtjtd�|��n�|�t|||p��j�d���jjdd�r�d}
|s�||
�r�|	|
d	t�fd
��q�n|r6g�j	�j
�D]}||�r|^q}n�j	�j
�}t|�}
|
r5|j�t
j��j�gt
j�|��t
j�jtd�dtd�d
|
�}|jd�x_|D]W}�j|�}|	|d|kr�dp�d	d|k�|j�|jd|�q�W|j�n|r�xWt�j�D]C}�j|�}tj||�}|
|j��|��7}
qKWn|
dkr�tjtd���n�j�|
S(s
create archive of repo as it was at node.

    dest can be name of directory, name of archive file, or file
    object to write archive to.

    kind is type of archive to create.

    decode tells whether to put files through decode filters from
    hgrc.

    matchfn is function to filter names of files to write to archive.

    prefix is name of path to put before every archive member.

    mtime is the modified time, in seconds, or None to use the changeset time.

    subrepos tells whether to include subrepos.
    R�s*cannot give prefix when archiving to filesc@sB|�}�r$�j||�}n�j�||||�dS(N(t
wwritedataRs(RVRiRttgetdataR@(tarchivertdecodeRR-(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRU0s	sunknown archive type '%s'iR:tarchivemetas.hg_archival.txti�c@s
t��S(N(RH((R4(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR�?R6t	archivingtunitttotaltxi�tltitems"no files match the archive pattern(RRRR!t	archiverstdateR:t
configboolR�tmanifesttkeysRtsortRt
prefetchfilesR.t
matchfilestprogresstupdateR\R@t	incrementtcompletetsortedtsubstatet
workingsubtmatchmodt
subdirmatcherR3Rw(R-RtnodeRR�tmatchfnRRktsubreposRURVR�R�R�R�tfftsubpathtsubtsubmatch((R�R4R�RR-s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR3sL
#"4
$	

2
#
()t
__future__RRNRR�RfRMR{Rdti18nRR�RR6RRRR�RRRR	R�R=R�R�R!RR,R/R<RHtobjectRIRyR�R�RBR*R�R3(((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt<module>sF4			



		
	N,