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: //lib64/python2.7/site-packages/mercurial/changelog.pyc
�
1�3\c@@s/ddlmZddlmZddlmZmZmZddlm	Z	ddl
mZmZm
Z
mZddlmZmZidd	6Zd
�Zd�Zd�Zd
�Zdefd��YZd�Zd�Ze	jdefd��Y�Zdefd��YZdejfd��YZdS(i(tabsolute_importi(t_(tbinthextnullid(tattr(tencodingterrortpycompattrevlog(tdateutilt
stringutiltdefaulttbranchcC@s:|jdd�jdd�jdd�}|jdd�S(	sC
    >>> from .pycompat import bytechr as chr
    >>> d = {b'nl': chr(10), b'bs': chr(92), b'cr': chr(13), b'nul': chr(0)}
    >>> s = b"ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d
    >>> s
    'ab\ncd\\\\n\x00ab\rcd\\\n'
    >>> res = _string_escape(s)
    >>> s == stringutil.unescapestr(res)
    True
    s\s\\s
s\ns
s\rss\0(treplace(ttext((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt_string_escape!s*cC@s�tj�}x�|jd�D]}|rd|krm|jdd�}|jdd�}|jdd�}ntj|�jdd�\}}|||<qqW|S(	s�
    >>> from .pycompat import bytechr as chr
    >>> sorted(decodeextra(encodeextra({b'foo': b'bar', b'baz': chr(0) + b'2'})
    ...                    ).items())
    [('baz', '\x002'), ('branch', 'default'), ('foo', 'bar')]
    >>> sorted(decodeextra(encodeextra({b'foo': b'bar',
    ...                                 b'baz': chr(92) + chr(0) + b'2'})
    ...                    ).items())
    [('baz', '\\\x002'), ('branch', 'default'), ('foo', 'bar')]
    ss\0s\\s\\
s
tt:i(t
_defaultextratcopytsplitRRtunescapestr(Rtextratltktv((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytdecodeextra0s!cC@s@gt|�D] }td|||f�^q
}dj|�S(Ns%s:%ss(tsortedRtjoin(tdRtitems((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytencodeextraGs3cC@s5djg|j�D]}|j�^q�jd�S(s>strip trailing whitespace and leading and trailing empty liness
(Rt
splitlinestrstriptstrip(tdescR((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt	stripdescLstappendercB@s}eZdZd�Zd�Zd�Zd�Zed��Zd�Z	dd�Z
d	d
�Zd�Zd�Z
d
�ZRS(s`the changelog index must be updated last on disk, so we use this class
    to delay writes to itcC@sU||_|||�}||_|j�|_|j|�j|_|j|_dS(N(tdatatfpttelltoffsettfstattst_sizetsizet_end(tselftvfstnametmodetbufR(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt__init__Ss		cC@s|jS(N(R.(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytend[scC@s|jS(N(R*(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR)]scC@sdS(N((R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytflush_scC@s
|jjS(N(R(tclosed(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR7bscC@s|jj�dS(N(R(tclose(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR8fsicC@s�|dkr||_n@|dkr6|j|7_n"|dkrX|j�||_n|j|jkr�|jj|j�ndS(s,virtual file offset spans real file and dataiiiN(R*R5R-R(tseek(R/R*twhence((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR9isi����cC@s�d}|j|jkrg|jj|�}|}|jt|�7_|dkrg|t|�8}qgn|dkr�|j|j}|jjddj|j��|jd3|jd|||!}|jt|�7_||7}n|S(s5only trick here is reads that span real file and dataRii(R*R-R(treadtlenR'tinsertR(R/tcounttrettstdoff((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR;ts

cC@sD|jjt|��|jt|�7_|jt|�7_dS(N(R'tappendtbytesR*R<R.(R/R@((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytwrite�scC@s|jj�|S(N(R(t	__enter__(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRE�s
cG@s|jj|�S(N(R(t__exit__(R/targs((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRF�s(t__name__t
__module__t__doc__R4R5R)R6tpropertyR7R8R9R;RDRERF(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR&Ps							c@sdt��fd�}|S(s=build an opener that writes in 'target.a' instead of 'target'trc@s*|�kr�||�S�|d|�S(Ns.a((R1R2t
checkambig(topenerttarget(s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt_divert�s
(tFalse(RNRORP((RNROs9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt
_divertopener�sc@sdt���fd�}|S(s?build an opener that stores chunks in 'buf' instead of 'target'RLc@s,|�kr�||�St�||��S(N(R&(R1R2RM(R3RNRO(s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt_delay�s
(RQ(RNROR3RS((R3RNROs9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt_delayopener�st_changelogrevisioncB@sweZej�Zejde�Zejdd�Zejdd�Zejdej	e
��Zejdd�ZRS(RRi(ii(
RHRIRtibRRtmanifesttusertdatetFactorytlisttfilestdescription(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRU�stchangelogrevisioncB@s�eZdZdZd�Zed��Zed��Zed��Zed��Z	ed��Z
ed	��Zed
��Zed��Z
RS(
s�Holds results of a parsed changelog revision.

    Changelog revisions consist of multiple pieces of data, including
    the manifest node, user, and date. This object exposes a view into
    the parsed object.
    u_offsetsu_textcC@s�|stdt�Stt|�j|�}|jd�}|jd|d�}|jd|d�}||d|d!dkr�|}n|jd|d�}||||f|_||_|S(NRs
iis

(RURtsuperR^t__new__tindext_offsetst_text(tclsRR/tnl1tnl2tnl3tdoublenl((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR`�s
		cC@st|jd|jd!�S(Ni(RRcRb(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRW�scC@s,|j}tj|j|dd|d!�S(Nii(RbRttolocalRc(R/toff((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRX�s	cC@s<|j}|j|dd|d!}|jdd�dd!S(Niit i(RbRcR(R/Rjt	dateextra((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt_rawdate�s	cC@sU|j}|j|dd|d!}|jdd�}t|�dkrMdS|dS(NiiRki(RbRcRR<tNone(R/RjRltfields((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt	_rawextra�s	cC@sQ|j}t|d�}yt|d�}Wntk
rFd}nX||fS(Nii(Rmtfloattintt
ValueError(R/trawttimettimezone((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRY�s	

cC@s#|j}|dkrtSt|�S(N(RpRnRR(R/Rt((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRs	cC@sD|j}|d|dkr!gS|j|dd|d!jd�S(Niiis
(RbRcR(R/Rj((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR\
s	cC@stj|j|jdd�S(Nii(RRiRcRb(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR]s(u_offsetsu_text(RHRIRJt	__slots__R`RKRWRXRmRpRYRR\R](((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR^�s	#
t	changelogcB@s�eZed�Zd�Zd�Zd�Zd�Zddd�Z	ed�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zddd�Zd�Zd�ZRS(c
C@s�|r|jd�rd}nd}d}tjj|||d|dtdt�|jrz|jtjM_t|_nt|_	||_
t|_d|_
t|_t�|_dS(s�Load a changelog revlog using an opener.

        If ``trypending`` is true, we attempt to load the index from a
        ``00changelog.i.a`` file instead of the default ``00changelog.i``.
        The ``00changelog.i.a`` file contains index (and possibly inline
        revision) data for a transaction that hasn't been finalized yet.
        It exists in a separate file to facilitate readers (such as
        hooks processes) accessing data before a transaction is finalized.
        s00changelog.i.as
00changelog.is
00changelog.dtdatafileRMtmmaplargeindexN(texistsR	R4tTruet
_initemptytversiontFLAG_GENERALDELTARQt
_generaldeltat_storedeltachainst_realopenert_delayedRnt	_delaybufRPt	frozensettfilteredrevs(R/RNt
trypendingt	indexfileRy((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR4s
	
						cC@sAx:tjt|�ddd�D]}||jkr |Sq WdS(Nii����i����(RtxrangeR<R�(R/ti((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyttiprev:s&cC@s|j|j��S(sfiltered version of revlog.tip(tnodeR�(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyttip?scC@s/d|kot|�kno.||jkS(s'filtered version of revlog.__contains__i(R<R�(R/trev((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt__contains__Cs"c@s;t�j�dkr%tjj��S�fd�}|�S(s#filtered version of revlog.__iter__ic3@s;x4tjt���D]}|�jkr|VqqWdS(N(RR�R<R�(R�(R/(s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytfilterediterMs(R<R�R	t__iter__(R/R�((R/s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR�Hsicc@sAx:tt|�j||�D]}||jkr|VqqWdS(sfiltered version of revlog.revsN(R_RxtrevsR�(R/tstarttstopR�((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR�Ts"cC@s|jj||||�S(N(Ratreachableroots2(R/tminroottheadstrootstincludepath((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytreachablerootsZscC@sQ|jr>y|jj|j�SWq>tk
r:|j�SXntt|�j�S(N(R�RatheadrevsfilteredtAttributeErrort	_headrevsR_Rxtheadrevs(R/((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR�]s	
cO@s-|jst�tt|�j||�dS(N(R�tAssertionErrorR_RxR#(R/RGtkwargs((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR#hscC@sRtt|�j|�}||jkrNtjt|�|jtd���n|S(sfiltered version of revlog.revs
filtered node(	R_RxR�R�RtFilteredLookupErrorRR�R(R/R�RL((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR�ns
cC@s7||jkr!tj|��ntt|�j|�S(sfiltered version of revlog.node(R�RtFilteredIndexErrorR_RxR�(R/R�((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR�vscC@s7||jkr!tj|��ntt|�j|�S(s"filtered version of revlog.linkrev(R�RR�R_Rxtlinkrev(R/R�((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR�|scC@s7||jkr!tj|��ntt|�j|�S(s%filtered version of revlog.parentrevs(R�RR�R_Rxt
parentrevs(R/R�((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR��scC@s7||jkr!tj|��ntt|�j|�S(s filtered version of revlog.flags(R�RR�R_Rxtflags(R/R�((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR��scC@s�|js�t|�dkrrt|_|jj|jd�rW|jj|jd�nt|j|j�|_	q�g|_
t|j|j|j
�|_	nt|_|jdt
|�|j�|jdt
|�|j�dS(s2delay visibility of index updates to other readersis.ascl-%iN(R�R<R|RPR�R{R�tunlinkRRRNR�RTt
addpendingtidt
_writependingtaddfinalizet	_finalize(R/ttr((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytdelayupdate�s				cC@s�t|_|j|_|jrv|js.t�|jd}|jj|�}|j	�|jj
||jdt�nS|jr�|j|jddt�}|jdj
|j��|j	�d|_nt|_|j|�dS(sfinalize index updatess.aRMtaRN(RQR�R�RNRPR�R�R�topenR8trenameR|RDRRnt_enforceinlinesize(R/R�ttmpnametnfileR(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR��s		

	
	cC@s�|jr�|j|j�}|jd}|j|�|j|d�}|j|j��|jdj|j��|j�d|_t	|_
t|j|j�|_n|j
r�t	St
S(sDcreate a file containing the unfinalized state for pretxnchangegroups.atwRN(R�R�R�tregistertmpRDR;RR8RnR|RPRRRNRQ(R/R�tfp1tpendingfilenametfp2((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR��s	


			cC@s&|js"tjj|||�ndS(N(R�R	R�(R/R�R(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR��s	cC@s=t|j|��}|j|j|j|j|j|jfS(s�Obtain data from a parsed changelog revision.

        Returns a 6-tuple of:

           - manifest node in binary
           - author/user as a localstr
           - date as a 2-tuple of (time, timezone)
           - list of files
           - commit message as a localstr
           - dict of extra metadata

        Unless you need to access all fields, consider calling
        ``changelogrevision`` instead, as it is faster for partial object
        access.
        (R^trevisionRWRXRYR\R]R(R/R�tc((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR;�scC@st|j|��S(s6Obtain a ``changelogrevision`` for a node or revision.(R^R�(R/t	nodeorrev((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyR^�scC@sC|j|�}|sgS|jd�}|| jd�}|dS(sX
        short version of read that only returns the files modified by the cset
        s

s
i(R�RaR(R/R�RtlastR((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt	readfiles�sc
C@s�tj|�tj|�}}|j�}|sItjtd���nd|krztjtd�tj|���nt|�}|r�dt	j
|�}
ndt	j�}
|	r|	jd�}|d
kr�|	d=q|dkrtjtd�|��qn|	r-t
|	�}	d|
|	f}
nt|�||
gt|�d|g}dj|�}
|j|
|t|�||�S(Nsempty usernames
susername %r contains a newlines%d %dR
RRt.tnullR�sthe name '%s' is reserveds%s %s(RR(R�R�R�(Rt	fromlocalR#RtStorageErrorRRtbytestrR%R
t	parsedatetmakedatetgetR RRRtaddrevisionR<(R/RWR\R$ttransactiontp1tp2RXRYRt
parseddateR
RR((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pytadd�s0
)cC@s5|j|�d}tj|jd��d|kfS(s�return the branch name and open/close state of a revision

        This function exists because creating a changectx object
        just to access this is costly.iR
R8(R;RRiR�(R/R�R((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt
branchinfoscC@s/|jjdg�}|j|j|��dS(Nt
revduplicates(tchangest
setdefaultRBR�(R/R�R�t
duplicates((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt_nodeduplicatecallback%sN(RHRIRQR4R�R�R�R�RnR�R�R�R#R�R�R�R�R�R�R�R�R�R;R^R�R�R�R�(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyRxs0#																	$	N(t
__future__Rti18nRR�RRRt
thirdpartyRRRRRR	tutilsR
RRRRR R%tobjectR&RRRTR@RUR^Rx(((s9/usr/lib64/python2.7/site-packages/mercurial/changelog.pyt<module>s""
				B			
i