HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/obsolete.pyc

Xc@@sidZddlmZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
ejZejZejZe
jZeZdZdZd	ZdZd
ZdZdZdZeeZeeZ d
Z!dZ"dZ#dZ$dZ%dZ&dZ'dZ(ee'Z)ee(Z*ee&Z+dZ,dZ-e,e->Z.dZ/edZ0dZ1dZ2dZ3ie!e"fe6e3e2fe%6Z4e
j5dZ6eedZ7de8fdYZ9e
j5dZ:e
j5dZ;e
j5dZ<d Z=d!e8fd"YZ>d#Z?d$Z@d%ZAd&ZBd'ZCdd(ZEd)ZFd*ZGd+ZHdd,ZIdd-ZJd.ZKdd/ZLiZMd0ZNd1ZOd2ZPeNd3d4ZQeNd5d6ZReNd7d8ZSeNd9d:ZTeNd;d<ZUeNd=d>ZVdddd?ZWd@ZXdS(AsObsolete 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 "precursor" and possible
replacements are called "successors". Markers that used changeset X as
a precursor 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 "precursor markers of Y" because they hold
information about the precursors 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_(tbase85terrortnodetparserstphasestutilt
createmarkerst
allowunstabletexchangeis>BIB20st20scc@smt|}xZ|t|krh|||t!}|t7}tt|\}}}}d}|rt|}	||||	!}tt||}||	7}n||||!}
t|
|krtjtd|t|
fn||7}t	|
}
y=|
j
ddjd\}}t|t
|f}
Wntk
rSd
}
nXd}d|
kr|
j
dd|
j
ddf}n9d|
kr|
j
ddf}nd	|
krd}n|dk	r6yGtd
|D}x*|D]"}t|dkrd}PqqWWq6tk
r2d}q6Xntt|
j}
||||
|
|fVqWdS(NsIparsing obsolete marker: metadata is too short, %d bytes expected, got %dtdates0 0t gitp2tp1tp0cs@s|]}tj|VqdS(N(Rtbin(t.0tp((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>si((gi((tlent	_fm0fsizet_unpackt	_fm0fixedt
_fm0fnodesizet_fm0nodeRtAbortRt_fm0decodemetatpoptsplittfloattintt
ValueErrortNonettuplet	TypeErrortsortedt	iteritems(tdatatofftltcurtnumsuctmdsizetflagstpretsucststmetadatatwhentoffsetRtparentsR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_fm0readmarkerssP



!

'	


cC@s|\}}}}}}|t@r:tjtdnt|}|\}}d||f|d<|dk	r|sd|d<nx8t|D]'\}	}
tj|
|d|	d<qWnt	|}t
|}tt|}|t
|||g}
|
j
|t||
|S(Ns-cannot handle sha256 with old obsstore formats%r %iRtRsp%ii(tusingsha256RRRtdictR!t	enumerateRthext_fm0encodemetaRRRtextendt_pack(tmarkerR-R.R,R0RR3ttimettztiRR*tformatR&((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_fm0encodeonemarkers"

"
cC@sx\|jD]N\}}d|ks1d|kr@tdnd|kr
tdq
q
Wdjgt|D]}d|||f^qrS(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(R%R tjoinR$(tmetatkeytvaluetk((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyR:scC@sLi}x?|jdD].}|r|jd\}}|||<qqW|S(s8Return string to string dictionary from encoded version.sRC(R(R&tdR(RFRG((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRss>IdhHBBB20st32siitBBcc@st}t}t}t}t}t}t}t}	t}
t	}t
|t}tjt
j}
x||kr||
}|
|||!\}}}}}}}}||@rl|dkr||}|||!f}n(|||}||||||!}||kr|}d}q)|dkrA||}|||!f}q)|||}||||||!}n|dkr||}|||!f}n(|||}||||||!}||kr|}d}nQ|dkr||}|||!f}n(|||}||||||!}|||}|d|	||||!}g}xgtdt
|dD]M}|||}|||d}|j|||!|||!f|}qtW|||t|||df|fVqaWdS(Nit>iii<(t_fm1parentnoneR6t_fm1nodesha1sizet_fm1nodesha256sizet_fm1nodesha1t_fm1nodesha256t_fm1metapairsizet_fm1metapairt	_fm1fsizeRRtstructtStructt	_fm1fixedtunpackR!txrangetappendR"(R&R'tnoneflagtsha2flagtsha1sizetsha2sizetsha1fmttsha2fmttmetasizetmetafmttfsizeRXtstoptufixedto1tttsecsR?R,R*tnumpartnummetatprecto2R.to3R3tmetapairsizeR0tidx((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_fm1purereadmarkers)sf
+

	

	
!
cC@s|\}}}}}}t}|t@r1t}nt|}|}	|dkrXt}
nt|}
|	|
7}	||	}tt|}t||}
|dd}d|d||||
t||g}|j||dk	r|j|nt	|
}xT|D]L\}}t|}t|}|j
||j
||||7}qW||d<t|
|g}x.|D]&\}}|j
||j
|q{Wdj|S(Nii<iR5(
RPR6RQRR!RMRSRWR;t	_calcsizeRZR<RD(R=R-R.R,R0RR3t_fm1nodeR*t
numextranodesRitformatnodest
formatmetaRAR?R&t	totalsizeRFRGtlktlv((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_fm1encodeonemarkerts>
		

(




cC@sEttdd}|s%t||St|t}||||S(Ntfm1readmarkers(tgetattrRR!RpRRT(R&R'tnativeRd((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_fm1readmarkerss

cC@sqd}td|||d!d}|d7}|tkrVtjtd|n|t|d||fS(s(Read and enumerate markers from raw datais>Bis+parsing obsolete marker: unknown version %r(RtformatsRRR(R&R'tdiskversion((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_readmarkerss

cc@sEt|d}|r%td|Vnx|D]}||Vq,WdS(Nis>B(R~R<(tmarkerst	addheadertversiont	encodeoneR=((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt
encodemarkerss

R=cB@s_eZdZdZdZdZdZdZdZdZ	dZ
d	ZRS(
sWrap obsolete marker raw datacC@s||_||_d|_dS(N(t_repot_dataR!t_decodedmeta(tselftrepoR&((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt__init__s		cC@s
t|jS(N(thashR(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt__hash__scC@s,t|t|krtS|j|jkS(N(ttypetFalseR(Rtother((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt__eq__scC@s|jdS(s#Precursor changeset node identifieri(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytprecnodescC@s|jdS(s-List of successor changesets node identifiersi(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt	succnodesscC@s|jdS(s0Parents of the precursors (None if not recorded)i(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytparentnodesscC@st|jdS(sDecoded metadata dictionaryi(R7R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyR0scC@s|jdS(s#Creation date as (unixtime, offset)i(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscC@s|jdS(sThe flags field of the markeri(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyR,s(t__name__t
__module__t__doc__RRRRRRR0RR,(((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyR=s								cC@s5x.|D]&}|j|dtj|qWdS(Ni(t
setdefaulttsettadd(t
successorsRtmark((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_addsuccessorss
cC@sFx?|D]7}x.|dD]"}|j|tj|qWqWdS(Ni(RRR(t
precursorsRRtsuc((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_addprecursorss
cC@s[xT|D]L}|d}|dk	rx-|D]"}|j|tj|q*WqqWdS(Ni(R!RRR(tchildrenRRR3R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_addchildrens



cC@s@x9|D]1}tj|dkrtjtdqqWdS(ssearch 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(RtnullidRRR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_checkinvalidmarkerss
tobsstorecB@seZdZdZeedZdZd	Zd
Z	e
dZdddddd
Z
dZdZedZedZedZedZdZdZdZRS(sStore obsolete markers

    Markers can be accessed with two mappings:
    - precursors[x] -> set(markers on precursors edges of x)
    - successors[x] -> set(markers on successors edges of x)
    - children[x]   -> set(markers on precursors edges of children(x)
    RktsuccstflagRERR3cC@s(i|_||_||_||_dS(N(tcachestsvfst_versiont	_readonly(RRt
defaultformattreadonly((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRs			cC@s
t|jS(N(titert_all(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt__iter__scC@s
t|jS(N(RR(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt__len__scC@sj|jds]y|jjdjdkSWq]tk
rY}|jtjkrZqZq]Xnt|jS(NRRi(	t_cachedRtstattst_sizetOSErrorterrnotENOENTtboolR(Rtinst((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt__nonzero__scC@s|jS(sgTrue if marker creation is disabled

        Remove me in the future when obsolete marker is always on.(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyR+sic
C@s3|dkri}n|dkrWd|krHtj|jd}qWtj}nt|dkrxt|nx/|D]'}t|dkrt|qqW||krttdtj	|nt
t|j}t
|t
|t||||f}	t|j||	gS(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isin-marker cycle with %sN(R!Rt	parsedateRtmakedateRR RRR9R"R$R%tstrRRR(
RttransactionRkRRR3RR0tsuccR=((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytcreate2s 	
"*c
C@sH|jr!tjtdnt|j}g}x7|D]/}||kr=|j||j|q=q=W|r|jdd}zS|j	}|jd|x0t
||dk|jD]}|j|qWWd|j
X|j||jjnt|jjdd}	t|	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 repoRtabiNtnew_obsmarkerst0(RRRRRRRRZRttellRRtwritetcloset_addmarkersRtclearRthookargstgetRR(
RRRtknowntnewtmtfR2tbytestprevious((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRUs*	

"
cC@s"t|\}}|j||S(sfmerge a binary stream of markers inside the obsstore

        Returns the number of new markers added.(RR(RRR&RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytmergemarkerswscC@sK|jjd}|sgSt|\|_}t|}t||S(NR(RttryreadRRtlistR(RR&R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyR~s
cC@si}t||j|S(N(RR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscC@si}t||j|S(N(RR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscC@si}t||j|S(N(RR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscC@s
||jkS(N(t__dict__(Rtattr((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscC@st|}|jj||jdr>t|j|n|jdr`t|j|n|jdrt|j	|nt
|dS(NRRR(RRR;RRRRRRRR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscC@st|}t}t|}|j}|j}x|rt}xc|D][}|j|j|dg|j|dD]}	|	ds~|	^q~}
|j|
qLW||8}tg|D]}	|	d^q}||O}||8}||O}q6W|S(sereturn 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 precursors of these markers

        It is a set so you cannot rely on order.ii(((RRRtupdateR(Rtnodestpendingnodestseenmarkerst	seennodestprecursorsmarkersRtdirecttcurrentRtpruned((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytrelevantmarkerss"					
/
#

(RkRRRERR3(N(RRRtfieldst_fm1versionRRRRRtpropertyRR!RRRt
propertycacheRRRRRRR(((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRs$					"	"	
		cC@s5|jdtx|D]}|tkr|SqWdS(s|Return the newest version listed in both versions and our local formats.

    Returns None if no common version exists.
    treverseN(tsorttTrueR~R!(tversionstv((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt
commonversions

ic
C@si}g}td}xi|D]a}t|}t||tkrag}d}|j|n|j||t|7}qWxVtt|D]B\}}djtdtg|}	t	j
|	|d|<qW|S(sencode markers into a dict suitable for pushkey exchange

    - binary data is base85 encoded
    - split in chunks smaller than 5300 bytesiiR5s>Bsdump%i(t_maxpayloadRBRRZR8treversedRDR<t_fm0versionRt	b85encode(
Rtkeystpartst
currentlenR=tnextdatatcurrentpartRotpartR&((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_pushkeyescapes


cC@s |js
iStt|jS(sList markers over pushkey(RRR$(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytlistmarkerss	cC@s|jds-|jjtd|dS|rQ|jjtd|dStj|}|j}zF|jd}z%|jj	|||j
dSWd|jXWd|jXdS(sPush markers over pushkeytdumpsunknown key: %risunexpected old value for %rspushkey: obsolete markersiN(t
startswithtuitwarnRRt	b85decodetlockRRRRtrelease(RRFtoldRR&Rttr((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt
pushmarkers 
cc@sM|dkr|j}n|jj|}x|D]}t||Vq1WdS(sreturns markers known in a repository

    If <nodes> is specified, only markers "relevant" to those nodes are are
    returnedN(R!RRR=(RRt
rawmarkerst
markerdata((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt
getmarkerss

cc@s/x(|jj|D]}t||VqWdS(s.all obsolete markers relevant to some revisionN(RRR=(RRR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRscc@sGx@|jjjj|jdD]}t|j|Vq%WdS(s6obsolete marker marking this changeset as a successorsN((RRRRRR=(tctxR&((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytprecursormarkerss+cc@sGx@|jjjj|jdD]}t|j|Vq%WdS(s.obsolete marker making this changeset obsoleteN((RRRRRR=(RR&((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytsuccessormarkerss+cc@st|}t|}x|r|j}|Vxo|jj|dD]X}|d|@rbqHnx;|dD]/}||krm|j||j|qmqmWqHWqWdS(sYield node for every successor of <nodes>.

    Some successors may be unknown locally.

    This is a linear yield unsuited to detecting split changesets. It includes
    initial nodes too.iiN((RRRRR(RRtignoreflagst	remainingtseenRRR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt
allsuccessors$s	
cc@st|}t|}x|r|j}|Vxd|jj|dD]M}|d|@rbqHn|d}||krH|j||j|qHqHWqWdS(sYield node for every precursors of <nodes>.

    Some precursors may be unknown locally.

    This is a linear yield unsuited to detecting folded changesets. It includes
    initial nodes too.iiN((RRRRR(RRRRRRRR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt
allprecursors9s	

c@s|j}t|jd|}|jr|jjd}xt||krt|}td|D}g|D]}|jr}|j^q}}|jt	|j|fd|D}t|jd|}qBWntd|DS(sRreturn all nodes in the "foreground" of other node

    The foreground of a revision is anything reachable using parent -> children
    or precursor -> successor relation. It is very similar to "descendant" but
    augmented with obsolescence information.

    Beware that possible obsolescence cycle may result if complex situation.
    s%ln::ics@s|]}|jVqdS(N(R(Rtc((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>bsc3@s!|]}|kr|VqdS(N((Rtn(tnm(s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>escs@s|]}|jVqdS(N(R(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>gs(
t
unfilteredRRt	changelogtnodemapRtmutableRRR	(RRt
foregroundtplenRRRR((R
s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyROs		+cC@s|jj}|g}t|}|dkr6i}nxC|r{|d}||krk|j|jq9||kr||kr|fg||<qxg||<q9xt||D]b}xX|dD]I}||kr||krg||<q|j||j|PqqWqPqWg}	xt||D]}gg}
x|dD]~}g}xi|
D]a}xX||D]L}
t	|}x*|
D]"}||kr|j|qqW|j|qoWq^W|}
qKW|	j
|
q1Wg}g}td|	Ddddt}xR|D]J\}}x;|D]}|j|r)Pq)q)W|j||j|qW|j
|||<q9W||S(s`Return set of all latest successors of initial nodes

    The successors set of a changeset A are the group of revisions that succeed
    A. It succeeds A as a consistent whole, each revision being only a partial
    replacement. The successors set contains non-obsolete changesets only.

    This function returns the full list of successor sets which is why it
    returns a list of tuples and not just a single tuple. Each tuple is a valid
    successors set. Note that (A,) may be a valid successors set for changeset A
    (see below).

    In most cases, a changeset A will have a single element (e.g. the changeset
    A is replaced by A') in its successors set. Though, it is also common for a
    changeset A to have no elements in its successor set (e.g. the changeset
    has been pruned). Therefore, the returned list of successors sets will be
    [(A',)] or [], respectively.

    When a changeset A is split into A' and B', however, it will result in a
    successors set containing more than a single element, i.e. [(A',B')].
    Divergent changesets will result in multiple successors sets, i.e. [(A',),
    (A'')].

    If a changeset A is not obsolete, then it will conceptually have no
    successors set. To distinguish this from a pruned changeset, the successor
    set will contain itself only, i.e. [(A,)].

    Finally, successors unknown locally are considered to be pruned (obsoleted
    without any successors).

    The optional `cache` parameter is a dictionary that may contain precomputed
    successors sets. It is meant to reuse the computation of a previous call to
    `successorssets` when multiple calls are made at the same time. The cache
    dictionary is updated in place. The caller is responsible for its life
    span. Code that makes multiple calls to `successorssets` *must* use this
    cache mechanism or suffer terrible performance.
    iics@s'|]}|rt||fVqdS(N(R(RR/((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>*sRFcS@st|dS(Ni(R(tx((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt<lambda>+sRN(RRRR!tremoveRR$RZRRR;RtissubsetR(Rtinitialnodetcachetsuccmarkerst	toproceedt
stackedsetRRRt	succssetstmarksst
productresulttprefixtsuffixtnewssRRtfinalt	candidatet
setversiontlistversiontseenset((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytsuccessorssetsjsd&			

!


	





c@sfd}|S(sADecorator to register a function as computing the cache for a setc@s tkst|t<|S(N(t
cachefuncstAssertionError(tfunc(tname(s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt	decorator;s
((R,R-((R,s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytcachefor9scC@sY|j}|jstS||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(RRt	frozensetRR)(RR,((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytgetrevsAs	cC@s&d|jkr"|jjjndS(sRemove 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)RN(t
_filecacheRRR(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pytclearobscachesRs	tobsoletecC@sat}|jj}|jd}x6|D].}|||jjkr+|j|q+q+W|S(sthe set of obsolete revisionssnot public()(RRRtrevsRRR(Rtobstgetnodet	notpublictr((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_computeobsoleteset^s	
tunstablec@sg|jdD]}|j|f^q}|jddtxF|D]>\}}tfd|jDrQj|qQqQWS(s7the set of non obsolete revisions with obsolete parentss#(not public()) and (not obsolete())RFcS@s|dS(Ni((R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRnsc3@s-|]#}|jp$|jkVqdS(N(R3trev(RR(R:(s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>ss(RR;RtanyR3R(RRR4R;((R:s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_computeunstablesetis+	t	suspendedc@s>|jjt|dtfdt|dDS(s9the set of obsolete parents with non obsolete descendantsR:c3@s!|]}|kr|VqdS(N((RR8(R>(s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>|sR3(Rt	ancestorsR0R(R((R>s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_computesuspendedsetxstextinctcC@st|dt|dS(s<the set of obsolete parents without non obsolete descendantsR3R>(R0(R((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_computeextinctset~stbumpedcC@st}|jj}tj}|j}|jj}x|jdD]}|j}|j	}xat
|j|gdtD]D}	||	}
|
dk	r}|||
|kr}|j|Pq}q}WqCW|S(s3the set of revs trying to obsolete public revisionss#(not public()) and (not obsolete())RN(Rt_phasecachetphaseRtpublicRRRR;RR
Rt	bumpedfixR!R(RRCRERFtclttorevRR;Rtpnodetprev((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_computebumpedsets			
!
t	divergentcC@s)t}|j}i}x
|jdD]}|jj|jd}t|}t}x|r |jd}||krqan|j|||krt|||ng||D]}	|	r|	^q}
t|
dkr|j|j	Pn|j
|jj|dqaWq(W|S(sMthe set of rev that compete to be the final successors of some revision.
    s(not public()) - obsolete()ii(((RRRRRRRR(RR;R(RRMRtnewermapRRt	toprocessRRkRtnewer((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt_computedivergentsets(				
#$cC@s|dkri}nd|kr7|jj|d<n|jd}zg}x|D]}|d}|d}	|j}
dt|kr|
j|dn|jstj	t
d|ddn|j}td	|	D}d}
|std
|j
D}
n||krEtj	t
d|n|j|||
|
fqVWxX|D]P}|\}}}
}
|jj||||d|
d
|d|
|jjqiW|jWd|jXdS(sqAdd 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,

    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.
    tusersadd-obsolescence-markeriiis$cannot obsolete public changeset: %sthints see 'hg help phases' for detailscs@s|]}|jVqdS(N(R(RR/((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>scs@s|]}|jVqdS(N(R(RR((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pys	<genexpr>ss#changeset %s cannot obsolete itselfR3RR0N(R!RtusernameRtcopyRRRRRRRR"R3RZRRtfilteredrevcacheRRR(Rt	relationsRRR0Rt
markerargstrelRkR.t
localmetadatatnprectnsucstnparetargs((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyRsB	





cC@st|jjdd}d|kr+tSt|dkrGtrGtSt|ks_t|krt|krt	j
tdn||kS(sTReturns True if the given repository has the given obsolete option
    enabled.
    texperimentalt	evolutiontallisU'createmarkers' obsolete option must be enabled if other obsolete options are enabled(RRt
configlistRRt_enabledtallowunstableopttexchangeopttcreatemarkersoptRRR(Rtoptiontresult((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt	isenableds(YRt
__future__RRRUti18nRR5RRRRRRtpackR<RXRtcalcsizeRqRRRcRfRdReRGR6RRRRRR4RBR:RRRWRPRQRNRORTRMt_fm1parentshiftt_fm1parentmaskRSRRRpRyR}R~tnogcRRtobjectR=RRRRRRRRRRR!RRRRR	R
RR(R)R.R0R2R9R=R@RBRLRQRRi(((s6/usr/lib/python2.7/dist-packages/mercurial/obsolete.pyt<module>Es.					 	4			+
	K	$		
)					
							;