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/obsolete.pyc
�
1�3\c@@s�dZddlmZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZddlmZejd�ZejZejZejZejZeZd	Zd
ZdZ d�Z!d
�Z"d�Z#ej$Z$ej%Z%dZ&dZ'dZ(ee'�Z)ee(�Z*d�Z+d�Z,d�Z-d�Z.dZ/dZ0dZ1dZ2ee1�Z3ee2�Z4ee0�Z5dZ6dZ7e6e7>Z8dZ9ee9�Z:d�Z;d�Z<d�Z=ie+e,fe&6e=e<fe/6Z>d�Z?ej@ddd��ZBe&d�ZCee&d �ZDej@d!��ZEej@d"��ZFej@d#��ZGd$�ZHd%eIfd&��YZJd'�ZKd(�ZLd)ZMd*�ZNd+�ZOd,�ZPiZQd-�ZRd.�ZSd/�ZTd0�ZUeRd1�d2��ZVeRd3�d4��ZWeRd5�d6��ZXeRd7�d8��ZYeRd9�d:��ZZeRd;�d<��Z[d=�Z\ddddd>�Z]dS(?s�Obsolete marker handling

An obsolete marker maps an old changeset to a list of new
changesets. If the list of new changesets is empty, the old changeset
is said to be "killed". Otherwise, the old changeset is being
"replaced" by the new changesets.

Obsolete markers can be used to record and distribute changeset graph
transformations performed by history rewrite operations, and help
building new tools to reconcile conflicting rewrite actions. To
facilitate conflict resolution, markers include various annotations
besides old and news changeset identifiers, such as creation date or
author name.

The old obsoleted changeset is called a "predecessor" and possible
replacements are called "successors". Markers that used changeset X as
a predecessor are called "successor markers of X" because they hold
information about the successors of X. Markers that use changeset Y as
a successors are call "predecessor markers of Y" because they hold
information about the predecessors of Y.

Examples:

- When changeset A is replaced by changeset A', one marker is stored:

    (A, (A',))

- When changesets A and B are folded into a new changeset C, two markers are
  stored:

    (A, (C,)) and (B, (C,))

- When changeset A is simply "pruned" from the graph, a marker is created:

    (A, ())

- When changeset A is split into B and C, a single marker is used:

    (A, (B, C))

  We use a single marker to distinguish the "split" case from the "divergence"
  case. If two independent operations rewrite the same changeset A in to A' and
  A'', we have an error case: divergent rewriting. We can detect it because
  two markers will be created independently:

  (A, (B,)) and (A, (C,))

Format
------

Markers are stored in an append-only file stored in
'.hg/store/obsstore'.

The file starts with a version header:

- 1 unsigned byte: version number, starting at zero.

The header is followed by the markers. Marker format depend of the version. See
comment associated with each format for details.

i(tabsolute_importNi(t_(tencodingterrortnodetobsutiltphasestpolicytpycompattutil(tdateutiltparserst
createmarkerst
allowunstabletexchangecC@s�d|}|jjd|�}|dk	r/|Sy|jjdd�SWn�tjtfk
r�t|jjdd��}d|kr�tSt	|�dkr�t
r�tS|jjdd�}|r�|jd�n||kSXdS(	sTReturns True if the given repository has the given obsolete option
    enabled.
    sevolution.%stexperimentalt	evolutiontallisevolution.createmarkersRN(
tuit
configbooltNoneRtConfigErrortAttributeErrortsett
configlisttTruetlent_enabledtconfigtadd(trepotoptiont	configkeyt	newconfigtresult((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_getoptionvalueis 
cC@sqt|t�}t|t�}t|t�}|s9|rX|rXtjtd���ni|t6|t6|t6S(s5Returns dicts showing state of obsolescence features.sU'createmarkers' obsolete option must be enabled if other obsolete options are enabled(R#tcreatemarkersopttallowunstableopttexchangeoptRtAbortR(Rtcreatemarkersvaluet
unstablevaluet
exchangevalue((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt
getoptions�scC@st|�|S(sTReturns True if the given repository has the given obsolete option
    enabled.
    (R+(RR((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt	isenabled�ss>BIB20st20scc@s]xV||krX|||t!}|t7}tt|�\}}}}d}|r�t|}	||||	!}tt||�}||	7}n||||!}
t|
�|kr�tjtd�|t|
�f��n||7}t	|
�}
y=|
j
dd�jd�\}}t|�t
|�f}
Wntk
rCd
}
nXd}d|
kr}|
j
dd�|
j
dd�f}n9d|
kr�|
j
dd�f}nd	|
kr�d}n|dk	r&yGtd
�|D��}x*|D]"}t|�dkr�d}Pq�q�WWq&tk
r"d}q&Xntt|
j���}
||||
|
|fVqWdS(NsIparsing obsolete marker: metadata is too short, %d bytes expected, got %dtdates0 0t gitp2tp1tp0cs@s|]}tj|�VqdS(N(Rtbin(t.0tp((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pys	<genexpr>�si((gi((t	_fm0fsizet_unpackt	_fm0fixedt
_fm0fnodesizet_fm0nodeRRR'Rt_fm0decodemetatpoptsplittfloattintt
ValueErrorRttuplet	TypeErrortsortedt	iteritems(tdatatofftstoptcurtnumsuctmdsizetflagstpretsucststmetadatatwhentoffsetR.tparentsR5((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_fm0readmarkers�sN



!

'	


cC@s|\}}}}}}|t@r:tjtd���nt|�}|\}}d||f|d<|dk	r�|s�d|d<nx7t|d�D]#\}	}
tj|
�|d|	<q�Wnt	|�}t
|�}tt|}|t
|�||g}
|
j
|�t||
�|S(Ns-cannot handle sha256 with old obsstore formats%r %iR.tR2isp%i(tusingsha256RR'RtdictRt	enumerateRthext_fm0encodemetaRR8R:textendt_pack(tmarkerRLRMRKROR.RRttimettztiR5RItformatRE((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_fm0encodeonemarker�s"


cC@s�x\|j�D]N\}}d|ks1d|kr@td��nd|kr
td��q
q
Wdjgt|�D]}d|||f^qr�S(smReturn encoded metadata string to string mapping.

    Assume no ':' in key and no '' in both key and value.t:ss*':' and '' are forbidden in metadata key's#':' is forbidden in metadata value's%s:%s(RDR@tjoinRC(tmetatkeytvaluetk((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyRY	scC@sOi}xB|jd�D]1}|r|jdd�\}}|||<qqW|S(s8Return string to string dictionary from encoded version.sRbi(R=(REtdtlReRf((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR;ss>IdhHBBB20st32siitBBcc@s�t}t}t}t}t}t}t}	t}
t}t	}t
jt�j
}
x�||kr�||}|
|||!�\}}}}}}}}||@r\|dkr�||}|||!f}n(|||}||||||!�}||kr|}d}q|dkr1||}|||!f}q|||}||||||!�}n�|dkr�||}|||!f}n(|||}||||||!�}||kr�|}d}nQ|dkr�||}|||!f}n(|||}||||||!�}||	|}|d|
||||!�}g}xjtjdt|�d�D]M}|||}|||d}|j|||!|||!f�|}qgW|||t|�||df|fVqQWdS(Nit>iii<(t_fm1parentnoneRUt_fm1nodesha1sizet_fm1nodesha256sizet_fm1nodesha1t_fm1nodesha256t_fm1metapairsizet_fm1metapairt	_fm1fsizeR7tstructtStructt	_fm1fixedtunpackRRtxrangeRtappendRA(RERFRGtnoneflagtsha2flagtsha1sizetsha2sizetsha1fmttsha2fmttmetasizetmetafmttfsizeRxtufixedto1tttsecsR^RKRItnumpartnummetatprecto2RMto3RRtmetapairsizeROtidx((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_fm1purereadmarkersLsd
+

	

	
"!
cC@s|\}}}}}}t}|t@r1t}nt|�}|}	|dkrXt}
nt|�}
|	|
7}	||	}tt|�}t||}
|dd}d|d||||
t|�|g}|j|�|dk	r�|j|�nt	|
�}x�|D]�\}}t|�}t|�}|dkrZd||f}t
j|��n|dkr�d|||f}t
j|��n|j|�|j|�|||7}qW||d<t
|
|�g}x.|D]&\}}|j|�|j|�q�Wdj|�S(Nii<ii�sLobsstore metadata key cannot be longer than 255 bytes (key "%s" is %u bytes)s]obsstore metadata value cannot be longer than 255 bytes (value "%s" for key "%s" is %u bytes)RT(RpRURqRRRmRsRwRZt	_calcsizeRtProgrammingErrorRzR[Rc(R\RLRMRKROR.RRt_fm1nodeRIt
numextranodesR�tformatnodest
formatmetaR`R^REt	totalsizeReRftlktlvtmsg((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_fm1encodeonemarker�sN
		

(





cC@s8ttdd�}|s(t|||�S||||�S(Ntfm1readmarkers(tgetattrRRR�(RERFRGtnative((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_fm1readmarkers�scC@std|dd!�dS(Ns>Bii(R7(RE((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_readmarkerversion�scC@s�t|�}|sd}n|dkr6t|�}n|tkrjtd�|}tj|d|��n|t|d|||�fS(s(Read and enumerate markers from raw datais+parsing obsolete marker: unknown version %rtversioniN(R�RRtformatsRRtUnknownVersion(RERFRGtdiskversionR�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_readmarkers�s	cC@s
td|�S(Ns>B(R[(R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytencodeheader�scc@sBt|d}|r"t|�Vnx|D]}||�Vq)WdS(Ni(R�R�(tmarkerst	addheaderR�t	encodeoneR\((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt
encodemarkers�s

cC@s5x.|D]&}|j|dt��j|�qWdS(Ni(t
setdefaultRR(t
successorsR�tmark((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_addsuccessors�s
cC@sFx?|D]7}x.|dD]"}|j|t��j|�qWqWdS(Ni(R�RR(tpredecessorsR�R�tsuc((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_addpredecessors�s
cC@s[xT|D]L}|d}|dk	rx-|D]"}|j|t��j|�q*WqqWdS(Ni(RR�RR(tchildrenR�R�RRR5((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_addchildren�s



cC@s@x9|D]1}tj|dkrtjtd���qqWdS(s�search for marker with invalid data and raise error if needed

    Exist as a separated function to allow the evolve extension for a more
    subtle handling.
    is;bad obsolescence marker detected: invalid successors nullidN(RtnullidRR'R(R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_checkinvalidmarkers�s
tobsstorecB@s�eZdZdZeed�Zd�Zd	�Zd
�Z	e	Z
ed��Zddddddd
�Zd�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zd�Zd�ZRS(sStore obsolete markers

    Markers can be accessed with two mappings:
    - predecessors[x] -> set(markers on predecessors edges of x)
    - successors[x] -> set(markers on successors edges of x)
    - children[x]   -> set(markers on predecessors edges of children(x)
    R�tsuccstflagRdR.RRcC@s(i|_||_||_||_dS(N(tcachestsvfst_defaultformatt	_readonly(tselfR�t
defaultformattreadonly((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt__init__s			cC@s
t|j�S(N(titert_all(R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt__iter__ scC@s
t|j�S(N(RR�(R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt__len__#scC@sj|jd�s]y|jjd�jdkSWq]tk
rY}|jtjkrZ�qZq]Xnt|j�S(NR�R�i(	t_cachedR�tstattst_sizetOSErrorterrnotENOENTtboolR�(R�tinst((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt__nonzero__&s
cC@s|jS(sgTrue if marker creation is disabled

        Remove me in the future when obsolete marker is always on.(R�(R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR�3sic	
C@s�|dkri}n|dkr�d|krHtj|jd��}q�|dk	r�|jdd�}|dkr�tj�}q�q�tj�}nt|�dkr�t|��nx/|D]'}	t|	�dkr�t|	��q�q�W||krtdtj	t
j|����ntt
|j���}xq|D]i\}
}y|
jd�|jd�Wq6tk
r�tjdtj|
�tj|�f��q6Xq6Wt|�t|�t|�|||f}t|j||g��S(	s~obsolete: add a new obsolete marker

        * ensuring it is hashable
        * check mandatory metadata
        * encode metadata

        If you are a human writing code creating marker you want to use the
        `createmarkers` function in this module instead.

        return True if a new marker have been added, False if the markers
        already existed (no op).
        R.tdevelsdefault-dateisin-marker cycle with %ssutf-8sEobsstore metadata must be valid UTF-8 sequence (key = %r, value = %r)N(RR
t	parsedateR<t
configdatetmakedateRR@RtsysstrRRXRARCRDtdecodetUnicodeDecodeErrorRR�tbytestrtbytesR?R�R(
R�ttransactionR�R�R�RRR.RORtsuccRgtvR\((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytcreate:s:	
"

**cC@s�|jr!tjtd���nt�}|jj}g}xP|D]H}|||dd�krC||krC|j|�|j|�qCqCW|rT|j	dd�}zQ|j
�}|jd|�djt||dk|j
��}	|j|	�Wd|j�X|jjd�}
|
dk	r4|
j|�n|j||	�|jj�nt|jjdd	��}d
|t|�|jd<t|�S(spAdd new markers to the store

        Take care of filtering duplicate.
        Return the number of new marker.s5creating obsolete markers is not enabled on this repoiR�tabRTNt
obsmarkerstnew_obsmarkerst0s%d((R�RR'RRR�tgetRRzR�ttellRcR�t_versiontwritetclosetchangesRtupdatet_addmarkersR�tclearR?thookargsR(R�R�R�tknownt
getsuccessorstnewtmtfRQREtaddedmarkerstprevious((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyRls2		
%
$cC@s"t|�\}}|j||�S(sfmerge a binary stream of markers inside the obsstore

        Returns the number of new markers added.(R�R(R�R�RER�R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytmergemarkers�scC@s|jjd�S(NR�(R�ttryread(R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_data�scC@s-t|j�dkr"t|j�S|jSdS(Ni(RR�R�R�(R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��s
cC@sB|j}|sgSt|�\|_}t|�}t|�|S(N(R�R�R�tlistR�(R�RER�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��s	
cC@si}t||j�|S(N(R�R�(R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��scC@si}t||j�|S(N(R�R�(R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��scC@si}t||j�|S(N(R�R�(R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��scC@s
||jkS(N(t__dict__(R�tattr((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��scC@s�t|�}|j||_|jj|�|jd�rNt|j|�n|jd�rpt|j|�n|jd�r�t	|j
|�nt|�dS(NR�R�R�(R�R�R�RZR�R�R�R�R�R�R�R�(R�R�trawdata((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR��scC@sCt|�}t�}t|�}|j}|j}|j}x|r>t�}x�|D]�}	|j|j|	d��g|j|	d�D]}
|
ds�|
^q�}|j|�g|j|	d�D]}
|
ds�|
^q�}|j|�qUW||8}tg|D]}
|
d^q�}||O}||8}||O}q?W|S(sqreturn a set of all obsolescence markers relevant to a set of nodes.

        "relevant" to a set of nodes mean:

        - marker that use this changeset as successor
        - prune marker of direct children on this changeset
        - recursive application of the two rules on predecessors of these
          markers

        It is a set so you cannot rely on order.ii((((RR�R�R�R�R�(R�tnodestpendingnodestseenmarkerst	seennodestprecursorsmarkerstsuccsmarkersR�tdirecttcurrentR�tpruned((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytrelevantmarkers�s(						
/
/
#

(R�R�R�RdR.RR(N(t__name__t
__module__t__doc__tfieldst_fm1versiontFalseR�R�R�R�t__bool__tpropertyR�RR�RR�t
propertycacheR�R�R�R�R�R�R�R�R�(((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR�s*					1	&	
		cC@s�|jdd�}i}|dk	r1||d<nt|t�}t|jd||�}|r�|r�|jtd�tt	|���n|S(s(Create an obsstore instance from a repo.R`sobsstore-versionR�R�s3obsolete feature not enabled but %i markers found!
N(
t	configintRR,R$R�R�twarnRRR�(RRR�tkwargsR�tstore((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt	makestore�s
cC@s5|jdt�x|D]}|tkr|SqWdS(s|Return the newest version listed in both versions and our local formats.

    Returns None if no common version exists.
    treverseN(tsortRR�R(tversionsR�((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt
commonversions

i�c
C@s�i}g}td}xi|D]a}t|�}t|�|tkrag}d}|j|�n|j|�|t|�7}qWxVtt|��D]B\}}djtdt�g|�}	t	j
|	�|d|<q�W|S(s�encode markers into a dict suitable for pushkey exchange

    - binary data is base85 encoded
    - split in chunks smaller than 5300 bytesiiRTs>Bsdump%i(t_maxpayloadRaRRzRWtreversedRcR[t_fm0versionR	t	b85encode(
R�tkeystpartst
currentlenR\tnextdatatcurrentpartR�tpartRE((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_pushkeyescapes


cC@s |js
iStt|j��S(sList markers over pushkey(R�RRC(R((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytlistmarkers's	cC@s�|jd�s-|jjtd�|�tS|rQ|jjtd�|�tStj|�}|j��>|jd��(}|j	j
||�|j�tSWdQXWdQXdS(sPush markers over pushkeytdumpsunknown key: %rsunexpected old value for %rspushkey: obsolete markersN(
t
startswithRR
RRR	t	b85decodetlockR�R�R�tinvalidatevolatilesetsR(RRetoldR�REttr((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt
pushmarker-s

c@s�fd�}|S(sADecorator to register a function as computing the cache for a setc@s@�tkr2d}tj|�t�f��n|t�<|S(Ns;duplicated registration for volatileset '%s' (existing: %r)(t
cachefuncsRR�(tfuncR�(tname(s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt	decorator?s
 
((R(R)((R(s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytcachefor=scC@sY|j�}|jst�S||jjkrKt||�|jj|<n|jj|S(syReturn the set of revision that belong to the <name> set

    Such access may compute the set and cache it for future use(t
unfilteredR�t	frozensetR�R&(RR(((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytgetrevsGs	cC@s&d|jkr"|jjj�ndS(s�Remove all obsolescence related cache from a repo

    This remove all cache in obsstore is the obsstore already exist on the
    repo.

    (We could be smarter here given the exact event that trigger the cache
    clearing)R�N(t
_filecacheR�R�R�(R((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pytclearobscachesXs	cC@s|jj|tj�S(s-the set of mutable revision in the repository(t_phasecachet	getrevsetRt
mutablephases(R((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_mutablerevsdstobsoletec@sJ|jj�t|�}|jjj�t��fd�|D��}|S(sthe set of obsolete revisionsc3@s'|]}��|��r|VqdS(N((R4tr(tgetnodetisobs(s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pys	<genexpr>ns(t	changelogRR3R�R�t__contains__R(Rt	notpublictobs((R6R7s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_computeobsoleteseths
torphancC@s�|jj}t|�}t|d�}||}t�}xTt|�D]F}x=||�D]/}||ksx||krZ|j|�PqZqZWqGW|S(s7the set of non obsolete revisions with obsolete parentsR4(R8t
parentrevsR3R-RRCR(RtpfunctmutableR4totherstunstableR5R5((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_computeorphansetqs
	
t	suspendedc@s>|jjt|d���t�fd�t|d�D��S(s9the set of obsolete parents with non obsolete descendantsR=c3@s!|]}|�kr|VqdS(N((R4R5(RD(s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pys	<genexpr>�sR4(R8t	ancestorsR-R(R((RDs8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_computesuspendedset�stextinctcC@st|d�t|d�S(s<the set of obsolete parents without non obsolete descendantsR4RD(R-(R((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_computeextinctset�stphasedivergentcC@s�t�}|jj}tj}|j}|jj}|j}x�|j	d�D]y}||�}xdt
j|j|gdt
�D]D}	||	�}
|
dk	r}|||
�|kr}|j|�Pq}q}WqLW|S(s3the set of revs trying to obsolete public revisionss#(not public()) and (not obsolete())tignoreflagsN(RR0tphaseRtpublicR8tnodemapR�RtrevsRtallpredecessorsR�t	bumpedfixRR(RtbumpedRKRLtclttorevttonodetrevRtpnodetprev((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_computephasedivergentset�s				
!
tcontentdivergentc
C@s;t�}|j}i}|jj}x|jd�D]�}||�}|jj|d�}t|�}t�}	x�|r2|j�d}
|
|	kr�qsn|	j|
�|
|kr�t	j
||
d|�ng||
D]}|r�|^q�}t|�dkr|j|�Pn|j|jj|
d��qsWq4W|S(sMthe set of rev that compete to be the final successors of some revision.
    s(not public()) - obsolete()itcachei(((
RR�R8RRNR�R�R<RRtsuccessorssetsRR�(
Rt	divergentR�tnewermapRTRURR�t	toprocesstseenR�tntnewer((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt_computecontentdivergentset�s,				
#
$cC@smtj|�}xD|d|dD]0}|jd|j��|j|j��q"Wtj|j��d S(Niis%di(thashlibtsha1R�RURRXtdigest(trelationtusert
folddigestR5((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt
makefoldid�s
cC@sU|dkri}nd|kr[|jjdd�pB|jj�}tj|�|d<n|jjdd�}|r�|r�||d<n|jjdd�}|jd���}	g}
x.|D]&}|d	}t|t	�s�|f}nt
|�d
kr6t
|d
�d
kr6d}
tj|
t
|d
���nd}t
|�}d
|krjt
||d�}nxvt|d
�D]e\}}|d
}|j�}t
|�dkr�|j|d�n|dk	r�||d
<d||d<d||d<n|j�s%tjtd�|dd��n|j�}t	d�|D��}d}|srt	d�|j�D��}n||kr�tjtd�|��n|r�tj||�}d||tj<n|
j||||f�qzWq�Wxa|
D]Y}|\}}}}|jj|	|||d|d|d|d|j�|jj�q�WWdQXdS(s�Add obsolete markers between changesets in a repo

    <relations> must be an iterable of ((<old>,...), (<new>, ...)[,{metadata}])
    tuple. `old` and `news` are changectx. metadata is an optional dictionary
    containing metadata for this marker only. It is merged with the global
    metadata specified through the `metadata` argument of this function.
    Any string values in metadata must be UTF-8 bytes.

    Trying to obsolete a public changeset will raise an exception.

    Current user and date are used except if specified otherwise in the
    metadata attribute.

    This function operates within a transaction of its own, but does
    not take any lock on the repo.
    RgR�suser.obsmarkerRsevolution.track-operationt	operationsevolution.effect-flagssadd-obsolescence-markeriis/Fold markers can only have 1 successors, not %disfold-ids%dsfold-idxs	fold-sizes$cannot obsolete public changeset: %sthints see 'hg help phases' for detailscs@s|]}|j�VqdS(N(R(R4RN((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pys	<genexpr>	scs@s|]}|j�VqdS(N(R(R4R5((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pys	<genexpr>ss#changeset %s cannot obsolete itselfRRR.RORN(RRRtusernameRt	fromlocalRR�t
isinstanceRARRR�RiRWtcopyR�R@R'RRRRRt
geteffectflagtEFFECTFLAGFIELDRzR�R�tfilteredrevcacheR�(Rt	relationsR�R.RORjtlusertuseoperationtsaveeffectflagR$t
markerargstrelR�R�tfoldidtfoldsizetfoldidxR�RMt
localmetadatatnprectnsucstnparet
effectflagtargs((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyR�sn	$	
	

( 


!

(^Rt
__future__RR�RcRuti18nRRTRRRRRRRR	tutilsR
t	importmodRtpackR[RxR7tcalcsizeR�RRRR$R%R&R#R+R,RPRURR8R:R6R9RSRaRYR;RRwRpRqRnRoRtRmt_fm1parentshiftt_fm1parentmaskRsRrR�R�R�R�R�tnogcRR�R�R�R�R�R�R�tobjectR�R
RRRRR%R&R*R-R/R3R<RCRFRHRXRbRiR(((s8/usr/lib64/python2.7/site-packages/mercurial/obsolete.pyt<module>Es�:
					"					3			+
	J	,				�